From a4108e7b0b5b7ec0346fa28d03bd39d9f0df5846 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Thu, 22 Apr 2021 09:05:46 +0200 Subject: [PATCH] Bluetooth: GATT: Add documentation for empty notifications in callback Adds documentation specifically for empty notification in the bt_gatt_notify_func_t callback, as that works a bit different from e.g. reading an empty characteristic. Signed-off-by: Emil Gydesen --- include/bluetooth/gatt.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/bluetooth/gatt.h b/include/bluetooth/gatt.h index a0091db40b1..3dd2a8a889b 100644 --- a/include/bluetooth/gatt.h +++ b/include/bluetooth/gatt.h @@ -1454,6 +1454,10 @@ struct bt_gatt_subscribe_params; /** @typedef bt_gatt_notify_func_t * @brief Notification callback function * + * In the case of an empty notification, the @p data pointer will be non-NULL + * while the @p length will be 0, which is due to the special case where + * a @p data NULL pointer means unsubscribed. + * * @param conn Connection object. May be NULL, indicating that the peer is * being unpaired * @param params Subscription parameters.