-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards/seeedstudio-xiao-esp32c3: fix pin conflict #21463
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
boards/seeedstudio-xiao-esp32c3: fix pin conflict #21463
Conversation
b5479f0
to
867f1c6
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.
You shouldn't use URLs for references inside the documentation. Furthermore, ESP32 documentation includes its own section on application specific configurations. Using CFLAGS
at command line or in the Makefile of the application should be much more easier than to override board.h
.
867f1c6
to
bf76aa1
Compare
Wouldn't a similar approach to #21338 work here as well? The Nucleo64 boards have the same issue with a conflicting pin between the LED and SPI bus. |
bf76aa1
to
55eea4e
Compare
Yes, indeed. I tried to mimic this behavior. What do you think? |
55eea4e
to
3d2540a
Compare
The |
3d2540a
to
d4d5ee9
Compare
d4d5ee9
to
b5990c4
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.
Thank you for sticking through, even though the approach was changed and there were a lot of suggestions :)
@gschorcht you still have your "changes requested" review open that prevents merging. |
You're welcome. I learned a new RIOT trick 😄 |
@gschorcht The changes you request here are not relevant any more, due to the solution suggested by @crasbe, which differs substantially from my initial proposition. |
MSG="Warning: Using periph_spi on Seeed Studio Xiao ESP32C3 board will disable BUTTON0 due to pin conflict." | ||
$(shell $(COLOR_ECHO) "$(COLOR_RED)$(MSG)$(COLOR_RESET)" 1>&2) |
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.
If it is only a warning, the message should be coloured yellow as usual, IMHO. It is confusing when you get the red message and the compilation works afterwards.
Remove GPIO5 from the PWM pin list because it is used by default as SPI chip select pin.
b5990c4
to
30b382e
Compare
@dpproto Please use fixups the next time and wait until a maintainer asks you to squash the PR. This helps to track the requested changes. |
Sorry for being a bit nitpicky. It might be that #if MODULE_PERIPH_INIT_BUTTONS || DOXYGEN
/**
* @name Button pin definitions
* @{
*/
...
/** @} */
#endif With this approach you have only one |
1fe097d
to
8510d3e
Compare
I also found Doxygen warning for undocumented items in |
Add a uard around macro BTN0_PIN definition to allow the user to redefine it in order to use the SPI module. Add a guard around SAUL parameters that use BTN0_PIN to avoid error when it is redefined.
8510d3e
to
c8dea01
Compare
👍 But again, please use fixups for existing commits 😉 |
So, |
With |
c8dea01
to
12cc737
Compare
Add guard around macro definition to allow the user to redefine it to use the SPI module
Contribution description
Testing procedure
Issues/PRs references
Fixes #21462