Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: EncoderMspInitF7.cpp
- Revision:
- 7:d7c793ec5c04
- Parent:
- 6:978bd0579f1b
diff -r 978bd0579f1b -r d7c793ec5c04 EncoderMspInitF7.cpp
--- a/EncoderMspInitF7.cpp Fri Jan 25 07:58:34 2019 +0000
+++ b/EncoderMspInitF7.cpp Fri Jan 25 16:51:33 2019 +0000
@@ -42,6 +42,7 @@
GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
}
+
else if (htim->Instance == TIM2) { //PA_15 PB_3
__TIM2_CLK_ENABLE();
__GPIOA_CLK_ENABLE();
@@ -90,29 +91,6 @@
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF3_TIM8;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
- }
-
- else if (htim->Instance == TIM9) { // PE_5 PE_6
- __TIM9_CLK_ENABLE();
- __GPIOE_CLK_ENABLE();
- GPIO_InitStruct.Pin = GPIO_PIN_5 | GPIO_PIN_6;
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
- GPIO_InitStruct.Alternate = GPIO_AF3_TIM9;
- HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
- }
-
- else if (htim->Instance == TIM12) { // PB_14 PB_15
- __TIM12_CLK_ENABLE();
- __GPIOB_CLK_ENABLE();
- GPIO_InitStruct.Pin = GPIO_PIN_14 | GPIO_PIN_15;
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
- GPIO_InitStruct.Alternate = GPIO_AF9_TIM12;
- HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
- }
-
+ }
}
#endif
\ No newline at end of file