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

Enable to create a wakeup button on central multilink example

I'm trying to implement a wake-up button on central multilink example. I.e, i need to implement the app_button in order to wake up from sd_evt_wat() function. The problem is when I add this characteristic on buttons_init,

uint32_t err_code;

// @note: Array must be static because a pointer to it will be saved in the Button handler
//        module.
static app_button_cfg_t buttons[] =
{
    {SEND_NOTIFICATION_BUTTON_PIN, false, NRF_GPIO_PIN_PULLUP, button_event_handler},
    {BOND_DELETE_ALL_BUTTON_PIN  , false, NRF_GPIO_PIN_PULLUP, NULL},
};

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

err_code = app_button_enable();
APP_ERROR_CHECK(err_code);

the project simple crash until reach the main function. Can anyone hellp me? I'm using S120 1.0.1 and SDK_v6.1.0_b2ece6.

Thansk in advance and i'm sorry about my english.

Parents Reply
  • Yes, I already have this. But, if i put timers_init(), it happens the same.

    static void timers_init(void){ // Initialize timer module, making it use the scheduler. APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false); }

    Basically, I copy the functions from multilink_peripheral. I.e, i add gpio_init, timers_init and button_event_handler. And I add the files to libraries. I can post my code here, if you prefer. I'm really stuck .

Children
No Data
Related