diff --git a/components/soc/esp32/include/hal/rmt_ll.h b/components/soc/esp32/include/hal/rmt_ll.h index 821bd5291..1749b2be3 100644 --- a/components/soc/esp32/include/hal/rmt_ll.h +++ b/components/soc/esp32/include/hal/rmt_ll.h @@ -225,21 +225,21 @@ static inline uint32_t rmt_ll_get_tx_end_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return ((status & 0x01) >> 0) | ((status & 0x08) >> 2) | ((status & 0x40) >> 4) | ((status & 0x200) >> 6) | - ((status & 0x1000) >> 8) | ((status & 0x8000) >> 10) | ((status & 40000) >> 12) | ((status & 0x200000) >> 14); + ((status & 0x1000) >> 8) | ((status & 0x8000) >> 10) | ((status & 0x40000) >> 12) | ((status & 0x200000) >> 14); } static inline uint32_t rmt_ll_get_rx_end_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return ((status & 0x02) >> 1) | ((status & 0x10) >> 3) | ((status & 0x80) >> 5) | ((status & 0x400) >> 7) | - ((status & 0x2000) >> 9) | ((status & 0x10000) >> 11) | ((status & 80000) >> 13) | ((status & 0x400000) >> 15); + ((status & 0x2000) >> 9) | ((status & 0x10000) >> 11) | ((status & 0x80000) >> 13) | ((status & 0x400000) >> 15); } static inline uint32_t rmt_ll_get_err_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return ((status & 0x04) >> 2) | ((status & 0x20) >> 4) | ((status & 0x100) >> 6) | ((status & 0x800) >> 8) | - ((status & 0x4000) >> 10) | ((status & 0x20000) >> 12) | ((status & 100000) >> 14) | ((status & 0x800000) >> 16); + ((status & 0x4000) >> 10) | ((status & 0x20000) >> 12) | ((status & 0x100000) >> 14) | ((status & 0x800000) >> 16); } static inline uint32_t rmt_ll_get_tx_thres_interrupt_status(rmt_dev_t *dev) diff --git a/examples/peripherals/rmt/ir_protocols/components/infrared_tools/src/ir_builder_rmt_nec.c b/examples/peripherals/rmt/ir_protocols/components/infrared_tools/src/ir_builder_rmt_nec.c index 571d7eab4..3b41e9eeb 100644 --- a/examples/peripherals/rmt/ir_protocols/components/infrared_tools/src/ir_builder_rmt_nec.c +++ b/examples/peripherals/rmt/ir_protocols/components/infrared_tools/src/ir_builder_rmt_nec.c @@ -102,10 +102,10 @@ static esp_err_t nec_build_frame(ir_builder_t *builder, uint32_t address, uint32 if (!nec_builder->flags & IR_TOOLS_FLAGS_PROTO_EXT) { uint8_t low_byte = address & 0xFF; uint8_t high_byte = (address >> 8) & 0xFF; - NEC_CHECK(low_byte == ~high_byte, "address not match standard NEC protocol", err, ESP_ERR_INVALID_ARG); + NEC_CHECK(low_byte == (~high_byte & 0xFF), "address not match standard NEC protocol", err, ESP_ERR_INVALID_ARG); low_byte = command & 0xFF; high_byte = (command >> 8) & 0xFF; - NEC_CHECK(low_byte == ~high_byte, "command not match standard NEC protocol", err, ESP_ERR_INVALID_ARG); + NEC_CHECK(low_byte == (~high_byte & 0xFF), "command not match standard NEC protocol", err, ESP_ERR_INVALID_ARG); } builder->make_head(builder); // LSB -> MSB diff --git a/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c b/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c index a2da0b144..b9fa721b4 100644 --- a/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c +++ b/examples/peripherals/rmt/ir_protocols/main/ir_protocols_main.c @@ -99,12 +99,12 @@ static void example_ir_tx_task(void *arg) ESP_ERROR_CHECK(ir_builder->build_frame(ir_builder, addr, cmd)); ESP_ERROR_CHECK(ir_builder->get_result(ir_builder, &items, &length)); //To send data according to the waveform items. - rmt_write_items(example_tx_channel, items, length, true); + rmt_write_items(example_tx_channel, items, length, false); // Send repeat code vTaskDelay(pdMS_TO_TICKS(ir_builder->repeat_period_ms)); ESP_ERROR_CHECK(ir_builder->build_repeat_frame(ir_builder)); ESP_ERROR_CHECK(ir_builder->get_result(ir_builder, &items, &length)); - rmt_write_items(example_tx_channel, items, length, true); + rmt_write_items(example_tx_channel, items, length, false); cmd++; } ir_builder->del(ir_builder);