Added the pin outs
Dependencies: mbed mbed-rtos ShiftReg TextLCD
Interface/Interface.cpp@7:d0159f675b30, 2019-05-06 (annotated)
- Committer:
- thomasmorris
- Date:
- Mon May 06 22:13:28 2019 +0000
- Revision:
- 7:d0159f675b30
- Parent:
- 6:347c1f441b94
Added the pinouts
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 | 7:d0159f675b30 | 3 | Serial PC(PB_6, PB_7); //TX, RX |
thomasmorris | 7:d0159f675b30 | 4 | Serial Board(PB_10, PB_11); //TX, RX |
thomasmorris | 7:d0159f675b30 | 5 | //TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 |
thomasmorris | 4:1ef122d47bf3 | 6 | TextLCD Lcd(PB_12, PB_13, PB_14, PB_15, PA_8, PA_9); // rs, e, d4-d7 |
thomasmorris | 6:347c1f441b94 | 7 | DigitalOut On_board_led(PC_13);//Onborad LED needs no pass in parameter |
thomasmorris | 3:3700f0c29710 | 8 | |
thomasmorris | 7:d0159f675b30 | 9 | INTERFACE::INTERFACE(PinName N1, PinName N2, PinName N3, PinName N4,PinName N5, PinName N6, PinName N7, PinName N8,PinName N9, PinName N10, PinName N11): _Rotary_Encoder_A(N1),_Rotary_Encoder_B(N2),_Rotary_Encoder_Button(N3),_Button_1(N4), _Button_2(N5), _Button_3(N6), _MOSFET_Safety(N7), _Shift_SCLK(N8),_Shift_Latch(N9), _Shift_Enable(N10), _Shift_Data(N11) |
thomasmorris | 7:d0159f675b30 | 10 | { |
thomasmorris | 7:d0159f675b30 | 11 | |
thomasmorris | 7:d0159f675b30 | 12 | } |
thomasmorris | 7:d0159f675b30 | 13 | |
thomasmorris | 3:3700f0c29710 | 14 | INTERFACE::~INTERFACE(){} |
thomasmorris | 3:3700f0c29710 | 15 | void INTERFACE::Init(){} |
thomasmorris | 3:3700f0c29710 | 16 | int INTERFACE::Post() |
thomasmorris | 3:3700f0c29710 | 17 | { |
thomasmorris | 3:3700f0c29710 | 18 | return 1;//Success |
thomasmorris | 3:3700f0c29710 | 19 | } |
thomasmorris | 6:347c1f441b94 | 20 | void INTERFACE::On_board_LED_Flash() |
thomasmorris | 6:347c1f441b94 | 21 | { |
thomasmorris | 6:347c1f441b94 | 22 | while(1) |
thomasmorris | 6:347c1f441b94 | 23 | { |
thomasmorris | 6:347c1f441b94 | 24 | On_board_led = !On_board_led; |
thomasmorris | 6:347c1f441b94 | 25 | Thread::wait(1000); |
thomasmorris | 6:347c1f441b94 | 26 | } |
thomasmorris | 6:347c1f441b94 | 27 | } |
thomasmorris | 3:3700f0c29710 | 28 | void INTERFACE::Serial() |
thomasmorris | 3:3700f0c29710 | 29 | { |
thomasmorris | 3:3700f0c29710 | 30 | while(1) |
thomasmorris | 3:3700f0c29710 | 31 | { |
thomasmorris | 3:3700f0c29710 | 32 | PC.printf("Testing Serial\n"); |
thomasmorris | 3:3700f0c29710 | 33 | Thread::wait(1000); |
thomasmorris | 3:3700f0c29710 | 34 | } |
thomasmorris | 3:3700f0c29710 | 35 | } |
thomasmorris | 4:1ef122d47bf3 | 36 | void INTERFACE::LCD() |
thomasmorris | 4:1ef122d47bf3 | 37 | { |
thomasmorris | 4:1ef122d47bf3 | 38 | while(1) |
thomasmorris | 4:1ef122d47bf3 | 39 | { |
thomasmorris | 4:1ef122d47bf3 | 40 | Lcd.printf("Testing\nINTERFACE"); |
thomasmorris | 4:1ef122d47bf3 | 41 | Thread::wait(1000); |
thomasmorris | 4:1ef122d47bf3 | 42 | } |
thomasmorris | 4:1ef122d47bf3 | 43 | } |
thomasmorris | 3:3700f0c29710 | 44 |