-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT] stm32l4:serial add HW HS on UART 4 & 5
- Loading branch information
Showing
1 changed file
with
15 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
/**************************************************************************** | ||
* arch/arm/src/stm32l4/stm32l4_serial.c | ||
* | ||
* Copyright (C) 2009-2014, 2016-2017 Gregory Nutt. All rights reserved. | ||
* Author: Gregory Nutt <[email protected]> | ||
* Copyright (C) 2009-2014, 2016-2017,2019 Gregory Nutt. All rights reserved. | ||
* Authors: Gregory Nutt <[email protected]> | ||
* David Sidrane <[email protected]> | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
|
@@ -642,23 +643,19 @@ static struct stm32l4_serial_s g_uart4priv = | |
.parity = CONFIG_UART4_PARITY, | ||
.bits = CONFIG_UART4_BITS, | ||
.stopbits2 = CONFIG_UART4_2STOP, | ||
#ifdef CONFIG_SERIAL_IFLOWCONTROL | ||
.iflow = false, | ||
#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART4_OFLOWCONTROL) | ||
.oflow = true, | ||
.cts_gpio = GPIO_UART4_CTS, | ||
#endif | ||
#ifdef CONFIG_SERIAL_OFLOWCONTROL | ||
.oflow = false, | ||
#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART4_IFLOWCONTROL) | ||
.iflow = true, | ||
.rts_gpio = GPIO_UART4_RTS, | ||
#endif | ||
.baud = CONFIG_UART4_BAUD, | ||
.apbclock = STM32L4_PCLK1_FREQUENCY, | ||
.usartbase = STM32L4_UART4_BASE, | ||
.tx_gpio = GPIO_UART4_TX, | ||
.rx_gpio = GPIO_UART4_RX, | ||
#ifdef CONFIG_SERIAL_OFLOWCONTROL | ||
.cts_gpio = 0, | ||
#endif | ||
#ifdef CONFIG_SERIAL_IFLOWCONTROL | ||
.rts_gpio = 0, | ||
#endif | ||
#ifdef CONFIG_UART4_RXDMA | ||
.rxdma_channel = DMAMAP_UART4_RX, | ||
.rxfifo = g_uart4rxfifo, | ||
|
@@ -707,23 +704,19 @@ static struct stm32l4_serial_s g_uart5priv = | |
.parity = CONFIG_UART5_PARITY, | ||
.bits = CONFIG_UART5_BITS, | ||
.stopbits2 = CONFIG_UART5_2STOP, | ||
#ifdef CONFIG_SERIAL_IFLOWCONTROL | ||
.iflow = false, | ||
#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART5_OFLOWCONTROL) | ||
.oflow = true, | ||
.cts_gpio = GPIO_UART5_CTS, | ||
#endif | ||
#ifdef CONFIG_SERIAL_OFLOWCONTROL | ||
.oflow = false, | ||
#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART5_IFLOWCONTROL) | ||
.iflow = true, | ||
.rts_gpio = GPIO_UART5_RTS, | ||
#endif | ||
.baud = CONFIG_UART5_BAUD, | ||
.apbclock = STM32L4_PCLK1_FREQUENCY, | ||
.usartbase = STM32L4_UART5_BASE, | ||
.tx_gpio = GPIO_UART5_TX, | ||
.rx_gpio = GPIO_UART5_RX, | ||
#ifdef CONFIG_SERIAL_OFLOWCONTROL | ||
.cts_gpio = 0, | ||
#endif | ||
#ifdef CONFIG_SERIAL_IFLOWCONTROL | ||
.rts_gpio = 0, | ||
#endif | ||
#ifdef CONFIG_UART5_RXDMA | ||
.rxdma_channel = DMAMAP_UART5_RX, | ||
.rxfifo = g_uart5rxfifo, | ||
|