Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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.

Detailed Description

HID Service callbacks.

Field Documentation

◆ ctrl_point

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.

Parameters
connConnection of the Host that wrote the characteristic.
cmdCommand the Host wrote. The commands the service does not implement are rejected and never reach this callback.

◆ set_report

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.

Parameters
connConnection of the Host that wrote the Report.
report_typeReport Type of the Report written, either BT_HIDS_REPORT_TYPE_OUTPUT or BT_HIDS_REPORT_TYPE_FEATURE.
report_idReport ID of the Report written, as supplied to bt_hids_register().
dataReport payload, excluding the Report ID byte. Valid for the duration of the callback only.
lenLength of data in bytes, at most CONFIG_BT_HIDS_MAX_REPORT_LEN.

The documentation for this struct was generated from the following file:
  • zephyr/bluetooth/services/hids.h