-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[topic-gpio] samples: led_apa102c_bitbang: Convert to new GPIO API #22099
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] samples: led_apa102c_bitbang: Convert to new GPIO API #22099
Conversation
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.
There's really no reason why that parameter needs to be in parentheses, but changing it isn't necessary.
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.
Fixed, thanks
|
Untested, I don't have the hardware. |
pabigot
left a comment
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.
Possible cleanups but this should be fine.
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.
MISRA-inclined folks would prefer this to change to (rgb & 0x80000000U) != 0 or (better) (rgb & BIT(31)) != 0.
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.
Why not, since we are touching this file. Fixed, thanks.
Conver to the new GPIO API, using raw access since there is no DT definitions for this particular usage of the pins. Signed-off-by: Carles Cufi <[email protected]>
8caebb3 to
e0c635c
Compare
Clean the expression so that it uses the BIT() macro and doesn't abuse the not (!) operator. Signed-off-by: Carles Cufi <[email protected]>
Conver to the new GPIO API, using raw access since there is no DT
definitions for this particular usage of the pins.
Signed-off-by: Carles Cufi [email protected]