brushless31
2.1.0.0
|
API for configuring and manipulating Brushless 31 Click driver. More...
Modules | |
Brushless 31 PWM Settings | |
Settings for configuration of Brushless 31 Click driver. | |
Brushless 31 MikroBUS Map | |
MikroBUS pin mapping of Brushless 31 Click driver. | |
Functions | |
void | brushless31_cfg_setup (brushless31_cfg_t *cfg) |
Brushless 31 configuration object setup function. More... | |
err_t | brushless31_init (brushless31_t *ctx, brushless31_cfg_t *cfg) |
Brushless 31 initialization function. More... | |
err_t | brushless31_default_cfg (brushless31_t *ctx) |
Brushless 31 default configuration function. More... | |
err_t | brushless31_set_duty_cycle (brushless31_t *ctx, float duty_cycle) |
Brushless 31 sets PWM duty cycle. More... | |
err_t | brushless31_pwm_stop (brushless31_t *ctx) |
Brushless 31 stop PWM module. More... | |
err_t | brushless31_pwm_start (brushless31_t *ctx) |
Brushless 31 start PWM module. More... | |
void | brushless31_set_direction (brushless31_t *ctx, uint8_t dir) |
Brushless 31 set direction function. More... | |
void | brushless31_switch_direction (brushless31_t *ctx) |
Brushless 31 switch direction function. More... | |
void | brushless31_pull_brake (brushless31_t *ctx) |
Brushless 31 pull brake function. More... | |
void | brushless31_release_brake (brushless31_t *ctx) |
Brushless 31 release brake function. More... | |
void | brushless31_start (brushless31_t *ctx) |
Brushless 31 start function. More... | |
void | brushless31_stop (brushless31_t *ctx) |
Brushless 31 stop function. More... | |
uint8_t | brushless31_get_hp_pin (brushless31_t *ctx) |
Brushless 31 get hp pin function. More... | |
API for configuring and manipulating Brushless 31 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless31_cfg_setup | ( | brushless31_cfg_t * | cfg | ) |
Brushless 31 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless31_cfg_t object definition for detailed explanation. |
err_t brushless31_default_cfg | ( | brushless31_t * | ctx | ) |
Brushless 31 default configuration function.
This function executes a default configuration of Brushless 31 Click board.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t brushless31_get_hp_pin | ( | brushless31_t * | ctx | ) |
Brushless 31 get hp pin function.
This function returns the hall pulse monitor pin logic state.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
err_t brushless31_init | ( | brushless31_t * | ctx, |
brushless31_cfg_t * | cfg | ||
) |
Brushless 31 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless31_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless31_pull_brake | ( | brushless31_t * | ctx | ) |
Brushless 31 pull brake function.
This function pulls brake by setting the BRAKE pin to low logic state.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
err_t brushless31_pwm_start | ( | brushless31_t * | ctx | ) |
Brushless 31 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless31_pwm_stop | ( | brushless31_t * | ctx | ) |
Brushless 31 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless31_release_brake | ( | brushless31_t * | ctx | ) |
Brushless 31 release brake function.
This function releases brake by setting the BRAKE pin to high logic state.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
void brushless31_set_direction | ( | brushless31_t * | ctx, |
uint8_t | dir | ||
) |
Brushless 31 set direction function.
This function sets the direction of motor rotation by setting the DIR pin logic state.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
[in] | dir | :
|
err_t brushless31_set_duty_cycle | ( | brushless31_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 31 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless31_start | ( | brushless31_t * | ctx | ) |
Brushless 31 start function.
This function starts motor by setting the START pin to high logic state.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
void brushless31_stop | ( | brushless31_t * | ctx | ) |
Brushless 31 stop function.
This function stops motor by setting the START pin to low logic state.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |
void brushless31_switch_direction | ( | brushless31_t * | ctx | ) |
Brushless 31 switch direction function.
This function switches the direction of motor rotation by toggling the DIR pin logic state.
[in] | ctx | : Click context object. See brushless31_t object definition for detailed explanation. |