barometer 2.0.0.0
|
Functions | |
void | barometer_cfg_setup (barometer_cfg_t *cfg) |
Config Object Initialization function. | |
BAROMETER_RETVAL | barometer_init (barometer_t *ctx, barometer_cfg_t *cfg) |
Initialization function. | |
void | barometer_default_cfg (barometer_t *ctx) |
Click Default Configuration function. | |
void | barometer_generic_write (barometer_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | barometer_generic_read (barometer_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | barometer_read_data (barometer_t *ctx, uint8_t address) |
Generic read 8-bit data function. | |
void | barometer_set_active (barometer_t *ctx) |
Sets the module active function. | |
float | barometer_get_temperature_c (barometer_t *ctx) |
Read temperature in degrees Celsius function. | |
float | barometer_get_temperature_f (barometer_t *ctx) |
Read temperature in degrees of Fahrenheit function. | |
float | barometer_get_pressure (barometer_t *ctx) |
Read pressure in milibars function. | |
uint8_t | barometer_check_id (barometer_t *ctx) |
Check sensor id - Who Am I function. | |
uint8_t | barometer_check_status (barometer_t *ctx) |
Check sensor status function. | |
uint8_t | barometer_check_interrupt (barometer_t *ctx) |
State of interrupt pin function. | |
void barometer_cfg_setup | ( | barometer_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t barometer_check_id | ( | barometer_t * | ctx | ) |
Check sensor id - Who Am I function.
ctx | Click object. |
Function read sensor id ( Who Am I register ) from the LPS25HB sensor.
uint8_t barometer_check_interrupt | ( | barometer_t * | ctx | ) |
State of interrupt pin function.
ctx | Click object. |
Function checks is interrupt occurred and returns the state of the INT pin. INT pin can be configured to show are data registers updated with the new values or not.
uint8_t barometer_check_status | ( | barometer_t * | ctx | ) |
Check sensor status function.
ctx | Click object. |
Function read sensor status ( status register ) from the LPS25HB sensor.
void barometer_default_cfg | ( | barometer_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
set: BAROMETER_CTRL_REG1 - BAROMETER_DEFAULT_CONFIG *@description This function executes default configuration for Barometer click.
void barometer_generic_read | ( | barometer_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 barometer_generic_write | ( | barometer_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 barometer_get_pressure | ( | barometer_t * | ctx | ) |
Read pressure in milibars function.
ctx | Click object. |
Function read and calculate pressure in milibars from the LPS25HB sensor.
float barometer_get_temperature_c | ( | barometer_t * | ctx | ) |
Read temperature in degrees Celsius function.
ctx | Click object. |
Function read and calculate temperature in degrees Celsius from the LPS25HB sensor.
float barometer_get_temperature_f | ( | barometer_t * | ctx | ) |
Read temperature in degrees of Fahrenheit function.
ctx | Click object. |
Function read and calculate temperature in degrees Fahrenheit from the LPS25HB sensor.
BAROMETER_RETVAL barometer_init | ( | barometer_t * | ctx, |
barometer_cfg_t * | cfg ) |
Initialization function.
barometer | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t barometer_read_data | ( | barometer_t * | ctx, |
uint8_t | address ) |
Generic read 8-bit data function.
ctx | Click object. |
address | Register address |
Function read 8-bit data from register address of the LPS25HB sensor.
void barometer_set_active | ( | barometer_t * | ctx | ) |
Sets the module active function.
ctx | Click object. Function set active mode by writing configuration register from the LPS25HB sensor. |