diff 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
line wrap: on
line diff
--- a/1wire.h	Sun Jul 06 22:42:42 2008 +0930
+++ b/1wire.h	Mon Oct 20 22:11:18 2008 +1030
@@ -82,3 +82,10 @@
 #define OW_TEMP_WRONG_FAM	-1000
 #define OW_TEMP_CRC_ERR		-1001
 #define OW_TEMP_NO_ROM		-1002
+
+/* Helpers for OWGetTemp's number system */
+#define GETWHOLE(x)	((x) / 100)
+#define GETFRAC(x)	((x) - (GETWHOLE(x) * 100))
+
+extern const PROGMEM char *OWProgROM_Status[];
+