add some informations about this file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15344 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b77893e4d5
commit
fec406c7a2
|
@ -467,25 +467,17 @@ static void resume_int(void)
|
|||
|
||||
static void reset_int(void)
|
||||
{
|
||||
struct timer t;
|
||||
|
||||
/* clear device address */
|
||||
UDC_DEVICEADDR = 0 << 25;
|
||||
|
||||
/* update usb state */
|
||||
dcd_controller.usb_state = USB_STATE_DEFAULT;
|
||||
|
||||
timer_set(&t, RESET_TIMER);
|
||||
|
||||
UDC_ENDPTSETUPSTAT = UDC_ENDPTSETUPSTAT;
|
||||
UDC_ENDPTCOMPLETE = UDC_ENDPTCOMPLETE;
|
||||
|
||||
while (UDC_ENDPTPRIME) { /* prime and flush pending transfers */
|
||||
if (timer_expired(&t)) {
|
||||
logf("TIMEOUT->p&f");
|
||||
}
|
||||
}
|
||||
|
||||
/* prime and flush pending transfers */
|
||||
while (UDC_ENDPTPRIME);
|
||||
UDC_ENDPTFLUSH = ~0;
|
||||
|
||||
if ((UDC_PORTSC1 & PORTSCX_PORT_RESET) == 0) {
|
||||
|
@ -493,19 +485,9 @@ static void reset_int(void)
|
|||
}
|
||||
|
||||
/* clear USB Reset status bit */
|
||||
UDC_USBSTS = USB_STS_RESET;
|
||||
|
||||
/* wait for port change */
|
||||
while ((UDC_USBSTS & USB_STS_PORT_CHANGE) == 0) {
|
||||
if (timer_expired(&t)) {
|
||||
logf("TIMEOUT->portchange");
|
||||
}
|
||||
}
|
||||
|
||||
UDC_USBSTS = (1 << 2);
|
||||
UDC_USBSTS |= USB_STS_RESET;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/* usb controller ops */
|
||||
|
||||
|
|
|
@ -21,6 +21,33 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* This file holds USB constants and structures that are needed for
|
||||
* USB device APIs. These are used by the USB device model, which is
|
||||
* defined in chapter 9 of the USB 2.0 specification and in the
|
||||
* Wireless USB 1.0 (spread around).
|
||||
*
|
||||
* USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems
|
||||
* act either as a USB master/host or as a USB slave/device. That means
|
||||
* the master and slave side APIs benefit from working well together.
|
||||
*
|
||||
* There's also "Wireless USB", using low power short range radios for
|
||||
* peripheral interconnection but otherwise building on the USB framework.
|
||||
*
|
||||
* Note all descriptors are declared '__attribute__((packed))' so that:
|
||||
*
|
||||
* [a] they never get padded, either internally (USB spec writers
|
||||
* probably handled that) or externally;
|
||||
*
|
||||
* [b] so that accessing bigger-than-a-bytes fields will never
|
||||
* generate bus errors on any platform, even when the location of
|
||||
* its descriptor inside a bundle isn't "naturally aligned", and
|
||||
*
|
||||
* [c] for consistency, removing all doubt even when it appears to
|
||||
* someone that the two other points are non-issues for that
|
||||
* particular descriptor type.
|
||||
*/
|
||||
|
||||
#ifndef _CH9_H_
|
||||
#define _CH9_H_
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user