Commit graph

22 commits

Author SHA1 Message Date
Keith Rothman
57116c919a [FX3/libbladeRF] Major refactoring of FX3 application
- Split RF, FPGA load, and firmware methods into seperate .c files
 - Split several vendor requests to eliminate magic glEp0Idx and to allow
   for better error handling
   - Updated libbladeRF to use new vendor requests and properly check return
     code.
 - Changed glSpiPageSize from global to #define
 - Move OTP handling into firmware.c
 - Version bump

Conflicts:

	fx3_firmware/bladeRF.c
2013-09-22 08:06:48 +00:00
Jon Szymaniak
9015bdbb5c libbladeRF, bladeRF-flash: Added device identifier info matching to API routines
Initializing, extracting, and comparing device identifier information
(struct bladerf_devinfo) is now exposed through the API. Among other
things, this allow users to check if a device specifier string matches a
device they already have a handle for.

To support this, a copy of bladerf_devinfo information is now kept around in
the device handle; backends are responsible for populating this in their
open() implementation. A couple of the fields were already present, so
this only adds a couple small variables worth of overhead.

Some re-arranging of the linux and libusb probe and open calls has been done
to achieve this. A few warnings and bugs were addressed in this process:

  - The Linux backend was attempting to fill in a serial number via
    a cached entry.

  - There was some potential for a read of an uninitialized portion
    of an otp buffer.

  - Missing serial # has been made non-fatal. (Some developers'
    device do not have serial numbers.)

Files associated with this functionality was moved from host/common
back into the library, which should now be used instead. bladeRF-flash
has been updated to use these new API functions.
2013-09-18 23:15:48 -04:00
Nuand
264fb4428e Merge pull request #103 from litghost/windows_build_fix
[test_repeater] Fixed windows build
2013-09-15 00:00:37 -07:00
litghost
c5c3cb11a2 [test_repeater] Fixed windows build 2013-09-14 23:22:11 -07:00
Robert Ghilduta
e9bc007b39 host_config.h.in: fix Sleep() argument
Windows' Sleep() function expects the argument to be specified in milliseconds
2013-09-14 23:19:13 -07:00
Keith Rothman
b530c7266d Initial version of bladeRF-flash tool 2013-09-15 05:32:04 +00:00
Keith Rothman
1c4fa232eb [libbladeRF/bladeRF-cli] Added support booting directly from the FX3 bootloader 2013-09-15 05:31:57 +00:00
Jon Szymaniak
2dcae9eeb2 libbladeRF & common: Renamed logging routines to address conflicts
The common logging functions have been renamed in order to not
conflict with the library's bladerf_log_set_verbosity().
2013-09-11 00:29:14 -04:00
Brian Padalino
9e0be95110 Merge branch 'issue66' of https://github.com/frank8371/bladeRF into frank8371-issue66
Enhancement to support suffixes on the command line.
2013-09-05 20:19:16 -04:00
Robert Ghilduta
c28acaed83 fix Windows string format function usage 2013-09-04 20:27:38 -05:00
Frank Jenner
2761491a58 Added support for suffixes on numeric values
Added a new conversion function that accepts a list of suffix to
multiplier mappings, and applies the appropriate multiplier to the input
value. Utilized this new conversion function in the CLI for set
bandwidth, set samplerate, and set frequency.
2013-09-04 20:37:15 -04:00
Jon Szymaniak
b0d82cc95e host common: Corrected return type for str2uint64 2013-09-04 19:22:14 -04:00
Jon Szymaniak
9c6892c130 host: Disabled file and line information from log messages by default.
This information (which is helpful when asking questions on IRC or
in the forums), can be enabled via the CMake argument,
     -DENABLE_LOG_FILE_INFO=ON
2013-09-04 01:33:41 -04:00
Jon Szymaniak
9252dea908 bladeRF-cli: Fixed struct field initializers and removed use of unistd.h 2013-09-03 00:19:46 -04:00
Jon Szymaniak
b30446293e Added pthreads-win32, and getopt/getopt_long to Windows build. 2013-09-03 00:19:39 -04:00
Jon Szymaniak
985a8a4548 libbladeRF: Added API_EXPORT for API routines. 2013-09-03 00:02:58 -04:00
Jon Szymaniak
fe19d9af62 Remapped a few functions, types, and macros. Moved declarations.
These items address compilation issues under VS2012.
2013-09-02 23:22:56 -04:00
Frank Jenner
3655b3d516 Added variable-level logging mechanism
Added a mechanism to log messages with different priority levels, and to
filter which messages are output by setting a threshold level. The
function to set the current log level/verbosity is exposed through
libbladeRF.h, while the logging function/macros themselves are private
to this project, and are present in log.c/log.h. Callers should use the
convenience macros bladerf_log_[level]() to issue their log messages.
These macros piece together a format string that contains the message
priority and, for warning and higher priorities, the function and line
number on which the message was logged. Also, warning level and higher
level messages are output to stderr, rather than stdout.
2013-09-02 15:39:41 -04:00
Jon Szymaniak
d394f68084 host: Fixed build items broken by Windows build-related commits.
This includes freqmod's fixes provided in pull request/issue #57,
in addition to some other misc. cleanup items noted while reviewing
the aforementioned changset.
2013-08-25 11:16:07 -04:00
Jon Szymaniak
71641d1198 host: Fixed a handful of Windows build issues. May break Linux build. 2013-08-25 01:14:24 -04:00
Jon Szymaniak
4a322888bb host: Added stdbool.h for msvc builds 2013-08-24 18:22:15 -04:00
Jon Szymaniak
4f0808a635 host: Minor rearrangement of the host-common directory 2013-08-24 18:13:23 -04:00