summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-28 17:15:17 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-28 17:15:17 +0000
commit12661a30ccbf3f21b47a03b3bc1571cf437c8687 (patch)
tree01d2443084f1e698166c221b46d8f770a3ae5435 /nuttx/arch/arm
parent70c11ed7cbd8c0de81e46e47d35ba72ca52716fc (diff)
downloadpx4-nuttx-12661a30ccbf3f21b47a03b3bc1571cf437c8687.tar.gz
px4-nuttx-12661a30ccbf3f21b47a03b3bc1571cf437c8687.tar.bz2
px4-nuttx-12661a30ccbf3f21b47a03b3bc1571cf437c8687.zip
Preparing USB environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@957 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm')
-rw-r--r--nuttx/arch/arm/include/lpc214x/irq.h4
-rw-r--r--nuttx/arch/arm/src/dm320/dm320_usb.h1
-rw-r--r--nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h19
3 files changed, 22 insertions, 2 deletions
diff --git a/nuttx/arch/arm/include/lpc214x/irq.h b/nuttx/arch/arm/include/lpc214x/irq.h
index 8e389218f..911f51df9 100644
--- a/nuttx/arch/arm/include/lpc214x/irq.h
+++ b/nuttx/arch/arm/include/lpc214x/irq.h
@@ -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.
*
diff --git a/nuttx/arch/arm/src/dm320/dm320_usb.h b/nuttx/arch/arm/src/dm320/dm320_usb.h
index 0e599d336..bffb0608f 100644
--- a/nuttx/arch/arm/src/dm320/dm320_usb.h
+++ b/nuttx/arch/arm/src/dm320/dm320_usb.h
@@ -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)
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h
index c98919138..97ceea9e9 100644
--- a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h
+++ b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.h
@@ -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)