21#include <zephyr/bluetooth/gatt.h>
22#include <zephyr/bluetooth/conn.h>
27struct bt_hogp_rep_info;
47 struct bt_hogp_rep_info *rep,
59 struct bt_hogp_rep_info *rep,
104 const uint8_t *data,
size_t size,
size_t offset);
143struct bt_hogp_rep_info;
346 struct bt_hogp_rep_info *rep,
366 struct bt_hogp_rep_info *rep,
368 const void *data, uint8_t length);
387 struct bt_hogp_rep_info *rep,
388 const void *data, uint8_t length,
404 struct bt_hogp_rep_info *rep,
417 struct bt_hogp_rep_info *rep);
445 k_timeout_t timeout);
606 const struct bt_hogp_rep_info *rep);
bt_hids_report_type
Report types as defined in the Report Reference Characteristic descriptor.
Definition hids.h:84
bt_hids_pm
Possible values for the Protocol Mode Characteristic value.
Definition hids.h:74
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.
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:103
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:58
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.
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.
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:46
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:89
void bt_hogp_abort_all(struct bt_hogp *hogp)
Abort all pending transfers.
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_pm_update_cb)(struct bt_hogp *hogp)
Callback function that is called when the protocol mode is updated.
Definition hogp.h:113
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.
void(* bt_hogp_ready_cb)(struct bt_hogp *hogp)
Callback function that is called when the HIDS client is ready.
Definition hogp.h:73
HID Service information.
Definition hids.h:100
uint16_t info
Definition hogp.h:166
uint16_t pm
Definition hogp.h:162
uint16_t cp
Definition hogp.h:168
uint16_t rep_map
Definition hogp.h:164
bt_hogp_prep_fail_cb prep_error_cb
Function to call if HID preparation fails.
Definition hogp.h:126
bt_hogp_pm_update_cb pm_update_cb
Function to call when the protocol mode is updated.
Definition hogp.h:133
bt_hogp_ready_cb ready_cb
Function to call when the HID client is ready.
Definition hogp.h:122
HIDS client parameters for the initialization function.
Definition hogp.h:118
struct bt_hids_info info_val
Definition hogp.h:158
enum bt_hids_pm pm
Definition hogp.h:234
struct bt_conn * conn
Definition hogp.h:156
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:194
struct bt_hogp::@176 init_repref
struct k_sem read_params_sem
The semaphore for common read parameters protection.
Definition hogp.h:201
struct bt_hogp_rep_info ** rep_info
Definition hogp.h:228
bool ready
Definition hogp.h:232
struct bt_hogp_rep_info * kbd_inp
Definition hogp.h:218
uint8_t rep_idx
Definition hogp.h:209
struct bt_hogp_rep_info * kbd_out
Definition hogp.h:223
struct bt_hogp_rep_info * mouse_inp
Definition hogp.h:225
bt_hogp_prep_fail_cb prep_error_cb
Callback for HIDS client preparation failed.
Definition hogp.h:178
bt_hogp_ready_cb ready_cb
Callback for HIDS client ready (see bt_hogp_ready_cb).
Definition hogp.h:174
struct bt_hogp::bt_hogp_handlers handlers
struct bt_hogp::@177 rep_boot
bt_hogp_pm_update_cb pm_update_cb
Callback for protocol mode updated.
Definition hogp.h:182
bt_hogp_map_cb map_cb
Callback for report map data chunk received.
Definition hogp.h:186
uint8_t rep_count
Definition hogp.h:230
HOGP object.
Definition hogp.h:154