Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
37 #include "drv_i2c_master.h"
59 #define THERMO24_CMD_MEASURE_HIGH_PRECISION 0xFD
60 #define THERMO24_CMD_MEASURE_MEDIUM_PRECISION 0xF6
61 #define THERMO24_CMD_MEASURE_LOWEST_PRECISION 0xE0
62 #define THERMO24_CMD_READ_SERIAL 0x89
63 #define THERMO24_CMD_SOFT_RESET 0x94
81 #define THERMO24_MEASURE_PRECISION_LOW 0x00
82 #define THERMO24_MEASURE_PRECISION_MEDIUM 0x01
83 #define THERMO24_MEASURE_PRECISION_HIGH 0x02
89 #define THERMO24_TEMP_RESOLUTION 0xFFFF
90 #define THERMO24_TEMP_MULTIPLIER_CELSIUS 175.0
91 #define THERMO24_TEMP_OFFSET 45.0
98 #define THERMO24_SET_DEVICE_ADDRESS 0x44
116 #define THERMO24_MAP_MIKROBUS( cfg, mikrobus ) \
117 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
118 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
thermo24_return_value_t
Thermo 24 Click return value data.
Definition: thermo24.h:156
@ THERMO24_OK
Definition: thermo24.h:157
uint8_t slave_address
Definition: thermo24.h:133
@ THERMO24_ERROR
Definition: thermo24.h:158
uint8_t i2c_address
Definition: thermo24.h:147
err_t thermo24_soft_reset(thermo24_t *ctx)
Thermo 24 soft reset function.
Thermo 24 Click configuration object.
Definition: thermo24.h:142
i2c_master_t i2c
Definition: thermo24.h:130
pin_name_t scl
Definition: thermo24.h:143
uint32_t i2c_speed
Definition: thermo24.h:146
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:144
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:128