[][src]Struct w5500_ll::Interrupt

pub struct Interrupt(_);

Interrupt and interrupt mask register.

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

impl Interrupt[src]

pub const RESET: u8[src]

Interrupt and interrupt mask reset value.

pub const CONFLICT_OFFSET: u8[src]

Bit offset for the CONFLICT field.

pub const UNREACH_OFFSET: u8[src]

Bit offset for the UNREACH field.

pub const PPPOE_OFFSET: u8[src]

Bit offset for the PPPoE field.

pub const MP_OFFSET: u8[src]

Bit offset for the MP field.

pub const CONFLICT_MASK: u8[src]

Bit mask for the CONFLICT field.

pub const UNREACH_MASK: u8[src]

Bit mask for the UNREACH field.

pub const PPPOE_MASK: u8[src]

Bit mask for the PPPoE field.

pub const MP_MASK: u8[src]

Bit mask for the MP field.

pub const fn conflict(&self) -> bool[src]

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

let mut ir = w5500_ll::Interrupt::default();
assert!(!ir.conflict());
ir.set_conflict();
assert!(ir.conflict());
ir.clear_conflict();
assert!(!ir.conflict());

pub fn set_conflict(&mut self)[src]

Set the IP conflict bit.

pub fn clear_conflict(&mut self)[src]

Clear the IP conflict bit.

pub const fn unreach(&self) -> bool[src]

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 & UPORTR.

Example

let mut ir = w5500_ll::Interrupt::default();
assert!(!ir.unreach());
ir.set_unreach();
assert!(ir.unreach());
ir.clear_unreach();
assert!(!ir.unreach());

pub fn set_unreach(&mut self)[src]

Set the destination unreachable bit.

pub fn clear_unreach(&mut self)[src]

Clear the destination unreachable bit.

pub const fn pppoe(&self) -> bool[src]

Get the PPPoE connection close interrupt.

This interrupt is set when PPPoE is disconnected during PPPoE.

Example

let mut ir = w5500_ll::Interrupt::default();
assert!(!ir.pppoe());
ir.set_pppoe();
assert!(ir.pppoe());
ir.clear_pppoe();
assert!(!ir.pppoe());

pub fn set_pppoe(&mut self)[src]

Set the PPPoE connection close bit.

pub fn clear_pppoe(&mut self)[src]

Clear the PPPoE connection close bit.

pub const fn mp(&self) -> bool[src]

Get the magic packet interrupt.

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

Example

let mut ir = w5500_ll::Interrupt::default();
assert!(!ir.mp());
ir.set_mp();
assert!(ir.mp());
ir.clear_mp();
assert!(!ir.mp());

pub fn set_mp(&mut self)[src]

Set the magic packet bit.

pub fn clear_mp(&mut self)[src]

Clear the magic packet bit.

Trait Implementations

impl Clone for Interrupt[src]

impl Copy for Interrupt[src]

impl Debug for Interrupt[src]

impl Default for Interrupt[src]

impl Eq for Interrupt[src]

impl From<u8> for Interrupt[src]

impl PartialEq<Interrupt> for Interrupt[src]

impl StructuralEq for Interrupt[src]

impl StructuralPartialEq for Interrupt[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.