EasyManua.ls Logo

Espressif ESP32-S2 - Page 360

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
Parameters
channel: RMT channel
mode: RMT mode, either RMT_MODE_TX or RMT_MODE_RX
gpio_num: GPIO number, which is connected with certain RMT signal
invert_signal: Invert RMT signal physically by GPIO matrix
esp_err_t rmt_config(const rmt_config_t *rmt_param)
Configure RMT parameters.
Return
ESP_ERR_INVALID_ARG Parameter error
ESP_OK Success
Parameters
rmt_param: RMT parameter struct
esp_err_t rmt_isr_register(void (*fn))void *
, void *arg, int intr_alloc_flags, rmt_isr_handle_t *handleRegister RMT interrupt handler, the handler is an
ISR.
The handler will be attached to the same CPU core that this function is running on.
Note If you already called rmt_driver_install to use system RMT driver, please do not register ISR handler
again.
Return
ESP_OK Success
ESP_ERR_INVALID_ARG Function pointer error.
ESP_FAIL System driver installed, can not register ISR handler for RMT
Parameters
fn: Interrupt handler function.
arg: Parameter for the handler function
intr_alloc_flags: Flags used to allocate the interrupt. One or multiple (ORred)
ESP_INTR_FLAG_* values. See esp_intr_alloc.h for more info.
handle: If non-zero, a handle to later clean up the ISR gets stored here.
esp_err_t rmt_isr_deregister(rmt_isr_handle_t handle)
Deregister previously registered RMT interrupt handler.
Return
ESP_OK Success
ESP_ERR_INVALID_ARG Handle invalid
Parameters
handle: Handle obtained from rmt_isr_register
esp_err_t rmt_fill_tx_items(rmt_channel_t channel, const rmt_item32_t *item, uint16_t
item_num, uint16_t mem_oset)
Fill memory data of channel with given RMT items.
Return
ESP_ERR_INVALID_ARG Parameter error
ESP_OK Success
Parameters
channel: RMT channel
item: Pointer of items.
item_num: RMT sending items number.
mem_offset: Index offset of memory.
esp_err_t rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, int intr_alloc_flags)
Initialize RMT driver.
Return
ESP_ERR_INVALID_STATE Driver is already installed, call rmt_driver_uninstall first.
ESP_ERR_NO_MEM Memory allocation failure
ESP_ERR_INVALID_ARG Parameter error
ESP_OK Success
Espressif Systems 349
Submit Document Feedback
Release v4.4

Table of Contents