Commit graph

159 commits

Author SHA1 Message Date
Jon Szymaniak
872759540d libbladeRF: Updated to v1.5.1 2016-01-07 16:49:57 -05:00
Jon Szymaniak
088f12ba93 libbladeRF: Added LIBBLADERF_API_VERSION
This macro provides API users with a compile-time means to check
the API version. It is intended to help with compile-time feature
detection.
2015-12-30 22:31:16 -05:00
Jon Szymaniak
25530a3f4e libbladeRF: Added additional details to function descriptions 2015-12-28 23:15:44 -05:00
Jon Szymaniak
ccce423cff libbladeRF: Added BLADERF_MODULE_INVALID enumeration value 2015-12-28 22:20:20 -05:00
Jon Szymaniak
ad147e2b28 libbladeRF: Added BLADERF_DC_CAL_INVALID enumeration value 2015-12-28 22:20:20 -05:00
Jon Szymaniak
2161248943 libbladeRF: Added API call to read firmware log data
bladerf_get_fw_log() allows API users to retrieve firmware log
data and write it to a file.
2015-12-28 16:10:39 -05:00
Jon Szymaniak
1a4d97f1f5 libbladeRF: Fixed typo, more explicit 1.8V tamer input requirement 2015-12-18 16:04:32 -05:00
Jon Szymaniak
f6c0d28e6e libbladeRF: Noted VCTCXO tamer input on J71 pin 1 in API header 2015-12-14 15:34:11 -05:00
Jon Szymaniak
9cdfbedd5d libbladeRF: Adding VCTCXO tamer mode selection support 2015-12-14 15:29:59 -05:00
Jon Szymaniak
7af3de8280 libbladeRF: Added bladerf_vctcxo_tamer_mode enumeration
This enumeration will be used to control the upcoming VCTCXO tamer
module in the FPGA.
2015-12-14 15:29:59 -05:00
Mathieu Rene
0d55229719 libbladeRF: Added helper function for setting the FPGA's rx_mux
This function provides simpler access to the FPGA's RX mux,
whose settings are controlled by FX3 <-> FPGA GPIOs.
2015-12-09 23:31:16 -05:00
Jon Szymaniak
0c58c553db libbladeRF: Use empty API_EXPORT definition for MATLAB thunk builds
MATLAB's loadlibrary() implementation becomes quite confused
when presented with __attribute__ ((visibility ("default"))).
2015-11-22 20:31:43 -05:00
Jon Szymaniak
f0f3783f13 libbladeRF: Added bladerf_submit_stream_buffer_nb()
This provides a non-blocking variant of bladerf_submit_stream_buffer(),
which provides API users with more control over how they might want
to handle asynchronous buffer submission.

This API functionality has been exposed to allow users to implement
schemes similar to that used to address Issue #438.
2015-11-20 15:38:06 -05:00
Jon Szymaniak
f84df2601d libbladeRF: Added BLADERF_ERR_WOULD_BLOCK
This will be returned by API functions when an operation would need
to block to complete, but the caller has requested non-blocking
operation.  In this situation, the caller may need to wait and
resubmit the request at a later time.
2015-11-20 15:38:00 -05:00
Jon Szymaniak
8a7986f9ae libbladeRF.h: Corrected description of gain correction 2015-11-13 13:20:01 -05:00
Adam Greig
2cc2609d80 Fix SMB max freq at 200MHz 2015-09-09 17:58:41 -04:00
Adam Greig
f7f26d5bb7 Add support for setting SMB clock output to arbitrary frequency 2015-09-09 17:58:41 -04:00
Jon Szymaniak
82191d8dee libbladeRF: Added masked XB GPIO write routines and XB GPIO macro definitions 2015-09-01 13:11:35 -04:00
Jon Szymaniak
2afcc6a895 libbladeRF: Added error code to denote insufficient permissions 2015-08-25 14:13:40 -04:00
Brian Padalino
9f94bf1fee libbladeRF: Removing si5338 functions.
Functions were replaced/removed long ago and were not stripped
from the header file.
2015-08-20 18:33:01 -04:00
Jon Szymaniak
1e9432abe8 libbladeRF.h: Added explicit mention of UPDATE_TIMESTAMP flag 2015-07-25 15:30:19 -04:00
Jon Szymaniak
df4125634b libbladeRF.h: Removed description of burst zero-pad requirement.
libbladeRF now takes care of this for the API user, as of v1.3.0.
2015-07-25 15:30:19 -04:00
Jon Szymaniak
948fbad00b libbladeRF: Added additional notes about bladerf_dac_read() 2015-06-23 23:17:11 -04:00
Jon Szymaniak
c9acfecef4 libbladeRF: Added vctcxo trim dac readback support 2015-06-22 22:47:18 -04:00
Jon Szymaniak
d28a953ab9 libbladeRF: Use updated NIOS II packet formats for FPGA >= v0.3.0 2015-06-18 20:20:58 -04:00
Jon Szymaniak
cd880565d6 libbladeRF: Updated copyright date in API header 2015-06-18 20:20:57 -04:00
Jon Szymaniak
cac4301939 libbladeRF: Added retune queue cancellation 2015-06-18 18:34:29 -04:00
Jon Szymaniak
59d31545d5 libbladeRF: Added "Queue full" status code
This "Queue full" event may occur when using the scheduled
retunes. Since this is an event that the user can respond to
and act upon, an appropriate status/error code has been added.
2015-06-18 18:34:29 -04:00
Jon Szymaniak
df31bf8072 libbladeRF: Noted precondition for bladerf_schedule_retune() 2015-06-18 18:34:29 -04:00
Jon Szymaniak
51e4a84791 libbladeRF: Added quick tune and scheduled retune API functions
At this point, the underlying implementations of these
still need to be completed.
2015-06-18 18:34:29 -04:00
Jon Szymaniak
830fa74848 libbladeRF: Braces style nitpick 2015-06-18 18:34:28 -04:00
Jon Szymaniak
064104436c libbladeRF: Added device retune mode selection
As of FPGA v0.2.0, the frequency tuning algorithm is run in the FPGA to
eliminate time wasted by communicating LMS6002D registers over USB. This
is now the default if the FPGA version is >= v0.2.0.

This default can be overridden via a BLADERF_DEFAULT_TUNE_MODE
environment variable, with options being "host" or "fpga".
2015-06-18 18:34:28 -04:00
Jon Szymaniak
3cdf642614 libbladeRF/doc: Overhauled API docs main page and added examples
The main landing page in the Doxygen is now filled out with
some general information.

Existing examples have been simplified and moved to
dedicated pages that are linked to from the main page and
relevant sections of the documentation elsewhere.
2015-06-06 17:01:19 -04:00
Jon Szymaniak
37c5b38499 libbladeRF/doc: Fixed doc copy/paste errors in flash write routines 2015-03-31 10:42:20 -04:00
Jon Szymaniak
6326dbad88 libbladeRF: Increased minimum freq to 237.5 MHz
This change was made to avoid the API accepting/using a frequency
so low that it could cause PLLs to unlock.
2015-03-19 11:28:48 -04:00
Jon Szymaniak
7059330d3f libbladeRF: Added support for zero-padding up to a specified timestamp 2015-03-17 16:16:43 -04:00
Jon Szymaniak
21eec5406d libbladeRF: Corrected reference to bladerf_config_gpio_write() in header 2015-03-10 10:21:36 -04:00
Jon Szymaniak
ed7773e84a libbladeRF: Added clarifications about BLADERF_SERIAL_LENGTH
Explicitly noted user buffer size required by bladerf_get_serial().

Made note of extraneous byte used by bladerf_image structure to
avoid confusion. This extra byte will be kept to avoid breaking
compatibility.
2015-03-08 13:41:51 -04:00
Jon Szymaniak
5ee4bcd59a libbladeRF: Removed prototype for removed bladerf_set_tx_gain() fn
This was combined into a unified bladerf_set_gain() function. No
bladerf_set_tx_gain() symbol exists in libbladeRF.
2015-03-08 13:25:25 -04:00
Jon Szymaniak
d283e876cc libbladeRF: Corrected description of bladerf_set_gain() 2015-03-08 13:25:25 -04:00
Jon Szymaniak
2c48ba9e53 libbladeRF: Perform port reset when opening device (Linux, USB 3.0)
This changeset is directly based upon a patch and suggestions kindly
provided by Marian and Diana from Null Team (www.null.ro) and YateBTS
(www.yatebts.com). The original patch may be found on the issue tracker
for issue #95.

Per issue #95, it has been found that on many Linux-based
USB 3.0 setups, it is not possible to re-connect to a bladeRF after
a previous application using the bladeRF failed to close its device
handle. (For example, as the result of an application crashing or being
killed.)

To recover from this situation, we now perform a USB port reset when
opening the device, prior to attempting to actually access it.

Should this behavior cause any new issues, it can be disabled...

    ... at compile-time by providing
        -DENABLE_LIBUSB_DEV_RESET_ON_OPEN=False to CMake

    ... at run-time via the bladerf_set_usb_reset_on_open(false),
        when the aforementioned compile-time flag is True.

A huge "thank you" goes out Marian, Diana, and everyone at Null Team and
YateBTS!
2015-01-12 13:52:37 -05:00
Jon Szymaniak
9a05e4b789 libbladeRF: Added API support for bootloader probe and recovery
API functionality to probe for FX3 bootloader devices and download
firmware to detected devices has been introduced.

This is based upon the boot image format/procedure documented in
Cypress's AN76405: "EZ-USB (R) FX3 (TM) Boot Options"
    http://www.cypress.com/?docID=49862
2014-12-18 17:38:06 -05:00
Jon Szymaniak
7706e92b08 libbladeRF: Do not include <stdbool.h> for C++ code in API header
This is unneccessary and causes build issues when building C++ programs
in Visual Studio 2012 and earlier.
2014-11-14 15:19:18 -05:00
Jon Szymaniak
837c15ffb9 libbladeRF: bladerf_open_with_devinfo() now handles NULL devinfo ptr
To be consistent with bladerf_open(NULL), this will open the first
available device.
2014-10-27 13:59:10 -04:00
Jon Szymaniak
f40e70b79a libbladeRF: Added bladerf_open_with_devinfo() example, updated docs 2014-10-27 13:59:10 -04:00
Jon Szymaniak
5a37690e98 libbladeRF: Updated dev info string information for bladerf_open() docs
Added note about "*:" being a valid backend specifier for "any available
backend," and removed reference to currently deprecated Linux kernel
backend.
2014-10-27 12:04:20 -04:00
Jon Szymaniak
d88ab63917 libbladeRF: Made enumeration value references Doxygen links 2014-10-21 08:01:29 -04:00
Jon Szymaniak
f7a4345257 libbladeRF: Added more complete examples for the synchronous interface
The existing bladerf_sync_rx() snippet in the libbladeRF API docs has
been replaced by a more complete snippet in libbladeRF/doc/examples.

From now on, major snippets and examples to be included in
Doxygen-generated documentation shall now be placed in the
libbladeRF/doc/examples directory, and must be buildable and testable.

The Doxygen "snippet" command to shall be used to include the relevant
code from the example program.

libbladeRF: [WIP] Use a simple delay to wait for TX samples in example
2014-10-21 08:01:28 -04:00
Jon Szymaniak
fbe0b6a81e libbladeRF: Introduced timestamp metadata support for sync data i/f
API support for timestamp metadata has been introduced. This is made
available when using the newly introduced BLADERF_FORMAT_SC16_Q11_META
format value.

When using the synchronous interface, metadata is exchanged between the
caller and the API via the updated bladerf_metadata structure. Users of
the asynchronous interface must currently manually manage the metadata
headers as desired, as documented in libbladeRF.h.

When using the BLADERF_FORMAT_SC16_Q11_META format in conjunction with
the synchronous interface, it is possible to retrieve the timestamp for
received samples and an indication of overrun.  An RX operation may also
be scheduled for at a specific timestamp value the future.  Similarly,
bursts of samples can be scheduled to be transmitted at a specific
timestamp value, or at the first available timestamp ("now").
2014-10-21 08:01:28 -04:00
Jon Szymaniak
5774aa0ad6 libbladeRF: Added API definition for FPGA counter mode enable bit 2014-10-21 11:07:38 -04:00