Commit graph

132 commits

Author SHA1 Message Date
Brian Padalino
14657308d6 cli+lib: TX/RX interface changes. 2013-08-04 22:18:06 -04:00
Jon Szymaniak
5e09b1fc20 CLI: Updated help text for device specifier 2013-08-04 22:12:43 -04:00
Jon Szymaniak
79a8bccb60 libbladeRF: [WIP] Fixed use after free in libusb backend error handling 2013-08-04 21:56:57 -04:00
Brian Padalino
460fd4d672 cli+lib: [WIP] libusb and cli changes.
Currently the FPGA loads and register reads/writes work.

Need to get samples sending/receiving.
2013-08-04 21:51:59 -04:00
Jon Szymaniak
12e6a024d9 libbladeRF: [WIP] Added driver workaround in FPGA loading 2013-08-04 21:38:13 -04:00
Brian Padalino
cb7766d1bd backend/libusb: Open and close now works. 2013-08-04 19:44:07 -04:00
Jon Szymaniak
f8b555c733 libbladeRF: [WIP] File read output params now updated. 2013-08-04 17:29:41 -04:00
Jon Szymaniak
c6258c4b6e libbladeRF: [WIP] Moved devinfo match routines to bladerf_priv 2013-08-04 16:36:13 -04:00
Jon Szymaniak
7766af1880 libbladeRF: [WIP] Moved a few snippets from linux backend to top level. 2013-08-04 14:10:52 -04:00
Jon Szymaniak
82a47b2a4a libbladeRF: Implemented & stubbed out part of linux backend open() 2013-08-03 03:02:56 -04:00
Jon Szymaniak
6157f564ac libbladeRF: [WIP] Fixed str2devinfo and test.c bugs 2013-08-03 02:26:06 -04:00
Jon Szymaniak
53b7e3d763 libbladeRF: [WIP] Tweak naming of device identifier routine(s) 2013-08-03 01:50:13 -04:00
Jon Szymaniak
c323fb553d libbladeRF: [WIP] First cut at path from top-level to backend opens
Nightly check-in. This currently fails to run - there's likely
a number of assertion failures and segfaults to address.
2013-08-03 01:23:03 -04:00
Jon Szymaniak
1c13addd1d libbladeRF: [WIP] Planned bladerf_open out, misc interface cleanup. 2013-08-02 21:27:25 -04:00
Jon Szymaniak
103c7214d2 libbladeRF: [WIP] Added file_ops.c/h
Common file operations will be tucked in here to allow them to
be easily dummied out for NIOS build without making a mess of
bladerf.c.
2013-08-02 21:25:54 -04:00
Jon Szymaniak
e12fcbf347 libbladeRF: [WIP] header file cleanup 2013-08-02 19:59:47 -04:00
Jon Szymaniak
f4102152ce libbladeRF: [WIP] Moved liblms.h items to private lms.h
The top-level, public interface is now libbladeRF.h. Depedencies
should now only flow downward, with lms.c/h depending on
libbladeRF.
2013-08-02 19:39:57 -04:00
Jon Szymaniak
d494c61f5b libbladeRF: [WIP] Stubbed out calls that need to be implemented 2013-08-02 01:04:52 -04:00
Jon Szymaniak
e277b9b15e libbladeRF: [WIP] Further file renaming 2013-08-01 23:49:00 -04:00
Jon Szymaniak
c3019016c6 libbladeRF: [WIP] Refactored Linux driver backend now compiles.
A number of XXX's and TODO's need to be addresses, as this is
not yet functional.
2013-08-01 22:04:02 -04:00
Brian Padalino
2a73ceb3ec lib: [WIP] Builds but functionality needs checking.
Major overhaul of driver structure has been changed to support
better library versus platform separation.
2013-08-01 02:15:17 -04:00
Brian Padalino
633ea2dfa7 lib: [WIP] Heavy modification to separate out linux specific code. 2013-08-01 02:15:17 -04:00
Jon Szymaniak
b3f442c01c [BROKEN] Fixed typo in bladerf_libusb.h 2013-08-01 01:57:14 -04:00
Jon Szymaniak
e3566e4249 [BROKEN] Added remaining fns to libusb support. (Untested) 2013-08-01 01:41:30 -04:00
Jon Szymaniak
bcbca049ac [BROKEN] Stubbed out remaining routines in libusb support 2013-08-01 00:38:48 -04:00
Jon Szymaniak
01e9812eb7 lib: [Broken] Added fpga programming routines to libusb support 2013-07-31 23:46:30 -04:00
Brian Padalino
b1057815d3 cli: Add external sampling from ADC pins.
A new command for print/set for sampling being internal via the normal
RXVGA2 path or external via the differential pin header.
2013-07-30 23:16:24 -04:00
Jon Szymaniak
70a628fc3d lib: Typo fix in LMS register access
Function call was missing a device handle argument
2013-07-26 00:37:09 -04:00
Brian Padalino
183518d4fb lib: Do not want to enable the modules via pins until we're ready to do something with them. 2013-07-25 23:49:16 -04:00
Brian Padalino
51a3905881 kernel: Remove some breaks which were causing issues.
lib: Add some device initialization after the FPGA is loaded.
2013-07-25 23:39:50 -04:00
Jon Szymaniak
780fcd143c CLI: Fixed a few small typos in the README.md 2013-07-25 22:49:28 -04:00
Jon Szymaniak
f1708ef940 CLI: Added interactive mode support for RX and TX, misc. refactoring.
See the README.md in the linux/apps directory for more details.

Note that -d <device> is now optional if only one device is connected.
2013-07-25 22:41:22 -04:00
Jon Szymaniak
807007f193 libbladeRF: Cleand up gpio_* return values and remove a few printf()'s 2013-07-25 21:43:06 -04:00
Jon Szymaniak
9828c91201 CLI: Typo fixes in comments from previous commit 2013-07-25 10:02:25 -04:00
Jon Szymaniak
cf8336c159 CLI: Added missing bladerf_enable_module() implementation
This routine is used to enable/disable the RX/TX on the LMS,
and should be used instead of the gpio_* routines.

All calls that are not prefixed with bladerf_* will be removed
and replaced with more appropriate interfaces in the near future.
2013-07-25 10:01:00 -04:00
Comics
ac2b1d61e4 Update bladeRF.c
Fix to add missing include on bladeRF.c
2013-07-25 10:26:32 +01:00
Jon
e40e0898fb libbladeRF: Fixed typos introduced in previous commit
The patch applied as f6018c14d9 wasn't
intended to be merged. This cleans up said patch and touches
up surrounding documentation a bit.

This compiles but is untested as I don't currently have access to
hardware. (Just wanted to ensure the build isn't left broken all day!)

My apologies if this inconvenience anyone!
2013-07-24 10:14:59 -04:00
Jon
f6018c14d9 libbladeRF: change to using BLADERF_GPIO_FEATURE_HW macro
Minor clean up.
2013-07-24 02:53:15 -07:00
Jon
00b7c67aed linux_driver: change when the buffers are marked as valid
This commit initializes RX buffers as valid at creation and when RX is
(re)enabled.
2013-07-24 02:53:15 -07:00
Robert Ghilduta
eb3eee0097 linux_driver: fix typo in function call 2013-07-23 02:01:49 -07:00
jynik
c728ceb7c5 doc: Fixed typo in linux driver README.md 2013-07-22 21:21:49 -04:00
Robert Ghilduta
6c3b1ec453 linux_diver: track which file descriptors are readers and writers
This commit disallows multiple file descriptors from simulatenously reading or
simultaneously writing to the bladeRF.
2013-07-22 03:45:55 -07:00
Robert Ghilduta
8d9ed972ca fix HS buffering
This commit defines nios_gpio(7) as the GPIF buffer size control signal. The FX3
firmware makes the DMA engine operate on GPIF buffers that are twice the size of
the maximum sized URB. Since this is speed dependent, bladeRFs operating in HS
will have their GPIF DMA controllers only read 1024 bytes of data (512*2)
instead of 2048 (1024) as is expected when the device is in SS mode. To fix
this, the driver tells the library when a device is HS, the library then s the
nios_gpio bit that causes the FPGA to limit itself to only reading/writing to
the 32bit GPIF for 256 cycle at a time (instead of 512 cycles at SS).
2013-07-22 03:45:40 -07:00
Robert Ghilduta
a4f2a0027e linux_kernel: RX and TX fixes
data_*_used variable is introduced to keep track of the total number of data
packets that are inflight or have data in them. In the case of RX, a packet is
"used" when it is submitted, and it "unused" after data has been read. In the
case of TX, a packet is "used" when user-mode data is copied to it, and it is
"unused" after the URB has completed.
2013-07-22 03:45:28 -07:00
Sylvain Munaut
718210ba9a lib/lms: Add a function to convert a lms_freq struct to frequency in Hz
... and use it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-07-21 22:10:34 +02:00
Sylvain Munaut
f27f71c7f9 lib/lms: New VCOCAP search algorithm
Seems more resilient to errors than the previous one.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-07-21 13:38:20 +02:00
Sylvain Munaut
c658692e25 lib/lms: Clean up of the PLL parameters setting
Using 64 bit math is just way easier to read and
just as safe and precise.

Also cleanup random bits in that area

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-07-21 13:37:03 +02:00
Sylvain Munaut
ce22ce2611 lib: Avoid warning in lib when using lms_printf in 'if'
When you have something like:

if (bad_thing_happenned)
    lms_printf("Panic !");

defining lms_printf to nothing creates a warning.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-07-21 13:30:48 +02:00
Sylvain Munaut
65a9715666 lib: Fix band selection
There was two issues :
 - Swap between the RX/TX GPIOs controlling the switch
 - The proper LNA was not being selected inside the LMS

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-07-21 12:52:51 +02:00
Sylvain Munaut
1efc77b1f5 lib: Fix TXVGA2/RXVGA2, avoid casting (int*) to (uint8_t *)
Not everyone is little endian !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-07-20 19:29:05 +02:00