feat(rmt): added a help function for allocating encoder memory

The encoder memory location should respect the RMT_MEM_ALLOC_CAPS,
which is affected by some Kconfig options, like ISR_IRAM_SAFE

Closes https://github.com/espressif/esp-idf/issues/13032
This commit is contained in:
morris
2024-01-24 11:06:31 +08:00
parent e81932d2b2
commit 08845cf669
8 changed files with 23 additions and 10 deletions
@@ -148,6 +148,14 @@ esp_err_t rmt_del_encoder(rmt_encoder_handle_t encoder);
*/
esp_err_t rmt_encoder_reset(rmt_encoder_handle_t encoder);
/**
* @brief A helper function to allocate a proper memory for RMT encoder
*
* @param size Size of memory to be allocated
* @return Pointer to the allocated memory if the allocation is successful, NULL otherwise
*/
void* rmt_alloc_encoder_mem(size_t size);
#ifdef __cplusplus
}
#endif