From 7d1d85c02e4d250addff3d815147c45be525025a Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 30 Sep 2006 22:18:42 +0000 Subject: add stub for later implementation of suspend/resume git-svn-id: https://svn.openpcd.org:2342/trunk@236 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/src/os/pcd_enumerate.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'firmware/src/os') diff --git a/firmware/src/os/pcd_enumerate.c b/firmware/src/os/pcd_enumerate.c index 2ca8c77..5589964 100644 --- a/firmware/src/os/pcd_enumerate.c +++ b/firmware/src/os/pcd_enumerate.c @@ -452,12 +452,22 @@ cont_ep2: if (isr & AT91C_UDP_RXSUSP) { pUDP->UDP_ICR = AT91C_UDP_RXSUSP; DEBUGI("RXSUSP "); - /* FIXME: implement suspend/resume */ +#ifdef CONFIG_USB_SUSPEND + upcd.state = USB_STATE_SUSPENDED; + /* FIXME: implement suspend/resume correctly. This + * involves saving the pre-suspend state, and calling back + * into the main application program to ask it to power down + * all peripherals, switching to slow clock, ... */ +#endif } if (isr & AT91C_UDP_RXRSM) { pUDP->UDP_ICR = AT91C_UDP_RXRSM; DEBUGI("RXRSM "); +#ifdef CONFIG_USB_SUSPEND + if (upcd.state == USB_STATE_SUSPENDED) + upcd.state = USB_STATE_CONFIGURED; /* FIXME: implement suspend/resume */ +#endif } if (isr & AT91C_UDP_EXTRSM) { pUDP->UDP_ICR = AT91C_UDP_EXTRSM; @@ -471,7 +481,6 @@ cont_ep2: if (isr & AT91C_UDP_WAKEUP) { pUDP->UDP_ICR = AT91C_UDP_WAKEUP; DEBUGI("WAKEUP "); - /* FIXME: implement suspend/resume */ } out: DEBUGI("END\r\n"); -- cgit v1.2.3