diff --git a/arch/risc-v/src/common/espressif/esp_rmt.c b/arch/risc-v/src/common/espressif/esp_rmt.c index 45e603d8efc..2502c5d9e8c 100644 --- a/arch/risc-v/src/common/espressif/esp_rmt.c +++ b/arch/risc-v/src/common/espressif/esp_rmt.c @@ -222,7 +222,7 @@ struct rmt_dev_common_s struct rmt_dev_lowerhalf_s { - /* The following block is part of the upper-hald device struct */ + /* The following block is part of the upper-half device struct */ FAR const struct rmt_ops_s *ops; FAR struct circbuf_s *circbuf; @@ -241,18 +241,18 @@ struct rmt_obj_s size_t tx_len_rem; size_t tx_sub_len; bool wait_done; /* Mark whether wait tx done */ - bool loop_autostop; /* mark whether loop auto-stop is enabled */ + bool loop_autostop; /* Mark whether loop auto-stop is enabled */ rmt_channel_t channel; const rmt_item32_t *tx_data; sem_t tx_sem; -#if CONFIG_SPIRAM_USE_MALLOC +#ifdef CONFIG_SPIRAM_USE_MALLOC int intr_alloc_flags; sem_t tx_sem_buffer; #endif rmt_item32_t *tx_buf; struct circbuf_s rx_buf; sem_t rx_sem; -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG rmt_item32_t *rx_item_buf; uint32_t rx_item_buf_size; uint32_t rx_item_len; @@ -433,7 +433,7 @@ static void rmt_module_enable(void) * ****************************************************************************/ -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG static int rmt_set_rx_thr_intr_en(rmt_channel_t channel, bool en, uint16_t evt_thresh) { @@ -496,7 +496,7 @@ static int rmt_rx_start(rmt_channel_t channel, bool rx_idx_rst) { irqstate_t flags; rmt_channel_t ch = RMT_DECODE_RX_CHANNEL(channel); -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG const uint32_t item_block_len = rmt_ll_rx_get_mem_blocks(g_rmtdev_common.hal.regs, ch) * RMT_MEM_ITEM_NUM; @@ -517,7 +517,7 @@ static int rmt_rx_start(rmt_channel_t channel, bool rx_idx_rst) rmt_ll_enable_interrupt(g_rmtdev_common.hal.regs, RMT_LL_EVENT_RX_DONE(ch), true); -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG p_rmt_obj[channel]->rx_item_start_idx = 0; p_rmt_obj[channel]->rx_item_len = 0; rmt_set_rx_thr_intr_en(channel, true, item_block_len / 2); @@ -560,7 +560,7 @@ static int rmt_tx_start(rmt_channel_t channel, bool tx_idx_rst) rmt_ll_clear_interrupt_status(g_rmtdev_common.hal.regs, RMT_LL_EVENT_TX_DONE(channel)); - /* enable tx end interrupt in non-loop mode */ + /* Enable tx end interrupt in non-loop mode */ if (!rmt_ll_tx_is_loop_enabled(g_rmtdev_common.hal.regs, channel)) { @@ -938,7 +938,7 @@ static int rmt_internal_config(rmt_dev_t *dev, rmt_ll_rx_enable_filter(dev, RMT_DECODE_RX_CHANNEL(channel), rmt_param->rx_config.filter_en); -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG /* always enable rx ping-pong */ @@ -1232,7 +1232,7 @@ static int IRAM_ATTR rmt_driver_isr_default(int irq, void *context, addr = (rmt_item32_t *) RMTMEM.chan[RMT_ENCODE_RX_CHANNEL(channel)].data32; -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG if (item_len > p_rmt->rx_item_start_idx) { item_len = item_len - p_rmt->rx_item_start_idx; @@ -1272,7 +1272,7 @@ static int IRAM_ATTR rmt_driver_isr_default(int irq, void *context, rmterr("RMT RX BUFFER ERROR"); } -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG p_rmt->rx_item_start_idx = 0; p_rmt->rx_item_len = 0; memset((void *)p_rmt->rx_item_buf, 0, p_rmt->rx_item_buf_size); @@ -1287,7 +1287,7 @@ static int IRAM_ATTR rmt_driver_isr_default(int irq, void *context, RMT_LL_EVENT_RX_DONE(channel)); } -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG /* Rx thres interrupt */ @@ -1463,8 +1463,8 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, } #endif -#if !CONFIG_SPIRAM_USE_MALLOC - p_rmt_obj[channel] = calloc(1, sizeof(rmt_obj_t)); +#ifndef CONFIG_SPIRAM_USE_MALLOC + p_rmt_obj[channel] = kmm_calloc(1, sizeof(rmt_obj_t)); #else if (!(intr_alloc_flags & ESP_INTR_FLAG_IRAM)) { @@ -1472,9 +1472,7 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, } else { - p_rmt_obj[channel] = heap_caps_calloc(1, sizeof(rmt_obj_t), - MALLOC_CAP_INTERNAL | \ - MALLOC_CAP_8BIT); + p_rmt_obj[channel] = kmm_calloc(1, sizeof(rmt_obj_t)); } #endif @@ -1492,7 +1490,7 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, p_rmt_obj[channel]->wait_done = false; p_rmt_obj[channel]->loop_autostop = false; -#if !CONFIG_SPIRAM_USE_MALLOC +#ifndef CONFIG_SPIRAM_USE_MALLOC nxsem_init(&p_rmt_obj[channel]->tx_sem, 0, 0); nxsem_init(&p_rmt_obj[channel]->rx_sem, 0, 0); #endif @@ -1504,24 +1502,22 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, circbuf_init(&p_rmt_obj[channel]->rx_buf, NULL, rx_buf_size); } -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG if (p_rmt_obj[channel]->rx_item_buf == NULL && rx_buf_size > 0) { -#if !CONFIG_SPIRAM_USE_MALLOC - p_rmt_obj[channel]->rx_item_buf = calloc(1, rx_buf_size); -#else +# ifndef CONFIG_SPIRAM_USE_MALLOC + p_rmt_obj[channel]->rx_item_buf = kmm_calloc(1, rx_buf_size); +# else if (!(p_rmt_obj[channel]->intr_alloc_flags & ESP_INTR_FLAG_IRAM)) { p_rmt_obj[channel]->rx_item_buf = calloc(1, rx_buf_size); } else { - p_rmt_obj[channel]->rx_item_buf = - heap_caps_calloc(1, rx_buf_size, - MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); + p_rmt_obj[channel]->rx_item_buf = kmm_calloc(1, rx_buf_size); } -#endif +# endif if (p_rmt_obj[channel]->rx_item_buf == NULL) { rmterr("RMT malloc fail"); @@ -1605,12 +1601,12 @@ static int rmt_write_items(rmt_channel_t channel, channel); DEBUGASSERT(mem_blocks + channel <= SOC_RMT_CHANNELS_PER_GROUP); -#if CONFIG_SPIRAM_USE_MALLOC +#ifdef CONFIG_SPIRAM_USE_MALLOC if (p_rmt_obj[channel]->intr_alloc_flags & ESP_INTR_FLAG_IRAM) { if (!esp_ptr_internal(rmt_item)) { - remterr(RMT_PSRAM_BUFFER_WARN_STR); + rmterr(RMT_PSRAM_BUFFER_WARN_STR); return ESP_ERR_INVALID_ARG; } } @@ -1904,7 +1900,7 @@ static struct rmt_dev_s * Initialize the selected RMT device in TX mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: @@ -1926,7 +1922,7 @@ struct rmt_dev_s *esp_rmt_tx_init(int ch, int pin) * Initialize the selected RMT device in RC mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: diff --git a/arch/risc-v/src/common/espressif/esp_rmt.h b/arch/risc-v/src/common/espressif/esp_rmt.h index 606f34e2ab5..84bec403e9c 100644 --- a/arch/risc-v/src/common/espressif/esp_rmt.h +++ b/arch/risc-v/src/common/espressif/esp_rmt.h @@ -72,7 +72,7 @@ extern "C" * Initialize the selected RMT device in TX mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: @@ -89,7 +89,7 @@ struct rmt_dev_s *esp_rmt_tx_init(int ch, int pin); * Initialize the selected RMT device in RC mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: diff --git a/arch/risc-v/src/common/espressif/esp_ws2812.c b/arch/risc-v/src/common/espressif/esp_ws2812.c index a3726d5f950..cc4e14865a4 100644 --- a/arch/risc-v/src/common/espressif/esp_ws2812.c +++ b/arch/risc-v/src/common/espressif/esp_ws2812.c @@ -126,9 +126,9 @@ extern uint32_t g_rmt_source_clock_hz; * * Description: * Maps a byte to a sequence of RMT items. Each bit in the byte is - * represented by an RMT item (32-bit value). Iterates over each bit in - * the byte, creating an RMT item for each bit, set or not. The created - * RMT items are stored in the destination array. + * represented by an RMT item (32-bit value). The function iterates over + * each bit in the byte, creating an RMT item for each bit, HIGH or LOW. + * The created RMT items are stored in the destination array. * * Input Parameters: * dev - Pointer to the RMT-based WS2812 device structure. diff --git a/arch/xtensa/src/common/espressif/Kconfig b/arch/xtensa/src/common/espressif/Kconfig index 6bc8c13f71a..c6cfce8c7ff 100644 --- a/arch/xtensa/src/common/espressif/Kconfig +++ b/arch/xtensa/src/common/espressif/Kconfig @@ -3,5 +3,7 @@ config ESP_RMT default n depends on RMT ---help--- - Remote Control Module is currently used to control WS2812 - RGB LED normally used on LED strips. \ No newline at end of file + The RMT (Remote Control Transceiver) peripheral was designed to act as + an infrared transceiver. However, due to the flexibility of its data + format, RMT can be extended to a versatile and general-purpose + transceiver, transmitting or receiving many other types of signals. diff --git a/arch/xtensa/src/common/espressif/esp_rmt.c b/arch/xtensa/src/common/espressif/esp_rmt.c index 6f66a9a2308..2b15c313c20 100644 --- a/arch/xtensa/src/common/espressif/esp_rmt.c +++ b/arch/xtensa/src/common/espressif/esp_rmt.c @@ -268,7 +268,7 @@ struct rmt_dev_common_s struct rmt_dev_lowerhalf_s { - /* The following block is part of the upper-hald device struct */ + /* The following block is part of the upper-half device struct */ FAR const struct rmt_ops_s *ops; FAR struct circbuf_s *circbuf; @@ -287,18 +287,18 @@ struct rmt_obj_s size_t tx_len_rem; size_t tx_sub_len; bool wait_done; /* Mark whether wait tx done */ - bool loop_autostop; /* mark whether loop auto-stop is enabled */ + bool loop_autostop; /* Mark whether loop auto-stop is enabled */ rmt_channel_t channel; const rmt_item32_t *tx_data; sem_t tx_sem; -#if CONFIG_SPIRAM_USE_MALLOC +#ifdef CONFIG_SPIRAM_USE_MALLOC int intr_alloc_flags; sem_t tx_sem_buffer; #endif rmt_item32_t *tx_buf; struct circbuf_s rx_buf; sem_t rx_sem; -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG rmt_item32_t *rx_item_buf; uint32_t rx_item_buf_size; uint32_t rx_item_len; @@ -479,7 +479,7 @@ static void rmt_module_enable(void) * ****************************************************************************/ -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG static int rmt_set_rx_thr_intr_en(rmt_channel_t channel, bool en, uint16_t evt_thresh) { @@ -543,7 +543,7 @@ static int rmt_rx_start(rmt_channel_t channel, bool rx_idx_rst) { irqstate_t flags; rmt_channel_t ch = RMT_DECODE_RX_CHANNEL(channel); -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG const uint32_t item_block_len = rmt_ll_rx_get_mem_blocks(g_rmtdev_common.hal.regs, ch) * RMT_MEM_ITEM_NUM; @@ -564,7 +564,7 @@ static int rmt_rx_start(rmt_channel_t channel, bool rx_idx_rst) rmt_ll_enable_interrupt(g_rmtdev_common.hal.regs, RMT_LL_EVENT_RX_DONE(ch), true); -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG p_rmt_obj[channel]->rx_item_start_idx = 0; p_rmt_obj[channel]->rx_item_len = 0; rmt_set_rx_thr_intr_en(channel, true, item_block_len / 2); @@ -607,7 +607,7 @@ static int rmt_tx_start(rmt_channel_t channel, bool tx_idx_rst) rmt_ll_clear_interrupt_status(g_rmtdev_common.hal.regs, RMT_LL_EVENT_TX_DONE(channel)); - /* enable tx end interrupt in non-loop mode */ + /* Enable tx end interrupt in non-loop mode */ if (!rmt_ll_tx_is_loop_enabled(g_rmtdev_common.hal.regs, channel)) { @@ -985,7 +985,7 @@ static int rmt_internal_config(rmt_dev_t *dev, rmt_ll_rx_enable_filter(dev, RMT_DECODE_RX_CHANNEL(channel), rmt_param->rx_config.filter_en); -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG /* always enable rx ping-pong */ @@ -1283,7 +1283,7 @@ static int IRAM_ATTR rmt_driver_isr_default(int irq, void *context, addr = (rmt_item32_t *) RMTMEM.chan[RMT_ENCODE_RX_CHANNEL(channel)].data32; -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG if (item_len > p_rmt->rx_item_start_idx) { item_len = item_len - p_rmt->rx_item_start_idx; @@ -1323,7 +1323,7 @@ static int IRAM_ATTR rmt_driver_isr_default(int irq, void *context, rmterr("RMT RX BUFFER ERROR"); } -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG p_rmt->rx_item_start_idx = 0; p_rmt->rx_item_len = 0; memset((void *)p_rmt->rx_item_buf, 0, p_rmt->rx_item_buf_size); @@ -1338,7 +1338,7 @@ static int IRAM_ATTR rmt_driver_isr_default(int irq, void *context, RMT_LL_EVENT_RX_DONE(channel)); } -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG /* Rx thres interrupt */ @@ -1514,8 +1514,8 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, } #endif -#if !CONFIG_SPIRAM_USE_MALLOC - p_rmt_obj[channel] = calloc(1, sizeof(rmt_obj_t)); +#ifndef CONFIG_SPIRAM_USE_MALLOC + p_rmt_obj[channel] = kmm_calloc(1, sizeof(rmt_obj_t)); #else if (!(intr_alloc_flags & ESP_INTR_FLAG_IRAM)) { @@ -1523,9 +1523,7 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, } else { - p_rmt_obj[channel] = heap_caps_calloc(1, sizeof(rmt_obj_t), - MALLOC_CAP_INTERNAL | \ - MALLOC_CAP_8BIT); + p_rmt_obj[channel] = kmm_calloc(1, sizeof(rmt_obj_t)); } #endif @@ -1543,7 +1541,7 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, p_rmt_obj[channel]->wait_done = false; p_rmt_obj[channel]->loop_autostop = false; -#if !CONFIG_SPIRAM_USE_MALLOC +#ifndef CONFIG_SPIRAM_USE_MALLOC nxsem_init(&p_rmt_obj[channel]->tx_sem, 0, 0); nxsem_init(&p_rmt_obj[channel]->rx_sem, 0, 0); #endif @@ -1555,24 +1553,22 @@ static int rmt_driver_install(rmt_channel_t channel, size_t rx_buf_size, circbuf_init(&p_rmt_obj[channel]->rx_buf, NULL, rx_buf_size); } -#if SOC_RMT_SUPPORT_RX_PINGPONG +#ifdef SOC_RMT_SUPPORT_RX_PINGPONG if (p_rmt_obj[channel]->rx_item_buf == NULL && rx_buf_size > 0) { -#if !CONFIG_SPIRAM_USE_MALLOC - p_rmt_obj[channel]->rx_item_buf = calloc(1, rx_buf_size); -#else +# ifndef CONFIG_SPIRAM_USE_MALLOC + p_rmt_obj[channel]->rx_item_buf = kmm_calloc(1, rx_buf_size); +# else if (!(p_rmt_obj[channel]->intr_alloc_flags & ESP_INTR_FLAG_IRAM)) { p_rmt_obj[channel]->rx_item_buf = calloc(1, rx_buf_size); } else { - p_rmt_obj[channel]->rx_item_buf = - heap_caps_calloc(1, rx_buf_size, - MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); + p_rmt_obj[channel]->rx_item_buf = kmm_calloc(1, rx_buf_size); } -#endif +# endif if (p_rmt_obj[channel]->rx_item_buf == NULL) { rmterr("RMT malloc fail"); @@ -1656,12 +1652,12 @@ static int rmt_write_items(rmt_channel_t channel, channel); DEBUGASSERT(mem_blocks + channel <= SOC_RMT_CHANNELS_PER_GROUP); -#if CONFIG_SPIRAM_USE_MALLOC +#ifdef CONFIG_SPIRAM_USE_MALLOC if (p_rmt_obj[channel]->intr_alloc_flags & ESP_INTR_FLAG_IRAM) { if (!esp_ptr_internal(rmt_item)) { - remterr(RMT_PSRAM_BUFFER_WARN_STR); + rmterr(RMT_PSRAM_BUFFER_WARN_STR); return ESP_ERR_INVALID_ARG; } } @@ -1955,7 +1951,7 @@ static struct rmt_dev_s * Initialize the selected RMT device in TX mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: @@ -1977,7 +1973,7 @@ struct rmt_dev_s *esp_rmt_tx_init(int ch, int pin) * Initialize the selected RMT device in RC mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: diff --git a/arch/xtensa/src/common/espressif/esp_rmt.h b/arch/xtensa/src/common/espressif/esp_rmt.h index 336725bf3f3..b1b1d03f8a4 100644 --- a/arch/xtensa/src/common/espressif/esp_rmt.h +++ b/arch/xtensa/src/common/espressif/esp_rmt.h @@ -72,7 +72,7 @@ extern "C" * Initialize the selected RMT device in TX mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: @@ -89,7 +89,7 @@ struct rmt_dev_s *esp_rmt_tx_init(int ch, int pin); * Initialize the selected RMT device in RC mode * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: diff --git a/arch/xtensa/src/common/espressif/esp_ws2812.c b/arch/xtensa/src/common/espressif/esp_ws2812.c index f6e6ee075ca..1baf01fa62d 100644 --- a/arch/xtensa/src/common/espressif/esp_ws2812.c +++ b/arch/xtensa/src/common/espressif/esp_ws2812.c @@ -126,9 +126,9 @@ extern uint32_t g_rmt_source_clock_hz; * * Description: * Maps a byte to a sequence of RMT items. Each bit in the byte is - * represented by an RMT item (32-bit value). Iterates over each bit in - * the byte, creating an RMT item for each bit, set or not. The created - * RMT items are stored in the destination array. + * represented by an RMT item (32-bit value). The function iterates over + * each bit in the byte, creating an RMT item for each bit, HIGH or LOW. + * The created RMT items are stored in the destination array. * * Input Parameters: * dev - Pointer to the RMT-based WS2812 device structure. diff --git a/arch/xtensa/src/common/espressif/esp_ws2812.h b/arch/xtensa/src/common/espressif/esp_ws2812.h index e81c7a6f4ab..3da5d58f36a 100644 --- a/arch/xtensa/src/common/espressif/esp_ws2812.h +++ b/arch/xtensa/src/common/espressif/esp_ws2812.h @@ -65,9 +65,9 @@ extern "C" ****************************************************************************/ struct ws2812_dev_s *esp_ws2812_setup(const char *path, - struct rmt_dev_s *rmt, - uint16_t pixel_count, - bool has_white); + struct rmt_dev_s *rmt, + uint16_t pixel_count, + bool has_white); /**************************************************************************** * Name: esp_ws2812_release diff --git a/boards/risc-v/esp32c3/common/include/esp_board_rmt.h b/boards/risc-v/esp32c3/common/include/esp_board_rmt.h index 03ce6bb942d..74fd115341c 100644 --- a/boards/risc-v/esp32c3/common/include/esp_board_rmt.h +++ b/boards/risc-v/esp32c3/common/include/esp_board_rmt.h @@ -56,10 +56,10 @@ extern "C" * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -73,10 +73,10 @@ int board_rmt_rxinitialize(int ch, int pin); * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/risc-v/esp32c3/common/src/esp_board_rmt.c b/boards/risc-v/esp32c3/common/src/esp_board_rmt.c index 528d70581e5..0d15d2e77cf 100644 --- a/boards/risc-v/esp32c3/common/src/esp_board_rmt.c +++ b/boards/risc-v/esp32c3/common/src/esp_board_rmt.c @@ -72,10 +72,10 @@ * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -103,10 +103,10 @@ int board_rmt_rxinitialize(int ch, int pin) * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/risc-v/esp32c6/common/include/esp_board_rmt.h b/boards/risc-v/esp32c6/common/include/esp_board_rmt.h index cbb3f56f5c4..eae34fa6711 100644 --- a/boards/risc-v/esp32c6/common/include/esp_board_rmt.h +++ b/boards/risc-v/esp32c6/common/include/esp_board_rmt.h @@ -56,10 +56,10 @@ extern "C" * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -73,10 +73,10 @@ int board_rmt_rxinitialize(int ch, int pin); * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/risc-v/esp32c6/common/src/esp_board_rmt.c b/boards/risc-v/esp32c6/common/src/esp_board_rmt.c index d73ebcd23ad..9c3eefd321e 100644 --- a/boards/risc-v/esp32c6/common/src/esp_board_rmt.c +++ b/boards/risc-v/esp32c6/common/src/esp_board_rmt.c @@ -72,10 +72,10 @@ * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -103,10 +103,10 @@ int board_rmt_rxinitialize(int ch, int pin) * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/risc-v/esp32h2/common/include/esp_board_rmt.h b/boards/risc-v/esp32h2/common/include/esp_board_rmt.h index 4106b0d5d36..0e713aaee0f 100644 --- a/boards/risc-v/esp32h2/common/include/esp_board_rmt.h +++ b/boards/risc-v/esp32h2/common/include/esp_board_rmt.h @@ -56,10 +56,10 @@ extern "C" * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -73,10 +73,10 @@ int board_rmt_rxinitialize(int ch, int pin); * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/risc-v/esp32h2/common/src/esp_board_rmt.c b/boards/risc-v/esp32h2/common/src/esp_board_rmt.c index 39484443363..2b7d2f9fb4f 100644 --- a/boards/risc-v/esp32h2/common/src/esp_board_rmt.c +++ b/boards/risc-v/esp32h2/common/src/esp_board_rmt.c @@ -72,10 +72,10 @@ * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -103,10 +103,10 @@ int board_rmt_rxinitialize(int ch, int pin) * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/xtensa/esp32/common/include/esp32_board_rmt.h b/boards/xtensa/esp32/common/include/esp32_board_rmt.h index afb7cdb0f95..0d218892f7e 100644 --- a/boards/xtensa/esp32/common/include/esp32_board_rmt.h +++ b/boards/xtensa/esp32/common/include/esp32_board_rmt.h @@ -56,10 +56,10 @@ extern "C" * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -73,10 +73,10 @@ int board_rmt_rxinitialize(int ch, int pin); * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/xtensa/esp32/common/src/esp32_board_rmt.c b/boards/xtensa/esp32/common/src/esp32_board_rmt.c index cf78ae127e2..993ec87361e 100644 --- a/boards/xtensa/esp32/common/src/esp32_board_rmt.c +++ b/boards/xtensa/esp32/common/src/esp32_board_rmt.c @@ -74,10 +74,10 @@ * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -105,10 +105,10 @@ int board_rmt_rxinitialize(int ch, int pin) * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: @@ -141,7 +141,7 @@ int board_rmt_txinitialize(int ch, int pin) #ifdef CONFIG_WS2812_NON_SPI_DRIVER led = esp_ws2812_setup("/dev/leds0", rmt, - CONFIG_WS2812_LED_COUNT, false); + CONFIG_WS2812_LED_COUNT, false); if (led == NULL) { diff --git a/boards/xtensa/esp32s2/common/include/esp32s2_board_rmt.h b/boards/xtensa/esp32s2/common/include/esp32s2_board_rmt.h index 1b4026f6485..6682746c968 100644 --- a/boards/xtensa/esp32s2/common/include/esp32s2_board_rmt.h +++ b/boards/xtensa/esp32s2/common/include/esp32s2_board_rmt.h @@ -56,10 +56,10 @@ extern "C" * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -73,10 +73,10 @@ int board_rmt_rxinitialize(int ch, int pin); * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/xtensa/esp32s2/common/src/esp32s2_board_rmt.c b/boards/xtensa/esp32s2/common/src/esp32s2_board_rmt.c index 2cdd10164be..243c710db6d 100644 --- a/boards/xtensa/esp32s2/common/src/esp32s2_board_rmt.c +++ b/boards/xtensa/esp32s2/common/src/esp32s2_board_rmt.c @@ -74,10 +74,10 @@ * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -105,10 +105,10 @@ int board_rmt_rxinitialize(int ch, int pin) * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/xtensa/esp32s3/common/include/esp32s3_board_rmt.h b/boards/xtensa/esp32s3/common/include/esp32s3_board_rmt.h index 2acdc337688..0b9fbb618a7 100644 --- a/boards/xtensa/esp32s3/common/include/esp32s3_board_rmt.h +++ b/boards/xtensa/esp32s3/common/include/esp32s3_board_rmt.h @@ -56,10 +56,10 @@ extern "C" * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -73,10 +73,10 @@ int board_rmt_rxinitialize(int ch, int pin); * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: diff --git a/boards/xtensa/esp32s3/common/src/esp32s3_board_rmt.c b/boards/xtensa/esp32s3/common/src/esp32s3_board_rmt.c index a3d178105ea..f42d2b33acd 100644 --- a/boards/xtensa/esp32s3/common/src/esp32s3_board_rmt.c +++ b/boards/xtensa/esp32s3/common/src/esp32s3_board_rmt.c @@ -74,10 +74,10 @@ * Name: board_rmt_rxinitialize * * Description: - * Initialize the RMT peripheral and register a RX device. + * Initialize the RMT peripheral and register an RX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the RX channel * * Returned Value: @@ -105,10 +105,10 @@ int board_rmt_rxinitialize(int ch, int pin) * Name: board_rmt_txinitialize * * Description: - * Initialize the RMT peripheral and register a TX device. + * Initialize the RMT peripheral and register an TX device. * * Input Parameters: - * ch - the RMT's channel that will be used + * ch - The RMT's channel that will be used * pin - The pin used for the TX channel * * Returned Value: