From 21aec31e1f2b06fea260c6d934422f7da4e99fe9 Mon Sep 17 00:00:00 2001 From: Theodore Ateba Date: Sat, 16 Sep 2017 15:50:45 +0000 Subject: AVR: Update the USB lld file according to the new endpoint enumeration. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10593 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.c | 2 +- os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'os/hal/ports') diff --git a/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.c b/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.c index 55ccfea6c..ccc3f575a 100644 --- a/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.c +++ b/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.c @@ -323,7 +323,7 @@ static void ep_isr(USBDriver *usbp, usbep_t ep) { _usb_isr_invoke_setup_cb(usbp, ep); } else if ((UEIENX & (1 << RXOUTE)) && (UEINTX & (1 << RXOUTI))) { /* Received OUT data from host */ - if (ep == 0 && usbp->ep0state == USB_EP0_WAITING_STS) { + if (ep == 0 && usbp->ep0state == USB_EP0_OUT_WAITING_STS) { /* SETUP/control transaction complete, invoke the callback. */ UEIENX &= ~(1 << RXOUTE); UEINTX &= ~((1 << RXOUTI) | (1 << FIFOCON)); diff --git a/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.h b/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.h index b3793c999..32b390b3e 100644 --- a/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.h +++ b/os/hal/ports/AVR/MEGA/LLD/USBv1/hal_usb_lld.h @@ -362,6 +362,15 @@ struct USBDriver { */ #define usb_lld_disconnect_bus(usbp) (UDCON |= (1 << DETACH)) +/** + * @brief Start of host wake-up procedure. + * + * @notapi + */ +#define usb_lld_wakeup_host(usbp) \ + do{ \ + } while (true) + /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ -- cgit v1.2.3