Improve readability with getHandle inline

Fork of BLE_API by Bluetooth Low Energy

Revision:
124:acf0d0c49867
Parent:
116:ca826083980e
Child:
125:aae3f50670c9
diff -r fede41ce9407 -r acf0d0c49867 public/GapAdvertisingParams.h
--- a/public/GapAdvertisingParams.h	Wed Nov 05 14:08:42 2014 +0000
+++ b/public/GapAdvertisingParams.h	Fri Nov 21 09:23:21 2014 +0000
@@ -19,11 +19,6 @@
 
 #include "blecommon.h"
 
-#define GAP_ADV_PARAMS_INTERVAL_MIN        (0x0020)
-#define GAP_ADV_PARAMS_INTERVAL_MIN_NONCON (0x00A0)
-#define GAP_ADV_PARAMS_INTERVAL_MAX        (0x1000)
-#define GAP_ADV_PARAMS_TIMEOUT_MAX         (0x3FFF)
-
 /**************************************************************************/
 /*!
     \brief
@@ -50,6 +45,11 @@
 class GapAdvertisingParams
 {
 public:
+    static const unsigned GAP_ADV_PARAMS_INTERVAL_MIN        = 0x0020;
+    static const unsigned GAP_ADV_PARAMS_INTERVAL_MIN_NONCON = 0x00A0;
+    static const unsigned GAP_ADV_PARAMS_INTERVAL_MAX        = 0x4000;
+    static const unsigned GAP_ADV_PARAMS_TIMEOUT_MAX         = 0x3FFF;
+
     /**************************************************************************/
     /*!
         \brief
@@ -70,6 +70,7 @@
         ADV_NON_CONNECTABLE_UNDIRECTED  /**< Vol 3, Part C, Section 9.3.2 and Vol 6, Part B, Section 2.3.1.3 */
     };
 
+public:
     GapAdvertisingParams(AdvertisingType advType  = GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED,
                          uint16_t        interval = GAP_ADV_PARAMS_INTERVAL_MIN_NONCON,
                          uint16_t        timeout  = 0);
@@ -138,4 +139,4 @@
     return _timeout;
 }
 
-#endif // ifndef __GAP_ADVERTISING_PARAMS_H__
+#endif // ifndef __GAP_ADVERTISING_PARAMS_H__
\ No newline at end of file