Removed jdac packet support
This commit is contained in:
parent
dcd2aef483
commit
eb2921a59c
|
@ -54,8 +54,6 @@ pub enum Packet {
|
||||||
SpiReadReply { succeeded: bool, data: u32 },
|
SpiReadReply { succeeded: bool, data: u32 },
|
||||||
SpiBasicReply { succeeded: bool },
|
SpiBasicReply { succeeded: bool },
|
||||||
|
|
||||||
JdacBasicRequest { destination: u8, dacno: u8, reqno: u8, param: u8 },
|
|
||||||
JdacBasicReply { succeeded: bool, retval: u8 },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Packet {
|
impl Packet {
|
||||||
|
@ -181,17 +179,6 @@ impl Packet {
|
||||||
succeeded: reader.read_bool()?
|
succeeded: reader.read_bool()?
|
||||||
},
|
},
|
||||||
|
|
||||||
0xa0 => Packet::JdacBasicRequest {
|
|
||||||
destination: reader.read_u8()?,
|
|
||||||
dacno: reader.read_u8()?,
|
|
||||||
reqno: reader.read_u8()?,
|
|
||||||
param: reader.read_u8()?,
|
|
||||||
},
|
|
||||||
0xa1 => Packet::JdacBasicReply {
|
|
||||||
succeeded: reader.read_bool()?,
|
|
||||||
retval: reader.read_u8()?
|
|
||||||
},
|
|
||||||
|
|
||||||
ty => return Err(Error::UnknownPacket(ty))
|
ty => return Err(Error::UnknownPacket(ty))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -345,18 +332,6 @@ impl Packet {
|
||||||
writer.write_bool(succeeded)?;
|
writer.write_bool(succeeded)?;
|
||||||
},
|
},
|
||||||
|
|
||||||
Packet::JdacBasicRequest { destination, dacno, reqno, param } => {
|
|
||||||
writer.write_u8(0xa0)?;
|
|
||||||
writer.write_u8(destination)?;
|
|
||||||
writer.write_u8(dacno)?;
|
|
||||||
writer.write_u8(reqno)?;
|
|
||||||
writer.write_u8(param)?;
|
|
||||||
}
|
|
||||||
Packet::JdacBasicReply { succeeded, retval } => {
|
|
||||||
writer.write_u8(0xa1)?;
|
|
||||||
writer.write_bool(succeeded)?;
|
|
||||||
writer.write_u8(retval)?;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,14 +311,6 @@ fn process_aux_packet(_repeaters: &mut [repeater::Repeater],
|
||||||
&drtioaux::Packet::SpiReadReply { succeeded: false, data: 0 })
|
&drtioaux::Packet::SpiReadReply { succeeded: false, data: 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
drtioaux::Packet::JdacBasicRequest { destination: _destination, dacno: _dacno,
|
|
||||||
reqno: _reqno, param: _param } => {
|
|
||||||
forward!(_routing_table, _destination, *_rank, _repeaters, &packet, timer);
|
|
||||||
let (succeeded, retval) = (false, 0);
|
|
||||||
drtioaux::send(0,
|
|
||||||
&drtioaux::Packet::JdacBasicReply { succeeded: succeeded, retval: retval })
|
|
||||||
}
|
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
warn!("received unexpected aux packet");
|
warn!("received unexpected aux packet");
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue