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:
104:3f48daed532b
--- a/Masters/DS248x/DS248x.cpp	Mon Aug 22 21:48:41 2016 +0000
+++ b/Masters/DS248x/DS248x.cpp	Tue Sep 06 09:25:52 2016 -0500
@@ -265,7 +265,7 @@
 OneWireMaster::CmdResult DS248x::OWReadByteSetLevel(uint8_t & recvByte, OWLevel afterLevel)
 {
     // 1-Wire Read Bytes (Case C)
-    //   S AD,0 [A] 1WRB [A] Sr AD,1 [A] [Status] A [Status] A\
+    //   S AD,0 [A] 1WRB [A] Sr AD,1 [A] [Status] A [Status] A
     //                                   \--------/
     //                     Repeat until 1WB bit has changed to 0
     //   Sr AD,0 [A] SRP [A] E1 [A] Sr AD,1 [A] DD A\ P
@@ -360,8 +360,11 @@
 
 OneWireMaster::CmdResult DS248x::readRegister(Register reg, uint8_t & buf, bool skipSetPointer) const
 {
-    CmdResult result;
-    result = sendCommand(SetReadPointerCmd, reg);
+    CmdResult result = Success;
+    if (!skipSetPointer)
+    {
+        result = sendCommand(SetReadPointerCmd, reg);
+    }
     if (result == Success)
     {
         if (m_i2c_bus.read(m_adrs, reinterpret_cast<char *>(&buf), 1) != I2C_READ_OK)