11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_HID_DEVICE_H_
12#define ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_HID_DEVICE_H_
39#define BT_HID_PROTOCOL_BOOT_MODE 0x00
41#define BT_HID_PROTOCOL_REPORT_MODE 0x01
52#define BT_HID_REPORT_TYPE_INPUT 0x01
54#define BT_HID_REPORT_TYPE_OUTPUT 0x02
56#define BT_HID_REPORT_TYPE_FEATURE 0x03
220 void (*
suspend)(
struct bt_hid_device *hid,
bool suspended);
Bluetooth connection handling.
int bt_hid_device_input_report(struct bt_hid_device *hid, struct net_buf *buf)
Send a HID interrupt input report to the HID host.
int bt_hid_device_register(const struct bt_hid_device_cb *cb)
Register HID device callbacks.
int bt_hid_device_unregister(void)
Unregister HID device callbacks and disable HID services.
struct bt_conn * bt_hid_device_get_conn(struct bt_hid_device *hid)
Obtain the ACL connection associated with a HID device.
int bt_hid_device_virtual_cable_unplug(struct bt_hid_device *hid)
Trigger a virtual cable unplug procedure for the given HID association.
struct net_buf * bt_hid_device_create_pdu(struct net_buf_pool *pool)
Allocate/create a PDU buffer suitable for HID over L2CAP.
int bt_hid_device_disconnect(struct bt_hid_device *hid)
Disconnect a previously connected HID association.
int bt_hid_device_connect(struct bt_conn *conn, struct bt_hid_device **hid)
Initiate an outgoing HID association on the given connection.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Opaque type representing a connection to a remote device.
Callbacks supplied by the HID application.
Definition hid_device.h:68
int(* set_protocol)(struct bt_hid_device *hid, uint8_t protocol)
Set_Protocol request callback.
Definition hid_device.h:161
int(* get_report)(struct bt_hid_device *hid, uint8_t type, bool size_present, struct net_buf *req, struct net_buf *rsp)
Get_Report request callback.
Definition hid_device.h:144
int(* set_report)(struct bt_hid_device *hid, uint8_t type, struct net_buf *buf)
Set_Report request callback.
Definition hid_device.h:107
void(* suspend)(struct bt_hid_device *hid, bool suspended)
Suspend/Exit-Suspend notification callback.
Definition hid_device.h:220
void(* vc_unplug)(struct bt_hid_device *hid)
Virtual Cable Unplug notification callback.
Definition hid_device.h:198
void(* connected)(struct bt_hid_device *hid)
connected callback to application
Definition hid_device.h:77
void(* disconnected)(struct bt_hid_device *hid)
disconnected callback to application
Definition hid_device.h:88
void(* output_report)(struct bt_hid_device *hid, struct net_buf *buf)
Output report callback.
Definition hid_device.h:173
Network buffer pool representation.
Definition net_buf.h:1184
Network buffer representation.
Definition net_buf.h:1048