Roza Dwornik / Mbed 2 deprecated DISCO-F429ZI_mbed1

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Led_Lcd.cpp Source File

Led_Lcd.cpp

00001 #include "Led_Lcd.h"
00002 #include "LCD_DISCO_F429ZI.h"
00003 
00004 LCD_DISCO_F429ZI lcd;
00005 
00006 LedLcd::LedLcd(unsigned char ucColumnPosition){
00007     lcd.Clear(LCD_COLOR_BLACK);
00008     ucColumnIndex = (80 * ucColumnPosition);
00009 }
00010 
00011 void LedLcd::On(unsigned char ucLedIndex){
00012     lcd.SetTextColor(LCD_COLOR_GREEN);
00013     lcd.FillRect(ucColumnIndex, 0, 80, 320);
00014     unsigned char ucRectangleCounter;
00015     for (ucRectangleCounter = 0; ucRectangleCounter < 4; ucRectangleCounter++){
00016         lcd.SetTextColor(LCD_COLOR_BLUE);
00017         lcd.FillRect((1+ucColumnIndex), (1+80*ucRectangleCounter), 78, 78);
00018     }
00019 
00020     lcd.SetTextColor(LCD_COLOR_YELLOW);
00021     
00022     if((ucLedIndex == 0) || (ucLedIndex == 1) || (ucLedIndex == 2) || (ucLedIndex == 3)){
00023         lcd.FillRect((ucColumnIndex+1), (1+80*ucLedIndex), 78, 78);
00024     }
00025     else {
00026     }
00027     lcd.SetBackColor(LCD_COLOR_RED);
00028     lcd.SetTextColor(LCD_COLOR_WHITE);
00029     BSP_LCD_SetFont(&Font24);
00030     lcd.DisplayStringAt(ucColumnIndex, 0, (uint8_t *)"0", LEFT_MODE);
00031     lcd.DisplayStringAt(ucColumnIndex, 80, (uint8_t *)"1", LEFT_MODE);
00032     lcd.DisplayStringAt(ucColumnIndex, 160, (uint8_t *)"2", LEFT_MODE);
00033     lcd.DisplayStringAt(ucColumnIndex, 240, (uint8_t *)"3", LEFT_MODE);
00034     
00035 }