A classy affair
Dependencies: mbed mbed-rtos ShiftReg TextLCD
main.cpp@5:20decc99e50c, 2019-04-11 (annotated)
- Committer:
- thomasmorris
- Date:
- Thu Apr 11 11:51:16 2019 +0000
- Revision:
- 5:20decc99e50c
- Parent:
- 4:1ef122d47bf3
Updated Post function
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 3:3700f0c29710 | 1 | #include "Setup.hpp" |
mwthewsey | 2:4c18a6d89f19 | 2 | |
thomasmorris | 5:20decc99e50c | 3 | DigitalOut myled(PC_13);//Needed to access definition of the led from the main |
thomasmorris | 3:3700f0c29710 | 4 | void Serial_Function(){INTERFACE_1.Serial();}//Written inside the interface class and Serial function |
thomasmorris | 4:1ef122d47bf3 | 5 | void LCD_Function(){INTERFACE_1.LCD();}//LCD output |
thomasmorris | 5:20decc99e50c | 6 | void Onboard_Led(){while(1){myled = !myled; Thread::wait(1000);}}//Blink an onboard LED to signal the board is operational |
thomasmorris | 5:20decc99e50c | 7 | void Schedules_Function(){SCHEDULES_1.Schedules_output();}//Output shcedules data |
mwthewsey | 2:4c18a6d89f19 | 8 | int main() |
mwthewsey | 2:4c18a6d89f19 | 9 | { |
thomasmorris | 3:3700f0c29710 | 10 | POST();//Run Power on self test |
thomasmorris | 5:20decc99e50c | 11 | //Thread Start up |
thomasmorris | 3:3700f0c29710 | 12 | Serial_Thread.start(Serial_Function); |
thomasmorris | 4:1ef122d47bf3 | 13 | LCD_Thread.start(LCD_Function); |
thomasmorris | 4:1ef122d47bf3 | 14 | LED_Thread.start(Onboard_Led); |
thomasmorris | 4:1ef122d47bf3 | 15 | Schedules_Thread.start(Schedules_Function); |
thomasmorris | 3:3700f0c29710 | 16 | while(1) |
thomasmorris | 3:3700f0c29710 | 17 | { |
thomasmorris | 5:20decc99e50c | 18 | Thread::signal_wait(1);//Sleep the main thread |
mwthewsey | 0:c63c0359492d | 19 | } |
mwthewsey | 0:c63c0359492d | 20 | } |