Struct EMAC

Source
pub struct EMAC { /* private fields */ }
Expand description

Ethernet Media Access Control

Implementations§

Source§

impl EMAC

Source

pub const PTR: *const RegisterBlock = {0x20070000 as *const emac::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

Source

pub fn mode(&self) -> &MODE

0x00 - Interface enables and configurations

Source

pub fn interrupt_source(&self) -> &INTERRUPT_SOURCE

0x04 - Interrupt source register

Source

pub fn interrupt_mask(&self) -> &INTERRUPT_MASK

0x08 - Interrupt mask register

Source

pub fn backed_gap(&self) -> &BACKED_GAP

0x0c - Back-to-back inter-packet gap register

Source

pub fn non_backed_gap_1(&self) -> &NON_BACKED_GAP_1

0x10 - Non back-to-back inter-packet gap register 1

Source

pub fn non_backed_gap_2(&self) -> &NON_BACKED_GAP_2

0x14 - Non back-to-back inter-packet gap register 2

Source

pub fn frame_length(&self) -> &FRAME_LENGTH

0x18 - Minimum and maximum ethernet frame length

Source

pub fn collision(&self) -> &COLLISION

0x1c - Collision time window and maximum retries

Source

pub fn transmit_buffer(&self) -> &TRANSMIT_BUFFER

0x20 - Transmit buffer descriptor

Source

pub fn flow_control(&self) -> &FLOW_CONTROL

0x24 - Control frame function register

Source

pub fn mii_mode(&self) -> &MII_MODE

0x28 - MII clock divider and premable enable

Source

pub fn mii_command(&self) -> &MII_COMMAND

0x2c - MII control data, read and scan state

Source

pub fn mii_address(&self) -> &MII_ADDRESS

0x30 - Physical layer bus address

Source

pub fn control_write(&self) -> &CONTROL_WRITE

0x34 - Write data to MII physcial layer

Source

pub fn control_read(&self) -> &CONTROL_READ

0x38 - Read data from MII physcial layer

Source

pub fn mii_state(&self) -> &MII_STATE

0x3c - MII bus and link layer state

Source

pub fn mac_address(&self, n: usize) -> &MAC_ADDRESS

0x40..0x48 - Media Access Control address

Source

pub fn mac_address_iter(&self) -> impl Iterator<Item = &MAC_ADDRESS>

Iterator for array of: 0x40..0x48 - Media Access Control address

Source

pub fn hash(&self, n: usize) -> &HASH

0x48..0x50 - Hash register

Source

pub fn hash_iter(&self) -> impl Iterator<Item = &HASH>

Iterator for array of: 0x48..0x50 - Hash register

Source

pub fn transmit_control(&self) -> &TRANSMIT_CONTROL

0x50 - Transmit control register

Trait Implementations§

Source§

impl Debug for EMAC

Source§

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

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

impl Deref for EMAC

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for EMAC

Auto Trait Implementations§

§

impl Freeze for EMAC

§

impl RefUnwindSafe for EMAC

§

impl !Sync for EMAC

§

impl Unpin for EMAC

§

impl UnwindSafe for EMAC

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.