brushless17
2.0.0.0
|
API for configuring and manipulating Brushless 17 Click driver. More...
Modules | |
Brushless 17 PWM Settings | |
Settings for configuration of Brushless 17 Click driver. | |
Brushless 17 MikroBUS Map | |
MikroBUS pin mapping of Brushless 17 Click driver. | |
Brushless17_cfg | |
Functions | |
void | brushless17_cfg_setup (brushless17_cfg_t *cfg) |
Brushless 17 configuration object setup function. More... | |
err_t | brushless17_init (brushless17_t *ctx, brushless17_cfg_t *cfg) |
Brushless 17 initialization function. More... | |
err_t | brushless17_default_cfg (brushless17_t *ctx) |
Brushless 17 default configuration function. More... | |
err_t | brushless17_set_duty_cycle (brushless17_t *ctx, float duty_cycle) |
Brushless 17 sets PWM duty cycle. More... | |
err_t | brushless17_pwm_stop (brushless17_t *ctx) |
Brushless 17 stop PWM module. More... | |
err_t | brushless17_pwm_start (brushless17_t *ctx) |
Brushless 17 start PWM module. More... | |
void | brushless17_enable_chip (brushless17_t *ctx) |
Brushless 17 enable chip function. More... | |
void | brushless17_disable_chip (brushless17_t *ctx) |
Brushless 17 disable chip function. More... | |
void | brushless17_set_direction (brushless17_t *ctx, uint8_t dir) |
Brushless 17 set direction function. More... | |
void | brushless17_switch_direction (brushless17_t *ctx) |
Brushless 17 switch direction function. More... | |
void | brushless17_pull_brake (brushless17_t *ctx) |
Brushless 17 pull brake function. More... | |
void | brushless17_release_brake (brushless17_t *ctx) |
Brushless 17 release brake function. More... | |
uint8_t | brushless17_get_diagnostic_pin (brushless17_t *ctx) |
Brushless 17 get diagnostic pin function. More... | |
API for configuring and manipulating Brushless 17 Click driver.
void brushless17_cfg_setup | ( | brushless17_cfg_t * | cfg | ) |
Brushless 17 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See brushless17_cfg_t object definition for detailed explanation. |
err_t brushless17_default_cfg | ( | brushless17_t * | ctx | ) |
Brushless 17 default configuration function.
This function executes a default configuration of Brushless 17 click board.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
0
- Success, -1
- Error.void brushless17_disable_chip | ( | brushless17_t * | ctx | ) |
Brushless 17 disable chip function.
This function disables the chip by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
void brushless17_enable_chip | ( | brushless17_t * | ctx | ) |
Brushless 17 enable chip function.
This function enables the chip by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
uint8_t brushless17_get_diagnostic_pin | ( | brushless17_t * | ctx | ) |
Brushless 17 get diagnostic pin function.
This function returns the DIAG pin logic state.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
0
- An overcurrent or overtemperature event has occured, 1
- Normal operation. err_t brushless17_init | ( | brushless17_t * | ctx, |
brushless17_cfg_t * | cfg | ||
) |
Brushless 17 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See brushless17_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void brushless17_pull_brake | ( | brushless17_t * | ctx | ) |
Brushless 17 pull brake function.
This function pulls brake by setting the BRK pin to low logic state.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
err_t brushless17_pwm_start | ( | brushless17_t * | ctx | ) |
Brushless 17 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t brushless17_pwm_stop | ( | brushless17_t * | ctx | ) |
Brushless 17 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
0
- Success, -1
- Error.void brushless17_release_brake | ( | brushless17_t * | ctx | ) |
Brushless 17 release brake function.
This function releases brake by setting the BRK pin to high logic state.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
void brushless17_set_direction | ( | brushless17_t * | ctx, |
uint8_t | dir | ||
) |
Brushless 17 set direction function.
This function sets the motor direction.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
[in] | dir |
|
err_t brushless17_set_duty_cycle | ( | brushless17_t * | ctx, |
float | duty_cycle | ||
) |
Brushless 17 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error.void brushless17_switch_direction | ( | brushless17_t * | ctx | ) |
Brushless 17 switch direction function.
This function switches the direction by toggling the DIR pin state.
[in] | ctx | : Click context object. See brushless17_t object definition for detailed explanation. |