Implementation of 1-Wire with added Alarm Search Functionality
Dependents: Max32630_One_Wire_Interface
Diff: Masters/DS2480B/DS2480B.cpp
- Revision:
- 112:82eb520a644b
- Parent:
- 109:5c9180b4be25
- Child:
- 120:200109b73e3c
--- a/Masters/DS2480B/DS2480B.cpp Fri Aug 05 20:22:00 2016 +0000 +++ b/Masters/DS2480B/DS2480B.cpp Mon Aug 08 23:25:51 2016 +0000 @@ -174,7 +174,9 @@ // 10x the time needed to transmit or receive. // Double for 115200 due to timer inaccuracies. - uint32_t timeout = 1000000 * 10; + //*100 for 10 bits/byte and ten times the time needed + + uint32_t timeout = 1000000 * 100; switch (baud) { @@ -757,7 +759,7 @@ OneWireMaster::CmdResult result; mbed::Timer timer; uint32_t num_bytes_read = 0; - uint32_t timeout = calculateBitTimeout(baud) * inlen; + uint32_t timeout = (calculateBitTimeout(baud) * inlen); timer.start(); do