Hi,
I'm using the button event handler code on the SDK. It fires once when pressed down, and once again when i release the button. How do i make it only fire once per push button?
Here is a code snippet:
static void button_event_handler1(uint8_t pin_no, uint8_t button_action)
{
ble_nus_string_send(&m_nus, string, 20);
}
static const app_button_cfg_t app_buttons[NUM_OF_BUTTONS] =
{
{BUTTON_3, false, BUTTON_PULL, button_event_handler1},
{BUTTON_4, false, BUTTON_PULL, button_event_handler2}
}