Enum w5500_ll::Reg

source ·
#[repr(u16)]
pub enum Reg {
Show 48 variants MR, GAR0, GAR1, GAR2, GAR3, SUBR0, SUBR1, SUBR2, SUBR3, SHAR0, SHAR1, SHAR2, SHAR3, SHAR4, SHAR5, SIPR0, SIPR1, SIPR2, SIPR3, INTLEVEL0, INTLEVEL1, IR, IMR, SIR, SIMR, RTR0, RTR1, RCR, PTIMER, PMAGIC, PHAR0, PHAR1, PHAR2, PHAR3, PHAR4, PHAR5, PSID0, PSID1, PMRU0, PMRU1, UIPR0, UIPR1, UIPR2, UIPR3, UPORTR0, UPORTR1, PHYCFGR, VERSIONR,
}
Expand description

W5500 common register addresses.

Variants§

§

MR

Address of the MR register.

§

GAR0

Address of the GAR register, index 0.

§

GAR1

Address of the GAR register, index 1.

§

GAR2

Address of the GAR register, index 2.

§

GAR3

Address of the GAR register, index 3.

§

SUBR0

Address of the SUBR register, index 0.

§

SUBR1

Address of the SUBR register, index 1.

§

SUBR2

Address of the SUBR register, index 2.

§

SUBR3

Address of the SUBR register, index 3.

§

SHAR0

Address of the SHAR register, index 0.

§

SHAR1

Address of the SHAR register, index 1.

§

SHAR2

Address of the SHAR register, index 2.

§

SHAR3

Address of the SHAR register, index 3.

§

SHAR4

Address of the SHAR register, index 4.

§

SHAR5

Address of the SHAR register, index 5.

§

SIPR0

Address of the SIPR register, index 0.

§

SIPR1

Address of the SIPR register, index 1.

§

SIPR2

Address of the SIPR register, index 2.

§

SIPR3

Address of the SIPR register, index 3.

§

INTLEVEL0

Address of the INTLEVEL register, index 0.

§

INTLEVEL1

Address of the INTLEVEL register, index 1.

§

IR

Address of the IR register.

§

IMR

Address of the IMR register.

§

SIR

Address of the SIR register.

§

SIMR

Address of the SIMR register.

§

RTR0

Address of the RTR register, index 0.

§

RTR1

Address of the RTR register, index 1.

§

RCR

Address of the RCR register.

§

PTIMER

Address of the PTIMER register.

§

PMAGIC

Address of the PMAGIC register.

§

PHAR0

Address of the PHAR register, index 0.

§

PHAR1

Address of the PHAR register, index 1.

§

PHAR2

Address of the PHAR register, index 2.

§

PHAR3

Address of the PHAR register, index 3.

§

PHAR4

Address of the PHAR register, index 4.

§

PHAR5

Address of the PHAR register, index 5.

§

PSID0

Address of the PSID register, index 0.

§

PSID1

Address of the PSID register, index 1.

§

PMRU0

Address of the PMRU register, index 0.

§

PMRU1

Address of the PMRU register, index 1.

§

UIPR0

Address of the UIPR register, index 0.

§

UIPR1

Address of the UIPR register, index 1.

§

UIPR2

Address of the UIPR register, index 2.

§

UIPR3

Address of the UIPR register, index 3.

§

UPORTR0

Address of the UPORTR register, index 0.

§

UPORTR1

Address of the UPORTR register, index 1.

§

PHYCFGR

Address of the PHYCFGR register.

§

VERSIONR

Address of the VERSIONR register.

Implementations§

source§

impl Reg

source

pub const fn addr(self) -> u16

Get the address of the register.

Example
use w5500_ll::Reg;

assert_eq!(Reg::VERSIONR.addr(), 0x0039);
source

pub const fn is_ro(self) -> bool

Returns true if the register is read-only.

Example
use w5500_ll::Reg;

assert!(Reg::VERSIONR.is_ro());
assert!(!Reg::MR.is_ro());

Trait Implementations§

source§

impl Clone for Reg

source§

fn clone(&self) -> Reg

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 Reg

source§

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

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

impl From<Reg> for u16

source§

fn from(reg: Reg) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Reg> for Reg

source§

fn eq(&self, other: &Reg) -> 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 Reg

§

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 Reg

source§

impl Eq for Reg

source§

impl StructuralEq for Reg

source§

impl StructuralPartialEq for Reg

Auto Trait Implementations§

§

impl RefUnwindSafe for Reg

§

impl Send for Reg

§

impl Sync for Reg

§

impl Unpin for Reg

§

impl UnwindSafe for Reg

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.