Struct w5500_ll::SocketInterrupt [−][src]
pub struct SocketInterrupt(_);
Expand description
Socket Interrupt Register (Sn_IR).
Indicated the socket status, such as connection, termination, receiving data, and timeout.
This is used by the Registers::sn_ir
and
Registers::set_sn_ir
methods.
Implementations
Default value.
This is the same as default
, but as a const
value.
Example
use w5500_ll::SocketInterrupt;
assert_eq!(SocketInterrupt::DEFAULT, SocketInterrupt::default());
Bit offset for the CON
field.
Bit offset for the DISCON
field.
Bit offset for the RECV
field.
Bit offset for the TIMEOUT
field.
Bit offset for the SENDOK
field.
Bit mask for the DISCON
field.
Bit mask for the TIMEOUT
field.
Bit mask for the SENDOK
field.
Get the value of the CON
interrupt.
This is issued once when the connection with the peer is successful.
Example
use w5500_ll::SocketInterrupt;
let sir: SocketInterrupt = SocketInterrupt::DEFAULT;
assert!(!sir.con_raised());
Get the value of the DISCON
interrupt.
This is issued when FIN or FIN/ACK packet is received from a peer.
Example
use w5500_ll::SocketInterrupt;
let sir: SocketInterrupt = SocketInterrupt::DEFAULT;
assert!(!sir.discon_raised());
Clear the DISCON
interrupt by writing 1
.
Get the value of the RECV
interrupt.
This is issued whenever data is received from a peer.
Example
use w5500_ll::SocketInterrupt;
let sir: SocketInterrupt = SocketInterrupt::DEFAULT;
assert!(!sir.recv_raised());
Clear the RECV
interrupt by writing 1
.
Get the value of the TIMEOUT
interrupt.
This is issued when ARPTO or TCPTO occurs.
Example
use w5500_ll::SocketInterrupt;
let sir: SocketInterrupt = SocketInterrupt::DEFAULT;
assert!(!sir.timeout_raised());
Clear the TIMEOUT
interrupt by writing 1
.
Clear the SENDOK
interrupt by writing 1
.
Returns true
if any interrupt is raised.
Example
use w5500_ll::SocketInterrupt;
assert!(!SocketInterrupt::DEFAULT.any_raised());
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SocketInterrupt
impl Send for SocketInterrupt
impl Sync for SocketInterrupt
impl Unpin for SocketInterrupt
impl UnwindSafe for SocketInterrupt
Blanket Implementations
Mutably borrows from an owned value. Read more