-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[TOPIC-GPIO] tests: gpio_api_1pin: fix port related testcases #19782
[TOPIC-GPIO] tests: gpio_api_1pin: fix port related testcases #19782
Conversation
All checks passed. checkpatch (informational only, not a failure)
Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the known problems on sx1509b though it specifies non-existent pins on that platform which produces a diagnostic.
All the 1 << pos
expressions should be replaced by BIT(pos)
, since if TEST_PIN
is ever 31 the code is subject to undefined behavior on a 32-bit system, but that's not a port-related problem.
Keep promise of testing 1 pin only, don't attempt to test other pins when verifying gpio_port_* API functions. Use BIT macro to create a bit mask. Fixes: zephyrproject-rtos#19692 Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
4554b25
to
1582df9
Compare
Good point. Fixed. |
Keep promise of testing 1 pin only, don't attempt to test other pins when verifying gpio_port_* API functions.
Fixes: #19692