Go to the documentation of this file.
39 #define AT30TSE75X_TEMP_ADDR (0x48)
40 #define AT30TSE75X_EEPROM_ADDR (0x50)
47 #define AT30TSE75X_REG__TEMPERATURE (0x00)
48 #define AT30TSE75X_REG__CONFIG (0x01)
49 #define AT30TSE75X_REG__LIMIT_LOW (0x02)
50 #define AT30TSE75X_REG__LIMIT_HIGH (0x03)
51 #define AT30TSE75X_REG__NV_CONFIG (0x11)
52 #define AT30TSE75X_REG__NV_LIMIT_LOW (0x12)
53 #define AT30TSE75X_REG__NV_LIMIR_HIGH (0x13)
60 #define AT30TSE75X_INTEGER_MASK (0x00ff)
61 #define AT30TSE75X_INTEGER_SHIFT (0)
62 #define AT30TSE75X_FRACTIONAL_MASK (0xf000)
63 #define AT30TSE75X_FRACTIONAL_SHIFT (12)
64 #define AT30TSE75X_FRACTIONAL_BASE (0.0625f)
74 #define AT30TSE75X_CONFIG__OS_BIT (1 << 7)
75 #define AT30TSE75X_CONFIG__RESOLUTION_MASK (0x60)
76 #define AT30TSE75X_CONFIG__RESOLUTION_SHIFT (5)
77 #define AT30TSE75X_CONFIG__FTQ_MASK (0x18)
78 #define AT30TSE75X_CONFIG__FTQ_SHIFT (3)
79 #define AT30TSE75X_CONFIG__ALERT_POL_BIT (1 << 2)
80 #define AT30TSE75X_CONFIG__ALARM_MODE_BIT (1 << 1)
81 #define AT30TSE75X_CONFIG__SHUTDOWN_BIT (1 << 0)
89 #define AT30TSE75X_CMD__SAVE_TO_NVRAM (0x48)
90 #define AT30TSE75X_CMD__RESTORE_FROM_NVRAM (0xb8)
91 #define AT30TSE75X_CMD__GENERAL_CALL_RESET (0x06)
92 #define AT30TSE75X_CMD__GENERAL_CALL_RELATCH (0x04)
100 #define AT30TSE75X_BUS_FREE_TIME_US (1U)
112 AT30TSE75X_RESOLUTION_9BIT = 0,
113 AT30TSE75X_RESOLUTION_10BIT = 1,
114 AT30TSE75X_RESOLUTION_11BIT = 2,
115 AT30TSE75X_RESOLUTION_12BIT = 3
127 AT30TSE75X_MODE_COMPARATOR,
128 AT30TSE75X_MODE_INTERRUPT,
129 AT30TSE75X_MODE_ONE_SHOT
136 AT30TSE75X_ALARM_AFTER_1 = 0,
137 AT30TSE75X_ALARM_AFTER_2 = 1,
138 AT30TSE75X_ALARM_AFTER_4 = 2,
139 AT30TSE75X_ALARM_AFTER_6 = 3
146 AT30TSE75X_ALARM_ACTIVE_LOW,
147 AT30TSE75X_ALARM_ACTIVE_HIGH
int at30tse75x_set_limit_low(const at30tse75x_t *dev, int8_t t_low)
Set T_Low limit.
Device descriptor for a AT30TSE75x device.
int at30tse75x_get_config(const at30tse75x_t *dev, uint8_t *data)
Get content of configuration register.
int at30tse75x_get_temperature(const at30tse75x_t *dev, float *temperature)
Get measured temperature.
int at30tse75x_set_config(const at30tse75x_t *dev, uint8_t data)
Set content of configuration register.
unsigned int i2c_t
Default i2c_t type definition.
int at30tse75x_save_config(const at30tse75x_t *dev)
Save configuration register to non-volatile backup register.
int at30tse75x_restore_config(const at30tse75x_t *dev)
Restore configuration register from non-volatile backup register.
int at30tse75x_set_alarm_polarity(const at30tse75x_t *dev, at30tse75x_alarm_polatity_t polarity)
Set polarity of ALERT pin.
int at30tse75x_set_fault_tolerance(const at30tse75x_t *dev, at30tse75x_fault_tolerance_t tolerance)
Set tolerance to outlying measurements.
int at30tse75x_init(at30tse75x_t *dev, i2c_t i2c, uint8_t addr)
Initialize a AT30TSE75x device.
int at30tse75x_set_resolution(const at30tse75x_t *dev, at30tse75x_resolution_t resolution)
Set temperature resolution.
int at30tse75x_set_mode(const at30tse75x_t *dev, at30tse75x_mode_t mode)
Set operation mode.
at30tse75x_fault_tolerance_t
After how many limit exceeding measurements the ALERT pin is set.
i2c_t i2c
I2C device that sensor is connected to.
uint8_t addr
I2C address of this particular sensor.
int at30tse75x_set_limit_high(const at30tse75x_t *dev, int8_t t_high)
Set T_High limit.
at30tse75x_resolution_t
Temperature resolution.
Low-level I2C peripheral driver interface definition.
at30tse75x_alarm_polatity_t
Polarity of the ALERT pin.
at30tse75x_mode_t
Operation mode.