aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-07-28 14:35:47 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:04:00 -0800
commiteb2b11524bf4e65c48a0853d3f9cdb4ad9ee1719 (patch)
tree71e4cc90e59451b2a0ae53c35091f0c3987b83a7
parent5f99240bd283da3da71588fcb1c1886937693928 (diff)
downloaduhd-eb2b11524bf4e65c48a0853d3f9cdb4ad9ee1719.tar.gz
uhd-eb2b11524bf4e65c48a0853d3f9cdb4ad9ee1719.tar.bz2
uhd-eb2b11524bf4e65c48a0853d3f9cdb4ad9ee1719.zip
n3xx mpm: Set call for TCA6424 pins gets value arg
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n310.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n310.py b/mpm/python/usrp_mpm/periph_manager/n310.py
index 26c6f2893..0c700bd1d 100644
--- a/mpm/python/usrp_mpm/periph_manager/n310.py
+++ b/mpm/python/usrp_mpm/periph_manager/n310.py
@@ -71,19 +71,18 @@ class TCA6424(object):
def __init__(self):
self._gpios = SysFSGPIO('tca6424', 0xFFE7FF, 0x86E7FF)
- def set(self, name):
+ def set(self, name, value=None):
"""
Assert a pin by name
"""
assert name in self.pins
- self._gpios.set(self.pins.index(name))
+ self._gpios.set(self.pins.index(name), value=value)
def reset(self, name):
"""
Deassert a pin by name
"""
- assert name in self.pins
- self._gpios.reset(self.pins.index(name))
+ self.set(name, value=0)
def get(self, name):
"""