Commit graph

9 commits

Author SHA1 Message Date
Ryan Thompson
da14b08f5c libbladeRF: OVERSAMPLE and DEFAULT sample rate guards implemented
Setting the sample rate will now check with the currently enabled 
feature. It tests if the sample rate is possible like before
and then checks if the currently enabled feature allows it.
2023-02-13 03:28:19 -08:00
Ryan Thompson
8903adb0ea libbladeRF: set samplerate OC compensation moved to libbladeRF
libbladeRF now halves the sent sample rate when OVERSAMPLE feature
is enabled. This is necessary as the AD9361 is not self aware of its
overclock but libbladeRF is.
2023-02-13 03:28:19 -08:00
Rey Tucker
54fefeb7ac fpga_common: defines and enums for FPGA RFIC control 2018-12-12 16:42:52 -05:00
Rey Tucker
3cdf9419ca hdl: nios/devices_rfic: fix gainmode setting
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.
2018-12-12 14:22:07 -05:00
Rey Tucker
f2c24d2872 fpga_common: assign user-defined space in bladerf_rfic_command 2018-12-11 12:17:55 -05:00
Rey Tucker
4e96014457 fpga_common: define bladerf_rfic_init_state enum 2018-12-06 14:45:24 -05:00
Rey Tucker
8a590e8e0b fpga_common: add BLADERF_RFIC_COMMAND_FASTLOCK 2018-12-06 14:45:24 -05:00
Rey Tucker
57b9970421 fpga_common: nios: NIOS_PKT_16x64_TARGET_RFIC definition
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
2018-12-06 14:45:24 -05:00
Rey Tucker
05f7fd571a host: refactoring bladerf2.c
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
2018-11-26 18:03:45 -05:00