![]() |
RA Flexible Software Package Documentation
Release v6.6.0
|
|
Interface for Motor Algorithm functions.
The Motor Algorithm provides Motor functionality.
Data Structures | |
| struct | motor_algorithm_cfg_t |
| struct | motor_algorithm_api_t |
| struct | motor_algorithm_instance_t |
Typedefs | |
| typedef void | motor_algorithm_ctrl_t |
Enumerations | |
| enum | motor_algorithm_event_t |
| enum | motor_algorithm_control_mode_t |
| struct motor_algorithm_cfg_t |
Motor algorithm configuration structure
| Data Fields | ||
|---|---|---|
|
motor_hal_driver_instance_t const * |
p_motor_hal_driver_instance | Motor driver access module instance. |
| motor_sensor_instance_t const * | p_motor_sensor_instance | Motor angle sensor module instance (Slot 1) |
| motor_sensor_instance_t const * | p_motor_sensor_instance2 | Motor angle sensor module instance (Slot 2) |
| timer_instance_t const * | p_timer_instance | Timer instance for outer loop control. |
| void const * | p_extend | Pointer to extended configuration. |
| struct motor_algorithm_api_t |
Motor algorithm API structure
Data Fields | |
| fsp_err_t(* | open )(motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_cfg_t const *const p_cfg) |
| fsp_err_t(* | close )(motor_algorithm_ctrl_t *const p_ctrl) |
| fsp_err_t(* | reset )(motor_algorithm_ctrl_t *const p_ctrl) |
| fsp_err_t(* | run )(motor_algorithm_ctrl_t *const p_ctrl) |
| fsp_err_t(* | stop )(motor_algorithm_ctrl_t *const p_ctrl) |
| fsp_err_t(* | controlModeGet )(motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_control_mode_t *p_control_mode) |
| fsp_err_t(* | controlModeSet )(motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_control_mode_t control_mode) |
| fsp_err_t(* | statusGet )(motor_algorithm_ctrl_t *const p_ctrl, uint8_t *const p_status) |
| fsp_err_t(* | parameterUpdate )(motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_cfg_t const *const p_cfg) |
| fsp_err_t(* | errorGet )(motor_algorithm_ctrl_t *const p_ctrl, uint32_t *p_error_flags) |
| fsp_err_t(* motor_algorithm_api_t::open) (motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_cfg_t const *const p_cfg) |
Initialize the motor algorithm module.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to configuration structure. |
| fsp_err_t(* motor_algorithm_api_t::close) (motor_algorithm_ctrl_t *const p_ctrl) |
Close (Finish) the motor algorithm module.
| [in] | p_ctrl | Pointer to control structure. |
| fsp_err_t(* motor_algorithm_api_t::reset) (motor_algorithm_ctrl_t *const p_ctrl) |
Reset(Stop) the motor algorithm module.
| [in] | p_ctrl | Pointer to control structure. |
| fsp_err_t(* motor_algorithm_api_t::run) (motor_algorithm_ctrl_t *const p_ctrl) |
Activate the motor algorithm.
| [in] | p_ctrl | Pointer to control structure. |
| fsp_err_t(* motor_algorithm_api_t::stop) (motor_algorithm_ctrl_t *const p_ctrl) |
Inactivate the motor algorithm.
| [in] | p_ctrl | Pointer to instance structure. |
| fsp_err_t(* motor_algorithm_api_t::controlModeGet) (motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_control_mode_t *p_control_mode) |
Get control mode
| [in] | p_ctrl | Pointer to instance structure. |
| [out] | p_control_mode | Pointer to control mode data across multiple modules. |
| fsp_err_t(* motor_algorithm_api_t::controlModeSet) (motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_control_mode_t control_mode) |
Set control mode
| [in] | p_ctrl | Pointer to instance structure. |
| [in] | control_mode | Control mode value across multiple modules. |
| fsp_err_t(* motor_algorithm_api_t::statusGet) (motor_algorithm_ctrl_t *const p_ctrl, uint8_t *const p_status) |
Get status
| [in] | p_ctrl | Pointer to instance structure. |
| fsp_err_t(* motor_algorithm_api_t::parameterUpdate) (motor_algorithm_ctrl_t *const p_ctrl, motor_algorithm_cfg_t const *const p_cfg) |
Set configuration.
| [in] | p_ctrl | Pointer to instance structure. |
| [in] | p_cfg | Pointer to configuration structure. |
| fsp_err_t(* motor_algorithm_api_t::errorGet) (motor_algorithm_ctrl_t *const p_ctrl, uint32_t *p_error_flags) |
Get error info.
| [in] | p_ctrl | Pointer to instance structure. |
| [out] | p_error_flags | Pointer to error info. |
| struct motor_algorithm_instance_t |
This structure encompasses everything that is needed to use an instance of motor algorithm interface.
| Data Fields | ||
|---|---|---|
| motor_algorithm_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
| motor_algorithm_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
| motor_algorithm_api_t const * | p_api | Pointer to the API structure for this instance. |
| typedef void motor_algorithm_ctrl_t |
Control block for motor algorithm
Events that can trigger a callback function