libhackrf: stop_tx() put HackRF in to idle mode before killing transfer thread
This is what we do for RX and appears to prevent HackRF remaining in TX mode. This mirrors commit 693c262
This commit is contained in:
@ -1651,14 +1651,13 @@ int ADDCALL hackrf_start_tx(hackrf_device* device, hackrf_sample_block_cb_fn cal
|
|||||||
|
|
||||||
int ADDCALL hackrf_stop_tx(hackrf_device* device)
|
int ADDCALL hackrf_stop_tx(hackrf_device* device)
|
||||||
{
|
{
|
||||||
int result1, result2;
|
int result;
|
||||||
result1 = kill_transfer_thread(device);
|
result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF);
|
||||||
result2 = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF);
|
if (result != HACKRF_SUCCESS)
|
||||||
if (result2 != HACKRF_SUCCESS)
|
|
||||||
{
|
{
|
||||||
return result2;
|
return result;
|
||||||
}
|
}
|
||||||
return result1;
|
return kill_transfer_thread(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ADDCALL hackrf_close(hackrf_device* device)
|
int ADDCALL hackrf_close(hackrf_device* device)
|
||||||
|
Reference in New Issue
Block a user