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 THERMO26_CMD_SINGLE_SHOT_CLK_STR_EN_REP_HIGH 0x2C06
60 #define THERMO26_CMD_SINGLE_SHOT_CLK_STR_EN_REP_MID 0x2C0D
61 #define THERMO26_CMD_SINGLE_SHOT_CLK_STR_EN_REP_LOW 0x2C10
62 #define THERMO26_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_HIGH 0x2400
63 #define THERMO26_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_MID 0x240B
64 #define THERMO26_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_LOW 0x2416
65 #define THERMO26_CMD_PERIODIC_0p5_MPS_REP_HIGH 0x2032
66 #define THERMO26_CMD_PERIODIC_0p5_MPS_REP_MID 0x2024
67 #define THERMO26_CMD_PERIODIC_0p5_MPS_REP_LOW 0x202F
68 #define THERMO26_CMD_PERIODIC_1_MPS_REP_HIGH 0x2130
69 #define THERMO26_CMD_PERIODIC_1_MPS_REP_MID 0x2126
70 #define THERMO26_CMD_PERIODIC_1_MPS_REP_LOW 0x212D
71 #define THERMO26_CMD_PERIODIC_2_MPS_REP_HIGH 0x2236
72 #define THERMO26_CMD_PERIODIC_2_MPS_REP_MID 0x2220
73 #define THERMO26_CMD_PERIODIC_2_MPS_REP_LOW 0x222B
74 #define THERMO26_CMD_PERIODIC_4_MPS_REP_HIGH 0x2334
75 #define THERMO26_CMD_PERIODIC_4_MPS_REP_MID 0x2322
76 #define THERMO26_CMD_PERIODIC_4_MPS_REP_LOW 0x2329
77 #define THERMO26_CMD_PERIODIC_10_MPS_REP_HIGH 0x2737
78 #define THERMO26_CMD_PERIODIC_10_MPS_REP_MID 0x2721
79 #define THERMO26_CMD_PERIODIC_10_MPS_REP_LOW 0x272A
80 #define THERMO26_CMD_FETCH_DATA 0xE000
81 #define THERMO26_CMD_BREAK 0x3093
82 #define THERMO26_CMD_SOFT_RESET 0x30A2
83 #define THERMO26_CMD_HEATER_ENABLE 0x306D
84 #define THERMO26_CMD_HEATER_DISABLE 0x3066
85 #define THERMO26_CMD_READ_STATUS 0xF32D
86 #define THERMO26_CMD_CLEAR_STATUS 0x3041
87 #define THERMO26_CMD_GET_SERIAL_NUM 0x3780
105 #define THERMO26_DATA_RESOLUTION 65535.0f
106 #define THERMO26_ABS_MIN_TEMP ( -45.0f )
107 #define THERMO26_ABS_MAX_TEMP ( 130.0f )
114 #define THERMO26_DEVICE_ADDRESS_0 0x4A
115 #define THERMO26_DEVICE_ADDRESS_1 0x4B
133 #define THERMO26_MAP_MIKROBUS( cfg, mikrobus ) \
134 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
135 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
136 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
137 cfg.alt = MIKROBUS( mikrobus, MIKROBUS_INT )
void thermo26_reset_device(thermo26_t *ctx)
Thermo 26 reset device function.
pin_name_t sda
Definition: thermo26.h:169
uint8_t thermo26_get_alert_pin(thermo26_t *ctx)
Thermo 26 get alert pin function.
thermo26_return_value_t
Thermo 26 Click return value data.
Definition: thermo26.h:184
pin_name_t rst
Definition: thermo26.h:171
i2c_master_t i2c
Definition: thermo26.h:155
uint32_t i2c_speed
Definition: thermo26.h:174
err_t thermo26_stop_measurement(thermo26_t *ctx)
Thermo 26 stop measurement function.
uint8_t slave_address
Definition: thermo26.h:158
err_t thermo26_start_measurement(thermo26_t *ctx, uint16_t cmd)
Thermo 26 start measurement function.
@ THERMO26_OK
Definition: thermo26.h:185
err_t thermo26_read_temperature(thermo26_t *ctx, float *temperature)
Thermo 26 read temperature function.
digital_in_t alt
Definition: thermo26.h:152
err_t thermo26_read_command(thermo26_t *ctx, uint16_t cmd, uint16_t *data_out)
Thermo 26 read command function.
Thermo 26 Click configuration object.
Definition: thermo26.h:167
void thermo26_cfg_setup(thermo26_cfg_t *cfg)
Thermo 26 configuration object setup function.
pin_name_t alt
Definition: thermo26.h:172
err_t thermo26_write_command(thermo26_t *ctx, uint16_t cmd)
Thermo 26 write command function.
err_t thermo26_read_serial_num(thermo26_t *ctx, uint32_t *serial_num)
Thermo 26 read serial num function.
@ THERMO26_ERROR
Definition: thermo26.h:186
digital_out_t rst
Definition: thermo26.h:149
Thermo 26 Click context object.
Definition: thermo26.h:147
uint8_t i2c_address
Definition: thermo26.h:175
pin_name_t scl
Definition: thermo26.h:168
void thermo26_set_rst_pin(thermo26_t *ctx, uint8_t state)
Thermo 26 set rst pin function.
err_t thermo26_init(thermo26_t *ctx, thermo26_cfg_t *cfg)
Thermo 26 initialization function.