Added the pin outs
Dependencies: mbed mbed-rtos ShiftReg TextLCD
Interface/Interface.cpp@6:347c1f441b94, 2019-04-11 (annotated)
- Committer:
- thomasmorris
- Date:
- Thu Apr 11 18:12:31 2019 +0000
- Revision:
- 6:347c1f441b94
- Parent:
- 4:1ef122d47bf3
- Child:
- 7:d0159f675b30
Updated code 19:15
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 | 6:347c1f441b94 | 5 | DigitalOut On_board_led(PC_13);//Onborad LED needs no pass in parameter |
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 | 6:347c1f441b94 | 14 | void INTERFACE::On_board_LED_Flash() |
thomasmorris | 6:347c1f441b94 | 15 | { |
thomasmorris | 6:347c1f441b94 | 16 | while(1) |
thomasmorris | 6:347c1f441b94 | 17 | { |
thomasmorris | 6:347c1f441b94 | 18 | On_board_led = !On_board_led; |
thomasmorris | 6:347c1f441b94 | 19 | Thread::wait(1000); |
thomasmorris | 6:347c1f441b94 | 20 | } |
thomasmorris | 6:347c1f441b94 | 21 | } |
thomasmorris | 3:3700f0c29710 | 22 | void INTERFACE::Serial() |
thomasmorris | 3:3700f0c29710 | 23 | { |
thomasmorris | 3:3700f0c29710 | 24 | while(1) |
thomasmorris | 3:3700f0c29710 | 25 | { |
thomasmorris | 3:3700f0c29710 | 26 | PC.printf("Testing Serial\n"); |
thomasmorris | 3:3700f0c29710 | 27 | Thread::wait(1000); |
thomasmorris | 3:3700f0c29710 | 28 | } |
thomasmorris | 3:3700f0c29710 | 29 | } |
thomasmorris | 4:1ef122d47bf3 | 30 | void INTERFACE::LCD() |
thomasmorris | 4:1ef122d47bf3 | 31 | { |
thomasmorris | 4:1ef122d47bf3 | 32 | while(1) |
thomasmorris | 4:1ef122d47bf3 | 33 | { |
thomasmorris | 4:1ef122d47bf3 | 34 | Lcd.printf("Testing\nINTERFACE"); |
thomasmorris | 4:1ef122d47bf3 | 35 | Thread::wait(1000); |
thomasmorris | 4:1ef122d47bf3 | 36 | } |
thomasmorris | 4:1ef122d47bf3 | 37 | } |
thomasmorris | 3:3700f0c29710 | 38 |