Hello everyone,
I am simply looking for some clarification on how to correctly handle button presses on the nrf52840 DK, as there seems to be multiple ways to go about it, and I am interested in reducing power usage of the device as much as possible. Is my understanding of the following correct?
1. The GPIOTE library is the core library that is responsible for setting up interrupts for the inputs/outputs on the board, and linking them with a button handler.
2. The GPIOTE library can be used directly, or accessed through the abstraction libraries app_button and bsp_buttons.
3. While the app_button library uses the app_timer library to implement a debounce - with the example code using a 50ms timer, the bsp library (which is used in the Zigbee light switch examples) implements debouncing by making use of the ZB_SCHEDULE_APP_ALARM function to call the button_handler after a 50ms delay.
The last one is perhaps the most important question, as the existing bsp button handler code is perfect for out application, but only on the condition that it properly implements debouncing. If it does NOT implement debouncing or I have misunderstood the nature of the library, would that mean I would have to refactor the bsp code to use app_button instead?
Thank you,
Angry Oatmeal