diff --git a/cores/esp32/esp32-hal-rmt.c b/cores/esp32/esp32-hal-rmt.c index 0a614226..a3ac1c57 100644 --- a/cores/esp32/esp32-hal-rmt.c +++ b/cores/esp32/esp32-hal-rmt.c @@ -483,7 +483,7 @@ rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize) break; } } - if (i == MAX_CHANNELS || i+j >= MAX_CHANNELS || j != buffers) { + if (i == MAX_CHANNELS || i+j > MAX_CHANNELS || j != buffers) { xSemaphoreGive(g_rmt_block_lock); return NULL; }