pub struct EMAC { /* private fields */ }
Expand description
Ethernet Media Access Control
Implementations§
Source§impl EMAC
impl EMAC
Sourcepub const PTR: *const RegisterBlock = {0x20070000 as *const emac::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x20070000 as *const emac::RegisterBlock}
Pointer to the register block
Sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
Sourcepub unsafe fn steal() -> Self
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>§
Sourcepub fn interrupt_source(&self) -> &INTERRUPT_SOURCE
pub fn interrupt_source(&self) -> &INTERRUPT_SOURCE
0x04 - Interrupt source register
Sourcepub fn interrupt_mask(&self) -> &INTERRUPT_MASK
pub fn interrupt_mask(&self) -> &INTERRUPT_MASK
0x08 - Interrupt mask register
Sourcepub fn backed_gap(&self) -> &BACKED_GAP
pub fn backed_gap(&self) -> &BACKED_GAP
0x0c - Back-to-back inter-packet gap register
Sourcepub fn non_backed_gap_1(&self) -> &NON_BACKED_GAP_1
pub fn non_backed_gap_1(&self) -> &NON_BACKED_GAP_1
0x10 - Non back-to-back inter-packet gap register 1
Sourcepub fn non_backed_gap_2(&self) -> &NON_BACKED_GAP_2
pub fn non_backed_gap_2(&self) -> &NON_BACKED_GAP_2
0x14 - Non back-to-back inter-packet gap register 2
Sourcepub fn frame_length(&self) -> &FRAME_LENGTH
pub fn frame_length(&self) -> &FRAME_LENGTH
0x18 - Minimum and maximum ethernet frame length
Sourcepub fn transmit_buffer(&self) -> &TRANSMIT_BUFFER
pub fn transmit_buffer(&self) -> &TRANSMIT_BUFFER
0x20 - Transmit buffer descriptor
Sourcepub fn flow_control(&self) -> &FLOW_CONTROL
pub fn flow_control(&self) -> &FLOW_CONTROL
0x24 - Control frame function register
Sourcepub fn mii_command(&self) -> &MII_COMMAND
pub fn mii_command(&self) -> &MII_COMMAND
0x2c - MII control data, read and scan state
Sourcepub fn mii_address(&self) -> &MII_ADDRESS
pub fn mii_address(&self) -> &MII_ADDRESS
0x30 - Physical layer bus address
Sourcepub fn control_write(&self) -> &CONTROL_WRITE
pub fn control_write(&self) -> &CONTROL_WRITE
0x34 - Write data to MII physcial layer
Sourcepub fn control_read(&self) -> &CONTROL_READ
pub fn control_read(&self) -> &CONTROL_READ
0x38 - Read data from MII physcial layer
Sourcepub fn mac_address(&self, n: usize) -> &MAC_ADDRESS
pub fn mac_address(&self, n: usize) -> &MAC_ADDRESS
0x40..0x48 - Media Access Control address
Sourcepub fn mac_address_iter(&self) -> impl Iterator<Item = &MAC_ADDRESS>
pub fn mac_address_iter(&self) -> impl Iterator<Item = &MAC_ADDRESS>
Iterator for array of: 0x40..0x48 - Media Access Control address
Sourcepub fn hash_iter(&self) -> impl Iterator<Item = &HASH>
pub fn hash_iter(&self) -> impl Iterator<Item = &HASH>
Iterator for array of: 0x48..0x50 - Hash register
Sourcepub fn transmit_control(&self) -> &TRANSMIT_CONTROL
pub fn transmit_control(&self) -> &TRANSMIT_CONTROL
0x50 - Transmit control register