From c2b34298b9df90a10e6811293ef40e7e99a6a427 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 10 Oct 2008 16:45:17 +0000 Subject: [PATCH] updated comments git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1024 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/lpc214x/lpc214x_usbdev.c | 8 ++++++-- arch/arm/src/lpc214x/lpc214x_usbdev.h | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.c b/arch/arm/src/lpc214x/lpc214x_usbdev.c index 31098a6e7f..9ab55b79e8 100644 --- a/arch/arm/src/lpc214x/lpc214x_usbdev.c +++ b/arch/arm/src/lpc214x/lpc214x_usbdev.c @@ -787,7 +787,9 @@ static void lpc214x_epwrite(ubyte epphy, const ubyte *data, uint32 nbytes) uint32 value; boolean aligned = (((uint32)data & 3) == 0); - /* Set the write enable bit for this physical EP address */ + /* Set the write enable bit for this physical EP address. Bits 2-5 are + * the logical endpoint number (0-15) + */ lpc214x_putreg(((epphy << 1) & LPC214X_USBCTRL_EPMASK) | LPC214X_USBCTRL_WREN, LPC214X_USBDEV_CTRL); @@ -865,7 +867,9 @@ static int lpc214x_epread(ubyte epphy, ubyte *data, uint32 nbytes) } } - /* Set the read enable bit for this physical EP address */ + /* Set the read enable bit for this physical EP address. Bits 2-5 are + * the logical endpoint number (0-15). + */ lpc214x_putreg(((epphy << 1) & LPC214X_USBCTRL_EPMASK) | LPC214X_USBCTRL_RDEN, LPC214X_USBDEV_CTRL); diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.h b/arch/arm/src/lpc214x/lpc214x_usbdev.h index 55438799e7..9ed2550a85 100644 --- a/arch/arm/src/lpc214x/lpc214x_usbdev.h +++ b/arch/arm/src/lpc214x/lpc214x_usbdev.h @@ -185,9 +185,9 @@ /* USB Control register bit definitions */ -#define LPC214X_USBCTRL_RDEN (0x00000001) -#define LPC214X_USBCTRL_WREN (0x00000002) -#define LPC214X_USBCTRL_EPMASK (0x0000003c) +#define LPC214X_USBCTRL_RDEN (0x00000001) /* Bit 0=1: Read is enabled */ +#define LPC214X_USBCTRL_WREN (0x00000002) /* Bit 0=1: Write is enabled */ +#define LPC214X_USBCTRL_EPMASK (0x0000003c) /* Bits 2:5: Logical endpoint 0-15 */ /* Endpoints *******************************************************************/