Lightly modified version of the BLE stack, that doesn't bring up a DFUService by default... as we have our own.
Fork of BLE_API by
Diff: public/GattServer.h
- Revision:
- 263:73847e8b6025
- Parent:
- 262:1749228403b7
- Child:
- 264:eea11cfb6753
diff -r 1749228403b7 -r 73847e8b6025 public/GattServer.h --- a/public/GattServer.h Wed Jan 21 09:32:50 2015 +0000 +++ b/public/GattServer.h Wed Jan 21 09:32:50 2015 +0000 @@ -29,17 +29,24 @@ typedef void (*ServerEventCallback_t)(void); /**< independent of any particular attribute */ protected: - GattServer() : serviceCount(0), characteristicCount(0), onDataSent(), onDataWritten(), onUpdatesEnabled(NULL), onUpdatesDisabled(NULL), onConfirmationReceived(NULL) { + GattServer() : + serviceCount(0), + characteristicCount(0), + onDataSent(), + onDataWritten(), + onUpdatesEnabled(NULL), + onUpdatesDisabled(NULL), + onConfirmationReceived(NULL) { /* empty */ } friend class BLEDevice; private: /* These functions must be defined in the sub-class */ - virtual ble_error_t addService(GattService &) = 0; + virtual ble_error_t addService(GattService &) = 0; virtual ble_error_t readValue(uint16_t handle, uint8_t buffer[], uint16_t *const lengthP) = 0; - virtual ble_error_t updateValue(uint16_t, uint8_t[], uint16_t, bool localOnly = false) = 0; - virtual ble_error_t initializeGATTDatabase(void) = 0; + virtual ble_error_t updateValue(uint16_t, uint8_t[], uint16_t, bool localOnly = false) = 0; + virtual ble_error_t initializeGATTDatabase(void) = 0; // ToDo: For updateValue, check the CCCD to see if the value we are // updating has the notify or indicate bits sent, and if BOTH are set