This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

button event handler not firing

Hello EveryOne

My button event handler is not being called. following is my code what can be the problem.

uint32_t err_code;


    ble_stack_init();

    timers_init();

    APP_GPIOTE_INIT(1);	

    buttons_init();

    device_manager_init();

    gap_params_init();

    advertising_init();

    services_init();

    conn_params_init();

    Therapy_Init();

    Diagnosis_Init();
    ADC_Init();	

    Pstorage_Initialization();

    // Start detecting button presses.
	err_code = app_button_enable();
    APP_ERROR_CHECK(err_code);

my buttons_init code

static app_button_cfg_t buttons[] =
    {
      17, false, NRF_GPIO_PIN_PULLUP, button_events_handler};

  APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, false);}

i have also enabled app_button_enable but then also handler is not getting called.

Regards Asma

Parents Reply Children
No Data
Related