This Library allows you to use any pin on the mbed micro as PWM out. It also allows the user to update the Period and Pulse width in realtime.
PwmOutAny.h
- Committer:
- mr63
- Date:
- 2013-12-08
- Revision:
- 0:9eb94736e774
File content as of revision 0:9eb94736e774:
#include "mbed.h" class PwmOutAny { public: PwmOutAny(PinName pin1, float Period, float PercentHigh); float Get_PulseWidth(); void Set_PulseWidth(float PW); float Get_Period(); void Set_Period(float ChangePeriod); private: void TickerFlipper(); Ticker _PwmTicker; DigitalOut _PwmOut; };