42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_i2c_master.h"
65#define DIFFPRESS_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
67 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
74#define DIFFPRESS_RETVAL uint8_t
76#define DIFFPRESS_OK 0x00
77#define DIFFPRESS_INIT_ERROR 0xFF
84#define DIFFPRESS_DEVICE_ADDRESS 0x4D
#define DIFFPRESS_RETVAL
Definition diffpress.h:74
float diffpress_get_pressure_difference(diffpress_t *ctx)
Gets pressure difference function.
DIFFPRESS_RETVAL diffpress_init(diffpress_t *ctx, diffpress_cfg_t *cfg)
Initialization function.
uint16_t diffpress_get_adc_data(diffpress_t *ctx)
Gets adc data function.
void diffpress_cfg_setup(diffpress_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition diffpress.h:113
uint32_t i2c_speed
Definition diffpress.h:121
pin_name_t scl
Definition diffpress.h:116
pin_name_t sda
Definition diffpress.h:117
uint8_t i2c_address
Definition diffpress.h:122
Click ctx object definition.
Definition diffpress.h:98
i2c_master_t i2c
Definition diffpress.h:101
uint8_t slave_address
Definition diffpress.h:105