diff options
author | Satoshi Noguchi <satoshi.noguchi@jp.synaptics.com> | 2014-09-29 02:45:30 -0700 |
---|---|---|
committer | Satoshi Noguchi <satoshi.noguchi@jp.synaptics.com> | 2014-09-29 13:50:05 -0700 |
commit | 2230416db6b17770d7006b37bef08bff5c48cbf0 (patch) | |
tree | 311ed687f9cc681be8824cb59d909f222b112206 | |
parent | baf6bbac1ce5bb27f17b9c4fa9a4ab394af23542 (diff) | |
download | platform_external_rmi4utils-2230416db6b17770d7006b37bef08bff5c48cbf0.tar.gz platform_external_rmi4utils-2230416db6b17770d7006b37bef08bff5c48cbf0.tar.bz2 platform_external_rmi4utils-2230416db6b17770d7006b37bef08bff5c48cbf0.zip |
Have register base addresses in 16 bit in RMIFunction
-rw-r--r-- | rmidevice/rmidevice.cpp | 2 | ||||
-rw-r--r-- | rmidevice/rmifunction.cpp | 10 | ||||
-rw-r--r-- | rmidevice/rmifunction.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/rmidevice/rmidevice.cpp b/rmidevice/rmidevice.cpp index 38e4c23..6802d8e 100644 --- a/rmidevice/rmidevice.cpp +++ b/rmidevice/rmidevice.cpp @@ -282,7 +282,7 @@ int RMIDevice::ScanPDT(int endFunc, int endPage) return rc; } - RMIFunction func(entry); + RMIFunction func(entry, page_start); if (func.GetFunctionNumber() == 0) break; diff --git a/rmidevice/rmifunction.cpp b/rmidevice/rmifunction.cpp index a1121a7..d24aef0 100644 --- a/rmidevice/rmifunction.cpp +++ b/rmidevice/rmifunction.cpp @@ -27,13 +27,13 @@ #define RMI_FUNCTION_VERSION_MASK 0x60 #define RMI_FUNCTION_INTERRUPT_SOURCES_MASK 0x7 -RMIFunction::RMIFunction(const unsigned char * pdtEntry) +RMIFunction::RMIFunction(const unsigned char * pdtEntry, unsigned short pageBase) { if (pdtEntry) { - m_queryBase = pdtEntry[RMI_FUNCTION_QUERY_OFFSET]; - m_commandBase = pdtEntry[RMI_FUNCTION_COMMAND_OFFSET]; - m_controlBase = pdtEntry[RMI_FUNCTION_CONTROL_OFFSET]; - m_dataBase = pdtEntry[RMI_FUNCTION_DATA_OFFSET]; + m_queryBase = pdtEntry[RMI_FUNCTION_QUERY_OFFSET] + pageBase; + m_commandBase = pdtEntry[RMI_FUNCTION_COMMAND_OFFSET] + pageBase; + m_controlBase = pdtEntry[RMI_FUNCTION_CONTROL_OFFSET] + pageBase; + m_dataBase = pdtEntry[RMI_FUNCTION_DATA_OFFSET] + pageBase; m_interruptSourceCount = pdtEntry[RMI_FUNCTION_INTERRUPT_SOURCES_OFFSET] & RMI_FUNCTION_INTERRUPT_SOURCES_MASK; m_functionNumber = pdtEntry[RMI_FUNCTION_NUMBER]; diff --git a/rmidevice/rmifunction.h b/rmidevice/rmifunction.h index 84a6afd..287ad5a 100644 --- a/rmidevice/rmifunction.h +++ b/rmidevice/rmifunction.h @@ -22,7 +22,7 @@ class RMIFunction { public: RMIFunction() {} - RMIFunction(const unsigned char * pdtEntry); + RMIFunction(const unsigned char * pdtEntry, unsigned short pageBase); unsigned short GetQueryBase() { return m_queryBase; } unsigned short GetCommandBase() { return m_commandBase; } unsigned short GetControlBase() { return m_controlBase; } |