From f6818cce54b99eecfc0d67437095d5adb955ee2c Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Sun, 28 Jun 2015 16:12:46 +0200 Subject: Remove trailing whitespace and DOS line endings. --- src/uart-test/stm32f4xx_hal_msp.c | 84 +++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'src/uart-test/stm32f4xx_hal_msp.c') diff --git a/src/uart-test/stm32f4xx_hal_msp.c b/src/uart-test/stm32f4xx_hal_msp.c index 2b1da7e..7cee9ce 100644 --- a/src/uart-test/stm32f4xx_hal_msp.c +++ b/src/uart-test/stm32f4xx_hal_msp.c @@ -1,42 +1,42 @@ -/* - * Init/de-init USART1. - * - * Pins used: - * - * PA9: USART1_TX - * PA10: USART1_RX - */ - -#include "stm32f4xx_hal.h" - - -void HAL_UART_MspInit(UART_HandleTypeDef* huart) -{ - GPIO_InitTypeDef GPIO_InitStruct; - - if (huart->Instance == USART1) { - /* Peripheral clock enable */ - __USART1_CLK_ENABLE(); - GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_PULLUP; - GPIO_InitStruct.Speed = GPIO_SPEED_FAST; - GPIO_InitStruct.Alternate = GPIO_AF7_USART1; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* NVIC for interrupt mode */ - HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); - HAL_NVIC_EnableIRQ(USART1_IRQn); - } - -} - -void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) -{ - - if (huart->Instance == USART1) { - __USART1_CLK_DISABLE(); - HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9 | GPIO_PIN_10); - } - -} +/* + * Init/de-init USART1. + * + * Pins used: + * + * PA9: USART1_TX + * PA10: USART1_RX + */ + +#include "stm32f4xx_hal.h" + + +void HAL_UART_MspInit(UART_HandleTypeDef* huart) +{ + GPIO_InitTypeDef GPIO_InitStruct; + + if (huart->Instance == USART1) { + /* Peripheral clock enable */ + __USART1_CLK_ENABLE(); + GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FAST; + GPIO_InitStruct.Alternate = GPIO_AF7_USART1; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /* NVIC for interrupt mode */ + HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); + HAL_NVIC_EnableIRQ(USART1_IRQn); + } + +} + +void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) +{ + + if (huart->Instance == USART1) { + __USART1_CLK_DISABLE(); + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9 | GPIO_PIN_10); + } + +} -- cgit v1.2.3