Semafor sklopka RGY
Revision 0:822329bb16aa, committed 2022-05-06
- 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 |
diff -r 000000000000 -r 822329bb16aa LED.cpp --- /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
diff -r 000000000000 -r 822329bb16aa LED.h --- /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