
MBED_1 18.05.2020
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Diff: Led_Lcd.cpp
- Revision:
- 0:bc13b866415b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Led_Lcd.cpp Mon May 18 19:47:58 2020 +0000 @@ -0,0 +1,31 @@ +#include "Led_Lcd.h" + +LedLcd::LedLcd(unsigned char ucColumnNumber){ + Clear(LCD_COLOR_BLACK); + SetBackColor(LCD_COLOR_RED); + SetFont(&Font24); + + ucColumn = ucColumnNumber; + + + +} + +void LedLcd::On(unsigned char LedPos){ + for(unsigned char ucIterator = 0; ucIterator < 4; ucIterator++){ + if(LedPos == ucIterator){ + SetTextColor(LCD_COLOR_GREEN); + } + else{ + SetTextColor(LCD_COLOR_BLUE); + } + FillRect((1 + ucColumn*80), (ucIterator*80)+1, 78, 78); + char tab[2] = {ucIterator+48,0}; + SetTextColor(LCD_COLOR_WHITE); + DisplayStringAt((ucColumn*80), ucIterator*80, (uint8_t *)tab, LEFT_MODE); + } + for(unsigned char ucIterator = 0; ucIterator < 4; ucIterator++){ + SetTextColor(LCD_COLOR_GREEN); + DrawRect((0 + ucColumn*80), (ucIterator*80), 80, 80); + } + }