test sending sensor results over lora radio. Accelerometer and temp/pressure.

Dependencies:   SX127x

Embed: (wiki syntax)

« Back to documentation index

Lps22hh

Lps22hh

This file provides a set of functions needed to drive the lps22hh enanced inertial module. More...

Modules

 ST_MEMS_common_types
 Lps22hh_interface
 Lps22hh_Infos
 Lps22hh_Sensitivity
 Interfaces_functions
 

This section provide a set of functions used to read and write a generic register of the device.


 Data_generation_c
 

This section groups all the functions concerning data generation.


 Data_output
 

This section groups all the data output functions.


 Common
 

This section groups common usefull functions.


 Filters
 

This section group all the functions concerning the filters configuration.


 Serial_interface
 

This section groups all the functions concerning serial interface management.


 Interrupt_pins
 

This section groups all the functions that manage interrupt pins.


 Interrupt_on_threshold
 

This section groups all the functions that manage the interrupt on threshold event generation.


 Fifo
 

This section group all the functions concerning the fifo usage.


Functions

int32_t lps22hh_read_reg (lps22hh_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
 Read generic device register.
int32_t lps22hh_write_reg (lps22hh_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
 Write generic device register.
int32_t lps22hh_autozero_rst_set (lps22hh_ctx_t *ctx, uint8_t val)
 autozero_rst: [set] Reset Autozero function.
int32_t lps22hh_autozero_rst_get (lps22hh_ctx_t *ctx, uint8_t *val)
 autozero_rst: [get] Reset Autozero function.
int32_t lps22hh_autozero_set (lps22hh_ctx_t *ctx, uint8_t val)
 autozero: [set] Enable Autozero function.
int32_t lps22hh_autozero_get (lps22hh_ctx_t *ctx, uint8_t *val)
 autozero: [get] Enable Autozero function.
int32_t lps22hh_pressure_snap_rst_set (lps22hh_ctx_t *ctx, uint8_t val)
 pressure_snap_rst: [set] Reset AutoRifP function.
int32_t lps22hh_pressure_snap_rst_get (lps22hh_ctx_t *ctx, uint8_t *val)
 pressure_snap_rst: [get] Reset AutoRifP function.
int32_t lps22hh_pressure_snap_set (lps22hh_ctx_t *ctx, uint8_t val)
 pressure_snap: [set] Enable AutoRifP function.
int32_t lps22hh_pressure_snap_get (lps22hh_ctx_t *ctx, uint8_t *val)
 pressure_snap: [get] Enable AutoRifP function.
int32_t lps22hh_block_data_update_set (lps22hh_ctx_t *ctx, uint8_t val)
 block_data_update: [set] Blockdataupdate.
int32_t lps22hh_block_data_update_get (lps22hh_ctx_t *ctx, uint8_t *val)
 block_data_update: [get] Blockdataupdate.
int32_t lps22hh_data_rate_set (lps22hh_ctx_t *ctx, lps22hh_odr_t val)
 data_rate: [set] Output data rate selection.
int32_t lps22hh_data_rate_get (lps22hh_ctx_t *ctx, lps22hh_odr_t *val)
 data_rate: [get] Output data rate selection.
int32_t lps22hh_pressure_ref_set (lps22hh_ctx_t *ctx, uint8_t *buff)
 pressure_ref: [set] The Reference pressure value is a 16-bit data expressed as 2’s complement.
int32_t lps22hh_pressure_ref_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 pressure_ref: [get] The Reference pressure value is a 16-bit data expressed as 2’s complement.
int32_t lps22hh_pressure_offset_set (lps22hh_ctx_t *ctx, uint8_t *buff)
 pressure_offset: [set] The pressure offset value is 16-bit data that can be used to implement one-point calibration (OPC) after soldering.
int32_t lps22hh_pressure_offset_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 pressure_offset: [get] The pressure offset value is 16-bit data that can be used to implement one-point calibration (OPC) after soldering.
int32_t lps22hh_all_sources_get (lps22hh_ctx_t *ctx, lps22hh_all_sources_t *val)
 all_sources: [get] Read all the interrupt/status flag of the device.
int32_t lps22hh_status_reg_get (lps22hh_ctx_t *ctx, lps22hh_status_t *val)
 status_reg: [get] The STATUS_REG register is read by the primary interface
int32_t lps22hh_press_flag_data_ready_get (lps22hh_ctx_t *ctx, uint8_t *val)
 press_flag_data_ready: [get] Pressure new data available.
int32_t lps22hh_temp_flag_data_ready_get (lps22hh_ctx_t *ctx, uint8_t *val)
 temp_flag_data_ready: [get] Temperature data available.
int32_t lps22hh_pressure_raw_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 pressure_raw: [get] Pressure output value.
int32_t lps22hh_temperature_raw_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 temperature_raw: [get] Temperature output value.
int32_t lps22hh_fifo_pressure_raw_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 fifo_pressure_raw: [get] Pressure output from FIFO value.
int32_t lps22hh_fifo_temperature_raw_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 fifo_temperature_raw: [get] Temperature output from FIFO value.
int32_t lps22hh_device_id_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 device_id: [get] DeviceWhoamI
int32_t lps22hh_reset_set (lps22hh_ctx_t *ctx, uint8_t val)
 reset: [set] Software reset.
int32_t lps22hh_reset_get (lps22hh_ctx_t *ctx, uint8_t *val)
 reset: [get] Software reset.
int32_t lps22hh_auto_increment_set (lps22hh_ctx_t *ctx, uint8_t val)
 auto_increment: [set] Register address automatically incremented during a multiple byte access with a serial interface.
int32_t lps22hh_auto_increment_get (lps22hh_ctx_t *ctx, uint8_t *val)
 auto_increment: [get] Register address automatically incremented during a multiple byte access with a serial interface.
int32_t lps22hh_boot_set (lps22hh_ctx_t *ctx, uint8_t val)
 boot: [set] Reboot memory content.
int32_t lps22hh_boot_get (lps22hh_ctx_t *ctx, uint8_t *val)
 boot: [get] Reboot memory content.
int32_t lps22hh_lp_bandwidth_set (lps22hh_ctx_t *ctx, lps22hh_lpfp_cfg_t val)
 lp_bandwidth: [set] Low-pass bandwidth selection.
int32_t lps22hh_lp_bandwidth_get (lps22hh_ctx_t *ctx, lps22hh_lpfp_cfg_t *val)
 lp_bandwidth: [get] Low-pass bandwidth selection.
int32_t lps22hh_i2c_interface_set (lps22hh_ctx_t *ctx, lps22hh_i2c_disable_t val)
 i2c_interface: [set] Enable/Disable I2C interface.
int32_t lps22hh_i2c_interface_get (lps22hh_ctx_t *ctx, lps22hh_i2c_disable_t *val)
 i2c_interface: [get] Enable/Disable I2C interface.
int32_t lps22hh_i3c_interface_set (lps22hh_ctx_t *ctx, lps22hh_i3c_disable_t val)
 i3c_interface: [set] I3C Enable/Disable communication protocol
int32_t lps22hh_i3c_interface_get (lps22hh_ctx_t *ctx, lps22hh_i3c_disable_t *val)
 i3c_interface: [get] I3C Enable/Disable communication protocol
int32_t lps22hh_sdo_sa0_mode_set (lps22hh_ctx_t *ctx, lps22hh_pu_en_t val)
 sdo_sa0_mode: [set] Enable/Disable pull-up on SDO pin.
int32_t lps22hh_sdo_sa0_mode_get (lps22hh_ctx_t *ctx, lps22hh_pu_en_t *val)
 sdo_sa0_mode: [get] Enable/Disable pull-up on SDO pin.
int32_t lps22hh_sda_mode_set (lps22hh_ctx_t *ctx, lps22hh_pu_en_t val)
 sda_mode: [set] Connect/Disconnect SDO/SA0 internal pull-up.
int32_t lps22hh_sda_mode_get (lps22hh_ctx_t *ctx, lps22hh_pu_en_t *val)
 sda_mode: [get] Connect/Disconnect SDO/SA0 internal pull-up.
int32_t lps22hh_spi_mode_set (lps22hh_ctx_t *ctx, lps22hh_sim_t val)
 spi_mode: [set] SPI Serial Interface Mode selection.
int32_t lps22hh_spi_mode_get (lps22hh_ctx_t *ctx, lps22hh_sim_t *val)
 spi_mode: [get] SPI Serial Interface Mode selection.
int32_t lps22hh_int_notification_set (lps22hh_ctx_t *ctx, lps22hh_lir_t val)
 int_notification: [set] Latch interrupt request to the INT_SOURCE (24h) register.
int32_t lps22hh_int_notification_get (lps22hh_ctx_t *ctx, lps22hh_lir_t *val)
 int_notification: [get] Latch interrupt request to the INT_SOURCE (24h) register.
int32_t lps22hh_pin_mode_set (lps22hh_ctx_t *ctx, lps22hh_pp_od_t val)
 pin_mode: [set] Push-pull/open drain selection on interrupt pads.
int32_t lps22hh_pin_mode_get (lps22hh_ctx_t *ctx, lps22hh_pp_od_t *val)
 pin_mode: [get] Push-pull/open drain selection on interrupt pads.
int32_t lps22hh_pin_polarity_set (lps22hh_ctx_t *ctx, lps22hh_int_h_l_t val)
 pin_polarity: [set] Interrupt active-high/low.
int32_t lps22hh_pin_polarity_get (lps22hh_ctx_t *ctx, lps22hh_int_h_l_t *val)
 pin_polarity: [get] Interrupt active-high/low.
int32_t lps22hh_pin_int_route_set (lps22hh_ctx_t *ctx, lps22hh_ctrl_reg3_t *val)
 pin_int_route: [set] Select the signal that need to route on int pad
int32_t lps22hh_pin_int_route_get (lps22hh_ctx_t *ctx, lps22hh_ctrl_reg3_t *val)
 pin_int_route: [get] Select the signal that need to route on int pad
int32_t lps22hh_int_on_threshold_set (lps22hh_ctx_t *ctx, lps22hh_pe_t val)
 int_on_threshold: [set] Enable interrupt generation on pressure low/high event.
int32_t lps22hh_int_on_threshold_get (lps22hh_ctx_t *ctx, lps22hh_pe_t *val)
 int_on_threshold: [get] Enable interrupt generation on pressure low/high event.
int32_t lps22hh_int_treshold_set (lps22hh_ctx_t *ctx, uint8_t *buff)
 int_treshold: [set] User-defined threshold value for pressure interrupt event.
int32_t lps22hh_int_treshold_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 int_treshold: [get] User-defined threshold value for pressure interrupt event.
int32_t lps22hh_fifo_mode_set (lps22hh_ctx_t *ctx, lps22hh_f_mode_t val)
 fifo_mode: [set]
int32_t lps22hh_fifo_mode_get (lps22hh_ctx_t *ctx, lps22hh_f_mode_t *val)
 fifo_mode: [get]
int32_t lps22hh_fifo_stop_on_wtm_set (lps22hh_ctx_t *ctx, uint8_t val)
 fifo_stop_on_wtm: [set] Sensing chain FIFO stop values memorization at threshold level.
int32_t lps22hh_fifo_stop_on_wtm_get (lps22hh_ctx_t *ctx, uint8_t *val)
 fifo_stop_on_wtm: [get] Sensing chain FIFO stop values memorization at threshold level.
int32_t lps22hh_fifo_watermark_set (lps22hh_ctx_t *ctx, uint8_t val)
 fifo_watermark: [set] FIFO watermark level selection.
int32_t lps22hh_fifo_watermark_get (lps22hh_ctx_t *ctx, uint8_t *val)
 fifo_watermark: [get] FIFO watermark level selection.
int32_t lps22hh_fifo_data_level_get (lps22hh_ctx_t *ctx, uint8_t *buff)
 fifo_data_level: [get] FIFO stored data level.
int32_t lps22hh_fifo_src_get (lps22hh_ctx_t *ctx, lps22hh_fifo_status2_t *val)
 fifo_src: [get] Read all the FIFO status flag of the device.
int32_t lps22hh_fifo_full_flag_get (lps22hh_ctx_t *ctx, uint8_t *val)
 fifo_full_flag: [get] Smart FIFO full status.
int32_t lps22hh_fifo_ovr_flag_get (lps22hh_ctx_t *ctx, uint8_t *val)
 fifo_ovr_flag: [get] FIFO overrun status.
int32_t lps22hh_fifo_wtm_flag_get (lps22hh_ctx_t *ctx, uint8_t *val)
 fifo_wtm_flag: [get] FIFO watermark status.

Detailed Description

This file provides a set of functions needed to drive the lps22hh enanced inertial module.


Function Documentation

int32_t lps22hh_all_sources_get ( lps22hh_ctx_t *  ctx,
lps22hh_all_sources_t *  val 
)

all_sources: [get] Read all the interrupt/status flag of the device.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_all_sources,:registers STATUS,FIFO_STATUS2,INT_SOURCE

Definition at line 383 of file LPS22HH_Driver.c.

int32_t lps22hh_auto_increment_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

auto_increment: [get] Register address automatically incremented during a multiple byte access with a serial interface.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of if_add_inc in reg CTRL_REG2

Definition at line 596 of file LPS22HH_Driver.c.

int32_t lps22hh_auto_increment_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

auto_increment: [set] Register address automatically incremented during a multiple byte access with a serial interface.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of if_add_inc in reg CTRL_REG2

Definition at line 575 of file LPS22HH_Driver.c.

int32_t lps22hh_autozero_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

autozero: [get] Enable Autozero function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of autozero in reg INTERRUPT_CFG

Definition at line 155 of file LPS22HH_Driver.c.

int32_t lps22hh_autozero_rst_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

autozero_rst: [get] Reset Autozero function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of reset_az in reg INTERRUPT_CFG

Definition at line 118 of file LPS22HH_Driver.c.

int32_t lps22hh_autozero_rst_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

autozero_rst: [set] Reset Autozero function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of reset_az in reg INTERRUPT_CFG

Definition at line 99 of file LPS22HH_Driver.c.

int32_t lps22hh_autozero_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

autozero: [set] Enable Autozero function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of autozero in reg INTERRUPT_CFG

Definition at line 136 of file LPS22HH_Driver.c.

int32_t lps22hh_block_data_update_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

block_data_update: [get] Blockdataupdate.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of bdu in reg CTRL_REG1

Definition at line 266 of file LPS22HH_Driver.c.

int32_t lps22hh_block_data_update_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

block_data_update: [set] Blockdataupdate.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of bdu in reg CTRL_REG1

Definition at line 247 of file LPS22HH_Driver.c.

int32_t lps22hh_boot_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

boot: [get] Reboot memory content.

Reload the calibration parameters.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of boot in reg CTRL_REG2

Definition at line 635 of file LPS22HH_Driver.c.

int32_t lps22hh_boot_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

boot: [set] Reboot memory content.

Reload the calibration parameters.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of boot in reg CTRL_REG2

Definition at line 615 of file LPS22HH_Driver.c.

int32_t lps22hh_data_rate_get ( lps22hh_ctx_t *  ctx,
lps22hh_odr_t *  val 
)

data_rate: [get] Output data rate selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_odr_t,:Get the values of odr in reg CTRL_REG1

Definition at line 305 of file LPS22HH_Driver.c.

int32_t lps22hh_data_rate_set ( lps22hh_ctx_t *  ctx,
lps22hh_odr_t  val 
)

data_rate: [set] Output data rate selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_odr_t,:change the values of odr in reg CTRL_REG1

Definition at line 284 of file LPS22HH_Driver.c.

int32_t lps22hh_device_id_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

device_id: [get] DeviceWhoamI

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 522 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_data_level_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

fifo_data_level: [get] FIFO stored data level.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 1270 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_full_flag_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

fifo_full_flag: [get] Smart FIFO full status.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of f_full in reg FIFO_STATUS2

Definition at line 1294 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_mode_get ( lps22hh_ctx_t *  ctx,
lps22hh_f_mode_t *  val 
)

fifo_mode: [get]

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_f_mode_t,:Get the values of f_mode in reg FIFO_CTRL

Definition at line 1176 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_mode_set ( lps22hh_ctx_t *  ctx,
lps22hh_f_mode_t  val 
)

fifo_mode: [set]

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_f_mode_t,:change the values of f_mode in reg FIFO_CTRL

Definition at line 1157 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_ovr_flag_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

fifo_ovr_flag: [get] FIFO overrun status.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of ovr in reg FIFO_STATUS2

Definition at line 1312 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_pressure_raw_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

fifo_pressure_raw: [get] Pressure output from FIFO value.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 488 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_src_get ( lps22hh_ctx_t *  ctx,
lps22hh_fifo_status2_t *  val 
)

fifo_src: [get] Read all the FIFO status flag of the device.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_,:union of registers from FIFO_STATUS2 to

Definition at line 1282 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_stop_on_wtm_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

fifo_stop_on_wtm: [get] Sensing chain FIFO stop values memorization at threshold level.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of stop_on_fth in reg FIFO_CTRL

Definition at line 1215 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_stop_on_wtm_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

fifo_stop_on_wtm: [set] Sensing chain FIFO stop values memorization at threshold level.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of stop_on_fth in reg FIFO_CTRL

Definition at line 1195 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_temperature_raw_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

fifo_temperature_raw: [get] Temperature output from FIFO value.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 500 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_watermark_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

fifo_watermark: [get] FIFO watermark level selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of wtm in reg FIFO_WTM

Definition at line 1252 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_watermark_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

fifo_watermark: [set] FIFO watermark level selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of wtm in reg FIFO_WTM

Definition at line 1233 of file LPS22HH_Driver.c.

int32_t lps22hh_fifo_wtm_flag_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

fifo_wtm_flag: [get] FIFO watermark status.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of fth_fifo in reg FIFO_STATUS2

Definition at line 1330 of file LPS22HH_Driver.c.

int32_t lps22hh_i2c_interface_get ( lps22hh_ctx_t *  ctx,
lps22hh_i2c_disable_t *  val 
)

i2c_interface: [get] Enable/Disable I2C interface.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_i2c_disable_t,:Get the values of i2c_disable in reg IF_CTRL

Definition at line 735 of file LPS22HH_Driver.c.

int32_t lps22hh_i2c_interface_set ( lps22hh_ctx_t *  ctx,
lps22hh_i2c_disable_t  val 
)

i2c_interface: [set] Enable/Disable I2C interface.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_i2c_disable_t,:change the values of i2c_disable in reg IF_CTRL

Definition at line 714 of file LPS22HH_Driver.c.

int32_t lps22hh_i3c_interface_get ( lps22hh_ctx_t *  ctx,
lps22hh_i3c_disable_t *  val 
)

i3c_interface: [get] I3C Enable/Disable communication protocol

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_i3c_disable_t,:change the values of int_en_i3c in reg IF_CTRL

Definition at line 777 of file LPS22HH_Driver.c.

int32_t lps22hh_i3c_interface_set ( lps22hh_ctx_t *  ctx,
lps22hh_i3c_disable_t  val 
)

i3c_interface: [set] I3C Enable/Disable communication protocol

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tlps22hh_i3c_disable_t: change the values of int_en_i3c in reg IF_CTRL

Definition at line 755 of file LPS22HH_Driver.c.

int32_t lps22hh_int_notification_get ( lps22hh_ctx_t *  ctx,
lps22hh_lir_t *  val 
)

int_notification: [get] Latch interrupt request to the INT_SOURCE (24h) register.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_lir_t,:Get the values of lir in reg INTERRUPT_CFG

Definition at line 941 of file LPS22HH_Driver.c.

int32_t lps22hh_int_notification_set ( lps22hh_ctx_t *  ctx,
lps22hh_lir_t  val 
)

int_notification: [set] Latch interrupt request to the INT_SOURCE (24h) register.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_lir_t,:change the values of lir in reg INTERRUPT_CFG

Definition at line 921 of file LPS22HH_Driver.c.

int32_t lps22hh_int_on_threshold_get ( lps22hh_ctx_t *  ctx,
lps22hh_pe_t *  val 
)

int_on_threshold: [get] Enable interrupt generation on pressure low/high event.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_pe_t,:Get the values of pe in reg INTERRUPT_CFG

Definition at line 1103 of file LPS22HH_Driver.c.

int32_t lps22hh_int_on_threshold_set ( lps22hh_ctx_t *  ctx,
lps22hh_pe_t  val 
)

int_on_threshold: [set] Enable interrupt generation on pressure low/high event.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_pe_t,:change the values of pe in reg INTERRUPT_CFG

Definition at line 1073 of file LPS22HH_Driver.c.

int32_t lps22hh_int_treshold_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

int_treshold: [get] User-defined threshold value for pressure interrupt event.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 1135 of file LPS22HH_Driver.c.

int32_t lps22hh_int_treshold_set ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

int_treshold: [set] User-defined threshold value for pressure interrupt event.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that contains data to write

Definition at line 1122 of file LPS22HH_Driver.c.

int32_t lps22hh_lp_bandwidth_get ( lps22hh_ctx_t *  ctx,
lps22hh_lpfp_cfg_t *  val 
)

lp_bandwidth: [get] Low-pass bandwidth selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_lpfp_cfg_t,:Get the values of lpfp_cfg in reg CTRL_REG1

Definition at line 684 of file LPS22HH_Driver.c.

int32_t lps22hh_lp_bandwidth_set ( lps22hh_ctx_t *  ctx,
lps22hh_lpfp_cfg_t  val 
)

lp_bandwidth: [set] Low-pass bandwidth selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_lpfp_cfg_t,:change the values of lpfp_cfg in reg CTRL_REG1

Definition at line 665 of file LPS22HH_Driver.c.

int32_t lps22hh_pin_int_route_get ( lps22hh_ctx_t *  ctx,
lps22hh_ctrl_reg3_t *  val 
)

pin_int_route: [get] Select the signal that need to route on int pad

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_,:registers CTRL_REG3

Definition at line 1048 of file LPS22HH_Driver.c.

int32_t lps22hh_pin_int_route_set ( lps22hh_ctx_t *  ctx,
lps22hh_ctrl_reg3_t *  val 
)

pin_int_route: [set] Select the signal that need to route on int pad

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_,:registers CTRL_REG3

Definition at line 1034 of file LPS22HH_Driver.c.

int32_t lps22hh_pin_mode_get ( lps22hh_ctx_t *  ctx,
lps22hh_pp_od_t *  val 
)

pin_mode: [get] Push-pull/open drain selection on interrupt pads.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_pp_od_t,:Get the values of pp_od in reg CTRL_REG2

Definition at line 978 of file LPS22HH_Driver.c.

int32_t lps22hh_pin_mode_set ( lps22hh_ctx_t *  ctx,
lps22hh_pp_od_t  val 
)

pin_mode: [set] Push-pull/open drain selection on interrupt pads.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_pp_od_t,:change the values of pp_od in reg CTRL_REG2

Definition at line 959 of file LPS22HH_Driver.c.

int32_t lps22hh_pin_polarity_get ( lps22hh_ctx_t *  ctx,
lps22hh_int_h_l_t *  val 
)

pin_polarity: [get] Interrupt active-high/low.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_int_h_l_t,:Get the values of int_h_l in reg CTRL_REG2

Definition at line 1015 of file LPS22HH_Driver.c.

int32_t lps22hh_pin_polarity_set ( lps22hh_ctx_t *  ctx,
lps22hh_int_h_l_t  val 
)

pin_polarity: [set] Interrupt active-high/low.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_int_h_l_t,:change the values of int_h_l in reg CTRL_REG2

Definition at line 996 of file LPS22HH_Driver.c.

int32_t lps22hh_press_flag_data_ready_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

press_flag_data_ready: [get] Pressure new data available.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of p_da in reg STATUS

Definition at line 418 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_offset_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

pressure_offset: [get] The pressure offset value is 16-bit data that can be used to implement one-point calibration (OPC) after soldering.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 370 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_offset_set ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

pressure_offset: [set] The pressure offset value is 16-bit data that can be used to implement one-point calibration (OPC) after soldering.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that contains data to write

Definition at line 355 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_raw_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

pressure_raw: [get] Pressure output value.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 464 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_ref_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

pressure_ref: [get] The Reference pressure value is a 16-bit data expressed as 2’s complement.

The value is used when AUTOZERO or AUTORIFP function is enabled.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 341 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_ref_set ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

pressure_ref: [set] The Reference pressure value is a 16-bit data expressed as 2’s complement.

The value is used when AUTOZERO or AUTORIFP function is enabled.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that contains data to write

Definition at line 326 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_snap_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

pressure_snap: [get] Enable AutoRifP function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of autorifp in reg INTERRUPT_CFG

Definition at line 229 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_snap_rst_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

pressure_snap_rst: [get] Reset AutoRifP function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of reset_arp in reg INTERRUPT_CFG

Definition at line 192 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_snap_rst_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

pressure_snap_rst: [set] Reset AutoRifP function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of reset_arp in reg INTERRUPT_CFG

Definition at line 173 of file LPS22HH_Driver.c.

int32_t lps22hh_pressure_snap_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

pressure_snap: [set] Enable AutoRifP function.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of autorifp in reg INTERRUPT_CFG

Definition at line 210 of file LPS22HH_Driver.c.

int32_t lps22hh_read_reg ( lps22hh_ctx_t *  ctx,
uint8_t  reg,
uint8_t *  data,
uint16_t  len 
)

Read generic device register.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_treg: register to read
uint8_t*data: pointer to buffer that store the data read
uint16_tlen: number of consecutive register to read

Definition at line 61 of file LPS22HH_Driver.c.

int32_t lps22hh_reset_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

reset: [get] Software reset.

Restore the default values in user registers.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of swreset in reg CTRL_REG2

Definition at line 555 of file LPS22HH_Driver.c.

int32_t lps22hh_reset_set ( lps22hh_ctx_t *  ctx,
uint8_t  val 
)

reset: [set] Software reset.

Restore the default values in user registers.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_tval: change the values of swreset in reg CTRL_REG2

Definition at line 535 of file LPS22HH_Driver.c.

int32_t lps22hh_sda_mode_get ( lps22hh_ctx_t *  ctx,
lps22hh_pu_en_t *  val 
)

sda_mode: [get] Connect/Disconnect SDO/SA0 internal pull-up.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_sda_pu_en_t,:Get the values of sda_pu_en in reg IF_CTRL

Definition at line 855 of file LPS22HH_Driver.c.

int32_t lps22hh_sda_mode_set ( lps22hh_ctx_t *  ctx,
lps22hh_pu_en_t  val 
)

sda_mode: [set] Connect/Disconnect SDO/SA0 internal pull-up.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_sda_pu_en_t,:change the values of sda_pu_en in reg IF_CTRL

Definition at line 836 of file LPS22HH_Driver.c.

int32_t lps22hh_sdo_sa0_mode_get ( lps22hh_ctx_t *  ctx,
lps22hh_pu_en_t *  val 
)

sdo_sa0_mode: [get] Enable/Disable pull-up on SDO pin.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_sdo_pu_en_t,:Get the values of sdo_pu_en in reg IF_CTRL

Definition at line 817 of file LPS22HH_Driver.c.

int32_t lps22hh_sdo_sa0_mode_set ( lps22hh_ctx_t *  ctx,
lps22hh_pu_en_t  val 
)

sdo_sa0_mode: [set] Enable/Disable pull-up on SDO pin.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_sdo_pu_en_t,:change the values of sdo_pu_en in reg IF_CTRL

Definition at line 798 of file LPS22HH_Driver.c.

int32_t lps22hh_spi_mode_get ( lps22hh_ctx_t *  ctx,
lps22hh_sim_t *  val 
)

spi_mode: [get] SPI Serial Interface Mode selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_sim_t,:Get the values of sim in reg CTRL_REG1

Definition at line 892 of file LPS22HH_Driver.c.

int32_t lps22hh_spi_mode_set ( lps22hh_ctx_t *  ctx,
lps22hh_sim_t  val 
)

spi_mode: [set] SPI Serial Interface Mode selection.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_sim_t,:change the values of sim in reg CTRL_REG1

Definition at line 873 of file LPS22HH_Driver.c.

int32_t lps22hh_status_reg_get ( lps22hh_ctx_t *  ctx,
lps22hh_status_t *  val 
)

status_reg: [get] The STATUS_REG register is read by the primary interface

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
lps22hh_,:union of registers from STATUS to STATUS_REG

Definition at line 406 of file LPS22HH_Driver.c.

int32_t lps22hh_temp_flag_data_ready_get ( lps22hh_ctx_t *  ctx,
uint8_t *  val 
)

temp_flag_data_ready: [get] Temperature data available.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t,:change the values of t_da in reg STATUS

Definition at line 436 of file LPS22HH_Driver.c.

int32_t lps22hh_temperature_raw_get ( lps22hh_ctx_t *  ctx,
uint8_t *  buff 
)

temperature_raw: [get] Temperature output value.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_t* : buffer that stores data read

Definition at line 476 of file LPS22HH_Driver.c.

int32_t lps22hh_write_reg ( lps22hh_ctx_t *  ctx,
uint8_t  reg,
uint8_t *  data,
uint16_t  len 
)

Write generic device register.

Parameters:
lps22hh_ctx_t*ctx: read / write interface definitions
uint8_treg: register to write
uint8_t*data: pointer to data to write in register reg
uint16_tlen: number of consecutive register to write

Definition at line 76 of file LPS22HH_Driver.c.