42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_i2c_master.h"
69#define ALTITUDE3_MAP_MIKROBUS( cfg, mikrobus ) \
70 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
71 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
78#define ALTITUDE3_RETVAL uint8_t
80#define ALTITUDE3_OK 0x00
81#define ALTITUDE3_INIT_ERROR 0xFF
84#define ALTITUDE3_SLAVE_ADDR 0x63
86#define ALTITUDE3_LOW_POWER_T_FIRST 0x609C
87#define ALTITUDE3_LOW_POWER_P_FIRST 0x401A
88#define ALTITUDE3_NORMAL_T_FIRST 0x6825
89#define ALTITUDE3_NORMAL_P_FIRST 0x48A3
90#define ALTITUDE3_LOW_NOISE_T_FIRST 0x70DF
91#define ALTITUDE3_LOW_NOISE_P_FIRST 0x5059
92#define ALTITUDE3_ULTRA_LOW_NOISE_T_FIRST 0x7866
93#define ALTITUDE3_ULTRA_LOW_NOISE_P_FIRST 0x58E0
95#define ALTITUDE3_OK 0x00
96#define ALTITUDE3_T_FIRST_ORDER 0x01
97#define ALTITUDE3_P_FIRST_ORDER 0x02
98#define ALTITUDE3_INITIALIZED 0x03
99#define ALTITUDE3_ERROR 0xFF
112 uint16_t sensor_const[ 4 ];
113 uint32_t p_pa_calib[ 3 ];
#define ALTITUDE3_RETVAL
Definition altitude3.h:78
uint8_t altitude3_measurement_mode(altitude3_t *ctx, uint16_t mode_cmd)
Set Measurement Mode 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_soft_reset(altitude3_t *ctx)
Software Reset 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_init_cfg(altitude3_t *ctx, altitude3_param_t *s)
Init configuration function.
void altitude3_cfg_setup(altitude3_cfg_t *cfg)
Config Object Initialization function.
uint8_t altitude3_get_data(altitude3_t *ctx, uint8_t read_order)
Get Data function.
void altitude3_generic_read(altitude3_t *ctx, uint8_t *reg_buf, uint8_t *data_buf, uint8_t len)
Generic read function.
Click configuration structure definition.
Definition altitude3.h:154
uint8_t update_check_cfg
Definition altitude3.h:165
uint32_t i2c_speed
Definition altitude3.h:162
pin_name_t scl
Definition altitude3.h:157
pin_name_t sda
Definition altitude3.h:158
uint8_t i2c_address
Definition altitude3.h:163
Definition altitude3.h:109
float lut_lower
Definition altitude3.h:114
uint32_t min_delay_us
Definition altitude3.h:111
float lut_upper
Definition altitude3.h:115
uint16_t offst_factor
Definition altitude3.h:117
double quadr_factor
Definition altitude3.h:116
Click ctx object definition.
Definition altitude3.h:135
i2c_master_t i2c
Definition altitude3.h:138
uint8_t update_check
Definition altitude3.h:144
uint8_t slave_address
Definition altitude3.h:142
sensor_data_t sens_data
Definition altitude3.h:146
Definition altitude3.h:122
uint32_t pressure
Definition altitude3.h:126
int16_t altitude
Definition altitude3.h:127
int8_t temperature
Definition altitude3.h:125