CMake option added to disable log.c for libbladeRF. Adjustments made
to other files as needed to address warnings (becoming errors via
-Werror and /Wx).
Removed return values for log-related functions, as these were unused
and made it slightly more annoying to make this change. The libbladeRF
minor version has been bumped to note this change in the currently
unstable series v0.x.x series.
With future license-related cleanup, all GPLv2 programs will live
in the utilities directory. As such, ezusb.c has been moved out
of the library, and the bladeRF-cli utility has been modified to
use this directly.
Most of these files had inaccurate copy-paste headers, as the files are
now vastly different than those mentioned. These will all just fall under
the "meta-data" category in upcoming licenses.
Per discussion with FindLibBladeRF.cmake author, the text in
FindLibTecla.cmake was unnecessary, and has been removed.
The fallback is required for GnuInstallDirs to work on Ubuntu systems
configured for CMAKE_INSTALL_PREFIX set to /usr/include.
Cleanup:
- Replaced LIB_INSTALL_DIR with CMAKE_INSTALL_LIBDIR
- Removed TODO and unused items
Everything except line 342 was changed. The PA enable bits in the LMS
documentation show bits [4:3] in the table, with bit 2 always being a 0.
I could change it for clarity, but the value being written matches the
table but not necessarily the bits.
The trailing semicolon in the ${files} list was causing CMake to
complain about the presence of an empty list element. As of CMake 2.6.0,
this results in the warning folks were seeing.
CID 1107236 - 1107238: Dismissed as being intentional/false positives
CID 1107239: Fixed overflow in check_samplerate()
CID 1107240: Fixed memory leak in tx_csv_to_sc16q12()
CID 1107241: Condition associated with defect shouldn't occur,
as bladerf_stream_init() should never return > 0. However,
an ETYPE_BAD has been added to the CLI error types and
used to initialize the err_type value in the RX and TX
tasks. ETYPE_BAD should be used to initialize
bladerf_error_type values to default values. In the event
that unexpected bugs occur, this may help bring them to light.
CID 1107242: Removed incorrect conditional that relied on undefined
value of status variable.
CID 1107243: Set bladerf_stream pointer to NULL after freeing, and
added the stream deinitialization upon failure to the
tx code (as there was a memory leak there). The double
free() here shouldn't be possible, as the state transitions
don't occur as modeled. However, we should be in the
habit of setting re-used pointer to NULL after free(),
and we'll see if this quiets Coverity. (If not, it's
a non-issue and we should mark it as intentional.)
The changes in ab36a93813 did not include
setting an FPGA version "describe" field to something other than '\0'.
Additionally, FW and FPGA versions are now cached upon opening a device.
The API calls now pass data from these cached values, rather than
re-read this information from the device.
The rx and tx CLI commands now use the asynchronous stream interface to
yield more acceptable performance, and this code has been overhauled for
better readability. Command parameters have been added to allow for
configuration of the stream.
Although a bit overzealous, as "lock it if you use it" approach is taken
here. Optimizations may follow later..
Some rx/tx parameters now support K/M/G suffixes, where relevant.
To support sample rate sanity checks, an API function to check the
current USB speed has been added to libbladeRF. This speed is now
reported in the CLI 'info' command.
This commit introduces the first of many MIMO functionalities. MIMO clock
settings will have to be moved to libbladeRF eventually.
Setting the device as a MIMO slave makes the Si5338 use the SMB port a
reference. This is done by routing single-ended IN4 to PFD_IN_REF by setting
registers 28 to 30 to the following values:
PFD_IN_REF[2:0] = 001 (P2DIV_IN)
P2DIV_IN[2:0] = 011 (Clock from IN4 is input to P2)
reg(28) 0x2b = | 0 | 0 | 1 | 0 1 0 | 1 1 |
P2DIV_IN[0] = 1
P1DIV_IN[2:0] = 010
reg(29) 0x28 = | 0 0 1 | 0 1 | 0 0 0 |
PDF_IN_REF[2:0] = 001
P1DIV_IN[4:3] = 01
P1DIV[2:0] = 000
reg(30) 0xa8 = | 1 0 1 | 0 1 | 0 0 0 |
PDF_IN_FB[2:0] = 101
P2DIV_IN[2:1] = 01
P2DIV[2:0] = 000
Register 6 is set to 4 so that the Si5338 loss of signal indicator knows the PFD
is using IN4 (FBCLK) as a reference.
Setting the device as a MIMO master makes the Si5338 drive the SMB port from
CLK3A.
Initialize the device if a default value is seen on the GPIO
config pins.
Fix up some coverity and samplerate floating point exception
bugs in the si5338 code.
Change the flash FPGA option to be -L instead of -H.
Make the version strings be long options only, no short ones.