Go to the source code of this file.
|
| void * | _configure1PWM (long pwm_frequency, const int pinA) |
| |
| void * | _configure2PWM (long pwm_frequency, const int pinA, const int pinB) |
| |
| void * | _configure3PWM (long pwm_frequency, const int pinA, const int pinB, const int pinC) |
| |
| void * | _configure4PWM (long pwm_frequency, const int pin1A, const int pin1B, const int pin2A, const int pin2B) |
| |
| void * | _configure6PWM (long pwm_frequency, float dead_zone, const int pinA_h, const int pinA_l, const int pinB_h, const int pinB_l, const int pinC_h, const int pinC_l) |
| |
| void | _writeDutyCycle1PWM (float dc_a, void *params) |
| |
| void | _writeDutyCycle2PWM (float dc_a, float dc_b, void *params) |
| |
| void | _writeDutyCycle3PWM (float dc_a, float dc_b, float dc_c, void *params) |
| |
| void | _writeDutyCycle4PWM (float dc_1a, float dc_1b, float dc_2a, float dc_2b, void *params) |
| |
| void | _writeDutyCycle6PWM (float dc_a, float dc_b, float dc_c, PhaseState *phase_state, void *params) |
| |
◆ SIMPLEFOC_DRIVER_INIT_FAILED
| #define SIMPLEFOC_DRIVER_INIT_FAILED ((void*)-1) |
◆ SIMPLEFOC_PWM_ACTIVE_HIGH
| #define SIMPLEFOC_PWM_ACTIVE_HIGH true |
◆ SIMPLEFOC_PWM_HIGHSIDE_ACTIVE_HIGH
| #define SIMPLEFOC_PWM_HIGHSIDE_ACTIVE_HIGH true |
◆ SIMPLEFOC_PWM_LOWSIDE_ACTIVE_HIGH
| #define SIMPLEFOC_PWM_LOWSIDE_ACTIVE_HIGH true |
◆ GenericDriverParams
◆ _configure1PWM()
| void * _configure1PWM |
( |
long |
pwm_frequency, |
|
|
const int |
pinA |
|
) |
| |
Configuring PWM frequency, resolution and alignment
- Stepper driver - 2PWM setting
- hardware specific
- Parameters
-
| pwm_frequency | - frequency in hertz - if applicable |
| pinA | pinA pwm pin |
- Returns
- -1 if failed, or pointer to internal driver parameters struct if successful
◆ _configure2PWM()
| void * _configure2PWM |
( |
long |
pwm_frequency, |
|
|
const int |
pinA, |
|
|
const int |
pinB |
|
) |
| |
Configuring PWM frequency, resolution and alignment
- Stepper driver - 2PWM setting
- hardware specific
- Parameters
-
| pwm_frequency | - frequency in hertz - if applicable |
| pinA | pinA bldc driver |
| pinB | pinB bldc driver |
- Returns
- -1 if failed, or pointer to internal driver parameters struct if successful
◆ _configure3PWM()
| void * _configure3PWM |
( |
long |
pwm_frequency, |
|
|
const int |
pinA, |
|
|
const int |
pinB, |
|
|
const int |
pinC |
|
) |
| |
Configuring PWM frequency, resolution and alignment
- BLDC driver - 3PWM setting
- hardware specific
- Parameters
-
| pwm_frequency | - frequency in hertz - if applicable |
| pinA | pinA bldc driver |
| pinB | pinB bldc driver |
| pinC | pinC bldc driver |
- Returns
- -1 if failed, or pointer to internal driver parameters struct if successful
◆ _configure4PWM()
| void * _configure4PWM |
( |
long |
pwm_frequency, |
|
|
const int |
pin1A, |
|
|
const int |
pin1B, |
|
|
const int |
pin2A, |
|
|
const int |
pin2B |
|
) |
| |
Configuring PWM frequency, resolution and alignment
- Stepper driver - 4PWM setting
- hardware specific
- Parameters
-
| pwm_frequency | - frequency in hertz - if applicable |
| pin1A | pin1A stepper driver |
| pin1B | pin1B stepper driver |
| pin2A | pin2A stepper driver |
| pin2B | pin2B stepper driver |
- Returns
- -1 if failed, or pointer to internal driver parameters struct if successful
◆ _configure6PWM()
| void * _configure6PWM |
( |
long |
pwm_frequency, |
|
|
float |
dead_zone, |
|
|
const int |
pinA_h, |
|
|
const int |
pinA_l, |
|
|
const int |
pinB_h, |
|
|
const int |
pinB_l, |
|
|
const int |
pinC_h, |
|
|
const int |
pinC_l |
|
) |
| |
Configuring PWM frequency, resolution and alignment
- BLDC driver - 6PWM setting
- hardware specific
- Parameters
-
| pwm_frequency | - frequency in hertz - if applicable |
| dead_zone | duty cycle protection zone [0, 1] - both low and high side low - if applicable |
| pinA_h | pinA high-side bldc driver |
| pinA_l | pinA low-side bldc driver |
| pinB_h | pinA high-side bldc driver |
| pinB_l | pinA low-side bldc driver |
| pinC_h | pinA high-side bldc driver |
| pinC_l | pinA low-side bldc driver |
- Returns
- -1 if failed, or pointer to internal driver parameters struct if successful
◆ _writeDutyCycle1PWM()
| void _writeDutyCycle1PWM |
( |
float |
dc_a, |
|
|
void * |
params |
|
) |
| |
Function setting the duty cycle to the pwm pin (ex. analogWrite())
- Stepper driver - 2PWM setting
- hardware specific
- Parameters
-
| dc_a | duty cycle phase A [0, 1] |
| dc_b | duty cycle phase B [0, 1] |
| params | the driver parameters |
◆ _writeDutyCycle2PWM()
| void _writeDutyCycle2PWM |
( |
float |
dc_a, |
|
|
float |
dc_b, |
|
|
void * |
params |
|
) |
| |
Function setting the duty cycle to the pwm pin (ex. analogWrite())
- Stepper driver - 2PWM setting
- hardware specific
- Parameters
-
| dc_a | duty cycle phase A [0, 1] |
| dc_b | duty cycle phase B [0, 1] |
| params | the driver parameters |
◆ _writeDutyCycle3PWM()
| void _writeDutyCycle3PWM |
( |
float |
dc_a, |
|
|
float |
dc_b, |
|
|
float |
dc_c, |
|
|
void * |
params |
|
) |
| |
Function setting the duty cycle to the pwm pin (ex. analogWrite())
- BLDC driver - 3PWM setting
- hardware specific
- Parameters
-
| dc_a | duty cycle phase A [0, 1] |
| dc_b | duty cycle phase B [0, 1] |
| dc_c | duty cycle phase C [0, 1] |
| params | the driver parameters |
◆ _writeDutyCycle4PWM()
| void _writeDutyCycle4PWM |
( |
float |
dc_1a, |
|
|
float |
dc_1b, |
|
|
float |
dc_2a, |
|
|
float |
dc_2b, |
|
|
void * |
params |
|
) |
| |
Function setting the duty cycle to the pwm pin (ex. analogWrite())
- Stepper driver - 4PWM setting
- hardware specific
- Parameters
-
| dc_1a | duty cycle phase 1A [0, 1] |
| dc_1b | duty cycle phase 1B [0, 1] |
| dc_2a | duty cycle phase 2A [0, 1] |
| dc_2b | duty cycle phase 2B [0, 1] |
| params | the driver parameters |
◆ _writeDutyCycle6PWM()
| void _writeDutyCycle6PWM |
( |
float |
dc_a, |
|
|
float |
dc_b, |
|
|
float |
dc_c, |
|
|
PhaseState * |
phase_state, |
|
|
void * |
params |
|
) |
| |
Function setting the duty cycle to the pwm pin (ex. analogWrite())
- BLDC driver - 6PWM setting
- hardware specific
- Parameters
-
| dc_a | duty cycle phase A [0, 1] |
| dc_b | duty cycle phase B [0, 1] |
| dc_c | duty cycle phase C [0, 1] |
| phase_state | pointer to PhaseState[3] array |
| params | the driver parameters |