Bluetooth: GATT: Allow Characterist to be used with bt_gatt_notify

Since BT_GATT_CHARACTERISTIC now expands to 2 attributes it may be
confusing to use bt_gatt_notify as that expects the Value attribute to
be given which is no longer visible, so this enables the user to use
the Characteristic attribute in addition to its value.

Fixes #8231

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2018-06-07 12:41:34 +03:00 committed by Anas Nashif
commit c3edc82fe7
2 changed files with 22 additions and 8 deletions

View file

@ -683,12 +683,14 @@ ssize_t bt_gatt_attr_read_cpf(struct bt_conn *conn,
* all peer that have notification enabled via CCC otherwise do a direct
* notification only the given connection.
*
* The attribute object must be the so called Characteristic Value Descriptor,
* its usually declared with BT_GATT_DESCRIPTOR after BT_GATT_CHARACTERISTIC
* and before BT_GATT_CCC.
* The attribute object can be the so called Characteristic Declaration,
* which is usually declared with BT_GATT_CHARACTERISTIC followed by
* BT_GATT_CCC, or the Characteristic Value Declaration which is automatically
* created after the Characteristic Declaration when using
* BT_GATT_CHARACTERISTIC.
*
* @param conn Connection object.
* @param attr Characteristic Value Descriptor attribute.
* @param attr Characteristic or Characteristic Value attribute.
* @param data Pointer to Attribute data.
* @param len Attribute value length.
*/