Is there a simple software code example how to configure an interrupt handler for a single GPIO-pin? I am using nRF51822 chip with softdevice S110 and the interrupt source is connected to pin P0.24.
Is there a simple software code example how to configure an interrupt handler for a single GPIO-pin? I am using nRF51822 chip with softdevice S110 and the interrupt source is connected to pin P0.24.
Hi Jarmo,
Most ble-* prefixed examples in the nRF51822 SDK uses a module called "app_button" which you can use to generate a pin-interrupt. See function "buttons_init" in ble_app_hids_mouse for instance.
This library also includes a simple debounce (or detection delay as it's called in the lib)
Best regards Håkon
The library uses the timer for the "detection delay". The actual pin-interrupt occurs in "void GPIOTE_IRQHandler(void)" (app_gpiote.c), as he app-button lib registers itself as a GPIOTE-user in the init function.
The library uses the timer for the "detection delay". The actual pin-interrupt occurs in "void GPIOTE_IRQHandler(void)" (app_gpiote.c), as he app-button lib registers itself as a GPIOTE-user in the init function.