use GattAttribute::Handle_t for GattServer::readValue and updateValue

This commit is contained in:
Rohit Grover 2015-02-24 09:32:02 +00:00
parent e3a8d803a6
commit 929136c446
2 changed files with 4 additions and 4 deletions

View file

@ -139,7 +139,7 @@ ble_error_t nRF51GattServer::addService(GattService &service)
@endcode
*/
/**************************************************************************/
ble_error_t nRF51GattServer::readValue(uint16_t charHandle, uint8_t buffer[], uint16_t *const lengthP)
ble_error_t nRF51GattServer::readValue(GattAttribute::Handle_t charHandle, uint8_t buffer[], uint16_t *const lengthP)
{
ASSERT( ERROR_NONE ==
sd_ble_gatts_value_get(nrfCharacteristicHandles[charHandle].value_handle, 0, lengthP, buffer),
@ -173,7 +173,7 @@ ble_error_t nRF51GattServer::readValue(uint16_t charHandle, uint8_t buffer[], ui
@endcode
*/
/**************************************************************************/
ble_error_t nRF51GattServer::updateValue(uint16_t charHandle, uint8_t buffer[], uint16_t len, bool localOnly)
ble_error_t nRF51GattServer::updateValue(GattAttribute::Handle_t charHandle, uint8_t buffer[], uint16_t len, bool localOnly)
{
uint16_t gapConnectionHandle = nRF51Gap::getInstance().getConnectionHandle();
ble_error_t returnValue = BLE_ERROR_NONE;

View file

@ -33,8 +33,8 @@ public:
/* Functions that must be implemented from GattServer */
virtual ble_error_t addService(GattService &);
virtual ble_error_t readValue(uint16_t handle, uint8_t buffer[], uint16_t *const lengthP);
virtual ble_error_t updateValue(uint16_t, uint8_t[], uint16_t, bool localOnly = false);
virtual ble_error_t readValue(GattAttribute::Handle_t handle, uint8_t buffer[], uint16_t *const lengthP);
virtual ble_error_t updateValue(GattAttribute::Handle_t, uint8_t[], uint16_t, bool localOnly = false);
virtual ble_error_t initializeGATTDatabase(void);
/* nRF51 Functions */