Dependents:   YMotor remoteContolledRobot Pokittris Pokittris ... more

Committer:
inst
Date:
Sun Aug 23 15:17:49 2015 +0000
Revision:
0:f1e5739acc27
first

Who changed what in which revision?

UserRevisionLine numberNew contents of line
inst 0:f1e5739acc27 1 #ifndef INCLUDED_PWM_OUT_H
inst 0:f1e5739acc27 2 #define INCLUDED_PWM_OUT_H
inst 0:f1e5739acc27 3
inst 0:f1e5739acc27 4 #include "mbed.h"
inst 0:f1e5739acc27 5
inst 0:f1e5739acc27 6 class PWMOut{
inst 0:f1e5739acc27 7 public:
inst 0:f1e5739acc27 8 PWMOut( PinName p );
inst 0:f1e5739acc27 9 void setDuty( float duty );
inst 0:f1e5739acc27 10 void setPeriod_sec( float period );
inst 0:f1e5739acc27 11 void setPeriod_us( uint32_t period );
inst 0:f1e5739acc27 12
inst 0:f1e5739acc27 13 private:
inst 0:f1e5739acc27 14 PwmOut* mPWM;
inst 0:f1e5739acc27 15 uint32_t mPeriod_us;
inst 0:f1e5739acc27 16 Timer* mTimer;
inst 0:f1e5739acc27 17 float mNextDuty;
inst 0:f1e5739acc27 18 };
inst 0:f1e5739acc27 19
inst 0:f1e5739acc27 20 #endif