brushless22 2.0.0.0
|
API for configuring and manipulating Brushless 22 Click driver. More...
Topics | |
Brushless 22 Settings | |
Settings for configuration of Brushless 22 Click driver. | |
Brushless 22 MikroBUS Map | |
MikroBUS pin mapping of Brushless 22 Click driver. | |
Brushless22_cfg | |
Functions | |
void | brushless22_cfg_setup (brushless22_cfg_t *cfg) |
Brushless 22 configuration object setup function. | |
err_t | brushless22_init (brushless22_t *ctx, brushless22_cfg_t *cfg) |
Brushless 22 initialization function. | |
err_t | brushless22_default_cfg (brushless22_t *ctx) |
Brushless 22 default configuration function. | |
err_t | brushless22_set_slew_rate_resistance (brushless22_t *ctx, uint16_t res_ohm) |
Brushless 22 set slew rate resistance function. | |
err_t | brushless22_set_rprog (brushless22_t *ctx, uint16_t res_ohm) |
Brushless 22 set rprog function. | |
err_t | brushless22_set_duty_cycle (brushless22_t *ctx, float duty_cycle) |
Brushless 22 sets PWM duty cycle. | |
err_t | brushless22_pwm_stop (brushless22_t *ctx) |
Brushless 22 stop PWM module. | |
err_t | brushless22_pwm_start (brushless22_t *ctx) |
Brushless 22 start PWM module. | |
void | brushless22_set_strong_start (brushless22_t *ctx) |
Brushless 22 set strong start function. | |
void | brushless22_set_soft_start (brushless22_t *ctx) |
Brushless 22 set soft start function. | |
void | brushless22_set_direction (brushless22_t *ctx, uint8_t dir) |
Brushless 22 set direction function. | |
void | brushless22_switch_direction (brushless22_t *ctx) |
Brushless 22 switch direction function. | |
void | brushless22_set_normal_regulation (brushless22_t *ctx) |
Brushless 22 set normal regulation function. | |
void | brushless22_set_low_load_regulation (brushless22_t *ctx) |
Brushless 22 set low load regulation function. | |
uint8_t | brushless22_get_fg_pin (brushless22_t *ctx) |
Brushless 22 get fd pin function. | |
API for configuring and manipulating Brushless 22 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless22_cfg_setup | ( | brushless22_cfg_t * | cfg | ) |
Brushless 22 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless22_cfg_t object definition for detailed explanation. |
err_t brushless22_default_cfg | ( | brushless22_t * | ctx | ) |
Brushless 22 default configuration function.
This function executes a default configuration of Brushless 22 click board.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t brushless22_get_fg_pin | ( | brushless22_t * | ctx | ) |
Brushless 22 get fd pin function.
This function returns the FD pin logic state.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
err_t brushless22_init | ( | brushless22_t * | ctx, |
brushless22_cfg_t * | cfg ) |
Brushless 22 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless22_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t brushless22_pwm_start | ( | brushless22_t * | ctx | ) |
Brushless 22 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t brushless22_pwm_stop | ( | brushless22_t * | ctx | ) |
Brushless 22 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
0
- Success, -1
- Error.void brushless22_set_direction | ( | brushless22_t * | ctx, |
uint8_t | dir ) |
Brushless 22 set direction function.
This function sets the motor direction.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
[in] | dir |
|
err_t brushless22_set_duty_cycle | ( | brushless22_t * | ctx, |
float | duty_cycle ) |
Brushless 22 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error.void brushless22_set_low_load_regulation | ( | brushless22_t * | ctx | ) |
Brushless 22 set low load regulation function.
This function sets the low load regulation by setting the RT pin to high logic state.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
void brushless22_set_normal_regulation | ( | brushless22_t * | ctx | ) |
Brushless 22 set normal regulation function.
This function sets the normal regulation by setting the RT pin to low logic state.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
err_t brushless22_set_rprog | ( | brushless22_t * | ctx, |
uint16_t | res_ohm ) |
Brushless 22 set rprog function.
This function sets the Rprog resistance by configuring the onboard digital potentiometer.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
[in] | res_ohm | : Resistance in Ohms (valid values are 3900 and 24000 only). |
0
- Success, -1
- Error.err_t brushless22_set_slew_rate_resistance | ( | brushless22_t * | ctx, |
uint16_t | res_ohm ) |
Brushless 22 set slew rate resistance function.
This function sets the slew rate resistance by configuring the onboard digital potentiometer.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
[in] | res_ohm | : Resistance in Ohms (valid values from 4700 to 47000). |
0
- Success, -1
- Error.void brushless22_set_soft_start | ( | brushless22_t * | ctx | ) |
Brushless 22 set soft start function.
This function sets the motor soft start by setting the SS pin to high logic state.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
void brushless22_set_strong_start | ( | brushless22_t * | ctx | ) |
Brushless 22 set strong start function.
This function sets the motor strong start by setting the SS pin to low logic state.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |
void brushless22_switch_direction | ( | brushless22_t * | ctx | ) |
Brushless 22 switch direction function.
This function switches the direction by toggling the DIR pin state.
[in] | ctx | : Click context object. See brushless22_t object definition for detailed explanation. |