pressure7 2.0.0.0

Functions

void pressure7_cfg_setup (pressure7_cfg_t *cfg)
 Config Object Initialization function.
 
PRESSURE7_RETVAL pressure7_init (pressure7_t *ctx, pressure7_cfg_t *cfg)
 Initialization function.
 
void pressure7_default_cfg (pressure7_t *ctx)
 Click Default Configuration function.
 
void pressure7_generic_read (pressure7_t *ctx, uint8_t reg_addr, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void pressure7_send_command (pressure7_t *ctx, uint8_t cmd)
 Send command to click.
 
void pressure7_reset (pressure7_t *ctx)
 Start reset sequence.
 
uint8_t pressure7_read_prom (pressure7_t *ctx)
 Read calibration data from PROM.
 
void pressure7_start_measurement (pressure7_t *ctx)
 Start measurement and calculation data.
 
void pressure7_get_sensor_data (pressure7_t *ctx, float *Temperature, float *Pressure)
 Read Pressure and Temperature data.
 
void pressure7_set_over_sampling_ratio (uint8_t osr_d1, uint8_t osr_d2)
 Set OSR(Over sampling ratio) for Pressure(D1) and Temperature(D2) data.
 

Detailed Description

Function Documentation

◆ pressure7_cfg_setup()

void pressure7_cfg_setup ( pressure7_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.

◆ pressure7_default_cfg()

void pressure7_default_cfg ( pressure7_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Pressure7 click.

◆ pressure7_generic_read()

void pressure7_generic_read ( pressure7_t * ctx,
uint8_t reg_addr,
uint8_t * data_buf,
uint8_t len )

Generic read function.

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

@description This function reads data from the desired register.

Generic read function.

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

@description This function reads data from the desired register.

◆ pressure7_get_sensor_data()

void pressure7_get_sensor_data ( pressure7_t * ctx,
float * Temperature,
float * Pressure )

Read Pressure and Temperature data.

Parameters
ctxClick object.
TemperatureOutput Temperature data in C
PressureOutput Pressure data in mBar

@description This function reads pressure and temperature data.

◆ pressure7_init()

PRESSURE7_RETVAL pressure7_init ( pressure7_t * ctx,
pressure7_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ pressure7_read_prom()

uint8_t pressure7_read_prom ( pressure7_t * ctx)

Read calibration data from PROM.

Parameters
ctxClick object.
Returns
CRC information: 0-ok, 1-error

@description This function must be performed at the beginning of the program in order to read the calibrated data from the PROM required to calculate the Pressure and Temperature measurement.

◆ pressure7_reset()

void pressure7_reset ( pressure7_t * ctx)

Start reset sequence.

Parameters
ctxClick object.

@description This function starts reset sequence of click object ctx.

◆ pressure7_send_command()

void pressure7_send_command ( pressure7_t * ctx,
uint8_t cmd )

Send command to click.

Parameters
ctxClick object.
cmdAction to be commited.

@description This function sends command cmd to click object ctx.

◆ pressure7_set_over_sampling_ratio()

void pressure7_set_over_sampling_ratio ( uint8_t osr_d1,
uint8_t osr_d2 )

Set OSR(Over sampling ratio) for Pressure(D1) and Temperature(D2) data.

Parameters
ctxClick object.
osr_d1OSR for Pressure data
osr_d2OSR for Temperature data
Note
OSR data (256,512,1024,2048,4095,8192)

@description This function sets OSR(Over sampling ratio) for Pressure(D1) and Temperature(D2) data.

◆ pressure7_start_measurement()

void pressure7_start_measurement ( pressure7_t * ctx)

Start measurement and calculation data.

Parameters
ctxClick object.
Note
This function are called at the beginning of each measurement before the function returns the Temperature and Pressure values. This function reads digital pressure and temperature data, then calculates these values with values read from the PROM. Before calling this function, you need to set OSR (Over sampling ratio) for Pressure(D1) and Temperature(D2) data.

@description This function starts measurement and calculation data.