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

Socket interrupt status register (Sn_IR) reset value.

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 CON field.

Bit mask for the DISCON field.

Bit mask for the RECV 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());

Clear the CON interrupt by writing 1.

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.

Get the value of the SENDOK interrupt.

This is issued when SEND command is completed.

Example
use w5500_ll::SocketInterrupt;

let sir: SocketInterrupt = SocketInterrupt::DEFAULT;
assert!(!sir.sendok_raised());

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.