From 7da97fec6a03aaecd0238c5b7ac46651bbd080d5 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 9 Sep 2017 11:20:03 +0000 Subject: Tentative implementation of USB host wake-up API. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10570 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/hal_usb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'os/hal/include') diff --git a/os/hal/include/hal_usb.h b/os/hal/include/hal_usb.h index 25ef63aa3..653a058ae 100644 --- a/os/hal/include/hal_usb.h +++ b/os/hal/include/hal_usb.h @@ -245,10 +245,21 @@ #define USB_USE_WAIT FALSE #endif +/** + * @brief Host wake-up procedure duration. + */ +#if !defined(USB_HOST_WAKEUP_DURATION) || defined(__DOXYGEN__) +#define USB_HOST_WAKEUP_DURATION 2 +#endif + /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ +#if (USB_HOST_WAKEUP_DURATION < 2) || (USB_HOST_WAKEUP_DURATION > 15) +#error "invalid USB_HOST_WAKEUP_DURATION setting, it must be between 2 and 15" +#endif + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ @@ -620,6 +631,7 @@ extern "C" { #endif bool usbStallReceiveI(USBDriver *usbp, usbep_t ep); bool usbStallTransmitI(USBDriver *usbp, usbep_t ep); + void usbWakeupHost(USBDriver *usbp); void _usb_reset(USBDriver *usbp); void _usb_suspend(USBDriver *usbp); void _usb_wakeup(USBDriver *usbp); -- cgit v1.2.3