stm32/boards/make-pins.py: Use cpu pins to define static alt-fun macros.

Instead of board pins, so that pins which have only the CPU specified in
pins.csv can still be used with mp_hal_pin_config_alt_static().

Signed-off-by: Damien George <damien@micropython.org>
pull/8045/head
Damien George 2021-11-29 13:35:43 +11:00
rodzic 0c9f5b388e
commit 23a150789d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -504,7 +504,7 @@ class Pins(object):
with open(af_defs_filename, "wt") as af_defs_file:
STATIC_AF_TOKENS = {}
for named_pin in self.board_pins:
for named_pin in self.cpu_pins:
for af in named_pin.pin().alt_fn:
func = "%s%d" % (af.func, af.fn_num) if af.fn_num else af.func
pin_type = (af.pin_type or "NULL").split("(")[0]