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: FXmacConfigHardware configuration settings.
is_ready: u32Device initialization state (FT_COMPONENT_IS_READY when initialized).
is_started: u32Device running state (FT_COMPONENT_IS_STARTED when active).
link_status: u32Current link status (FXMAC_LINKUP, FXMAC_LINKDOWN, or FXMAC_NEGOTIATING).
options: u32Currently enabled MAC options.
mask: u32Interrupt mask for enabled interrupts.
caps: u32Capability mask bits.
lwipport: FXmacLwipPortNetwork buffer management (lwIP port compatibility).
tx_bd_queue: FXmacQueueTransmit buffer descriptor queue.
rx_bd_queue: FXmacQueueReceive buffer descriptor queue.
moudle_id: u32Hardware module identification number.
max_mtu_size: u32Maximum transmission unit size.
max_frame_size: u32Maximum frame size including headers.
phy_address: u32PHY address on the MDIO bus.
rxbuf_mask: u32Receive buffer mask for speed settings.