Ben Gordon
/
ELEC351_GroupA-branch1
Troubleshooting
Terminal.hpp
- Committer:
- BenRJG
- Date:
- 2018-11-09
- Revision:
- 17:b7cd66c5f845
- Parent:
- 6:f3d1ab8a9e99
File content as of revision 17:b7cd66c5f845:
#include "mbed.h" #include "DataTypes.hpp" // Use generic to set number of rows in table #define Rows 12 #define MaxDATA (Rows*3) // Define 8 bit colours for printing to terminal #define ColourRED 9 #define ColourGREEN 118 #define ColourBLUE 12 #define ColourWhite 255 #define ColourPurple 5 // Class Terminal expects tx and rx pins and is used for controlling a serialy conected terminal class Terminal { public: Terminal(PinName tx, PinName rx) : pc(tx, rx){} void init(void); void PrintDATA(BYTE* STRING, BYTE IDX); void DisplayCellIndex(void); // Prints index of cells into each cell for debug purpose private: Serial pc; void Cursor(BYTE X, BYTE Y); // Function moves cursor to position defined by co-ordinates x,y void Colour(BYTE COLOUR); // Function changes terminal print colour to 8 bit colour defined by COLOUR };