fix(tt_tool): fails on non-analog projects

This commit is contained in:
Uri Shaked
2024-02-01 13:06:19 +02:00
parent 7126553f3c
commit e8c5040dc5
2 changed files with 10 additions and 2 deletions
+6
View File
@@ -14,6 +14,12 @@ class PinoutSection:
self.ui = self._pins(yaml_data, "ui", 8)
self.uo = self._pins(yaml_data, "uo", 8)
self.uio = self._pins(yaml_data, "uio", 8)
self.ua: List[str] = []
for i in range(8):
pin = yaml_data.get(f"ua[{i}]")
if pin is None:
break
self.ua.append(pin)
def _pins(self, yaml_data: Dict[str, Any], name: str, count: int) -> List[str]:
result: List[str] = []