diff --git a/components/driver/include/driver/rmt.h b/components/driver/include/driver/rmt.h index d5d8d19b63..50a5c743dd 100644 --- a/components/driver/include/driver/rmt.h +++ b/components/driver/include/driver/rmt.h @@ -80,6 +80,9 @@ typedef enum { RMT_CARRIER_LEVEL_MAX } rmt_carrier_level_t; +/** + * @brief Data struct of RMT TX configure parameters + */ typedef struct { bool loop_en; /*!< RMT loop output mode*/ uint32_t carrier_freq_hz; /*!< RMT carrier frequency */ @@ -90,12 +93,18 @@ typedef struct { bool idle_output_en; /*!< RMT idle level output enable*/ }rmt_tx_config_t; +/** + * @brief Data struct of RMT RX configure parameters + */ typedef struct { bool filter_en; /*!< RMT receiver filer enable*/ uint8_t filter_ticks_thresh; /*!< RMT filter tick number */ uint16_t idle_threshold; /*!< RMT RX idle threshold */ }rmt_rx_config_t; +/** + * @brief Data struct of RMT configure parameters + */ typedef struct { rmt_mode_t rmt_mode; /*!< RMT mode: transmitter or receiver */ rmt_channel_t channel; /*!< RMT channel */ diff --git a/docs/api/rmt.rst b/docs/api/rmt.rst new file mode 100644 index 0000000000..9d834b1e28 --- /dev/null +++ b/docs/api/rmt.rst @@ -0,0 +1,93 @@ +RMT +======== + +Overview +-------- + +The RMT (Remote Control) module driver can be used to send and receive infrared remote control signals. Due to flexibility of RMT module, the driver can also be used to generate many other types of signals. + +Application Example +------------------- + +NEC remote control TX and RX example: `examples/11_rmt_nec_tx_rx `_. + +API Reference +------------- + +Header Files +^^^^^^^^^^^^ + + * `driver/rmt.h `_ + +Macros +^^^^^^ + +.. doxygendefine:: RMT_MEM_BLOCK_BYTE_NUM +.. doxygendefine:: RMT_MEM_ITEM_NUM + +Enumerations +^^^^^^^^^^^^ + +.. doxygenenum:: rmt_channel_t +.. doxygenenum:: rmt_mem_owner_t +.. doxygenenum:: rmt_source_clk_t +.. doxygenenum:: rmt_data_mode_t +.. doxygenenum:: rmt_mode_t +.. doxygenenum:: rmt_idle_level_t +.. doxygenenum:: rmt_carrier_level_t + +Structures +^^^^^^^^^^ + +.. doxygenstruct:: rmt_tx_config_t + :members: + +.. doxygenstruct:: rmt_rx_config_t + :members: + +.. doxygenstruct:: rmt_config_t + :members: + + +Functions +^^^^^^^^^ + +.. doxygenfunction:: rmt_set_clk_div +.. doxygenfunction:: rmt_get_clk_div +.. doxygenfunction:: rmt_set_rx_idle_thresh +.. doxygenfunction:: rmt_get_rx_idle_thresh +.. doxygenfunction:: rmt_set_mem_block_num +.. doxygenfunction:: rmt_get_mem_block_num +.. doxygenfunction:: rmt_set_tx_carrier +.. doxygenfunction:: rmt_set_mem_pd +.. doxygenfunction:: rmt_get_mem_pd +.. doxygenfunction:: rmt_tx_start +.. doxygenfunction:: rmt_tx_stop +.. doxygenfunction:: rmt_rx_start +.. doxygenfunction:: rmt_rx_stop +.. doxygenfunction:: rmt_memory_rw_rst +.. doxygenfunction:: rmt_set_memory_owner +.. doxygenfunction:: rmt_get_memory_owner +.. doxygenfunction:: rmt_set_tx_loop_mode +.. doxygenfunction:: rmt_get_tx_loop_mode +.. doxygenfunction:: rmt_set_rx_filter +.. doxygenfunction:: rmt_set_source_clk +.. doxygenfunction:: rmt_get_source_clk +.. doxygenfunction:: rmt_set_idle_level +.. doxygenfunction:: rmt_get_status +.. doxygenfunction:: rmt_set_intr_enable_mask +.. doxygenfunction:: rmt_clr_intr_enable_mask +.. doxygenfunction:: rmt_set_rx_intr_en +.. doxygenfunction:: rmt_set_err_intr_en +.. doxygenfunction:: rmt_set_tx_intr_en +.. doxygenfunction:: rmt_set_evt_intr_en +.. doxygenfunction:: rmt_set_pin +.. doxygenfunction:: rmt_config +.. doxygenfunction:: rmt_isr_register +.. doxygenfunction:: rmt_fill_tx_items +.. doxygenfunction:: rmt_driver_install +.. doxygenfunction:: rmt_driver_uninstall +.. doxygenfunction:: rmt_write_items +.. doxygenfunction:: rmt_wait_tx_done +.. doxygenfunction:: rmt_get_ringbuf_handler + diff --git a/docs/doxygen_xml_to_rst.xslt b/docs/doxygen_xml_to_rst.xslt index c4570a9df6..0212457e57 100644 --- a/docs/doxygen_xml_to_rst.xslt +++ b/docs/doxygen_xml_to_rst.xslt @@ -40,6 +40,8 @@ .. doxygenstruct:: + :members: + diff --git a/docs/index.rst b/docs/index.rst index 8bc7a72f29..7cb641ee0d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -98,6 +98,7 @@ Contents: api/gpio api/uart api/ledc + api/rmt SPI Flash and Partition APIs Logging Non-Volatile Storage