I use ble_app_uart demo of pca1001 and my SDK version is 5.2.0. I want to use APP_BUTTON_INIT to handle a button event. So I changed the buttons_init(void) like this:
static void buttons_init(void) { static app_button_cfg_t buttons[] = { {KEY_START, false, BUTTON_PULL, key_event_handler}, };
APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, false);
}
But it does't work. It run away once reach buttons_init().