hbridgedriver 2.0.0.0
|
API for configuring and manipulating H-Bridge Driver Click driver. More...
Topics | |
H-Bridge Driver Registers Settings | |
Settings for registers of H-Bridge Driver Click driver. | |
H-Bridge Driver MikroBUS Map | |
MikroBUS pin mapping of H-Bridge Driver Click driver. | |
Functions | |
void | hbridgedriver_cfg_setup (hbridgedriver_cfg_t *cfg) |
H-Bridge Driver configuration object setup function. | |
err_t | hbridgedriver_init (hbridgedriver_t *ctx, hbridgedriver_cfg_t *cfg) |
H-Bridge Driver initialization function. | |
void | hbridgedriver_glo_enable (hbridgedriver_t *ctx, uint8_t state) |
Global enable function. | |
void | hbridgedriver_in_ls_2 (hbridgedriver_t *ctx, uint8_t state) |
Input Low Side 2 function. | |
void | hbridgedriver_in_hs_2 (hbridgedriver_t *ctx, uint8_t state) |
Input High Side 2 function. | |
void | hbridgedriver_in_ls_1 (hbridgedriver_t *ctx, uint8_t state) |
Input Low Side 1 function. | |
void | hbridgedriver_in_hs_1 (hbridgedriver_t *ctx, uint8_t state) |
Input High Side 1 function. | |
void | hbridgedriver_dc_fwd_1 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 1 Foreward motion function. | |
void | hbridgedriver_dc_bwd_1 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 1 Backward motion function. | |
void | hbridgedriver_dc_coast_1 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 1 Coasting function. | |
void | hbridgedriver_dc_brake_1 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 1 Braking function. | |
void | hbridgedriver_dc_fwd_2 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 2 Foreward motion function. | |
void | hbridgedriver_dc_bwd_2 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 2 Backward motion function. | |
void | hbridgedriver_dc_coast_2 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 2 Coasting function. | |
void | hbridgedriver_dc_brake_2 (hbridgedriver_t *ctx) |
Motor Connected to HS/LS 2 Braking function. | |
void | hbridgedriver_reverse (hbridgedriver_t *ctx) |
H-Bridge mode reverse function. | |
void | hbridgedriver_forward (hbridgedriver_t *ctx) |
H-Bridge mode forward function. | |
void | hbridgedriver_braking (hbridgedriver_t *ctx) |
H-Bridge mode braking function. | |
void | hbridgedriver_coasting (hbridgedriver_t *ctx) |
H-Bridge mode coasting function. | |
API for configuring and manipulating H-Bridge Driver Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void hbridgedriver_braking | ( | hbridgedriver_t * | ctx | ) |
H-Bridge mode braking function.
Function is used to brake the motor connected to the click board.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_cfg_setup | ( | hbridgedriver_cfg_t * | cfg | ) |
H-Bridge Driver configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hbridgedriver_cfg_t object definition for detailed explanation. |
void hbridgedriver_coasting | ( | hbridgedriver_t * | ctx | ) |
H-Bridge mode coasting function.
Function is used to put the motor connected to the click board in coasting mode.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_brake_1 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 1 Braking function.
Function is used to put the motor connected to HS/LS 1 into braking mode.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_brake_2 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 2 Braking function.
Function is used to put the motor connected to HS/LS 2 into braking mode.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_bwd_1 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 1 Backward motion function.
Function is used to put the motor connected to HS/LS 1 into backward motion.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_bwd_2 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 2 Backward motion function.
Function is used to put the motor connected to HS/LS 2 into backward motion.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_coast_1 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 1 Coasting function.
Function is used to put the motor connected to HS/LS 1 into coasting mode.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_coast_2 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 2 Coasting function.
Function is used to put the motor connected to HS/LS 2 into coasting mode.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_fwd_1 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 1 Foreward motion function.
Function is used to put Connected to HS/LS 1 into foreward motion.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_dc_fwd_2 | ( | hbridgedriver_t * | ctx | ) |
Motor Connected to HS/LS 2 Foreward motion function.
Function is used to put the motor connected to HS/LS 2 into foreward motion.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_forward | ( | hbridgedriver_t * | ctx | ) |
H-Bridge mode forward function.
Function is used to put the motor connected to the click board in forward drive.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
void hbridgedriver_glo_enable | ( | hbridgedriver_t * | ctx, |
uint8_t | state ) |
Global enable function.
Function is used to turn the device on or off.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
[in] | state | : Value thet defines the state of the device. |
void hbridgedriver_in_hs_1 | ( | hbridgedriver_t * | ctx, |
uint8_t | state ) |
Input High Side 1 function.
Function is used to set the state of the 'IH1' pin.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
[in] | state | : Value thet defines the state of the device. |
void hbridgedriver_in_hs_2 | ( | hbridgedriver_t * | ctx, |
uint8_t | state ) |
Input High Side 2 function.
Function is used to set the state of the 'IH2' pin.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
[in] | state | : Value thet defines the state of the device. |
void hbridgedriver_in_ls_1 | ( | hbridgedriver_t * | ctx, |
uint8_t | state ) |
Input Low Side 1 function.
Function is used to set the state of the 'IL1' pin.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
[in] | state | : Value thet defines the state of the device. |
void hbridgedriver_in_ls_2 | ( | hbridgedriver_t * | ctx, |
uint8_t | state ) |
Input Low Side 2 function.
Function is used to set the state of the 'IL2' pin.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
[in] | state | : Value thet defines the state of the device. |
err_t hbridgedriver_init | ( | hbridgedriver_t * | ctx, |
hbridgedriver_cfg_t * | cfg ) |
H-Bridge Driver initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |
[in] | cfg | : Click configuration structure. See hbridgedriver_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void hbridgedriver_reverse | ( | hbridgedriver_t * | ctx | ) |
H-Bridge mode reverse function.
Function is used to put the motor connected to the click board in reverse drive.
[in] | ctx | : Click context object. See hbridgedriver_t object definition for detailed e0xplanation. |