Michael Spencer / Smoothie

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Revision:
2:1df0b61d3b5a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libs/Pwm.h	Fri Feb 28 18:52:52 2014 -0800
@@ -0,0 +1,28 @@
+#ifndef _PWM_H
+#define _PWM_H
+
+#include <stdint.h>
+
+#include "Pin.h"
+#include "Module.h"
+
+class Pwm : public Module, public Pin {
+public:
+    Pwm();
+
+    void     on_module_load(void);
+    uint32_t on_tick(uint32_t);
+
+    Pwm*     max_pwm(int);
+    int      max_pwm(void);
+
+    void     pwm(int);
+    void     set(bool);
+
+    int  _max;
+    int  _pwm;
+    int  _sd_accumulator;
+    bool _sd_direction;
+};
+
+#endif /* _PWM_H */