syouichi imamori / Mbed OS MulticopterQuadX

Dependencies:   IAP

Committer:
komaida424
Date:
Fri Nov 15 20:53:36 2013 +0000
Revision:
2:59ac9df97701
Child:
8:1db19b529b22
ver.1.25

Who changed what in which revision?

UserRevisionLine numberNew contents of line
komaida424 2:59ac9df97701 1 #ifndef PULSEWIDTHCOUNTER_H
komaida424 2:59ac9df97701 2 #define PULSEWIDTHCOUNTER_H
komaida424 2:59ac9df97701 3 #define POSITIVE true
komaida424 2:59ac9df97701 4 #define NEGATIVE false
komaida424 2:59ac9df97701 5
komaida424 2:59ac9df97701 6 #include "mbed.h"
komaida424 2:59ac9df97701 7
komaida424 2:59ac9df97701 8 class PulseWidthCounter
komaida424 2:59ac9df97701 9 {
komaida424 2:59ac9df97701 10 private:
komaida424 2:59ac9df97701 11 Timer _time;
komaida424 2:59ac9df97701 12 void start();
komaida424 2:59ac9df97701 13 void stop();
komaida424 2:59ac9df97701 14 InterruptIn interrupt;
komaida424 2:59ac9df97701 15
komaida424 2:59ac9df97701 16 public:
komaida424 2:59ac9df97701 17 // Timer time;
komaida424 2:59ac9df97701 18 PulseWidthCounter(PinName,bool positive=true);
komaida424 2:59ac9df97701 19
komaida424 2:59ac9df97701 20 int count;
komaida424 2:59ac9df97701 21 };
komaida424 2:59ac9df97701 22 #endif