hbridge2 2.0.0.0

Functions

void hbridge2_cfg_setup (hbridge2_cfg_t *cfg)
 Config Object Initialization function.
 
HBRIDGE2_RETVAL hbridge2_init (hbridge2_t *ctx, hbridge2_cfg_t *cfg)
 Initialization function.
 
uint8_t hbridge2_set_output (hbridge2_t *ctx, uint8_t out_state)
 Output Set function.
 
void hbridge2_enable (hbridge2_t *ctx, uint8_t state)
 Enable function.
 
void hbridge2_set_gout (hbridge2_t *ctx, uint8_t state)
 GOUT Set function.
 

Detailed Description

Function Documentation

◆ hbridge2_cfg_setup()

void hbridge2_cfg_setup ( hbridge2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ hbridge2_enable()

void hbridge2_enable ( hbridge2_t * ctx,
uint8_t state )

Enable function.

Parameters
ctxClick object.
state0 - Disable, 1 - Enable.
Note
When device is disabled all outputs (OUT1, OUT2, GOUT) is in logic low state.

@description Function puts the device in enable or disable state.

◆ hbridge2_init()

HBRIDGE2_RETVAL hbridge2_init ( hbridge2_t * ctx,
hbridge2_cfg_t * cfg )

Initialization function.

Parameters
hbridge2Click object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ hbridge2_set_gout()

void hbridge2_set_gout ( hbridge2_t * ctx,
uint8_t state )

GOUT Set function.

Parameters
ctxClick object.
state0 - GOUT is high, 1 - GOUT is low

@description Function controls the state of the GOUT pin (MOSFET GAIN).

◆ hbridge2_set_output()

uint8_t hbridge2_set_output ( hbridge2_t * ctx,
uint8_t out_state )

Output Set function.

Parameters
ctxClick object.
out_stateDetermines the state of OUT1 and OUT2.
Note
0b0000000x determines the state of OUT1, and 0b000000x0 determines the state of OUT2
Returns
0 - OK, 1 - Wrong parameter value

@description Function puts outputs (OUT1 (M1) and OUT2 (M2) ) to desired state.