nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ hid_reportq_report_add()

int hid_reportq_report_add ( struct hid_reportq * q,
const void * src_id,
uint8_t rep_id,
const uint8_t * data,
size_t size )

#include <applications/nrf_desktop/src/util/hid_reportq.h>

Add a HID report to the queue.

The function returns an error if HID report subscription is disabled for the added HID report.

If number of enqueued reports with a given report ID exceeds limit defined by the configuration (

CONFIG_DESKTOP_HID_REPORTQ_MAX_ENQUEUED_REPORTS 

), the oldest enqueued HID report with the ID is dropped.

Parameters
[in]qPointer to the queue instance.
[in]src_idID of HID report source.
[in]rep_idHID report ID.
[in]dataHID report data.
[in]sizeSize of the HID report data.
Returns
0 if the operation was successful. Otherwise, a (negative) error code is returned.