AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/bacnet.c
static void reinit_task(void)
{
    BACNET_REINITIALIZED_STATE state = BACNET_REINIT_IDLE;

    state = Device_Reinitialized_State();
    if (state == BACNET_REINIT_IDLE) {
        /* set timer to never expire */
        timer_interval_infinity(&Reinit_Timer);
    } else if (timer_interval_active(&Reinit_Timer)) {
        if (timer_interval_expired(&Reinit_Timer)) {
            /* reset MCU via watchdog timeout */
            wdt_reset_mcu();
        }
    } else {
        timer_interval_start_seconds(&Reinit_Timer, 3);
    }
}
/**************************************************************************
* Description: handles reinitializing the device after a few seconds
* Returns: none
* Notes: gives the device enough time to acknowledge the RD request
**************************************************************************/
handles reinitializing the device after a few seconds
Returns: none
Notes: gives the device enough time to acknowledge the RD request
handles reinitializing the device after a few seconds Returns : none Notes : gives the device enough time to acknowledge the RD request
static void reinit_task(void)
{
    BACNET_REINITIALIZED_STATE state = BACNET_REINIT_IDLE;
    state = Device_Reinitialized_State();
    if (state == BACNET_REINIT_IDLE) {
        timer_interval_infinity(&Reinit_Timer);
    } else if (timer_interval_active(&Reinit_Timer)) {
        if (timer_interval_expired(&Reinit_Timer)) {
            wdt_reset_mcu();
        }
    } else {
        timer_interval_start_seconds(&Reinit_Timer, 3);
    }
}
static void reinit_task ( void ) { BACNET_REINITIALIZED_STATE state = BACNET_REINIT_IDLE ; state = Device_Reinitialized_State ( ) ; if ( state == BACNET_REINIT_IDLE ) { timer_interval_infinity ( & Reinit_Timer ) ; } else if ( timer_interval_active ( & Reinit_Timer ) ) { if ( timer_interval_expired ( & Reinit_Timer ) ) { wdt_reset_mcu ( ) ; } } else { timer_interval_start_seconds ( & Reinit_Timer , 3 ) ; } }
Description: handles reinitializing the device after a few seconds
Returns: none
Notes: gives the device enough time to acknowledge the RD request
Description : handles reinitializing the device after a few seconds Returns : none Notes : gives the device enough time to acknowledge the RD request
/* set timer to never expire */ /* reset MCU via watchdog timeout */