diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-27 22:24:49 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-27 22:24:49 +0000 |
commit | f6094628f833b3729b3a067ab6a0b789316f50d7 (patch) | |
tree | a7db67c725fa1138d539a4db2545455b567f17e9 | |
parent | 5d5fc5f3d4f24c903e4638099ebb1abc0a1c55f4 (diff) | |
download | nuttx-f6094628f833b3729b3a067ab6a0b789316f50d7.tar.gz nuttx-f6094628f833b3729b3a067ab6a0b789316f50d7.tar.bz2 nuttx-f6094628f833b3729b3a067ab6a0b789316f50d7.zip |
Some NuTiny-SDK-NUC120 size reduction; All serial driver vtables should be static const
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5683 42af7a65-404d-4744-a932-0658087f49c3
26 files changed, 28 insertions, 28 deletions
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index bcfa88c4b..e7fa65981 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -2017,7 +2017,7 @@ svn checkout -r5595 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code As of this writing, more device drivers are needed to make this a more complete port. </p> <p> - For a full-featured RTOS such as NuttX, providing support in a usable and meaningful way within the tiny memories of the NUC120 demonstrates the scalability of NuttX (128KB FLASH and 16KB of SRAM). + For a full-featured RTOS such as NuttX, providing support in a usable and meaningful way within the tiny memories of the NUC120 demonstrates the scalability of NuttX (128KB FLASH and 16KB of SRAM in a 48-pin package). When running the NSH configuration (a full up application), there is still more than 9KB or SRAM available: </p> <ul><pre> diff --git a/nuttx/arch/arm/src/c5471/c5471_serial.c b/nuttx/arch/arm/src/c5471/c5471_serial.c index ac86537ac..db28e196d 100644 --- a/nuttx/arch/arm/src/c5471/c5471_serial.c +++ b/nuttx/arch/arm/src/c5471/c5471_serial.c @@ -123,7 +123,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/calypso/calypso_serial.c b/nuttx/arch/arm/src/calypso/calypso_serial.c index 62e20409b..01e65d062 100644 --- a/nuttx/arch/arm/src/calypso/calypso_serial.c +++ b/nuttx/arch/arm/src/calypso/calypso_serial.c @@ -137,7 +137,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/dm320/dm320_serial.c b/nuttx/arch/arm/src/dm320/dm320_serial.c index 15e4ecdf9..58ff1e710 100644 --- a/nuttx/arch/arm/src/dm320/dm320_serial.c +++ b/nuttx/arch/arm/src/dm320/dm320_serial.c @@ -104,7 +104,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/imx/imx_serial.c b/nuttx/arch/arm/src/imx/imx_serial.c index 07c9312f4..9182d4ac8 100644 --- a/nuttx/arch/arm/src/imx/imx_serial.c +++ b/nuttx/arch/arm/src/imx/imx_serial.c @@ -126,7 +126,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/kinetis/kinetis_serial.c b/nuttx/arch/arm/src/kinetis/kinetis_serial.c index a35e0eef0..8ede027ec 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_serial.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_serial.c @@ -269,7 +269,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/lm/lm_serial.c b/nuttx/arch/arm/src/lm/lm_serial.c index ede47a8ca..13f3ca8df 100644 --- a/nuttx/arch/arm/src/lm/lm_serial.c +++ b/nuttx/arch/arm/src/lm/lm_serial.c @@ -243,7 +243,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c index c94f2ff60..8f1c7a5d5 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_serial.c @@ -117,7 +117,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c index 691adfa75..b035e91fc 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c @@ -103,7 +103,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c b/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c index 4f20cc7fd..c17a57840 100644 --- a/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c +++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_serial.c @@ -111,7 +111,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_serial.c b/nuttx/arch/arm/src/lpc31xx/lpc31_serial.c index c5438e1c8..c38325313 100644 --- a/nuttx/arch/arm/src/lpc31xx/lpc31_serial.c +++ b/nuttx/arch/arm/src/lpc31xx/lpc31_serial.c @@ -103,7 +103,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_serial.c b/nuttx/arch/arm/src/lpc43xx/lpc43_serial.c index 6e2e19f35..a6e6b7b18 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_serial.c +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_serial.c @@ -116,7 +116,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/nuc1xx/nuc_serial.c b/nuttx/arch/arm/src/nuc1xx/nuc_serial.c index 529f5c61b..dbf34f8ec 100644 --- a/nuttx/arch/arm/src/nuc1xx/nuc_serial.c +++ b/nuttx/arch/arm/src/nuc1xx/nuc_serial.c @@ -116,7 +116,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/sam3u/sam3u_serial.c b/nuttx/arch/arm/src/sam3u/sam3u_serial.c index 811bfda69..149474207 100644 --- a/nuttx/arch/arm/src/sam3u/sam3u_serial.c +++ b/nuttx/arch/arm/src/sam3u/sam3u_serial.c @@ -582,7 +582,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/arm/src/str71x/str71x_serial.c b/nuttx/arch/arm/src/str71x/str71x_serial.c index d9e9cc348..5de63a1b9 100644 --- a/nuttx/arch/arm/src/str71x/str71x_serial.c +++ b/nuttx/arch/arm/src/str71x/str71x_serial.c @@ -269,7 +269,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c b/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c index 06b4adb39..f33ce7d72 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_serial.c @@ -174,7 +174,7 @@ static bool up_txready(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c b/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c index 4073c2dc6..6b3ee6a7b 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c @@ -188,7 +188,7 @@ static bool up_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/sh/src/m16c/m16c_serial.c b/nuttx/arch/sh/src/m16c/m16c_serial.c index a725d6217..f9125cf11 100644 --- a/nuttx/arch/sh/src/m16c/m16c_serial.c +++ b/nuttx/arch/sh/src/m16c/m16c_serial.c @@ -283,7 +283,7 @@ static bool up_txready(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = up_setup, .shutdown = up_shutdown, diff --git a/nuttx/arch/z16/src/z16f/z16f_serial.c b/nuttx/arch/z16/src/z16f/z16f_serial.c index 3673484ae..b0f1a4674 100644 --- a/nuttx/arch/z16/src/z16f/z16f_serial.c +++ b/nuttx/arch/z16/src/z16f/z16f_serial.c @@ -113,7 +113,7 @@ static bool z16f_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { z16f_setup, /* setup */ z16f_shutdown, /* shutdown */ diff --git a/nuttx/arch/z80/src/ez80/ez80_serial.c b/nuttx/arch/z80/src/ez80/ez80_serial.c index 61c31ba31..bf938529c 100644 --- a/nuttx/arch/z80/src/ez80/ez80_serial.c +++ b/nuttx/arch/z80/src/ez80/ez80_serial.c @@ -100,7 +100,7 @@ static bool ez80_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { ez80_setup, /* setup */ ez80_shutdown, /* shutdown */ diff --git a/nuttx/arch/z80/src/z180/z180_scc.c b/nuttx/arch/z80/src/z180/z180_scc.c index 2ac08f7f1..a2f0d4561 100644 --- a/nuttx/arch/z80/src/z180/z180_scc.c +++ b/nuttx/arch/z80/src/z180/z180_scc.c @@ -104,7 +104,7 @@ static bool z180_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { z180_setup, /* setup */ z180_shutdown, /* shutdown */ diff --git a/nuttx/arch/z80/src/z8/z8_serial.c b/nuttx/arch/z80/src/z8/z8_serial.c index 1e7534bdd..fd499b183 100644 --- a/nuttx/arch/z80/src/z8/z8_serial.c +++ b/nuttx/arch/z80/src/z8/z8_serial.c @@ -112,7 +112,7 @@ static bool z8_txempty(FAR struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { z8_setup, /* setup */ z8_shutdown, /* shutdown */ diff --git a/nuttx/configs/nutiny-nuc120/nsh/defconfig b/nuttx/configs/nutiny-nuc120/nsh/defconfig index 72d120bfc..d884480f2 100644 --- a/nuttx/configs/nutiny-nuc120/nsh/defconfig +++ b/nuttx/configs/nutiny-nuc120/nsh/defconfig @@ -327,8 +327,8 @@ CONFIG_UART1_SERIAL_CONSOLE=y # # UART1 Configuration # -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART1_TXBUFSIZE=256 +CONFIG_UART1_RXBUFSIZE=64 +CONFIG_UART1_TXBUFSIZE=64 CONFIG_UART1_BAUD=115200 CONFIG_UART1_BITS=8 CONFIG_UART1_PARITY=0 @@ -562,7 +562,7 @@ CONFIG_NSH_DISABLE_UMOUNT=y CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set CONFIG_NSH_CODECS_BUFSIZE=128 -CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_LINELEN=80 CONFIG_NSH_NESTDEPTH=3 CONFIG_NSH_DISABLESCRIPT=y diff --git a/nuttx/configs/xtrs/src/xtr_serial.c b/nuttx/configs/xtrs/src/xtr_serial.c index eb6846179..c56aa8403 100644 --- a/nuttx/configs/xtrs/src/xtr_serial.c +++ b/nuttx/configs/xtrs/src/xtr_serial.c @@ -122,7 +122,7 @@ static bool up_txempty(FAR struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { up_setup, /* setup */ up_shutdown, /* shutdown */ diff --git a/nuttx/configs/z80sim/src/z80_serial.c b/nuttx/configs/z80sim/src/z80_serial.c index 27d685093..e06ac96e7 100644 --- a/nuttx/configs/z80sim/src/z80_serial.c +++ b/nuttx/configs/z80sim/src/z80_serial.c @@ -87,7 +87,7 @@ static bool up_txempty(FAR struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { up_setup, /* setup */ up_shutdown, /* shutdown */ diff --git a/nuttx/drivers/serial/uart_16550.c b/nuttx/drivers/serial/uart_16550.c index 8fb71bfd2..fbd810426 100644 --- a/nuttx/drivers/serial/uart_16550.c +++ b/nuttx/drivers/serial/uart_16550.c @@ -109,7 +109,7 @@ static bool u16550_txempty(struct uart_dev_s *dev); * Private Variables ****************************************************************************/ -struct uart_ops_s g_uart_ops = +static const struct uart_ops_s g_uart_ops = { .setup = u16550_setup, .shutdown = u16550_shutdown, |