35#include "drv_digital_out.h"
36#include "drv_digital_in.h"
37#include "drv_i2c_master.h"
59#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_EN_REP_HIGH 0x2C06
60#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_EN_REP_MID 0x2C0D
61#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_EN_REP_LOW 0x2C10
62#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_HIGH 0x2400
63#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_MID 0x240B
64#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_LOW 0x2416
65#define THERMO30_CMD_PERIODIC_0p5_MPS_REP_HIGH 0x2032
66#define THERMO30_CMD_PERIODIC_0p5_MPS_REP_MID 0x2024
67#define THERMO30_CMD_PERIODIC_0p5_MPS_REP_LOW 0x202F
68#define THERMO30_CMD_PERIODIC_1_MPS_REP_HIGH 0x2130
69#define THERMO30_CMD_PERIODIC_1_MPS_REP_MID 0x2126
70#define THERMO30_CMD_PERIODIC_1_MPS_REP_LOW 0x212D
71#define THERMO30_CMD_PERIODIC_2_MPS_REP_HIGH 0x2236
72#define THERMO30_CMD_PERIODIC_2_MPS_REP_MID 0x2220
73#define THERMO30_CMD_PERIODIC_2_MPS_REP_LOW 0x222B
74#define THERMO30_CMD_PERIODIC_4_MPS_REP_HIGH 0x2334
75#define THERMO30_CMD_PERIODIC_4_MPS_REP_MID 0x2322
76#define THERMO30_CMD_PERIODIC_4_MPS_REP_LOW 0x2329
77#define THERMO30_CMD_PERIODIC_10_MPS_REP_HIGH 0x2737
78#define THERMO30_CMD_PERIODIC_10_MPS_REP_MID 0x2721
79#define THERMO30_CMD_PERIODIC_10_MPS_REP_LOW 0x272A
80#define THERMO30_CMD_FETCH_DATA 0xE000
81#define THERMO30_CMD_BREAK 0x3093
82#define THERMO30_CMD_SOFT_RESET 0x30A2
83#define THERMO30_CMD_HEATER_ENABLE 0x306D
84#define THERMO30_CMD_HEATER_DISABLE 0x3066
85#define THERMO30_CMD_READ_STATUS 0xF32D
86#define THERMO30_CMD_CLEAR_STATUS 0x3041
87#define THERMO30_CMD_GET_SERIAL_NUM 0x3780
93#define THERMO30_PIN_STATE_HIGH 0x01
94#define THERMO30_PIN_STATE_LOW 0x00
100#define THERMO30_DATA_RESOLUTION 65535.0f
101#define THERMO30_ABS_MIN_TEMP -45.0f
102#define THERMO30_ABS_MAX_TEMP 175.0f
109#define THERMO30_DEVICE_ADDRESS_GND 0x4A
110#define THERMO30_DEVICE_ADDRESS_VCC 0x4B
128#define THERMO30_MAP_MIKROBUS( cfg, mikrobus ) \
129 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
130 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
131 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
132 cfg.alr = MIKROBUS( mikrobus, MIKROBUS_INT )
uint8_t thermo30_get_alert_pin(thermo30_t *ctx)
Thermo 30 get alert pin function.
err_t thermo30_default_cfg(thermo30_t *ctx)
Thermo 30 default configuration function.
err_t thermo30_read_command(thermo30_t *ctx, uint16_t cmd, uint16_t *data_out)
Thermo 30 read command function.
err_t thermo30_init(thermo30_t *ctx, thermo30_cfg_t *cfg)
Thermo 30 initialization function.
err_t thermo30_read_temperature(thermo30_t *ctx, float *temperature)
Thermo 30 read temperature function.
void thermo30_cfg_setup(thermo30_cfg_t *cfg)
Thermo 30 configuration object setup function.
err_t thermo30_start_measurement(thermo30_t *ctx, uint16_t cmd)
Thermo 30 start measurement function.
err_t thermo30_stop_measurement(thermo30_t *ctx)
Thermo 30 stop measurement function.
void thermo30_hw_reset(thermo30_t *ctx)
Thermo 30 hw reset device function.
err_t thermo30_read_status(thermo30_t *ctx, uint16_t *status_val)
Thermo 30 read status function.
err_t thermo30_write_command(thermo30_t *ctx, uint16_t cmd)
Thermo 30 write command function.
void thermo30_set_rst_pin(thermo30_t *ctx, uint8_t pin_state)
Thermo 30 set rst pin function.
Thermo 30 Click configuration object.
Definition: thermo30.h:162
pin_name_t alr
Definition: thermo30.h:167
uint32_t i2c_speed
Definition: thermo30.h:169
pin_name_t scl
Definition: thermo30.h:163
pin_name_t sda
Definition: thermo30.h:164
pin_name_t rst
Definition: thermo30.h:166
uint8_t i2c_address
Definition: thermo30.h:170
Thermo 30 Click context object.
Definition: thermo30.h:142
digital_in_t alr
Definition: thermo30.h:147
i2c_master_t i2c
Definition: thermo30.h:150
digital_out_t rst
Definition: thermo30.h:144
uint8_t slave_address
Definition: thermo30.h:153
thermo30_return_value_t
Thermo 30 Click return value data.
Definition: thermo30.h:179
@ THERMO30_ERROR
Definition: thermo30.h:181
@ THERMO30_OK
Definition: thermo30.h:180