force4 2.0.0.0
Public function

Functions

void force4_cfg_setup (force4_cfg_t *cfg)
 Config Object Initialization function.
 
FORCE4_RETVAL force4_init (force4_t *ctx, force4_cfg_t *cfg)
 Initialization function.
 
void force4_generic_write (force4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void force4_generic_read (force4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint16_t force4_read_adc (force4_t *ctx)
 Function for reading 12bit ADC data from device.
 

Detailed Description

Function Documentation

◆ force4_cfg_setup()

void force4_cfg_setup ( force4_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.

◆ force4_generic_read()

void force4_generic_read ( force4_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.

◆ force4_generic_write()

void force4_generic_write ( force4_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.

◆ force4_init()

FORCE4_RETVAL force4_init ( force4_t * ctx,
force4_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ force4_read_adc()

uint16_t force4_read_adc ( force4_t * ctx)

Function for reading 12bit ADC data from device.

Parameters
ctxClick object.
Returns
Raw ADC data

@description This function reads 12bit ADC data from device