brushless4 2.0.0.0
|
Functions | |
void | brushless4_cfg_setup (brushless4_cfg_t *cfg) |
Config Object Initialization function. | |
BRUSHLESS4_RETVAL | brushless4_init (brushless4_t *ctx, brushless4_cfg_t *cfg) |
Initialization function. | |
void | brushless4_default_cfg (brushless4_t *ctx) |
Click Default Configuration function. | |
void | brushless4_set_duty_cycle (brushless4_t *ctx, float duty_cycle) |
Generic sets PWM duty cycle. | |
void | brushless4_pwm_stop (brushless4_t *ctx) |
Stop PWM module. | |
void | brushless4_pwm_start (brushless4_t *ctx) |
Start PWM module. | |
void | brushless4_motor_parameters (brushless4_t *ctx, uint8_t poles, uint8_t slots) |
Setting the number of poles and number of slots. | |
uint16_t | brushless4_get_speed (brushless4_t *ctx, uint16_t pulse_sample) |
Calculation of speed. | |
void | brushless4_pwm_pin (brushless4_t *ctx, uint8_t state) |
Set the state of the PWM pin. | |
uint8_t | brushless4_fg_get (brushless4_t *ctx) |
The state of the interrupt pin. | |
void brushless4_cfg_setup | ( | brushless4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void brushless4_default_cfg | ( | brushless4_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Brushless 4 click.
uint8_t brushless4_fg_get | ( | brushless4_t * | ctx | ) |
The state of the interrupt pin.
ctx | Click object. |
@description This function gets the state of the fg pin.
uint16_t brushless4_get_speed | ( | brushless4_t * | ctx, |
uint16_t | pulse_sample ) |
Calculation of speed.
ctx | Click object. |
pulse_sample | Number of samples. |
@description This function calculate the speed out of number of samples acumulated over a period of time.
BRUSHLESS4_RETVAL brushless4_init | ( | brushless4_t * | ctx, |
brushless4_cfg_t * | cfg ) |
Initialization function.
brushless4 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void brushless4_motor_parameters | ( | brushless4_t * | ctx, |
uint8_t | poles, | ||
uint8_t | slots ) |
Setting the number of poles and number of slots.
ctx | Click object. |
poles | Number of poles. |
slots | Number of slots. |
@description This function is used for setting the number of poles and number of slots.
void brushless4_pwm_pin | ( | brushless4_t * | ctx, |
uint8_t | state ) |
Set the state of the PWM pin.
ctx | Click object. |
state | Desired state to be set. |
@description This function sets the state of the PWM pin.
void brushless4_pwm_start | ( | brushless4_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
@description This function starts PWM module.
void brushless4_pwm_stop | ( | brushless4_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
@description This function stops PWM module.
void brushless4_set_duty_cycle | ( | brushless4_t * | ctx, |
float | duty_cycle ) |
Generic sets PWM duty cycle.
ctx | Click object. |
duty_cycle | Duty cycle. |
@description This function sets the PWM duty cycle.