Implementation of 1-Wire with added Alarm Search Functionality

Dependents:   Max32630_One_Wire_Interface

Revision:
80:83b0d879cc32
Parent:
78:0cbbac7f2016
diff -r 7f22823a5a2d -r 83b0d879cc32 crc.h
--- a/crc.h	Mon May 23 18:57:12 2016 -0500
+++ b/crc.h	Thu Jun 02 21:56:16 2016 +0000
@@ -8,6 +8,19 @@
 {
     namespace crc
     {
+        /// Perform a CRC8 calculation.
+        /// @param crc8 Beginning state of the CRC generator.
+        /// @param data Data to pass though the CRC generator.
+        /// @returns The calculated CRC8.
+        uint8_t calculateCrc8(uint8_t crc8, uint8_t data);
+        
+        /// Perform a CRC8 calculation with variable length data.
+        /// @param[in] data Data array to pass through the CRC generator.
+        /// @param dataLen Length of the data array to process.
+        /// @param crc Beginning state of the CRC generator.
+        /// @returns The calculated CRC8.
+        uint8_t calculateCrc8(const uint8_t * data, size_t dataLen, uint8_t crc = 0);
+        
         /// Perform a CRC16 calculation.
         /// @param crc16 Beginning state of the CRC generator.
         /// @param data Data to pass though the CRC generator.