pressure5 2.0.0.0

Functions

void pressure5_cfg_setup (pressure5_cfg_t *cfg)
 Config Object Initialization function.
 
PRESSURE5_RETVAL pressure5_init (pressure5_t *ctx, pressure5_cfg_t *cfg)
 Initialization function.
 
void pressure5_default_cfg (pressure5_t *ctx)
 Click Default Configuration function.
 
void pressure5_generic_write (pressure5_t *ctx, uint8_t reg, uint8_t reg_data)
 Generic write function.
 
uint8_t pressure5_generic_read (pressure5_t *ctx, uint8_t reg)
 Generic read function.
 
void pressure5_read (pressure5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Function for read more bytes from register.
 
uint8_t pressure5_get_interrupt_state (pressure5_t *ctx)
 Get Interrupt pin state.
 
void pressure5_software_reset (pressure5_t *ctx)
 Software Reset.
 
uint32_t pressure5_get_raw_data (pressure5_t *ctx, uint8_t data_addr)
 Get (Temperature or Pressure) Raw data.
 
void pressure5_update_coefficient (pressure5_t *ctx)
 Update calibration coefficients.
 
float pressure5_get_temperature_data (pressure5_t *ctx)
 Get Temperature data in C.
 
float pressure5_get_pressure_data (pressure5_t *ctx)
 Get Pressure data in mBar.
 

Detailed Description

Function Documentation

◆ pressure5_cfg_setup()

void pressure5_cfg_setup ( pressure5_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.

◆ pressure5_default_cfg()

void pressure5_default_cfg ( pressure5_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Pressure 5 click.

◆ pressure5_generic_read()

uint8_t pressure5_generic_read ( pressure5_t * ctx,
uint8_t reg )

Generic read function.

Parameters
ctxClick object.
regRegister address.

@description This function reads data from the desired register.

◆ pressure5_generic_write()

void pressure5_generic_write ( pressure5_t * ctx,
uint8_t reg,
uint8_t reg_data )

Generic write function.

Parameters
ctxClick object.
regRegister address.
reg_dataOutput data buf

@description This function writes data to the desired register.

◆ pressure5_get_interrupt_state()

uint8_t pressure5_get_interrupt_state ( pressure5_t * ctx)

Get Interrupt pin state.

Parameters
ctxClick object.
Returns
Interrupt state on the INT pin.

◆ pressure5_get_pressure_data()

float pressure5_get_pressure_data ( pressure5_t * ctx)

Get Pressure data in mBar.

Parameters
ctxClick object.
Returns
Pressure data

@description This function gets pressure in mBar.

◆ pressure5_get_raw_data()

uint32_t pressure5_get_raw_data ( pressure5_t * ctx,
uint8_t data_addr )

Get (Temperature or Pressure) Raw data.

Parameters
ctxClick object.
data_addrPressure(PRESSURE_RAW_DATA) or Temperature(TEMPERATURE_RAW_DATA) raw data.
Returns
24bit raw data.

@description This function reads raw data from click ctx.

◆ pressure5_get_temperature_data()

float pressure5_get_temperature_data ( pressure5_t * ctx)

Get Temperature data in C.

Parameters
ctxClick object.
Returns
Temperature data

@description This function gets temperature in Celsius.

◆ pressure5_init()

PRESSURE5_RETVAL pressure5_init ( pressure5_t * ctx,
pressure5_cfg_t * cfg )

Initialization function.

Parameters
pressure5Click object.
cfgClick configuration structure.

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

◆ pressure5_read()

void pressure5_read ( pressure5_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Function for read more bytes from register.

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

@description This function reads data from the desired register.

◆ pressure5_software_reset()

void pressure5_software_reset ( pressure5_t * ctx)

Software Reset.

Parameters
ctxClick object.

@description This function performs software reset of click ctx

◆ pressure5_update_coefficient()

void pressure5_update_coefficient ( pressure5_t * ctx)

Update calibration coefficients.

Parameters
ctxClick object.

@description This function allows you to update the calibration coefficient. Coefficients must be updated on the start program.