added all
This commit is contained in:
parent
074e01e3a0
commit
41cd42eabf
5 changed files with 17 additions and 3 deletions
|
|
@ -26,7 +26,8 @@ impl<SpiBus: ActiveBus, NetworkImpl: Network, SocketImpl: Socket>
|
|||
mut w5500: W5500<SpiBus, NetworkImpl>,
|
||||
socket: SocketImpl,
|
||||
) -> Result<Self, SpiBus::Error> {
|
||||
socket.reset_interrupt(&mut w5500.bus, socketn::Interrupt::SendOk)?;
|
||||
socket.command(&mut w5500.bus, socketn::Command::Close)?;
|
||||
socket.reset_interrupt(&mut w5500.bus, socketn::Interrupt::All)?;
|
||||
socket.set_source_port(&mut w5500.bus, port)?;
|
||||
socket.set_mode(&mut w5500.bus, socketn::Protocol::Udp)?;
|
||||
socket.command(&mut w5500.bus, socketn::Command::Open)?;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::udp::UdpSocket;
|
|||
use crate::IpAddress;
|
||||
|
||||
pub struct OutgoingPacket<UdpSocket> {
|
||||
udp_socket: UdpSocket,
|
||||
pub udp_socket: UdpSocket,
|
||||
data_length: u16,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue