示例#1
0
int main() {

   const unsigned int periodState_machine_1 = 1000; // 1000 ms default
   TimerSet(periodState_machine_1);
   TimerOn();
   
   SM1_State = -1; // Initial state
   B = 0; // Init outputs

   while(1) {
      TickFct_State_machine_1();
      while(!SM1_Clk);
      SM1_Clk = 0;
   } // while (1)
} // Main
示例#2
0
int main(void) {

	DDRA = 0x00; //set PORTA as input, initialize to 0
	PORTA = 0xFF;
	
	
	DDRC = 0xFF; //set portc as output, initialize to 0
	PORTC = 7;
	led = 7;
	
	
	SM1_State = init; // Initial state

	while(1) {
		TickFct_State_machine_1();

	} // while (1)
} // Main