This new 8x32 target is for a 32-bit GPIO for controlling RFFE
signals. Examples include TX/RX band selection switches, resets, and
readback of status outputs.
New default is such that AD9361 is held in reset and not enabled. The
host will have to deassert reset and assert the enable signal before the
AD9361 can be configured.
This addresses an item picked up by Coverity. Defects in bands[] or
frequency checks could potentially cause an out-of-bounds memory access.
A bounds check has been added to avoid an invalid access, should one of
the aforementioned defect ever creep in.
The backend interface now presents functions for IQ gain/phase
access, instead of lumping it all under "FPGA corrections."
There is no need for the USB code to know anything about LMS
corrections, so this has been moved back up the top level,
with bladerf.c calling into the lms.c functions that now
provide this functionality.
The USB backend now hooks up calls to nios_legacy_* routines.
In the future we can maintain a USB backend that uses these, while
another backend structure proivdes the use of new NIOS packet handlers.
The legacy packet format uses magic values for the "address" for
PIO accesses. This commit adds some definitions of these to be shared
between the NIOS II code and the host code, to help reduce the
use of magic values.
Some general macro naming has been done to keep the macro naming
scheme for packet handlers more consistent.
This only needs to be done once per initialization, not every time
the device is re-tuned. Moved this to init_device() to cut down
on SPI transactions required to complete tuning operation.
After retuning, the high or low band must be selected. This requires
a few control register ("CONFIG_GPIO") and LMS6 accesses. Moving these
to the retune operation already in the NIOS II removes some extra
USB communication time.
To allow the LMS6002D code to be build into the NIOS II code,
lms.c has been moved to fpga_common and its license has been
changed from LGPLv2 to MIT.
Currently, only the subset of functions required for
frequency tuning are used during a NIOS II build.
The definition of the legacy FX3 UART <-> FPGA packet format
has been moved to a top-level fpga_common directory. This
directory will be used to store headers and source files
shared between host code and NIOS II code.