Implementation of 1-Wire with added Alarm Search Functionality

Dependents:   Max32630_One_Wire_Interface

Revision:
142:85b71cfd617e
Parent:
104:3f48daed532b
--- a/RomId/RomCommands.h	Fri Feb 17 21:54:14 2017 +0000
+++ b/RomId/RomCommands.h	Tue Aug 13 14:42:37 2019 +0000
@@ -112,6 +112,24 @@
         ///          Begin with a new search state and continue using the same search state until the last
         ///          device flag is set which indicates that all devices have been discovered.
         OneWireMaster::CmdResult OWSearch(OneWireMaster & master, SearchState & searchState);
+        
+        /// Find Alarming Devices on 1-Wire bus.
+        /// @details This command uses the Alarm Search ROM command to enumerate all 1-Wire devices with active alarms
+        ///          Begin with a new search state and continue using the same search state until the last
+        ///          device flag is set which indicates that all devices have been discovered.          
+        OneWireMaster::CmdResult OWAlarmSearch(OneWireMaster & master, SearchState & searchState);
+        
+        /// Find the first Alarming device on the 1-Wire bus.
+        /// @details This command resets the SearchState and uses the Alarm Search command to enumerate the first actively alarming device on the bus, in numerical order by ROM ID.
+        OneWireMaster::CmdResult OWFirstAlarm(OneWireMaster & master, SearchState & searchState);
+        
+        /// Find the next Alarming Device on the 1-Wire bus.
+        /// @details This command  uses the Alarm Search command to enumerate the next actively alarming device on the bus, which is determined by the current searchState.
+        OneWireMaster::CmdResult OWNextAlarm(OneWireMaster & master, SearchState & searchState);
+        
+        /// Helper function for the above search functions
+        OneWireMaster::CmdResult OWSearchAll(OneWireMaster & master, SearchState & searchState, bool alarmSearch);
+
     }
 }