wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2001 |
| 3 | * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com. |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | /* |
| 25 | * Digital Thermometers and Thermostats. |
| 26 | */ |
| 27 | #ifndef _DTT_H_ |
| 28 | #define _DTT_H_ |
| 29 | |
Wolfgang Denk | b734e55 | 2008-08-18 23:50:20 +0200 | [diff] [blame] | 30 | #if defined(CONFIG_DTT_ADM1021) || \ |
| 31 | defined(CONFIG_DTT_ADT7460) || \ |
| 32 | defined(CONFIG_DTT_DS1621) || \ |
| 33 | defined(CONFIG_DTT_DS1775) || \ |
Dirk Eibach | 1c6fe6e | 2008-10-08 13:44:27 +0200 | [diff] [blame] | 34 | defined(CONFIG_DTT_LM63) || \ |
Wolfgang Denk | b734e55 | 2008-08-18 23:50:20 +0200 | [diff] [blame] | 35 | defined(CONFIG_DTT_LM73) || \ |
| 36 | defined(CONFIG_DTT_LM75) || \ |
| 37 | defined(CONFIG_DTT_LM81) |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 38 | |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 39 | #define CONFIG_DTT /* We have a DTT */ |
| 40 | |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 41 | #ifndef CONFIG_DTT_ADM1021 |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 42 | #define DTT_COMMERCIAL_MAX_TEMP 70 /* 0 - +70 C */ |
| 43 | #define DTT_INDUSTRIAL_MAX_TEMP 85 /* -40 - +85 C */ |
| 44 | #define DTT_AUTOMOTIVE_MAX_TEMP 105 /* -40 - +105 C */ |
Michal Simek | 6ecbb45 | 2008-07-11 11:50:53 +0200 | [diff] [blame] | 45 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 46 | #ifndef CONFIG_SYS_DTT_MAX_TEMP |
| 47 | #define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 48 | #endif |
Michal Simek | 6ecbb45 | 2008-07-11 11:50:53 +0200 | [diff] [blame] | 49 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 50 | #ifndef CONFIG_SYS_DTT_HYSTERESIS |
| 51 | #define CONFIG_SYS_DTT_HYSTERESIS 5 /* 5 C */ |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 52 | #endif |
wdenk | 6dd652f | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 53 | #endif /* CONFIG_DTT_ADM1021 */ |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 54 | |
| 55 | extern int dtt_init (void); |
| 56 | extern int dtt_read(int sensor, int reg); |
| 57 | extern int dtt_write(int sensor, int reg, int val); |
| 58 | extern int dtt_get_temp(int sensor); |
| 59 | #endif |
| 60 | |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 61 | #endif /* _DTT_H_ */ |