Skip to content

ESP UART Better bytesavailable#418

Open
jlpoltrack wants to merge 1 commit intoolliw42:mainfrom
jlpoltrack:esp-uart-better-bytesavailable
Open

ESP UART Better bytesavailable#418
jlpoltrack wants to merge 1 commit intoolliw42:mainfrom
jlpoltrack:esp-uart-better-bytesavailable

Conversation

@jlpoltrack
Copy link
Collaborator

Small optimization - bytesavailable uses a uint under the hood, so no need to call twice.

@olliw42
Copy link
Owner

olliw42 commented Mar 1, 2026

you guys are the esp32 experts, but I think this is not a good idea.
Arduino allows values below 0, and that's why we did that. I would think removing it may open a door for potential issues.

@jlpoltrack
Copy link
Collaborator Author

Arduino allows values below 0, and that's why we did that.

Do you have a source for this? The Arduino core uses uint32_t: https://github.com/espressif/arduino-esp32/blob/release/v2.x/cores/esp32/esp32-hal-uart.h#L39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants