Struct w5500_ll::SocketInterruptMask[][src]

pub struct SocketInterruptMask(_);
Expand description

Socket Interrupt Mask Register (Sn_IMR).

This is used by the Registers::sn_imr and Registers::set_sn_imr methods.

See the SocketInterrupt structure for more information about the individual interrupts.

Implementations

Socket interrupt mask register (Sn_IMR) reset value.

Default value.

This is the same as default, but as a const value.

Example
use w5500_ll::SocketInterruptMask;

assert_eq!(SocketInterruptMask::DEFAULT, SocketInterruptMask::default());

Mask all socket interrupts.

Example
use w5500_ll::SocketInterruptMask;

assert!(SocketInterruptMask::ALL_MASKED.con_masked());
assert!(SocketInterruptMask::ALL_MASKED.discon_masked());
assert!(SocketInterruptMask::ALL_MASKED.recv_masked());
assert!(SocketInterruptMask::ALL_MASKED.timeout_masked());
assert!(SocketInterruptMask::ALL_MASKED.sendok_masked());

Check if the CON interrupt is masked.

Example
use w5500_ll::SocketInterruptMask;

let simr: SocketInterruptMask = SocketInterruptMask::DEFAULT;
assert!(!simr.con_masked());
let simr: SocketInterruptMask = simr.mask_con();
assert!(simr.con_masked());
let simr: SocketInterruptMask = simr.unmask_con();
assert!(!simr.con_masked());

Unmask the CON interrupt.

Mask the CON interrupt.

Check if the DISCON interrupt is masked.

Example
use w5500_ll::SocketInterruptMask;

let simr: SocketInterruptMask = SocketInterruptMask::DEFAULT;
assert!(!simr.discon_masked());
let simr: SocketInterruptMask = simr.mask_discon();
assert!(simr.discon_masked());
let simr: SocketInterruptMask = simr.unmask_discon();
assert!(!simr.discon_masked());

Unmask the DISCON interrupt.

Mask the DISCON interrupt.

Check if the RECV interrupt is masked.

Example
use w5500_ll::SocketInterruptMask;

let simr: SocketInterruptMask = SocketInterruptMask::DEFAULT;
assert!(!simr.recv_masked());
let simr: SocketInterruptMask = simr.mask_recv();
assert!(simr.recv_masked());
let simr: SocketInterruptMask = simr.unmask_recv();
assert!(!simr.recv_masked());

Unmask the RECV interrupt.

Mask the RECV interrupt.

Check if the TIMEOUT interrupt is masked.

Example
use w5500_ll::SocketInterruptMask;

let simr: SocketInterruptMask = SocketInterruptMask::DEFAULT;
assert!(!simr.timeout_masked());
let simr: SocketInterruptMask = simr.mask_timeout();
assert!(simr.timeout_masked());
let simr: SocketInterruptMask = simr.unmask_timeout();
assert!(!simr.timeout_masked());

Unmask the TIMEOUT interrupt.

Mask the TIMEOUT interrupt.

Check if the SENDOK interrupt is masked.

Example
use w5500_ll::SocketInterruptMask;

let simr: SocketInterruptMask = SocketInterruptMask::DEFAULT;
assert!(!simr.sendok_masked());
let simr: SocketInterruptMask = simr.mask_sendok();
assert!(simr.sendok_masked());
let simr: SocketInterruptMask = simr.unmask_sendok();
assert!(!simr.sendok_masked());

Unmask the SENDOK interrupt.

Mask the SENDOK interrupt.

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.