Function on LEDs
LEDFunction.h@2:6ef6066f3b6e, 2012-05-28 (annotated)
- Committer:
- PA
- Date:
- Mon May 28 09:31:32 2012 +0000
- Revision:
- 2:6ef6066f3b6e
- Parent:
- 1:7fd22984c201
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
PA | 1:7fd22984c201 | 1 | #ifndef MBED_LEDFUNCTION_H |
PA | 1:7fd22984c201 | 2 | #define MBED_LEDFUNCTION_H |
PA | 2:6ef6066f3b6e | 3 | #include "mbed.h" |
PA | 1:7fd22984c201 | 4 | |
PA | 1:7fd22984c201 | 5 | class LEDFunction{ |
PA | 2:6ef6066f3b6e | 6 | |
PA | 1:7fd22984c201 | 7 | public: |
PA | 1:7fd22984c201 | 8 | LEDFunction(PinName); |
PA | 1:7fd22984c201 | 9 | void write_us(int); |
PA | 1:7fd22984c201 | 10 | void duty(float); |
PA | 1:7fd22984c201 | 11 | void OnOff(); |
PA | 1:7fd22984c201 | 12 | void flash(int); |
PA | 2:6ef6066f3b6e | 13 | int read_us(); |
PA | 2:6ef6066f3b6e | 14 | |
PA | 2:6ef6066f3b6e | 15 | private: |
PA | 1:7fd22984c201 | 16 | void SigStart(); |
PA | 1:7fd22984c201 | 17 | void SigStop(); |
PA | 2:6ef6066f3b6e | 18 | DigitalInOut _pin; |
PA | 1:7fd22984c201 | 19 | int Period; |
PA | 1:7fd22984c201 | 20 | int PWMDuty; |
PA | 1:7fd22984c201 | 21 | int PWMMin; |
PA | 1:7fd22984c201 | 22 | int PWMMax; |
PA | 1:7fd22984c201 | 23 | int i; |
PA | 1:7fd22984c201 | 24 | Ticker Pulse; |
PA | 1:7fd22984c201 | 25 | Timeout PulseEnd; |
PA | 2:6ef6066f3b6e | 26 | }; |
PA | 2:6ef6066f3b6e | 27 | |
PA | 2:6ef6066f3b6e | 28 | #endif |