int main(void) { wdtdrv_disable(); Clear_prescaler(); scheduler(); return 0; }
int main(void) { #ifndef AVRGCC Wdt_off(); #else wdt_reset(); Wdt_clear_flag(); Wdt_change_enable(); Wdt_stop(); #endif Clear_prescaler(); scheduler(); return 0; }
int main(void) { const uint16_t reset_status = MCUSR; uart_init(umAsync, 9600, csSize8, pNoParity, sbOneStopBit); if(Is_POR_reset() || Is_ext_reset()) { lcd_clear(); } #if (DEBUG == 1) printf("MCU:%d\n", reset_status); #endif // DEBUG MCUSR = 0; wdtdrv_disable(); Clear_prescaler(); scheduler(); return 0; }
/* ------------------------------------------------------------------ */ int main (void) { uint8_t state = ST_TOP_MENU; uint8_t nextstate = ST_TOP_MENU; uint8_t key = KEY_NONE; func_p pStateFunc = states[state]; /* disable watchdog */ wdt_reset(); Wdt_clear_flag(); Wdt_change_enable(); Wdt_stop(); Clear_prescaler(); InitLED(); Led1On(); Timer0_Init(); SPEAKER_Init(); BUTTON_Init(); LCD_Init(); sei(); while (1) { key = BUTTON_GetKey(); nextstate = pStateFunc(key); if (nextstate != state) { pStateFunc = states[nextstate]; state = nextstate; } } /* end of while(1) */ return 0; }
char __low_level_init() { Clear_prescaler(); return 1; }