summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/boards/stm32f4xx_prefix.c
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2015-07-02 15:59:59 -0700
committerDamien George <damien.p.george@gmail.com>2015-07-07 10:15:37 +0100
commit11115e4d23ba786df7ad0293b86dfdfebb8e6df3 (patch)
tree5c6d00cd24f272f8c1fa931e1617cd80c68cf1b7 /stmhal/boards/stm32f4xx_prefix.c
parentc91727b75a0d58ce6b33b26c43456f8b10268d31 (diff)
downloadmicropython-11115e4d23ba786df7ad0293b86dfdfebb8e6df3.tar.gz
micropython-11115e4d23ba786df7ad0293b86dfdfebb8e6df3.zip
stmhal: Add I2S support to make-pins.py
Diffstat (limited to 'stmhal/boards/stm32f4xx_prefix.c')
-rw-r--r--stmhal/boards/stm32f4xx_prefix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/boards/stm32f4xx_prefix.c b/stmhal/boards/stm32f4xx_prefix.c
index d22bfacadf..f47394277f 100644
--- a/stmhal/boards/stm32f4xx_prefix.c
+++ b/stmhal/boards/stm32f4xx_prefix.c
@@ -17,13 +17,13 @@
.af_fn = (af_ptr) \
}
-#define PIN(p_port, p_pin, p_num_af, p_af, p_adc_num, p_adc_channel) \
+#define PIN(p_port, p_pin, p_af, p_adc_num, p_adc_channel) \
{ \
{ &pin_type }, \
.name = MP_QSTR_ ## p_port ## p_pin, \
.port = PORT_ ## p_port, \
.pin = (p_pin), \
- .num_af = (p_num_af), \
+ .num_af = (sizeof(p_af) / sizeof(pin_obj_t)), \
.pin_mask = (1 << ((p_pin) & 0x0f)), \
.gpio = GPIO ## p_port, \
.af = p_af, \