From 958c7421890c62436e198547473ccfcd3d838c46 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Fri, 18 Mar 2022 10:42:40 +0000 Subject: [PATCH] Remove delays from hackrf_stop_rx_cmd and hackrf_stop_tx_cmd. These were added in #805, as a workaround to prevent their parent functions from returning before transfer cancellations had completed. This has since been fixed properly in #1029. --- host/libhackrf/src/hackrf.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/host/libhackrf/src/hackrf.c b/host/libhackrf/src/hackrf.c index e6f01563..7b0c0e0e 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -1887,13 +1887,7 @@ int ADDCALL hackrf_start_rx(hackrf_device* device, hackrf_sample_block_cb_fn cal static int hackrf_stop_rx_cmd(hackrf_device* device) { int result; - result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF); -#ifdef _WIN32 - Sleep(10); -#else - usleep(10 * 1000); -#endif return result; } @@ -1935,11 +1929,6 @@ static int hackrf_stop_tx_cmd(hackrf_device* device) { int result; result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF); -#ifdef _WIN32 - Sleep(10); -#else - usleep(10 * 1000); -#endif return result; }