lps22hb 2.0.0.0
Public function

Functions

void lps22hb_cfg_setup (lps22hb_cfg_t *cfg)
 Config Object Initialization function.
 
LPS22HB_RETVAL lps22hb_init (lps22hb_t *ctx, lps22hb_cfg_t *cfg)
 Initialization function.
 
void lps22hb_default_cfg (lps22hb_t *ctx, lps22hb_cfg_t *cfg)
 Click Default Configuration function.
 
void lps22hb_generic_write (lps22hb_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void lps22hb_generic_read (lps22hb_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void lps22hb_soft_reset (lps22hb_t *ctx)
 Soft reset function.
 
void lps22hb_start_configuration (lps22hb_t *ctx)
 Set start configuration function.
 
void lps22hb_update_reg (lps22hb_t *ctx, uint8_t reg_adr, uint8_t reg_val)
 Update register function.
 
float lps22hb_get_pressure (lps22hb_t *ctx)
 Get pressure value function.
 
float lps22hb_get_temp (lps22hb_t *ctx)
 Get temperature value function.
 
void lps22hb_set_fifo_mode (lps22hb_t *ctx, uint8_t mode_sel, uint8_t wm_lvl)
 Set FIFO control mode function.
 
uint8_t lps22hb_check_int (lps22hb_t *ctx)
 Check Interrupt state function.
 

Detailed Description

Function Documentation

◆ lps22hb_cfg_setup()

void lps22hb_cfg_setup ( lps22hb_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.

◆ lps22hb_check_int()

uint8_t lps22hb_check_int ( lps22hb_t * ctx)

Check Interrupt state function.

Parameters
ctxClick object.

@return

1 : Interrupt occured / 0 : Interrupt not occured pre

@description Function is used to check if interrupt occured.

◆ lps22hb_default_cfg()

void lps22hb_default_cfg ( lps22hb_t * ctx,
lps22hb_cfg_t * cfg )

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for LPS22HB click.

◆ lps22hb_generic_read()

void lps22hb_generic_read ( lps22hb_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.

◆ lps22hb_generic_write()

void lps22hb_generic_write ( lps22hb_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.

◆ lps22hb_get_pressure()

float lps22hb_get_pressure ( lps22hb_t * ctx)

Get pressure value function.

Parameters
ctxClick object.

@return

float pressure value [ mbar ] pre

@description Function gets pressure data, calculates and returns pressure.

◆ lps22hb_get_temp()

float lps22hb_get_temp ( lps22hb_t * ctx)

Get temperature value function.

Parameters
ctxClick object.

@return

float temperature value [ ÂșC ] pre

@description Function gets temperature returns value in degrees Celsius.

◆ lps22hb_init()

LPS22HB_RETVAL lps22hb_init ( lps22hb_t * ctx,
lps22hb_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ lps22hb_set_fifo_mode()

void lps22hb_set_fifo_mode ( lps22hb_t * ctx,
uint8_t mode_sel,
uint8_t wm_lvl )

Set FIFO control mode function.

Parameters
ctxClick object.
mode_sel8-bit FIFO mode selection
wm_lvl8-bit FIFO watermark level

@description Function set FIFO control mode.

◆ lps22hb_soft_reset()

void lps22hb_soft_reset ( lps22hb_t * ctx)

Soft reset function.

Parameters
ctxClick object.

@description This function soft reset by write ( 0x02 )to the target 8-bit register address ( 0x11 ) of the LPS22HB Click.

◆ lps22hb_start_configuration()

void lps22hb_start_configuration ( lps22hb_t * ctx)

Set start configuration function.

Parameters
ctxClick object.

@description This function sets start configuration to the target 8-bit register address of the LPS22HB Click.

◆ lps22hb_update_reg()

void lps22hb_update_reg ( lps22hb_t * ctx,
uint8_t reg_adr,
uint8_t reg_val )

Update register function.

Parameters
ctxClick object.
reg_adr8-bit register address
reg_val8-bit data to be written into register

@description Function is used to apply new values.