39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_i2c_master.h"
73#define THERMO24_CMD_MEASURE_HIGH_PRECISION 0xFD
74#define THERMO24_CMD_MEASURE_MEDIUM_PRECISION 0xF6
75#define THERMO24_CMD_MEASURE_LOWEST_PRECISION 0xE0
76#define THERMO24_CMD_READ_SERIAL 0x89
77#define THERMO24_CMD_SOFT_RESET 0x94
95#define THERMO24_MEASURE_PRECISION_LOW 0x00
96#define THERMO24_MEASURE_PRECISION_MEDIUM 0x01
97#define THERMO24_MEASURE_PRECISION_HIGH 0x02
103#define THERMO24_TEMP_RESOLUTION 0xFFFF
104#define THERMO24_TEMP_MULTIPLIER_CELSIUS 175.0
105#define THERMO24_TEMP_OFFSET 45.0
112#define THERMO24_SET_DEVICE_ADDRESS 0x44
130#define THERMO24_MAP_MIKROBUS( cfg, mikrobus ) \
131 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
132 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
err_t thermo24_soft_reset(thermo24_t *ctx)
Thermo 24 soft reset function.
err_t thermo24_read_temperature(thermo24_t *ctx, uint8_t precision, float *temperature)
Thermo 24 read temperature function.
err_t thermo24_init(thermo24_t *ctx, thermo24_cfg_t *cfg)
Thermo 24 initialization function.
err_t thermo24_read_serial(thermo24_t *ctx, uint32_t *serial_num)
Thermo 24 read serial function.
void thermo24_cfg_setup(thermo24_cfg_t *cfg)
Thermo 24 configuration object setup function.
Thermo 24 Click configuration object.
Definition thermo24.h:156
uint32_t i2c_speed
Definition thermo24.h:160
pin_name_t scl
Definition thermo24.h:157
pin_name_t sda
Definition thermo24.h:158
uint8_t i2c_address
Definition thermo24.h:161
Thermo 24 Click context object.
Definition thermo24.h:142
i2c_master_t i2c
Definition thermo24.h:144
uint8_t slave_address
Definition thermo24.h:147
thermo24_return_value_t
Thermo 24 Click return value data.
Definition thermo24.h:170
@ THERMO24_OK
Definition thermo24.h:171
@ THERMO24_ERROR
Definition thermo24.h:172