Skip to main content

esp_eth_update_input_path_info

Function esp_eth_update_input_path_info 

Source
pub unsafe extern "C" fn esp_eth_update_input_path_info(
    hdl: esp_eth_handle_t,
    stack_input_info: Option<unsafe extern "C" fn(hdl: esp_eth_handle_t, buffer: *mut u8, length: u32, priv_: *mut c_void, info: *mut c_void) -> esp_err_t>,
    priv_: *mut c_void,
) -> esp_err_t
Expand description

@brief Update Ethernet data input path with input function which consumes extra info about received frame.

@note Extra information may include but is not limited to such info like Time Stamp, CRC check offload result, etc. The MAC layer of the Ethernet driver of the particular device must provide extra information using stack_input_info() function. Otherwise, input path function registered by this API is not invoked. If this is the case, register stack_input function by esp_eth_update_input_path() instead.

@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_info function pointer, which does the actual process on incoming packets @param[in] priv private resource, which gets passed to stack_input_info 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