SimpleFOClibrary
2.1
BLDCDriver6PWM.h
Go to the documentation of this file.
1
#ifndef BLDCDriver6PWM_h
2
#define BLDCDriver6PWM_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
BLDCDriver6PWM
:
public
BLDCDriver
14
{
15
public
:
26
BLDCDriver6PWM
(
int
phA_h,
int
phA_l,
int
phB_h,
int
phB_l,
int
phC_h,
int
phC_l,
int
en =
NOT_SET
);
27
29
int
init
()
override
;
31
void
disable
()
override
;
33
void
enable
()
override
;
34
35
// hardware variables
36
int
pwmA_h
,
pwmA_l
;
37
int
pwmB_h
,
pwmB_l
;
38
int
pwmC_h
,
pwmC_l
;
39
int
enable_pin
;
40
41
float
dead_zone
;
42
50
void
setPwm
(
float
Ua,
float
Ub,
float
Uc)
override
;
51
59
virtual
void
setPhaseState
(
int
sa,
int
sb,
int
sc)
override
;
60
61
private
:
62
63
};
64
65
66
#endif
BLDCDriver
Definition:
BLDCDriver.h:6
NOT_SET
#define NOT_SET
Definition:
foc_utils.h:27
BLDCDriver6PWM::pwmC_l
int pwmC_l
phase C pwm pin number
Definition:
BLDCDriver6PWM.h:38
BLDCDriver6PWM::pwmA_l
int pwmA_l
phase A pwm pin number
Definition:
BLDCDriver6PWM.h:36
BLDCDriver6PWM::enable_pin
int enable_pin
enable pin number
Definition:
BLDCDriver6PWM.h:39
BLDCDriver6PWM::dead_zone
float dead_zone
a percentage of dead-time(zone) (both high and low side in low) for each pwm cycle [0,...
Definition:
BLDCDriver6PWM.h:41
BLDCDriver6PWM::setPhaseState
virtual void setPhaseState(int sa, int sb, int sc) override
Definition:
BLDCDriver6PWM.cpp:83
BLDCDriver6PWM::init
int init() override
Definition:
BLDCDriver6PWM.cpp:43
BLDCDriver6PWM::pwmC_h
int pwmC_h
Definition:
BLDCDriver6PWM.h:38
hardware_api.h
BLDCDriver6PWM::setPwm
void setPwm(float Ua, float Ub, float Uc) override
Definition:
BLDCDriver6PWM.cpp:66
BLDCDriver6PWM
Definition:
BLDCDriver6PWM.h:14
BLDCDriver6PWM::pwmA_h
int pwmA_h
Definition:
BLDCDriver6PWM.h:36
BLDCDriver6PWM::BLDCDriver6PWM
BLDCDriver6PWM(int phA_h, int phA_l, int phB_h, int phB_l, int phC_h, int phC_l, int en=NOT_SET)
Definition:
BLDCDriver6PWM.cpp:3
BLDCDriver6PWM::enable
void enable() override
Definition:
BLDCDriver6PWM.cpp:25
BLDCDriver6PWM::pwmB_h
int pwmB_h
Definition:
BLDCDriver6PWM.h:37
BLDCDriver6PWM::pwmB_l
int pwmB_l
phase B pwm pin number
Definition:
BLDCDriver6PWM.h:37
BLDCDriver6PWM::disable
void disable() override
Definition:
BLDCDriver6PWM.cpp:33
Arduino
libraries
Arduino-FOC
src
drivers
BLDCDriver6PWM.h
Generated by
1.8.18