Commit graph

2 commits

Author SHA1 Message Date
Rey Tucker
bdac315aab host: common: range.c: only build these if necessary on Nios 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