Add header files for CDC serial

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3951 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-09-12 20:46:00 +00:00
parent 27751a08f4
commit 35f2108e4b
3 changed files with 980 additions and 1 deletions
+873
View File
File diff suppressed because it is too large Load Diff
+106
View File
@@ -0,0 +1,106 @@
/****************************************************************************
* include/nuttx/usb/cdc_serial.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* 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.
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_USB_CDC_SERIAL_H
#define __INCLUDE_NUTTX_USB_CDC_SERIAL_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Preprocessor definitions
****************************************************************************/
/* Configuration ************************************************************/
/* Endpoint number and size (in bytes) of the CDC serial device-to-host (IN)
* notification interrupt endpoint.
*/
#ifndef CONFIG_CDCSER_INTIN_EP
# define CONFIG_CDCSER_INTIN_EP 2
#endif
#ifndef CONFIG_CDCSER_INTIN_EPSIZE
# define CONFIG_CDCSER_INTIN_EPSIZE 8
#endif
/* Endpoint number and size (in bytes) of the CDC device-to-host (IN) data
* bulk endpoint
*/
#ifndef CONFIG_CDCSER_BULKIN_EP
# define CONFIG_CDCSER_BULKIN_EP 3
#endif
#ifndef CONFIG_CDCSER_BULKIN_EPSIZE
# define CONFIG_CDCSER_BULKIN_EPSIZE 16
#endif
/* Endpoint number and size (in bytes) of the CDC host-to-device (OUT) data
* bulk endpoint
*/
#ifndef CONFIG_CDCSER_BULKOUT_EP
# define CONFIG_CDCSER_BULKOUT_EP 4
#endif
#ifndef CONFIG_CDCSER_BULKOUT_EPSIZE
# define CONFIG_CDCSER_BULKOUT_EPSIZE 16
#endif
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
# define EXTERN extern "C"
extern "C" {
#else
# define EXTERN extern
#endif
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __INCLUDE_NUTTX_USB_CDC_SERIAL_H */
+1 -1
View File
@@ -159,7 +159,7 @@
#define USB_CLASS_PER_INTERFACE (0x00)
#define USB_CLASS_AUDIO (0x01)
#define USB_CLASS_COMM (0x02)
#define USB_CLASS_CDC (0x02)
#define USB_CLASS_HID (0x03)
#define USB_CLASS_PHYSICAL (0x05)
#define USB_CLASS_STILL_IMAGE (0x06)