This library is derived library of DigitalOut. Cumulative counter that detected the Hi edge and I have the operation cumulative time function .
Diff: LogDigitalOut.h
- Revision:
- 0:b63c87da380a
- Child:
- 1:23b306c0a0b2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LogDigitalOut.h Thu Jan 29 06:28:17 2015 +0000 @@ -0,0 +1,21 @@ +#ifndef LOG_DIGITAL_OUT_H_ +#define LOG_DIGITAL_OUT_H_ + +#include "mbed.h" + +class LogDigitalOut { +public: + LogDigitalOut(PinName pin); + void CountUp(); // 動作累積回数 + void RatiosUp(); + int GetCount(); + int GetRatios(); + int Read(); + void Write(int volume); +private: + DigitalOut _pin; + int buffer; + unsigned int count; + unsigned int ratios; +}; +#endif \ No newline at end of file