mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
mpfs: uart: add a way to configure uart3 and uart4
Currently configuring the uart3/4 as the serial console doesn't work. Apply proper changes in mpfs_config.h that enables the following configuration options: - CONFIG_UART3_SERIAL_CONSOLE - CONFIG_UART4_SERIAL_CONSOLE Also, fix a typo in mpfs_lowputc.c that gives a compile error if defined. Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This commit is contained in:
committed by
Xiang Xiao
parent
1e07b6d528
commit
876b39914b
@@ -59,6 +59,18 @@
|
|||||||
# undef CONFIG_UART3_SERIAL_CONSOLE
|
# undef CONFIG_UART3_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART4_SERIAL_CONSOLE
|
# undef CONFIG_UART4_SERIAL_CONSOLE
|
||||||
# define HAVE_SERIAL_CONSOLE 1
|
# define HAVE_SERIAL_CONSOLE 1
|
||||||
|
#elif defined(CONFIG_UART3_SERIAL_CONSOLE) && defined(CONFIG_MPFS_UART3)
|
||||||
|
# undef CONFIG_UART0_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_UART4_SERIAL_CONSOLE
|
||||||
|
# define HAVE_SERIAL_CONSOLE 1
|
||||||
|
#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && defined(CONFIG_MPFS_UART4)
|
||||||
|
# undef CONFIG_UART0_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_UART3_SERIAL_CONSOLE
|
||||||
|
# define HAVE_SERIAL_CONSOLE 1
|
||||||
#else
|
#else
|
||||||
# undef CONFIG_UART0_SERIAL_CONSOLE
|
# undef CONFIG_UART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
# elif defined(CONFIG_UART4_SERIAL_CONSOLE)
|
# elif defined(CONFIG_UART4_SERIAL_CONSOLE)
|
||||||
# define MPFS_CONSOLE_BASE MPFS_UART4_BASE
|
# define MPFS_CONSOLE_BASE MPFS_UART4_BASE
|
||||||
# define MPFS_CONSOLE_BAUD CONFIG_UART4_BAUD
|
# define MPFS_CONSOLE_BAUD CONFIG_UART4_BAUD
|
||||||
# define MPFS_CONSOLE_BITS CONFIG_UART4BITS
|
# define MPFS_CONSOLE_BITS CONFIG_UART4_BITS
|
||||||
# define MPFS_CONSOLE_PARITY CONFIG_UART4_PARITY
|
# define MPFS_CONSOLE_PARITY CONFIG_UART4_PARITY
|
||||||
# define MPFS_CONSOLE_2STOP CONFIG_UART4_2STOP
|
# define MPFS_CONSOLE_2STOP CONFIG_UART4_2STOP
|
||||||
# define MPFS_CONSOLE_CLOCKBIT SYSREG_SUBBLK_CLOCK_CR_MMUART4
|
# define MPFS_CONSOLE_CLOCKBIT SYSREG_SUBBLK_CLOCK_CR_MMUART4
|
||||||
|
|||||||
Reference in New Issue
Block a user