This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 876b399 mpfs: uart: add a way to configure uart3 and uart4 876b399 is described below commit 876b39914bd383b0870a0d755a0e42fee93723a2 Author: Eero Nurkkala <eero.nurkk...@offcode.fi> AuthorDate: Wed Nov 10 01:19:37 2021 +0200 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.nurkk...@offcode.fi> --- arch/risc-v/src/mpfs/mpfs_config.h | 12 ++++++++++++ arch/risc-v/src/mpfs/mpfs_lowputc.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/risc-v/src/mpfs/mpfs_config.h b/arch/risc-v/src/mpfs/mpfs_config.h index 4802019..ce2007d 100755 --- a/arch/risc-v/src/mpfs/mpfs_config.h +++ b/arch/risc-v/src/mpfs/mpfs_config.h @@ -59,6 +59,18 @@ # undef CONFIG_UART3_SERIAL_CONSOLE # undef CONFIG_UART4_SERIAL_CONSOLE # 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 # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE diff --git a/arch/risc-v/src/mpfs/mpfs_lowputc.c b/arch/risc-v/src/mpfs/mpfs_lowputc.c index fc27d07..4385b70 100755 --- a/arch/risc-v/src/mpfs/mpfs_lowputc.c +++ b/arch/risc-v/src/mpfs/mpfs_lowputc.c @@ -81,7 +81,7 @@ # elif defined(CONFIG_UART4_SERIAL_CONSOLE) # define MPFS_CONSOLE_BASE MPFS_UART4_BASE # 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_2STOP CONFIG_UART4_2STOP # define MPFS_CONSOLE_CLOCKBIT SYSREG_SUBBLK_CLOCK_CR_MMUART4