mss_mac_instance

Struct mss_mac_instance 

Source
#[repr(C)]
pub struct mss_mac_instance {
Show 28 fields pub is_emac: u32, pub mac_base: *mut MAC_TypeDef, pub emac_base: *mut eMAC_TypeDef, pub mac_q_int: [PLIC_IRQn_Type; 4], pub mmsl_int: PLIC_IRQn_Type, pub queue: [mss_mac_queue_t; 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: mss_mac_speed_mode_t, pub speed_duplex_select: u32, pub phy_init: mss_mac_phy_init_t, pub phy_set_link_speed: mss_mac_phy_set_speed_t, pub phy_autonegotiate: mss_mac_phy_autonegotiate_t, pub phy_mac_autonegotiate: mss_mac_phy_autonegotiate_t, pub phy_get_link_status: mss_mac_phy_get_link_status_t,
}
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.

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: [PLIC_IRQn_Type; 4]

< Interrupt numbers for each queue

§mmsl_int: PLIC_IRQn_Type

< interrupt number for MMSL interrupt

§queue: [mss_mac_queue_t; 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: mss_mac_speed_mode_t

< 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: mss_mac_phy_init_t

< Pointer to PHY init function

§phy_set_link_speed: mss_mac_phy_set_speed_t

< Pointer to PHY set link speed function

§phy_autonegotiate: mss_mac_phy_autonegotiate_t

< Pointer to PHY autonegotiate function

§phy_mac_autonegotiate: mss_mac_phy_autonegotiate_t

< Pointer to PHY MAC link autonegotiate function

§phy_get_link_status: mss_mac_phy_get_link_status_t

< Pointer to PHY get link status function

Trait Implementations§

Source§

impl Clone for mss_mac_instance

Source§

fn clone(&self) -> mss_mac_instance

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for mss_mac_instance

Source§

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

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

impl Copy for mss_mac_instance

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.