-
Notifications
You must be signed in to change notification settings - Fork 1
/
pwm.h
42 lines (26 loc) · 774 Bytes
/
pwm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// pwm.hpp /////////////////////////////////////////////////////////////////////
// pulse width modulation output object ////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//#include <std_files>
//#include "Headers.h"
//#include "Source.c"
//#include "Headers.hpp"
//#include "Source.cpp"
#ifndef PuLsEwIdThMoDuLaTiOn
#define PuLsEwIdThMoDuLaTiOn
#include "output.h"
class pwmDriver: protected outputDriver
{
public:
pwmDriver();
pwmDriver(pin output_pin, percent init_percentage);
protected:
seconds sinceSwitch;
percent outputPercentage;
public:
void setPercentage(percent new_percent);
percent getPercentage();
void Update(seconds deltat);
~pwmDriver();
};
#endif