Hi, all
I am studying the bsp part while looking at the example of 'ble_app_uart'. (pca10056)
The difference between 'bsp_event_handler' and 'bsp_button_event_handler' is confusing.
Does the 'bsp_button_event_handler' become callback due to 'nrf_drv_gpiote_in_event_enable()' ?
Please explain how the two event handlers work.
add)
Also, is the app_timer created by 'app_button_init' continuously recognizing the press status of the button?
if (type & BSP_INIT_BUTTONS)
{
uint32_t num;
for (num = 0; ((num < BUTTONS_NUMBER) && (err_code == NRF_SUCCESS)); num++)
{
err_code = bsp_event_to_button_action_assign(num, BSP_BUTTON_ACTION_PUSH, BSP_EVENT_DEFAULT);
}
if (err_code == NRF_SUCCESS)
{
err_code = app_button_init((app_button_cfg_t *)app_buttons,
BUTTONS_NUMBER,
APP_TIMER_TICKS(50));
}
if (err_code == NRF_SUCCESS)
{
err_code = app_button_enable();
}
if (err_code == NRF_SUCCESS)
{
err_code = app_timer_create(&m_bsp_button_tmr,
APP_TIMER_MODE_SINGLE_SHOT,
button_timer_handler);
}
}
/* Create polling timer. */
return app_timer_create(&m_detection_delay_timer_id,
APP_TIMER_MODE_SINGLE_SHOT,
detection_delay_timeout_handler);