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:
121:4bee07064d0d
Parent:
116:8058bb54e959
Child:
139:f0e0a7976846
--- a/Slaves/Memory/DS2431/DS2431.cpp	Tue Sep 06 09:25:52 2016 -0500
+++ b/Slaves/Memory/DS2431/DS2431.cpp	Tue Sep 06 10:21:37 2016 -0500
@@ -150,7 +150,7 @@
         OneWireMaster::CmdResult owmResult = selectDevice();
         if(owmResult == OneWireMaster::Success)
         {
-            uint8_t sendBlock[] = {READ_MEMORY, (targetAddress & 0xFF), ((targetAddress >> 8) & 0xFF)};
+            uint8_t sendBlock[] = { READ_MEMORY, static_cast<uint8_t>(targetAddress), static_cast<uint8_t>(targetAddress >> 8) };
             owmResult = master().OWWriteBlock(sendBlock, 3);
             if(owmResult == OneWireMaster::Success)
             {
@@ -247,7 +247,7 @@
     OneWireMaster::CmdResult owmResult = selectDevice();
     if(owmResult == OneWireMaster::Success)
     {
-        uint8_t sendBlock[] = {COPY_SCRATCHPAD, (targetAddress & 0xFF), ((targetAddress >> 8) & 0xFF), esByte};
+        uint8_t sendBlock[] = { COPY_SCRATCHPAD, static_cast<uint8_t>(targetAddress), static_cast<uint8_t>(targetAddress >> 8), esByte };
         owmResult = master().OWWriteBlock(sendBlock, 4);
         
         master().OWSetLevel(OneWireMaster::StrongLevel);