Grelet Jacques
/
Ni-MH_V3
example code using statis library for temperature measurement with LM35 and LM335
Diff: tickerEvent.h
- Revision:
- 1:5821fa15d6ca
- Parent:
- 0:5ce1bc75ff24
diff -r 5ce1bc75ff24 -r 5821fa15d6ca tickerEvent.h --- a/tickerEvent.h Mon Nov 19 20:02:24 2012 +0000 +++ b/tickerEvent.h Tue Nov 20 12:10:39 2012 +0000 @@ -1,14 +1,40 @@ -// tickerEvent.h -#include "mbed.h" - -class tickerEvent { - private: - Ticker ticker; - DigitalOut _pin; - - public: - tickerEvent(PinName pin, float delay); - ~tickerEvent(void); - - void toDo(void); -}; \ No newline at end of file +/*-------------------------------------------------------------------------*/ +/* tickerEvent header class declaration */ +/*-------------------------------------------------------------------------*/ +/* Ni-MH charger project US191 IRD */ +/*-------------------------------------------------------------------------*/ +/* Nov 2012 | J Grelet */ +/*-------------------------------------------------------------------------*/ + +#ifndef tickerEvent_H +#define tickerEvent_H + +#include "mbed.h" + +class tickerEvent { + private: + Ticker _ticker; + DigitalOut _pin; + + public: + // Constructor + tickerEvent(PinName pin, float delay); + + // Destructor + ~tickerEvent(void); + + // return pin status + int read(void); + + // A shorthand for read() + operator int() { + return read(); + } + +private: + // method that change pin status + void toDo(void); + +}; + +#endif // tickerEvent_H \ No newline at end of file