📄 ds1820.h
字号:
/* myTemp is used to connect PalmOS PDAs to Dallas Microlan(tm) Devices. It currently supports DS1820/DS18S20 Digital Thermometers Copyright (C) 2000 Christof Klaiber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Christof Klaiber <cklaiber@users.sourceforge.net> Lachnerstr. 22 76131 Karlsruhe Germany*/#define kScratchPadLength 9/* Name: ReadScratchpad Purpose: Send/ a Match Rom command to the indicated 1-wire device Input: UInt16 serialRefNum reference to the serial library UInt8* scpad Pointer to 9 Bytes for SP-Data Result: Err error Name: Christof Klaiber <christof.klaiber@gmx.de> Versions: 25.01.2001 First working Release 06.12.2003 rewrite for version 4 This function is taken from digitemp-1.3/onewire.c by Brian C. Lane <bcl@brianlane.com>*/UInt32 DSReadScratchpad(UInt16, UInt8[9]);/* Name: ReadTemperature Purpose: Do the Temperature Conversation Input: UInt16 serialRefNum serial reference Result: Err error Name: Christof Klaiber <christof.klaiber@gmx.de> Versions: 25.01.2001 First working Release 06.12.2003 rewrite for version 4 11.12.2003 error handling This function is taken from digitemp-1.3/onewire.c by Brian C. Lane <bcl@brianlane.com>*/UInt32 DSReadTemperature(UInt16);/* Name: DSResetTemperature Purpose: Reset the device Input: UInt16 serialRefNum serial reference Result: Err error Name: Christof Klaiber <christof.klaiber@gmx.de> Versions: 11.12.2003 introduced*/UInt32 DSResetTemperature(UInt16);/* Name: SkipROM Purpose: Skip the MatchROM for single devices Input: UInt16 serialRefNum serial reference Result: Int8 0 if correct, -1 if error Name: Christof Klaiber <christof.klaiber@gmx.de> Versions: 25.01.2001 First working Release 04.03.2001 deleted redundant TouchReset 06.12.2003 rewrite for version 4 This function is taken from digitemp-1.3/onewire.c by Brian C. Lane <bcl@brianlane.com>*/UInt32 DSSkipROM(UInt16);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -