aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/uhd_images_downloader.py.in
diff options
context:
space:
mode:
authoreklai <eric@skysafe.io>2020-01-23 18:47:28 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-18 07:21:24 -0600
commitd7304cc724de43b0d61d5b9d61a528d58898f004 (patch)
tree05304ad4d65c507c6d43fcbc407c566c351053c3 /host/utils/uhd_images_downloader.py.in
parentc0a6bb1720a3db8ac9a40bdd5ca19de8be40d500 (diff)
downloaduhd-d7304cc724de43b0d61d5b9d61a528d58898f004.tar.gz
uhd-d7304cc724de43b0d61d5b9d61a528d58898f004.tar.bz2
uhd-d7304cc724de43b0d61d5b9d61a528d58898f004.zip
x300: add front-panel GPIO source control
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>
Diffstat (limited to 'host/utils/uhd_images_downloader.py.in')
0 files changed, 0 insertions, 0 deletions