36 #ifndef THERMO3_CLICK_H
37 #define THERMO3_CLICK_H
42 #define THERMO3_USE_INTERRUPT 0
45 #define TMP102_REGLEN 2
47 #define TMP102_ADDLEN 2
50 #define TMP102_I2C_ADDR 0x48
53 #define MIKROSDK_THERMO3_REGADD_TEMP 0x00
54 #define MIKROSDK_THERMO3_REGADD_CONFIG 0x01
55 #define MIKROSDK_THERMO3_REGADD_TLOW 0x02
56 #define MIKROSDK_THERMO3_REGADD_THIGH 0x03
59 #define MIKROSDK_THERMO3_CONFIG_SHUTDOWN 0x01
60 #define MIKROSDK_THERMO3_CONFIG_TMMODE 0x02
61 #define MIKROSDK_THERMO3_CONFIG_ONESHOT 0x80
64 #define MIKROSDK_THERMO3_DEFAULT_CONFIG_0 0x60
66 #define MIKROSDK_THERMO3_DEFAULT_CONFIG_1 0xA0
68 #if (THERMO3_USE_INTERRUPT)
70 #define MIKROSDK_THERMO3_CONFIG \
71 ((MIKROSDK_THERMO3_DEFAULT_CONFIG_1 << 8) + (MIKROSDK_THERMO3_DEFAULT_CONFIG_0 | MIKROSDK_THERMO3_CONFIG_TMMODE))
74 #define MIKROSDK_THERMO3_CONFIG \
75 ((MIKROSDK_THERMO3_DEFAULT_CONFIG_1 << 8) + (MIKROSDK_THERMO3_DEFAULT_CONFIG_0 | MIKROSDK_THERMO3_CONFIG_ONESHOT | \
76 MIKROSDK_THERMO3_CONFIG_TMMODE | MIKROSDK_THERMO3_CONFIG_SHUTDOWN))
80 #define MIKROSDK_THERMO3_TEMP_LIMIT_LOW 0x01B0
81 #define MIKROSDK_THERMO3_TEMP_LIMIT_HIGH 0x01C8
84 #define THERMO3_T_POWERUP 35
uint8_t MIKROSDK_THERMO3_get_alarm(void)
Definition: thermo3.c:144
void MIKROSDK_THERMO3_pin_mapping(uint8_t alarm)
Definition: thermo3.c:261
uint8_t MIKROSDK_THERMO3_get_temperature_limits(uint16_t *temp_limit_low, uint16_t *temp_limit_high)
Definition: thermo3.c:181
uint8_t MIKROSDK_THERMO3_get_config(uint16_t *configuration)
Definition: thermo3.c:154
uint8_t MIKROSDK_THERMO3_set_config(uint16_t config)
Definition: thermo3.c:167
uint8_t MIKROSDK_THERMO3_Reinitialise(void)
Definition: thermo3.c:296
thermo3_alarm_state
Definition: thermo3_click.h:88
@ THERMO3_ALARM_TRIGGERED
Definition: thermo3_click.h:89
@ THERMO3_ALARM_CLEARED
Definition: thermo3_click.h:90
uint8_t MIKROSDK_THERMO3_Acquire(uint16_t *temperature)
Definition: thermo3.c:312
uint8_t MIKROSDK_THERMO3_get_temperature(uint16_t *temperature)
Definition: thermo3.c:228
uint8_t MIKROSDK_THERMO3_Initialise(void)
Definition: thermo3.c:267
uint8_t MIKROSDK_THERMO3_alarm_triggered(void)
Definition: thermo3.c:136
thermo3_status
Definition: thermo3_click.h:95
@ THERMO3_ST_ALARM_CLEARED
Definition: thermo3_click.h:97
@ THERMO3_ST_ALARM_TRIGGERED
Definition: thermo3_click.h:98
@ THERMO3_ST_OK
Definition: thermo3_click.h:96
@ THERMO3_ST_FAIL
Definition: thermo3_click.h:99
uint8_t MIKROSDK_THERMO3_set_temperature_limits(uint16_t temp_limit_low, uint16_t temp_limit_high)
Definition: thermo3.c:209