hbridge3 2.0.0.0

Functions

void hbridge3_cfg_setup (hbridge3_cfg_t *cfg)
 Config Object Initialization function.
 
HBRIDGE3_RETVAL hbridge3_init (hbridge3_t *ctx, hbridge3_cfg_t *cfg)
 Initialization function.
 
void hbridge3_default_cfg (hbridge3_t *ctx, float duty_cycle)
 Click Default Configuration function.
 
void hbridge3_set_duty_cycle (hbridge3_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void hbridge3_pwm_stop (hbridge3_t *ctx)
 Stop PWM module.
 
void hbridge3_pwm_start (hbridge3_t *ctx)
 Start PWM module.
 
void hbridge3_dir_set (hbridge3_t *ctx, uint8_t pin_state)
 Setting AN pin state.
 
void hbridge3_dis_set (hbridge3_t *ctx, uint8_t pin_state)
 Setting RST pin state.
 
void hbridge3_cs_set (hbridge3_t *ctx, uint8_t pin_state)
 Setting CS pin state.
 
uint8_t hbridge3_spi (hbridge3_t *ctx, uint8_t spi_command)
 Sending SPI command.
 

Detailed Description

Function Documentation

◆ hbridge3_cfg_setup()

void hbridge3_cfg_setup ( hbridge3_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.

◆ hbridge3_cs_set()

void hbridge3_cs_set ( hbridge3_t * ctx,
uint8_t pin_state )

Setting CS pin state.

Parameters
ctxClick object.
pin_stateState of CS pin to be set (0 for LOW state and 1 for HIGH state)

@description This function sets CS pin state

◆ hbridge3_default_cfg()

void hbridge3_default_cfg ( hbridge3_t * ctx,
float duty_cycle )

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for HBridge3 click.

◆ hbridge3_dir_set()

void hbridge3_dir_set ( hbridge3_t * ctx,
uint8_t pin_state )

Setting AN pin state.

Parameters
ctxClick object.
pin_stateState of AN pin to be set (0 for LOW state and 1 for HIGH state)

@description This function sets AN pin state

◆ hbridge3_dis_set()

void hbridge3_dis_set ( hbridge3_t * ctx,
uint8_t pin_state )

Setting RST pin state.

Parameters
ctxClick object.
pin_stateState of RST pin to be set (0 for LOW state and 1 for HIGH state)

@description This function sets RST pin state

◆ hbridge3_init()

HBRIDGE3_RETVAL hbridge3_init ( hbridge3_t * ctx,
hbridge3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ hbridge3_pwm_start()

void hbridge3_pwm_start ( hbridge3_t * ctx)

Start PWM module.

Parameters
ctxClick object.

@description This function starts PWM module.

◆ hbridge3_pwm_stop()

void hbridge3_pwm_stop ( hbridge3_t * ctx)

Stop PWM module.

Parameters
ctxClick object.

@description This function stops PWM module.

◆ hbridge3_set_duty_cycle()

void hbridge3_set_duty_cycle ( hbridge3_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle.

◆ hbridge3_spi()

uint8_t hbridge3_spi ( hbridge3_t * ctx,
uint8_t spi_command )

Sending SPI command.

Parameters
ctxClick object.
spi_command- SPI command
Returns
SPI response to command sent

@description This function sends SPI command and receives response to command sent