From fb7d51e41ba6acd21e511a25f1a2e5102d3d8095 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 29 Dec 2011 12:52:15 +0000 Subject: Correct last set of changes to configuration logic git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4237 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'nuttx/arch/mips/src/pic32mx') diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c b/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c index a857ac162..bc0f450e4 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c @@ -5,9 +5,12 @@ * Author: Gregory Nutt * * References: - * - This file derives from the STM32 USB device driver + * This file derives from the STM32 USB device driver with modifications + * based on additional information from: + * * - "USB On-The-Go (OTG)", DS61126E, Microchip Technology Inc., 2009 - * - Sample code provided with the Sure Electronics PIC32 board. + * - Sample code provided with the Sure Electronics PIC32 board + * (which seems to have derived from Microchip PICDEM PIC18 code). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2010,7 +2013,7 @@ static void pic32mx_ep0transfer(struct pic32mx_usbdev_s *priv, uint16_t status) /* Check the current EP0 OUT buffer contains a SETUP packet */ - if (((bdt->status & USB_BDT_PID_MASK) >> USB_BDT_PID_SHIFT) == USB_SETUP_TOKEN) + if (((bdt->status & USB_BDT_PID_MASK) >> USB_BDT_PID_SHIFT) == USB_PID_SETUP_TOKEN) { /* Check if the SETUP transaction data went into the priv->ctrl * buffer. If not, then we will need to copy it. -- cgit v1.2.3