aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-11-14 13:12:20 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2020-01-23 11:37:51 -0800
commit0cf54ce07335f60642a14df7e6107422a5aeb9a0 (patch)
treeae49a1f983fbeab9aa9f652204940d741b98e030 /mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py
parent09af39604c91bbb725a366e41bab4654274870c2 (diff)
downloaduhd-0cf54ce07335f60642a14df7e6107422a5aeb9a0.tar.gz
uhd-0cf54ce07335f60642a14df7e6107422a5aeb9a0.tar.bz2
uhd-0cf54ce07335f60642a14df7e6107422a5aeb9a0.zip
mpm/mpmd: Expose APIs to drive GPIO sources
The N310 has a feature that allows the front panel GPIOs to be driven by various sources: The PS, or any of the radio channels. The MPM-based APIs did not expose any way to change that. Changes: - Add MPM APIs to PeripheralManagerBase and n3xx classes - Improve comments and explanations - Add host-side hooks into these new APIs in mpmd_mb_controller - Implement these APIs for N3xx The N3xx devices will have the option to set the GPIO source to "PS", or to one of "RF0", "RF1", "RF2", "RF3" (if there are four channels; the N300 and N320 can only go up to RF1). Note: The N310 radio does not have separate FP-GPIO banks for channels 0 and 1, which needs to be fixed in a separate commit.
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py b/mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py
index ef2372e62..bcff03c8e 100644
--- a/mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py
+++ b/mpm/python/usrp_mpm/periph_manager/n3xx_periphs.py
@@ -195,6 +195,8 @@ class MboardRegsControl(MboardRegsCommon):
"""set driver for front panel GPIO
Arguments:
value {unsigned} -- value is a single bit bit mask of 12 pins GPIO
+ 0: means the pin is driven by PL
+ 1: means the pin is driven by PS
"""
with self.regs:
return self.poke32(self.MB_GPIO_MASTER, value)
@@ -211,7 +213,7 @@ class MboardRegsControl(MboardRegsCommon):
def set_fp_gpio_radio_src(self, value):
"""set driver for front panel GPIO
Arguments:
- value {unsigned} -- value is 2-bit bit mask of 12 pins GPIO
+ value {unsigned} -- value is 2x12 bits, two bits per GPIO pin
00: means the pin is driven by radio 0
01: means the pin is driven by radio 1
10: means the pin is driven by radio 2