brushless15 2.0.0.0
|
API for configuring and manipulating Brushless 15 Click driver. More...
Topics | |
Brushless 15 PWM Settings | |
Settings for configuration of Brushless 15 Click driver. | |
Brushless 15 MikroBUS Map | |
MikroBUS pin mapping of Brushless 15 Click driver. | |
Brushless15_cfg | |
Functions | |
void | brushless15_cfg_setup (brushless15_cfg_t *cfg) |
Brushless 15 configuration object setup function. | |
err_t | brushless15_init (brushless15_t *ctx, brushless15_cfg_t *cfg) |
Brushless 15 initialization function. | |
err_t | brushless15_default_cfg (brushless15_t *ctx) |
Brushless 15 default configuration function. | |
err_t | brushless15_set_duty_cycle (brushless15_t *ctx, float duty_cycle) |
Brushless 15 sets PWM duty cycle. | |
err_t | brushless15_pwm_stop (brushless15_t *ctx) |
Brushless 15 stop PWM module. | |
err_t | brushless15_pwm_start (brushless15_t *ctx) |
Brushless 15 start PWM module. | |
void | brushless15_enable_device (brushless15_t *ctx) |
Brushless 15 enable device function. | |
void | brushless15_disable_device (brushless15_t *ctx) |
Brushless 15 disable device function. | |
uint8_t | brushless15_get_int_pin (brushless15_t *ctx) |
Brushless 15 get int pin function. | |
void | brushless15_set_direction (brushless15_t *ctx, uint8_t direction) |
Brushless 15 set direction function. | |
void | brushless15_switch_direction (brushless15_t *ctx) |
Brushless 15 switch direction function. | |
API for configuring and manipulating Brushless 15 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void brushless15_cfg_setup | ( | brushless15_cfg_t * | cfg | ) |
Brushless 15 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless15_cfg_t object definition for detailed explanation. |
err_t brushless15_default_cfg | ( | brushless15_t * | ctx | ) |
Brushless 15 default configuration function.
This function executes a default configuration of Brushless 15 click board.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
0
- Success, -1
- Error.void brushless15_disable_device | ( | brushless15_t * | ctx | ) |
Brushless 15 disable device function.
This function disables the device by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
void brushless15_enable_device | ( | brushless15_t * | ctx | ) |
Brushless 15 enable device function.
This function enables the device by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
uint8_t brushless15_get_int_pin | ( | brushless15_t * | ctx | ) |
Brushless 15 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
err_t brushless15_init | ( | brushless15_t * | ctx, |
brushless15_cfg_t * | cfg ) |
Brushless 15 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless15_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t brushless15_pwm_start | ( | brushless15_t * | ctx | ) |
Brushless 15 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t brushless15_pwm_stop | ( | brushless15_t * | ctx | ) |
Brushless 15 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
0
- Success, -1
- Error.void brushless15_set_direction | ( | brushless15_t * | ctx, |
uint8_t | direction ) |
Brushless 15 set direction function.
This function sets the motor direction.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
[in] | direction | :
|
err_t brushless15_set_duty_cycle | ( | brushless15_t * | ctx, |
float | duty_cycle ) |
Brushless 15 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error.void brushless15_switch_direction | ( | brushless15_t * | ctx | ) |
Brushless 15 switch direction function.
This function switches the direction by toggling the DIR pin state.
[in] | ctx | : Click context object. See brushless15_t object definition for detailed explanation. |