Use CONST variants of macros when assigning constants.
For values that are not constants, the declaration and assignments
have been separated just to avoid any potential future C89
shenanigans.
host/utilities/bladeRF-cli/src/cmd/rxtx.c:753:8: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (status == ETIMEDOUT) {
^
Initialize state of `status` to CLI_RET_UNKNOWN.
host/utilities/bladeRF-cli/src/cmd/printset.c:601:12: error: ‘lut_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
size_t lut_len;
^
host/utilities/bladeRF-cli/src/cmd/printset.c:600:31: error: ‘lut’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
const struct xb_gpio_lut *lut;
^
host/utilities/bladeRF-cli/src/cmd/printset.c:642:12: error: ‘lut_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
size_t lut_len, i;
^
Default lut_len to 0 and perform a sanity checks on lut & lut_len.
bladeRF/host/utilities/bladeRF-cli/src/cmd/poke.c:97:20: error: ‘f’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
status = f( state->dev, (uint8_t)address, (uint8_t)value );
^
Initialize f to NULL to calm GCC. In the cases where f is not assigned,
we should be erroring out at line 91. NULL check is performed on line
96.
Lead users away from using this shorthand in favor of setting
modules individually. This is intended to help avoid cases where
users see PLL artifacts, despite not actually needing modules
tuned to the same frequency.
Calibration and DC table generation now utilize the routines found
in host/common.
Although these do take noticably longer to execute, they generally yield
better results than the prior implementation.
This regression was introduced around 2015-09-01 when I added support
for accessing individual pins. Support for setting the XB GPIO via
the full register word was intended to be retained, but was not.
This commit re-adds this functionality.
This allows rates to be specified via the numerator and denominator
only. For example, to specify Fs = (4.5*684*1e6) / 286
set samplerate rx 0 3078000000 286
Adding the ability to set the SMB frequency when in MIMO master mode.
Also fix a bug where attaching the xb200 and setting MIMO master
would turn off the other clock not allowing an xb200 enabled device
to ever be a master clock supplier.
Being able to set the master frequency is useful when you want to
lock test equipment to the bladeRF oscillator.
This should help clarify the cause of file-related errors in
cases where folks are trying to rx into a location where they
do not have write permissions.
Updated 'print' to note that all parameters are now printed when
no arguments are provided.
Adjusted print and set widths to yield the same formatting in the
bladeRF-cli help output. (Closes#422)
Added help text entries for xb_* commands. (Closes#423)
Various items supported by 'print' have been made a bit more
consistent in terms of spacing.
Units have been separated from numbers, as typically recommended by
NIST.
Some options have been added to the printset_table to specify how
to group items when printing all of them (and to skip items).
The print command invoked without arguments in bladeRF-cli
is modified to invoke all the print/set parameter
handlers in order. Old behavior was to display usage note.
The leading and trailing cosmetic newlines were moved from the
individual printset handlers to cmd_print() to allow for a concise
table.
Original usage information is still available via help command.
When the file to TX does not have any sort of "padding" zero samples
at the end, there's a risk that we'll turn off the TX front-end
before the samples are actually transmitted.
As a "quick and dirty" solution, we just flush (num_buffers + 1)
buffers worth of 0+0j after completing the TX of the file.
Moved this logic to zeroize_next_delimeter() to improve readability.
This has also been changed to remove the use of an unnecessary
variable-length array, which would cause build failures with
some compilers (e.g., MSVC).
generate.bash uses pandoc to generate both documentation and code from a
markdown document. For code, pandoc is also used as an intermediate
step, but the pandoc format varies between versions 1.12.x and 1.13.x.
These changes handle this format change and introduce some additional
improvements to make the script more resilient to format changes.
In more recent LMS docs, SPARE bits have become documented. These
changes are based upon the LMS6002 Programming and Calibration Guide
(rev 1.4 2013-06-11)
Before attempting to open any devices when going into interactive mode,
running a script, or executing "-e" arguments, bladeRF-cli now checks
for any FX3-based devices in bootloader mode, and alerts the user
to their presence, recommending that he or she see 'help recover'
for more information.
Previously, a libbladeRF log_info() message was used to alert users
to the presence of FX3-based devices enumerating in bootloader mode.
This was removed to alleviate noise and because it was buried in
backend-specific code.
Given that the bladeRF-cli is intended to be the "go to" program for
debugging the state of a bladeRF device, this alert is more
appropriately located in this program.