From 26467f63cd8545a2ff9a34f8de1d19e3d3d4142b Mon Sep 17 00:00:00 2001 From: morris Date: Tue, 27 Dec 2022 11:36:01 +0800 Subject: [PATCH] doc: clarify num_symbols in the tx done event data Closes https://github.com/espressif/esp-idf/issues/10435 --- components/driver/include/driver/rmt_types.h | 3 ++- docs/en/api-reference/peripherals/rmt.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/driver/include/driver/rmt_types.h b/components/driver/include/driver/rmt_types.h index 90baa1f677..3dac8138fd 100644 --- a/components/driver/include/driver/rmt_types.h +++ b/components/driver/include/driver/rmt_types.h @@ -34,7 +34,8 @@ typedef struct rmt_encoder_t *rmt_encoder_handle_t; * @brief Type of RMT TX done event data */ typedef struct { - size_t num_symbols; /*!< The number of transmitted RMT symbols (only one round is counted if it's a loop transmission) */ + size_t num_symbols; /*!< The number of transmitted RMT symbols, including one EOF symbol, which is appended by the driver to mark the end of a transmission. + For a loop transmission, this value only counts for one round. */ } rmt_tx_done_event_data_t; /** diff --git a/docs/en/api-reference/peripherals/rmt.rst b/docs/en/api-reference/peripherals/rmt.rst index 638c56eb0a..df2dd1b67f 100644 --- a/docs/en/api-reference/peripherals/rmt.rst +++ b/docs/en/api-reference/peripherals/rmt.rst @@ -187,7 +187,7 @@ In the callback function, users can fetch the event specific data that is filled The TX done event data is defined in :cpp:type:`rmt_tx_done_event_data_t`: -- :cpp:member:`rmt_tx_done_event_data_t::num_symbols` tells the number of transmitted RMT symbols. This also reflects the size of encoding artifacts. +- :cpp:member:`rmt_tx_done_event_data_t::num_symbols` tells the number of transmitted RMT symbols. This also reflects the size of encoding artifacts. Please note, this value will count in the EOF symbol as well, which is appended by the driver, to mark the end of one transaction. The RX complete event data is defined in :cpp:type:`rmt_rx_done_event_data_t`: