Ben Gordon
/
ELEC351_GroupA-branch1
Troubleshooting
Diff: LCD.cpp
- Revision:
- 6:f3d1ab8a9e99
- Parent:
- 0:f8fe58d43763
- Child:
- 7:0213c3702c99
--- a/LCD.cpp Sat Nov 03 21:55:11 2018 +0000 +++ b/LCD.cpp Sun Nov 04 20:32:59 2018 +0000 @@ -1,4 +1,5 @@ #include "LCD.hpp" +#include "DataTypes.hpp" void LCD::INIT() { @@ -23,17 +24,17 @@ cmdLCD(CLEAR); } -void LCD::display(char* str, int line, int position) +void LCD::display(BYTE* str, INT_32 line, INT_32 position) { - unsigned int length = strlen(str); - unsigned int line1 = length; - unsigned int line2 = 0; + UINT_32 length = strlen(str); + UINT_32 line1 = length; + UINT_32 line2 = 0; //if((line != NULL)&&(position != NULL)) //{ cmdLCD(line|position); //} - unsigned int p; + UINT_32 p; if(line == LINE1) { if(position + length > 16) @@ -73,14 +74,14 @@ } } -void LCD::putt(char c) +void LCD::putt(BYTE c) { wait_us(50); _LCD_RS = text; set_LCD_data(c); } -void LCD::cmdLCD(unsigned char cmd) +void LCD::cmdLCD(U_BYTE cmd) { wait_us(50); //Wait whilst LCD busy _LCD_RS = control; @@ -95,7 +96,7 @@ _LCD_E = 0; } -void LCD::set_LCD_data(unsigned char d) +void LCD::set_LCD_data(U_BYTE d) { // Send upper 4 bits then lower for bits // e.g. 11110000 => 1111 -> 0000 @@ -109,10 +110,10 @@ LCD_strobe(); } -unsigned int LCD::findSpace(char* str) +UINT_32 LCD::findSpace(BYTE* str) { - unsigned int space = 0; - int n = 16; + UINT_32 space = 0; + INT_32 n = 16; while(!space & (n != -1)) { n--;