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"
62#define PRESSURE6_MAP_MIKROBUS( cfg, mikrobus ) \
63 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
64 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
65 cfg.dri = MIKROBUS( mikrobus, MIKROBUS_INT )
71#define PRESSURE6_RETVAL uint8_t
73#define PRESSURE6_OK 0x00
74#define PRESSURE6_INIT_ERROR 0xFF
80#define PRESSURE6_MC_AVE_NUM_SINGLE 0x00
81#define PRESSURE6_MC_AVE_NUM_2_TIMES 0x20
82#define PRESSURE6_MC_AVE_NUM_4_TIMES 0x40
83#define PRESSURE6_MC_AVE_NUM_8_TIMES 0x60
84#define PRESSURE6_MC_AVE_NUM_16_TIMES 0x80
85#define PRESSURE6_MC_AVE_NUM_32_TIMES 0xA0
86#define PRESSURE6_MC_AVE_NUM_64_TIMES 0xC0
87#define PRESSURE6_MC_AVE_NUM_PROHIBITED 0xE0
88#define PRESSURE6_MC_DATA_READY_ENABLED 0x10
89#define PRESSURE6_MC_DATA_READY_DISABLED 0x00
90#define PRESSURE6_MC_FULL_DATA_ENABLED 0x08
91#define PRESSURE6_MC_FULL_DATA_DISABLED 0x00
92#define PRESSURE6_MC_WATER_MARK_ENABLED 0x04
93#define PRESSURE6_MC_WATER_MARK_DISABLED 0x00
94#define PRESSURE6_MC_MODE_STAND_BY 0x00
95#define PRESSURE6_MC_MODE_ONE_SHOT 0x01
96#define PRESSURE6_MC_MODE_CONTINUOUS 0x02
97#define PRESSURE6_REG_MODE_CONTROL 0x14
#define PRESSURE6_RETVAL
Definition pressure6.h:71
uint16_t pressure6_get_pressure(pressure6_t *ctx)
Pressure value.
PRESSURE6_RETVAL pressure6_init(pressure6_t *ctx, pressure6_cfg_t *cfg)
Initialization function.
uint8_t pressure6_get_temperature(pressure6_t *ctx)
Temperature value.
void pressure6_waiting_for_new_data(pressure6_t *ctx)
Waits for new data.
void pressure6_cfg_setup(pressure6_cfg_t *cfg)
Config Object Initialization function.
void pressure6_default_cfg(pressure6_t *ctx)
Click Default Configuration function.
void pressure6_power_on(pressure6_t *ctx)
Power ON.
void pressure6_power_off(pressure6_t *ctx)
Power OFF.
uint8_t pressure6_get_interrupt(pressure6_t *ctx)
Interupt.
uint8_t pressure6_read_byte(pressure6_t *ctx, uint8_t reg)
Byte read function.
void pressure6_write_byte(pressure6_t *ctx, uint8_t reg, uint8_t data_in)
Byte write function.
uint8_t pressure6_get_status(pressure6_t *ctx)
Status.
Click configuration structure definition.
Definition pressure6.h:129
uint32_t i2c_speed
Definition pressure6.h:141
pin_name_t scl
Definition pressure6.h:132
pin_name_t dri
Definition pressure6.h:137
pin_name_t sda
Definition pressure6.h:133
uint8_t i2c_address
Definition pressure6.h:142
Click ctx object definition.
Definition pressure6.h:110
i2c_master_t i2c
Definition pressure6.h:117
uint8_t slave_address
Definition pressure6.h:121
digital_in_t dri
Definition pressure6.h:113