the fish that looks like a jet

Dependencies:   ADXL345 ADXL345_I2C IMUfilter ITG3200 mbed Servo

Committer:
rkk
Date:
Mon Feb 17 14:04:09 2014 +0000
Revision:
16:79cfe6201318
Parent:
8:0574a5db1fc4
changed p5 to p7

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sandwich 5:090ef6275773 1 #pragma once
sandwich 5:090ef6275773 2 #include "mbed.h"
sandwich 5:090ef6275773 3
sandwich 5:090ef6275773 4 class PwmReader
sandwich 5:090ef6275773 5 {
sandwich 5:090ef6275773 6 public:
sandwich 5:090ef6275773 7 PwmReader();
rkk 6:a4d6f3e4bf28 8 PwmReader(PinName pwmInPort, float min = 0.0, float max = 1.0);
sandwich 5:090ef6275773 9 ~PwmReader();
sandwich 5:090ef6275773 10
sandwich 5:090ef6275773 11 float getDuty(); //0 to 1
sandwich 5:090ef6275773 12
sandwich 5:090ef6275773 13 protected:
sandwich 7:e005cfaff8d1 14 void pwmRise();
sandwich 7:e005cfaff8d1 15 void pwmFall();
rkk 8:0574a5db1fc4 16 void pwmRise2();
rkk 8:0574a5db1fc4 17 void pwmFall2();
sandwich 5:090ef6275773 18
rkk 6:a4d6f3e4bf28 19 private:
sandwich 5:090ef6275773 20 InterruptIn* di;
sandwich 5:090ef6275773 21 int lastRise;
sandwich 5:090ef6275773 22 int period;
sandwich 5:090ef6275773 23 float duty;
rkk 6:a4d6f3e4bf28 24 Timer t;
rkk 6:a4d6f3e4bf28 25 float pwmMin;
rkk 6:a4d6f3e4bf28 26 float pwmMax;
sandwich 5:090ef6275773 27
sandwich 5:090ef6275773 28 };