forked from PAWPAW-Mirror/lib_xua
Add hidReportIdInUse command to determine whether report IDs are used
This commit is contained in:
@@ -242,6 +242,13 @@ unsigned hidGetReportIdLimit ( void ) {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
unsigned hidIsReportIdInUse ( void ) {
|
||||
if ( hidGetElementReportId( hidReports[ 0 ]->location ) ) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define HID_CONFIGURABLE_ELEMENT_COUNT ( sizeof hidConfigurableElements / sizeof ( USB_HID_Report_Element_t* ))
|
||||
unsigned hidGetReportItem(
|
||||
const unsigned id,
|
||||
|
||||
@@ -181,6 +181,19 @@ size_t hidGetReportDescriptorLength( void );
|
||||
*/
|
||||
unsigned hidGetReportIdLimit ( void );
|
||||
|
||||
/**
|
||||
* @brief Does the application use Report IDs?
|
||||
*
|
||||
* If the application is not using Report IDs, then the id value that is passed around
|
||||
* everywhere can just be zero. Otherwise zero is an invalid ID that has a special meaning
|
||||
* in some cases (read the documentation for each function).
|
||||
*
|
||||
* @return Boolean
|
||||
* @retval 1 Report IDs are in use
|
||||
* @retval 0 Report IDs are not in use
|
||||
*/
|
||||
unsigned hidIsReportIdInUse ( void );
|
||||
|
||||
/**
|
||||
* @brief Get a HID Report descriptor item
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user