A classy affair
Dependencies: mbed mbed-rtos ShiftReg TextLCD
Interface/Interface.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 "Interface.hpp" |
thomasmorris | 3:3700f0c29710 | 2 | //Define the variables here |
thomasmorris | 3:3700f0c29710 | 3 | Serial PC(PB_10, PB_11); //TX, RX |
thomasmorris | 4:1ef122d47bf3 | 4 | TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 |
thomasmorris | 3:3700f0c29710 | 5 | |
thomasmorris | 3:3700f0c29710 | 6 | |
thomasmorris | 3:3700f0c29710 | 7 | INTERFACE::INTERFACE(){} |
thomasmorris | 3:3700f0c29710 | 8 | INTERFACE::~INTERFACE(){} |
thomasmorris | 3:3700f0c29710 | 9 | void INTERFACE::Init(){} |
thomasmorris | 3:3700f0c29710 | 10 | int INTERFACE::Post() |
thomasmorris | 3:3700f0c29710 | 11 | { |
thomasmorris | 3:3700f0c29710 | 12 | return 1;//Success |
thomasmorris | 3:3700f0c29710 | 13 | } |
thomasmorris | 3:3700f0c29710 | 14 | void INTERFACE::Serial() |
thomasmorris | 3:3700f0c29710 | 15 | { |
thomasmorris | 3:3700f0c29710 | 16 | while(1) |
thomasmorris | 3:3700f0c29710 | 17 | { |
thomasmorris | 3:3700f0c29710 | 18 | PC.printf("Testing Serial\n"); |
thomasmorris | 3:3700f0c29710 | 19 | Thread::wait(1000); |
thomasmorris | 3:3700f0c29710 | 20 | } |
thomasmorris | 3:3700f0c29710 | 21 | } |
thomasmorris | 4:1ef122d47bf3 | 22 | void INTERFACE::LCD() |
thomasmorris | 4:1ef122d47bf3 | 23 | { |
thomasmorris | 4:1ef122d47bf3 | 24 | while(1) |
thomasmorris | 4:1ef122d47bf3 | 25 | { |
thomasmorris | 4:1ef122d47bf3 | 26 | Lcd.printf("Testing\nINTERFACE"); |
thomasmorris | 4:1ef122d47bf3 | 27 | Thread::wait(1000); |
thomasmorris | 4:1ef122d47bf3 | 28 | } |
thomasmorris | 4:1ef122d47bf3 | 29 | } |
thomasmorris | 3:3700f0c29710 | 30 |