Commit graph

357 commits

Author SHA1 Message Date
Ryan Thompson
ac3e5aeb3f doc: updated default tuning mode to host 2024-04-04 08:21:22 -05:00
Ryan Thompson
d4cdad16ff doc: note that quick_tune must be non-NULL for the bladeRF micro 2.0 2023-10-31 11:00:36 -05:00
Ryan Thompson
f046180604 host: CMake minimum version bump to 3.5
Accommodates the following warning issued by CMake v3.27.1.

CMake Deprecation Warning:
  Compatibility with CMake < 3.5 will be removed from a 
  future version of CMake.
2023-10-31 10:28:21 -05:00
Ryan Thompson
0769521902 doc: corrected value pair type to int8_t
fix #939
2023-09-11 11:04:01 -05:00
Ryan Thompson
3a79fef1bd libbladeRF: correct documented SC8_Q7 range
Fixes #921
2023-05-11 16:50:46 -05:00
Robert Ghilduta
ad9fdff1ca libbladeRF: bump to version v2.5.0
Introduces 8bit SC8_Q11 mode, and overclocking mode changes for bladeRF 2.0 micro.
This commits also fixes several bugs, including a locking bug in libbladeRF.
Help menus and abbreviation support expanded in bladeRF-cli.
2023-02-13 03:28:19 -08:00
Robert Ghilduta
df5b47e651 libbladeRF: rename bladerf_set_feature to bladerf_enable_feature 2023-02-13 03:28:19 -08:00
Ryan Thompson
a37f40045e libbladeRF: BLADERF_FEATURE prefix prepended to feature names 2023-02-13 03:28:19 -08:00
Ryan Thompson
1fa238d2d6 libbladeRF: features added to libbladeRF header 2023-02-13 03:28:19 -08:00
Robert Ghilduta
78affc3823 libbladeRF: add 8bit sample mode support 2023-02-13 03:28:19 -08:00
Robert Ghilduta
1da981fdd7 libbladeRF: define 8bit sample mode macro 2023-02-13 03:28:19 -08:00
Ryan Thompson
15b7d9c3b6 host: squashed cmake warnings
updated cmake requirement from 2.8 to 2.8.12
2023-02-13 03:28:19 -08:00
Robert Ghilduta
8f8847f936 libbladeRF: bump to version v2.4.1
Fix packet mode bugs, and add support for bladeRF 2.0 micro xA5, and Wishbone
master NiOS peripheral.
2022-04-03 19:39:10 -07:00
Robert Ghilduta
54c519079e libbladeRF: add Wishbone master control functions 2022-04-03 19:39:10 -07:00
Robert Ghilduta
7740242c7b add bladeRF 2.0 micro xA5 support to libbladeRF and FPGA 2022-04-03 19:39:10 -07:00
Robert Ghilduta
82afb15adb libbladeRF: bump to version v2.4.0 2020-12-23 20:45:44 -08:00
Robert Ghilduta
a399fd70bf libbladeRF: add BLADERF_GPIO_PACKET_CORE_PRESENT definition to indicate presence of packet capable core 2020-11-23 19:27:49 -08:00
Robert Ghilduta
6adfb3b594 libbladeRF: add note for normal meta mode 2020-11-23 00:59:27 -08:00
Robert Ghilduta
d294ba267b libbladeRF: add BLADERF_FORMAT_PACKET_META format 2020-11-23 00:59:27 -08:00
Robert Ghilduta
4dfbd52859 libbladeRF: set and unset config_gpio based on stream format 2020-11-23 00:59:27 -08:00
Robert Ghilduta
f03d84333b libbladeRF: clear up documentation 2019-10-01 16:46:12 -07:00
Robert Ghilduta
8e358c1941 libbladeRF: query backend for handle and lock 2019-09-01 22:51:27 -07:00
Robert Ghilduta
e3d7750e53 libbladeRF v2.2.1 2019-07-31 18:28:03 -05:00
Robert Ghilduta
0aca485ad0 libbladeRF: hdl: allow quicktune to control XB gpio register
This commit uses the reserved field of the pkt_retune NiOS packet to encode
xb_gpio register configuration data.
2019-04-02 01:59:55 -07:00
Robert Ghilduta
3bb8ad613e libbladeRF: add functionality to lock OTP 2018-12-27 18:33:33 -08:00
Robert Ghilduta
300d536ac1 libbladeRF: add OTP read/write support 2018-12-27 18:25:51 -08:00
Robert Ghilduta
1416d4918a libbladeRF: update FPGA flash type definitions 2018-12-26 00:21:14 -08:00
Rey Tucker
57b6abdc35 libbladeRF v2.2.0 2018-12-21 16:12:50 -05:00
Rey Tucker
d09761f2e4 host: libbladeRF: include inttypes.h in libbladeRF.h
This is where PRI{i,u,x}{32,64} are defined, which we use
in #defines further down. So, including inttypes.h is sort
of necessary.
2018-12-21 15:12:16 -05:00
Rey Tucker
9a0310d556 host: libbladeRF: minor doxygen fixes 2018-12-21 12:49:56 -05:00
Rey Tucker
825d986b4e host: libbladeRF: add bladerf_get_fpga_bytes() call
This adds a bladerf_get_fpga_bytes() function, which returns the
expected length of the FPGA image.

This is a dynamic replacement for BLADERF_FLASH_BYTE_LEN_FPGA,
which has been removed.

In particular, this is used in spi_flash_write_fpga_bitstream() and
spi_flash_erase_fpga() to determine the number of blocks to erase
during FPGA flashing operations.

This fixes an issue where xA9 boards were not being adequately
erased before writing.
2018-12-21 01:28:17 -08:00
Brian Glod
5081471c5b host: libbladeRF: Remove BLADERF_FLASH_EB_SIZE and BLADERF_FLASH_TO_EB(bytes)
Macros no longer needed/used.
2018-12-21 01:28:17 -08:00
Brian Glod
55bbfb1537 host: Remove BLADERF_FLASH_EB_FPGA and BLADERF_FLASH_EB_LEN_FPGA
Macros no longer needed:
- Switched to using byte-unit functions.
- Perform any byte->EB calculations internally based on device's flash
  architecture.
2018-12-21 01:28:17 -08:00
Brian Glod
b45a08d3d0 host: Remove BLADERF_FLASH_EB_CAL and BLADERF_FLASH_EB_LEN_CAL
Macros no longer needed once switching to byte-unit functions.
2018-12-21 01:28:17 -08:00
Brian Glod
44534c0799 host: Remove BLADERF_FLASH_EB_FIRMWARE and BLADERF_FLASH_EB_LEN_FIRMWARE
Replaced these macros with appropriate calculations using
BLADERF_FLASH_ADDR_FIRMWARE and the page size held in the device's flash
architecture structure. Page size may change depending on the flash
used.
2018-12-21 01:28:17 -08:00
Brian Glod
4cf375137f host: libbladeRF: Remove BLADERF_FLASH_PAGE_SIZE
Macro no longer used.
2018-12-21 01:28:17 -08:00
Brian Glod
d9293a85ab host: libbladeRF: Remove BLADERF_FLASH_TO_PAGES(bytes)
Macro no longer used.
2018-12-21 01:28:17 -08:00
Brian Glod
ae9f8440a1 host: libbladeRF: Remove BLADERF_FLASH_PAGE_FPGA
Replaced this macro with an appropriate calculation using the
BLADERF_FLASH_ADDR_FPGA macro and the page size held in the device's
flash architecture structure. Page size may change depending on the
flash used.
2018-12-21 01:28:17 -08:00
Brian Glod
4316bf6368 host: libbladeRF: Remove BLADERF_FLASH_PAGE_LEN_CAL
Macro is not used anywhere.
2018-12-21 01:28:17 -08:00
Brian Glod
9516216a25 host: libbladeRF: Remove BLADERF_FLASH_PAGE_CAL
Macro is not used anywhere.
2018-12-21 01:28:17 -08:00
Brian Glod
eb94ece146 host: libbladeRF: Remove BLADERF_FLASH_PAGE_LEN_FIRMWARE
Macro is not used anywhere.
2018-12-21 01:28:17 -08:00
Brian Glod
4caed4e280 host: libbladeRF: Remove BLADERF_FLASH_PAGE_FIRMWARE
Replaced the BLADERF_FLASH_PAGE_FIRMWARE macro with the appropriate
calculation using the page size held in the device's flash architecture
structure.
2018-12-21 01:28:17 -08:00
Brian Glod
048678df98 host: libbladeRF: API changes, BLADERF_FLASH_EB_SIZE usage
API change:
  - bladerf_image_write(): new parameter: bladeRF device handle
      Change is inspired by the pending removal of BLADERF_FLASH_EB_SIZE
      macro. This macro really shouldn't be exposed to the world, nor
      should it be constant as it may change depending on the flash
      used on the board.

API new function:
  - bladerf_erase_flash_bytes(): new function
      Similar to the existing bladerf_erase_flash() function, but
      handles the conversion from bytes to flash erase block pages
      internally. This function is recommended for new designs because
      the erase block size may change depending on the board. This
      function also checks for proper alignment along erase block
      boundaries.

General changes:
  Although the macro still exists (for now), all uses of
  BLADERF_FLASH_EB_SIZE have been replaced with equivalent
  dev->flash_arch->ebsize_bytes because the value may change depending
  on the flash used on the board.
2018-12-21 01:28:17 -08:00
Brian Glod
b0c1f750ea host: libbladeRF: API new bladerf_{read,write}_flash_bytes()
New API functions:
  - bladerf_read_flash_bytes()
      This function is nearly identical to the existing
      bladerf_read_flash() function, but takes the address and length in
      units of bytes instead of flash pages. The function performs the
      necessary conversions from bytes to pages internally based on the
      specific flash architecture in use.
  - bladerf_write_flash_bytes()
      Same as above, for writes.

New code is advised to use these byte-unit functions instead of the
older page-unit functions because the page size may not be guaranteed to
be 256 bytes in future bladeRF platforms.
2018-12-21 01:28:17 -08:00
Brian Glod
fdc1f341f3 host: libbladeRF: Remove BLADERF_FLASH_TOTAL_SIZE
Macro definition no longer used.
2018-12-21 01:28:17 -08:00
Brian Glod
907994587d host: libbladeRF: Replace BLADERF_FLASH_NUM_EBS
The BLADERF_FLASH_NUM_EBS macro was replaced with data from the device's
flash architecture structure (e.g. dev->flash_arch->num_ebs).

Functions with new parameters include:

- spi_flash.c: check_eb_access() - bladeRF device handle
2018-12-21 01:28:17 -08:00
Brian Glod
bc06d86ea3 host: libbladeRF: Replace BLADERF_FLASH_NUM_PAGES
The BLADERF_FLASH_NUM_PAGES macro was replaced with data from the
device's flash architecture structure (e.g. dev->flash_arch->num_pages).

Functions with new parameters include:
  - spi_flash.c: check_page_access() - bladeRF device handle
2018-12-21 01:28:17 -08:00
Brian Glod
03edb51ee4 host: libbladeRF API changes, BLADERF_FLASH_TOTAL_SIZE usage
API changes:
  - bladerf_alloc_image(): new parameter - bladeRF device handle
  - bladerf_alloc_cal_image(): new parameter - bladeRF device handle

General changes:
  Although the macro still exists (for now), all uses of the
  BLADERF_FLASH_TOTAL_SIZE macro have been replaced with equivalent
  dev->flash_arch->tsize_bytes because the value may change depending on
  teh flash used on the board.

  During this process, some function prototypes were modified so the
  device handle could be passed in, thus allowing flash architecture
  data to be extracted.

    - calibration.c: dc_cal_tbl_image_load()
    - image.c: is_valid_addr_len()
2018-12-21 01:28:17 -08:00
Rey Tucker
a7b6888747 host: bladeRF1.h: update docs to reflect deprecation 2018-12-11 13:07:49 -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