Commit graph

25 commits

Author SHA1 Message Date
Robert Ghilduta
1da981fdd7 libbladeRF: define 8bit sample mode macro 2023-02-13 03:28:19 -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
4dfbd52859 libbladeRF: set and unset config_gpio based on stream format 2020-11-23 00:59:27 -08: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
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
Rey Tucker
a7b6888747 host: bladeRF1.h: update docs to reflect deprecation 2018-12-11 13:07:49 -05:00
Brian Glod
5e808b843c bladeRF1: Fix nios_gpio assignment for AGC_EN
Fixes #607

The nios_gpio bit assignment for AGC_EN was already being used for
led(1). This commit also fixes a bug in the agc_band_sel signal
assignment introduced in 3b670ca.
2018-09-06 12:01:22 -04:00
Rey Tucker
2d62faa36f
host: libbladeRF: clang-format the *.h files (#55) 2018-05-30 15:26:28 -04:00
Rey Tucker
790a197aca
host: libbladeRF: deprecate some low-level bladeRF1 function calls (#26)
* host: libbladeRF: deprecate bladeRF1 gain controls

We now have bladerf_{get,set}_gain and bladerf_{get,set}_gain_stage,
which are both general-purpose functions replacing the bladeRF1-specific
VGA/LNA library calls.

* host: libbladeRF: deprecate bladeRF1 trimdac controls

Instead of bladerf_dac_write and bladerf_dac_read, folks should use
bladerf_trim_dac_write and bladerf_trim_dac_read.
2018-04-06 15:28:34 -04:00
Vanya A. Sergeev
6d1b456d05 libbladeRF: clean up API docs 2017-12-21 12:55:03 -05:00
Vanya A. Sergeev
4527d92e89 libbladeRF: split bladerf 1 & 2 specific APIs into their own header files 2017-12-21 12:55:03 -05:00