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: Slaves/RomIterator.cpp
- Revision:
- 89:3a0e12c9b898
- Parent:
- 88:cac71903b1cd
- Child:
- 90:c233d1c265ff
diff -r cac71903b1cd -r 3a0e12c9b898 Slaves/RomIterator.cpp --- a/Slaves/RomIterator.cpp Wed Jun 15 15:11:48 2016 -0500 +++ b/Slaves/RomIterator.cpp Thu Jun 16 10:45:24 2016 -0500 @@ -75,3 +75,20 @@ { return master().OWMatchRom(romId); } + +OneWireMaster::CmdResult MultidropRomIteratorWithResume::selectDevice(const RomId & romId) +{ + OneWireMaster::CmdResult result; + + if (romId == lastRom) + { + result = master().OWResume(); + } + else + { + result = master().OWMatchRom(romId); + lastRom = romId; + } + + return result; +}