forked from PAWPAW-Mirror/lib_xua
Iterate through the correct set of HID Report IDs, plus some clean up.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "xua_hid_report.h"
|
||||
#include "user_hid.h"
|
||||
#include "xua_hid.h"
|
||||
unsigned char g_hidData[HID_MAX_DATA_BYTES] = {0};
|
||||
unsigned char g_hidData[HID_MAX_DATA_BYTES] = {0U};
|
||||
#endif
|
||||
|
||||
void GetADCCounts(unsigned samFreq, int &min, int &mid, int &max);
|
||||
@@ -894,13 +894,13 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
|
||||
|
||||
#if( 0 < HID_CONTROLS )
|
||||
/* HID Report Data */
|
||||
case hidIsChangePending(0U) || !HidIsSetIdleSilenced(0U) => XUD_SetData_Select(c_hid, ep_hid, result):
|
||||
case (hidIsChangePending(0U) || !HidIsSetIdleSilenced(0U)) => XUD_SetData_Select(c_hid, ep_hid, result):
|
||||
{
|
||||
timer tmr;
|
||||
unsigned reportTime;
|
||||
tmr :> reportTime;
|
||||
|
||||
for(unsigned id = 0U; id < hidGetReportIdLimit(); ++id) {
|
||||
for(unsigned id = hidIsReportIdInUse(); id < hidGetReportIdLimit(); ++id) {
|
||||
if(0U == id || (hidIsChangePending(id) || !HidIsSetIdleSilenced(id))) {
|
||||
hidCaptureReportTime(id, reportTime);
|
||||
int hidDataLength = (int) UserHIDGetData(id, g_hidData);
|
||||
|
||||
Reference in New Issue
Block a user