/* Function for extracting the BSP event valid at startup. 
When a button was used to wake up the device, the button press will not generate an interrupt. This function reads which button was pressed at startup, and returns the appropriate BSP event. */
static void startup_event_extract(bsp_event_t *p_startup_event)
/* Function for extracting the BSP event valid at startup. 
When a button was used to wake up the device, the button press will not generate an interrupt. This function reads which button was pressed at startup, and returns the appropriate BSP event. */
static void startup_event_extract(bsp_event_t *p_startup_event)
{
    if (bsp_button_is_pressed(BTN_ID_WAKEUP_BOND_DELETE))
    {
        *p_startup_event = BSP_EVENT_CLEAR_BONDING_DATA;
    }
    else if (bsp_button_is_pressed(BTN_ID_WAKEUP))
    {
        *p_startup_event = BSP_EVENT_WAKEUP;
    }
    else
    {
        *p_startup_event = BSP_EVENT_NOTHING;
    }
}