39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_i2c_master.h"
50#include "drv_analog_in.h"
78#define ALTITUDE5_SET_DEV_ADDR 0x4D
96#define ALTITUDE5_MAP_MIKROBUS( cfg, mikrobus ) \
97 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
98 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
99 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN )
altitude5_drv_t
Definition altitude5.h:105
@ ALTITUDE5_DRV_SEL_AN
Definition altitude5.h:106
@ ALTITUDE5_DRV_SEL_I2C
Definition altitude5.h:107
struct altitude5_s altitude5_t
Altitude 5 Click context object.
altitude5_return_value_t
Altitude 5 Click return value data.
Definition altitude5.h:168
@ ALTITUDE5_OK
Definition altitude5.h:169
@ ALTITUDE5_ERROR
Definition altitude5.h:170
err_t(* altitude5_master_io_t)(struct altitude5_s *, uint16_t *)
Definition altitude5.h:111
err_t altitude5_read_an_pin_voltage(altitude5_t *ctx, float *data_out)
Altitude 5 read AN pin voltage level function.
err_t altitude5_init(altitude5_t *ctx, altitude5_cfg_t *cfg)
Altitude 5 initialization function.
err_t altitude5_get_adc(altitude5_t *ctx, uint16_t *data_out)
Altitude 5 get ADC function.
err_t altitude5_get_altitude(altitude5_t *ctx, float *altitude)
Altitude 5 get altitude function.
void altitude5_cfg_setup(altitude5_cfg_t *cfg)
Altitude 5 configuration object setup function.
err_t altitude5_get_pressure(altitude5_t *ctx, float *pressure)
Altitude 5 get pressure function.
err_t altitude5_get_adc_voltage(altitude5_t *ctx, float *adc_vtg)
Altitude 5 get ADC voltage function.
err_t altitude5_default_cfg(altitude5_t *ctx)
Altitude 5 default configuration function.
Altitude 5 Click configuration object.
Definition altitude5.h:142
float temperature_degree_celsius
Definition altitude5.h:158
analog_in_resolution_t resolution
Definition altitude5.h:145
float vref
Definition altitude5.h:146
uint32_t i2c_speed
Definition altitude5.h:151
altitude5_drv_t drv_sel
Definition altitude5.h:154
int16_t adc_offset
Definition altitude5.h:156
float sea_level_pressure
Definition altitude5.h:157
pin_name_t scl
Definition altitude5.h:148
pin_name_t sda
Definition altitude5.h:149
pin_name_t an
Definition altitude5.h:143
uint8_t i2c_address
Definition altitude5.h:152
Altitude 5 Click context object.
Definition altitude5.h:118
float sea_lvl_pressure
Definition altitude5.h:132
int16_t offset
Definition altitude5.h:131
altitude5_drv_t drv_sel
Definition altitude5.h:127
i2c_master_t i2c
Definition altitude5.h:122
altitude5_master_io_t read_adc_f
Definition altitude5.h:129
uint8_t slave_address
Definition altitude5.h:125
analog_in_t adc
Definition altitude5.h:119
float temperature
Definition altitude5.h:133