High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
6:425638944835
Parent:
4:50a31ff5f974
Child:
7:5e1f0d7f7c7d
--- a/GapAdvertisingParams.cpp	Thu Dec 12 02:43:22 2013 +0000
+++ b/GapAdvertisingParams.cpp	Fri Dec 13 00:41:11 2013 +0000
@@ -8,24 +8,30 @@
 /*!
     @brief  Instantiates a new GapAdvertisingParams instance
 
-    @param[in]  connectionMode
-                The GAP connection mode to use for this device. Valid
-                values are defined in \ref ConnectionMode
+    @param[in]  advType
+                The GAP advertising mode to use for this device. Valid
+                values are defined in \ref AdvertisingType
 
                 @para
-                NON_CONNECTABLE - All connections to the peripheral device
-                will be refused.
+                ADV_NON_CONNECTABLE_UNDIRECTED - All connections to the
+                peripheral device will be refused.
                 
                 @para
-                DIRECTED_CONNECTABLE - Only connections from a pre-defined
-                central device will be accepted.
+                ADV_CONNECTABLE_DIRECTED - Only connections from a
+                pre-defined central device will be accepted.
                 
                 @para
-                UNDIRECTED_CONNECTABLE - Any central device can connect to
-                this peripheral.
+                ADV_CONNECTABLE_UNDIRECTED - Any central device can connect
+                to this peripheral.
+
+                @para
+                ADV_SCANNABLE_UNDIRECTED - Any central device can connect
+                to this peripheral, and the secondary Scan Response
+                payload will be included or available to central devices.
                 
                 @note See Bluetooth Core Specification 4.0 (Vol. 3),
-                Part C, Section 9.3 for further information on GAP
+                Part C, Section 9.3 and Core Specification 4.0 (Vol. 6),
+                Part B, Section 2.3.1 for further information on GAP
                 connection modes
 
     @param[in]  interval
@@ -38,7 +44,7 @@
                 used by the radio due to the higher data transmit rate.
                 
                 @note This field must be set to 0 if connectionMode is equal
-                to \ref DIRECTED_CONNECTABLE
+                to \ref ADV_CONNECTABLE_DIRECTED
 
     @param[in]  timeout
                 Advertising timeout between 0x1 and 0x3FFF (1 and 16383)
@@ -51,14 +57,14 @@
     @endcode
 */
 /**************************************************************************/
-GapAdvertisingParams::GapAdvertisingParams(ConnectionMode connectionMode, uint16_t interval, uint16_t timeout)
+GapAdvertisingParams::GapAdvertisingParams(AdvertisingType advType, uint16_t interval, uint16_t timeout)
 {
-    _connectionMode = connectionMode;
+    _advType = advType;
     _interval = interval;
     _timeout = timeout;
 
     /* Interval checks */
-    if (_connectionMode == DIRECTED_CONNECTABLE)
+    if (_advType == ADV_CONNECTABLE_DIRECTED)
     {
         /* Interval must be 0 in directed connectable mode */
         _interval = 0;