FXmac

Struct FXmac 

Source
pub struct FXmac {
Show 15 fields pub config: FXmacConfig, pub is_ready: u32, pub is_started: u32, pub link_status: u32, pub options: u32, pub mask: u32, pub caps: u32, pub lwipport: FXmacLwipPort, pub tx_bd_queue: FXmacQueue, pub rx_bd_queue: FXmacQueue, pub moudle_id: u32, pub max_mtu_size: u32, pub max_frame_size: u32, pub phy_address: u32, pub rxbuf_mask: u32,
}
Expand description

Main FXMAC Ethernet controller instance.

This structure holds all state information for an FXMAC controller instance, including configuration, DMA queues, and runtime status.

§Thread Safety

This structure implements Send and Sync for use across threads, but external synchronization is required for concurrent access to mutable state.

§Example

let hwaddr: [u8; 6] = [0x55, 0x44, 0x33, 0x22, 0x11, 0x00];
let fxmac: &'static mut FXmac = xmac_init(&hwaddr);

// Check link status
if fxmac.link_status == FXMAC_LINKUP {
    println!("Network link is up!");
}

Fields§

§config: FXmacConfig

Hardware configuration settings.

§is_ready: u32

Device initialization state (FT_COMPONENT_IS_READY when initialized).

§is_started: u32

Device running state (FT_COMPONENT_IS_STARTED when active).

§link_status: u32

Current link status (FXMAC_LINKUP, FXMAC_LINKDOWN, or FXMAC_NEGOTIATING).

§options: u32

Currently enabled MAC options.

§mask: u32

Interrupt mask for enabled interrupts.

§caps: u32

Capability mask bits.

§lwipport: FXmacLwipPort

Network buffer management (lwIP port compatibility).

§tx_bd_queue: FXmacQueue

Transmit buffer descriptor queue.

§rx_bd_queue: FXmacQueue

Receive buffer descriptor queue.

§moudle_id: u32

Hardware module identification number.

§max_mtu_size: u32

Maximum transmission unit size.

§max_frame_size: u32

Maximum frame size including headers.

§phy_address: u32

PHY address on the MDIO bus.

§rxbuf_mask: u32

Receive buffer mask for speed settings.

Trait Implementations§

Auto Trait Implementations§

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