- 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
- Move and use interface numbers
- Renumber USB_IF_CONFIG from 0 to 3
- Introduced 0 alt-interface as a NULL interface
- Fixed FS descriptor length
- Implemented GET_STATUS, SET_FEATURE, CLEAR_FEATURE w.r.t. halting bulk streams
- Added include guards for firmware_common/bladeRF.h
- Changed guard on suspend/resume requests to key on glUsbConfiguration instead
of glUsbAltInterface. This is because suspend/resume requests are on
interfaces, not endpoints.
- Addresses github tickets #97, #98, #99
Fixed defect introduced in 9015bdbb5c, where a device handle's device identifier information was being populated from a (most likely) uninitialized bladerf_devinfo, rather than the one fully populated by a call to lusb_get_devinfo().
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.
Setting the SPI flash interface is not required for reading. Only for writing. Turns out, if you try to set that interface twice then things do not go so well.
I am not 100% sure if this is just a host side fix for a firmware issue, but it alleviates the problem for now.
Also fixed some tabs that snuck in there.
All executables and libraries are now placed in a single "output" directory.
For Windows builds, third-party DLLs are copied into this directory.
This commit also moves some CFLAGS changes in the top-level CMakeLists.txt
down to where some other compiler flags are set up. (Non-functional change)
- Looks like trying to transfer data just before a RESET doesn't complete
Changed RESET vender request to data-less
- Fixed some missing new line chars
- Added method to libbladeRF
- Added new VID/PID pair to udev rule to prevent requiring root access
- Added jump_to_boot bladeRF-cli command
- Fixed most warnings in FX3 firmware
This check was only being used to print an informational message.
However, it was supposed to be used to change the return value to
indicate the FPGA being re-loaded versus loaded.
Because the caller can check the FPGA state via
bladerf_is_fpga_configured(), this check has been pulled out, and the
interface now specifies that this functions return value only indicates
success (0) or failure (error code).
Instead of toggling all of power for all the RF modules when we
disable, just turn off the RF front end circuitry. This alleviates
issue #82 since the PLL is powered separately from the RF front end.
Tested and verified that while TX was disabled, setting a new
frequency does have the spectrum show up at the appropriate place.
Parameters have been removed from the bladerf_stream() call, because
these parameters would already have been associated with the provided
stream via the bladerf_init_stream() call.
A backend stream_init() has been added, and libusb transfer
initialization has been moved into the implementation of this
backend-specific function. This is required to ensure that
bladerf_deinit() stream can be called directly after
bladerf_init_stream(), without a call to bladerf_stream(). Such
a use case might occur if an error was detected before kicking off the
stream.
If a flash calibration or OTP section are either corrupted or not set
the serial, trim, and FPGA size will not be read back. Under these
conditions, some "dummy" values are populated in the device structure,
to avoid uninitialized variables being thrown around.
If we fail to fetch the serial number due to older firmware, this
would prevent the user from being able to get far enough to upgrade.
Therefore, we instead opt to print an error message and trudge onward.
Replaced all of the dbg_printf calls in the library code with logging
calls that utilize the new logging mechanism. I just made some educated
guesses at the most appropriate log level for each message.