Go to the documentation of this file.
38 #include "mikrosdk_version.h"
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
48 #include "drv_digital_in.h"
49 #include "drv_i2c_master.h"
61 #define FEVER_MAP_MIKROBUS( cfg, mikrobus ) \
62 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
63 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );\
64 cfg.os = MIKROBUS( mikrobus, MIKROBUS_INT )
71 #define FEVER_RETVAL uint8_t
74 #define FEVER_INIT_ERROR 0xFF
81 #define FEVER_TEMP 0x00
82 #define FEVER_CONFIG 0x01
83 #define FEVER_THYST 0x02
84 #define FEVER_TOS 0x03
91 #define FEVER_SHUTDOWN 0x01
92 #define FEVER_POWERUP 0xFE
93 #define FEVER_INTERUPT_MODE 0x02
94 #define FEVER_COMPARATOR_MODE 0xFD
101 #define FEVER_OS_ACTIVE_HIGH 0x04
102 #define FEVER_OS_ACTIVE_LOW 0xFB
109 #define FEVER_FAULT_QUEUE_1 0xE7
110 #define FEVER_FAULT_QUEUE_2 0x08
111 #define FEVER_FAULT_QUEUE_4 0x10
112 #define FEVER_FAULT_QUEUE_6 0x18
119 #define FEVER_EXTENDED_DATA_FORMAT 0x20
120 #define FEVER_NORMAL_DATA_FORMAT 0xDF
127 #define FEVER_TIMEOUT_DISABLE 0x40
128 #define FEVER_TIMEOUT_ENABLE 0xBF
135 #define FEVER_ONE_SHOT_MEASURE 0x80
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.
uint32_t i2c_speed
Definition: fever.h:180
#define FEVER_RETVAL
Definition: fever.h:71
void fever_cfg_setup(fever_cfg_t *cfg)
Config Object Initialization function.
Click ctx object definition.
Definition: fever.h:149
pin_name_t os
Definition: fever.h:176
pin_name_t sda
Definition: fever.h:172
uint8_t slave_address
Definition: fever.h:160
i2c_master_t i2c
Definition: fever.h:156
uint8_t i2c_address
Definition: fever.h:181
digital_in_t os
Definition: fever.h:152
void fever_default_cfg(fever_t *ctx)
Click Default Configuration function.
void fever_generic_read(fever_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
Click configuration structure definition.
Definition: fever.h:168
pin_name_t scl
Definition: fever.h:171
FEVER_RETVAL fever_init(fever_t *ctx, fever_cfg_t *cfg)
Initialization function.