rmt: Adds a simple handler that can be called when transmission ends.

Merges https://github.com/espressif/esp-idf/pull/1174
This commit is contained in:
Krzysztof Bociurko
2017-10-27 15:23:07 +02:00
committed by Angus Gratton
parent 30aacb79d5
commit 1066c74b74
2 changed files with 28 additions and 0 deletions

View File

@@ -119,6 +119,8 @@ typedef struct {
typedef intr_handle_t rmt_isr_handle_t;
typedef void (*rmt_tx_end_t)(rmt_channel_t channel);
/**
* @brief Set RMT clock divider, channel clock is divided from source clock.
*
@@ -702,6 +704,20 @@ esp_err_t rmt_wait_tx_done(rmt_channel_t channel, TickType_t wait_time);
*/
esp_err_t rmt_get_ringbuf_handle(rmt_channel_t channel, RingbufHandle_t* buf_handle);
/**
* @brief Registers a callback that will be called when transmission ends.
*
* Called by rmt_driver_isr_default in interrupt context.
*
* @note Requires rmt_driver_install to install the default ISR handler.
*
* @param fn Function to be called from the default interrupt handler or NULL.
*
* @return the previous handler (or NULL if there was none)
*/
rmt_tx_end_t rmt_register_tx_end_callback(rmt_tx_end_t fn);
/*
* ----------------EXAMPLE OF RMT INTERRUPT ------------------
* @code{c}