Skip to content

Commit

Permalink
ports/psoc6: Refactored make-pins.
Browse files Browse the repository at this point in the history
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
  • Loading branch information
NikhitaR-IFX committed Oct 20, 2023
1 parent 07ffa85 commit d99cb1c
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions ports/psoc6/boards/make-pins.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ def qstr_list(self):
def print_const_table_entry(self):
print('{{{:s}, "{:s}", {:s}}},'.format(self._pin_exp, self._name, self._pin_func))

# def print_const_table_entry(self):
# print('{{{{ &machine_pin_type}},{:s}, "{:s}"}},'.format(self._pin_exp, self._name))


class Pins(object):
def __init__(self):
Expand Down Expand Up @@ -159,10 +156,6 @@ def print(self):
def print_header(self, hdr_filename):
with open(hdr_filename, "wt") as hdr_file:
hdr_file.write("#define MAX_IO_PINS {:d} \n".format(self.get_num_cpu_pins()))
"""for named_pin in self.cpu_pins:
pin = named_pin.pin()
if pin.is_board_pin():
pin.print_header(self.num_cpu_pins ,hdr_file)"""

def print_qstr(self, qstr_filename):
with open(qstr_filename, "wt") as qstr_file:
Expand All @@ -176,12 +169,6 @@ def print_qstr(self, qstr_filename):
qstr_set |= set([named_pin.name()])
for qstr in sorted(qstr_set):
# cond_var = None

# ToDO: For next iteration
"""if qstr.startswith("AF"):
af_words = qstr.split("_")
cond_var = conditional_var(af_words[1])
print_conditional_if(cond_var, file=qstr_file)"""
print("Q({})".format(qstr), file=qstr_file)


Expand All @@ -192,14 +179,6 @@ def main():
description="Generate board specific pin file",
)

"""parser.add_argument(
"-pr",
"--prefix",
dest="prefix_filename",
help="Specifies beginning portion of generated pins file",
default="psoc6_prefix.c",
)"""

parser.add_argument(
"-q",
"--qstr",
Expand All @@ -220,12 +199,6 @@ def main():

pins.parse_af_file()

"""if args.prefix_filename:
print("// --prefix {:s}".format(args.prefix_filename))
print("")
with open(args.prefix_filename, "r") as prefix_file:
print(prefix_file.read())"""

if args.hdr_filename and args.qstr_filename:
pins.parse_board_file()
pins.update_num_cpu_pins()
Expand Down

0 comments on commit d99cb1c

Please sign in to comment.