lps22hb 2.0.0.0
|
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. | |
void lps22hb_cfg_setup | ( | lps22hb_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t lps22hb_check_int | ( | lps22hb_t * | ctx | ) |
Check Interrupt state function.
ctx | Click object. |
@description Function is used to check if interrupt occured.
void lps22hb_default_cfg | ( | lps22hb_t * | ctx, |
lps22hb_cfg_t * | cfg ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for LPS22HB click.
void lps22hb_generic_read | ( | lps22hb_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function reads data from the desired register.
void lps22hb_generic_write | ( | lps22hb_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function writes data to the desired register.
float lps22hb_get_pressure | ( | lps22hb_t * | ctx | ) |
Get pressure value function.
ctx | Click object. |
@description Function gets pressure data, calculates and returns pressure.
float lps22hb_get_temp | ( | lps22hb_t * | ctx | ) |
Get temperature value function.
ctx | Click object. |
@description Function gets temperature returns value in degrees Celsius.
LPS22HB_RETVAL lps22hb_init | ( | lps22hb_t * | ctx, |
lps22hb_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void lps22hb_set_fifo_mode | ( | lps22hb_t * | ctx, |
uint8_t | mode_sel, | ||
uint8_t | wm_lvl ) |
Set FIFO control mode function.
ctx | Click object. |
mode_sel | 8-bit FIFO mode selection |
wm_lvl | 8-bit FIFO watermark level |
@description Function set FIFO control mode.
void lps22hb_soft_reset | ( | lps22hb_t * | ctx | ) |
Soft reset function.
ctx | Click object. |
@description This function soft reset by write ( 0x02 )to the target 8-bit register address ( 0x11 ) of the LPS22HB Click.
void lps22hb_start_configuration | ( | lps22hb_t * | ctx | ) |
Set start configuration function.
ctx | Click object. |
@description This function sets start configuration to the target 8-bit register address of the LPS22HB Click.
void lps22hb_update_reg | ( | lps22hb_t * | ctx, |
uint8_t | reg_adr, | ||
uint8_t | reg_val ) |
Update register function.
ctx | Click object. |
reg_adr | 8-bit register address |
reg_val | 8-bit data to be written into register |
@description Function is used to apply new values.