You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/11/28 17:03:16 UTC
[GitHub] [nuttx] lucasssvaz opened a new pull request, #7725: boards/xtensa: Fix buttons IRQ on ESP boards
lucasssvaz opened a new pull request, #7725:
URL: https://github.com/apache/nuttx/pull/7725
## Summary
There is a misconception on how buttons IRQs are attached/detached.
The `id` parameter of the function `int board_button_irq(int id, xcpt_t irqhandler, void *arg)` is being handled as the GPIO number of the button rather than the ID of the button. The ID actually is the shift of that button inside the driver bitmask.
On boards with only one button, no errors are thrown because all of the boards use GPIO0 as the only button available. This would coincide with the ID of the only button in the board. This would cause assertion problems in the case of the button being changed from GPIO0.
In boards with multiple buttons, this would make the IRQ to be attached to the wrong GPIO and therefore might not work properly.
This MR aims to fix the problems mentioned above and add the buttons example to the ESP32-LyraT.
## Impact
Correct handling of the buttons IRQ on ESP boards.
## Testing
Tested using the `buttons` example on the ESP32-DevKitC and ESP32-LyraT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] acassis merged pull request #7725: boards/xtensa: Fix buttons IRQ on ESP boards
Posted by GitBox <gi...@apache.org>.
acassis merged PR #7725:
URL: https://github.com/apache/nuttx/pull/7725
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org