Skip to content

Conversation

@carlescufi
Copy link
Member

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]

@carlescufi carlescufi requested a review from nashif as a code owner January 22, 2020 14:59
@carlescufi carlescufi changed the title samples: led_apa102c_bitbang: Convert to new GPIO API [topic-gpio] samples: led_apa102c_bitbang: Convert to new GPIO API Jan 22, 2020
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks

@carlescufi
Copy link
Member Author

Untested, I don't have the hardware.

Copy link
Contributor

@pabigot pabigot left a 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.

Copy link
Contributor

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.

Copy link
Member Author

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]>
@carlescufi carlescufi force-pushed the led_apa102c_bitbang-gpio-sample branch from 8caebb3 to e0c635c Compare January 22, 2020 15:04
Clean the expression so that it uses the BIT() macro and doesn't abuse
the not (!) operator.

Signed-off-by: Carles Cufi <[email protected]>
@zephyrbot zephyrbot added the area: Samples Samples label Jan 22, 2020
@MaureenHelm MaureenHelm merged commit 6480a84 into zephyrproject-rtos:topic-gpio Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants