42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_in.h"
53#include "drv_i2c_master.h"
65#define FEVER_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
67 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );\
68 cfg.os = MIKROBUS( mikrobus, MIKROBUS_INT )
75#define FEVER_RETVAL uint8_t
78#define FEVER_INIT_ERROR 0xFF
85#define FEVER_TEMP 0x00
86#define FEVER_CONFIG 0x01
87#define FEVER_THYST 0x02
95#define FEVER_SHUTDOWN 0x01
96#define FEVER_POWERUP 0xFE
97#define FEVER_INTERUPT_MODE 0x02
98#define FEVER_COMPARATOR_MODE 0xFD
105#define FEVER_OS_ACTIVE_HIGH 0x04
106#define FEVER_OS_ACTIVE_LOW 0xFB
113#define FEVER_FAULT_QUEUE_1 0xE7
114#define FEVER_FAULT_QUEUE_2 0x08
115#define FEVER_FAULT_QUEUE_4 0x10
116#define FEVER_FAULT_QUEUE_6 0x18
123#define FEVER_EXTENDED_DATA_FORMAT 0x20
124#define FEVER_NORMAL_DATA_FORMAT 0xDF
131#define FEVER_TIMEOUT_DISABLE 0x40
132#define FEVER_TIMEOUT_ENABLE 0xBF
139#define FEVER_ONE_SHOT_MEASURE 0x80
#define FEVER_RETVAL
Definition fever.h:75
void fever_default_cfg(fever_t *ctx)
Click Default Configuration function.
FEVER_RETVAL fever_init(fever_t *ctx, fever_cfg_t *cfg)
Initialization function.
void fever_generic_read(fever_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
void fever_generic_write(fever_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
float fever_get_temperature(fever_t *ctx)
Get temperature.
void fever_cfg_setup(fever_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition fever.h:172
uint32_t i2c_speed
Definition fever.h:184
pin_name_t scl
Definition fever.h:175
pin_name_t sda
Definition fever.h:176
pin_name_t os
Definition fever.h:180
uint8_t i2c_address
Definition fever.h:185
Click ctx object definition.
Definition fever.h:153
i2c_master_t i2c
Definition fever.h:160
uint8_t slave_address
Definition fever.h:164
digital_in_t os
Definition fever.h:156