Merge pull request #1131 from martinling/hackrf-tr...
by Martin Ling 2 years 10 months
Merge pull request #1131 from martinling/hackrf-transfer-validation

Additional argument validation for hackrf_transfer
344af509
add parentheses to avoid compiler warning
by Michael Ossmann 2 years 10 months
add parentheses to avoid compiler warning

avoids a warning from -Wparentheses
c703a72a
Merge pull request #1133 from martinling/hackrf-tr...
by Michael Ossmann 2 years 10 months
Merge pull request #1133 from martinling/hackrf-transfer-timing

Overhaul timing in hackrf_transfer
04cb3a40
Merge pull request #1135 from martinling/clkin-det...
by Michael Ossmann 2 years 10 months
Merge pull request #1135 from martinling/clkin-detect

Add a simpler way to check CLKIN status.
00f79572
Overhaul timing in hackrf_transfer.
by Martin Ling 2 years 10 months
Overhaul timing in hackrf_transfer.

Rather than using sleep() for 1s at a time, set up an interval timer
that will fire once per second, and wait in the main loop for either
this or some other event.

On POSIX, the timing is set up with setitimer(), which generates a
SIGALRM signal each time the timer fires. The main loop runs pause() to
wait for any signal.

On Windows, the timing is set up using CreateWaitableTimer, which
provides an event handle that is set each time the timer fires. The main
loop runs WaitForMultipleObjects() to wait on this and an interrupt
event.

The TX and RX callbacks can now stop the main loop immediately when they
stop streaming. This fixes #1019.
a09e9a20
Make use of Win32 functions conditional on _WIN32,...
by Martin Ling 2 years 10 months
Make use of Win32 functions conditional on _WIN32, not _MSC_VER.

Using _MSC_VER here means that the choice of signal() versus
SetConsoleCtrlHandler depends on the compiler being used, rather
than the OS being targeted. When built with MinGW rather than MSVC,
this happens to work because MinGW's signal emulation is used, but
that emulation is quite limited.

Instead, be consistent and use the Win32 API when building for that
platform, regardless of compiler.

Note that if building for Cygwin, _WIN32 is not defined and POSIX
APIs are used.
eeaaaf3b
Extend force option to frequency ranges outside 1M...
by Martin Ling 2 years 10 months
Extend force option to frequency ranges outside 1MHz-6GHz.
e88a0387
Add hackrf_transfer -F option to force unsupported...
by Martin Ling 2 years 10 months
Add hackrf_transfer -F option to force unsupported sample rates.
2e1f55c2
Validate sample rates passed to hackrf_transfer.
by Martin Ling 2 years 10 months
8c12fa60
Use an array of buffers for u64->ASCII conversions...
by Martin Ling 2 years 10 months
Use an array of buffers for u64->ASCII conversions.
2fe3185f
Report a bug