Somehow, bladerf2_rfic_init_params.gc_rx1_mode is being set to 0,
causing BLADERF_GAIN_DEFAULT to default to MGC.
This also reduces image size by removing dependency on a couple
functions, and pruning gainmode down to uint8_t.
fpga_common: nios: stub out NIOS_PKT_16x64_TARGET_RFIC
fpga_common: add a status register for RFIC control
fpga_common: add 16x64 RFIC status register bit
fpga_common: add NIOS_PKT_16x64_RFIC_TXMUTE target addr
fpga_common: add RSSI readback shifts/masks
fpga_common: clean up old RFIC cmd defines from pkt_16x64
fpga_common: only build bladerf2_common if required
General documentation cleanup, function name adjustments, merging of
redundant structures, etc.
fpga_common/ad936x_helpers:
Contains wrappers for AD936x RFIC functionality.
fpga_common/bladerf2_common:
Contains bladeRF2-specific helper functions and constants.
fpga_common/ad936x_params:
Reformat (no more tabs, phew)
Move ina219 shunt const to bladerf2_common
host/common/range:
Move functions and macros for handling bladerf_range structs
../libbladeRF/include/bladeRF2.h:
Explicitly index RX/TX FIR enums
Update references to ad936x_params.c
../libbladeRF/src/board/bladerf2/common:
New macros for boilerplate:
- WITH_MUTEX: wrap around locked blocks
- CHECK_STATUS: calls function, checks return code
- CHECK_AD936X: calls function, checks return code, translates
from AD936x to libbladeRF error codes
- CHECK_*_LOCKED: above, but unlocks mutex before erroring
- NULL_CHECK: checks a var for null
Move helper functions into here
../libbladeRF/src/board/bladerf2/bladerf2.c:
Use new macros
Code style fixes
Remove redundant code
When an 8x32 packet is received with target ID 0x05, the
ad9361_fastlock_save() function is executed. The packet requires an
address to be specified, which is used to determine whether the
operation is for the RX or TX module. Valid addresses are:
0x00 : receive module
0x01 : transmit module
others: do not use, but would be passed to the receive module
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.