Commit graph

54 commits

Author SHA1 Message Date
Jon Szymaniak
5592d11c0c cli: Fixed extraneous error messages when failing to opend device
A message regarding the use of -d was being printed under incorrect
conditions due to an error status not being checked.
2013-07-06 14:14:07 -07:00
Brian Padalino
cd3552f73a lib: Cleaned up reported github issue #5 and #6
Fixed lms_lpf_enable() to always enable the LPF.
Fixed lms_lpf_disable() to not disturb DCO_DACCAL_LPF.
2013-07-06 14:14:04 -07:00
Brian Padalino
1c9849538f apps: Adding an rx_test to see if the samplerate is being kept up.
cli: Adding trimdac writing.
nios: Removing the unions.
2013-07-06 14:14:03 -07:00
Brian Padalino
480e115537 lib: Set Si5338 to 2x requested sample rate
The ADC/DAC clocks runs at 2x their actual sample rate,
so the Si5338 should be generating a 2x sample clock
for the requested rate.
2013-07-06 14:14:01 -07:00
Rob
a1377133b0 libbladeRF: add Si5338 read support
Support for reading Si5338 registers has existed in the driver for a while. This
commit now allows the library to utilze it as well.
2013-06-23 21:57:46 -07:00
Rob
a589bb1260 libbladeRF: add dac_write() DAC control support
This commit adds support for writing values to the VCTCXO calibration DAC.
2013-06-23 21:57:36 -07:00
Rob
86fe5f2a8b host: fixup uart_cmd 2013-07-06 14:13:09 -07:00
Brian Padalino
74102bbcda cli: Added gpio printing. 2013-07-06 14:03:59 -07:00
Brian Padalino
b20948c7c7 cli: Formatting of poke changed to match peek. 2013-07-06 14:03:58 -07:00
Jon Szymaniak
888b3f0596 cli: Exit cleanly on SIGTERM, SIGINT, and SIGQUIT 2013-07-06 14:03:56 -07:00
Brian Padalino
b6ffd3f9d4 cli: Added rxvga1 and rxvga2.
lib: Modified calls to rxvga2 since units are in 3dB increments.
2013-07-06 14:03:55 -07:00
Brian Padalino
001f65a7fc cli: Added lnagain. 2013-07-06 14:03:54 -07:00
Brian Padalino
2b0b8e3349 cli: Adding aliases to the commandline 2013-07-06 14:03:53 -07:00
Brian Padalino
57c6c424a8 lib: Allow reloading of FPGA 2013-07-06 14:03:51 -07:00
Brian Padalino
8dcd48a561 cli: More print/set updated.
lib: Moved all implementation code to bladerf.c
2013-07-06 14:03:49 -07:00
Brian Padalino
b97eb3554d cli: Implemented txvga1 print/set and fixed library calls for txvga1. 2013-07-06 14:03:48 -07:00
Brian Padalino
a5b9c7a15d cli: Implemented bandwidth set/print 2013-07-06 14:03:47 -07:00
Brian Padalino
da47b0fec4 kernel: Changing USB VID/PID to OpenMoko instead of Cypress. 2013-07-06 14:03:45 -07:00
Brian Padalino
b7994f399d cli: peek/poke an print/set combined into single files.
Also added top level .gitignore file.
2013-07-06 04:50:38 -07:00
Brian Padalino
ef2a542136 cli: Adding extra functionality.
lib: Added device path to bladerf structure to know where fd is pointing.
2013-07-06 04:50:37 -07:00
Jon Szymaniak
ccfd96a040 cli: Fixed handling of empty line, and misc. cleanup
Interactive console's argc wasn't being checked, resulting in
a bogus "Unexpected command:" and often segfaults.

In other news, I failed to note in the previus changeset that at
least half the cli changes were authored by Brian Padalino...so
doing that here - ec54e4e409
2013-06-17 01:53:16 -04:00
Jon Szymaniak
ec54e4e409 cli: Added FX3/ FPGA loading support and filled in misc. cmd stubs.
The CLI now supports flashing the FX3 and loading the FPGA from the
command line and through the interactive console.

To flash the firmware from the command line:
  ./bin/bladerf -b -f ./path/to/img -d /dev/bladerf1

To load the firmware from the command line:
  ./bin/bladerf -b -l ./path/to/rbf -d /dev/bladerf1

To flash/load interactively either run with -d /dev/bladerf1, or
use the open command to attach to a device:
  bladeRF> open /dev/bladerf1

To flash the firmware interactively:
  bladeRF> load fx3 ./path/to/img

To load the FPGA interactively:
  bladeRF> load fpga ./path/to/rbf

Note that a power-on-reset is currently required in between
flashing firmware and loading the FPGA.

Various commands have been stubbed out for the time being. A TODO
list has been created to keep track of desired functionality.

The simple_load and upgrade_firmware programs have been removed,
as they are no longer needed.
2013-06-17 00:12:19 -04:00
Robert Ghilduta
9b80370f0c libbladeRF: fixup RX function 2013-06-16 18:17:50 -07:00
Jon Szymaniak
eecc0d2799 libbladeRF: Implemented firmware flashing, touched up FPGA loading.
Credit where credit is due -- All the code here is basically
copy/paste from Robert's earlier test code, with some added error
checks and debug output.

The firmware loading now checks the write return value and
performs partial writes as needed.

Items that need to be revisited are the sanity checks on file
sizes. In the future I plan to implement a "bladeRF Image" format
that will wrap size and a hash around a firmware/bitstream. These
checks will probably go into that code.
2013-06-16 18:17:49 -07:00
Jon Szymaniak
75a277cc99 kernel: Removed urb print from driver 2013-06-16 18:17:48 -07:00
Jon Szymaniak
45f8316207 kernel: Fixed issue where write() returns 0 when programming FPGA 2013-06-16 18:17:47 -07:00
Jon Szymaniak
265755de0b libbladeRF: Header file cleanup, added bladerf_strerror
Misc cleanup. Added reference to RETCODES in doxygen @return's.
2013-06-16 18:17:46 -07:00
Brian Padalino
d8ae03cabe bladerf: Adding documentation and liblms calls. 2013-06-16 18:17:44 -07:00
Brian Padalino
c10b7a7b83 Adding some new getters/setters. 2013-06-16 18:17:43 -07:00
Brian Padalino
4997c38d3d libbladeRF: Added setters/getters
Added some extra setters/getters for center frequency and gain.
2013-06-16 18:17:42 -07:00
Robert Ghilduta
f8e78fba46 libbladeRF: driver: add host software support for GPIO over UART bridge 2013-06-09 23:03:28 -07:00
Robert Ghilduta
3843d1909e libbladeRF: add FPGA programming support 2013-06-09 23:03:27 -07:00
Robert Ghilduta
5c41729ac3 libbladeRF: add support for LMS6002D
This commit introduces LMS library support for controlling the LimeMicro
LMS6002D transceiver. The LMS library functions were originally developed by
bpadalino.
2013-06-04 20:22:59 -07:00
Robert Ghilduta
b49d9fe7d2 cli: make the cli app be conditionally compiled to be interactive 2013-06-09 22:58:35 -07:00
jon
2f9dc744a2 cli: Initial skeleton of CLI program 2013-06-09 22:58:34 -07:00
jon
c2e3c54422 apps: Added hooks to build without 'make install'-ing libbladeRF 2013-06-09 22:58:33 -07:00
jon
7f22b26f7d libbladeRF/apps: Moving cli build to apps/
This is the first commit in a set of upcoming changes that will
move functionality from simple_load and upgrade_firmware into the
libbladeRF library and provide access to these routines through a
bladeRF cli.

Don't merge from jon-dev until I get this straightened out, or
you'll be left with something possibly unusable...
2013-06-09 22:58:32 -07:00
jon
aad9e99bfb libbladeRF: 'make install' now prints what it's executing to install 2013-06-09 22:58:31 -07:00
Robert Ghilduta
e467bdf85a libbladeRF: add Si5338 support
This commit introduces support for controlling the on-board programmable PLL and
clock distribution Si5338 chip.
2013-06-04 20:42:06 -07:00
jon
cbad06a5a1 libbladeRF: More lib renaming & fixes for tempoarary (un)install targets 2013-06-09 22:58:18 -07:00
jon
7ccd37aa7d libbladeRF: header and lib renamed to libbladeRF. Minor fixes added.
Fixed bladerf_get_device_list return value for condition where no
devices are attached. (Now returns 0, previously returned -1).

Also added a missing catch of a malloc failure and now return appropriate
error value.
2013-06-09 22:58:17 -07:00
jon
5a7b8a253d libbladeRF: Makefile now creates and installs libbladerf.pc 2013-06-09 22:58:06 -07:00
jon
2807d5d3fe libbladeRF: Added header inclusion guards and cplusplus check. Fixed 'make uninstall' 2013-06-09 22:58:05 -07:00
jon
95c2c3db70 libbladeRF: Added stubs for fetching FPGA version info. 2013-06-09 22:58:05 -07:00
jon
ca35519b34 libbladeRF: Added calls to fetch some device info, and did a bit of cleanup. 2013-06-09 22:58:04 -07:00
jon
52a3d834ea libbladeRF: Removed duplicate bladerf_flash_firmware() from header and erroneous #include 2013-06-09 22:58:03 -07:00
jon
bffd52e1f5 libbladeRF: Implemented bladerf_get_device_list(). Removed missing logo from Doxygen
With these changes, the cli can be used to probe for attached bladeRF
devices on the system, assuming the user has r/w on the /dev/bladeRF
nodes.
2013-06-09 22:58:02 -07:00
jon
9773679fd2 libbladeRF: Added cli program to build for testing and debugging 2013-06-09 22:58:01 -07:00
jon
709d2d0fdc libbladeRF: Changed default include path to include ../../common
This will make things slightly less of a pain in the butt for the
time being. Someone remind me to fix this later.
2013-06-09 22:58:00 -07:00
jon
ff772abcf4 libbladeRF: Move bladerf_stats to public header, added fn to obtain these. 2013-06-09 22:57:59 -07:00