Bluetooth: ATT: Add bt_att_get_mtu
This can be used to check what is the configured MTU for the given connection. Change-Id: I292b06dbe079fbd567cd8d39615cfbc3dad6b2a5 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
2ee7df52f4
commit
752315a082
2 changed files with 8 additions and 0 deletions
|
@ -1451,6 +1451,13 @@ void bt_att_init(void)
|
|||
bt_l2cap_chan_register(&chan);
|
||||
}
|
||||
|
||||
uint16_t bt_att_get_mtu(struct bt_conn *conn)
|
||||
{
|
||||
struct bt_att *att = conn->att;
|
||||
|
||||
return att->mtu;
|
||||
}
|
||||
|
||||
int bt_att_send(struct bt_conn *conn, struct bt_buf *buf, bt_att_func_t func,
|
||||
void *user_data, bt_att_destroy_t destroy)
|
||||
{
|
||||
|
|
|
@ -275,6 +275,7 @@ struct bt_att_signed_write_cmd {
|
|||
} __packed;
|
||||
|
||||
void bt_att_init();
|
||||
uint16_t bt_att_get_mtu(struct bt_conn *conn);
|
||||
struct bt_buf *bt_att_create_pdu(struct bt_conn *conn, uint8_t op, size_t len);
|
||||
|
||||
typedef void (*bt_att_func_t)(struct bt_conn *conn, uint8_t err,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue