Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of DS1820 by
Revision 4:29264b0a2c9f, committed 2013-08-07
- Comitter:
- pairmand
- Date:
- Wed Aug 07 11:02:10 2013 +0000
- Parent:
- 3:8f2b7f4940b5
- Child:
- 5:2cd4928e8147
- Commit message:
- Added check of CRC to end of search_ROM
Changed in this revision
| DS1820.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DS1820.cpp Thu Aug 01 10:18:17 2013 +0000
+++ b/DS1820.cpp Wed Aug 07 11:02:10 2013 +0000
@@ -151,7 +151,10 @@
if (ROM_bit_index != 0xFF) {
for(byte_counter=0;byte_counter<8;byte_counter++)
ROM[byte_counter] = DS1820_search_ROM[byte_counter];
- return_value = true;
+ if (ROM_checksum_error()) // Check the CRC
+ DS1820_last_descrepancy = 0; // Abort any more search
+ else
+ return_value = true;
}
}
if (DS1820_last_descrepancy == 0)
