Go to the documentation of this file.
35 #include "mikrosdk_version.h"
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
47 #include "drv_i2c_master.h"
69 #define THERMO24_CMD_MEASURE_HIGH_PRECISION 0xFD
70 #define THERMO24_CMD_MEASURE_MEDIUM_PRECISION 0xF6
71 #define THERMO24_CMD_MEASURE_LOWEST_PRECISION 0xE0
72 #define THERMO24_CMD_READ_SERIAL 0x89
73 #define THERMO24_CMD_SOFT_RESET 0x94
91 #define THERMO24_MEASURE_PRECISION_LOW 0x00
92 #define THERMO24_MEASURE_PRECISION_MEDIUM 0x01
93 #define THERMO24_MEASURE_PRECISION_HIGH 0x02
99 #define THERMO24_TEMP_RESOLUTION 0xFFFF
100 #define THERMO24_TEMP_MULTIPLIER_CELSIUS 175.0
101 #define THERMO24_TEMP_OFFSET 45.0
108 #define THERMO24_SET_DEVICE_ADDRESS 0x44
126 #define THERMO24_MAP_MIKROBUS( cfg, mikrobus ) \
127 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
128 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
thermo24_return_value_t
Thermo 24 Click return value data.
Definition: thermo24.h:166
@ THERMO24_OK
Definition: thermo24.h:167
uint8_t slave_address
Definition: thermo24.h:143
@ THERMO24_ERROR
Definition: thermo24.h:168
uint8_t i2c_address
Definition: thermo24.h:157
err_t thermo24_soft_reset(thermo24_t *ctx)
Thermo 24 soft reset function.
Thermo 24 Click configuration object.
Definition: thermo24.h:152
i2c_master_t i2c
Definition: thermo24.h:140
pin_name_t scl
Definition: thermo24.h:153
uint32_t i2c_speed
Definition: thermo24.h:156
void thermo24_cfg_setup(thermo24_cfg_t *cfg)
Thermo 24 configuration object setup function.
err_t thermo24_read_serial(thermo24_t *ctx, uint32_t *serial_num)
Thermo 24 read serial function.
pin_name_t sda
Definition: thermo24.h:154
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.
Thermo 24 Click context object.
Definition: thermo24.h:138