Semafor sklopka RGY

Files at this revision

API Documentation at this revision

Comitter:
keko10
Date:
Fri May 06 14:01:57 2022 +0000
Commit message:
Kod

Changed in this revision

LED.cpp Show annotated file Show diff for this revision Revisions of this file
LED.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LED.cpp	Fri May 06 14:01:57 2022 +0000
@@ -0,0 +1,18 @@
+#include "LED.h"
+#include "mbed.h"
+
+    LED_CHANGE::LED_CHANGE (PinName pin):_pin(pin) {
+    _pin = 0;
+    }
+
+void LED_CHANGE::CHANGE_LED (int n){
+        
+        if( n == 1){
+            _pin = 1;
+            }
+            
+           else if( n == 0){
+            _pin = 0;
+            }
+        
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LED.h	Fri May 06 14:01:57 2022 +0000
@@ -0,0 +1,16 @@
+#ifndef MBED_LED_H
+#define MBED_LED_H
+
+#include "mbed.h"
+
+class LED_CHANGE {
+    
+    public:
+    LED_CHANGE(PinName pin);
+   void CHANGE_LED (int n);
+   
+   private:
+   DigitalOut _pin;
+    
+};
+#endif
\ No newline at end of file