a

Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

Revision:
4:e48aee3e8d09
diff -r 6fc7976cc5bf -r e48aee3e8d09 led.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/led.cpp	Thu May 21 11:03:32 2020 +0000
@@ -0,0 +1,31 @@
+#include "led.h"
+
+Led::Led() : led0(PG_4), led1(PG_5), led2(PG_6), led3(PG_7) {
+
+}
+
+
+void Led::On(unsigned char ucLedIndex)
+{
+    led0 = 0;  
+    led1 = 0;
+    led2 = 0;
+    led3 = 0;
+    
+    switch(ucLedIndex){
+        case 0:
+            led0 = 1;    
+            break;
+        case 1:
+            led1 = 1;      
+            break;
+        case 2:
+            led2 = 1;      
+            break;
+        case 3:
+            led3 = 1;  
+            break;
+        default:
+            break;      
+    }
+}
\ No newline at end of file