SOFT261 2018 May Coursework Power On Self Test application
Revision 5:b3323f02b914, committed 2018-05-01
- Comitter:
- noutram
- Date:
- Tue May 01 13:18:06 2018 +0000
- Parent:
- 4:3d7da70d57a1
- Commit message:
- Draft v1 of the SOFT261 Coursework Template (May 2018)
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 01 11:21:13 2018 +0000
+++ b/main.cpp Tue May 01 13:18:06 2018 +0000
@@ -12,7 +12,7 @@
// 1. COMMENT OUT THIS LINE FOR YOUR OWN CODE
#define SOFT261_MAY18_HARDWARE_CHECK
// ****************************************************************************
-
+
#ifdef SOFT261_MAY18_HARDWARE_CHECK
//Hardware declarations for the full power-on self test.
DigitalOut redLed(D7);
@@ -21,7 +21,15 @@
DigitalIn sw1(D4);
DigitalIn sw2(D3);
AnalogIn adcIn(A0);
-int main() { POST(); while (true); }
+int main() {
+ POST();
+ while (true) {
+ redLed = 1;
+ wait(0.2);
+ redLed = 0;
+ wait(0.2);
+ }
+}
#else
// ****************************************************************************
// 2. Declare your driver objects here - some are done for you
@@ -43,7 +51,7 @@
//Infinite loop (you may remove if you wish)
while (true) {
-
+ //TODO: Write Code
}
}
#endif
@@ -116,5 +124,8 @@
#else
void POST() {
puts("Checking serial communications with PuTTY");
+ redLed = 1;
+ yellowLed = 1;
+ greenLed = 1;
}
#endif
\ No newline at end of file