Commit graph

16 commits

Author SHA1 Message Date
litghost
abe064cea8 Fixes for Windows build warnings on VS2012 2013-09-27 16:31:37 +00:00
litghost
c5c3cb11a2 [test_repeater] Fixed windows build 2013-09-14 23:22:11 -07:00
Jon Szymaniak
3f31d7dac2 libbladeRF: Added simple full-duplex repeater test
This test program re-transmits received data in real time (optionally on
a different frequency.)
2013-09-14 15:11:08 -04:00
Jon Szymaniak
56693c0675 libbladeRF: Changed bladerf_stream parameters, refactored stream init
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.
2013-09-05 00:06:14 -04:00
Brian Padalino
666db3a914 Updated async test
Updated to be able to compile with VS2012.  Untested, and probably won't
work correctly.
2013-09-03 00:03:06 -04:00
Jon Szymaniak
792894c228 libbladeRF: [WIP] Changed API interfaces to use int instead of ssize_t.
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.
2013-08-23 01:44:13 -04:00
Jon Szymaniak
8cc9f2a4b5 libbladeRF: Cleaned up API enumerations and macro definitions.
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.
2013-08-22 01:01:23 -04:00
Jon Szymaniak
27de30d0cf libbladeRF: Fixed incorrect variable assignment in async test program.
Also touched up some debug prints to aid in debugging an issue that
arises if buffers are not multiples of 4096 bytes. (FX3 DMA size?)
2013-08-21 22:46:16 -04:00
Jon Szymaniak
32ec6d97ef libbladeRF: [WIP] Touched up error handling in libusb 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.
2013-08-20 00:11:22 -04:00
Jon Szymaniak
5960063d2f libbladeRF: [WIP] Fixed uninitialized var and segfault in async test.
Also performed misc. cleanup on the TX side of things in this test
program. RX still appears to have some issues.
2013-08-19 18:19:40 -04:00
Brian Padalino
f349d209eb libbladeRF: [WIP] Fixed streams for both TX and RX.
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.
2013-08-18 23:58:42 -04:00
Brian Padalino
5fc3284e2c libbladeRF: [WIP] Zero copy TX async interface. 2013-08-18 20:15:54 -04:00
Brian Padalino
b926523b17 libbladeRF: [WIP] Updating test program. 2013-08-18 14:03:25 -04:00
Jon Szymaniak
29cabea762 libbladeRF: [WIP] Starting to re-work today's design. 2013-08-17 23:27:56 -04:00
Brian Padalino
15c7a00a89 libbladeRF: Fleshed out the TX callback.
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.
2013-08-17 13:22:50 -04:00
Jon Szymaniak
bd4408a6e3 libbladeRF: [WIP] In the process of adding and testing tx stream.
Additionally authored by bpadalino.
This functionality is currently not working.
2013-08-16 23:56:28 -04:00