*/
#include <common.h>
-
-#ifdef CONFIG_DTT_LM75
-#if !defined(CFG_EEPROM_PAGE_WRITE_ENABLE) || \
- (CFG_EEPROM_PAGE_WRITE_BITS < 1)
-# error "CFG_EEPROM_PAGE_WRITE_ENABLE must be defined and CFG_EEPROM_PAGE_WRITE_BITS must be greater than 1 to use CONFIG_DTT_LM75"
-#endif
-
#include <i2c.h>
#include <dtt.h>
-
/*
* Device code
*/
+#if defined(CFG_I2C_DTT_ADDR)
+#define DTT_I2C_DEV_CODE CFG_I2C_DTT_ADDR
+#else
#define DTT_I2C_DEV_CODE 0x48 /* ON Semi's LM75 device */
+#endif
+#define DTT_READ_TEMP 0x0
+#define DTT_CONFIG 0x1
+#define DTT_TEMP_HYST 0x2
+#define DTT_TEMP_SET 0x3
int dtt_read(int sensor, int reg)
{
}
return (int)((int16_t) ret / 256);
} /* dtt_get_temp() */
-
-#endif /* CONFIG_DTT_LM75 */