Commit graph

802 commits

Author SHA1 Message Date
Robert Ghilduta
df369b01f4 libbladeRF: bump API version and add changelog for v1.9.0 2017-12-07 21:26:28 -08:00
Robert Ghilduta
327e556e6a libbladeRF: bump libbladeRF version to 1.9.0
Version 1.9.0 now supports bladeRF.conf config options.
2017-12-07 21:07:08 -08:00
Robert Ghilduta
0ba3404c6f Enable config option parsing and parameter setting when the device is opened 2017-12-07 20:34:34 -08:00
Robert Ghilduta
dd604c15bf Add config option handlers for several keys
This commit adds handlers for the following config option keys:
fpga          - fpga file to load
frequency     - set frequency
samplerate    - set integer samplerate
bandwdith     - set bandwidth
agc           - enable or disable AGC
gpio          - set GPIO register value
sampling      - set internal or external sampling
trimdac       - set trimdac value
vctcxo_tamer  - set vctcxo tamer method

These options can be declared in a local or global bladeRF.conf. Square brackets
can used to restrict certain options by FPGA size and serial number.

Example bladeRF.conf file:

fpga /home/user/hostedx40.rbf
trimdac 592
frequency 2.4G

[*:serial=0be673dceaf87623dbefa412ecad6783]
frequency 2.4G
samplerate 20M
2017-12-07 20:34:34 -08:00
Robert Ghilduta
68bf8e231a Add string parsing functions
The line to argumenet parser uses a two pass approach. The first pass
finds beginning and end of arguments, and counts the number of quotes.
The second pass copies the characters into the argument buffers.
2017-12-07 20:34:33 -08:00
Robert Ghilduta
dccc4edc2f Filenames are starting to become ambiguous without full pathnames 2017-12-07 17:10:28 -08:00
Rey Tucker
6116d09049 libbladeRF: add compilation hint to boilerplate.c
h/t owen on IRC
2017-08-09 10:58:08 -04:00
Rey Tucker
1d41ada308 Merge pull request #525 from Nuand/rtucker-issue-511
host/CMakeLists: dequote variables in ifs (CMP0054) #511
2017-08-07 18:18:17 -04:00
Rey Tucker
155cd5266d Merge pull request #522 from Nuand/rtucker-issue-475-clean
CyAPI: Define Windows 10 support, fail gracefully if missing (#475)
2017-08-07 18:17:00 -04:00
Jon Szymaniak
70d5fb14b2 libbladeRF: Treat incompatible OS version as "not found" in FindCyAPI.cmake 2017-08-07 18:08:34 -04:00
Rey Tucker
a075d0149b host/CMakeLists: dequote variables in ifs (CMP0054) #511
Per CMake Policy CMP0054, the meaning of constructs like

if("${FOOBAR}" STREQUAL "quux")

is ambigious, and the old meaning is deprecated.

https://cmake.org/cmake/help/git-stage/policy/CMP0054.html
2017-08-07 12:27:21 -04:00
Rey Tucker
8cec8d03dd host/libbladeRF/cyapi: ReleaseMutex before CloseHandle
When working on mutexes for the libusb backend, I noticed that I needed
to ReleaseMutex() when closing the device, or else that device would not
be usable again until all of the mutexes were released.

I have not tested this with CyAPI as yet, but I believe the same problem
will occur, and I also believe this may fix it.
2017-08-07 11:35:16 -04:00
Rey Tucker
880f195e90 host/libusb.c: properly release/close handles 2017-08-04 18:00:34 -04:00
Rey Tucker
72322089c6 host/libusb.c: fix create_device_mutex errors (#484)
This builds and correctly enforces exclusive access under Windows 10.
2017-08-04 17:17:29 -04:00
Rey Tucker
daab20341f host/backend/libusb: enforce exclusive access (#484)
Windows seems to allow multiple instances of libbladeRF to open the same
device, which is problematic in many ways.  This borrows the mutex
approach from cyapi.c to enforce exclusivity.
2017-08-04 16:44:30 -04:00
Rey Tucker
5ba6482ed1 Merge pull request #514 from Nuand/rtucker-issue-512
host/usb.c: add missing set_agc_dc_correction handler (#512)
2017-08-04 14:10:03 -04:00
Rey Tucker
db18fd308c host/usb.c: add missing set_agc_dc_correction handler
backend_fns_usb_legacy was missing a .set_agc_dc_correction member,
which causes issues with some compilers.  Stubbed in
set_agc_dc_correction_unsupported.
2017-08-04 14:07:16 -04:00
Rey Tucker
70cc0a0020 Merge pull request #513 from Nuand/rtucker-issue-508
macOS: detect clock_gettime presence directly, instead of inferring from version (#508)
2017-08-04 13:50:30 -04:00
Rey Tucker
0779109841 host: explicitly test for clock_gettime (#508)
Instead of using version-based guessing on macOS (which appears to fail
with newer versions of Xcode on older versions of macOS), use an
explicit test for clock_gettime in CMake.
2017-08-02 15:02:38 -04:00
Rey Tucker
7544c671b2 libbladeRF: more descriptive error on file_read_buffer failures
In the event that file_read_buffer fails, print a more useful error
message to make it easier to track down the problem
2017-07-25 15:40:45 -04:00
Robert Ghilduta
2ce14de630 libbladeRF: fix GCC 7 error
GCC 7 rightfully believes that this buffer can be 11 bytes long. Counting the
additional NULL byte, this buffer should be at least 12 bytes in size.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
1434ae89b8 libbladeRF: Updated to v1.8.0
libbladeRF v1.8.0 introduces support for the Automatic Gain Control.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
ebecc847da libbladeRF: only enable AGC when it is supported
The AGC depends on a newer DC cal table and FPGA version 0.7.0 being loaded. A
DC cal table version of 2 or greater is also required for the AGC to work.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
f1ef088f2b libbladeRF: add gain_mode settings to control AGC
bladerf_set_gain_mode() and bladerf_get_gain_mode() were added to allow for
control of the bladeRF's AGC.
2017-07-05 08:59:09 -07:00
Robert Ghilduta
905c65c2a5 libbladeRF: add AGC GPIO bit
Bit 12 controls the AGC
2017-07-05 08:59:08 -07:00
Robert Ghilduta
53a698fde2 libbladeRF: introduce support for BLADERF_CAP_AGC_DC_LUT (FPGA v0.7.0) 2017-07-05 08:59:08 -07:00
Robert Ghilduta
7aff155a97 libbladeRF: add gain specific mean errors to DC calibration table
The DC calibration table will now include mean residual errors for 3 different
gains (that will be used by the AGC amont other things) including:
    Max : LNA=6dB, RXVGA1=30dB, RXVGA2=15dB
    Mid : LNA=6dB, RXVGA1=30dB, RXVGA2= 0dB
    Low : LNA=3dB, RXVGA1=12dB, RXVGA2= 0dB

The DC cal table version has been bumped to 2. This commit will allow backward
compatibility with existing DC cal tables.
2017-07-05 08:59:08 -07:00
Robert Ghilduta
666cd5860f libbladeRF: change the tuning call so it returns a tuning entry
This paves the way for the dc cal table to return gain specific tuning
information that will be used by the AGC.
2017-07-05 08:59:08 -07:00
Robert Ghilduta
d8aa462e6a add libbladeRF and bladeRF-cli support for setting AGC DC correction LUT 2017-07-05 08:58:53 -07:00
Jon Szymaniak
587e4ac5c2 libbladeRF: Updated to v1.7.2 2016-06-29 11:55:21 -04:00
Jon Szymaniak
209dd7f647 libbladeRF: Added API docs link to README 2016-06-29 11:42:22 -04:00
Brian Padalino
d4642214cd libbladeRF: Initialize device sooner.
Initialize the device upon opening it before trying to cancel
any pending retune operations.  In the cases of autoloaded FPGA
images, the sample clocks are not running and can cause the NIOS
to hang when trying to cancel pending retune operations.  This is
alleviated by initializing the device first, ensuring clocks are
running, and then proceeding.
2016-06-21 18:32:22 -04:00
Jon Szymaniak
0bed16aa6b libbladeRF: doc: Be consistent with section name capitalization 2016-05-28 18:06:38 -04:00
Jon Szymaniak
9a72fc4211 libbladeRF: doc: Typo fix - removed trailing ] characters 2016-05-28 18:04:45 -04:00
Jon Szymaniak
03aabe30a1 libbladeRF: Updated to v1.7.1
Documentation-only changes since v1.7.0.
2016-05-28 17:47:03 -04:00
Jon Szymaniak
2a01f9d8fd libbladeRF: doc: Typo fix 2016-05-28 17:41:12 -04:00
Jon Szymaniak
a83c62d92d libbladeRF: doc: Corrected & clarified metadata format description
- Removed incorrect block size, and noted this for both Hi-Speed
    and SuperSpeed configurations.

- Attempted to make this description clearer by keeping things
    in units of samples, where possible.

- Explicitly noted that callers of the sync interface do not need
    to be concerned with underlying metadata position and layout --
    only async interface users do.

- Added link to libbladeRF's `metadata.h` for reference.
2016-05-28 17:39:07 -04:00
Jon Szymaniak
4f2022e8f5 libbladeRF: doc: Place section descriptions at the top of pages 2016-05-28 17:08:53 -04:00
Jon Szymaniak
7a82ed7e3a libbladeRF: doc: Moved and clarified bladerf_get_timestamp() usage
This function was incorrectly located in the "Low-Level" group.

There has been some confusion reported about how to properly use this
function.  As such, the description has been updated to better describe
when to use this function versus the timestamp metadata mechanisms.
2016-05-28 17:02:54 -04:00
Jon Szymaniak
1a35d78a4e libbladeRF: doc: Explicitly note trigger example's clock config assumptions 2016-05-28 16:20:37 -04:00
Jon Szymaniak
579f8f7118 libbladeRF: doc: Describe bladerf_set_smb_mode() usage for MIMO config 2016-05-28 16:19:47 -04:00
Jon Szymaniak
2d3f16b47c libbladeRF: Updated to v1.7.0 2016-05-22 19:39:55 -04:00
Jon Szymaniak
085239c834 libbladeRF: doc: Corrected typo and added clarification 2016-05-22 19:20:28 -04:00
Jon Szymaniak
ca40176be6 libbladeRF: doc: Added note about disabling triggers before stream deinit 2016-05-22 19:20:28 -04:00
Jon Szymaniak
5502128b2b libbladeRF: doc: Noted thread-safe proerties of API groups 2016-05-22 19:20:28 -04:00
Jon Szymaniak
dfd4255f66 libbladeRF: doc: Simplified API doc layout, main page cleanup
- Hit redundant "Related Pages". This just lists what we have on the
    main page.

- Renamed "Modules" to "API Sections"

- Removed "Data Structures". This just provided a redundant information
    in an awkward manner.

- Removed "Files". This provided little value over just looking at
    libbladeRF.h directly.
2016-05-22 19:20:28 -04:00
Jon Szymaniak
c398f28466 libbladeRF: doc: Moved Error codes section 2016-05-22 19:20:28 -04:00
Jon Szymaniak
086b169be2 libbladeRF: doc: Moved bootloader group after loading/programming
These are loosely related enough to be grouped closer together.
2016-05-22 19:20:28 -04:00
Jon Szymaniak
b0e7111abf libbladeRF: doc: Moved "Misc" function group 2016-05-22 19:20:28 -04:00
Jon Szymaniak
5ea3f34a99 libbladeRF: doc: Created and updated RX/TX module group 2016-05-22 19:20:28 -04:00