summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAdam Malinowski <a.malinowsk2@partner.samsung.com>2020-02-17 17:20:18 +0100
committerAdam Malinowski <a.malinowsk2@partner.samsung.com>2020-02-17 17:20:18 +0100
commit9dd189d973da64e033a0c5c2adb3d94b23153d94 (patch)
tree650b89ae64c6880d3efc6b8c848fbe4ac24484a4 /src/main.cpp
parent204f4f2e7e02addabe2e221b3b6c7bb91997e2a2 (diff)
downloadsd-mux-9dd189d973da64e033a0c5c2adb3d94b23153d94.tar.gz
sd-mux-9dd189d973da64e033a0c5c2adb3d94b23153d94.tar.bz2
sd-mux-9dd189d973da64e033a0c5c2adb3d94b23153d94.zip
Increase power off time for USB deviceHEADmaster
USB SSD drives seem to have big enough capacitors to keep them powered for more than 100ms. This change increase the power off time to 500ms to let them discharge and reset the drive properly. Change-Id: I5e1f647d3d6ce72881bd628de7ef23255ea844ff
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9224422..2cfda4d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -46,6 +46,7 @@
#define DELAY_100MS 100000
+#define DELAY_500MS 500000
#define CCDT_SDMUX_STR "sd-mux"
#define CCDT_SDWIRE_STR "sd-wire"
@@ -505,7 +506,7 @@ int selectTarget(Target target, CCOptionValue options[]) {
if (target == T_DUT) {
pinState &= ~UM_DEVICE_PWR;
ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS);
- usleep(DELAY_100MS);
+ usleep(DELAY_500MS);
pinState |= UM_DEVICE_PWR;
ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS);
usleep(DELAY_100MS);
@@ -517,7 +518,7 @@ int selectTarget(Target target, CCOptionValue options[]) {
pinState &= ~UM_DUT_LED;
pinState &= ~UM_DEVICE_PWR;
ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS);
- usleep(DELAY_100MS);
+ usleep(DELAY_500MS);
pinState |= UM_DEVICE_PWR;
ret |= ftdi_set_bitmode(ftdi, pinState, BITMODE_CBUS);
usleep(DELAY_100MS);