add EINT interface hack which uses older style, no need to expose EINT lines
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 09:30:14 +0000 (10:30 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 09:30:14 +0000 (10:30 +0100)
via get/put

src/bsv/interface_decl.py

index 05b4a80a9993f091bad2b8570c4755b954ec1166..6ab29615d371e59625478624e84fbae8764d75a5 100644 (file)
@@ -446,6 +446,19 @@ class InterfaceQSPI(Interface):
                              decfn)
 
 
+class InterfaceEINT(Interface):
+    """ uses old-style (non-get/put) for now
+    """
+
+    def ifacepfmt(self, *args):
+        res = '\n'.join(map(self.ifacefmtdecpin, self.pins)).format(*args)
+        return '\n' + res  # pins is a list
+
+    def ifacedef2(self, *args):
+        return self.ifacedef(*args)
+
+
+
 class InterfaceGPIO(Interface):
 
     def ifacepfmt(self, *args):
@@ -478,7 +491,8 @@ class Interfaces(InterfacesBase, PeripheralInterfaces):
     def __init__(self, pth=None):
         InterfacesBase.__init__(self, Interface, pth,
                                 {'gpio': InterfaceGPIO,
-                                 'qspi': InterfaceQSPI})
+                                 'qspi': InterfaceQSPI,
+                                 'eint': InterfaceEINT})
         PeripheralInterfaces.__init__(self)
 
     def ifacedef(self, f, *args):