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:
56:be69bd88a3e3
Parent:
54:08985bf69691
diff -r 3bac13dc8bf5 -r be69bd88a3e3 OneWire_Switches/DS2413/ds2413.cpp
--- a/OneWire_Switches/DS2413/ds2413.cpp	Wed Apr 13 20:35:00 2016 +0000
+++ b/OneWire_Switches/DS2413/ds2413.cpp	Wed Apr 13 20:40:49 2016 +0000
@@ -162,7 +162,6 @@
 //*********************************************************************
 Ds2413::CmdResult Ds2413::pio_access_write(RomId & romId, uint8_t val)
 {
-  static uint32_t cnt = 0;
   Ds2413::CmdResult result = Ds2413::OpFailure;
   
   OneWireMaster::CmdResult ow_result = _owm.OWMatchROM(romId);
@@ -176,21 +175,14 @@
     {
       uint8_t expected_status = ((0x01 & val) | ((0x01 & val) << 1) | 
                                 ((0x02 & val) << 1) | ((0x02 & val) << 2));
-      //expected_status |= (~expected_status << 4);
       
       uint8_t rcv_block[2];
       ow_result = _owm.OWReadBlock(rcv_block, 2);
       
       if(ow_result == OneWireMaster::Success)
       {
-        printf("\nEntry %d", ++cnt);
-        printf("\nval = 0x%2x", val);
-        printf("\nexpected status = 0x%2x", expected_status);
-        printf("\nrecv_block 0 = 0x%2x", rcv_block[0]);
-        printf("\nrecv_block 1 = 0x%2x\n", rcv_block[1]);
         if((rcv_block[0] == 0xAA) && ((rcv_block[1] & 0x0F) == expected_status))
         {
-          printf("\nExit %d\n", cnt);
           result = Ds2413::Success;
         }
       }