aboutsummaryrefslogtreecommitdiff
path: root/stm-uart.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2021-06-28 22:34:55 -0400
committerPaul Selkirk <paul@psgd.org>2021-06-28 22:34:55 -0400
commit6f16d4fc32df8e9afd8bdc8bd2401a344750e63f (patch)
tree1ab0b8e14a8aa789706f2358152b1bafc76a9101 /stm-uart.c
parent9177a48f05b09fe48c0b81347b69c9f024180ed1 (diff)
Revert Peter's hardware flow control patch, as it sometimes causes
corruption on the sending side of USART2 (user/RPC) under load.
Diffstat (limited to 'stm-uart.c')
-rw-r--r--stm-uart.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/stm-uart.c b/stm-uart.c
index d07eec2..1f006b7 100644
--- a/stm-uart.c
+++ b/stm-uart.c
@@ -71,20 +71,6 @@ static void MX_DMA_Init(void)
/* USART1 init function */
static void MX_USART1_UART_Init(void)
{
- GPIO_InitTypeDef g;
- g.Mode = GPIO_MODE_AF_PP;
- g.Pull = GPIO_NOPULL;
- g.Speed = GPIO_SPEED_LOW;
- g.Alternate = GPIO_AF7_USART1;
-
- /* USART1_CTS */
- g.Pin = GPIO_PIN_11;
- HAL_GPIO_Init(GPIOA, &g);
-
- /* USART1_RTS */
- g.Pin = GPIO_PIN_12;
- HAL_GPIO_Init(GPIOA, &g);
-
huart_mgmt.Instance = USART1;
huart_mgmt.Init.BaudRate = USART_MGMT_BAUD_RATE;
huart_mgmt.Init.WordLength = UART_WORDLENGTH_8B;
@@ -106,20 +92,6 @@ static void MX_USART1_UART_Init(void)
/* USART2 init function */
static void MX_USART2_UART_Init(void)
{
- GPIO_InitTypeDef g;
- g.Mode = GPIO_MODE_AF_PP;
- g.Pull = GPIO_NOPULL;
- g.Speed = GPIO_SPEED_LOW;
- g.Alternate = GPIO_AF7_USART2;
-
- /* USART2_CTS */
- g.Pin = GPIO_PIN_0;
- HAL_GPIO_Init(GPIOA, &g);
-
- /* USART2_RTS */
- g.Pin = GPIO_PIN_1;
- HAL_GPIO_Init(GPIOA, &g);
-
huart_user.Instance = USART2;
huart_user.Init.BaudRate = USART_USER_BAUD_RATE;
huart_user.Init.WordLength = UART_WORDLENGTH_8B;