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.
Diff: Masters/DS2480B/DS2480B.cpp
- Revision:
- 112:82eb520a644b
- Parent:
- 109:5c9180b4be25
- Child:
- 120:200109b73e3c
diff -r 6f1790192cbc -r 82eb520a644b Masters/DS2480B/DS2480B.cpp --- 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