@@ -21,23 +21,38 @@ Subject: [PATCH 08/15] add dummy device for ledger
2121 create mode 100644 src/device/device_io_dummy.hpp
2222
2323diff --git a/CMakeLists.txt b/CMakeLists.txt
24- index 88335ee9d..86000f811 100644
24+ index c73b813d8..ce5ef4bab 100644
2525--- a/CMakeLists.txt
2626+++ b/CMakeLists.txt
27- @@ -693,8 +693,12 @@ include_directories(${LMDB_INCLUDE})
27+ @@ -692,16 +692,21 @@ include_directories(${LMDB_INCLUDE})
2828 include_directories(${LIBUNWIND_INCLUDE})
2929 link_directories(${LIBUNWIND_LIBRARY_DIRS})
3030
31+ - # Final setup for hid
32+ - if (HIDAPI_FOUND)
33+ - message(STATUS "Using HIDAPI include dir at ${HIDAPI_INCLUDE_DIR}")
34+ - add_definitions(-DHAVE_HIDAPI)
35+ - include_directories(${HIDAPI_INCLUDE_DIR})
36+ - link_directories(${LIBHIDAPI_LIBRARY_DIRS})
3137+ if (HIDAPI_DUMMY)
3238+ add_definitions(-DHIDAPI_DUMMY)
33- + endif()
39+ else()
40+ - message(STATUS "Could not find HIDAPI")
41+ + # Final setup for hid
42+ + if (HIDAPI_FOUND)
43+ + message(STATUS "Using HIDAPI include dir at ${HIDAPI_INCLUDE_DIR}")
44+ + add_definitions(-DHAVE_HIDAPI)
45+ + include_directories(${HIDAPI_INCLUDE_DIR})
46+ + link_directories(${LIBHIDAPI_LIBRARY_DIRS})
47+ + else()
48+ + message(STATUS "Could not find HIDAPI")
49+ + endif()
50+ endif()
51+
3452+
35- # Final setup for hid
36- - if (HIDAPI_FOUND)
37- + if (HIDAPI_FOUND)
38- message(STATUS "Using HIDAPI include dir at ${HIDAPI_INCLUDE_DIR}")
39- add_definitions(-DHAVE_HIDAPI)
40- include_directories(${HIDAPI_INCLUDE_DIR})
53+ # Trezor support check
54+ include(CheckTrezor)
55+
4156diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt
4257index e4f1159b5..14d398f87 100644
4358--- a/src/device/CMakeLists.txt
@@ -235,13 +250,13 @@ index 000000000..edb4beea3
235250+ MDEBUG("exchange(): waitsForDeviceSend");
236251+ // NOTE: waitsForDeviceSend should be changed by external code
237252+ while (waitsForDeviceSend) {
238- + usleep( 1000);
253+ + std::this_thread::sleep_for(std::chrono::microseconds( 1000) );
239254+ MDEBUG("exchange(): waitsForDeviceSend (still)");
240255+ }
241256+
242257+ MDEBUG("exchange(): waitsForDeviceReceive");
243258+ while (waitsForDeviceReceive) {
244- + usleep( 1000);
259+ + std::this_thread::sleep_for(std::chrono::microseconds( 1000) );
245260+ MDEBUG("exchange(): waitsForDeviceReceive (still)");
246261+ }
247262+
0 commit comments