Added TODOs for safer sending
This commit is contained in:
parent
8aa5656873
commit
b1e83e3d05
1 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ impl<SpiBus: ActiveBus, NetworkImpl: Network, SocketImpl: Socket>
|
||||||
host: IpAddress,
|
host: IpAddress,
|
||||||
port: u16,
|
port: u16,
|
||||||
) -> Result<Self, SpiBus::Error> {
|
) -> Result<Self, SpiBus::Error> {
|
||||||
|
// TODO set interrupt mask to SendOk&Timeout
|
||||||
udp_socket
|
udp_socket
|
||||||
.socket
|
.socket
|
||||||
.set_destination_ip(&mut udp_socket.w5500.bus, host)?;
|
.set_destination_ip(&mut udp_socket.w5500.bus, host)?;
|
||||||
|
|
@ -52,6 +53,8 @@ impl<SpiBus: ActiveBus, NetworkImpl: Network, SocketImpl: Socket>
|
||||||
.socket
|
.socket
|
||||||
.command(&mut self.udp_socket.w5500.bus, socketn::Command::Send)?;
|
.command(&mut self.udp_socket.w5500.bus, socketn::Command::Send)?;
|
||||||
loop {
|
loop {
|
||||||
|
// TODO wait until TX pointers match first
|
||||||
|
// TODO check for Timeout interrupt
|
||||||
// wait until send is complete
|
// wait until send is complete
|
||||||
if self
|
if self
|
||||||
.udp_socket
|
.udp_socket
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue