Convert olimex-lpc17stk configuration to use the kconfig-frontends tools; Fix some compile errors in the pl2303 USB device driver

This commit is contained in:
Gregory Nutt 2013-04-12 08:38:52 -06:00
parent b841dac0be
commit ad2ebf1dd8
12 changed files with 583 additions and 481 deletions

View File

@ -4539,3 +4539,8 @@
* configs/zkit-arm-1769/src/up_lcd.c, up_ssp.c, and up_spi.c: * configs/zkit-arm-1769/src/up_lcd.c, up_ssp.c, and up_spi.c:
Use SSP0 to LCD and SPI to SD-Card on the Zkit-arm-1769 board. Use SSP0 to LCD and SPI to SD-Card on the Zkit-arm-1769 board.
From Manikandan. S (2013-4-10) From Manikandan. S (2013-4-10)
* configs/olimex-lpc1766stk/usbserial: Converted to use the
the kconfig-config frontends tools (2013-4-12).
* drivers/usbdev/pl2303.c: Fix some compilation errors that
crept in when fixes to the CDC/ACM driver where blindly
incorporated in the PL2303 driver (2013-4-12).

6
TODO
View File

@ -452,12 +452,12 @@ o Kernel Build
Title: MICRO-KERNEL Title: MICRO-KERNEL
Description: The initial kernel build cut many interfaces at a very high level. Description: The initial kernel build cut many interfaces at a very high level.
The resulting monolithic kernel is then rather large. it would The resulting monolithic kernel is then rather large. It would
not be a prohibitively large task to reorganize the interfaces so not be a prohibitively large task to reorganize the interfaces so
that NuttX is built as a micro-kernel, i.e., with only the core that NuttX is built as a micro-kernel, i.e., with only the core
OS services within the kernel and with other OS facilities, such OS services within the kernel and with other OS facilities, such
as the file system, to reside in user-space and to interface with as the file system, message queues, etc., residing in user-space
those core OS facilities through traps. and to interfacing with those core OS facilities through traps.
Status: Open Status: Open
Priority: Low. This is a good idea and certainly an architectural Priority: Low. This is a good idea and certainly an architectural
improvement. However, there is no strong motivivation now do improvement. However, there is no strong motivivation now do

View File

@ -361,7 +361,6 @@ CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
CONFIG_LPC17_USBDEV_DMA=n CONFIG_LPC17_USBDEV_DMA=n
CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0 CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
CONFIG_LPC17_USBDEV_DMAINTMASK=0
# #
# LPC17xx USB Host Configuration # LPC17xx USB Host Configuration

View File

@ -355,7 +355,6 @@ CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
CONFIG_LPC17_USBDEV_DMA=n CONFIG_LPC17_USBDEV_DMA=n
CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0 CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
CONFIG_LPC17_USBDEV_DMAINTMASK=0
# #
# USB Serial Device Configuration # USB Serial Device Configuration

View File

@ -337,7 +337,6 @@ CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
CONFIG_LPC17_USBDEV_DMA=n CONFIG_LPC17_USBDEV_DMA=n
CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0 CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
CONFIG_LPC17_USBDEV_DMAINTMASK=0
# #
# USB Serial Device Configuration # USB Serial Device Configuration

View File

@ -352,7 +352,6 @@ CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
CONFIG_LPC17_USBDEV_DMA=n CONFIG_LPC17_USBDEV_DMA=n
CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0 CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
CONFIG_LPC17_USBDEV_DMAINTMASK=0
# #
# USB Serial Device Configuration # USB Serial Device Configuration

View File

@ -347,7 +347,6 @@ CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
CONFIG_LPC17_USBDEV_DMA=n CONFIG_LPC17_USBDEV_DMA=n
CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0 CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
CONFIG_LPC17_USBDEV_DMAINTMASK=0
# #
# USB Serial Device Configuration # USB Serial Device Configuration

View File

@ -1,39 +0,0 @@
############################################################################
# configs/olimex-lpc1766stk/usbserial/appconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
# Path to example in apps/examples containing the user_start entry point
CONFIGURED_APPS += examples/usbserial

992
configs/olimex-lpc1766stk/usbserial/defconfig Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@ -339,7 +339,6 @@ CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
CONFIG_LPC17_USBDEV_DMA=n CONFIG_LPC17_USBDEV_DMA=n
CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0 CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
CONFIG_LPC17_USBDEV_DMAINTMASK=0
# #
# USB Serial Device Configuration # USB Serial Device Configuration

View File

@ -36,9 +36,11 @@ endchoice
config USBDEV_MAXPOWER config USBDEV_MAXPOWER
int "Maximum power consumption in mA" int "Maximum power consumption in mA"
default 100 default 100
depends on USBDEV_BUSPOWERED # depends on USBDEV_BUSPOWERED
---help--- ---help---
Maximum power consumption in mA Maximum power consumption in mA. This selection should only apply if
the device is bus powered (USBDEV_BUSPOWERED). It is, however, used
unconditionally in several USB device drivers.
config USBDEV_DMA config USBDEV_DMA
bool "Enable DMA methods" bool "Enable DMA methods"

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* drivers/usbdev/pl2303.c * drivers/usbdev/pl2303.c
* *
* Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2008-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* This logic emulates the Prolific PL2303 serial/USB converter * This logic emulates the Prolific PL2303 serial/USB converter
@ -1911,7 +1911,7 @@ static void usbclass_disconnect(FAR struct usbdevclass_driver_s *driver,
static void usbclass_suspend(FAR struct usbdevclass_driver_s *driver, static void usbclass_suspend(FAR struct usbdevclass_driver_s *driver,
FAR struct usbdev_s *dev) FAR struct usbdev_s *dev)
{ {
FAR struct cdcacm_dev_s *priv; FAR struct pl2303_dev_s *priv;
usbtrace(TRACE_CLASSSUSPEND, 0); usbtrace(TRACE_CLASSSUSPEND, 0);
@ -1925,7 +1925,7 @@ static void usbclass_suspend(FAR struct usbdevclass_driver_s *driver,
/* Extract reference to private data */ /* Extract reference to private data */
priv = ((FAR struct cdcacm_driver_s*)driver)->dev; priv = ((FAR struct pl2303_driver_s*)driver)->dev;
/* And let the "upper half" driver now that we are suspended */ /* And let the "upper half" driver now that we are suspended */
@ -1945,7 +1945,7 @@ static void usbclass_suspend(FAR struct usbdevclass_driver_s *driver,
static void usbclass_resume(FAR struct usbdevclass_driver_s *driver, static void usbclass_resume(FAR struct usbdevclass_driver_s *driver,
FAR struct usbdev_s *dev) FAR struct usbdev_s *dev)
{ {
FAR struct cdcacm_dev_s *priv; FAR struct pl2303_dev_s *priv;
usbtrace(TRACE_CLASSRESUME, 0); usbtrace(TRACE_CLASSRESUME, 0);
@ -1959,7 +1959,7 @@ static void usbclass_resume(FAR struct usbdevclass_driver_s *driver,
/* Extract reference to private data */ /* Extract reference to private data */
priv = ((FAR struct cdcacm_driver_s*)driver)->dev; priv = ((FAR struct pl2303_driver_s*)driver)->dev;
/* Are we still configured? */ /* Are we still configured? */