Skip to content

Commit

Permalink
Remove delays from hackrf_stop_rx_cmd and hackrf_stop_tx_cmd.
Browse files Browse the repository at this point in the history
These were added in greatscottgadgets#805, as a workaround to prevent their parent
functions from returning before transfer cancellations had completed.
This has since been fixed properly in greatscottgadgets#1029.
  • Loading branch information
martinling committed Mar 18, 2022
1 parent 503cd33 commit 958c742
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions host/libhackrf/src/hackrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 958c742

Please sign in to comment.