mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
kinetis/pinmux: Do not redefine PIN_UART2_RTS
When a developer working on BSP wants UART1 with RTS, the following needs to be added in the BSP's include/board.h file: #define PIN_UART1_RTS PIN_UART1_RTS_1 which says that PIN_UART1_RTS_1 -- the first alternative pin with UART1 RTS function -- should be used for the UART1's RTS. There are no alternative pins for PIN_UART2_RTS, therefore a similar definition is not used for PIN_UART2_RTS. However, that is a complication when we want PIN_UART2_RTS to be defined as GPIO, for example: #define PIN_UART2_RTS (GPIO_OUTPUT | PIN_PORTB | PIN2) In such a case, PIN_UART2_RTS is later redefined to the only alternative function from hardware/kinetis_???pinmux.h file. This patch avoids the redefinition of already defined names. We considered renaming PIN_UART2_RTS to PIN_UART2_RTS_1 in the hardware/kinetis_???pinmux.h file, but that is breaking change. We try to avoid breaking change. Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
This commit is contained in:
@@ -351,7 +351,9 @@
|
||||
|
||||
#define PIN_LCD_P40 (PIN_ANALOG | PIN_PORTD | PIN0)
|
||||
#define PIN_SPI0_PCS0_3 (PIN_ALT2 | PIN_PORTD | PIN0)
|
||||
#define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#if !defined(PIN_UART2_RTS)
|
||||
# define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#endif
|
||||
#define PIN_LCD_P40F (PIN_ALT7 | PIN_PORTD | PIN0)
|
||||
#define PIN_LCD_P41 (PIN_ANALOG | PIN_PORTD | PIN1)
|
||||
#define PIN_ADC0_SE5B (PIN_ANALOG | PIN_PORTD | PIN1)
|
||||
|
||||
@@ -346,7 +346,9 @@
|
||||
#define PIN_FB_TA (PIN_ALT6 | PIN_PORTC | PIN19)
|
||||
|
||||
#define PIN_SPI0_PCS0_3 (PIN_ALT2 | PIN_PORTD | PIN0)
|
||||
#define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#if !defined(PIN_UART2_RTS)
|
||||
# define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#endif
|
||||
#define PIN_FTM3_CH0_2 (PIN_ALT4 | PIN_PORTD | PIN0)
|
||||
#define PIN_FB_ALE (PIN_ALT5 | PIN_PORTD | PIN0)
|
||||
#define PIN_FB_CS1 (PIN_ALT5 | PIN_PORTD | PIN0)
|
||||
|
||||
@@ -563,7 +563,9 @@
|
||||
#define PIN_UART1_TX_2 (PIN_ALT3 | PIN_PORTE | PIN0)
|
||||
|
||||
#define PIN_UART2_CTS (PIN_ALT3 | PIN_PORTD | PIN1)
|
||||
#define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#if !defined(PIN_UART2_RTS)
|
||||
# define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#endif
|
||||
#define PIN_UART2_RX (PIN_ALT3 | PIN_PORTD | PIN2)
|
||||
#define PIN_UART2_TX (PIN_ALT3 | PIN_PORTD | PIN3)
|
||||
|
||||
|
||||
@@ -678,7 +678,9 @@
|
||||
#define PIN_UART1_TX_2 (PIN_ALT3 | PIN_PORTE | PIN0)
|
||||
|
||||
#define PIN_UART2_CTS (PIN_ALT3 | PIN_PORTD | PIN1)
|
||||
#define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#if !defined(PIN_UART2_RTS)
|
||||
# define PIN_UART2_RTS (PIN_ALT3 | PIN_PORTD | PIN0)
|
||||
#endif
|
||||
#define PIN_UART2_RX (PIN_ALT3 | PIN_PORTD | PIN2)
|
||||
#define PIN_UART2_TX (PIN_ALT3 | PIN_PORTD | PIN3)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user