This commit adds handlers for the following config option keys:
fpga - fpga file to load
frequency - set frequency
samplerate - set integer samplerate
bandwdith - set bandwidth
agc - enable or disable AGC
gpio - set GPIO register value
sampling - set internal or external sampling
trimdac - set trimdac value
vctcxo_tamer - set vctcxo tamer method
These options can be declared in a local or global bladeRF.conf. Square brackets
can used to restrict certain options by FPGA size and serial number.
Example bladeRF.conf file:
fpga /home/user/hostedx40.rbf
trimdac 592
frequency 2.4G
[*:serial=0be673dceaf87623dbefa412ecad6783]
frequency 2.4G
samplerate 20M
The line to argumenet parser uses a two pass approach. The first pass
finds beginning and end of arguments, and counts the number of quotes.
The second pass copies the characters into the argument buffers.
When working on mutexes for the libusb backend, I noticed that I needed
to ReleaseMutex() when closing the device, or else that device would not
be usable again until all of the mutexes were released.
I have not tested this with CyAPI as yet, but I believe the same problem
will occur, and I also believe this may fix it.
Windows seems to allow multiple instances of libbladeRF to open the same
device, which is problematic in many ways. This borrows the mutex
approach from cyapi.c to enforce exclusivity.
backend_fns_usb_legacy was missing a .set_agc_dc_correction member,
which causes issues with some compilers. Stubbed in
set_agc_dc_correction_unsupported.
Instead of using version-based guessing on macOS (which appears to fail
with newer versions of Xcode on older versions of macOS), use an
explicit test for clock_gettime in CMake.
The AGC depends on a newer DC cal table and FPGA version 0.7.0 being loaded. A
DC cal table version of 2 or greater is also required for the AGC to work.
The DC calibration table will now include mean residual errors for 3 different
gains (that will be used by the AGC amont other things) including:
Max : LNA=6dB, RXVGA1=30dB, RXVGA2=15dB
Mid : LNA=6dB, RXVGA1=30dB, RXVGA2= 0dB
Low : LNA=3dB, RXVGA1=12dB, RXVGA2= 0dB
The DC cal table version has been bumped to 2. This commit will allow backward
compatibility with existing DC cal tables.
Initialize the device upon opening it before trying to cancel
any pending retune operations. In the cases of autoloaded FPGA
images, the sample clocks are not running and can cause the NIOS
to hang when trying to cancel pending retune operations. This is
alleviated by initializing the device first, ensuring clocks are
running, and then proceeding.
- Removed incorrect block size, and noted this for both Hi-Speed
and SuperSpeed configurations.
- Attempted to make this description clearer by keeping things
in units of samples, where possible.
- Explicitly noted that callers of the sync interface do not need
to be concerned with underlying metadata position and layout --
only async interface users do.
- Added link to libbladeRF's `metadata.h` for reference.
This function was incorrectly located in the "Low-Level" group.
There has been some confusion reported about how to properly use this
function. As such, the description has been updated to better describe
when to use this function versus the timestamp metadata mechanisms.
- Hit redundant "Related Pages". This just lists what we have on the
main page.
- Renamed "Modules" to "API Sections"
- Removed "Data Structures". This just provided a redundant information
in an awkward manner.
- Removed "Files". This provided little value over just looking at
libbladeRF.h directly.