Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Pwm.h Source File

Pwm.h

00001 #ifndef _PWM_H
00002 #define _PWM_H
00003 
00004 #include <stdint.h>
00005 
00006 #include "Pin.h"
00007 #include "Module.h"
00008 
00009 class Pwm : public Module, public Pin {
00010 public:
00011     Pwm();
00012 
00013     void     on_module_load(void);
00014     uint32_t on_tick(uint32_t);
00015 
00016     Pwm*     max_pwm(int);
00017     int      max_pwm(void);
00018 
00019     void     pwm(int);
00020     void     set(bool);
00021 
00022     int  _max;
00023     int  _pwm;
00024     int  _sd_accumulator;
00025     bool _sd_direction;
00026 };
00027 
00028 #endif /* _PWM_H */