1-Wire® library for mbed. Complete 1-Wire library that supports our silicon masters along with a bit-bang master on the MAX32600MBED platform with one common interface for mbed. Slave support has also been included and more slaves will be added as time permits.

Dependents:   MAXREFDES131_Qt_Demo MAX32630FTHR_iButton_uSD_Logger MAX32630FTHR_DS18B20_uSD_Logger MAXREFDES130_131_Demo ... more

Superseded by MaximInterface.

Revision:
120:200109b73e3c
Parent:
113:13e2865603df
Child:
139:f0e0a7976846
--- a/Slaves/Authenticators/DS28E15_22_25/DS28E15_22_25.cpp	Mon Aug 22 21:48:41 2016 +0000
+++ b/Slaves/Authenticators/DS28E15_22_25/DS28E15_22_25.cpp	Tue Sep 06 09:25:52 2016 -0500
@@ -747,7 +747,7 @@
 OneWireSlave::CmdResult DS28E15_22_25::writeAuthSegmentMac(unsigned int pageNum, unsigned int segmentNum, const Segment & newData, const Mac & mac, bool continuing)
 {
     uint8_t buf[256], cs;
-    int cnt, i, offset;
+    int cnt, offset;
 
     cnt = 0;
     offset = 0;
@@ -774,7 +774,7 @@
     }
 
     // add the data
-    for (i = 0; i < newData.length; i++)
+    for (size_t i = 0; i < newData.length; i++)
     {
         buf[cnt++] = newData[i];
     }
@@ -1047,7 +1047,7 @@
 
 OneWireSlave::CmdResult DS28E15_22_25::readSegment(unsigned int page, unsigned int segment, Segment & data, bool continuing) const
 {
-    OneWireMaster::CmdResult result;
+    OneWireMaster::CmdResult result = OneWireMaster::OperationFailure;
     uint8_t buf[2];
 
     if (!continuing)
@@ -1084,7 +1084,8 @@
 OneWireSlave::CmdResult DS28E15_22_25::writeSegment(unsigned int page, unsigned int block, const Segment & data, bool continuing)
 {
     uint8_t buf[256], cs;
-    int cnt, offset;
+    int cnt = 0;
+    int offset = 0;
 
     cnt = 0;
     offset = 0;