Mbed touchscreed project. To be corrected

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Revision:
1:55e05d2aa9cd
Child:
4:35b2f0e76b02
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Led_Lcd.cpp	Fri May 08 10:45:50 2020 +0000
@@ -0,0 +1,41 @@
+#include "Led_Lcd.h"
+
+LCD_DISCO_F429ZI lcd;
+
+LedLcd::LedLcd(unsigned char columnNumber) {
+    ColumnX = columnNumber*80;
+    uint16_t i;
+    const char* Text[] = {"0", "1", "2", "3"};
+    
+    BSP_LCD_SetFont(&Font24);
+    lcd.Clear(LCD_COLOR_BLACK);
+    lcd.SetBackColor(LCD_COLOR_RED);   
+    
+    lcd.SetTextColor(LCD_COLOR_GREEN);
+    for(i=0; i<=240; i = i+80) lcd.DrawRect(ColumnX, i, 80, 80);  
+    
+    lcd.SetTextColor(LCD_COLOR_BLUE);
+    for(i=0; i<4; i ++) lcd.FillRect(ColumnX + 1, (80*i)+1 , 78, 78);
+    
+    lcd.SetTextColor(LCD_COLOR_WHITE);
+    for(i=0; i<4; i++) lcd.DisplayStringAt(ColumnX, i*80, (uint8_t *) Text[i], LEFT_MODE);
+
+}
+
+void LedLcd::On(uint16_t chosenSquare){
+    uint16_t i;
+    const char* Text[] = {"0", "1", "2", "3"};
+    
+    lcd.SetTextColor(LCD_COLOR_GREEN);
+    for(i=0; i<=240; i = i+80) lcd.DrawRect(ColumnX, i, 80, 80);  
+    
+    for(i=0; i<4; i ++) {
+        if( chosenSquare == i) lcd.SetTextColor(LCD_COLOR_GREEN);
+        else lcd.SetTextColor(LCD_COLOR_BLUE);
+        
+        lcd.FillRect(ColumnX+1, (80*i)+1 , 78, 78);
+        }
+        
+    lcd.SetTextColor(LCD_COLOR_WHITE);
+    for(i=0; i<4; i++) lcd.DisplayStringAt(ColumnX, i*80, (uint8_t *) Text[i], LEFT_MODE);
+}