I am using the ble_uart_app on the dev kit with the nrf52. SDK version 11.0.0. How do I get the bsp_event_handler to get fired on a button release and button push event and not just a BSP_EVENT_KEY_X. Thanks!
I am using the ble_uart_app on the dev kit with the nrf52. SDK version 11.0.0. How do I get the bsp_event_handler to get fired on a button release and button push event and not just a BSP_EVENT_KEY_X. Thanks!
Hi,
You can assign different actions to events by calling
uint32_t bsp_event_to_button_action_assign (uint32_t button, bsp_button_action_t action, bsp_event_t event)
For example
bsp_event_to_button_action_assign(number, BSP_BUTTON_ACTION_RELEASE, BSP_EVENT_KEY_0);
Best regards,
Øyvind
Thanks! Didn't notice that function in the BSP. Now that I can add BSP_BUTTON_ACTION_RELEASE to BSP_EVENT_KEY_0 (it already has the BSP_BUTTON_ACTION_PUSH assigned in the list) what is the recommended way to determine what ACTION triggered the BSP_EVENT_KEY_0 handler?
Thanks! Didn't notice that function in the BSP. Now that I can add BSP_BUTTON_ACTION_RELEASE to BSP_EVENT_KEY_0 (it already has the BSP_BUTTON_ACTION_PUSH assigned in the list) what is the recommended way to determine what ACTION triggered the BSP_EVENT_KEY_0 handler?