Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Revision 127:4e106f4a80b7, committed 2014-11-21
- Comitter:
- rgrover1
- Date:
- Fri Nov 21 09:23:22 2014 +0000
- Parent:
- 126:fdebe4d5d62f
- Child:
- 128:685897b70e4b
- Commit message:
- Synchronized with git rev 66c13350
Author: Rohit Grover
removing un-necessary headers from GattServer.h
Changed in this revision
--- a/README.md Fri Nov 21 09:23:22 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -# mbed Bluetooth Low Energy Stack -This is the github repo for the BLE_API used by developer.mbed.org . The BLE stack is under development and constantly evolving. For up to date documentation please see [the mbed BLE Documentation page](http://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/docs/tip/). - -# Supported Services -Supported GATT services and constantly being added and can be found in the /services folder. -Currently supported services include: -* Battery -* Device Firmware Update (DFU) -* Device Information -* Health Thermometer -* Heart Rate -* UART - -# Getting Started -The mbed BLE API is meant to be used in projects on developer.mbed.org. Please see examples and sample project files there. -A good starting point are these pages: -* [mbed BLE API](developer.mbed.org/teams/Bluetooth-Low-Energy/) -* [mbed BLE Getting Started Guide](http://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/5262/) \ No newline at end of file
--- a/common/blecommon.h Fri Nov 21 09:23:22 2014 +0000
+++ b/common/blecommon.h Fri Nov 21 09:23:22 2014 +0000
@@ -27,7 +27,6 @@
#endif
#include <stdint.h>
-#include <stddef.h>
/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs
* @{ */
--- a/public/BLEDevice.h Fri Nov 21 09:23:22 2014 +0000 +++ b/public/BLEDevice.h Fri Nov 21 09:23:22 2014 +0000 @@ -17,6 +17,7 @@ #ifndef __BLE_DEVICE__ #define __BLE_DEVICE__ +#include "mbed.h" #include "blecommon.h" #include "Gap.h" #include "GattServer.h"
--- a/public/CallChainOfFunctionPointersWithContext.h Fri Nov 21 09:23:22 2014 +0000
+++ b/public/CallChainOfFunctionPointersWithContext.h Fri Nov 21 09:23:22 2014 +0000
@@ -19,6 +19,7 @@
#include <string.h>
#include "FunctionPointerWithContext.h"
+namespace mbed {
/** Group one or more functions in an instance of a CallChainOfFunctionPointersWithContext, then call them in
* sequence using CallChainOfFunctionPointersWithContext::call(). Used mostly by the interrupt chaining code,
@@ -26,6 +27,7 @@
*
* Example:
* @code
+ * #include "mbed.h"
*
* CallChainOfFunctionPointersWithContext<void *> chain;
*
@@ -145,4 +147,6 @@
CallChainOfFunctionPointersWithContext & operator = (const CallChainOfFunctionPointersWithContext &);
};
-#endif
\ No newline at end of file
+} // namespace mbed
+
+#endif
--- a/public/FunctionPointerWithContext.h Fri Nov 21 09:23:22 2014 +0000
+++ b/public/FunctionPointerWithContext.h Fri Nov 21 09:23:22 2014 +0000
@@ -19,6 +19,7 @@
#include <string.h>
+namespace mbed {
/** A class for storing and calling a pointer to a static or member void function
* which takes a context.
@@ -125,5 +126,6 @@
* external memory to manage the chain. Also refer to
* 'CallChain' as an alternative. */
};
+} // namespace mbed
#endif // ifndef MBED_FUNCTIONPOINTER_WITH_CONTEXT_H
\ No newline at end of file
--- a/public/Gap.h Fri Nov 21 09:23:22 2014 +0000 +++ b/public/Gap.h Fri Nov 21 09:23:22 2014 +0000 @@ -17,6 +17,7 @@ #ifndef __GAP_H__ #define __GAP_H__ +#include "mbed.h" #include "blecommon.h" #include "GapAdvertisingData.h" #include "GapAdvertisingParams.h"
--- a/public/GapAdvertisingParams.h Fri Nov 21 09:23:22 2014 +0000
+++ b/public/GapAdvertisingParams.h Fri Nov 21 09:23:22 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);
--- a/public/GapEvents.h Fri Nov 21 09:23:22 2014 +0000 +++ b/public/GapEvents.h Fri Nov 21 09:23:22 2014 +0000 @@ -18,6 +18,7 @@ #define __GAP_EVENTS_H__ #include "blecommon.h" +#include "mbed.h" /**************************************************************************/ /*!
--- a/public/GattServer.h Fri Nov 21 09:23:22 2014 +0000 +++ b/public/GattServer.h Fri Nov 21 09:23:22 2014 +0000 @@ -17,7 +17,6 @@ #ifndef __GATT_SERVER_H__ #define __GATT_SERVER_H__ -#include "blecommon.h" #include "GattService.h" #include "GattServerEvents.h" #include "GattCharacteristicWriteCBParams.h"
--- a/public/GattServerEvents.h Fri Nov 21 09:23:22 2014 +0000 +++ b/public/GattServerEvents.h Fri Nov 21 09:23:22 2014 +0000 @@ -18,6 +18,7 @@ #define __GATT_SERVER_EVENTS_H__ #include "blecommon.h" +#include "mbed.h" /**************************************************************************/ /*!
