From c0a94c67dc4d64cca7193ab0584d8496bc572d8f Mon Sep 17 00:00:00 2001 From: David Chiu Date: Thu, 9 Dec 2021 16:58:17 +0800 Subject: Add timeout 10 ms for select() and resend scheme in Read() to avoid indefinitely loop because of wrong report ID in return. --- rmidevice/rmidevice.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'rmidevice/rmidevice.cpp') diff --git a/rmidevice/rmidevice.cpp b/rmidevice/rmidevice.cpp index 15335f9..029e614 100644 --- a/rmidevice/rmidevice.cpp +++ b/rmidevice/rmidevice.cpp @@ -62,7 +62,6 @@ int RMIDevice::SetRMIPage(unsigned char page) if (m_page == page) return 0; - m_page = page; rc = Write(RMI_DEVICE_PAGE_SELECT_REGISTER, &page, 1); if (rc < 0 || rc < 1) { @@ -327,7 +326,7 @@ int RMIDevice::ScanPDT(int endFunc, int endPage) } m_numInterruptRegs = (interruptCount + 7) / 8; - + return 0; } -- cgit v1.2.3