rmt test: add the case for bug in github[#1815]
@@ -767,4 +767,41 @@ TEST_CASE("RMT loop_en test", "[rmt][test_env=UT_T1_RMT][ignore]")
TEST_ESP_OK(rmt_driver_uninstall(RMT_RX_CHANNEL));
}
+TEST_CASE("RMT use multi channel", "[rmt][test_env=UT_T1_RMT]")
+{
+ rmt_tx_config_t tx_cfg = {
+ .loop_en = true, // set it as true
+ .carrier_duty_percent = 50,
+ .carrier_freq_hz = 38000,
+ .carrier_level = 1,
+ .carrier_en = RMT_TX_CARRIER_EN,
+ .idle_level = 0,
+ .idle_output_en = true,
+ };
+ rmt_config_t rmt_tx1 = {
+ .channel = RMT_TX_CHANNEL,
+ .gpio_num = RMT_TX_GPIO_NUM,
+ .mem_block_num = 4,
+ .clk_div = RMT_CLK_DIV,
+ .tx_config = tx_cfg,
+ .rmt_mode = 0,
+ };
+ rmt_config(&rmt_tx1);
+ rmt_driver_install(rmt_tx1.channel, 0, 0);
+
+ rmt_config_t rmt_tx2 = rmt_tx1;
+ rmt_tx2.channel = 2;
+ rmt_config(&rmt_tx2);
+ rmt_driver_install(rmt_tx2.channel, 0, 0);
+
+ rmt_config_t rmt_tx3 = rmt_tx1;
+ rmt_tx3.channel = 7;
+ rmt_tx3.mem_block_num = 1;
+ rmt_config(&rmt_tx3);
+ rmt_driver_install(rmt_tx3.channel, 0, 0);
+
+ TEST_ESP_OK(rmt_driver_uninstall(RMT_TX_CHANNEL));
+ TEST_ESP_OK(rmt_driver_uninstall(2));
+ TEST_ESP_OK(rmt_driver_uninstall(7));
+}
