
Mbed touchscreed project. To be corrected
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Led_Lcd.cpp
- Committer:
- piotrlopata
- Date:
- 2020-05-11
- Revision:
- 4:35b2f0e76b02
- Parent:
- 1:55e05d2aa9cd
- Child:
- 5:f51c47a67607
File content as of revision 4:35b2f0e76b02:
#include "Led_Lcd.h" LedLcd::LedLcd(uint16_t columnNumber) { ColumnX = columnNumber*80; BSP_LCD_SetFont(&Font24); lcd.Clear(LCD_COLOR_BLACK); lcd.SetBackColor(LCD_COLOR_RED); } 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); //----------------------------------------------------------------- if( chosenSquare != i) lcd.SetTextColor(LCD_COLOR_BLUE); 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); } }