
Mbed touchscreed project. To be corrected
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Diff: Led_Lcd.cpp
- Revision:
- 5:f51c47a67607
- Parent:
- 4:35b2f0e76b02
- Child:
- 7:982fb1421824
--- a/Led_Lcd.cpp Mon May 11 09:49:05 2020 +0000 +++ b/Led_Lcd.cpp Tue May 12 07:42:58 2020 +0000 @@ -1,5 +1,7 @@ #include "Led_Lcd.h" +char* pText[] = {"0", "1", "2", "3"}; + LedLcd::LedLcd(uint16_t columnNumber) { ColumnX = columnNumber*80; @@ -9,8 +11,6 @@ } void LedLcd::On(uint16_t chosenSquare) { - const char* Text[] = {"0", "1", "2", "3"}; - for(uint16_t i=0; i<4; i++) { lcd.SetTextColor(LCD_COLOR_GREEN); lcd.DrawRect(ColumnX, i*80, 80, 80); @@ -19,6 +19,6 @@ lcd.FillRect(ColumnX+1, (80*i)+1 , 78, 78); //----------------------------------------------------------------- lcd.SetTextColor(LCD_COLOR_WHITE); - lcd.DisplayStringAt(ColumnX, i*80, (uint8_t *) Text[i], LEFT_MODE); + lcd.DisplayStringAt(ColumnX, i*80, (uint8_t *) pText[i], LEFT_MODE); } }