mirror of
https://github.com/greatscottgadgets/hackrf.git
synced 2026-03-08 00:08:12 +01:00
Only transfer one block per re-tune
This commit is contained in:
@@ -77,13 +77,14 @@ void scan_mode(void) {
|
||||
if ( usb_bulk_buffer_offset >= 16384
|
||||
&& phase == 1
|
||||
&& transceiver_mode() != TRANSCEIVER_MODE_OFF) {
|
||||
usb_transfer_schedule_block(
|
||||
(transceiver_mode() == TRANSCEIVER_MODE_RX)
|
||||
? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out,
|
||||
&usb_bulk_buffer[0x0000],
|
||||
0x4000,
|
||||
NULL, NULL
|
||||
);
|
||||
if (blocks_queued == 2)
|
||||
usb_transfer_schedule_block(
|
||||
(transceiver_mode() == TRANSCEIVER_MODE_RX)
|
||||
? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out,
|
||||
&usb_bulk_buffer[0x0000],
|
||||
0x4000,
|
||||
NULL, NULL
|
||||
);
|
||||
phase = 0;
|
||||
blocks_queued++;
|
||||
}
|
||||
@@ -92,13 +93,14 @@ void scan_mode(void) {
|
||||
if ( usb_bulk_buffer_offset < 16384
|
||||
&& phase == 0
|
||||
&& transceiver_mode() != TRANSCEIVER_MODE_OFF) {
|
||||
usb_transfer_schedule_block(
|
||||
(transceiver_mode() == TRANSCEIVER_MODE_RX)
|
||||
? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out,
|
||||
&usb_bulk_buffer[0x4000],
|
||||
0x4000,
|
||||
NULL, NULL
|
||||
);
|
||||
if (blocks_queued == 2)
|
||||
usb_transfer_schedule_block(
|
||||
(transceiver_mode() == TRANSCEIVER_MODE_RX)
|
||||
? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out,
|
||||
&usb_bulk_buffer[0x4000],
|
||||
0x4000,
|
||||
NULL, NULL
|
||||
);
|
||||
phase = 1;
|
||||
blocks_queued++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user