Main Page | File List | Globals | Related Pages

c/ds1621.h

Go to the documentation of this file.
00001 /* 
00002  * This file is part of AvrTherm.
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published
00006  * by the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00012  * See the GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  *
00018  * Copyright (C) 2004 Andreas Schroeder <andreas@a-netz.de>
00019  */
00020 
00029 #ifndef DS1621_H
00030 #define DS1621_H
00031 
00032 #include "globals.h"
00033 
00037 #define DS1621_ADDR  0x9e
00038 
00042 #define DS1621_FLAG_DONE    7
00043 
00047 #define DS1621_FLAG_1SHOT   0
00048 
00049 
00053 #define DS1621_CMD_START_CONVERT  0xee
00054 
00058 #define DS1621_CMD_STOP_CONVERT   0x22
00059 
00065 #define DS1621_CMD_READ_TEMP      0xaa
00066 
00072 #define DS1621_CMD_ACCESS_CONFIG  0xac
00073 
00079 #define DS1621_CMD_READ_COUNTER   0xa8
00080 
00086 #define DS1621_CMD_READ_SLOPE     0xa9
00087 
00088 
00097 typedef signed char temp_t;
00098 
00106 typedef u16 hires_temp_t;
00107 
00114 void ds1621_do_conversion(void);
00115 
00122 temp_t ds1621_gettemp(void);
00123 
00129 u08 ds1621_getreg(u08 cmd);
00130 
00143 hires_temp_t ds1621_hires_gettemp(void);
00144 
00145 #endif

Generated on Wed Oct 27 10:57:05 2004 by  doxygen 1.3.9.1