hbridgedriver 2.0.0.0
H-Bridge Driver Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ hbridgedriver_braking()

void hbridgedriver_braking ( hbridgedriver_t * ctx)

H-Bridge mode braking function.

Function is used to brake the motor connected to the click board.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_cfg_setup()

void hbridgedriver_cfg_setup ( hbridgedriver_cfg_t * cfg)

H-Bridge Driver configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See hbridgedriver_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ hbridgedriver_coasting()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_brake_1()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_brake_2()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_bwd_1()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_bwd_2()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_coast_1()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_coast_2()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_fwd_1()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_dc_fwd_2()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_forward()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.

◆ hbridgedriver_glo_enable()

void hbridgedriver_glo_enable ( hbridgedriver_t * ctx,
uint8_t state )

Global enable function.

Function is used to turn the device on or off.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
[in]state: Value thet defines the state of the device.
Returns
Nothing.

◆ hbridgedriver_in_hs_1()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
[in]state: Value thet defines the state of the device.
Returns
Nothing.

◆ hbridgedriver_in_hs_2()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
[in]state: Value thet defines the state of the device.
Returns
Nothing.

◆ hbridgedriver_in_ls_1()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
[in]state: Value thet defines the state of the device.
Returns
Nothing.

◆ hbridgedriver_in_ls_2()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
[in]state: Value thet defines the state of the device.
Returns
Nothing.

◆ hbridgedriver_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ hbridgedriver_reverse()

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.

Parameters
[in]ctx: Click context object. See hbridgedriver_t object definition for detailed e0xplanation.
Returns
Nothing.