Commit graph

644 commits

Author SHA1 Message Date
Jon Szymaniak
7a1b2c1462 common, libbladeRF: log.c support can be disabled at compile-time libbladeRF-v0.9.0 libbladeRF_v0.9.0 v0.9.0
CMake option added to disable log.c for libbladeRF. Adjustments made
to other files as needed to address warnings (becoming errors via
-Werror and /Wx).

Removed return values for log-related functions, as these were unused
and made it slightly more annoying to make this change. The libbladeRF
minor version has been bumped to note this change in the currently
unstable series v0.x.x series.
2013-10-21 22:44:59 -04:00
Jon Szymaniak
8c057b61fa libbladeRF, utils: Moving ezusb code out of lib into utils bladeRF-cli_v0.7.0 libbladeRF-v0.8.0 libbladeRF_v0.8.0 v0.8.0
With future license-related cleanup, all GPLv2 programs will live
in the utilities directory. As such, ezusb.c has been moved out
of the library, and the bladeRF-cli utility has been modified to
use this directly.
2013-10-21 21:05:17 -04:00
Jon Szymaniak
6343982cd6 cmake: Copyright/attibution cleanup
Most of these files had inaccurate copy-paste headers, as the files are
now vastly different than those mentioned. These will all just fall under
the "meta-data" category in upcoming licenses.

Per discussion with FindLibBladeRF.cmake author, the text in
FindLibTecla.cmake was unnecessary, and has been removed.
2013-10-21 21:00:15 -04:00
Nuand
3641f770ad Merge pull request #157 from rtucker/fix_doxygen_man_page_build
Fix doxygen man page build
2013-10-20 18:25:14 -07:00
Ryan Tucker
3a0b14d4c6 Remove unnecessary debian man page build step
I believe it should just work now
2013-10-20 21:17:50 -04:00
Ryan Tucker
9935a28e27 If doxygen is present, always build manpages
Fixes #156
2013-10-20 20:53:37 -04:00
Jon Szymaniak
a24b21a546 Merge pull request #133 from DanielG/dev
Byte order dependency in extract_field()
2013-10-20 15:42:17 -07:00
Nuand
91c0669b61 Merge pull request #155 from rtucker/fix_issue150_effects
Fix side effects of commit 43a5370
2013-10-20 13:20:09 -07:00
Ryan Tucker
1201f34d36 Fix Debian packaging to support multiarch
Fixes .deb build failure from pull req #150
2013-10-20 13:05:33 -04:00
Ryan Tucker
f105e2ef65 Update libbladeRF cmake minimum to 2.8.5
First appearance of GNUInstallDirs module:
http://www.cmake.org/cmake/help/v2.8.5/cmake.html#module:GNUInstallDirs
2013-10-20 12:51:10 -04:00
Jon Szymaniak
c086d0cc39 cmake: Added CMAKE_INSTALL_LIBDIR fallback and misc cleanup
The fallback is required for GnuInstallDirs to work on Ubuntu systems
configured for CMAKE_INSTALL_PREFIX set to /usr/include.

Cleanup:
  - Replaced LIB_INSTALL_DIR with CMAKE_INSTALL_LIBDIR
  - Removed TODO and unused items
2013-10-20 12:06:50 -04:00
Konstanty Bialkowski
43a5370c06 Use correct library path on all systems
- Fedora/RHEL uses /.../lib64/ for 64-bit and /.../lib/ for 32-bit
- Others use /.../lib/<arch>/
2013-10-20 12:06:50 -04:00
Jon Szymaniak
0a3e75384f Merge pull request #153 from rtucker/fix_tilde_file
Nuke and ignore a neglected tilde file
2013-10-19 20:15:17 -07:00
Ryan Tucker
8dd3597a49 Nuke and ignore a neglected tilde file 2013-10-19 22:12:38 -04:00
Robert Ghilduta
a8b8d29203 libbladeRF: fix Win64 build issues 2013-10-19 18:56:32 -07:00
Jon Szymaniak
fe0928eb6d README: Added link to wiki and removed data getting started lnk 2013-10-19 18:51:53 -04:00
Jon Szymaniak
fb1d1fb0f7 Merge pull request #152 from rtucker/fix_debian_udev_rules
debian: install udev rule with libbladerf0
2013-10-19 15:44:09 -07:00
Ryan Tucker
b7fad68e58 debian: install udev rule with libbladerf0 2013-10-19 17:49:00 -04:00
Jon Szymaniak
70f4ed1941 Merge pull request #142 from rtucker/issue121_packaging_debianstyle_gitfix
Issue #121 packaging, debianstyle (pull request attempt 2)
2013-10-19 11:26:30 -07:00
Jon Szymaniak
46c30d12df misc: Group associated with device in udev rule is now configurable
This is simpler than trying to automagically detect and choose
a default for the myriad of distros, and should hopefully avoid
confusion.
2013-10-19 11:01:20 -04:00
Brian Padalino
ef4618ebb9 libbladeRF: Fixes #151.
Everything except line 342 was changed.  The PA enable bits in the LMS
documentation show bits [4:3] in the table, with bit 2 always being a 0.
I could change it for clarity, but the value being written matches the
table but not necessarily the bits.
2013-10-18 19:51:15 -04:00
Jon Szymaniak
f1f1c25d42 cmake: Fixed condition that resulted in CMP0007 warning
The trailing semicolon in the ${files} list was causing CMake to
complain about the presence of an empty list element. As of CMake 2.6.0,
this results in the warning folks were seeing.
2013-10-17 21:20:00 -04:00
Robert Ghilduta
c901555061 libbladeRF: add the ability to specify transfer timeout value 2013-10-16 23:49:11 -07:00
Nuand
16e65c7273 Corrected bootloader PID. 2013-10-16 23:51:24 -04:00
Jon Szymaniak
c13ec5db0f bladeRF-cli: Fixed invalid file write size 2013-10-16 22:20:18 -04:00
Jon Szymaniak
39d95d8a49 bladeRF-cli: (Re-)fixed return value
The >= check was a vestige of older code; status is 0 unless set to an
error condition.
2013-10-16 20:53:36 -04:00
Jon Szymaniak
b4f9b9898b bladeRF-cli: Fixed incorrect return value and potential leak
Memory leak pertains to CID 1107259.
2013-10-16 20:46:06 -04:00
Jon Szymaniak
f36323a5cc libbladeRF: Removed dead/unnecessary code
Addresses CID 1104712. The function returns at the first sign of error,
so the status check is extraneous.
2013-10-16 00:07:52 -04:00
Jon Szymaniak
7a56391e46 bladeRF-cli: Fixes for Coverity items (CID 1107236 - 1107243)
CID 1107236 - 1107238: Dismissed as being intentional/false positives

CID 1107239: Fixed overflow in check_samplerate()

CID 1107240: Fixed memory leak in tx_csv_to_sc16q12()

CID 1107241: Condition associated with defect shouldn't occur,
             as bladerf_stream_init() should never return > 0. However,
             an ETYPE_BAD has been added to the CLI error types and
             used to initialize the err_type value in the RX and TX
             tasks. ETYPE_BAD should be used to initialize
             bladerf_error_type values to default values. In the event
             that unexpected bugs occur, this may help bring them to light.

CID 1107242: Removed incorrect conditional that relied on undefined
             value of status variable.

CID 1107243: Set bladerf_stream pointer to NULL after freeing, and
             added the stream deinitialization upon failure to the
             tx code (as there was a memory leak there). The double
             free() here shouldn't be possible, as the state transitions
             don't occur as modeled. However, we should be in the
             habit of setting re-used pointer to NULL after free(),
             and we'll see if this quiets Coverity. (If not, it's
             a non-issue and we should mark it as intentional.)
2013-10-15 23:38:58 -04:00
Jon Szymaniak
3a3039178a libbladeRF: Fix empty FPGA version "describe" and cache versions
The changes in ab36a93813 did not include
setting an FPGA version "describe" field to something other than '\0'.

Additionally, FW and FPGA versions are now cached upon opening a device.
The API calls now pass data from these cached values, rather than
re-read this information from the device.
2013-10-15 20:17:37 -04:00
Brian Padalino
465a561abd Merge pull request #148 from LazyDodo/master
fixes issue #143
2013-10-15 15:54:51 -07:00
lazydodo
15ad3ac033 fixes issue #143
EN_LPF is bit 1 not 6.
2013-10-15 16:47:44 -06:00
Brian Padalino
e6b5090150 cli: Fix initializer and PRIu64 printing. 2013-10-15 01:47:35 -04:00
Jon Szymaniak
dce050890d bladeRF-cli: rx/tx now use async interface, libbladeRF: USB dev speed API call bladeRF-cli_v0.6.0 libbladeRF-v0.7.0 libbladeRF_v0.7.0 v0.7.0
The rx and tx CLI commands now use the asynchronous stream interface to
yield more acceptable performance, and this code has been overhauled for
better readability. Command parameters have been added to allow for
configuration of the stream.

Although a bit overzealous, as "lock it if you use it" approach is taken
here. Optimizations may follow later..

Some rx/tx parameters now support K/M/G suffixes, where relevant.

To support sample rate sanity checks, an API function to check the
current USB speed has been added to libbladeRF. This speed is now
reported in the CLI 'info' command.
2013-10-14 22:42:19 -04:00
Brian Padalino
b87d123218 cli: Add string.h and remove some tabs. 2013-10-14 18:25:45 -04:00
Robert Ghilduta
8a49f786c6 bladeRF-cli: add MIMO clock settings
This commit introduces the first of many MIMO functionalities. MIMO clock
settings will have to be moved to libbladeRF eventually.
Setting the device as a MIMO slave makes the Si5338 use the SMB port a
reference. This is done by routing single-ended IN4 to PFD_IN_REF by setting
registers 28 to 30 to the following values:

PFD_IN_REF[2:0] = 001 (P2DIV_IN)
P2DIV_IN[2:0] = 011 (Clock from IN4 is input to P2)

reg(28) 0x2b  = | 0 | 0 | 1 | 0   1   0 | 1   1 |
P2DIV_IN[0] = 1
P1DIV_IN[2:0] = 010

reg(29) 0x28  = | 0   0   1 | 0   1 | 0   0   0 |
PDF_IN_REF[2:0] = 001
P1DIV_IN[4:3] = 01
P1DIV[2:0] = 000

reg(30) 0xa8  = | 1   0   1 | 0   1 | 0   0   0 |
PDF_IN_FB[2:0] = 101
P2DIV_IN[2:1] = 01
P2DIV[2:0] = 000

Register 6 is set to 4 so that the Si5338 loss of signal indicator knows the PFD
is using IN4 (FBCLK) as a reference.

Setting the device as a MIMO master makes the Si5338 drive the SMB port from
CLK3A.
2013-10-14 03:11:38 -07:00
Robert Ghilduta
b4ca5d4b15 libbladeRF: add si5338 peek functionality 2013-10-14 03:11:25 -07:00
Jon Szymaniak
755bd6aca9 libbladeRF, bladeRF-cli: Added support for retrieving USB device speed
Exposed API function and updated struct bladerf and both backends to
use the new enum.

Cleaned up warnings and unneccesary items in the API header.
2013-10-13 20:34:43 -04:00
Robert Ghilduta
276379e2e1 fx3_firmware: update GPIF2 design files to match .h files firmware-v1.5.3 2013-10-13 16:53:39 -07:00
Brian Padalino
d3e1fa0333 libbladeRF: Fix warning due to unused variable. 2013-10-13 11:33:22 -04:00
Brian Padalino
6331b06d9f libbladeRF: Change where initialization occurs. 2013-10-13 10:16:37 -04:00
Robert Ghilduta
17110d1ca2 libbladeRF: type fixup for MSVS 2013-10-13 02:04:03 -07:00
Jon Szymaniak
b797ee32d3 Added tags & TAGS to gitignore 2013-10-13 00:23:03 -04:00
Robert Ghilduta
2ff803b77c libbladeRF: fix to get FPGA flashing working with byte change to flash API 2013-10-12 19:06:15 -07:00
Robert Ghilduta
3e1748916a Merge branch 'DanielG-dev-flash-addressing'
Conflicts:
	host/libraries/libbladeRF/src/backend/libusb.c
2013-10-12 17:56:12 -07:00
Brian Padalino
130cbbaebc libbladeRF: Fix coverity defect and change checks.
Checking against 0 is a bit more clear.  Negative logic always
seems to get to me.
2013-10-10 21:49:34 -04:00
Brian Padalino
b788804ed7 cli: Change FPGA flash case comparison. 2013-10-09 23:35:55 -04:00
Brian Padalino
98a3d27be4 Cleanup FPGA autoloading.
Initialize the device if a default value is seen on the GPIO
config pins.

Fix up some coverity and samplerate floating point exception
bugs in the si5338 code.

Change the flash FPGA option to be -L instead of -H.

Make the version strings be long options only, no short ones.
2013-10-09 22:30:08 -04:00
Daniel Gröber
22f48f3cfb libbladeRF: fixup flash adresses in bladerf_flash_fpga 2013-10-09 13:53:21 +02:00
Daniel Gröber
c0f2a3682e libbladeRF: fix merge errors 2013-10-09 12:54:19 +02:00