Added register_dump function to show the contents of a socket register
This commit is contained in:
parent
adc7005255
commit
4ff4bc95c9
2 changed files with 15 additions and 0 deletions
|
|
@ -34,6 +34,10 @@ impl<SpiBus: ActiveBus, NetworkImpl: Network, SocketImpl: Socket>
|
|||
Ok(UdpSocket { w5500, socket })
|
||||
}
|
||||
|
||||
pub fn dump_register(&mut self) -> Result<[u8; 0x30], SpiBus::Error> {
|
||||
Ok(self.socket.dump_register(&mut self.w5500.bus)?)
|
||||
}
|
||||
|
||||
/// Returns a UDP packet if one is available. Will return `None` if no UDP packets are in the socket's buffer
|
||||
pub fn receive(mut self) -> Result<Option<IncomingPacket<Self>>, SpiBus::Error> {
|
||||
if !self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue