nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
hid_reportq.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef _HID_REPORTQ_H_
12#define _HID_REPORTQ_H_
13
21#ifdef __cplusplus
22extern "C" {
23#endif
24
26struct hid_reportq;
27
40struct hid_reportq *hid_reportq_alloc(const void *sub_id, uint8_t report_max);
41
47void hid_reportq_free(struct hid_reportq *q);
48
56const void *hid_reportq_get_sub_id(struct hid_reportq *q);
57
75int hid_reportq_report_add(struct hid_reportq *q, const void *src_id, uint8_t rep_id,
76 const uint8_t *data, size_t size);
77
85void hid_reportq_report_sent(struct hid_reportq *q, uint8_t rep_id, bool err);
86
95bool hid_reportq_is_subscribed(struct hid_reportq *q, uint8_t rep_id);
96
103void hid_reportq_subscribe(struct hid_reportq *q, uint8_t rep_id);
104
114void hid_reportq_unsubscribe(struct hid_reportq *q, uint8_t rep_id);
115
116#ifdef __cplusplus
117}
118#endif
119
124#endif /*_HID_REPORTQ_H_ */
void hid_reportq_subscribe(struct hid_reportq *q, uint8_t rep_id)
Subscribe for HID report with given ID.
int hid_reportq_report_add(struct hid_reportq *q, const void *src_id, uint8_t rep_id, const uint8_t *data, size_t size)
Add a HID report to the queue.
struct hid_reportq * hid_reportq_alloc(const void *sub_id, uint8_t report_max)
Allocate a HID report queue object instance.
void hid_reportq_unsubscribe(struct hid_reportq *q, uint8_t rep_id)
Unsubscribe from HID report with given ID.
void hid_reportq_free(struct hid_reportq *q)
Free HID report queue object instance.
void hid_reportq_report_sent(struct hid_reportq *q, uint8_t rep_id, bool err)
Notify HID report queue that HID report was sent.
const void * hid_reportq_get_sub_id(struct hid_reportq *q)
Get ID of HID subscriber related to a HID report queue object instance.
bool hid_reportq_is_subscribed(struct hid_reportq *q, uint8_t rep_id)
Check if HID report queue is subscribed for HID report with given ID.