Solution to the blocking task - do not expect this to work well however!

Fork of Task330_blocking by University of Plymouth - Stages 1, 2 and 3

Committer:
noutram
Date:
Wed Sep 18 10:49:18 2019 +0000
Revision:
6:2050203fd22b
2019

Who changed what in which revision?

UserRevisionLine numberNew contents of line
noutram 6:2050203fd22b 1 #include "demo-self-test.hpp"
noutram 6:2050203fd22b 2
noutram 6:2050203fd22b 3 void POST()
noutram 6:2050203fd22b 4 {
noutram 6:2050203fd22b 5 puts("LEDs ON");
noutram 6:2050203fd22b 6 red_led = 1;
noutram 6:2050203fd22b 7 yellow_led = 1;
noutram 6:2050203fd22b 8 green_led = 1;
noutram 6:2050203fd22b 9 onboardLED = 1;
noutram 6:2050203fd22b 10 wait(0.5);
noutram 6:2050203fd22b 11 puts("LEDs OFF");
noutram 6:2050203fd22b 12 red_led = 0;
noutram 6:2050203fd22b 13 yellow_led = 0;
noutram 6:2050203fd22b 14 green_led = 0;
noutram 6:2050203fd22b 15 onboardLED = 0;
noutram 6:2050203fd22b 16 wait(0.5);
noutram 6:2050203fd22b 17 puts("Polling Switches");
noutram 6:2050203fd22b 18 printf("sw1: %d\r\n", (sw1 == 1));
noutram 6:2050203fd22b 19 printf("sw2: %d\r\n", (sw2 == 1));
noutram 6:2050203fd22b 20 printf("Blue Button: %d\r\n", (button == 1));
noutram 6:2050203fd22b 21 }