-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDMAServo.h
More file actions
33 lines (27 loc) · 925 Bytes
/
DMAServo.h
File metadata and controls
33 lines (27 loc) · 925 Bytes
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
#ifndef DMAServo_hpp
#define DMAServo_hpp
class DMAServo
{
public:
DMAServo();
~DMAServo();
void init();
void init(bool displayPWMTiming);
void writeMicroseconds(int servoNum,float pwmVal);
void writeMicroseconds(int servoNum,int pwmVal);
void writeAngle(int servoNum,float ang);
void writeAngle(int servoNum,int ang);
// //TODO: add to current value rather than setting absolute value
// void incrementMicroseconds(int servoNum,float pwmVal);
// void incrementMicroseconds(int servoNum,int pwmVal);
// void incrementAngle(int servoNum,float ang);
// void incrementAngle(int servoNum,int ang);
void checkSerial(); //new PWM value
private:
void _initPDB();
void _initDMA();
void _initPins();
static void _pinTime1();
static void _pinTime2();
};
#endif