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,7 +15,10 @@ class Pins:
def __init__(self, *identifiers):
self.identifiers = []
for i in identifiers:
self.identifiers += i.split()
if isinstance(i, int):
self.identifiers += ["X"]*i
else:
self.identifiers += i.split()
def __repr__(self):
return "{}('{}')".format(self.__class__.__name__,