Dependents:   YMotor remoteContolledRobot Pokittris Pokittris ... more

Revision:
0:f1e5739acc27
diff -r 000000000000 -r f1e5739acc27 PWMOut.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PWMOut.h	Sun Aug 23 15:17:49 2015 +0000
@@ -0,0 +1,20 @@
+#ifndef INCLUDED_PWM_OUT_H
+#define INCLUDED_PWM_OUT_H
+
+#include "mbed.h"
+
+class PWMOut{
+public:
+    PWMOut( PinName p );
+    void setDuty( float duty );
+    void setPeriod_sec( float period );
+    void setPeriod_us( uint32_t period );
+    
+private:
+    PwmOut* mPWM;
+    uint32_t mPeriod_us;
+    Timer* mTimer;
+    float mNextDuty;
+};
+
+#endif