hbridge5 2.0.0.0

Functions

void hbridge5_cfg_setup (hbridge5_cfg_t *cfg)
 Config Object Initialization function.
 
HBRIDGE5_RETVAL hbridge5_init (hbridge5_t *ctx, hbridge5_cfg_t *cfg)
 Initialization function.
 
void hbridge5_default_cfg (hbridge5_t *ctx)
 Click Default Configuration function.
 
void hbridge5_generic_write (hbridge5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void hbridge5_generic_read (hbridge5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void hbridge5_rst_state (hbridge5_t *ctx, uint8_t state)
 Resets pin state.
 
uint8_t hbridge5_get_interrupt_state (hbridge5_t *ctx)
 Reads interrupt pin state.
 
uint8_t hbridge5_read_byte (hbridge5_t *ctx, uint8_t cmd)
 Function reads byte from register.
 
void hbridge5_write_byte (hbridge5_t *ctx, uint8_t cmd, uint8_t data_in)
 Function writes one byte in register.
 
void hbridge5_set_port (hbridge5_t *ctx, uint8_t port, uint8_t value)
 Function sets port.
 
void hbridge5_reverse (hbridge5_t *ctx)
 Puts motor into reverse motion.
 
void hbridge5_forward (hbridge5_t *ctx)
 Puts motor into forward motion.
 
void hbridge5_brake_low (hbridge5_t *ctx)
 Puts motor to a halt.
 
void hbridge5_brake_high (hbridge5_t *ctx)
 Puts motor to a halt.
 
void hbridge5_sync_decay_fwd (hbridge5_t *ctx)
 Synchronization fast decay foreward function.
 
void hbridge5_sync_decay_rev (hbridge5_t *ctx)
 Synchronization fast decay reverse function.
 
void hbridge5_sleep (hbridge5_t *ctx, uint8_t state)
 Sleep function.
 
void hbridge5_configuration (hbridge5_t *ctx, uint8_t cfg_data)
 Configuration function.
 
uint8_t hbridge5_n_fault_check (hbridge5_t *ctx)
 N fault check function.
 

Detailed Description

Function Documentation

◆ hbridge5_brake_high()

void hbridge5_brake_high ( hbridge5_t * ctx)

Puts motor to a halt.

Parameters
ctxClick object.

@description Function is used to brake motor to a halt.

◆ hbridge5_brake_low()

void hbridge5_brake_low ( hbridge5_t * ctx)

Puts motor to a halt.

Parameters
ctxClick object.

@description Function is used to brake motor to a halt.

◆ hbridge5_cfg_setup()

void hbridge5_cfg_setup ( hbridge5_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.

◆ hbridge5_configuration()

void hbridge5_configuration ( hbridge5_t * ctx,
uint8_t cfg_data )

Configuration function.

Parameters
ctxClick object.
cfg_dataConfiguration data.

@description Function is used to configure the device.

◆ hbridge5_default_cfg()

void hbridge5_default_cfg ( hbridge5_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for HBridge5 click.

◆ hbridge5_forward()

void hbridge5_forward ( hbridge5_t * ctx)

Puts motor into forward motion.

Parameters
ctxClick object.

@description Function is used to put motor into forward motion.

◆ hbridge5_generic_read()

void hbridge5_generic_read ( hbridge5_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ hbridge5_generic_write()

void hbridge5_generic_write ( hbridge5_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ hbridge5_get_interrupt_state()

uint8_t hbridge5_get_interrupt_state ( hbridge5_t * ctx)

Reads interrupt pin state.

Parameters
ctxClick object.

@description This function reads int_pin state.

◆ hbridge5_init()

HBRIDGE5_RETVAL hbridge5_init ( hbridge5_t * ctx,
hbridge5_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ hbridge5_n_fault_check()

uint8_t hbridge5_n_fault_check ( hbridge5_t * ctx)

N fault check function.

Parameters
ctxClick object.

@description Function is used to check n fault.

◆ hbridge5_read_byte()

uint8_t hbridge5_read_byte ( hbridge5_t * ctx,
uint8_t cmd )

Function reads byte from register.

Parameters
ctxClick object.
cmdCommand register which will be read.
Return values
onebyte data which is read from the register

@description This function reads one byte from register.

◆ hbridge5_reverse()

void hbridge5_reverse ( hbridge5_t * ctx)

Puts motor into reverse motion.

Parameters
ctxClick object.

@description Function is used to put motor into reverse motion.

◆ hbridge5_rst_state()

void hbridge5_rst_state ( hbridge5_t * ctx,
uint8_t state )

Resets pin state.

Parameters
ctxClick object.
state0 - pin cleared / 1 - pin set.

@description Function is used to set the state of RST pin in order to reset the device.

◆ hbridge5_set_port()

void hbridge5_set_port ( hbridge5_t * ctx,
uint8_t port,
uint8_t value )

Function sets port.

Parameters
ctxClick object.
portPort to be set up.
valueValue to which the selected port is being set.

@description This function sets port.

◆ hbridge5_sleep()

void hbridge5_sleep ( hbridge5_t * ctx,
uint8_t state )

Sleep function.

Parameters
ctxClick object.
state0 - pin cleared / 1 - pin set.

@description Function is used to put device into sleep mode or to wake it up.

◆ hbridge5_sync_decay_fwd()

void hbridge5_sync_decay_fwd ( hbridge5_t * ctx)

Synchronization fast decay foreward function.

Parameters
ctxClick object.

@description Function is used to apply synchronization fast decay.

◆ hbridge5_sync_decay_rev()

void hbridge5_sync_decay_rev ( hbridge5_t * ctx)

Synchronization fast decay reverse function.

Parameters
ctxClick object.

@description Function is used to apply synchronization fast decay.

◆ hbridge5_write_byte()

void hbridge5_write_byte ( hbridge5_t * ctx,
uint8_t cmd,
uint8_t data_in )

Function writes one byte in register.

Parameters
ctxClick object.
cmdCommand in which the data will be written.
data_inData which will be written in the register.

@description This function writes one byte in register.