Skip to content

Commit 2af846e

Browse files
blmorrisdpgeorge
authored andcommitted
stmhal/boards/stm32fxx_prefix.c: Fix alt function number calculation
This prevented pin_find_af* functions from being able to find some of the alternate functions in the pin struct
1 parent 4915c2b commit 2af846e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stmhal/boards/stm32f4xx_prefix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
.name = MP_QSTR_ ## p_port ## p_pin, \
2424
.port = PORT_ ## p_port, \
2525
.pin = (p_pin), \
26-
.num_af = (sizeof(p_af) / sizeof(pin_obj_t)), \
26+
.num_af = (sizeof(p_af) / sizeof(pin_af_obj_t)), \
2727
.pin_mask = (1 << ((p_pin) & 0x0f)), \
2828
.gpio = GPIO ## p_port, \
2929
.af = p_af, \

0 commit comments

Comments
 (0)