예제 #1
0
파일: main.c 프로젝트: epsil/tunge
int main(void)
{
   wdtdrv_disable();
   Clear_prescaler();
   scheduler();
   return 0;
}
예제 #2
0
파일: main.c 프로젝트: engie/bikeadc
int main(void)
{
#ifndef  AVRGCC
   Wdt_off();
#else
   wdt_reset();
   Wdt_clear_flag();
   Wdt_change_enable();
   Wdt_stop();
#endif
   Clear_prescaler();
   scheduler();
   return 0;
}
예제 #3
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;
}
예제 #4
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;
}
예제 #5
0
파일: main.c 프로젝트: epsil/tunge
char __low_level_init()
{
  Clear_prescaler();
  return 1;
}