Skip to content

Conversation

@npal-cy
Copy link
Contributor

@npal-cy npal-cy commented Nov 15, 2024

Enable GPIO for all ble applications that use additional GPIO (e.g. for LED or button)

Enable GPIO for all ble applications that use additional
GPIO (e.g. for LED or button)

Signed-off-by: Nazar Palamar <[email protected]>
@npal-cy
Copy link
Contributor Author

npal-cy commented Nov 15, 2024

without this update ble samples which are using GPIO, will return compile error on platforms which by default has disabled GPIO in board (e.g. cyw920829m2evk_02)

@Thalley
Copy link
Contributor

Thalley commented Nov 15, 2024

without this update ble samples which are using GPIO, will return compile error on platforms which by default has disabled GPIO in board (e.g. cyw920829m2evk_02)

But with this change, any board that does not support GPIO will have a build warning.

If you want to enable it for a specific board the disables it by default, then it should should into a board specific .conf file in the boards subdirectory

@npal-cy
Copy link
Contributor Author

npal-cy commented Nov 15, 2024

But with this change, any board that does not support GPIO will have a build warning.

No, any board that does not support GPIO will have a build error in anyway, because those samples currently are using GPIO. Am i right?

also, there are couple bt samples which has enabled GPIO:
bluetooth\peripheral_hids\prj.conf"
bluetooth\encrypted_advertising\central\prj.conf
bluetooth\encrypted_advertising\peripheral

@Thalley
Copy link
Contributor

Thalley commented Nov 15, 2024

No, any board that does not support GPIO will have a build error in anyway, because those samples currently are using GPIO. Am i right?

All GPIO related code should be guarded by the Kconfig, so if GPIO=n the samples should still build and run fine. The samples that does not have CONFIG_GPIO=y does not require it; it is entirely optional.

If you want to enable GPIO for a specific board for specific samples, that should be in done in the board-specific files.

also, there are couple bt samples which has enabled GPIO:

Not sure if that is intentional or a mistake from the author.

@npal-cy
Copy link
Contributor Author

npal-cy commented Nov 15, 2024

ok. I will enable CONFIG_GPIO for cyw920829m2evk_02 from board.
Close this PR

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

Labels

area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth ISO Bluetooth LE Isochronous Channels area: Bluetooth Mesh area: Bluetooth area: Samples Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants