brushless11 2.1.0.0
|
API for configuring and manipulating Brushless 11 Click driver. More...
Topics | |
Brushless 11 PWM Settings | |
Settings for configuration of Brushless 11 Click driver. | |
Brushless 11 MikroBUS Map | |
MikroBUS pin mapping of Brushless 11 Click driver. | |
Functions | |
void | brushless11_cfg_setup (brushless11_cfg_t *cfg) |
Brushless 11 configuration object setup function. | |
err_t | brushless11_init (brushless11_t *ctx, brushless11_cfg_t *cfg) |
Brushless 11 initialization function. | |
err_t | brushless11_default_cfg (brushless11_t *ctx) |
Brushless 11 default configuration function. | |
err_t | brushless11_set_duty_cycle (brushless11_t *ctx, float duty_cycle) |
Brushless 11 sets PWM duty cycle. | |
err_t | brushless11_pwm_stop (brushless11_t *ctx) |
Brushless 11 stop PWM module. | |
err_t | brushless11_pwm_start (brushless11_t *ctx) |
Brushless 11 start PWM module. | |
void | brushless11_set_brk_pin (brushless11_t *ctx, uint8_t pin_state) |
Brushless 11 set BRK pin state function. | |
uint8_t | brushless11_get_fg1_pin (brushless11_t *ctx) |
Brushless 11 get FG1 pin state function. | |
uint8_t | brushless11_get_fg2_pin (brushless11_t *ctx) |
Brushless 11 get FG2 pin state function. | |
void | brushless11_set_brake (brushless11_t *ctx, uint8_t brake_state) |
Brushless 11 set motor brake state function. | |
err_t | brushless11_set_speed (brushless11_t *ctx, uint8_t speed) |
Brushless 11 set motor speed. | |
API for configuring and manipulating Brushless 11 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless11_cfg_setup | ( | brushless11_cfg_t * | cfg | ) |
Brushless 11 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless11_cfg_t object definition for detailed explanation. |
err_t brushless11_default_cfg | ( | brushless11_t * | ctx | ) |
Brushless 11 default configuration function.
This function executes a default configuration of Brushless 11 click board.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t brushless11_get_fg1_pin | ( | brushless11_t * | ctx | ) |
Brushless 11 get FG1 pin state function.
This function is used to get state of the FG1 pin.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
0
- Pin state low, 1
- Pin state high. uint8_t brushless11_get_fg2_pin | ( | brushless11_t * | ctx | ) |
Brushless 11 get FG2 pin state function.
This function is used to get state of the FG2 pin.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
0
- Pin state low, 1
- Pin state high. err_t brushless11_init | ( | brushless11_t * | ctx, |
brushless11_cfg_t * | cfg ) |
Brushless 11 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless11_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless11_pwm_start | ( | brushless11_t * | ctx | ) |
Brushless 11 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless11_pwm_stop | ( | brushless11_t * | ctx | ) |
Brushless 11 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void brushless11_set_brake | ( | brushless11_t * | ctx, |
uint8_t | brake_state ) |
Brushless 11 set motor brake state function.
This function is used to set state of the motor brake.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
[in] | brake_state | : State of the motor brake. |
void brushless11_set_brk_pin | ( | brushless11_t * | ctx, |
uint8_t | pin_state ) |
Brushless 11 set BRK pin state function.
This function is used to set state of the BRK pin.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
[in] | pin_state | : State of the BRK pin. |
err_t brushless11_set_duty_cycle | ( | brushless11_t * | ctx, |
float | duty_cycle ) |
Brushless 11 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t brushless11_set_speed | ( | brushless11_t * | ctx, |
uint8_t | speed ) |
Brushless 11 set motor speed.
This function is used to set motor speed.
[in] | ctx | : Click context object. See brushless11_t object definition for detailed explanation. |
[in] | speed | : Motor speed. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.