Enum w5500_ll::SnReg

source ·
#[repr(u16)]
pub enum SnReg {
Show 40 variants MR, CR, IR, SR, PORT0, PORT1, DHAR0, DHAR1, DHAR2, DHAR3, DHAR4, DHAR5, DIPR0, DIPR1, DIPR2, DIPR3, DPORT0, DPORT1, MSSR0, MSSR1, TOS, TTL, RXBUF_SIZE, TXBUF_SIZE, TX_FSR0, TX_FSR1, TX_RD0, TX_RD1, TX_WR0, TX_WR1, RX_RSR0, RX_RSR1, RX_RD0, RX_RD1, RX_WR0, RX_WR1, IMR, FRAG0, FRAG1, KPALVTR,
}
Expand description

W5500 socket register addresses.

Variants§

§

MR

Address of the SN_MR register.

§

CR

Address of the SN_CR register.

§

IR

Address of the SN_IR register.

§

SR

Address of the SN_SR register.

§

PORT0

Address of the SN_PORT register, index 0.

§

PORT1

Address of the SN_PORT register, index 1.

§

DHAR0

Address of the SN_DHAR register, index 0.

§

DHAR1

Address of the SN_DHAR register, index 1.

§

DHAR2

Address of the SN_DHAR register, index 2.

§

DHAR3

Address of the SN_DHAR register, index 3.

§

DHAR4

Address of the SN_DHAR register, index 4.

§

DHAR5

Address of the SN_DHAR register, index 5.

§

DIPR0

Address of the SN_DIPR register, index 0.

§

DIPR1

Address of the SN_DIPR register, index 1.

§

DIPR2

Address of the SN_DIPR register, index 2.

§

DIPR3

Address of the SN_DIPR register, index 3.

§

DPORT0

Address of the SN_DPORT register, index 0.

§

DPORT1

Address of the SN_DPORT register, index 1.

§

MSSR0

Address of the SN_MSSR register, index 0.

§

MSSR1

Address of the SN_MSSR register, index 1.

§

TOS

Address of the SN_TOS register.

§

TTL

Address of the SN_TTL register.

§

RXBUF_SIZE

Address of the SN_RXBUF_SIZE register.

§

TXBUF_SIZE

Address of the SN_TXBUF_SIZE register.

§

TX_FSR0

Address of the SN_TX_FSR register, index 0.

§

TX_FSR1

Address of the SN_TX_FSR register, index 1.

§

TX_RD0

Address of the SN_TX_RD register, index 0.

§

TX_RD1

Address of the SN_TX_RD register, index 1.

§

TX_WR0

Address of the SN_TX_WR register, index 0.

§

TX_WR1

Address of the SN_TX_WR register, index 1.

§

RX_RSR0

Address of the SN_RX_RSR register, index 0.

§

RX_RSR1

Address of the SN_RX_RSR register, index 1.

§

RX_RD0

Address of the SN_RX_RD register, index 0.

§

RX_RD1

Address of the SN_RX_RD register, index 1.

§

RX_WR0

Address of the SN_RX_WR register, index 0.

§

RX_WR1

Address of the SN_RX_WR register, index 1.

§

IMR

Address of the SN_IMR register.

§

FRAG0

Address of the SN_FRAG register, index 0.

§

FRAG1

Address of the SN_FRAG register, index 1.

§

KPALVTR

Address of the SN_KPALVTR register.

Implementations§

source§

impl SnReg

source

pub const fn addr(self) -> u16

Get the address of the socket register.

Example
use w5500_ll::SnReg;

assert_eq!(SnReg::PORT0.addr(), 0x0004);
source

pub const fn is_ro(self) -> bool

Returns true if the register is read-only.

Example
use w5500_ll::SnReg;

assert!(SnReg::SR.is_ro());
assert!(!SnReg::MR.is_ro());

Trait Implementations§

source§

impl Clone for SnReg

source§

fn clone(&self) -> SnReg

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SnReg

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SnReg> for u16

source§

fn from(snreg: SnReg) -> Self

Converts to this type from the input type.
source§

impl PartialEq<SnReg> for SnReg

source§

fn eq(&self, other: &SnReg) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<u16> for SnReg

§

type Error = u16

The type returned in the event of a conversion error.
source§

fn try_from(val: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for SnReg

source§

impl Eq for SnReg

source§

impl StructuralEq for SnReg

source§

impl StructuralPartialEq for SnReg

Auto Trait Implementations§

§

impl RefUnwindSafe for SnReg

§

impl Send for SnReg

§

impl Sync for SnReg

§

impl Unpin for SnReg

§

impl UnwindSafe for SnReg

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.