/* Function for putting the chip into sleep mode.  */
static void sleep_mode_enter(void)
/* Function for putting the chip into sleep mode.  */
static void sleep_mode_enter(void)
{
    uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE);
    APP_ERROR_CHECK(err_code);
    err_code = bsp_btn_ble_sleep_mode_prepare();
    APP_ERROR_CHECK(err_code);
    err_code = sd_power_system_off();
    APP_ERROR_CHECK(err_code);
}