LauflichtBalken
LaufLichtBalken.h@0:ae6cd9d52dc9, 2018-06-20 (annotated)
- Committer:
- martwerl
- Date:
- Wed Jun 20 14:27:30 2018 +0000
- Revision:
- 0:ae6cd9d52dc9
LauflichtBalken
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
martwerl | 0:ae6cd9d52dc9 | 1 | #include "mbed.h" |
martwerl | 0:ae6cd9d52dc9 | 2 | #ifndef LAUFLICHTBALKEN_H |
martwerl | 0:ae6cd9d52dc9 | 3 | #define LAUFLICHTBALKEN_H |
martwerl | 0:ae6cd9d52dc9 | 4 | |
martwerl | 0:ae6cd9d52dc9 | 5 | |
martwerl | 0:ae6cd9d52dc9 | 6 | class LaufLichtBalken |
martwerl | 0:ae6cd9d52dc9 | 7 | { |
martwerl | 0:ae6cd9d52dc9 | 8 | public: |
martwerl | 0:ae6cd9d52dc9 | 9 | LaufLichtBalken(PinName pin, PinName pin2, PinName pin3, PinName pin4 ) : _pin(pin) , _pin2(pin2), _pin3(pin3), _pin4(pin4) // initialisierungsliste ( muss gleich heissen wie der Konstruktor ) |
martwerl | 0:ae6cd9d52dc9 | 10 | { |
martwerl | 0:ae6cd9d52dc9 | 11 | _pin=0; |
martwerl | 0:ae6cd9d52dc9 | 12 | _pin2=0; |
martwerl | 0:ae6cd9d52dc9 | 13 | _pin2=0; |
martwerl | 0:ae6cd9d52dc9 | 14 | _pin2=0; |
martwerl | 0:ae6cd9d52dc9 | 15 | } |
martwerl | 0:ae6cd9d52dc9 | 16 | |
martwerl | 0:ae6cd9d52dc9 | 17 | void ledOff(void); |
martwerl | 0:ae6cd9d52dc9 | 18 | |
martwerl | 0:ae6cd9d52dc9 | 19 | void ledOn1(void); |
martwerl | 0:ae6cd9d52dc9 | 20 | |
martwerl | 0:ae6cd9d52dc9 | 21 | void ledOn2(void); |
martwerl | 0:ae6cd9d52dc9 | 22 | |
martwerl | 0:ae6cd9d52dc9 | 23 | void ledOn3(void); |
martwerl | 0:ae6cd9d52dc9 | 24 | |
martwerl | 0:ae6cd9d52dc9 | 25 | void ledOn4(void); |
martwerl | 0:ae6cd9d52dc9 | 26 | |
martwerl | 0:ae6cd9d52dc9 | 27 | void printStatus(void); |
martwerl | 0:ae6cd9d52dc9 | 28 | |
martwerl | 0:ae6cd9d52dc9 | 29 | private: |
martwerl | 0:ae6cd9d52dc9 | 30 | DigitalOut _pin; |
martwerl | 0:ae6cd9d52dc9 | 31 | DigitalOut _pin2; |
martwerl | 0:ae6cd9d52dc9 | 32 | DigitalOut _pin3; |
martwerl | 0:ae6cd9d52dc9 | 33 | DigitalOut _pin4; |
martwerl | 0:ae6cd9d52dc9 | 34 | }; |
martwerl | 0:ae6cd9d52dc9 | 35 | |
martwerl | 0:ae6cd9d52dc9 | 36 | #endif |