altitude 2.0.0.0
|
Functions | |
void | altitude_cfg_setup (altitude_cfg_t *cfg) |
Configuration Object Setup function. | |
altitude_err_t | altitude_init (altitude_t *ctx, altitude_cfg_t *cfg) |
Click Initialization function. | |
void | altitude_default_cfg (altitude_t *ctx) |
Click Default Configuration function. | |
altitude_err_t | altitude_generic_single_write (altitude_t *ctx, uint8_t reg_addr, uint8_t data_in) |
Generic Single Write function. | |
altitude_err_t | altitude_generic_multiple_write (altitude_t *ctx, uint8_t reg_addr, uint8_t *data_in, uint8_t n_data) |
Generic Mutiple Write function. | |
altitude_err_t | altitude_generic_multiple_read (altitude_t *ctx, uint8_t reg_addr, uint8_t *data_out, uint8_t n_data) |
Generic Multiple Read function. | |
void | altitude_set_system_mode (altitude_t *ctx, altitude_sys_mode_t mode) |
System Mode Set function. | |
void | altitude_set_sensor_mode (altitude_t *ctx, altitude_sens_mode_t mode) |
Sensor Mode Set function. | |
void | altitude_sw_reset (altitude_t *ctx) |
Software Reset function. | |
uint8_t | altitude_get_drdy_status (altitude_t *ctx, uint8_t flag_mask) |
Data Ready Status Get function. | |
uint8_t | altitude_get_int_status (altitude_t *ctx, uint8_t flag_mask) |
Interrupt Status Get function. | |
uint8_t | altitude_get_int1_pin (altitude_t *ctx) |
INT1 Pin Get function. | |
uint8_t | altitude_get_int2_pin (altitude_t *ctx) |
INT2 Pin Get function. | |
float | altitude_get_altitude (altitude_t *ctx) |
Altitude Get function. | |
float | altitude_get_pressure (altitude_t *ctx) |
Pressure Get function. | |
float | altitude_get_temperature (altitude_t *ctx) |
Temperature Get function. | |
void altitude_cfg_setup | ( | altitude_cfg_t * | cfg | ) |
Configuration Object Setup function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to initial state.
void altitude_default_cfg | ( | altitude_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes a default configuration for Altitude click.
altitude_err_t altitude_generic_multiple_read | ( | altitude_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_out, | ||
uint8_t | n_data ) |
Generic Multiple Read function.
ctx | Click object. |
reg_addr | Register address. |
data_out | Memory where read data be stored. |
n_data | Number of data bytes to be read. |
@description This function executes a read operation of multiple data bytes starting from the selected register.
altitude_err_t altitude_generic_multiple_write | ( | altitude_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_in, | ||
uint8_t | n_data ) |
Generic Mutiple Write function.
ctx | Click object. |
reg_addr | Register address. |
data_in | Data to be written. |
n_data | Number of data bytes to be written. |
@description This function executes a write operation of multiple data bytes starting from the selected register.
altitude_err_t altitude_generic_single_write | ( | altitude_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | data_in ) |
Generic Single Write function.
ctx | Click object. |
reg_addr | Register address. |
data_in | Data to be written. |
@description This function executes a single write operation to the desired register.
float altitude_get_altitude | ( | altitude_t * | ctx | ) |
Altitude Get function.
ctx | Click object. |
@description This function reads the altitude and converts this value to meters.
uint8_t altitude_get_drdy_status | ( | altitude_t * | ctx, |
uint8_t | flag_mask ) |
Data Ready Status Get function.
ctx | Click object. |
flag_mask | Selects a bits which will be compared. |
@description This function reads Status register and allows comparison of the selected data ready flags.
uint8_t altitude_get_int1_pin | ( | altitude_t * | ctx | ) |
INT1 Pin Get function.
ctx | Click object. |
@description This function returns a true value if high voltage level was detected on the pin, or returns a false value if low voltage level was detected on the pin.
uint8_t altitude_get_int2_pin | ( | altitude_t * | ctx | ) |
INT2 Pin Get function.
ctx | Click object. |
@description This function returns a true value if high voltage level was detected on the pin, or returns a false value if low voltage level was detected on the pin.
uint8_t altitude_get_int_status | ( | altitude_t * | ctx, |
uint8_t | flag_mask ) |
Interrupt Status Get function.
ctx | Click object. |
flag_mask | Selects a bits which will be compared. |
@description This function reads Interrupt Source register and allows comparison of the selected interrupt flags.
float altitude_get_pressure | ( | altitude_t * | ctx | ) |
Pressure Get function.
ctx | Click object. |
@description This function reads the pressure and converts this value to millibars.
float altitude_get_temperature | ( | altitude_t * | ctx | ) |
Temperature Get function.
ctx | Click object. |
@description This function reads the temperature and converts this value to Celsius degrees.
altitude_err_t altitude_init | ( | altitude_t * | ctx, |
altitude_cfg_t * | cfg ) |
Click Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary peripherals and pins used for this click.
void altitude_set_sensor_mode | ( | altitude_t * | ctx, |
altitude_sens_mode_t | mode ) |
Sensor Mode Set function.
ctx | Click object. |
mode | 0 - Barometer, 1 - Altimeter. |
@description This function sets the sensor (measurement) mode.
void altitude_set_system_mode | ( | altitude_t * | ctx, |
altitude_sys_mode_t | mode ) |
System Mode Set function.
ctx | Click object. |
mode | 0 - Standby mode, 1 - Active mode. |
@description This function sets the system mode.
void altitude_sw_reset | ( | altitude_t * | ctx | ) |
Software Reset function.
ctx | Click object. |
@description This function sets the all registers to default configuration state.