Implementation of 1-Wire with added Alarm Search Functionality
Dependents: Max32630_One_Wire_Interface
Diff: Slaves/RomIterator.h
- Revision:
- 90:c233d1c265ff
- Parent:
- 89:3a0e12c9b898
--- a/Slaves/RomIterator.h Thu Jun 16 10:45:24 2016 -0500 +++ b/Slaves/RomIterator.h Fri Jun 17 15:24:37 2016 -0500 @@ -34,10 +34,12 @@ #define OneWire_RomIterator #include <stdint.h> -#include "Masters/OneWireMaster.h" +#include "RomCommands.h" namespace OneWire { + class OneWireMaster; + /// Controls selection of 1-Wire devices on the bus through ROM commands. class RomIterator { @@ -79,7 +81,7 @@ class ForwardSearchRomIterator : public ForwardRomIterator { protected: - OneWireMaster::SearchState searchState; + RomCommands::SearchState searchState; public: /// @param master 1-Wire master to use to issue ROM commands. @@ -121,7 +123,7 @@ SingledropRomIterator(OneWireMaster & master) : RandomAccessRomIterator(master) { } /// Select the one and only device. - OneWireMaster::CmdResult selectDevice() { return master().OWSkipRom(); } + OneWireMaster::CmdResult selectDevice() { return RomCommands::OWSkipRom(master()); } virtual OneWireMaster::CmdResult selectDevice(const RomId & romId); };