SimpleFOClibrary
2.1
BLDCDriver3PWM.h
Go to the documentation of this file.
1
#ifndef BLDCDriver3PWM_h
2
#define BLDCDriver3PWM_h
3
4
#include "../common/base_classes/BLDCDriver.h"
5
#include "../common/foc_utils.h"
6
#include "../common/time_utils.h"
7
#include "../common/defaults.h"
8
#include "
hardware_api.h
"
9
13
class
BLDCDriver3PWM
:
public
BLDCDriver
14
{
15
public
:
25
BLDCDriver3PWM
(
int
phA,
int
phB,
int
phC,
int
en1 =
NOT_SET
,
int
en2 =
NOT_SET
,
int
en3 =
NOT_SET
);
26
28
int
init
()
override
;
30
void
disable
()
override
;
32
void
enable
()
override
;
33
34
// hardware variables
35
int
pwmA
;
36
int
pwmB
;
37
int
pwmC
;
38
int
enableA_pin
;
39
int
enableB_pin
;
40
int
enableC_pin
;
41
49
void
setPwm
(
float
Ua,
float
Ub,
float
Uc)
override
;
50
58
virtual
void
setPhaseState
(
int
sa,
int
sb,
int
sc)
override
;
59
private
:
60
61
};
62
63
64
#endif
BLDCDriver3PWM::pwmB
int pwmB
phase B pwm pin number
Definition:
BLDCDriver3PWM.h:36
BLDCDriver
Definition:
BLDCDriver.h:6
NOT_SET
#define NOT_SET
Definition:
foc_utils.h:27
BLDCDriver3PWM::init
int init() override
Definition:
BLDCDriver3PWM.cpp:43
BLDCDriver3PWM::pwmC
int pwmC
phase C pwm pin number
Definition:
BLDCDriver3PWM.h:37
BLDCDriver3PWM::disable
void disable() override
Definition:
BLDCDriver3PWM.cpp:31
BLDCDriver3PWM::pwmA
int pwmA
phase A pwm pin number
Definition:
BLDCDriver3PWM.h:35
BLDCDriver3PWM::BLDCDriver3PWM
BLDCDriver3PWM(int phA, int phB, int phC, int en1=NOT_SET, int en2=NOT_SET, int en3=NOT_SET)
Definition:
BLDCDriver3PWM.cpp:3
BLDCDriver3PWM::setPwm
void setPwm(float Ua, float Ub, float Uc) override
Definition:
BLDCDriver3PWM.cpp:78
hardware_api.h
BLDCDriver3PWM::enableB_pin
int enableB_pin
enable pin number
Definition:
BLDCDriver3PWM.h:39
BLDCDriver3PWM::enable
void enable() override
Definition:
BLDCDriver3PWM.cpp:21
BLDCDriver3PWM::setPhaseState
virtual void setPhaseState(int sa, int sb, int sc) override
Definition:
BLDCDriver3PWM.cpp:68
BLDCDriver3PWM::enableA_pin
int enableA_pin
enable pin number
Definition:
BLDCDriver3PWM.h:38
BLDCDriver3PWM
Definition:
BLDCDriver3PWM.h:14
BLDCDriver3PWM::enableC_pin
int enableC_pin
enable pin number
Definition:
BLDCDriver3PWM.h:40
Arduino
libraries
Arduino-FOC
src
drivers
BLDCDriver3PWM.h
Generated by
1.8.18