Preparing USB environment

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@957 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-09-28 17:15:17 +00:00
parent ef4ed57353
commit c55d958a20
3 changed files with 22 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/lpc214x/irq.h
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 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.
*

View File

@ -223,6 +223,7 @@
/* TXFIFO2 register bit settings **************************************************/
#define USB_TXFIF02_SZMASK (0xe0)
#define USB_TXFIFO2_SZ_8 (0x00)
#define USB_TXFIFO2_SZ_16 (0x20)
#define USB_TXFIFO2_SZ_32 (0x40)

View File

@ -47,6 +47,15 @@
* Definitions
*******************************************************************************/
/* PINSEL1 bit definitions for UART0/1:
*
* P0.23 = 01 to enable VBus sense (bits 14-15)
* P0.31 = 10 to enable CONNECT (bits 30-31)
*/
#define LPC214X_USBDEV_PINSEL (0x80004000) /* PINSEL1 value for USB */
#define LPC214X_USBDEV_PINMASK (0xc000c000) /* PINSEL1 mask for USB */
/* USB RAM ********************************************************************/
#define LPC214X_USBDEV_RAMBASE (0x7fd00000)
@ -260,6 +269,16 @@
/* Command Responses ***********************************************************/
/* EP Select response */
#define CMD_USB_EPSELECT_FE (0x01) /* Bit 0=1: IN empty or OUT full */
#define CMD_USB_EPSELECT_ST (0x02) /* Bit 1=1: Endpoint is stalled */
#define CMD_USB_EPSELECT_STP (0x04) /* Bit 2=1: Last packet was setup */
#define CMD_USB_EPSELECT_PO (0x05) /* Bit 3=1: Previous packet was overwritten */
#define CMD_USB_EPSELECT_EPN (0x10) /* Bit 4=1: NAK sent */
#define CMD_USB_EPSELECT_B1FULL (0x20) /* Bit 5=1: Buffer 1 full */
#define CMD_USB_EPSELECT_B2FULL (0x40) /* Bit 6=1: Buffer 2 full */
/* EP CLRBUFFER response */
#define CMD_USB_CLRBUFFER_PO (0x00000001)