yajuan yue / Mbed 2 deprecated ele350

Dependencies:   mbed

Fork of ele350 by JIAWEI ZHANG

Committer:
GGHHHH
Date:
Thu Nov 05 12:24:05 2015 +0000
Revision:
4:badd73a8d806
ku

Who changed what in which revision?

UserRevisionLine numberNew contents of line
GGHHHH 4:badd73a8d806 1 #ifndef _SOFT_PWM_
GGHHHH 4:badd73a8d806 2 #define _SOFT_PWM_
GGHHHH 4:badd73a8d806 3
GGHHHH 4:badd73a8d806 4 #include "mbed.h"
GGHHHH 4:badd73a8d806 5
GGHHHH 4:badd73a8d806 6 class SoftPwm
GGHHHH 4:badd73a8d806 7 {
GGHHHH 4:badd73a8d806 8 private:
GGHHHH 4:badd73a8d806 9 float period;
GGHHHH 4:badd73a8d806 10 float dutyCycle;
GGHHHH 4:badd73a8d806 11 Timer timer;
GGHHHH 4:badd73a8d806 12 public:
GGHHHH 4:badd73a8d806 13
GGHHHH 4:badd73a8d806 14 SoftPwm(float initialPeriod, float initialDutycycle);
GGHHHH 4:badd73a8d806 15
GGHHHH 4:badd73a8d806 16 float getPeriod();
GGHHHH 4:badd73a8d806 17 float getDutyCycle();
GGHHHH 4:badd73a8d806 18
GGHHHH 4:badd73a8d806 19 void setPeriod(float newPeriod);
GGHHHH 4:badd73a8d806 20 void setDutyCycle(float newDutyCycle);
GGHHHH 4:badd73a8d806 21
GGHHHH 4:badd73a8d806 22 bool isOn();
GGHHHH 4:badd73a8d806 23
GGHHHH 4:badd73a8d806 24 };
GGHHHH 4:badd73a8d806 25 #endif