aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/e31x_periphs.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-11-14 13:35:20 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2020-01-23 11:37:51 -0800
commit354886ed4cee82317f6ad45bc57a14af67cce85f (patch)
tree0bb7b1d99055676c28fd20f04f90dfbcd424ffae /mpm/python/usrp_mpm/periph_manager/e31x_periphs.py
parent90a72e8cd4cd1d4971c0e09d9813c9fc43371062 (diff)
downloaduhd-354886ed4cee82317f6ad45bc57a14af67cce85f.tar.gz
uhd-354886ed4cee82317f6ad45bc57a14af67cce85f.tar.bz2
uhd-354886ed4cee82317f6ad45bc57a14af67cce85f.zip
mpm: e320/e310: Expose APIs to drive GPIO source via UHD
This enables the *gpio_src* APIs for the E320 and the E31x.
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/e31x_periphs.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/e31x_periphs.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/e31x_periphs.py b/mpm/python/usrp_mpm/periph_manager/e31x_periphs.py
index bb84ebb3e..05e72fcb6 100644
--- a/mpm/python/usrp_mpm/periph_manager/e31x_periphs.py
+++ b/mpm/python/usrp_mpm/periph_manager/e31x_periphs.py
@@ -72,24 +72,24 @@ class MboardRegsControl(MboardRegsCommon):
def set_fp_gpio_master(self, value):
"""set driver for front panel GPIO
Arguments:
- value {unsigned} -- value is a single bit bit mask of 8 pins GPIO
+ value {unsigned} -- value is a single bit bit mask of 6 pins GPIO
"""
with self.regs:
return self.poke32(self.MB_GPIO_MASTER, value)
def get_fp_gpio_master(self):
"""get "who" is driving front panel gpio
- The return value is a bit mask of 8 pins GPIO.
+ The return value is a bit mask of 6 pins GPIO.
0: means the pin is driven by PL
1: means the pin is driven by PS
"""
with self.regs:
- return self.peek32(self.MB_GPIO_MASTER) & 0xfff
+ return self.peek32(self.MB_GPIO_MASTER) & 0xff
def set_fp_gpio_radio_src(self, value):
"""set driver for front panel GPIO
Arguments:
- value {unsigned} -- value is 2-bit bit mask of 8 pins GPIO
+ value {unsigned} -- value is 2-bit bit mask of 6 pins GPIO
00: means the pin is driven by radio 0
01: means the pin is driven by radio 1
"""
@@ -98,12 +98,12 @@ class MboardRegsControl(MboardRegsCommon):
def get_fp_gpio_radio_src(self):
"""get which radio is driving front panel gpio
- The return value is 2-bit bit mask of 8 pins GPIO.
+ The return value is 2-bit bit mask of 6 pins GPIO.
00: means the pin is driven by radio 0
01: means the pin is driven by radio 1
"""
with self.regs:
- return self.peek32(self.MB_GPIO_RADIO_SRC) & 0xffffff
+ return self.peek32(self.MB_GPIO_RADIO_SRC) & 0xfff
def set_time_source(self, time_source):
"""
@@ -114,10 +114,10 @@ class MboardRegsControl(MboardRegsCommon):
self.log.trace("Setting time source to internal")
pps_sel_val = self.MB_CLOCK_CTRL_PPS_SEL_INT
elif time_source == 'gpsdo':
- self.log.debug("Setting time source to gpsdo...")
+ self.log.trace("Setting time source to gpsdo...")
pps_sel_val = self.MB_CLOCK_CTRL_PPS_SEL_GPS
elif time_source == 'external':
- self.log.debug("Setting time source to external...")
+ self.log.trace("Setting time source to external...")
pps_sel_val = self.MB_CLOCK_CTRL_PPS_SEL_EXT
else:
assert False, "Cannot set to invalid time source: {}".format(time_source)