-
Notifications
You must be signed in to change notification settings - Fork 689
Expand file tree
/
Copy pathStepperDriver.h
More file actions
32 lines (26 loc) · 909 Bytes
/
StepperDriver.h
File metadata and controls
32 lines (26 loc) · 909 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
#ifndef STEPPERDRIVER_H
#define STEPPERDRIVER_H
#include "Arduino.h"
#include "FOCDriver.h"
class StepperDriver: public FOCDriver{
public:
float Ua; //!< currently set phase A voltage
float Ub; //!< currently set phase B voltage
/**
* Set phase voltages to the hardware
*
* @param Ua phase A voltage
* @param Ub phase B voltage
*/
virtual void setPwm(float Ua, float Ub) = 0;
/**
* Set phase state, enable/disable
*
* @param sc - phase A state : active / disabled ( high impedance )
* @param sb - phase B state : active / disabled ( high impedance )
*/
virtual void setPhaseState(PhaseState sa, PhaseState sb) = 0;
/** driver type getter function */
virtual DriverType type() override { return DriverType::Stepper; } ;
};
#endif