Merge remote-tracking branch 'upstream/edge' into add/universal-panel-adapter
[clinton/Smoothieware.git] / src / libs / Pwm.h
CommitLineData
11f8ba4e
MM
1#ifndef _PWM_H
2#define _PWM_H
3
4#include <stdint.h>
5
6#include "Pin.h"
7#include "Module.h"
8
9class Pwm : public Module, public Pin {
10public:
11 Pwm();
12
13 void on_module_load(void);
14 uint32_t on_tick(uint32_t);
15
11f8ba4e
MM
16 Pwm* max_pwm(int);
17 int max_pwm(void);
18
19 void pwm(int);
20 void set(bool);
21
989d0e94 22private:
11f8ba4e
MM
23 int _max;
24 int _pwm;
25 int _sd_accumulator;
26 bool _sd_direction;
27};
28
29#endif /* _PWM_H */