pressure3 2.0.0.0

Functions

void pressure3_cfg_setup (pressure3_cfg_t *cfg)
 Config Object Initialization function.
 
PRESSURE3_RETVAL pressure3_init (pressure3_t *ctx, pressure3_cfg_t *cfg)
 Initialization function.
 
void pressure3_default_cfg (pressure3_t *ctx)
 Click Default Configuration function.
 
void pressure3_generic_write (pressure3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void pressure3_generic_read (pressure3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void pressure3_get_t_p_data (pressure3_t *ctx, float *temperature, float *presure, pressure3_coeff_t *coeff_struct)
 Get temperature pressure.
 
void pressure3_get_coefficients (pressure3_t *ctx, pressure3_coeff_t *coeff_struct)
 Get coefficients.
 
int32_t pressure3_get_measurement_data (pressure3_t *ctx, uint8_t mbs_reg_addr)
 Read the coefficients value for calculation function.
 
void pressure3_set_pressure_configuration (pressure3_t *ctx, uint8_t press_config)
 Set the pressure configuration function.
 
uint8_t pressure3_get_pressure_configuration (pressure3_t *ctx)
 Get the pressure configuration function.
 
void pressure3_set_temperature_configuration (pressure3_t *ctx, uint8_t temp_config)
 Set the temperature configuration function.
 
uint8_t pressure3_get_temperature_configuration (pressure3_t *ctx)
 Get the temperature configuration function.
 
void pressure3_set_operating_mode (pressure3_t *ctx, uint8_t operation_mode)
 Get the sensor operating mode function.
 
uint8_t pressure3_get_operating_mode (pressure3_t *ctx)
 Get the sensor operating mode function.
 
void pressure3_set_configuration (pressure3_t *ctx, uint8_t confg_data)
 Set the configuration function.
 
uint8_t pressure3_get_configuration (pressure3_t *ctx)
 Get the configuration function.
 
uint8_t pressure3_get_interrupt_status (pressure3_t *ctx)
 Get the interrupt status function.
 
uint8_t pressure3_get_fifo_status (pressure3_t *ctx)
 Get the FIFO Status function.
 
void pressure3_soft_reset (pressure3_t *ctx)
 Soft reset function.
 

Detailed Description

Function Documentation

◆ pressure3_cfg_setup()

void pressure3_cfg_setup ( pressure3_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.

◆ pressure3_default_cfg()

void pressure3_default_cfg ( pressure3_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

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

◆ pressure3_generic_read()

void pressure3_generic_read ( pressure3_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.

@description This function reads data from the desired register.

◆ pressure3_generic_write()

void pressure3_generic_write ( pressure3_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

@description This function writes data to the desired register.

◆ pressure3_get_coefficients()

void pressure3_get_coefficients ( pressure3_t * ctx,
pressure3_coeff_t * coeff_struct )

Get coefficients.

Parameters
ctxClick object.
coeff_structStructure.

@description This function read the measurement data by read from the three target register address of DPS310 sensor on Pressure 3 click board.

◆ pressure3_get_configuration()

uint8_t pressure3_get_configuration ( pressure3_t * ctx)

Get the configuration function.

Parameters
ctxClick object.

@description This function get the configuration read the byte of data from the target _PRESSURE3_REG_CFG_REG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_get_fifo_status()

uint8_t pressure3_get_fifo_status ( pressure3_t * ctx)

Get the FIFO Status function.

Parameters
ctxClick object.

@description This function get the interrupt The FIFO is empty by read the byte of data from the target _PRESSURE3_REG_FIFO_STS register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_get_interrupt_status()

uint8_t pressure3_get_interrupt_status ( pressure3_t * ctx)

Get the interrupt status function.

Parameters
ctxClick object.

@description This function get the interrupt status by read the byte of data from the target _PRESSURE3_REG_INT_STS register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_get_measurement_data()

int32_t pressure3_get_measurement_data ( pressure3_t * ctx,
uint8_t mbs_reg_addr )

Read the coefficients value for calculation function.

Parameters
ctxClick object.
coeff_structStructure.

@description This function reads data from the desired register.

◆ pressure3_get_operating_mode()

uint8_t pressure3_get_operating_mode ( pressure3_t * ctx)

Get the sensor operating mode function.

Parameters
ctxClick object.

@description This function set the sensor operating mode by write operationMode data to the target _PRESSURE3_REG_MEAS_CFG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_get_pressure_configuration()

uint8_t pressure3_get_pressure_configuration ( pressure3_t * ctx)

Get the pressure configuration function.

Parameters
ctxClick object.

@description This function get the pressure configuration by read from the target _PRESSURE3_REG_PRS_CFG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_get_t_p_data()

void pressure3_get_t_p_data ( pressure3_t * ctx,
float * temperature,
float * presure,
pressure3_coeff_t * coeff_struct )

Get temperature pressure.

Parameters
ctxClick object.
temperaturepointer to float temperature value in degrees Celsius [ �C ].
presurepointer to float presure value [ mbar ].
coeff_structStructure.

@description This function reads data from the desired register.

◆ pressure3_get_temperature_configuration()

uint8_t pressure3_get_temperature_configuration ( pressure3_t * ctx)

Get the temperature configuration function.

Parameters
ctxClick object.

@description This function get the temperature configuration by write tempConfig data to the target _PRESSURE3_REG_TMP_CFG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_init()

PRESSURE3_RETVAL pressure3_init ( pressure3_t * ctx,
pressure3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ pressure3_set_configuration()

void pressure3_set_configuration ( pressure3_t * ctx,
uint8_t confg_data )

Set the configuration function.

Parameters
ctxClick object.

@description This function set the configuration by write confgData data to the target _PRESSURE3_REG_CFG_REG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_set_operating_mode()

void pressure3_set_operating_mode ( pressure3_t * ctx,
uint8_t operation_mode )

Get the sensor operating mode function.

Parameters
ctxClick object.

@description This function set the sensor operating mode by write operationMode data to the target _PRESSURE3_REG_MEAS_CFG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_set_pressure_configuration()

void pressure3_set_pressure_configuration ( pressure3_t * ctx,
uint8_t press_config )

Set the pressure configuration function.

Parameters
ctxClick object.
press_configpressConfig
  • [ bit7 ]
    • Reserved.
  • [ bit6 : bit4 ] Pressure measurement rate:
    • 000 : 1 measurements pr. sec.
    • 001 : 2 measurements pr. sec.
    • 010 : 4 measurements pr. sec.
    • 011 : 8 measurements pr. sec.
    • 100 : 16 measurements pr. sec.
    • 101 : 32 measurements pr. sec.
    • 110 : 64 measurements pr. sec.
    • 111 : 128 measurements pr. sec.
  • [ bit3 : bit0 ] Pressure oversampling rate:
    • 0000 : Single. (Low Precision)
    • 0001 : 2 times (Low Power).
    • 0010 : 4 times.
    • 0011 : 8 times.
    • 0100 : 16 times (Standard).
    • 0101 : 32 times.
    • 0110 : 64 times (High Precision).
    • 0111 : 128 times.
    • 1xxx : Reserved

@description This function set the pressure configuration by write pressConfig data to the target _PRESSURE3_REG_PRS_CFG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_set_temperature_configuration()

void pressure3_set_temperature_configuration ( pressure3_t * ctx,
uint8_t temp_config )

Set the temperature configuration function.

Parameters
ctxClick object.
temp_configtempConfig
  • [ bit7 ]
    • 0 : Internal sensor (in ASIC)
    • 1 : External sensor (in pressure sensor MEMS element)
  • [ bit6 : bit4 ] Temperature measurement rate:
    • 000 : 1 measurements pr. sec.
    • 001 : 2 measurements pr. sec.
    • 010 : 4 measurements pr. sec.
    • 011 : 8 measurements pr. sec.
    • 100 : 16 measurements pr. sec.
    • 101 : 32 measurements pr. sec.
    • 110 : 64 measurements pr. sec.
    • 111 : 128 measurements pr. sec.
  • [ bit3 : bit0 ] Temperature oversampling (precision):
    • 0000 : single. (Default) - Measurement time 3.6 ms.
    • 0001 : 2 times (Low Power).
    • 0010 : 4 times.
    • 0011 : 8 times.
    • 0100 : 16 times (Standard).
    • 0101 : 32 times.
    • 0110 : 64 times (High Precision).
    • 0111 : 128 times.
    • 1xxx : Reserved

@description This function set the temperature configuration by write tempConfig data to the target _PRESSURE3_REG_TMP_CFG register of DPS310 sensor on Pressure 3 click board.

◆ pressure3_soft_reset()

void pressure3_soft_reset ( pressure3_t * ctx)

Soft reset function.

Parameters
ctxClick object.

@description This function set soft reset by write 0x09 to the target _PRESSURE3_REG_RESET register of DPS310 sensor on Pressure 3 click board..