mss_mac_instance_t

Type Alias mss_mac_instance_t 

Source
pub type mss_mac_instance_t = mss_mac_instance;
Expand description

//** G5SoC Ethernet MAC instance A local record of this type will be created and maintained by the driver for each pMAC and eMAC.

Aliased Type§

#[repr(C)]
pub struct mss_mac_instance_t {
Show 28 fields pub is_emac: u32, pub mac_base: *mut MAC_TypeDef, pub emac_base: *mut eMAC_TypeDef, pub mac_q_int: [u32; 4], pub mmsl_int: u32, pub queue: [mss_mac_queue; 4], pub tx_pause: u64, pub rx_pause: u64, pub pause_elapsed: u64, pub rx_discard: u32, pub mac_available: u32, pub jumbo_frame_enable: u32, pub append_CRC: u32, pub interface_type: u32, pub phy_type: u32, pub phy_addr: u32, pub pcs_phy_addr: u32, pub phy_controller: *mut mss_mac_instance, pub use_hi_address: u32, pub use_local_ints: u32, pub mac_addr: [u8; 6], pub speed_mode: u32, pub speed_duplex_select: u32, pub phy_init: Option<unsafe extern "C" fn(*const c_void, u8)>, pub phy_set_link_speed: Option<unsafe extern "C" fn(*mut c_void, u32, u32)>, pub phy_autonegotiate: Option<unsafe extern "C" fn(*const c_void)>, pub phy_mac_autonegotiate: Option<unsafe extern "C" fn(*const c_void)>, pub phy_get_link_status: Option<unsafe extern "C" fn(*const c_void, *mut u32, *mut u8) -> u8>,
}

Fields§

§is_emac: u32

< 0 for primary MAC and non zero for eMAC

§mac_base: *mut MAC_TypeDef

< Register start address - NULL if eMAC

§emac_base: *mut eMAC_TypeDef

< Register start address - NULL if primary MAC

§mac_q_int: [u32; 4]

< Interrupt numbers for each queue

§mmsl_int: u32

< interrupt number for MMSL interrupt

§queue: [mss_mac_queue; 4]

< Queue specific information

§tx_pause: u64

< Count of pause frames sent

§rx_pause: u64

< Count of pause frames received

§pause_elapsed: u64

< Count of pause frame elapsed events

§rx_discard: u32

< Flag for discarding all received data

§mac_available: u32

< Flag to show init is done and MAC and PHY can be used

§jumbo_frame_enable: u32

< Enable / disable jumbo frame support:

§append_CRC: u32

< Enable / disable GEM CRC calculation

§interface_type: u32

< Type of network interface associated with this GEM

§phy_type: u32

< PHY device type associated with this GEM

§phy_addr: u32

< Address of Ethernet PHY on MII management interface.

§pcs_phy_addr: u32

< Address of SGMII interface controller on MII management interface.

§phy_controller: *mut mss_mac_instance

< Which MAC structure PHY is connected to

§use_hi_address: u32

< Non 0 means use upper address range for this device

§use_local_ints: u32

< non 0 meams use local interrupts for MAC instead of PLIC

§mac_addr: [u8; 6]

< Station’s MAC address

§speed_mode: u32

< Link speed mode of operation

§speed_duplex_select: u32

< Link speed and duplex mode allowed to setup a link when autonegotiation is enabled.

§phy_init: Option<unsafe extern "C" fn(*const c_void, u8)>

< Pointer to PHY init function

§phy_set_link_speed: Option<unsafe extern "C" fn(*mut c_void, u32, u32)>

< Pointer to PHY set link speed function

§phy_autonegotiate: Option<unsafe extern "C" fn(*const c_void)>

< Pointer to PHY autonegotiate function

§phy_mac_autonegotiate: Option<unsafe extern "C" fn(*const c_void)>

< Pointer to PHY MAC link autonegotiate function

§phy_get_link_status: Option<unsafe extern "C" fn(*const c_void, *mut u32, *mut u8) -> u8>

< Pointer to PHY get link status function