Implementation of 1-Wire with added Alarm Search Functionality

Dependents:   Max32630_One_Wire_Interface

Revision:
76:84e6c4994e29
Parent:
75:8b627804927c
Child:
77:529edb329ee0
--- a/Switches/DS2413/DS2413.h	Fri May 13 14:52:50 2016 -0500
+++ b/Switches/DS2413/DS2413.h	Sat May 14 14:27:56 2016 -0500
@@ -38,120 +38,114 @@
 
 namespace OneWire
 {
-    namespace Masters { class OneWireMaster; }
+    class OneWireMaster;
 
-    namespace Switches
+    class DS2413 : public OneWireSlave
     {
-        class DS2413 : public OneWireSlave
+    public:
+        enum CmdResult
         {
-        public:
-            enum CmdResult
-            {
-                Success,
-                CommsReadError,
-                CommsWriteError,
-                OpFailure
-            };
+            Success,
+            CommsReadError,
+            CommsWriteError,
+            OpFailure
+        };
 
-            /**********************************************************//**
-            * @brief DS2413 constructor
-            *
-            * @details
-            *
-            * On Entry:
-            *     @param[in] owm - reference to 1-wire master
-            *
-            * On Exit:
-            *
-            * @return
-            **************************************************************/
-            DS2413(Masters::OneWireMaster &owm);
+        /**********************************************************//**
+        * @brief DS2413 constructor
+        *
+        * @details
+        *
+        * On Entry:
+        *     @param[in] owm - reference to 1-wire master
+        *
+        * On Exit:
+        *
+        * @return
+        **************************************************************/
+        DS2413(OneWireMaster &owm);
 
-            /**********************************************************//**
-            * @brief pio_access_read_chA()
-            *
-            * @details reads state of pio
-            *
-            * On Entry:
-            *     @param[in] romId - refernce to ROM # of switch
-            *
-            * On Exit:
-            *     @param[out] val - lsb represents the state of the pio
-            *
-            * @return CmdResult - result of operation
-            **************************************************************/
-            CmdResult pio_access_read_chA(uint8_t & val);
+        /**********************************************************//**
+        * @brief pio_access_read_chA()
+        *
+        * @details reads state of pio
+        *
+        * On Entry:
+        *     @param[in] romId - refernce to ROM # of switch
+        *
+        * On Exit:
+        *     @param[out] val - lsb represents the state of the pio
+        *
+        * @return CmdResult - result of operation
+        **************************************************************/
+        CmdResult pio_access_read_chA(uint8_t & val);
 
-            /**********************************************************//**
-            * @brief pio_access_read_chB()
-            *
-            * @details reads state of pio
-            *
-            * On Entry:
-            *     @param[in] romId - refernce to ROM # of switch
-            *
-            * On Exit:
-            *     @param[out] val - lsb represents the state of the pio
-            *
-            * @return CmdResult - result of operation
-            **************************************************************/
-            CmdResult pio_access_read_chB(uint8_t & val);
+        /**********************************************************//**
+        * @brief pio_access_read_chB()
+        *
+        * @details reads state of pio
+        *
+        * On Entry:
+        *     @param[in] romId - refernce to ROM # of switch
+        *
+        * On Exit:
+        *     @param[out] val - lsb represents the state of the pio
+        *
+        * @return CmdResult - result of operation
+        **************************************************************/
+        CmdResult pio_access_read_chB(uint8_t & val);
 
-            /**********************************************************//**
-            * @brief pio_acess_write_chA()
-            *
-            * @details writes to pio
-            *
-            * On Entry:
-            *    @param[in] romId - refernce to ROM # of switch
-            *    @param[in] val - lsb sets state of pio
-            *
-            * On Exit:
-            *
-            * @return CmdResult - result of operation
-            **************************************************************/
-            CmdResult pio_access_write_chA(uint8_t val);
+        /**********************************************************//**
+        * @brief pio_acess_write_chA()
+        *
+        * @details writes to pio
+        *
+        * On Entry:
+        *    @param[in] romId - refernce to ROM # of switch
+        *    @param[in] val - lsb sets state of pio
+        *
+        * On Exit:
+        *
+        * @return CmdResult - result of operation
+        **************************************************************/
+        CmdResult pio_access_write_chA(uint8_t val);
 
-            /**********************************************************//**
-            * @brief pio_acess_write_chB()
-            *
-            * @details writes to pio
-            *
-            * On Entry:
-            *    @param[in] romId - refernce to ROM # of switch
-            *    @param[in] val - lsb sets state of pio
-            *
-            * On Exit:
-            *
-            * @return CmdResult - result of operation
-            **************************************************************/
-            CmdResult pio_access_write_chB(uint8_t val);
+        /**********************************************************//**
+        * @brief pio_acess_write_chB()
+        *
+        * @details writes to pio
+        *
+        * On Entry:
+        *    @param[in] romId - refernce to ROM # of switch
+        *    @param[in] val - lsb sets state of pio
+        *
+        * On Exit:
+        *
+        * @return CmdResult - result of operation
+        **************************************************************/
+        CmdResult pio_access_write_chB(uint8_t val);
 
-            /**********************************************************//**
-            * @brief pio_acess_write_chAB()
-            *
-            * @details writes to pio
-            *
-            * On Entry:
-            *    @param[in] romId - refernce to ROM # of switch
-            *    @param[in] val - Bits 1:0 set PIOB and PIOB respectively
-            *
-            * On Exit:
-            *
-            * @return CmdResult - result of operation
-            **************************************************************/
-            CmdResult pio_access_write_chAB(uint8_t val);
+        /**********************************************************//**
+        * @brief pio_acess_write_chAB()
+        *
+        * @details writes to pio
+        *
+        * On Entry:
+        *    @param[in] romId - refernce to ROM # of switch
+        *    @param[in] val - Bits 1:0 set PIOB and PIOB respectively
+        *
+        * On Exit:
+        *
+        * @return CmdResult - result of operation
+        **************************************************************/
+        CmdResult pio_access_write_chAB(uint8_t val);
 
-        private:
-
-            CmdResult pio_access_read(uint8_t & val);
+    private:
 
-            CmdResult pio_access_write(uint8_t val);
+        CmdResult pio_access_read(uint8_t & val);
 
-            Masters::OneWireMaster &_owm;
-
-        };
-    }
+        CmdResult pio_access_write(uint8_t val);
+    };
 }
 
 #endif