From: Luke Kenneth Casson Leighton Date: Tue, 20 Mar 2018 16:12:36 +0000 (+0000) Subject: add io option to Pin X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0acd7cc817421574b25e647c044c1b568cf2ddd1;p=pinmux.git add io option to Pin --- diff --git a/src/interface_decl.py b/src/interface_decl.py index c66098e..a74e812 100644 --- a/src/interface_decl.py +++ b/src/interface_decl.py @@ -72,10 +72,16 @@ pwminterface_decl = ''' class Pin(object): - def __init__(self, name, ready, enabled, action, inout): + def __init__(self, name, + ready=True, + enabled=True, + io=False, + action=False, + inout=True): self.name = name self.ready = ready self.enabled = enabled + self.io = io self.action = action self.inout = inout @@ -86,6 +92,8 @@ class Pin(object): status.append('always_ready') if self.enabled: status.append('always_enabled') + if self.io: + status.append('result="io"') res += ','.join(status) res += "*) method " if self.action: @@ -96,7 +104,6 @@ class Pin(object): res += ";" return res - # basic test if __name__ == '__main__':