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.h
- Revision:
- 89:3a0e12c9b898
- Parent:
- 88:cac71903b1cd
- Child:
- 90:c233d1c265ff
--- a/Slaves/RomIterator.h Wed Jun 15 15:11:48 2016 -0500 +++ b/Slaves/RomIterator.h Thu Jun 16 10:45:24 2016 -0500 @@ -44,9 +44,11 @@ private: OneWireMaster & owMaster; - public: + protected: /// @param master 1-Wire master to use to issue ROM commands. RomIterator(OneWireMaster & master) : owMaster(master) { } + + public: virtual ~RomIterator() { } /// The 1-Wire master used to issue ROM commands. @@ -132,6 +134,20 @@ virtual OneWireMaster::CmdResult selectDevice(const RomId & romId); }; + + /// Iterator for a multidrop 1-Wire bus where slaves support the Resume ROM command. + class MultidropRomIteratorWithResume : public RandomAccessRomIterator + { + private: + RomId lastRom; + + public: + /// @param master 1-Wire master to use to issue ROM commands. + MultidropRomIteratorWithResume(OneWireMaster & master) + : RandomAccessRomIterator(master), lastRom() { } + + virtual OneWireMaster::CmdResult selectDevice(const RomId & romId); + }; } #endif