Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7b3c1df

Browse filesBrowse files
collin80me-no-dev
authored andcommitted
Fix inability to use all buffers in RMT (espressif#3512)
With the >= used let's say you have four RMT inputs, each using 2 channels wide for their receive buffer. This is 4*2 = 8 buffers which is the number of hardware buffers (MAX_CHANNELS). But, for the fourth input the starting buffer will be 6 (this is correct, the buffers used for each input are 0-1, 2-3, 4-5, 6-7). But, 6+2 = 8 which is MAX_CHANNELS. This is valid but the >= would match against it and abort. It is correct to only abort if the value i+j is only greater than MAX_CHANNELS. Thus, a simple one character fix. Delete the equals sign.
1 parent 85ef51f commit 7b3c1df
Copy full SHA for 7b3c1df

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎cores/esp32/esp32-hal-rmt.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-rmt.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize)
483483
break;
484484
}
485485
}
486-
if (i == MAX_CHANNELS || i+j >= MAX_CHANNELS || j != buffers) {
486+
if (i == MAX_CHANNELS || i+j > MAX_CHANNELS || j != buffers) {
487487
xSemaphoreGive(g_rmt_block_lock);
488488
return NULL;
489489
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.