aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/stm32f0xx_hal_msp.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-04 12:44:34 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-04 12:44:34 +0200
commit4a1a7be27fd359309672393446f146fefb3507c0 (patch)
tree91f58756dfb92f0add50b7c5f6aeb3db69f1b266 /stm32f091/stm32f0xx_hal_msp.c
parent45a0a4a215fb41564c1a9192d34eae0d0d3423c6 (diff)
more HAL files compiling
Diffstat (limited to 'stm32f091/stm32f0xx_hal_msp.c')
-rw-r--r--stm32f091/stm32f0xx_hal_msp.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/stm32f091/stm32f0xx_hal_msp.c b/stm32f091/stm32f0xx_hal_msp.c
new file mode 100644
index 0000000..8fd7330
--- /dev/null
+++ b/stm32f091/stm32f0xx_hal_msp.c
@@ -0,0 +1,32 @@
+#include "stm32f0xx_hal_msp.h"
+
+void HAL_MspInit(void) {
+ return;
+ __HAL_RCC_SYSCFG_CLK_ENABLE();
+ __HAL_RCC_PWR_CLK_ENABLE();
+ HAL_NVIC_SetPriority(PendSV_IRQn, 3, 0);
+}
+
+void HAL_UART_MspInit(UART_HandleTypeDef* huart) {
+ return;
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ if(huart->Instance==USART2) {
+ __HAL_RCC_USART2_CLK_ENABLE();
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3;
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ GPIO_InitStruct.Alternate = GPIO_AF1_USART2;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ }
+}
+
+void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) {
+ return;
+ if(huart->Instance==USART2) {
+ __HAL_RCC_USART2_CLK_DISABLE();
+ HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_3);
+ }
+}
+