Skip to content

Conversation

@soburi
Copy link
Member

@soburi soburi commented Oct 10, 2022

Introduce the builtin-led-gpios node to make possible to configuring
the builtin-led from dts.
This node uses to determine the value of the LED_BUILTIN macro.

Use the led0 alias to determine the LED_BUILTIN if the builtin-led-gpios
is not defined.

The behavior can override by defining the LED_BUILTIN in pinmap.h.
It uses definitions that are defined in the header preferentially.


The PR is contineued from #60.
I will rebase if #60 merged.

@soburi soburi marked this pull request as draft October 10, 2022 07:39
@soburi soburi force-pushed the builtin-led-gpios branch 2 times, most recently from 62d1863 to e4be5a6 Compare October 18, 2022 22:14
Copy link
Member

@szczys szczys left a comment

Choose a reason for hiding this comment

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

This is a nice improvement and the changes LGTM.

This PR should also include an update to the variant documentation on this topic: https://github.com/zephyrproject-rtos/gsoc-2022-arduino-core/blob/5c305c663a66cb8f74fc1f2d3a22eba0eb515694/documentation/variants.md?plain=1#L57-L84

Introduce the `builtin-led-gpios` node to make possible to configuring
the builtin-led from dts.
This node uses to determine the value of the `LED_BUILTIN` macro.

Use the `led0` alias to determine the `LED_BUILTIN` if the `builtin-led-gpios`
is not defined.

The behavior can override by defining the `LED_BUILTIN` in pinmap.h.
It uses definitions that are defined in the header preferentially.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
Add a description for `builtin-led-gpios`

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
@soburi soburi marked this pull request as ready for review November 13, 2022 22:28
@soburi
Copy link
Member Author

soburi commented Nov 13, 2022

@szczys

Thank you for reviewing.

This PR should also include an update to the variant documentation on this topic:

I update the document.

Copy link
Member

@DhruvaG2000 DhruvaG2000 left a comment

Choose a reason for hiding this comment

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

This makes the overall code around builtin LEDs much more generic and future proof. Great addition!

Tested-by: Dhruva Gole

@DhruvaG2000 DhruvaG2000 merged commit 87eff28 into zephyrproject-rtos:main Nov 19, 2022
@soburi soburi deleted the builtin-led-gpios branch November 19, 2022 21:55
soburi pushed a commit to soburi/gsoc-2022-arduino-core that referenced this pull request Sep 24, 2025
…ins---variants.h

Added legacy pin coverager for nano boards
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.

3 participants