From b88342ab2b12fd3dd510fde91fe663089576ff30 Mon Sep 17 00:00:00 2001 From: Ciaran Woodward Date: Tue, 21 Dec 2021 11:21:06 +0000 Subject: [PATCH] Add new hid page ID constant --- lib_xua/src/hid/hid_report.c | 6 ++++++ lib_xua/src/hid/xua_hid_report_descriptor_constants.h | 1 + 2 files changed, 7 insertions(+) diff --git a/lib_xua/src/hid/hid_report.c b/lib_xua/src/hid/hid_report.c index a514ff08..90a0d4d4 100644 --- a/lib_xua/src/hid/hid_report.c +++ b/lib_xua/src/hid/hid_report.c @@ -152,12 +152,17 @@ void hidCaptureReportTime( const unsigned id, const unsigned time ) void hidClearChangePending( const unsigned id ) { + printf("ccp%d", id); for( size_t idx = 0U; idx < HID_REPORT_COUNT; ++idx) { if(( id == 0U ) || ( id == hidGetElementReportId( hidReports[ idx ]->location ))) { + if( !s_hidChangePending[ idx ] ) + printf(""); s_hidChangePending[ idx ] = 0U; + printf("y"); break; } } + printf("\n"); } static unsigned hidGetElementBitLocation( const unsigned short location ) @@ -416,6 +421,7 @@ void hidSetChangePending( const unsigned id ) { for( size_t idx = 0U; idx < HID_REPORT_COUNT; ++idx) { if( id == hidGetElementReportId( hidReports[ idx ]->location )) { + printf("Set cp idx %d\n", idx); s_hidChangePending[ idx ] = 1U; break; } diff --git a/lib_xua/src/hid/xua_hid_report_descriptor_constants.h b/lib_xua/src/hid/xua_hid_report_descriptor_constants.h index 0ff1c4de..f35d7bd3 100644 --- a/lib_xua/src/hid/xua_hid_report_descriptor_constants.h +++ b/lib_xua/src/hid/xua_hid_report_descriptor_constants.h @@ -58,6 +58,7 @@ // Constants from HID Usage Tables // Usage page IDs (incomplete) +#define USB_HID_USAGE_PAGE_ID_GENERIC_DESKTOP ( 0x01 ) #define USB_HID_USAGE_PAGE_ID_KEYBOARD ( 0x07 ) #define USB_HID_USAGE_PAGE_ID_TELEPHONY_DEVICE ( 0x0B ) #define USB_HID_USAGE_PAGE_ID_CONSUMER ( 0x0C )