21#include <zephyr/bluetooth/gatt.h>
22#include <zephyr/bluetooth/conn.h>
27struct bt_hogp_rep_info;
48 struct bt_hogp_rep_info *rep,
60 struct bt_hogp_rep_info *rep,
105 const uint8_t *data,
size_t size,
size_t offset);
144struct bt_hogp_rep_info;
191 struct bt_conn_le_min_conn_interval_group
groups[BT_CONN_LE_MAX_CONN_INTERVAL_GROUPS];
209#if defined(CONFIG_BT_HOGP_SCI)
227#if defined(CONFIG_BT_HOGP_SCI)
233 uint16_t sci_mode_ccc;
413 struct bt_hogp_rep_info *rep,
433 struct bt_hogp_rep_info *rep,
435 const void *data, uint8_t length);
454 struct bt_hogp_rep_info *rep,
455 const void *data, uint8_t length,
471 struct bt_hogp_rep_info *rep,
489 struct bt_hogp_rep_info *rep);
517 k_timeout_t timeout);
763 const struct bt_hogp_rep_info *rep);
bt_hids_report_type
Report types as defined in the Report Reference Characteristic descriptor.
Definition hids.h:99
bt_hids_pm
Possible values for the Protocol Mode Characteristic value.
Definition hids.h:89
bt_hids_sci_mode_value
HID SCI Mode values.
Definition hids.h:154
struct bt_hogp_rep_info * bt_hogp_rep_find(struct bt_hogp *hogp, enum bt_hids_report_type type, uint8_t id)
Find a report.
enum bt_hids_pm bt_hogp_pm_get(const struct bt_hogp *hogp)
Get the current protocol mode.
bool bt_hogp_sci_low_power_mode_supported(const struct bt_hogp *hogp)
Check if the HID device supports SCI Low Power mode.
struct bt_hogp_rep_info * bt_hogp_rep_boot_mouse_in(struct bt_hogp *hogp)
Access boot mouse input report.
void(* bt_hogp_map_cb)(struct bt_hogp *hogp, uint8_t err, const uint8_t *data, size_t size, size_t offset)
Callback function that is called when a chunk of a report map data is received.
Definition hogp.h:104
void(* bt_hogp_write_cb)(struct bt_hogp *hogp, struct bt_hogp_rep_info *rep, uint8_t err)
Callback function that is called when a write response is received.
Definition hogp.h:59
int bt_hogp_suspend(struct bt_hogp *hogp)
Suspend the device.
const struct bt_hids_info * bt_hogp_conn_info_val(const struct bt_hogp *hogp)
Access the HID information value.
int bt_hogp_sci_info_get(struct bt_hogp *hogp, struct bt_hogp_sci_info *sci_info)
Get the cached HID SCI Information.
struct bt_hogp_rep_info * bt_hogp_rep_boot_kbd_in(struct bt_hogp *hogp)
Access boot keyboard input report.
void * bt_hogp_rep_user_data(const struct bt_hogp_rep_info *rep)
Get user data from report.
int bt_hogp_handles_assign(struct bt_gatt_dm *dm, struct bt_hogp *hogp)
Assign handlers to the HIDS client instance.
int bt_hogp_rep_read(struct bt_hogp *hogp, struct bt_hogp_rep_info *rep, bt_hogp_read_cb func)
Send a read request addressing the report value descriptor.
struct bt_hogp_rep_info * bt_hogp_rep_next(struct bt_hogp *hogp, const struct bt_hogp_rep_info *rep)
Get the next report in the HOGP object.
int bt_hogp_rep_write_wo_rsp(struct bt_hogp *hogp, struct bt_hogp_rep_info *rep, const void *data, uint8_t length, bt_hogp_write_cb func)
Send a write command addressing the report value descriptor.
int bt_hogp_rep_unsubscribe(struct bt_hogp *hogp, struct bt_hogp_rep_info *rep)
Remove the subscription for a selected report.
int bt_hogp_pm_update(struct bt_hogp *hogp, k_timeout_t timeout)
Read the current protocol mode from the server.
bool bt_hogp_ready_check(const struct bt_hogp *hogp)
Check if the HIDS client is ready to work.
bool bt_hogp_assign_check(const struct bt_hogp *hogp)
Check if the assignment function was called.
int bt_hogp_rep_write(struct bt_hogp *hogp, struct bt_hogp_rep_info *rep, bt_hogp_write_cb func, const void *data, uint8_t length)
Send a write request addressing the report value descriptor.
struct bt_conn * bt_hogp_conn(const struct bt_hogp *hogp)
Get the connection object from the HIDS client.
struct bt_hogp_rep_info * bt_hogp_rep_boot_kbd_out(struct bt_hogp *hogp)
Access boot keyboard output report.
bool bt_hogp_sci_supported(const struct bt_hogp *hogp)
Check if the HID device supports SCI.
int bt_hogp_sci_mode_subscribe(struct bt_hogp *hogp, bt_hogp_sci_mode_changed_cb func)
Subscribe to HID SCI mode changed notifications.
uint8_t(* bt_hogp_read_cb)(struct bt_hogp *hogp, struct bt_hogp_rep_info *rep, uint8_t err, const uint8_t *data)
Callback function that is called when a notification or read response is received.
Definition hogp.h:47
void(* bt_hogp_prep_fail_cb)(struct bt_hogp *hogp, int err)
Callback function that is called when an error is detected during HIDS client preparation.
Definition hogp.h:90
void bt_hogp_abort_all(struct bt_hogp *hogp)
Abort all pending transfers.
int bt_hogp_sci_mode_unsubscribe(struct bt_hogp *hogp)
Unsubscribe from SCI mode changed notifications.
void(* bt_hogp_sci_mode_read_cb)(struct bt_hogp *hogp, int err, enum bt_hids_sci_mode_value mode)
Callback function that is called when a HID SCI mode read is completed.
Definition hogp.h:162
int bt_hogp_sci_mode_read(struct bt_hogp *hogp, bt_hogp_sci_mode_read_cb func)
Read the current HID SCI mode from the HID device.
uint8_t bt_hogp_rep_id(const struct bt_hogp_rep_info *rep)
Get report identifier.
int bt_hogp_map_read(struct bt_hogp *hogp, bt_hogp_map_cb func, size_t offset, k_timeout_t timeout)
Read part of the report map.
int bt_hogp_exit_suspend(struct bt_hogp *hogp)
Exit suspend and resume.
size_t bt_hogp_rep_size(const struct bt_hogp_rep_info *rep)
Get report size.
void bt_hogp_init(struct bt_hogp *hogp, const struct bt_hogp_init_params *params)
Initialize the HIDS client instance.
int bt_hogp_pm_write(struct bt_hogp *hogp, enum bt_hids_pm pm)
Set the current protocol mode.
void bt_hogp_rep_user_data_set(struct bt_hogp_rep_info *rep, void *data)
Set user data in report.
void(* bt_hogp_sci_mode_changed_cb)(struct bt_conn *conn, enum bt_hids_sci_mode_value mode)
Callback function that is called when the HID SCI mode changed GATT notification is received.
Definition hogp.h:152
void(* bt_hogp_pm_update_cb)(struct bt_hogp *hogp)
Callback function that is called when the protocol mode is updated.
Definition hogp.h:114
int bt_hogp_rep_subscribe(struct bt_hogp *hogp, struct bt_hogp_rep_info *rep, bt_hogp_read_cb func)
Subscribe to report notifications.
size_t bt_hogp_rep_count(const struct bt_hogp *hogp)
Get the number of HID reports in the device.
void bt_hogp_release(struct bt_hogp *hogp)
Release the HIDS client instance.
enum bt_hids_report_type bt_hogp_rep_type(const struct bt_hogp_rep_info *rep)
Get report type.
int bt_hogp_sci_mode_req(struct bt_hogp *hogp, enum bt_hids_sci_mode_value mode)
Request HID SCI mode activation.
void(* bt_hogp_ready_cb)(struct bt_hogp *hogp)
Callback function that is called when the HIDS client is ready.
Definition hogp.h:74
HID Service information.
Definition hids.h:115
uint16_t info
Definition hogp.h:224
uint16_t pm
Definition hogp.h:220
uint16_t cp
Definition hogp.h:226
uint16_t rep_map
Definition hogp.h:222
bt_hogp_prep_fail_cb prep_error_cb
Function to call if HID preparation fails.
Definition hogp.h:127
bt_hogp_pm_update_cb pm_update_cb
Function to call when the protocol mode is updated.
Definition hogp.h:134
bt_hogp_ready_cb ready_cb
Function to call when the HID client is ready.
Definition hogp.h:123
HIDS client parameters for the initialization function.
Definition hogp.h:119
struct bt_conn_le_min_conn_interval_group groups[BT_CONN_LE_MAX_CONN_INTERVAL_GROUPS]
Definition hogp.h:191
uint8_t num_groups
Definition hogp.h:188
uint8_t min_supported_conn_interval_125us
Definition hogp.h:185
SCI Information.
Definition hogp.h:183
bt_hogp_sci_mode_changed_cb notify_cb
Definition hogp.h:172
bt_hogp_sci_mode_read_cb read_cb
Definition hogp.h:178
struct bt_gatt_subscribe_params notify_params
Definition hogp.h:175
SCI mode data.
Definition hogp.h:170
struct bt_hids_info info_val
Definition hogp.h:207
enum bt_hids_pm pm
Definition hogp.h:301
struct bt_conn * conn
Definition hogp.h:205
struct bt_gatt_read_params read_params
Internal read parameters used when reading Protocol Mode or Report Map. This struct might also be use...
Definition hogp.h:260
struct k_sem read_params_sem
The semaphore for common read parameters protection.
Definition hogp.h:268
struct bt_hogp_rep_info ** rep_info
Definition hogp.h:295
struct bt_hogp::@163 rep_boot
bool ready
Definition hogp.h:299
struct bt_hogp_rep_info * kbd_inp
Definition hogp.h:285
uint8_t rep_idx
Definition hogp.h:276
struct bt_hogp_rep_info * kbd_out
Definition hogp.h:290
struct bt_hogp_rep_info * mouse_inp
Definition hogp.h:292
bt_hogp_prep_fail_cb prep_error_cb
Callback for HIDS client preparation failed.
Definition hogp.h:244
bt_hogp_ready_cb ready_cb
Callback for HIDS client ready (see bt_hogp_ready_cb).
Definition hogp.h:240
struct bt_hogp::@162 init_repref
struct bt_hogp::bt_hogp_handlers handlers
bt_hogp_pm_update_cb pm_update_cb
Callback for protocol mode updated.
Definition hogp.h:248
bt_hogp_map_cb map_cb
Callback for report map data chunk received.
Definition hogp.h:252
uint8_t rep_count
Definition hogp.h:297
HOGP object.
Definition hogp.h:203