39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_analog_in.h"
52#include "drv_i2c_master.h"
74#define PRESSURE19_MIN_PRESSURE 0.2
75#define PRESSURE19_MAX_PRESSURE 3.0
76#define PRESSURE19_MIN_VOLTAGE 0.4
77#define PRESSURE19_MAX_VOLTAGE 4.65
78#define PRESSURE19_BAR_TO_MBAR 1000
84#define PRESSURE19_ADC_RESOLUTION 0x0FFF
85#define PRESSURE19_VREF_3V3 3.3
86#define PRESSURE19_VREF_5V 5.0
93#define PRESSURE19_SET_DEV_ADDR 0x4D
111#define PRESSURE19_MAP_MIKROBUS( cfg, mikrobus ) \
112 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
113 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
114 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
err_t pressure19_set_vref(pressure19_t *ctx, float vref)
Pressure 19 set vref function.
void pressure19_cfg_setup(pressure19_cfg_t *cfg)
Pressure 19 configuration object setup function.
err_t pressure19_read_voltage(pressure19_t *ctx, float *voltage)
Pressure 19 read voltage level function.
err_t pressure19_init(pressure19_t *ctx, pressure19_cfg_t *cfg)
Pressure 19 initialization function.
void pressure19_drv_interface_selection(pressure19_cfg_t *cfg, pressure19_drv_t drv_sel)
Pressure 19 driver interface setup function.
err_t pressure19_get_pressure(pressure19_t *ctx, uint16_t *pressure)
Pressure 19 get pressure function.
err_t pressure19_read_raw_adc(pressure19_t *ctx, uint16_t *raw_adc)
Pressure 19 read raw ADC value function.
pressure19_return_value_t
Pressure 19 Click return value data.
Definition pressure19.h:171
@ PRESSURE19_ERROR
Definition pressure19.h:173
@ PRESSURE19_OK
Definition pressure19.h:172
pressure19_drv_t
Pressure 19 Click driver selector.
Definition pressure19.h:124
@ PRESSURE19_DRV_SEL_ADC
Definition pressure19.h:125
@ PRESSURE19_DRV_SEL_I2C
Definition pressure19.h:126
Pressure 19 Click configuration object.
Definition pressure19.h:151
analog_in_resolution_t resolution
Definition pressure19.h:156
float vref
Definition pressure19.h:157
uint32_t i2c_speed
Definition pressure19.h:159
pressure19_drv_t drv_sel
Definition pressure19.h:162
pin_name_t scl
Definition pressure19.h:153
pin_name_t sda
Definition pressure19.h:154
pin_name_t an
Definition pressure19.h:152
uint8_t i2c_address
Definition pressure19.h:160
Pressure 19 Click context object.
Definition pressure19.h:135
float vref
Definition pressure19.h:141
i2c_master_t i2c
Definition pressure19.h:137
pressure19_drv_t drv_sel
Definition pressure19.h:142
uint8_t slave_address
Definition pressure19.h:139
pin_name_t chip_select
Definition pressure19.h:140
analog_in_t adc
Definition pressure19.h:136