This commit is contained in:
Steven Dan
2026-04-14 21:17:56 +08:00
parent b0e1ef869e
commit 6d554c5089
6 changed files with 76 additions and 26 deletions

View File

@@ -9,12 +9,15 @@
#include "xua_hid.h"
#include "xua_hid_report.h"
#include "user_hid.h"
#include "xc_ptr.h"
#define DEBUG_UNIT HID_XC
#define DEBUG_PRINT_ENABLE_HID_XC 0
#include "debug_print.h"
#if XUA_HID_ENABLED
extern unsigned g_log_switch;
static unsigned HidCalcNewReportTime( const unsigned currentPeriod, const unsigned reportTime, const unsigned reportToSetIdleInterval, const unsigned newPeriod );
static unsigned HidCalcReportToSetIdleInterval( const unsigned reportTime );
static unsigned HidFindSetIdleActivationPoint( const unsigned currentPeriod, const unsigned timeWithinPeriod );
@@ -46,8 +49,13 @@ XUD_Result_t HidInterfaceClassRequests(
process_read_params(&buffer[1]);
#endif
#if DEBUG_MEMORY_LOG_ENABLED
ret_len = 65;
unsigned log_switch;
GET_SHARED_GLOBAL(log_switch, g_log_switch);
if (log_switch) {
ret_len = 65;
UserReadHIDLog(&buffer[1]);
}
#endif
#if 0
debug_printf("%d:\n", ret_len);
@@ -84,7 +92,7 @@ XUD_Result_t HidInterfaceClassRequests(
}
if (buffer[1] == 0x77 && ((buffer[2] >= 0x82) || (buffer[2] == 0x5b)))
if (buffer[1] == 0x77 && ((buffer[2] >= 0x70) || (buffer[2] == 0x5b)))
{
process_send_params(&buffer[1], datalength - 1);
}