enabled specifying numeric config values using all strtof capabilities
[clinton/Smoothieware.git] / src / libs / Pwm.h
1 #ifndef _PWM_H
2 #define _PWM_H
3
4 #include <stdint.h>
5
6 #include "Pin.h"
7 #include "Module.h"
8
9 class Pwm : public Module, public Pin {
10 public:
11 Pwm();
12
13 void on_module_load(void);
14 uint32_t on_tick(uint32_t);
15
16 Pwm* max_pwm(int);
17 int max_pwm(void);
18
19 void pwm(int);
20 void set(bool);
21
22 int _max;
23 int _pwm;
24 int _sd_accumulator;
25 bool _sd_direction;
26 };
27
28 #endif /* _PWM_H */