Function esp_idf_svc::sys::esp_eth_update_input_path

source ·
pub unsafe extern "C" fn esp_eth_update_input_path(
    hdl: *mut c_void,
    stack_input: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: u32, _: *mut c_void) -> i32>,
    priv_: *mut c_void,
) -> i32
Expand description

@brief Update Ethernet data input path (i.e. specify where to pass the input buffer)

@note After install driver, Ethernet still don’t know where to deliver the input buffer. In fact, this API registers a callback function which get invoked when Ethernet received new packets.

@param[in] hdl handle of Ethernet driver @param[in] stack_input function pointer, which does the actual process on incoming packets @param[in] priv private resource, which gets passed to stack_input callback without any modification @return - ESP_OK: update input path successfully - ESP_ERR_INVALID_ARG: update input path failed because of some invalid argument - ESP_FAIL: update input path failed because some other error occurred