|
Navigation: Bibliotheken > Port > Port Beispiel |
![]() ![]()
|
// Programm läßt abwechselnd die beiden LEDs auf dem
// Application Board im Sekunden Rhythmus blinken
void main(void)
{
Port_DataDirBit(PORT_LED1,PORT_OUT);
Port_DataDirBit(PORT_LED2,PORT_OUT);
while(true) // Endlosschleife
{
Port_WriteBit(PORT_LED1,PORT_ON);
Port_WriteBit(PORT_LED2,PORT_OFF);
AbsDelay(1000);
Port_WriteBit(PORT_LED1,PORT_OFF);
Port_WriteBit(PORT_LED2,PORT_ON);
AbsDelay(1000);
}
}