/* Function for toggling a LED and starting a timer.  */
static void led_and_timer_control(uint32_t led_id, app_simple_timer_mode_t timer_mode)
/* Function for toggling a LED and starting a timer.  */
static void led_and_timer_control(uint32_t led_id, app_simple_timer_mode_t timer_mode)
{
    uint32_t err_code;
    bsp_board_led_invert(led_id);
    m_state_transit_counter = STATE_TRANSIT_COUNTER_INIT_VALUE;
    m_toggle_led_counter    = TOGGLE_LED_COUNTER;
    err_code = app_simple_timer_start(timer_mode, timeout_handler, TIMEOUT_VALUE, NULL);
    APP_ERROR_CHECK(err_code);
}