barometer2 2.0.0.0
|
Functions | |
void | barometer2_cfg_setup (barometer2_cfg_t *cfg) |
Config Object Initialization function. | |
BAROMETER2_RETVAL | barometer2_init (barometer2_t *ctx, barometer2_cfg_t *cfg) |
Initialization function. | |
void | barometer2_default_cfg (barometer2_t *ctx) |
Click Default Configuration function. | |
void | barometer2_generic_write (barometer2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | barometer2_generic_read (barometer2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | barometer2_write_byte (barometer2_t *ctx, uint8_t reg, uint8_t data_bytes) |
Write one byte function. | |
uint8_t | barometer2_read_byte (barometer2_t *ctx, uint8_t reg) |
Read one byte function. | |
float | barometer2_get_temperature (barometer2_t *ctx, uint8_t temp_format) |
Read temperature function. | |
void | barometer2_software_reset (barometer2_t *ctx) |
Reset function. | |
float | barometer2_get_pressure (barometer2_t *ctx, uint8_t press_format) |
Read pressure function. | |
uint8_t | barometer2_get_interrupt (barometer2_t *ctx) |
Gets interrupt. | |
void barometer2_cfg_setup | ( | barometer2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void barometer2_default_cfg | ( | barometer2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Barometer2 click.
void barometer2_generic_read | ( | barometer2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void barometer2_generic_write | ( | barometer2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write 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 writes data to the desired register.
uint8_t barometer2_get_interrupt | ( | barometer2_t * | ctx | ) |
Gets interrupt.
ctx | Click object. |
@description This function gets the interrupt.
float barometer2_get_pressure | ( | barometer2_t * | ctx, |
uint8_t | press_format ) |
Read pressure function.
ctx | Click object. |
temp_format | Unit of measurement. |
@description This function reads pressure data and stores it in different formats depending on the unit of measurement parameter.
float barometer2_get_temperature | ( | barometer2_t * | ctx, |
uint8_t | temp_format ) |
Read temperature function.
ctx | Click object. |
temp_format | Unit of measurement. |
@description This function reads temperature data and stores it in different formats depending on the unit of measurement parameter.
BAROMETER2_RETVAL barometer2_init | ( | barometer2_t * | ctx, |
barometer2_cfg_t * | cfg ) |
Initialization function.
barometer2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t barometer2_read_byte | ( | barometer2_t * | ctx, |
uint8_t | reg ) |
Read one byte function.
ctx | Click object. |
reg | Register address. |
@description This function reads one byte of data from the desired register.
void barometer2_software_reset | ( | barometer2_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description This function resets the device to its default settings.
void barometer2_write_byte | ( | barometer2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_bytes ) |
Write one byte function.
ctx | Click object. |
reg | Register address. |
data_bytes | Data to be written. |
@description This function writes one byte of data to the desired register.