drivers/nble: Add initial implementation of bt_gatt_notify
Change-Id: I9a5ed5092e8ae8ce9f89f53334b43a2362b91bac Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
a7462f82a8
commit
dbaa3e38cf
2 changed files with 10 additions and 2 deletions
|
@ -348,7 +348,14 @@ int bt_gatt_attr_read_cpf(struct bt_conn *conn,
|
||||||
int bt_gatt_notify(struct bt_conn *conn, const struct bt_gatt_attr *attr,
|
int bt_gatt_notify(struct bt_conn *conn, const struct bt_gatt_attr *attr,
|
||||||
const void *data, uint16_t len)
|
const void *data, uint16_t len)
|
||||||
{
|
{
|
||||||
return -ENOSYS;
|
struct ble_gatt_send_notif_ind_params notif;
|
||||||
|
|
||||||
|
notif.conn_handle = 0xFFFF;
|
||||||
|
notif.params.attr = (struct bt_gatt_attr *)attr;
|
||||||
|
notif.params.offset = 0;
|
||||||
|
|
||||||
|
ble_gatt_send_notif_req(¬if, (uint8_t *)data, len);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bt_gatt_exchange_mtu(struct bt_conn *conn, bt_gatt_rsp_func_t func)
|
int bt_gatt_exchange_mtu(struct bt_conn *conn, bt_gatt_rsp_func_t func)
|
||||||
|
|
|
@ -122,7 +122,7 @@ struct ble_gatts_rw_reply_params {
|
||||||
* Notification/Indication parameters
|
* Notification/Indication parameters
|
||||||
*/
|
*/
|
||||||
struct ble_gatt_notif_ind_params {
|
struct ble_gatt_notif_ind_params {
|
||||||
uint16_t val_handle;
|
struct bt_gatt_attr *attr;
|
||||||
uint16_t offset;
|
uint16_t offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -131,6 +131,7 @@ struct ble_gatt_notif_ind_params {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct ble_gatt_send_notif_ind_params {
|
struct ble_gatt_send_notif_ind_params {
|
||||||
|
void *cback;
|
||||||
uint16_t conn_handle;
|
uint16_t conn_handle;
|
||||||
struct ble_gatt_notif_ind_params params;
|
struct ble_gatt_notif_ind_params params;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue