I don't know why this is happening.
Fork of BLE_API by
Diff: services/URIBeaconConfigService.h
- Revision:
- 514:1fa338281798
- Parent:
- 510:39612adfbf68
- Child:
- 515:0bcd3a4746fd
--- a/services/URIBeaconConfigService.h Fri Jun 19 15:52:05 2015 +0100 +++ b/services/URIBeaconConfigService.h Fri Jun 19 15:52:05 2015 +0100 @@ -20,18 +20,18 @@ #include "BLEDevice.h" #include "mbed.h" -extern const uint8_t UUID_URI_BEACON_SERVICE[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_LOCK_STATE_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_LOCK_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_UNLOCK_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_URI_DATA_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_FLAGS_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_ADV_POWER_LEVELS_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_TX_POWER_MODE_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_BEACON_PERIOD_CHAR[UUID::LENGTH_OF_LONG_UUID]; -extern const uint8_t UUID_RESET_CHAR[UUID::LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_URI_BEACON_SERVICE[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_LOCK_STATE_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_LOCK_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_UNLOCK_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_URI_DATA_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_FLAGS_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_ADV_POWER_LEVELS_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_TX_POWER_MODE_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_BEACON_PERIOD_CHAR[LENGTH_OF_LONG_UUID]; +extern const uint8_t UUID_RESET_CHAR[LENGTH_OF_LONG_UUID]; -extern const uint8_t BEACON_UUID[sizeof(UUID::ShortUUIDBytes_t)]; +extern const uint8_t BEACON_UUID[sizeof(ShortUUIDBytes_t)]; /** * @class URIBeaconConfigService @@ -232,8 +232,8 @@ * characteristics of this service. Attempts to do so are also applied to * the internal state of this service object. */ - void onDataWrittenCallback(const GattWriteCallbackParams *writeParams) { - uint16_t handle = writeParams->handle; + void onDataWrittenCallback(const GattCharacteristicWriteCBParams *writeParams) { + uint16_t handle = writeParams->charHandle; if (handle == lockChar.getValueHandle()) { // Validated earlier @@ -306,7 +306,7 @@ } private: - void lockAuthorizationCallback(GattWriteAuthCallbackParams *authParams) { + void lockAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) { if (lockedState) { authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION; } else if (authParams->len != sizeof(Lock_t)) { @@ -319,7 +319,7 @@ } - void unlockAuthorizationCallback(GattWriteAuthCallbackParams *authParams) { + void unlockAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) { if (!lockedState) { authParams->authorizationReply = AUTH_CALLBACK_REPLY_SUCCESS; } else if (authParams->len != sizeof(Lock_t)) { @@ -333,7 +333,7 @@ } } - void uriDataWriteAuthorizationCallback(GattWriteAuthCallbackParams *authParams) { + void uriDataWriteAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) { if (lockedState) { authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION; } else if (authParams->offset != 0) { @@ -343,7 +343,7 @@ } } - void powerModeAuthorizationCallback(GattWriteAuthCallbackParams *authParams) { + void powerModeAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) { if (lockedState) { authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION; } else if (authParams->len != sizeof(uint8_t)) { @@ -358,7 +358,7 @@ } template <typename T> - void basicAuthorizationCallback(GattWriteAuthCallbackParams *authParams) { + void basicAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) { if (lockedState) { authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION; } else if (authParams->len != sizeof(T)) {