positive or negative pulse width counter
PulseCounter.h
- Committer:
- komaida424
- Date:
- 2013-07-10
- Revision:
- 0:89bd4ad6027d
File content as of revision 0:89bd4ad6027d:
#ifndef PULSECOUNTER_H #define PULSECOUNTER_H #define POSITIVE true #define NEGATIVE false #include "mbed.h" class PulseCounter { private: Timer _time; void start(); void stop(); InterruptIn interrupt; public: // Timer time; PulseCounter(PinName,bool); int count; }; #endif