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"
67#define PRESSURE8_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
69 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
70 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
71 cfg.eoc = MIKROBUS( mikrobus, MIKROBUS_INT )
79#define PRESSURE8_ERROR -1
86#define PRESSURE8_DATA_IN_MBAR 1
87#define PRESSURE8_DATA_IN_HPA 2
88#define PRESSURE8_DATA_IN_KPA 3
89#define PRESSURE8_DATA_IN_TORR 4
90#define PRESSURE8_DATA_IN_MMHG 5
uint8_t pressure8_get_eoc_state(pressure8_t *ctx)
Functions for get interrupt pin state.
uint8_t pressure8_get_device_status(pressure8_t *ctx)
Functions for get device status.
void pressure8_generic_read(pressure8_t *ctx, uint8_t *data_buf, uint8_t len)
Generic read function.
err_t pressure8_init(pressure8_t *ctx, pressure8_cfg_t *cfg)
Initialization function.
float pressure8_get_pressure(pressure8_t *ctx, uint8_t press_format)
Functions for get Pressure data.
void pressure8_set_psi_range(pressure8_t *ctx, float psi_min, float psi_max)
Functions for set PSI range.
void pressure8_cfg_setup(pressure8_cfg_t *cfg)
Config Object Initialization function.
void pressure8_device_reset(pressure8_t *ctx)
Functions for hardware device reset.
Click configuration structure definition.
Definition pressure8.h:126
pin_name_t eoc
Definition pressure8.h:133
uint32_t i2c_speed
Definition pressure8.h:136
pin_name_t scl
Definition pressure8.h:128
pin_name_t sda
Definition pressure8.h:129
pin_name_t rst
Definition pressure8.h:132
uint8_t i2c_address
Definition pressure8.h:137
Click ctx object definition.
Definition pressure8.h:104
uint8_t device_status
Definition pressure8.h:116
float press_max
Definition pressure8.h:117
digital_in_t eoc
Definition pressure8.h:109
i2c_master_t i2c
Definition pressure8.h:112
digital_out_t rst
Definition pressure8.h:106
uint8_t slave_address
Definition pressure8.h:115
float press_min
Definition pressure8.h:118