-
Notifications
You must be signed in to change notification settings - Fork 33
Create common digital pin definition #53
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
Create common digital pin definition #53
Conversation
Thank you for your contribution! |
33d603b
to
dec3783
Compare
Hi, @DhruvaG2000
Rebase done. |
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.
Tested on arduino nano 33 ble sense, and arduino mkr zero and blink LEDs work okay.
Thanks @soburi this looks much more elegant! Thanks to macro magic I guess ;)
This PR is ready to merge pending a few formatting issues:
ERROR: space prohibited before that close parenthesis ')'
#498: FILE: variants/variants.h:22:
and many more that appear upon running checkpatch.pl patches/0001-variants-Define-common-digital-pin-definition.patch
dec3783
to
bf0a214
Compare
Update done. I'll also update other PRs. I forgot to run checkpatch. Thank you. |
I think typically configuration must be able to handle without an additional header, only an overlay file. (It is painful for us to manage many files and various rules. |
bf0a214
to
076445b
Compare
@soburi now that your arduino nano 33 iot fix is merged, there seem to be minor conflicts in this PR, kindly resolve them. |
The digitalPins enumeration, arduino_pins array, and contents of these are determined by d[N]_gpios declaration in dts. Interlock the declaration with the dts definition. - Automatically calculate digitalPin enumeration and arduino_pins array from devicetree configuration. - LED digital pin definition read from 'leds' node in devicetree. Append it to enumeration and pins array. - static struct gpio_dt_spec d0, d1, ... declaration seem bit redundant. Declare as array of gpio_dt_spec. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
076445b
to
7aa7d7e
Compare
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.
Built and tested locally, also tried blinky samples on nano 33 ble sense and mkrzero. Seem to work.
Thanks alot for your contributions @soburi !
The digitalPins enumeration, arduino_pins array,
and contents of these are determined by d[N]_gpios declaration in dts.
Interlock the declaration with the dts definition.