Struct esp_idf_svc::sys::esp_eth_mediator_s
source · #[repr(C)]pub struct esp_eth_mediator_s {
pub phy_reg_read: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: u32, _: u32, _: *mut u32) -> i32>,
pub phy_reg_write: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: u32, _: u32, _: u32) -> i32>,
pub stack_input: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: *mut u8, _: u32) -> i32>,
pub on_state_changed: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: u32, _: *mut c_void) -> i32>,
}
Expand description
@brief Ethernet mediator
Fields§
§phy_reg_read: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: u32, _: u32, _: *mut u32) -> i32>
@brief Read PHY register
@param[in] eth: mediator of Ethernet driver @param[in] phy_addr: PHY Chip address (0~31) @param[in] phy_reg: PHY register index code @param[out] reg_value: PHY register value
@return - ESP_OK: read PHY register successfully - ESP_FAIL: read PHY register failed because some error occurred
phy_reg_write: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: u32, _: u32, _: u32) -> i32>
@brief Write PHY register
@param[in] eth: mediator of Ethernet driver @param[in] phy_addr: PHY Chip address (0~31) @param[in] phy_reg: PHY register index code @param[in] reg_value: PHY register value
@return - ESP_OK: write PHY register successfully - ESP_FAIL: write PHY register failed because some error occurred
stack_input: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: *mut u8, _: u32) -> i32>
@brief Deliver packet to upper stack
@param[in] eth: mediator of Ethernet driver @param[in] buffer: packet buffer @param[in] length: length of the packet
@return - ESP_OK: deliver packet to upper stack successfully - ESP_FAIL: deliver packet failed because some error occurred
on_state_changed: Option<unsafe extern "C" fn(_: *mut esp_eth_mediator_s, _: u32, _: *mut c_void) -> i32>
@brief Callback on Ethernet state changed
@param[in] eth: mediator of Ethernet driver @param[in] state: new state @param[in] args: optional argument for the new state
@return - ESP_OK: process the new state successfully - ESP_FAIL: process the new state failed because some error occurred
Trait Implementations§
source§impl Clone for esp_eth_mediator_s
impl Clone for esp_eth_mediator_s
source§fn clone(&self) -> esp_eth_mediator_s
fn clone(&self) -> esp_eth_mediator_s
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for esp_eth_mediator_s
impl Debug for esp_eth_mediator_s
source§impl Default for esp_eth_mediator_s
impl Default for esp_eth_mediator_s
source§fn default() -> esp_eth_mediator_s
fn default() -> esp_eth_mediator_s
impl Copy for esp_eth_mediator_s
Auto Trait Implementations§
impl Freeze for esp_eth_mediator_s
impl RefUnwindSafe for esp_eth_mediator_s
impl Send for esp_eth_mediator_s
impl Sync for esp_eth_mediator_s
impl Unpin for esp_eth_mediator_s
impl UnwindSafe for esp_eth_mediator_s
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)