Biblioteka LEDController.
LEDController.h@0:4001e6959177, 2021-12-02 (annotated)
- Committer:
- mpistelek
- Date:
- Thu Dec 02 21:07:04 2021 +0000
- Revision:
- 0:4001e6959177
Pistelek_Gasenje-Paljenje_Svjetla_Pljeskanjem
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mpistelek | 0:4001e6959177 | 1 | #ifndef MBED_LEDCONTROLLER_H |
mpistelek | 0:4001e6959177 | 2 | #define MBED_LEDCONTROLLER_H |
mpistelek | 0:4001e6959177 | 3 | |
mpistelek | 0:4001e6959177 | 4 | #include "mbed.h" |
mpistelek | 0:4001e6959177 | 5 | |
mpistelek | 0:4001e6959177 | 6 | class LEDController{ |
mpistelek | 0:4001e6959177 | 7 | private: |
mpistelek | 0:4001e6959177 | 8 | DigitalOut Dout; |
mpistelek | 0:4001e6959177 | 9 | Ticker flipper; |
mpistelek | 0:4001e6959177 | 10 | float flashPeriod; |
mpistelek | 0:4001e6959177 | 11 | bool blinkingMode; |
mpistelek | 0:4001e6959177 | 12 | bool shouldBeOn; |
mpistelek | 0:4001e6959177 | 13 | |
mpistelek | 0:4001e6959177 | 14 | public: |
mpistelek | 0:4001e6959177 | 15 | LEDController(PinName pin, float flashPeriod, bool blinkingMode, bool shouldBeOn); |
mpistelek | 0:4001e6959177 | 16 | |
mpistelek | 0:4001e6959177 | 17 | void toggleBlinkingMode(); |
mpistelek | 0:4001e6959177 | 18 | void toggleShouldBeOn(); |
mpistelek | 0:4001e6959177 | 19 | bool getBlinkingMode(); |
mpistelek | 0:4001e6959177 | 20 | void checkOnOffState(); |
mpistelek | 0:4001e6959177 | 21 | void flipperFunction(); |
mpistelek | 0:4001e6959177 | 22 | }; |
mpistelek | 0:4001e6959177 | 23 | |
mpistelek | 0:4001e6959177 | 24 | #endif |