mbed-os/libraries/tests/mbed/time_us/main.cpp

30 lines
378 B
C++
Raw Normal View History

#include "mbed.h"
#ifdef TARGET_KL25Z
2013-04-11 16:13:23 +00:00
DigitalOut out(PTD4);
#elif TARGET_KL05Z
DigitalOut out(PTB1);
#elif TARGET_KL46Z
DigitalOut out(PTA1);
#elif TARGET_LPC812
DigitalOut out(D10);
#else
DigitalOut out(p5);
#endif
2013-04-11 16:13:23 +00:00
DigitalOut led(LED1);
int main() {
printf("Hello World\n");
while (true) {
2013-04-11 16:13:23 +00:00
wait_us(1000);
out = !out;
2013-04-11 16:13:23 +00:00
led = !led;
}
}