uint32_t bsp_btn_ble_sleep_mode_prepare(void) { uint32_t err_code = bsp_wakeup_buttons_set((1 << BTN_ID_WAKEUP) | (1 << BTN_ID_WAKEUP_BOND_DELETE)); RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code); return NRF_SUCCESS; }
/**@brief Function for putting the chip into sleep mode. * * @note This function will not return. */ static void sleep_mode_enter(void) { uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE); APP_ERROR_CHECK(err_code); // Prepare wakeup button. err_code = bsp_wakeup_buttons_set((1 << WAKEUP_BUTTON_ID)); APP_ERROR_CHECK(err_code); // Go to system-off mode (this function will not return; wakeup will cause a reset). err_code = sd_power_system_off(); APP_ERROR_CHECK(err_code); }