Function esp_idf_hal::sys::rmt_tx_register_event_callbacks

source ยท
pub unsafe extern "C" fn rmt_tx_register_event_callbacks(
    tx_channel: *mut rmt_drv_channel_t,
    cbs: *const rmt_tx_event_callbacks_t,
    user_data: *mut c_void,
) -> i32
Expand description

@brief Set event callbacks for RMT TX channel

@note User can deregister a previously registered callback by calling this function and setting the callback member in the cbs structure to NULL. @note When CONFIG_RMT_ISR_IRAM_SAFE is enabled, the callback itself and functions called by it should be placed in IRAM. The variables used in the function should be in the SRAM as well. The user_data should also reside in SRAM.

@param[in] tx_channel RMT generic channel that created by rmt_new_tx_channel() @param[in] cbs Group of callback functions @param[in] user_data User data, which will be passed to callback functions directly @return - ESP_OK: Set event callbacks successfully - ESP_ERR_INVALID_ARG: Set event callbacks failed because of invalid argument - ESP_FAIL: Set event callbacks failed because of other error