Lab version
Fork of Task328 by
Diff: main.cpp
- Revision:
- 3:25b67e69f6fc
- Parent:
- 2:52faa20a51b4
--- a/main.cpp Tue Oct 10 17:05:48 2017 +0000
+++ b/main.cpp Thu Sep 12 15:12:04 2019 +0000
@@ -2,9 +2,20 @@
#define N 100000
#define RELEASED 0
#define PRESSED 1
+
+#ifdef TARGET_NUCLEO_F429ZI
+//#define ONBOARD
+#endif
+
+#ifdef ONBOARD
+DigitalOut red_led(LED3); //CountUp is in its critical section
+DigitalOut yellow_led(LED2); //CountDown is in its critical section
+DigitalOut green_led(LED1); //counter != 0
+#else
DigitalOut red_led(D7); //CountUp is in its critical section
DigitalOut yellow_led(D6); //CountDown is in its critical section
DigitalOut green_led(D5); //counter != 0
+#endif
DigitalIn button(USER_BUTTON);
//Shared mutable state
@@ -62,6 +73,7 @@
int main() {
green_led = 1;
+ wait(2);
Timeout t1;
// TRY EACH OF THESE LINES IN TURN.
