| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The example refactoring required usage of the get/set source API, which
isn't available on B2xx series. This patch tests for the existence of
said API, and disables its usage if appropriate.
|
|
|
|
|
|
|
|
|
|
| |
The refactoring changed the behaviour of --bitbang: before, it would
terminate after one readback unless --repeat was specified, in which
case it would require a Ctrl-C (SIGINT). After the refactoring, it
always required a SIGINT. This changes the behaviour back to prior to
727141d, and will now only read back once, unless --repeat is provided.
This also fixes the bitbang devtest, which would go on indefinitely.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The example had organically grown and was getting hard to read, and also
had some known issues. Summary of fixes:
- Default GPIO bank and connector are now derived from the device. This
allows this example to pass without throwing an exception on E3xx and
X4xx series when using default arguments.
- The bitbang test is moved into its own code section, to make the rest
more readable.
- We move all the streamer-related code into a helper struct
- Some repetitive parts of the code are moved into their own functions
- The argument --require-loopback is added, which will fail tests if
GPIO pins are not correctly looped back externally
- --list-banks is renamed to --list_banks for consistency
|
|
|
|
|
|
|
| |
"bank" refers to what the radio control sees, and "port" refers to what
the user looking at the physical device sees. For example, on X410 each
radio control only has a single (24-bit) output, which can be routed
to either of two ports.
|
|
|
|
|
|
|
|
|
| |
The checks from the new clang-tidy file are applied to the source tree
using:
$ find . -name "*.cpp" | sort -u | xargs \
--max-procs 8 --max-args 1 clang-tidy --format-style=file \
--fix -p /path/to/compile_commands.json
|
|
|
|
|
|
|
|
|
|
| |
The example assumed that there was always at least one TX and on RX
channel. Since that is not always true, this change checks for TX
and RX channels and only exucutes tests for what exists on the device.
Applied clang format.
Signed-off-by: Michael West <michael.west@ettus.com>
|
|
|
|
|
| |
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
|
|
|
|
|
| |
Non-RFNoC devices do not support get_gpio_src() entrypoing so wrap call
with a try/catch block
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a ZPU register to control the FP GPIO source. These are 2bits
per GPIO pin, totalling 24 bits. 0 corresponds to RF-A, 1 corresponds
to RF-B. The following Python code will control the upper 6 bits of the
front-panel GPIO from the B-side radio on an X300:
>>> import uhd
>>> U = uhd.usrp.MultiUSRP("type=x300")
>>> U.get_gpio_src_banks()
['FP0']
>>> U.get_gpio_src("FP0")
['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA',
'RFA', 'RFA']
>>> U.set_gpio_src("FP0", ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA',
'RFB', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB'])
>>> U.get_gpio_src("FP0")
['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFB', 'RFB', 'RFB', 'RFB',
'RFB', 'RFB']
>>> # Make all GPIOs outputs:
>>> U.set_gpio_attr("FP0A", "DDR", 0xFFF)
>>> U.set_gpio_attr("FP0B", "DDR", 0xFFF)
>>> # Control all GPIOs from software (not ATR):
>>> U.set_gpio_attr("FP0A", "CTRL", 0x000)
>>> U.set_gpio_attr("FP0B", "CTRL", 0x000)
>>> # Bottom 3 pins go high from radio A
>>> U.set_gpio_attr("FP0A", "OUT", 0x007)
>>> # Top 3 pins go high from radio B
>>> U.set_gpio_attr("FP0B", "OUT", 0xE00)
Amends the gpio.cpp example to allow switching the source.
Co-authored-by: Brent Stapleton <brent.stapleton@ettus.com>
|
|
|
|
|
|
|
|
|
|
| |
The gpio example would continously call get_time_now() to time a loop.
There is no need to query a device here, so we query the system timer
instead.
This fixes an issue where the large amounts of control traffic could
slow down TX, causing the TX and FDX tests to fail. This was only ever
seen on the X300_HG over 1GigE.
|
|
|
|
|
| |
- Use GPIO_BIT(x) instead of 1<<x where appropriate
- Correctly use rx_buff/tx_buff in recv/send, respectively
|
|
|
|
|
| |
This will print the currently-used GPIO bank's name before starting the
test.
|
|
|
|
|
|
|
| |
The gpio example can now list all available banks before running tests.
Use like this:
gpio --args $args --list-banks
|
|
|
|
|
|
|
| |
Remove UHD call to elevate thread priority to realtime. Setting all
threads to the same realtime priority can cause the threads to not share
access to the network interface fairly, which adversely affects
operation of the worker threads in UHD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applying formatting changes to all .cpp and .hpp files in the following
directories:
```
find host/examples/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/tests/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/utils/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find mpm/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Also formatted host/include/, except Cpp03 was used as a the language
standard instead of Cpp11.
```
sed -i 's/ Cpp11/ Cpp03/g' .clang-format
find host/include/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Formatting style was designated by the .clang-format file.
|
|
|
|
|
|
| |
Turning off clang formatting around the program option declarations.
clang-format makes them looks bad an unreadable because it thinks the
options are function calls or something.
|
|
|
|
|
|
| |
Minor changes:
- Remove some Boost usage
- Minor formatting changes
|
|
|
|
|
|
|
| |
All copyright is now attributed to "Ettus Research, a National
Instruments company".
SPDX headers were also updated to latest version 3.0.
|
| |
|
| |
|
|
|
|
|
| |
Note: This is the first commit that uses for-range, and range-based
for-loops are now usable for UHD development.
|
| |
|
|
|
|
|
|
| |
(fixed-width types)
Now also removes the namespaces in examples/
|
|
|
|
|
|
|
|
| |
types)
- Also removes all references to boost/cstdint.hpp and replaces it with
stdint.h (The 'correct' replacement would be <cstdint>, but not all of our
compilers support that).
|
|
- GPIO on UART connector all board Revs
- Consolidated fpgpio_bitbang into fpgpio example and renamed it gpio
- Changed FP_GPIO readback address to match X300
|