Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys: rt-thread: Check for U8X8_PIN_NONE. #2506

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Conversation

imi415
Copy link
Contributor

@imi415 imi415 commented Sep 12, 2024

RT-Thread use signed value for its pin numbers, while using -1 for PIN_NONE. So when using U8X8_PIN_NONE, RT-Thread will incorrectly interpret the pin as positive integer (255).

This patch wraps rt_pin_xxx functions to detect this condition. It does limit the selectable pin ranges to 0-255, however it should be enough for now.

RT-Thread use signed value for its pin numbers, while using -1 for
PIN_NONE. So when using U8X8_PIN_NONE, RT-Thread will incorrectly
interpret the pin as positive integer (255).

This patch wraps rt_pin_xxx functions to detect this condition.
It does limit the selectable pin ranges to 0-255, however it should
be enough for now.

Signed-off-by: Yilin Sun <[email protected]>
@olikraus olikraus merged commit 91b742c into olikraus:master Sep 12, 2024
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