mimxrt/boards/make-pins.py: Allow empty lines and comments in pins.csv.
This commit is contained in:
parent
6754213a9d
commit
90b45efa6a
@ -180,6 +180,12 @@ class Pins(object):
|
||||
with open(filename, "r") as csvfile:
|
||||
rows = csv.reader(csvfile)
|
||||
for row in rows:
|
||||
if len(row) == 0 or row[0].startswith("#"):
|
||||
# Skip empty lines, and lines starting with "#"
|
||||
continue
|
||||
if len(row) != 2:
|
||||
raise ValueError("Expecting two entries in a row")
|
||||
|
||||
pin = self.find_pin_by_name(row[1])
|
||||
if pin and row[0]: # Only add board pins that have a name
|
||||
self.board_pins.append(NamedPin(row[0], pin.pad, pin.idx))
|
||||
|
Loading…
Reference in New Issue
Block a user