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.
This is intended to simplify some portability issues, since an int
type is sufficient in the few spots where we had ssize_t.
We'll need to still add a ssize_t wrapper around the Windows
[SSIZE_T](msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx#SSIZE_T)
for use inside the library.
The _t suffix on enums has been removed, as "_t" is reserved for
POSIX types.
To avoid naming collisions, macro definitions and enumeration values are
now prefixed with at least "BLADERF_".
Also in the mix is a stubbed out "unsupported" implementation of the
stream routines for the Linux driver backend.
Added some memory allocation checks and attempts to tear down the
stream at the first sign of errors, avoiding submitting transfers
if intialization errors occurred. Also did some misc. error
code house keeping.
STREAM_ERROR has been removed. Use STREAM_SHUTTING_DOWN and the
bladerf_stream->error_code field to differentiate between a clean an
error-driven shutdown.
It appears that attempting to use the libusb backend before the FPGA is
loaded yields erroneous behavior when attempting to load the FPGA after
encountering a BLADERF_ERR_IO. (This situation requires a power on reset
of the board.) As such, an FPGA check has been added to the async test
program.
Using libusb for streams of both TX and RX. The example
tx_async test is now for both and wil save off samples
in CSV to a file. The code still needs to be audited
before it can be brought down to the mainline.
Actually made the callback do some calling back in the TX direction.
This looks like it keeps up in general.
Also fixed up some of the test program so we don't try to transmit
samples which are outside the buffer.
Currently some memory issues when deallocating transfers.