pressure9 2.0.0.0
Public function

Functions

void pressure9_cfg_setup (pressure9_cfg_t *cfg)
 Config Object Initialization function.
 
err_t pressure9_init (pressure9_t *ctx, pressure9_cfg_t *cfg)
 Initialization function.
 
void pressure9_default_cfg (pressure9_t *ctx)
 Click Default Configuration function.
 
void pressure9_generic_write (pressure9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void pressure9_generic_read (pressure9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void pressure9_configuration (pressure9_t *ctx, uint8_t reg_adr, uint8_t data_in)
 Writing data to the configuration registers.
 
int32_t pressure9_get_coefficients (pressure9_t *ctx, uint8_t coeff)
 Get calibration coefficients.
 
void pressure9_update_calc_coef (pressure9_t *ctx)
 Update all calibration coefficients.
 
int32_t pressure9_get_temperature_raw (pressure9_t *ctx)
 Get Temperature Raw data.
 
int32_t pressure9_get_pressure_raw (pressure9_t *ctx)
 Get Pressure Raw data.
 
float pressure9_get_pressure_data (pressure9_t *ctx)
 Get Pressure data in mBar.
 
float pressure9_get_temperature_data (pressure9_t *ctx)
 Get Temperature data in C.
 

Detailed Description

Function Documentation

◆ pressure9_cfg_setup()

void pressure9_cfg_setup ( pressure9_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.

◆ pressure9_configuration()

void pressure9_configuration ( pressure9_t * ctx,
uint8_t reg_adr,
uint8_t data_in )

Writing data to the configuration registers.

Parameters
ctxClick object.
regAddrConfiguration register address
dataInData that will be written in the register
Note
- Use this function when you want to write data to one of the configuration registers
  • Configuration registers: PRESSURE_CONFIG, TEMPERATURE_CONFIG, MEASUREMENT_CONFIG and CONFIGURATION

◆ pressure9_default_cfg()

void pressure9_default_cfg ( pressure9_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

This function executes default configuration for Pressure9 click.

◆ pressure9_generic_read()

void pressure9_generic_read ( pressure9_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.

◆ pressure9_generic_write()

void pressure9_generic_write ( pressure9_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.

◆ pressure9_get_coefficients()

int32_t pressure9_get_coefficients ( pressure9_t * ctx,
uint8_t coeff )

Get calibration coefficients.

Parameters
ctxClick object.
coeffCoefficient, which will be read
Returns
Calibration coefficients
Note
- This function allows you to read the calibration coefficient
  • Pressure coefficient or Temperature coefficient

◆ pressure9_get_pressure_data()

float pressure9_get_pressure_data ( pressure9_t * ctx)

Get Pressure data in mBar.

Parameters
ctxClick object.
Returns
Pressure data

◆ pressure9_get_pressure_raw()

int32_t pressure9_get_pressure_raw ( pressure9_t * ctx)

Get Pressure Raw data.

Parameters
ctxClick object.
Returns
24bit pressure raw data

◆ pressure9_get_temperature_data()

float pressure9_get_temperature_data ( pressure9_t * ctx)

Get Temperature data in C.

Parameters
ctxClick object.
Returns
Temperature data

◆ pressure9_get_temperature_raw()

int32_t pressure9_get_temperature_raw ( pressure9_t * ctx)

Get Temperature Raw data.

Parameters
ctxClick object.
Returns
24bit temperature raw data

◆ pressure9_init()

err_t pressure9_init ( pressure9_t * ctx,
pressure9_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ pressure9_update_calc_coef()

void pressure9_update_calc_coef ( pressure9_t * ctx)

Update all calibration coefficients.

Parameters
ctxClick object.
Note
- This function must be called before the measurement starts