High level Bluetooth Low Energy API and radio abstraction layer

Dependents:   BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more

Overview

The BLE_API is a high level abstraction for using Bluetooth Low Energy on multiple platforms. For details and examples using the BLE_API please see the BLE_API Summary Page. Or click on the API Documentation tab above.

Supported Services

Supported services can be found in the BLE_API/services folder.

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Thu Dec 10 09:15:04 2015 +0000
Parent:
1037:ec64da75c9ee
Child:
1039:2ea9d52111e2
Commit message:
Synchronized with git rev 9ba09113
Author: Rohit Grover
rename UUID::BitOrder_t to ByteOrder

Changed in this revision

ble/DiscoveredCharacteristic.h Show annotated file Show diff for this revision Revisions of this file
ble/DiscoveredService.h Show annotated file Show diff for this revision Revisions of this file
ble/UUID.h Show annotated file Show diff for this revision Revisions of this file
--- a/ble/DiscoveredCharacteristic.h	Thu Dec 10 09:15:04 2015 +0000
+++ b/ble/DiscoveredCharacteristic.h	Thu Dec 10 09:15:04 2015 +0000
@@ -142,7 +142,7 @@
      */
     ble_error_t write(uint16_t length, const uint8_t *value, const GattClient::WriteCallback_t& onRead) const;
 
-    void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::BitOrder_t order = UUID::MSB) {
+    void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::ByteOrder_t order = UUID::MSB) {
         uuid.setupLong(longUUID, order);
     }
 
--- a/ble/DiscoveredService.h	Thu Dec 10 09:15:04 2015 +0000
+++ b/ble/DiscoveredService.h	Thu Dec 10 09:15:04 2015 +0000
@@ -36,7 +36,7 @@
          endHandle   = endHandleIn;
      }
 
-    void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::BitOrder_t order = UUID::MSB) {
+    void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::ByteOrder_t order = UUID::MSB) {
          uuid.setupLong(longUUID, order);
     }
 
--- a/ble/UUID.h	Thu Dec 10 09:15:04 2015 +0000
+++ b/ble/UUID.h	Thu Dec 10 09:15:04 2015 +0000
@@ -46,10 +46,13 @@
         UUID_TYPE_LONG  = 1     // Full 128-bit UUID.
     };
 
+    /**
+     * An enumeration to specify byte ordering of the long version of the UUID.
+     */
     typedef enum {
-        MSB,
-        LSB
-    } BitOrder_t;
+        MSB, /*!< Most-significant byte first (at the smallest address) */
+        LSB  /*!< least-significant byte first (at the smallest address) */
+    } ByteOrder_t;
 
     typedef uint16_t      ShortUUIDBytes_t;
 
@@ -123,7 +126,7 @@
      * @param order
      *          The bit order of the UUID, MSB by default.
      */
-    UUID(const LongUUIDBytes_t longUUID, BitOrder_t order = UUID::MSB) : type(UUID_TYPE_LONG), baseUUID(), shortUUID(0) {
+    UUID(const LongUUIDBytes_t longUUID, ByteOrder_t order = UUID::MSB) : type(UUID_TYPE_LONG), baseUUID(), shortUUID(0) {
         setupLong(longUUID, order);
     }
 
@@ -170,7 +173,7 @@
     /**
      * Fill in a 128-bit UUID; this is useful when the UUID isn't known at the time of the object construction.
      */
-    void setupLong(const LongUUIDBytes_t longUUID, BitOrder_t order = UUID::MSB) {
+    void setupLong(const LongUUIDBytes_t longUUID, ByteOrder_t order = UUID::MSB) {
         type      = UUID_TYPE_LONG;
         if (order == UUID::MSB) {
             // Switch endian. Input is big-endian, internal representation is little endian.