|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
HID Service callbacks. More...
#include <zephyr/bluetooth/services/hids.h>
Data Fields | |
| void(* | set_report )(struct bt_conn *conn, enum bt_hids_report_type report_type, uint8_t report_id, const uint8_t *data, uint16_t len) |
| Called when a Host writes an Output or Feature Report. | |
| void(* | ctrl_point )(struct bt_conn *conn, enum bt_hids_ctrl_point cmd) |
| Called when a Host writes the HID Control Point. | |
HID Service callbacks.
| void(* bt_hids_cb::ctrl_point) (struct bt_conn *conn, enum bt_hids_ctrl_point cmd) |
Called when a Host writes the HID Control Point.
The Suspend state is per Host, and the service does not keep it, so an application that acts on it tracks it per conn.
| conn | Connection of the Host that wrote the characteristic. |
| cmd | Command the Host wrote. The commands the service does not implement are rejected and never reach this callback. |
| void(* bt_hids_cb::set_report) (struct bt_conn *conn, enum bt_hids_report_type report_type, uint8_t report_id, const uint8_t *data, uint16_t len) |
Called when a Host writes an Output or Feature Report.
A write longer than CONFIG_BT_HIDS_MAX_REPORT_LEN is rejected with an ATT Invalid Attribute Value Length error and this callback is not called.
| conn | Connection of the Host that wrote the Report. |
| report_type | Report Type of the Report written, either BT_HIDS_REPORT_TYPE_OUTPUT or BT_HIDS_REPORT_TYPE_FEATURE. |
| report_id | Report ID of the Report written, as supplied to bt_hids_register(). |
| data | Report payload, excluding the Report ID byte. Valid for the duration of the callback only. |
| len | Length of data in bytes, at most CONFIG_BT_HIDS_MAX_REPORT_LEN. |