Mercurial > ~darius > hgwebdir.cgi > tempctrl
diff 1wire.c @ 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 | 4abce5954d25 |
line wrap: on
line diff
--- a/1wire.c Sun Jul 06 22:42:42 2008 +0930 +++ b/1wire.c Mon Oct 20 22:11:18 2008 +1030 @@ -48,6 +48,13 @@ static uint8_t OW_LastDiscrepancy = 0; static uint8_t OW_LastFamilyDiscrepancy = 0; +const PROGMEM char *OWProgROM_Status[] = { + "OK", + "not possible (no HW support)", + "Invalid parameters", + "module doesn't exist or didn't respond properly" +}; + /*----------------------------------------------------------------------------- * Configure the IO port as we need */ @@ -414,7 +421,7 @@ * * Returns.. * 0 if all is OK - * 1 if the programming was unsuccessful + * 1 if the programming is not possible * 2 if the parameters were invalid * 3 if the DS2502 didn't respond appropriately (also happens if the * module doesn't exist) @@ -426,7 +433,7 @@ /* Stupid programmer detection */ if (status) { - if (start + len > 3) + if (start + len > 3) return(2); } else { if (start + len > 127)