RA Flexible Software Package Documentation
Release v5.5.0
|
|
Interface for motor driver functions.
The MOTOR_120_DRIVER interface for setting the PWM modulation duty
Data Structures | |
struct | motor_120_driver_callback_args_t |
struct | motor_120_driver_current_status_t |
struct | motor_120_driver_cfg_t |
struct | motor_120_driver_api_t |
struct | motor_120_driver_instance_t |
Typedefs | |
typedef void | motor_120_driver_ctrl_t |
Enumerations | |
enum | motor_120_driver_event_t |
enum | motor_120_driver_flag_offset_calc_t |
enum | motor_120_driver_phase_pattern_t |
struct motor_120_driver_callback_args_t |
Callback function parameter data
Data Fields | ||
---|---|---|
motor_120_driver_event_t | event | Event trigger. |
void const * | p_context | Placeholder for user data. |
struct motor_120_driver_current_status_t |
struct motor_120_driver_cfg_t |
Configuration parameters.
Data Fields | |
void(* | p_callback )(motor_120_driver_callback_args_t *p_args) |
Callback function. | |
void const * | p_context |
Placeholder for user data. | |
void const * | p_extend |
Placeholder for user extension. | |
struct motor_120_driver_api_t |
Functions implemented at the HAL layer will follow these APIs.
fsp_err_t(* motor_120_driver_api_t::open) (motor_120_driver_ctrl_t *const p_ctrl, motor_120_driver_cfg_t const *const p_cfg) |
Initialize the motor 120 driver module.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure. |
fsp_err_t(* motor_120_driver_api_t::close) (motor_120_driver_ctrl_t *const p_ctrl) |
Close the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_120_driver_api_t::run) (motor_120_driver_ctrl_t *const p_ctrl) |
Run the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_120_driver_api_t::stop) (motor_120_driver_ctrl_t *const p_ctrl) |
Stop the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_120_driver_api_t::reset) (motor_120_driver_ctrl_t *const p_ctrl) |
Reset variables of the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_120_driver_api_t::phaseVoltageSet) (motor_120_driver_ctrl_t *const p_ctrl, float const u_voltage, float const v_voltage, float const w_voltage) |
Set (Input) phase voltage data into the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
[in] | u_voltage | U phase voltage [V] |
[in] | v_voltage | V phase voltage [V] |
[in] | w_voltage | W phase voltage [V] |
fsp_err_t(* motor_120_driver_api_t::phasePatternSet) (motor_120_driver_ctrl_t *const p_ctrl, motor_120_driver_phase_pattern_t const pattern) |
Set phase voltage pattern the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
[in] | pattern | Voltage pattern |
fsp_err_t(* motor_120_driver_api_t::currentGet) (motor_120_driver_ctrl_t *const p_ctrl, motor_120_driver_current_status_t *const p_current_status) |
Get phase current, Vdc and Va_max data from the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
[out] | p_current_status | Pointer to get data structure. |
fsp_err_t(* motor_120_driver_api_t::currentOffsetCalc) (motor_120_driver_ctrl_t *const p_ctrl) |
current offset detection from the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_120_driver_api_t::flagCurrentOffsetGet) (motor_120_driver_ctrl_t *const p_ctrl, motor_120_driver_flag_offset_calc_t *const p_flag_offset) |
Get the flag of finish current offset detection from the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
[out] | p_flag_offset | Flag of finish current offset detection |
fsp_err_t(* motor_120_driver_api_t::parameterUpdate) (motor_120_driver_ctrl_t *const p_ctrl, motor_120_driver_cfg_t const *const p_cfg) |
Update configuration parameters for the calculation in the motor 120 driver module
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure include update parameters. |
struct motor_120_driver_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
motor_120_driver_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
motor_120_driver_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
motor_120_driver_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void motor_120_driver_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.
Events that can trigger a callback function
The flag represents that the offset measurement is finished
Phase voltage pattern