nRF Connect SDK API 0.1.0
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
69int hid_reportq_report_add(struct hid_reportq *q, const void *src_id, uint8_t rep_id,
70 const uint8_t *data, size_t size);
71
79void hid_reportq_report_sent(struct hid_reportq *q, uint8_t rep_id, bool err);
80
89bool hid_reportq_is_subscribed(struct hid_reportq *q, uint8_t rep_id);
90
97void hid_reportq_subscribe(struct hid_reportq *q, uint8_t rep_id);
98
105void hid_reportq_unsubscribe(struct hid_reportq *q, uint8_t rep_id);
106
107#ifdef __cplusplus
108}
109#endif
110
115#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.