Timer peripheral class. This lib. include function ; WAIT, stop, reset, start, and read_ms.

Dependents:   DetectFreqAboveTH RN41

myTimer.h

Committer:
AkinoriHashimoto
Date:
2017-09-29
Revision:
7:8fbe0cf9d582
Parent:
6:4cb4eea64805

File content as of revision 7:8fbe0cf9d582:

#pragma once

#include "mbed.h"

/** Timer Class.
 *
 *  stop, reset, start, read_ms.
*/
class myTimer
{
private:
    Timer timer;
    
public:
    myTimer();
    void stop();
    void reset();
    void start(bool _RESET=false);
    int read_ms(bool _START=true, bool _RESET=true, bool _STOP=true);
    int read_us(bool _START=true, bool _RESET=true, bool _STOP=true);
    void wait_ms(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true);
    void wait_us(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true);
};

// EOF