Struct w5500_ll::Interrupt[][src]

pub struct Interrupt(_);
Expand description

Interrupt and interrupt mask register (IR and IMR).

When used for interrupt masking:

  • false = Interrupt is disabled.
  • true = Interrupt is enabled.

When used for reading interrupt status:

  • false = Interrupt is not raised.
  • true = Interrupt is raised.

This is used by these methods:

Implementations

Interrupt and interrupt mask reset value.

Default value.

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

Example
use w5500_ll::Interrupt;

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

Bit offset for the CONFLICT field.

Bit offset for the UNREACH field.

Bit offset for the PPPoE field.

Bit offset for the MP field.

Bit mask for the CONFLICT field.

Bit mask for the UNREACH field.

Bit mask for the PPPoE field.

Bit mask for the MP field.

Get the value of the IP conflict interrupt.

This interrupt is set when our source IP is the same as the sender IP in the received ARP request.

Example
use w5500_ll::Interrupt;

let ir: Interrupt = Interrupt::DEFAULT;
assert!(!ir.conflict());
let ir: Interrupt = ir.set_conflict();
assert!(ir.conflict());
let ir: Interrupt = ir.clear_conflict();
assert!(!ir.conflict());

Set the IP conflict bit.

Clear the IP conflict bit.

Get the destination unreachable interrupt.

This interrupt is set when receiving the ICMP (destination port unreachable) packet.

When this interrupt is set destination information such as the IP address and port number may be checked with the corresponding UIPR and UPORTR registers.

Example
use w5500_ll::Interrupt;

let ir: Interrupt = Interrupt::DEFAULT;
assert!(!ir.unreach());
let ir: Interrupt = ir.set_unreach();
assert!(ir.unreach());
let ir: Interrupt = ir.clear_unreach();
assert!(!ir.unreach());

Set the destination unreachable bit.

Clear the destination unreachable bit.

Get the PPPoE connection close interrupt.

This interrupt is set when PPPoE is disconnected during PPPoE.

Example
use w5500_ll::Interrupt;

let ir: Interrupt = Interrupt::DEFAULT;
assert!(!ir.pppoe());
let ir: Interrupt = ir.set_pppoe();
assert!(ir.pppoe());
let ir: Interrupt = ir.clear_pppoe();
assert!(!ir.pppoe());

Set the PPPoE connection close bit.

Clear the PPPoE connection close bit.

Get the magic packet interrupt.

This interrupt is set when wake on LAN is enabled, and the magic packet is received.

Example
use w5500_ll::Interrupt;

let ir: Interrupt = Interrupt::DEFAULT;
assert!(!ir.mp());
let ir: Interrupt = ir.set_mp();
assert!(ir.mp());
let ir: Interrupt = ir.clear_mp();
assert!(!ir.mp());

Set the magic packet bit.

Clear the magic packet bit.

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.