altitude3 2.0.0.0
|
Functions | |
void | altitude3_cfg_setup (altitude3_cfg_t *cfg) |
Config Object Initialization function. | |
ALTITUDE3_RETVAL | altitude3_init (altitude3_t *ctx, altitude3_cfg_t *cfg) |
Initialization function. | |
void | altitude3_default_cfg (altitude3_t *ctx) |
Click Default Configuration function. | |
void | altitude3_generic_write (altitude3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | altitude3_generic_read (altitude3_t *ctx, uint8_t *reg_buf, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | altitude3_measurement_mode (altitude3_t *ctx, uint16_t mode_cmd) |
Set Measurement Mode function. | |
void | altitude3_soft_reset (altitude3_t *ctx) |
Software Reset function. | |
uint8_t | altitude3_read_adc_results (altitude3_t *ctx, uint8_t read_order, int16_t *temperature, uint32_t *pressure) |
Read AD Conversion function. | |
void | altitude3_init_cfg (altitude3_t *ctx, altitude3_param_t *s) |
Init configuration function. | |
uint8_t | altitude3_get_data (altitude3_t *ctx, uint8_t read_order) |
Get Data function. | |
void altitude3_cfg_setup | ( | altitude3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void altitude3_default_cfg | ( | altitude3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Altitude3 click.
void altitude3_generic_read | ( | altitude3_t * | ctx, |
uint8_t * | reg_buf, | ||
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 altitude3_generic_write | ( | altitude3_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 altitude3_get_data | ( | altitude3_t * | ctx, |
uint8_t | read_order ) |
Get Data function.
read_order | Determines in which order data be read |
temperature | Memory where temperature data calculated to Celsius degrees be stored |
pressure | Memory where pressure data calculated to mbar[hPa] be stored |
altitude | Memory where altitude data calculated to meters be stored |
@description Function performs a calibration data reading, only once, and then reads a temperature and pressure data and calculates these values to standard units. Also calculates the altitude depending on the temperature and pressure data.
ALTITUDE3_RETVAL altitude3_init | ( | altitude3_t * | ctx, |
altitude3_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 altitude3_init_cfg | ( | altitude3_t * | ctx, |
altitude3_param_t * | s ) |
Init configuration function.
s | Object where initialization data and data from OTP sensor be stored |
@description Function sends a command to read calibration data from OTP sensor and other initialization data, which is necessary for calculations.
uint8_t altitude3_measurement_mode | ( | altitude3_t * | ctx, |
uint16_t | mode_cmd ) |
Set Measurement Mode function.
ctx | Click object. |
modeCmd | Command which selects a measurement mode |
@description Function sends a command which selects a measurement mode and data reading order.
uint8_t altitude3_read_adc_results | ( | altitude3_t * | ctx, |
uint8_t | read_order, | ||
int16_t * | temperature, | ||
uint32_t * | pressure ) |
Read AD Conversion function.
ctx | Click object. |
read_order | Determines in which order data be read |
temperature | Memory where temperature converted data be stored |
pressure | Memory where pressure converted data be stored |
@description Function reads results of AD conversion, which consists of the 16bit temperature and 24bit pressure data in determined order.
void altitude3_soft_reset | ( | altitude3_t * | ctx | ) |
Software Reset function.
ctx | Click object. |
@description Function sends a command to perform a SW Reset of the device.