From 5345d48c90b4f0514a7ecb4bcf76442b526026c8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 24 Jul 2018 10:30:14 +0100 Subject: [PATCH] add EINT interface hack which uses older style, no need to expose EINT lines via get/put --- src/bsv/interface_decl.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/bsv/interface_decl.py b/src/bsv/interface_decl.py index 05b4a80..6ab2961 100644 --- a/src/bsv/interface_decl.py +++ b/src/bsv/interface_decl.py @@ -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): -- 2.30.2