We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 10c7a71 + 10c44a9 commit c4ea5e6Copy full SHA for c4ea5e6
libraries/tests/mbed/timeout/main.cpp
@@ -11,6 +11,9 @@ DigitalOut out(PTB1);
11
#elif defined(TARGET_LPC812)
12
DigitalOut out(P0_12);
13
14
+#elif defined(TARGET_LPC1114)
15
+DigitalOut out(LED2);
16
+
17
#else
18
DigitalOut out(p5);
19
#endif
@@ -22,15 +25,18 @@ void toggleOff (void);
22
25
void toggleOn (void) {
23
26
out = 1;
24
27
led = 1;
28
+ timer.detach();
29
timer.attach_us(toggleOff, 10000);
30
}
31
32
void toggleOff(void) {
33
out = 0;
34
led = 0;
35
36
timer.attach_us(toggleOn, 30000);
37
38
39
int main() {
40
toggleOn();
41
+ while(1);
42
0 commit comments