/* * Start the hardware watch dog timer. */ uint32_t NutWatchDogStart(uint32_t ms, uint32_t xmode) { #if defined(__AVR__) return AvrWatchDogStart(ms); #elif defined(MCU_AT91R40008) || defined(MCU_AT91SAM7X) || defined(MCU_AT91SAM7S) || defined(MCU_AT91SAM7SE) return At91WatchDogStart(ms, xmode); #elif defined(__AVR32__) return Avr32WatchDogStart(ms); #else return 0; #endif }
/*! * \brief System reset. * * Typically this function will not return. If it does, then the * reset failed or the function is not supported. */ void NutReset(void) { #if defined(__AVR__) /* Use watchdog on AVR. */ if (AvrWatchDogStart(1)) { for (;;); } #elif defined(MCU_AT91) At91Reset(); #elif defined(__AVR32__) Avr32Reset(); #elif defined(__CORTEX__) Cortex_Reset(); #elif defined(MCU_MCF5225X) Mcf5225x_Reset(); #elif defined(MCU_MCF51CN) Mcf51cn_Reset(); #endif }