Implementation of 1-Wire with added Alarm Search Functionality

Dependents:   Max32630_One_Wire_Interface

Revision:
21:00c94aeb533e
Parent:
17:b646b1e3970b
Child:
23:e8e403d61359
--- a/OneWire_Masters/OneWireMaster.h	Mon Mar 21 01:28:34 2016 +0000
+++ b/OneWire_Masters/OneWireMaster.h	Mon Mar 21 14:12:28 2016 -0500
@@ -54,7 +54,7 @@
     
     static uint16_t calculateCRC16(uint16_t CRC16, uint16_t data);
     
-    static uint16_t calculateCRC16(const uint8_t * data, size_t data_offset, size_t data_len, uint16_t crc);
+    static uint16_t calculateCRC16(const uint8_t * data, size_t data_offset, size_t data_len, uint16_t crc = 0);
     
     //Part of OneWireInterface that should only be implemented once
     //See OneWireInterface.h for documentation
@@ -89,13 +89,16 @@
     
     virtual OneWireInterface::CmdResult OWResume(void);
     
+    virtual OneWireInterface::CmdResult OWReadBytePower(uint8_t & recvbyte) { return OperationFailure; }
+    
     protected:
     
     // Search state
     uint8_t _last_discrepancy;
     uint8_t _last_family_discrepancy;
-    uint8_t _last_device_flag;
-    uint8_t _crc8;   
+    bool _last_device_flag;
+
+    private:
     
     static const uint16_t _oddparity[16];
 };