hbridge8 2.0.0.0
|
API for configuring and manipulating H-Bridge 8 Click driver. More...
Topics | |
H-Bridge 8 PWM Settings | |
Settings for configuration of H-Bridge 8 Click driver. | |
H-Bridge 8 MikroBUS Map | |
MikroBUS pin mapping of H-Bridge 8 Click driver. | |
Mode | |
Hbridge8_cfg | |
Functions | |
void | hbridge8_cfg_setup (hbridge8_cfg_t *cfg) |
H-Bridge 8 configuration object setup function. | |
err_t | hbridge8_init (hbridge8_t *ctx, hbridge8_cfg_t *cfg) |
H-Bridge 8 initialization function. | |
err_t | hbridge8_default_cfg (hbridge8_t *ctx) |
H-Bridge 8 default configuration function. | |
err_t | hbridge8_set_duty_cycle (hbridge8_t *ctx, float duty_cycle) |
H-Bridge 8 sets PWM duty cycle. | |
err_t | hbridge8_pwm_stop (hbridge8_t *ctx) |
H-Bridge 8 stop PWM module. | |
err_t | hbridge8_pwm_start (hbridge8_t *ctx) |
H-Bridge 8 start PWM module. | |
err_t | hbridge8_set_mode (hbridge8_t *ctx, uint8_t mode) |
H-Bridge 8 set operating mode function. | |
err_t | hbridge8_enable (hbridge8_t *ctx) |
H-Bridge 8 set IC enable function. | |
err_t | hbridge8_disable (hbridge8_t *ctx) |
H-Bridge 8 set IC disable function. | |
uint8_t | hbridge8_get_fault_indication (hbridge8_t *ctx) |
H-Bridge 8 get fault indication function. | |
API for configuring and manipulating H-Bridge 8 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void hbridge8_cfg_setup | ( | hbridge8_cfg_t * | cfg | ) |
H-Bridge 8 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hbridge8_cfg_t object definition for detailed explanation. |
err_t hbridge8_default_cfg | ( | hbridge8_t * | ctx | ) |
H-Bridge 8 default configuration function.
This function executes a default configuration of H-Bridge 8 click board.
[in] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t hbridge8_disable | ( | hbridge8_t * | ctx | ) |
H-Bridge 8 set IC disable function.
This function sets the IC disable of the H-Bridge 8 click board™.
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t hbridge8_enable | ( | hbridge8_t * | ctx | ) |
H-Bridge 8 set IC enable function.
This function sets the IC enable of the H-Bridge 8 click board™.
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t hbridge8_get_fault_indication | ( | hbridge8_t * | ctx | ) |
H-Bridge 8 get fault indication function.
This function get fault indication of the H-Bridge 8 click board™.
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
0
- Fault conditions, 1
- Normal conditions.err_t hbridge8_init | ( | hbridge8_t * | ctx, |
hbridge8_cfg_t * | cfg ) |
H-Bridge 8 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hbridge8_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t hbridge8_pwm_start | ( | hbridge8_t * | ctx | ) |
H-Bridge 8 start PWM module.
This function starts the PWM moudle output.
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t hbridge8_pwm_stop | ( | hbridge8_t * | ctx | ) |
H-Bridge 8 stop PWM module.
This function stops the PWM moudle output.
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t hbridge8_set_duty_cycle | ( | hbridge8_t * | ctx, |
float | duty_cycle ) |
H-Bridge 8 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
[in] | duty_ratio | : PWM duty_ratio. |
0
- Success, -1
- Error.err_t hbridge8_set_mode | ( | hbridge8_t * | ctx, |
uint8_t | mode ) |
H-Bridge 8 set operating mode function.
This function sets the desired operating mode of the H-Bridge 8 click board™.
[out] | ctx | : Click context object. See hbridge8_t object definition for detailed explanation. |
[in] | mode | : Operating mode.
|
0
- Success, -1
- Error.