a

Dependents:   2d1

Files at this revision

API Documentation at this revision

Comitter:
Dom952
Date:
Sat Apr 23 17:52:23 2016 +0000
Commit message:
a

Changed in this revision

Led_Lcd.cpp Show annotated file Show diff for this revision Revisions of this file
Led_Lcd.h Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 8cd2b75bfac6 Led_Lcd.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Led_Lcd.cpp	Sat Apr 23 17:52:23 2016 +0000
@@ -0,0 +1,29 @@
+#include "LCD_DISCO_F429ZI.h"
+#include "Led_Lcd.h"
+
+
+LedLcd::LedLcd (unsigned char _ucColumn)
+{
+    Column = _ucColumn;
+    BSP_LCD_SetFont(&Font24);
+    lcd.Clear(LCD_COLOR_BLACK);  
+}
+
+void LedLcd::On (unsigned char ucLed_Number)
+{
+    for ( int i = 0; i < 4; i++ )
+    {
+        lcd.SetTextColor(LCD_COLOR_GREEN);
+        lcd.DrawRect(Column*80,80*i,80,80);
+        if ( ucLed_Number == i )
+        lcd.SetTextColor(LCD_COLOR_YELLOW);
+        else lcd.SetTextColor(LCD_COLOR_BLUE);
+        lcd.FillRect((1+Column*80),(80*i+1),78,78);
+    }
+    lcd.SetBackColor(LCD_COLOR_RED);
+    lcd.SetTextColor(LCD_COLOR_WHITE);
+    lcd.DisplayStringAt(Column*80,0, (uint8_t *) "0", LEFT_MODE);
+    lcd.DisplayStringAt(Column*80,80, (uint8_t *) "1", LEFT_MODE);
+    lcd.DisplayStringAt(Column*80,160, (uint8_t *) "2", LEFT_MODE);
+    lcd.DisplayStringAt(Column*80,240, (uint8_t *) "3", LEFT_MODE);
+}
diff -r 000000000000 -r 8cd2b75bfac6 Led_Lcd.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Led_Lcd.h	Sat Apr 23 17:52:23 2016 +0000
@@ -0,0 +1,15 @@
+#ifndef LED_LCD_H
+#define LED_LCD_H
+
+#include "LCD_DISCO_F429ZI.h"
+
+class LedLcd{
+    public:
+        LedLcd (unsigned char);
+        void On (unsigned char);
+    private:
+        unsigned char Column;
+        LCD_DISCO_F429ZI lcd;
+};
+
+#endif
\ No newline at end of file