comparison 1wire.h @ 48:94f71ddb0cda

Move declaration of error table up with the function declarations.
author darius@Inchoate
date Wed, 29 Oct 2008 16:03:16 +1030
parents efd44dc40934
children 1ef17cd8af7a
comparison
equal deleted inserted replaced
47:13a68734348b 48:94f71ddb0cda
40 uint8_t OWNext(uint8_t *ROM, uint8_t do_reset, uint8_t alarm_only); 40 uint8_t OWNext(uint8_t *ROM, uint8_t do_reset, uint8_t alarm_only);
41 void OWCRC(uint8_t x, uint8_t *crc); 41 void OWCRC(uint8_t x, uint8_t *crc);
42 void OWSendCmd(uint8_t *ROM, uint8_t cmd); 42 void OWSendCmd(uint8_t *ROM, uint8_t cmd);
43 uint8_t OWProgROM(uint8_t *ROM, uint8_t start, uint8_t len, uint8_t *data, uint8_t exact, uint8_t status); 43 uint8_t OWProgROM(uint8_t *ROM, uint8_t start, uint8_t len, uint8_t *data, uint8_t exact, uint8_t status);
44 int16_t OWGetTemp(uint8_t *ROM); 44 int16_t OWGetTemp(uint8_t *ROM);
45 extern const PROGMEM char *OWProgROM_Status[];
46
45 47
46 /* Return codes for OWFirst()/OWNext() */ 48 /* Return codes for OWFirst()/OWNext() */
47 #define OW_BADWIRE -3 49 #define OW_BADWIRE -3
48 #define OW_BADCRC -2 50 #define OW_BADCRC -2
49 #define OW_NOPRESENCE -1 51 #define OW_NOPRESENCE -1
84 #define OW_TEMP_NO_ROM -1002 86 #define OW_TEMP_NO_ROM -1002
85 87
86 /* Helpers for OWGetTemp's number system */ 88 /* Helpers for OWGetTemp's number system */
87 #define GETWHOLE(x) ((x) / 100) 89 #define GETWHOLE(x) ((x) / 100)
88 #define GETFRAC(x) ((x) - (GETWHOLE(x) * 100)) 90 #define GETFRAC(x) ((x) - (GETWHOLE(x) * 100))
89
90 extern const PROGMEM char *OWProgROM_Status[];
91