File tree 1 file changed +9
-6
lines changed
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():
850
850
851
851
def parse_pins ():
852
852
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]) "
854
854
itemlist = xml_mcu .getElementsByTagName ("Pin" )
855
855
for s in itemlist :
856
856
m = re .match (pinregex , s .attributes ["Name" ].value )
857
857
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 :]
861
864
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" ] :
863
866
store_pin (pin , name )
864
867
else :
865
868
continue
@@ -986,7 +989,7 @@ def parse_pins():
986
989
quit ()
987
990
mcu_list .append (args .mcu )
988
991
else :
989
- mcu_list = fnmatch .filter (os .listdir (cubemxdir ), "STM32[!M][!P] *.xml" )
992
+ mcu_list = fnmatch .filter (os .listdir (cubemxdir ), "STM32*.xml" )
990
993
991
994
if args .list :
992
995
print ("Available xml files description: %i" % len (mcu_list ))
You can’t perform that action at this time.
0 commit comments