altitude2 2.0.0.0
|
Functions | |
void | altitude2_cfg_setup (altitude2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | altitude2_init (altitude2_t *ctx, altitude2_cfg_t *cfg) |
Initialization function. | |
uint8_t | altitude2_read_prom (altitude2_t *ctx, uint8_t select_data, uint16_t *data_out) |
Calibration data read function. | |
void | altitude2_reset (altitude2_t *ctx) |
Reset function. | |
uint8_t | altitude2_set_ratio (altitude2_t *ctx, uint8_t temp_ratio, uint8_t press_ratio) |
Set ratio function. | |
void | altitude2_read_data (altitude2_t *ctx, float *temp_data, float *press_data, float *altitude_data) |
Data read function. | |
void altitude2_cfg_setup | ( | altitude2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
err_t altitude2_init | ( | altitude2_t * | ctx, |
altitude2_cfg_t * | cfg ) |
Initialization function.
altitude2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void altitude2_read_data | ( | altitude2_t * | ctx, |
float * | temp_data, | ||
float * | press_data, | ||
float * | altitude_data ) |
Data read function.
ctx | Click object. |
temp_data | Stores temperature data in celsius. |
press_data | Stores pressure data in mbar. |
altitude_data | Stores altitude data in meters. |
@description This function performs pressure and temperature measurements and calculates temperature data in celsius and pressure data in mbar. Depending on the temperature and pressure data, function calculates altitude in meters.
uint8_t altitude2_read_prom | ( | altitude2_t * | ctx, |
uint8_t | select_data, | ||
uint16_t * | data_out ) |
Calibration data read function.
ctx | Click object. |
select_data | Select coefficient from 0 to 7. |
data_out | Coefficient returned by function. |
void altitude2_reset | ( | altitude2_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description This function resets the device and reads calibration coefficients after reset.
uint8_t altitude2_set_ratio | ( | altitude2_t * | ctx, |
uint8_t | temp_ratio, | ||
uint8_t | press_ratio ) |
Set ratio function.
ctx | Click object. |
temp_ratio | Determines oversampling ratio for temperature measurement. |
press_ratio | Determines oversampling ration for pressure measurement. |