capextend 2.0.0.0

Functions

void capextend_cfg_setup (capextend_cfg_t *cfg)
 Config Object Initialization function.
 
CAPEXTEND_RETVAL capextend_init (capextend_t *ctx, capextend_cfg_t *cfg)
 Initialization function.
 
void capextend_generic_write (capextend_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void capextend_generic_read (capextend_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
int8_t capextend_read_msb_buttons (capextend_t *ctx)
 Read MSB buttons function.
 
int8_t capextend_read_lsb_buttons (capextend_t *ctx)
 Read LSB buttons function.
 
uint16_t capextend_read_buttons (capextend_t *ctx)
 Read buttons function.
 
void capextend_reset (capextend_t *ctx)
 Reset function.
 
void capextend_set_rst_high (capextend_t *ctx)
 Set reset high function.
 
void capextend_set_rst_low (capextend_t *ctx)
 Set reset low function.
 
uint8_t capextend_get_int_input (capextend_t *ctx)
 Get interrupt input function.
 

Detailed Description

Function Documentation

◆ capextend_cfg_setup()

void capextend_cfg_setup ( capextend_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.

◆ capextend_generic_read()

void capextend_generic_read ( capextend_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.

◆ capextend_generic_write()

void capextend_generic_write ( capextend_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.

◆ capextend_get_int_input()

uint8_t capextend_get_int_input ( capextend_t * ctx)

Get interrupt input function.

Parameters
ctxClick object.

@description This function reads the input voltage on the interrupt pin.

◆ capextend_init()

CAPEXTEND_RETVAL capextend_init ( capextend_t * ctx,
capextend_cfg_t * cfg )

Initialization function.

Parameters
capextendClick object.
cfgClick configuration structure.

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

◆ capextend_read_buttons()

uint16_t capextend_read_buttons ( capextend_t * ctx)

Read buttons function.

Parameters
ctxClick object.
Return values
Returns12bit data of buttons state.

@description This function reads the button map data.

◆ capextend_read_lsb_buttons()

int8_t capextend_read_lsb_buttons ( capextend_t * ctx)

Read LSB buttons function.

Parameters
ctxClick object.

@description This function reads the LSB button map data.

◆ capextend_read_msb_buttons()

int8_t capextend_read_msb_buttons ( capextend_t * ctx)

Read MSB buttons function.

Parameters
ctxClick object.

@description This function reads the MSB button map data.

◆ capextend_reset()

void capextend_reset ( capextend_t * ctx)

Reset function.

Parameters
ctxClick object.

@description This function does a software reset of the click module.

◆ capextend_set_rst_high()

void capextend_set_rst_high ( capextend_t * ctx)

Set reset high function.

Parameters
ctxClick object.

@description This function sets the output voltage on the reset pin to high.

◆ capextend_set_rst_low()

void capextend_set_rst_low ( capextend_t * ctx)

Set reset low function.

Parameters
ctxClick object.

@description This function sets the output voltage on the reset pin to low.