Improve readability with getHandle inline
Fork of BLE_API by
Diff: public/Gap.h
- Revision:
- 123:fede41ce9407
- Parent:
- 117:0fb20195102b
- Child:
- 126:fdebe4d5d62f
diff -r 4b68a819ab4f -r fede41ce9407 public/Gap.h --- a/public/Gap.h Tue Sep 30 01:03:56 2014 +0100 +++ b/public/Gap.h Wed Nov 05 14:08:42 2014 +0000 @@ -40,6 +40,8 @@ ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE } addr_type_t; + static const unsigned ADDR_LEN = 6; + /** * enumeration for disconnection reasons. The values for these reasons are * derived from Nordic's implementation; but the reasons are meant to be @@ -70,7 +72,8 @@ public: /* These functions must be defined in the sub-class */ - virtual ble_error_t setAddress(addr_type_t type, const uint8_t address[6]) = 0; + virtual ble_error_t setAddress(addr_type_t type, const uint8_t address[ADDR_LEN]) = 0; + virtual ble_error_t getAddress(addr_type_t *typeP, uint8_t address[ADDR_LEN]) = 0; virtual ble_error_t setAdvertisingData(const GapAdvertisingData &, const GapAdvertisingData &) = 0; virtual ble_error_t startAdvertising(const GapAdvertisingParams &) = 0; virtual ble_error_t stopAdvertising(void) = 0;