esp_idf_hal::sys

Function rmt_new_simple_encoder

Source
pub unsafe extern "C" fn rmt_new_simple_encoder(
    config: *const rmt_simple_encoder_config_t,
    ret_encoder: *mut *mut rmt_encoder_t,
) -> i32
Expand description

@brief Create RMT simple callback encoder, which uses a callback to convert incoming data into RMT symbols.

@param[in] config Simple callback encoder configuration @param[out] ret_encoder Returned encoder handle @return - ESP_OK: Create RMT simple callback encoder successfully - ESP_ERR_INVALID_ARG: Create RMT simple callback encoder failed because of invalid argument - ESP_ERR_NO_MEM: Create RMT simple callback encoder failed because out of memory - ESP_FAIL: Create RMT simple callback encoder failed because of other error