MBED_1 18.05.2020

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Committer:
hubtel
Date:
Mon May 18 19:47:58 2020 +0000
Revision:
0:bc13b866415b
MBED_1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hubtel 0:bc13b866415b 1 #include "Led_Lcd.h"
hubtel 0:bc13b866415b 2
hubtel 0:bc13b866415b 3 LedLcd::LedLcd(unsigned char ucColumnNumber){
hubtel 0:bc13b866415b 4 Clear(LCD_COLOR_BLACK);
hubtel 0:bc13b866415b 5 SetBackColor(LCD_COLOR_RED);
hubtel 0:bc13b866415b 6 SetFont(&Font24);
hubtel 0:bc13b866415b 7
hubtel 0:bc13b866415b 8 ucColumn = ucColumnNumber;
hubtel 0:bc13b866415b 9
hubtel 0:bc13b866415b 10
hubtel 0:bc13b866415b 11
hubtel 0:bc13b866415b 12 }
hubtel 0:bc13b866415b 13
hubtel 0:bc13b866415b 14 void LedLcd::On(unsigned char LedPos){
hubtel 0:bc13b866415b 15 for(unsigned char ucIterator = 0; ucIterator < 4; ucIterator++){
hubtel 0:bc13b866415b 16 if(LedPos == ucIterator){
hubtel 0:bc13b866415b 17 SetTextColor(LCD_COLOR_GREEN);
hubtel 0:bc13b866415b 18 }
hubtel 0:bc13b866415b 19 else{
hubtel 0:bc13b866415b 20 SetTextColor(LCD_COLOR_BLUE);
hubtel 0:bc13b866415b 21 }
hubtel 0:bc13b866415b 22 FillRect((1 + ucColumn*80), (ucIterator*80)+1, 78, 78);
hubtel 0:bc13b866415b 23 char tab[2] = {ucIterator+48,0};
hubtel 0:bc13b866415b 24 SetTextColor(LCD_COLOR_WHITE);
hubtel 0:bc13b866415b 25 DisplayStringAt((ucColumn*80), ucIterator*80, (uint8_t *)tab, LEFT_MODE);
hubtel 0:bc13b866415b 26 }
hubtel 0:bc13b866415b 27 for(unsigned char ucIterator = 0; ucIterator < 4; ucIterator++){
hubtel 0:bc13b866415b 28 SetTextColor(LCD_COLOR_GREEN);
hubtel 0:bc13b866415b 29 DrawRect((0 + ucColumn*80), (ucIterator*80), 80, 80);
hubtel 0:bc13b866415b 30 }
hubtel 0:bc13b866415b 31 }