build/generic_platform: add support for int parameter for Pins (useful for core generation)

This commit is contained in:
Florent Kermarrec 2015-11-19 14:57:09 +01:00
parent 8056653004
commit cb22a207f1
1 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,9 @@ class Pins:
def __init__(self, *identifiers): def __init__(self, *identifiers):
self.identifiers = [] self.identifiers = []
for i in identifiers: for i in identifiers:
if isinstance(i, int):
self.identifiers += ["X"]*i
else:
self.identifiers += i.split() self.identifiers += i.split()
def __repr__(self): def __repr__(self):