#include <utils.h>
#include <brushless_3phase_digital_hall_double_config.h>
Go to the source code of this file.
Data Structures | |
struct | brushless |
Functions | |
void | brushless_init (void) |
void | brushless_0_set_parameters (brushless_speed speed, brushless_torque torque) |
void | brushless_1_set_parameters (brushless_speed speed, brushless_torque torque) |
brushless | brushless_0_get_mesures (void) |
brushless | brushless_1_get_mesures (void) |
void | brushless_0_set_position (brushless_position p) |
void | brushless_1_set_position (brushless_position p) |
void | brushless_0_register_periodic_event (void(*f)(brushless)) |
void | brushless_1_register_periodic_event (void(*f)(brushless)) |
int32_t | brushless_get_speed (void *) |
int32_t | brushless_get_pos (void *) |
void | brushless_set_torque (void *, int32_t torque) |
void | brushless_set_speed (void *, int32_t speed) |
brushless brushless_0_get_mesures | ( | void | ) |
calculates the speed update info. To be called externally only if not internally, ie if the BRUSHLESS_MANAGE_EXTERNAL is set get current speed and position This function is very useful to get synchronous speed and torque info
Definition at line 475 of file brushless.c.
References IRQ_LOCK, and IRQ_UNLOCK.
Referenced by brushless_get_pos(), and brushless_get_speed().
void brushless_0_register_periodic_event | ( | void(*)(brushless) | f | ) |
registers an event function that triggers periodically, and synchronously with the speed measurement
Definition at line 500 of file brushless.c.
References parse_symbols::f, IRQ_LOCK, IRQ_UNLOCK, and periodic_event_0.
void brushless_0_set_parameters | ( | brushless_speed | speed, | |
brushless_torque | torque | |||
) |
sets a consign speed and torque if you do not use the speed coarse limitation, please configure with BRUSHLESS_MAX_SPEED
Definition at line 438 of file brushless.c.
References g_brushless_0_pwm_divider, g_brushless_0_torque, IRQ_LOCK, IRQ_UNLOCK, and pwm_previous_sensors_0.
Referenced by brushless_set_speed(), and brushless_set_torque().
void brushless_0_set_position | ( | brushless_position | p | ) |
sets the position counter
Definition at line 489 of file brushless.c.
References g_brushless_0_position_previous, IRQ_LOCK, IRQ_UNLOCK, and brushless::position.
brushless brushless_1_get_mesures | ( | void | ) |
Definition at line 634 of file brushless.c.
References IRQ_LOCK, and IRQ_UNLOCK.
Referenced by brushless_get_pos(), and brushless_get_speed().
void brushless_1_register_periodic_event | ( | void(*)(brushless) | f | ) |
Definition at line 673 of file brushless.c.
References parse_symbols::f, IRQ_LOCK, IRQ_UNLOCK, and periodic_event_1.
void brushless_1_set_parameters | ( | brushless_speed | speed, | |
brushless_torque | torque | |||
) |
Definition at line 588 of file brushless.c.
References g_brushless_1_pwm_divider, g_brushless_1_torque, IRQ_LOCK, IRQ_UNLOCK, and pwm_previous_sensors_1.
Referenced by brushless_set_speed(), and brushless_set_torque().
void brushless_1_set_position | ( | brushless_position | p | ) |
Definition at line 656 of file brushless.c.
References g_brushless_1_position_previous, IRQ_LOCK, IRQ_UNLOCK, and brushless::position.
int32_t brushless_get_pos | ( | void * | motor_num | ) |
get position function, compatible with control_system. Argument is the number of the adressed motor, which is casted to (void*)
get position function, compatible with control_system. Argument not used.
Definition at line 524 of file brushless.c.
References brushless_0_get_mesures(), brushless_1_get_mesures(), and brushless::position.
int32_t brushless_get_speed | ( | void * | motor_num | ) |
acess functions for the control system interface get speed function, compatible with control_system. Argument is the number of the adressed motor, which is casted to (void*)
acess functions for the control system interface get speed function, compatible with control_system. Argument not used.
Definition at line 514 of file brushless.c.
References brushless_0_get_mesures(), brushless_1_get_mesures(), and brushless::speed.
void brushless_init | ( | void | ) |
initialisation, also executes pwm_init
Definition at line 417 of file brushless.c.
References INIT_INT, pwm_init(), and sbi.
void brushless_set_speed | ( | void * | motor_num, | |
int32_t | speed | |||
) |
set speed function, compatible with control_system. Argument is the number of the adressed motor, which is casted to (void*)
set speed function, compatible with control_system. first argument not used.
Definition at line 540 of file brushless.c.
References brushless_0_set_parameters(), and brushless_1_set_parameters().
void brushless_set_torque | ( | void * | motor_num, | |
int32_t | torque | |||
) |
set torque function, compatible with control_system. Argument is the number of the adressed motor, which is casted to (void*)
set torque function, compatible with control_system. first argument not used.
Definition at line 534 of file brushless.c.
References brushless_0_set_parameters(), and brushless_1_set_parameters().