/* Function for restarting the DFU Timer. 
This function will stop and restart the DFU timer. This function will be called by the functions handling any DFU packet received from the peer that is transferring a firmware image.  */
static uint32_t dfu_timer_restart(void)
/* Function for restarting the DFU Timer. 
This function will stop and restart the DFU timer. This function will be called by the functions handling any DFU packet received from the peer that is transferring a firmware image.  */
static uint32_t dfu_timer_restart(void)
{
    if (m_dfu_timed_out)
    {
        return NRF_ERROR_INVALID_STATE;
    }
    uint32_t err_code = app_timer_stop(m_dfu_timer_id);
    APP_ERROR_CHECK(err_code);
    err_code = app_timer_start(m_dfu_timer_id, DFU_TIMEOUT_INTERVAL, NULL);
    APP_ERROR_CHECK(err_code);
    return err_code;
}