diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-14 20:50:46 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-14 20:50:46 +0000 |
commit | 0e24b0de612ad596103e4e01d250f0be12278783 (patch) | |
tree | 6ddb2ebc5c6cc9b94cc88baa085901046a345861 /nuttx | |
parent | 9264b754565c550afad96d4ef5ad1a76e6e8c233 (diff) | |
download | px4-nuttx-0e24b0de612ad596103e4e01d250f0be12278783.tar.gz px4-nuttx-0e24b0de612ad596103e4e01d250f0be12278783.tar.bz2 px4-nuttx-0e24b0de612ad596103e4e01d250f0be12278783.zip |
Add apps/poweroff lpc17 hardware handshake
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3380 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/ChangeLog | 13 | ||||
-rw-r--r-- | nuttx/Documentation/NuttX.html | 24 | ||||
-rw-r--r-- | nuttx/TODO | 6 | ||||
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_serial.c | 16 | ||||
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_serial.h | 9 | ||||
-rwxr-xr-x | nuttx/configs/olimex-lpc1766stk/README.txt | 9 | ||||
-rwxr-xr-x | nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig | 2 |
7 files changed, 70 insertions, 9 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 39556df91..63cb6efe5 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -1562,8 +1562,11 @@ packet buffers. This capability was needed by the SLIP driver. * drivers/net/slip.c -- Several corrections and some re-design of of the driver. - * configs/vsn: - - IDLE LED blinking fix - - Added board power off function - * arch/arm/src/stm32/stm32_gpio.c and stm32_internal.h -- Fixe - PullUp/Down Input Configuration.
\ No newline at end of file + * apps/ChangeLog.txt -- the apps/ directory now has its own ChangeLog. + * configs/vsn: + - IDLE LED blinking fix + - Added board power off function + * arch/arm/src/stm32/stm32_gpio.c and stm32_internal.h -- Fixed + PullUp/Down Input Configuration. + * arch/arm/src/lpc17xx/lpc17_serial.h -- Now supports Auto-RTS and + Auto-CTS modes. This is needed to support SLIP.
\ No newline at end of file diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index 4af5e5c9d..020cec2cd 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -8,7 +8,7 @@ <tr align="center" bgcolor="#e4e4e4"> <td> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> - <p>Last Updated: March 13, 2011</p> + <p>Last Updated: March 14, 2011</p> </td> </tr> </table> @@ -2146,6 +2146,11 @@ nuttx-5.19 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * configs/olimex-lpc1766stk/slip-httpd - An example that uses SLIP to provide a serial-port based THTTPD web server. +apps-5.19 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> + + * Initial version of the apps/ directory was released as contributed by + Uros Platise. + pascal-2.0 2009-12-21 Gregory Nutt <spudmonkey@racsa.co.cr> * Updated to use standard C99 types in stdint.h and @@ -2184,6 +2189,23 @@ nuttx-5.20 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> packet buffers. This capability was needed by the SLIP driver. * drivers/net/slip.c -- Several corrections and some re-design of of the driver. + * apps/ChangeLog.txt -- the apps/ directory now has its own ChangeLog. + * configs/vsn: + - IDLE LED blinking fix + - Added board power off function + * arch/arm/src/stm32/stm32_gpio.c and stm32_internal.h -- Fixed + PullUp/Down Input Configuration. + * arch/arm/src/lpc17xx/lpc17_serial.h -- Now supports Auto-RTS and + Auto-CTS modes. This is needed to support SLIP. + +apps-5.20 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> + + * README.txt -- README cosmetics + * hello/ -- hello world minor changes + * Makefile -- Makefile cosmetics (I am slowly adding the Darjeeling JVM) + * Make.defs -- New file adds common make definitions for applications. + * hello/Makefile -- Now uses new Make.defs definitions. Added README.txt. + * apps/poweroff -- New application to turn off board power. pascal-2.1 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/nuttx/TODO b/nuttx/TODO index bddb6e0f5..d9c4cf48b 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -311,7 +311,11 @@ o Network (net/, drivers/net) Description: The SLIP driver (drivers/net/slip.c) has had only the most superficial testing. The main issue is the I haven't yet gotten a dual UART Linux configuration that supports SLIP (I need one UART for SLIP and one for - the serial debug console). + the serial debug console). A second issue is that SLIP requires + hardware handshake and that has not been implemented in the UART + drivers on most platforms. It might be possible to use a special + cable to bypass the handshaking (but which may also result in data + overrun errors). Status: Open Priority: Medium diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c index d58ce7c03..63687038f 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c @@ -664,13 +664,15 @@ static inline void lpc17_uart1config(uint32_t clkdiv) lpc17_configgpio(GPIO_UART1_TXD); lpc17_configgpio(GPIO_UART1_RXD); -#ifdef CONFIG_UART0_FLOWCONTROL +#ifdef CONFIG_UART1_FLOWCONTROL lpc17_configgpio(GPIO_UART1_CTS); + lpc17_configgpio(GPIO_UART1_RTS); lpc17_configgpio(GPIO_UART1_DCD); lpc17_configgpio(GPIO_UART1_DSR); lpc17_configgpio(GPIO_UART1_DTR); +#ifdef CONFIG_UART1_RINGINDICATOR lpc17_configgpio(GPIO_UART1_RI); - lpc17_configgpio(GPIO_UART1_RTS); +#endif #endif irqrestore(flags); }; @@ -849,6 +851,16 @@ static int up_setup(struct uart_dev_s *dev) up_serialout(priv, LPC17_UART_FCR_OFFSET, (UART_FCR_RXTRIGGER_8|UART_FCR_TXRST|UART_FCR_RXRST|UART_FCR_FIFOEN)); + + /* Enable Auto-RTS and Auto-CS Flow Control in the Modem Control Register */ + +#ifdef CONFIG_UART1_FLOWCONTROL + if (priv->uartbase == LPC17_UART1_BASE) + { + up_serialout(priv, LPC17_UART_MCR_OFFSET, (UART_MCR_RTSEN|UART_MCR_CTSEN)); + } +#endif + #endif return OK; } diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h index 3446c4997..9fca96219 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.h @@ -92,6 +92,15 @@ # undef HAVE_CONSOLE
#endif
+/* Check UART flow control (Only supported by UART1) */
+
+# undef CONFIG_UART0_FLOWCONTROL
+# undef CONFIG_UART2_FLOWCONTROL
+# undef CONFIG_UART3_FLOWCONTROL
+#ifndef CONFIG_LPC17_UART1
+# undef CONFIG_UART1_FLOWCONTROL
+#endif
+
/* We cannot allow the DLM/DLL divisor to become to small or will will lose too
* much accuracy. This following is a "fudge factor" that represents the minimum
* value of the divisor that we will permit.
diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt index b7cc8683d..86e50949b 100755 --- a/nuttx/configs/olimex-lpc1766stk/README.txt +++ b/nuttx/configs/olimex-lpc1766stk/README.txt @@ -824,8 +824,17 @@ Where <subdir> is one of the following: $ ifconfig sl0 10.0.0.2/24 up
+ Or maybe,
+
+ $ ifconfig sl0 10.0.0.1 pointopoint 10.0.0.2 up
+ $ route add 10.0.0.2 dev sl0
+
Assuming the SLIP is attached to device sl0.
+ 5. For monitoring/debugging traffic:
+
+ $ tcpdump -n -nn -i sl0 -x -X -s 1500
+
thttpd:
This builds the THTTPD web server example using the THTTPD and
the examples/thttpd application.
diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index f61039535..9fb6ac45e 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -152,6 +152,8 @@ CONFIG_UART1_SERIAL_CONSOLE=n CONFIG_UART2_SERIAL_CONSOLE=n CONFIG_UART3_SERIAL_CONSOLE=n +CONFIG_UART1_FLOWCONTROL=y + CONFIG_UART0_TXBUFSIZE=256 CONFIG_UART1_TXBUFSIZE=256 CONFIG_UART2_TXBUFSIZE=256 |