comparison 1wire.h @ 45:efd44dc40934

Add macros for number system used for temperatures. Add error strings and improve comments for ROM programming.
author darius@Inchoate
date Mon, 20 Oct 2008 22:11:18 +1030
parents 5898fba6593c
children 94f71ddb0cda
comparison
equal deleted inserted replaced
44:f219538d6ea7 45:efd44dc40934
80 /* Return codes for OWGetTemp */ 80 /* Return codes for OWGetTemp */
81 #define OW_TEMP_BADVAL -1000 81 #define OW_TEMP_BADVAL -1000
82 #define OW_TEMP_WRONG_FAM -1000 82 #define OW_TEMP_WRONG_FAM -1000
83 #define OW_TEMP_CRC_ERR -1001 83 #define OW_TEMP_CRC_ERR -1001
84 #define OW_TEMP_NO_ROM -1002 84 #define OW_TEMP_NO_ROM -1002
85
86 /* Helpers for OWGetTemp's number system */
87 #define GETWHOLE(x) ((x) / 100)
88 #define GETFRAC(x) ((x) - (GETWHOLE(x) * 100))
89
90 extern const PROGMEM char *OWProgROM_Status[];
91