aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Chiu <dchiu@synaptics.com>2021-12-22 10:34:45 +0800
committerVincent Huang <vincenthsw@gmail.com>2021-12-22 15:12:10 +0800
commitf28f77e264e25a15d87a9deffd8d693be0cb9dd6 (patch)
tree37ab47331947f9588e13077c93ce4d3749decdd9
parent386d65d4887fbc7a1b940041673e44a43baa8af6 (diff)
downloadrmi4utils-f28f77e264e25a15d87a9deffd8d693be0cb9dd6.tar.gz
Define the waiting time period for read partition.
-rwxr-xr-xrmi4update/rmi4update.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/rmi4update/rmi4update.cpp b/rmi4update/rmi4update.cpp
index e05684e..282fb90 100755
--- a/rmi4update/rmi4update.cpp
+++ b/rmi4update/rmi4update.cpp
@@ -61,6 +61,7 @@
#define RMI_F34_ERASE_WAIT_MS (5 * 1000)
#define RMI_F34_ERASE_V8_WAIT_MS (10000)
#define RMI_F34_IDLE_WAIT_MS 500
+#define RMI_F34_PARTITION_READ_WAIT_MS 20
/* Most recent device status event */
#define RMI_F01_STATUS_CODE(status) ((status) & 0x0f)
@@ -387,7 +388,7 @@ int RMI4Update::ReadFlashConfig()
if(m_device.GetDeviceType() == RMI_DEVICE_TYPE_TOUCHPAD) {
// Sleep 20 ms and wait for attention for touchpad only.
Sleep(20);
- rc = WaitForIdle(20, false);
+ rc = WaitForIdle(RMI_F34_PARTITION_READ_WAIT_MS, false);
if (rc != UPDATE_SUCCESS) {
fprintf(stderr, "%s: %s\n", __func__, update_err_to_string(rc));
return UPDATE_FAIL_TIMEOUT_WAITING_FOR_ATTN;