diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-13 19:21:04 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-13 19:21:04 +0000 |
commit | 9be0c168895dae40d5818514813d4ba39b14186f (patch) | |
tree | 2b068eb3d0cd21ee5008cc11b26d9b7c3c95ea82 /nuttx/arch/mips/src/pic32mx | |
parent | 9afac6e0fec4957bc70f615533d21a6d22d063e4 (diff) | |
download | px4-nuttx-9be0c168895dae40d5818514813d4ba39b14186f.tar.gz px4-nuttx-9be0c168895dae40d5818514813d4ba39b14186f.tar.bz2 px4-nuttx-9be0c168895dae40d5818514813d4ba39b14186f.zip |
Add a PIC32 configuration that supports only a Telnet console
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4486 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/mips/src/pic32mx')
-rw-r--r-- | nuttx/arch/mips/src/pic32mx/pic32mx-serial.c | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c b/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c index 334c03d1c..f04e7f682 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c @@ -66,13 +66,6 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Some sanity checks *******************************************************/ -/* Is there at least one UART enabled and configured as a RS-232 device? */ - -#ifndef HAVE_UART_DEVICE -# warning "No UARTs enabled" -#endif - /* If we are not using the serial driver for the console, then we still must * provide some minimal implementation of up_putc. */ @@ -119,6 +112,14 @@ # endif #endif +/* Common initialization logic will not not know that the all of the UARTs + * have been disabled. So, as a result, we may still have to provide + * stub implementations of up_earlyserialinit(), up_serialinit(), and + * up_putc(). + */ + +#ifdef HAVE_UART_DEVICE + /* These values describe the set of enabled interrupts */ #define IE_RX (1 << 0) @@ -868,6 +869,31 @@ int up_putc(int ch) return ch; } +/**************************************************************************** + * Name: up_earlyserialinit, up_serialinit, and up_putc + * + * Description: + * stubs that may be needed. These stubs would be used if all UARTs are + * disabled. In that case, the logic in common/up_initialize() is not + * smart enough to know that there are not UARTs and will still expect + * these interfaces to be provided. + * + ****************************************************************************/ +#else /* HAVE_UART_DEVICE */ +void up_earlyserialinit(void) +{ +} + +void up_serialinit(void) +{ +} + +int up_putc(int ch) +{ + return ch; +} + +#endif /* HAVE_UART_DEVICE */ #else /* USE_SERIALDRIVER */ /**************************************************************************** |