Go to the source code of this file.
|
| enum | { mcl_drivers_init_error = MAKE_STATUS(mcl_group_drivers, 0)
, mcl_drivers_not_ready = MAKE_STATUS(mcl_group_drivers, 1)
, mcl_drivers_update_error = MAKE_STATUS(mcl_group_drivers, 2)
} |
| |
| enum | mcl_drivers_status_t { drivers_status_null = 0
, drivers_status_init = 1
, drivers_status_run = 2
, drivers_status_fail = 3
} |
| | Status of the drive function. More...
|
| |
| enum | mcl_drivers_channel_t {
mcl_drivers_chn_a
, mcl_drivers_chn_b
, mcl_drivers_chn_c
, mcl_drivers_chn_a0
,
mcl_drivers_chn_a1
, mcl_drivers_chn_b0
, mcl_drivers_chn_b1
, mcl_drivers_chn_ah
,
mcl_drivers_chn_al
, mcl_drivers_chn_bh
, mcl_drivers_chn_bl
, mcl_drivers_chn_ch
,
mcl_drivers_chn_cl
} |
| | Channels for drive functions. More...
|
| |
|
| hpm_mcl_stat_t | hpm_mcl_drivers_init (mcl_drivers_t *drivers, mcl_drivers_cfg_t *cfg) |
| | Initialising data for driver functions. More...
|
| |
| hpm_mcl_stat_t | hpm_mcl_drivers_update_bldc_duty (mcl_drivers_t *drivers, float duty_a, float duty_b, float duty_c) |
| | Update the duty cycle of a brushless motor. More...
|
| |
| hpm_mcl_stat_t | hpm_mcl_drivers_update_step_duty (mcl_drivers_t *drivers, float duty_a0, float duty_a1, float duty_b0, float duty_b1) |
| | Update the duty cycle of a step motor. More...
|
| |
| hpm_mcl_stat_t | hpm_mcl_disable_all_drivers (mcl_drivers_t *drivers) |
| | Switch off all drive outputs. More...
|
| |
| hpm_mcl_stat_t | hpm_mcl_enable_all_drivers (mcl_drivers_t *drivers) |
| | Enable all drive outputs. More...
|
| |
| hpm_mcl_stat_t | hpm_mcl_disable_drivers (mcl_drivers_t *drivers, mcl_drivers_channel_t chn) |
| | Turns off the output of the specified channel of the driver. More...
|
| |
| hpm_mcl_stat_t | hpm_mcl_enable_drivers (mcl_drivers_t *drivers, mcl_drivers_channel_t chn) |
| | Starts the output of the specified channel of the driver. More...
|
| |
| hpm_mcl_stat_t | hpm_mcl_drivers_block_update (mcl_drivers_t *drivers, mcl_motor_dir_t dir, uint8_t sector) |
| | Block mode updates the outputs of the driver peripherals. More...
|
| |
◆ anonymous enum
| Enumerator |
|---|
| mcl_drivers_init_error | |
| mcl_drivers_not_ready | |
| mcl_drivers_update_error | |
◆ mcl_drivers_channel_t
Channels for drive functions.
| Enumerator |
|---|
| mcl_drivers_chn_a | Drive channels for three-phase motors in pair.
|
| mcl_drivers_chn_b | |
| mcl_drivers_chn_c | |
| mcl_drivers_chn_a0 | Four channels of the stepper motor.
|
| mcl_drivers_chn_a1 | |
| mcl_drivers_chn_b0 | |
| mcl_drivers_chn_b1 | |
| mcl_drivers_chn_ah | Drive channels for three-phase motors no pair.
|
| mcl_drivers_chn_al | |
| mcl_drivers_chn_bh | |
| mcl_drivers_chn_bl | |
| mcl_drivers_chn_ch | |
| mcl_drivers_chn_cl | |
◆ mcl_drivers_status_t
Status of the drive function.
| Enumerator |
|---|
| drivers_status_null | |
| drivers_status_init | |
| drivers_status_run | |
| drivers_status_fail | |
◆ hpm_mcl_disable_all_drivers()
Switch off all drive outputs.
- Parameters
-
- Returns
- hpm_mcl_stat_t
◆ hpm_mcl_disable_drivers()
Turns off the output of the specified channel of the driver.
- Parameters
-
- Returns
- hpm_mcl_stat_t
◆ hpm_mcl_drivers_block_update()
Block mode updates the outputs of the driver peripherals.
- Parameters
-
- Returns
- hpm_mcl_stat_t
◆ hpm_mcl_drivers_init()
Initialising data for driver functions.
- Parameters
-
- Returns
- hpm_mcl_stat_t
◆ hpm_mcl_drivers_update_bldc_duty()
Update the duty cycle of a brushless motor.
- Parameters
-
| drivers | mcl_drivers_t |
| duty_a | a-phase duty cycle |
| duty_b | b-phase duty cycle |
| duty_c | c-phase duty cycle |
- Returns
- hpm_mcl_stat_t
◆ hpm_mcl_drivers_update_step_duty()
| hpm_mcl_stat_t hpm_mcl_drivers_update_step_duty |
( |
mcl_drivers_t * |
drivers, |
|
|
float |
duty_a0, |
|
|
float |
duty_a1, |
|
|
float |
duty_b0, |
|
|
float |
duty_b1 |
|
) |
| |
Update the duty cycle of a step motor.
- Parameters
-
| drivers | mcl_drivers_t |
| duty_a0 | a0-phase duty cycle |
| duty_a1 | a1-phase duty cycle |
| duty_b0 | b0-phase duty cycle |
| duty_b1 | b1-phase duty cycle |
- Returns
- hpm_mcl_stat_t
◆ hpm_mcl_enable_all_drivers()
Enable all drive outputs.
- Parameters
-
- Returns
- hpm_mcl_stat_t
◆ hpm_mcl_enable_drivers()
Starts the output of the specified channel of the driver.
- Parameters
-
- Returns
- hpm_mcl_stat_t