No changes
Revision 0:6f9f2e93a0be, committed 2017-11-09
- Comitter:
- noutram
- Date:
- Thu Nov 09 14:24:12 2017 +0000
- Child:
- 1:3250ba797c16
- Commit message:
- Library for the ELEC350/1 Practical Tasks using the FZ429ZI board
Changed in this revision
sample_hardware.cpp | Show annotated file Show diff for this revision Revisions of this file |
sample_hardware.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sample_hardware.cpp Thu Nov 09 14:24:12 2017 +0000 @@ -0,0 +1,34 @@ +#include "mbed.h" +#include "sample_hardware.hpp" + +#define RED_DONE 1 +#define YELLOW_DONE 2 + +//Digital outputs +DigitalOut onBoardLED(LED1); +DigitalOut redLED(PE_15); +DigitalOut yellowLED(PB_10); +DigitalOut greenLED(PB_11); + +//Inputs +DigitalIn onBoardSwitch(USER_BUTTON); +DigitalIn SW1(PE_12); +DigitalIn SW2(PE_14); +//Serial pc(USBTX, USBRX); + +//POWER ON SELF TEST +void post() +{ + //POWER ON TEST (POT) + puts("TASK 616 - ALL LEDs should be blinking"); + for (unsigned int n=0; n<10; n++) { + redLED = 1; + yellowLED = 1; + greenLED = 1; + wait(0.05); + redLED = 0; + yellowLED = 0; + greenLED = 0; + wait(0.05); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sample_hardware.hpp Thu Nov 09 14:24:12 2017 +0000 @@ -0,0 +1,15 @@ +#ifndef __sample_hardware__ +#define __sample_hardware__ +extern DigitalOut onBoardLED; +extern DigitalOut redLED; +extern DigitalOut yellowLED; +extern DigitalOut greenLED; + +extern DigitalIn onBoardSwitch; +extern DigitalIn SW1; +extern DigitalIn SW2; +//extern Serial pc; + +extern void post(); + +#endif \ No newline at end of file