High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
30:9614522cf932
Parent:
29:011e95ce78b8
Child:
31:2c94f0501807
--- a/hw/Gap.h	Thu Jan 16 22:29:53 2014 +0000
+++ b/hw/Gap.h	Fri Jan 17 14:25:29 2014 +0000
@@ -44,7 +44,9 @@
         /******************************************************************/
         typedef enum gap_event_e
         {
-            GAP_EVENT_TODO     = 0x01 /**< ... */
+            GAP_EVENT_ADVERTISING_STARTED   = 1,
+            GAP_EVENT_CONNECTED             = 2,
+            GAP_EVENT_DISCONNECTED          = 3
         } gapEvent_t;
 
         /* These functions must be defined in the sub-class */
@@ -52,8 +54,7 @@
         virtual ble_error_t startAdvertising(void) = 0;
         virtual ble_error_t stopAdvertising(void) = 0;
 
-        uint8_t advertising;
-        uint8_t connected;
+        uint16_t state; /* Initialising, Advertising, Scanning, Connected, etc. ... more than one bit can be set at a time! */
 
         /* Event callback */
         void attach(void (*function)(void)) {