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
Diff: hw/Gap.h
- 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)) {
