Skip to content

Commit 66deb5e

Browse files
committed
Added LPC1114 support and fixed hard fault
1 parent 268a297 commit 66deb5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libraries/tests/mbed/timeout/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ DigitalOut out(PTB1);
1111
#elif defined(TARGET_LPC812)
1212
DigitalOut out(P0_12);
1313

14+
#elif defined(TARGET_LPC1114)
15+
DigitalOut out(LED2);
16+
1417
#else
1518
DigitalOut out(p5);
1619
#endif
@@ -22,15 +25,18 @@ void toggleOff (void);
2225
void toggleOn (void) {
2326
out = 1;
2427
led = 1;
28+
timer.detach();
2529
timer.attach_us(toggleOff, 10000);
2630
}
2731

2832
void toggleOff(void) {
2933
out = 0;
3034
led = 0;
35+
timer.detach();
3136
timer.attach_us(toggleOn, 30000);
3237
}
3338

3439
int main() {
3540
toggleOn();
41+
while(1);
3642
}

0 commit comments

Comments
 (0)