Implementation of 1-Wire with added Alarm Search Functionality
Dependents: Max32630_One_Wire_Interface
Diff: OneWire_Memory/Authenticators/DS28E15_22_25/DS28E15_22_25.cpp
- Revision:
- 61:268612a10614
- Parent:
- 51:a65f031e997b
- Child:
- 62:43039aeca2ab
--- a/OneWire_Memory/Authenticators/DS28E15_22_25/DS28E15_22_25.cpp Thu Apr 14 10:20:42 2016 -0500 +++ b/OneWire_Memory/Authenticators/DS28E15_22_25/DS28E15_22_25.cpp Thu Apr 14 14:38:42 2016 -0500 @@ -193,8 +193,8 @@ m_OW_master.OWReadBlock(&buf[cnt], 3); cnt += 3; - // ckeck CRC16 - if (OneWireMaster::calculateCRC16(buf, 0, (cnt - 1)) != 0xB001) + // check CRC16 + if (OneWireMaster::calculateCRC16(buf, 0, (cnt - 1), OneWireMaster::calculateCRC16(mac, 0, mac.length)) != 0xB001) return CommunicationError; // check CS