From 5e99ea8d7e387ba165f723672e6856b1242c6034 Mon Sep 17 00:00:00 2001 From: Paul Szczeanek Date: Wed, 23 Dec 2020 11:58:11 +0000 Subject: [PATCH] correct the documentation for GattServer::addService --- connectivity/FEATURE_BLE/include/ble/GattServer.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/connectivity/FEATURE_BLE/include/ble/GattServer.h b/connectivity/FEATURE_BLE/include/ble/GattServer.h index f14126bc02..682911159e 100644 --- a/connectivity/FEATURE_BLE/include/ble/GattServer.h +++ b/connectivity/FEATURE_BLE/include/ble/GattServer.h @@ -316,14 +316,18 @@ public: * * The process assigns a unique attribute handle to all the elements added * into the attribute table. This handle is an ID that must be used for - * subsequent interractions with the elements. + * subsequent interactions with the elements. * * @note There is no mirror function that removes a single service. * Application code can remove all the registered services by calling * reset(). * - * @attention Service, characteristics and descriptors objects registered - * within the GattServer must remain reachable until reset() is called. + * @attention GattServer allocates its own memory for all the attributes. + * The GattServer will set the handles on the service passed in and the + * characteristics it contains. You may record the handles you want to + * interact with in the future. After that the service and characteristics + * you passed in as the parameter may be freed. To write to the GattServer + * instances of the characteristics you have to use the saved handles. * * @param[in] service The service to be added; attribute handle of services, * characteristic and characteristic descriptors are updated by the