aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/stm32f1.c
diff options
context:
space:
mode:
authorSergey1560 <53866542+Sergey1560@users.noreply.github.com>2022-01-27 02:06:55 +0300
committerGitHub <noreply@github.com>2022-01-26 18:06:55 -0500
commitfb6d6d381c28a5aa90a8f1f1ee22ef9179077dbb (patch)
tree84bf520613ec58c6a74c4e140bb90f910c7306a5 /src/stm32/stm32f1.c
parent40702bf9db083fcd2edb8009465d02809bf037df (diff)
downloadkutter-fb6d6d381c28a5aa90a8f1f1ee22ef9179077dbb.tar.gz
kutter-fb6d6d381c28a5aa90a8f1f1ee22ef9179077dbb.tar.xz
kutter-fb6d6d381c28a5aa90a8f1f1ee22ef9179077dbb.zip
stm32: Add remap CAN to PD0/PD1 for stm32f103 (#5173)
Signed-off-by: Sergey Terentiev <sergey@terentiev.me>
Diffstat (limited to 'src/stm32/stm32f1.c')
-rw-r--r--src/stm32/stm32f1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stm32/stm32f1.c b/src/stm32/stm32f1.c
index 5680cfba..526ec485 100644
--- a/src/stm32/stm32f1.c
+++ b/src/stm32/stm32f1.c
@@ -204,6 +204,9 @@ gpio_peripheral(uint32_t gpio, uint32_t mode, int pullup)
if (gpio == GPIO('B', 8) || gpio == GPIO('B', 9))
stm32f1_alternative_remap(AFIO_MAPR_CAN_REMAP_Msk,
AFIO_MAPR_CAN_REMAP_REMAP2);
+ if (gpio == GPIO('D', 0) || gpio == GPIO('D', 1))
+ stm32f1_alternative_remap(AFIO_MAPR_CAN_REMAP_Msk,
+ AFIO_MAPR_CAN_REMAP_REMAP3);
}
}