![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
PROJ515-MASTER-No-PWM
Dependencies: mbed mbed-rtos ShiftReg2 TextLCD
INTERFACE/Interface.hpp@4:020f93d35f6e, 2019-05-07 (annotated)
- Committer:
- thomasmorris
- Date:
- Tue May 07 21:55:57 2019 +0000
- Revision:
- 4:020f93d35f6e
Added mutex and safey coding needs more. Added board and serial functions that need testing. As well as a more thorough post function.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 4:020f93d35f6e | 1 | #ifndef _INTERFACE_HPP_ |
thomasmorris | 4:020f93d35f6e | 2 | #define _INTERFACE_HPP_ |
thomasmorris | 4:020f93d35f6e | 3 | |
thomasmorris | 4:020f93d35f6e | 4 | #include "mbed.h" |
thomasmorris | 4:020f93d35f6e | 5 | #include "rtos.h" |
thomasmorris | 4:020f93d35f6e | 6 | #include "TextLCD.h" |
thomasmorris | 4:020f93d35f6e | 7 | |
thomasmorris | 4:020f93d35f6e | 8 | //Libraries and header file includes |
thomasmorris | 4:020f93d35f6e | 9 | |
thomasmorris | 4:020f93d35f6e | 10 | |
thomasmorris | 4:020f93d35f6e | 11 | extern Serial PC; //TX, RX |
thomasmorris | 4:020f93d35f6e | 12 | extern Serial Board; //TX, RX |
thomasmorris | 4:020f93d35f6e | 13 | extern TextLCD Lcd; // rs, e, d4-d7 |
thomasmorris | 4:020f93d35f6e | 14 | //extern DigitalOut On_board_led;//Onboard LED |
thomasmorris | 4:020f93d35f6e | 15 | class INTERFACE |
thomasmorris | 4:020f93d35f6e | 16 | { |
thomasmorris | 4:020f93d35f6e | 17 | public://Public member functions and variables |
thomasmorris | 4:020f93d35f6e | 18 | INTERFACE(PinName N1, PinName N2, PinName N3, PinName N4, PinName N5, PinName N6, PinName N7, PinName N8, PinName N9, PinName N10, PinName N11); |
thomasmorris | 4:020f93d35f6e | 19 | ~INTERFACE(); |
thomasmorris | 4:020f93d35f6e | 20 | void Init(); |
thomasmorris | 4:020f93d35f6e | 21 | int Post(); |
thomasmorris | 4:020f93d35f6e | 22 | void Serial(); |
thomasmorris | 4:020f93d35f6e | 23 | void LCD(); |
thomasmorris | 4:020f93d35f6e | 24 | void On_board_LED_Flash(); |
thomasmorris | 4:020f93d35f6e | 25 | //Public Functions |
thomasmorris | 4:020f93d35f6e | 26 | |
thomasmorris | 4:020f93d35f6e | 27 | //Public Variabls |
thomasmorris | 4:020f93d35f6e | 28 | |
thomasmorris | 4:020f93d35f6e | 29 | private://Private member functions and variables |
thomasmorris | 4:020f93d35f6e | 30 | //Inputs |
thomasmorris | 4:020f93d35f6e | 31 | |
thomasmorris | 4:020f93d35f6e | 32 | //Rotary Encoder |
thomasmorris | 4:020f93d35f6e | 33 | DigitalIn _Rotary_Encoder_A;//N1 |
thomasmorris | 4:020f93d35f6e | 34 | DigitalIn _Rotary_Encoder_B;//N2 |
thomasmorris | 4:020f93d35f6e | 35 | DigitalIn _Rotary_Encoder_Button;//N3 |
thomasmorris | 4:020f93d35f6e | 36 | |
thomasmorris | 4:020f93d35f6e | 37 | |
thomasmorris | 4:020f93d35f6e | 38 | //Buttons |
thomasmorris | 4:020f93d35f6e | 39 | DigitalIn _Button_1;//N4 |
thomasmorris | 4:020f93d35f6e | 40 | DigitalIn _Button_2;//N5 |
thomasmorris | 4:020f93d35f6e | 41 | DigitalIn _Button_3;//N6 |
thomasmorris | 4:020f93d35f6e | 42 | |
thomasmorris | 4:020f93d35f6e | 43 | //MOSFET Safety Pin |
thomasmorris | 4:020f93d35f6e | 44 | DigitalOut _MOSFET_Safety;//Active low N7 |
thomasmorris | 4:020f93d35f6e | 45 | |
thomasmorris | 4:020f93d35f6e | 46 | //Shift Register Control |
thomasmorris | 4:020f93d35f6e | 47 | DigitalOut _Shift_SCLK;//N8 |
thomasmorris | 4:020f93d35f6e | 48 | DigitalOut _Shift_Latch;//N9 |
thomasmorris | 4:020f93d35f6e | 49 | DigitalOut _Shift_Enable;//N10 |
thomasmorris | 4:020f93d35f6e | 50 | DigitalOut _Shift_Data;//N11 |
thomasmorris | 4:020f93d35f6e | 51 | |
thomasmorris | 4:020f93d35f6e | 52 | |
thomasmorris | 4:020f93d35f6e | 53 | //Private Functions |
thomasmorris | 4:020f93d35f6e | 54 | |
thomasmorris | 4:020f93d35f6e | 55 | //Private Variables |
thomasmorris | 4:020f93d35f6e | 56 | //DigitalOut On_board_led;//Onboard LED |
thomasmorris | 4:020f93d35f6e | 57 | }; |
thomasmorris | 4:020f93d35f6e | 58 | #endif //_INTERFACE_HPP_ |