This library is derived library of DigitalOut. Cumulative counter that detected the Hi edge and I have the operation cumulative time function .

LogDigitalOut.h

Committer:
naseba_atsushi
Date:
2015-02-04
Revision:
3:e03cb5ec8912
Parent:
1:23b306c0a0b2

File content as of revision 3:e03cb5ec8912:

#ifndef LOG_DIGITAL_OUT_H_
#define LOG_DIGITAL_OUT_H_

#include "mbed.h"

class LogDigitalOut {
public:
    LogDigitalOut(PinName pin);
    void CountUp(); // 動作累積回数
    void RatiosUp();
    void ResetAccumulate();
    void Write(int volume);
    int GetCount();
    int GetRatios();
    int Read();

private:
    DigitalOut _pin;
    int buffer;
    unsigned int count;
    unsigned int ratios;
};
#endif