pressure4 2.0.0.0

Functions

void pressure4_cfg_setup (pressure4_cfg_t *cfg)
 Config Object Initialization function.
 
err_t pressure4_init (pressure4_t *ctx, pressure4_cfg_t *cfg)
 Initialization function.
 
void pressure4_default_cfg (pressure4_t *ctx)
 Click Default Configuration function.
 
void pressure4_generic_write (pressure4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void pressure4_generic_read (pressure4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void pressure4_write_reg_8_bit (pressure4_t *ctx, uint8_t w_reg, uint8_t w_data)
 8 bit writing function.
 
uint8_t pressure4_read_reg_8_bit (pressure4_t *ctx, uint8_t r_reg)
 8 bit reading function.
 
uint8_t pressure4_read_id (pressure4_t *ctx)
 Read ID function.
 
uint8_t pressure4_get_status (pressure4_t *ctx)
 Get status function.
 
float pressure4_get_temperature (pressure4_t *ctx)
 Get temperature function.
 
float pressure4_get_pressure (pressure4_t *ctx)
 Get pressure function.
 

Detailed Description

Function Documentation

◆ pressure4_cfg_setup()

void pressure4_cfg_setup ( pressure4_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ pressure4_default_cfg()

void pressure4_default_cfg ( pressure4_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

This function executes default configuration for Pressure 4 click.

◆ pressure4_generic_read()

void pressure4_generic_read ( pressure4_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

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

This function reads data from the desired register.

◆ pressure4_generic_write()

void pressure4_generic_write ( pressure4_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

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

This function writes data to the desired register.

◆ pressure4_get_pressure()

float pressure4_get_pressure ( pressure4_t * ctx)

Get pressure function.

Parameters
ctxClick object.

This function returning the calculated value of the pressure.

◆ pressure4_get_status()

uint8_t pressure4_get_status ( pressure4_t * ctx)

Get status function.

Parameters
ctxClick object.

This function returning the state of the status register.

◆ pressure4_get_temperature()

float pressure4_get_temperature ( pressure4_t * ctx)

Get temperature function.

Parameters
ctxClick object.

This function returning the calculated temperature value.

◆ pressure4_init()

err_t pressure4_init ( pressure4_t * ctx,
pressure4_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ pressure4_read_id()

uint8_t pressure4_read_id ( pressure4_t * ctx)

Read ID function.

Parameters
ctxClick object.

This function returns the contents of the chipid register.

◆ pressure4_read_reg_8_bit()

uint8_t pressure4_read_reg_8_bit ( pressure4_t * ctx,
uint8_t r_reg )

8 bit reading function.

Parameters
ctxClick object.
r_regRegister address.

This function reads 8 bit to Pressure 4 registers.

◆ pressure4_write_reg_8_bit()

void pressure4_write_reg_8_bit ( pressure4_t * ctx,
uint8_t w_reg,
uint8_t w_data )

8 bit writing function.

Parameters
ctxClick object.
w_regRegister address.
w_dataData to be written.

This function writes 8 bit to Pressure 4 registers.