Hello everyone,
I tried to add the long press event into my bsp_event_handler without success. I get the normal button press event, but the long button press event is not working. I am using the 17.1 SDK.
In the initialization phase I am calling the functions:
err_code = bsp_event_to_button_action_assign(BUTTON_1 , BSP_BUTTON_ACTION_LONG_PUSH, BSP_EVENT_LONG_KEY_0);
err_code = bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler);
My bsp_event_handler looks like:
static void bsp_event_handler(bsp_event_t event)
{
ret_code_t err_code;
switch (event)
{
case BSP_EVENT_LONG_KEY_0:
NRF_LOG_INFO("LONG BUTTON PRESS!");
break;
case BSP_EVENT_KEY_0:
NRF_LOG_INFO("BUTTON PRESS!");
break;
}
}
within the enum bsp_event_t I added the additional event "BSP_EVENT_LONG_KEY_0 ".
From my point of view I considered everything, but it is not working. Do you can support me at this point? Any ideas what could be the problem?
Best regards
Hani