Implementation of 1-Wire with added Alarm Search Functionality

Dependents:   Max32630_One_Wire_Interface

Revision:
74:23be10c32fa3
Parent:
73:2cecc1372acc
Child:
75:8b627804927c
--- a/Switches/DS2413/DS2413.h	Thu May 12 14:38:16 2016 -0500
+++ b/Switches/DS2413/DS2413.h	Fri May 13 07:48:35 2016 -0500
@@ -38,140 +38,133 @@
 
 namespace OneWire
 {
-  namespace Masters { class OneWireMaster; }
-  
-  namespace Switches
-  {
-    class DS2413 : public OneWireSlave
+    namespace Masters { class OneWireMaster; }
+
+    namespace Switches
     {
-    public:
-      
-      enum DS2413_CMDS
-      {
-        PIO_ACCESS_READ = 0xF5,
-        PIO_ACCESS_WRITE = 0x5A
-      };
-      
-      enum DS2413_PIO
-      {
-        PIOA,
-        PIOB,
-        PIOAB
-      };
-      
-      enum CmdResult
-      {
-        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);
-      
+        class DS2413 : public OneWireSlave
+        {
+        public:
+            enum DS2413_CMDS
+            {
+                PIO_ACCESS_READ = 0xF5,
+                PIO_ACCESS_WRITE = 0x5A
+            };
+
+            enum DS2413_PIO
+            {
+                PIOA,
+                PIOB,
+                PIOAB
+            };
+
+            enum CmdResult
+            {
+                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 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_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_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_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);
 
-    private:
-      
-      CmdResult pio_access_read(uint8_t & val);
-      
-      CmdResult pio_access_write(uint8_t val);
-      
-      Masters::OneWireMaster &_owm;
-      
-    };
-  }
+            /**********************************************************//**
+            * @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);
+
+        private:
+
+            CmdResult pio_access_read(uint8_t & val);
+
+            CmdResult pio_access_write(uint8_t val);
+
+            Masters::OneWireMaster &_owm;
+
+        };
+    }
 }
 
-#endif /*DS2413_H*/
+#endif