File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -850,16 +850,19 @@ def clean_all_lists():
850850
851851def parse_pins ():
852852 print (" * Getting pins per Ips..." )
853- pinregex = r"^(P[A-Z][0-9][0-5]?)"
853+ pinregex = r"^(P[A-Z][0-9][0-5]?)|^(ANA[0-9]) "
854854 itemlist = xml_mcu .getElementsByTagName ("Pin" )
855855 for s in itemlist :
856856 m = re .match (pinregex , s .attributes ["Name" ].value )
857857 if m :
858- pin = (
859- m .group (0 )[:2 ] + "_" + m .group (0 )[2 :]
860- ) # pin formatted P<port>_<number>: PF_O
858+ if m .group (1 ) is not None :
859+ # pin formatted P<port>_<number>: PF_O
860+ pin = m .group (0 )[:2 ] + "_" + m .group (0 )[2 :]
861+ else :
862+ # pin formatted ANA_<number>: ANA_1
863+ pin = m .group (0 )[:3 ] + "_" + m .group (0 )[3 :]
861864 name = s .attributes ["Name" ].value .strip () # full name: "PF0 / OSC_IN"
862- if s .attributes ["Type" ].value == "I/O" :
865+ if s .attributes ["Type" ].value in [ "I/O" , "MonoIO" ] :
863866 store_pin (pin , name )
864867 else :
865868 continue
@@ -986,7 +989,7 @@ def parse_pins():
986989 quit ()
987990 mcu_list .append (args .mcu )
988991else :
989- mcu_list = fnmatch .filter (os .listdir (cubemxdir ), "STM32[!M][!P] *.xml" )
992+ mcu_list = fnmatch .filter (os .listdir (cubemxdir ), "STM32*.xml" )
990993
991994if args .list :
992995 print ("Available xml files description: %i" % len (mcu_list ))
You can’t perform that action at this time.
0 commit comments