SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
StepperDriver.h
Go to the documentation of this file.
1#ifndef STEPPERDRIVER_H
2#define STEPPERDRIVER_H
3
4#include "Arduino.h"
5#include "FOCDriver.h"
6
7class StepperDriver: public FOCDriver{
8 public:
9
10 /**
11 * Set phase voltages to the hardware
12 *
13 * @param Ua phase A voltage
14 * @param Ub phase B voltage
15 */
16 virtual void setPwm(float Ua, float Ub) = 0;
17
18 /**
19 * Set phase state, enable/disable
20 *
21 * @param sc - phase A state : active / disabled ( high impedance )
22 * @param sb - phase B state : active / disabled ( high impedance )
23 */
24 virtual void setPhaseState(PhaseState sa, PhaseState sb) = 0;
25
26 /** driver type getter function */
27 virtual DriverType type() override { return DriverType::Stepper; } ;
28};
29
30#endif
DriverType
Definition FOCDriver.h:15
@ Stepper
Definition FOCDriver.h:18
PhaseState
Definition FOCDriver.h:7
virtual void setPhaseState(PhaseState sa, PhaseState sb)=0
virtual DriverType type() override
virtual void setPwm(float Ua, float Ub)=0