Hi,
We have added support to button click in our design but the intruppt only works once at the first time it is pressed.
What am I missing here? why is the button_evt_handler working only for the first button push?
static void button_evt_handler(uint8_t pin_no, uint8_t button_action)
{
//todo something
}
static void button_init(void)
{
ret_code_t err_code;
const uint8_t buttons_cnt = 1;
static app_button_cfg_t buttons_cfgs =
{
.pin_no = BUTTON_1,
.active_state = APP_BUTTON_ACTIVE_LOW,
.pull_cfg = NRF_GPIO_PIN_PULLUP,
.button_handler = button_evt_handler
};
err_code = app_button_init(&buttons_cfgs, buttons_cnt, APP_TIMER_TICKS(100));
APP_ERROR_CHECK(err_code);
err_code = app_button_enable();
APP_ERROR_CHECK(err_code);
}
int main(void){
....
button_init();
....
}