diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/KINETIS/LLD/hal_pal_lld.h | 5 | ||||
-rw-r--r-- | os/hal/ports/KINETIS/LLD/hal_usb_lld.h | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/os/hal/ports/KINETIS/LLD/hal_pal_lld.h b/os/hal/ports/KINETIS/LLD/hal_pal_lld.h index 833d95e..6129f69 100644 --- a/os/hal/ports/KINETIS/LLD/hal_pal_lld.h +++ b/os/hal/ports/KINETIS/LLD/hal_pal_lld.h @@ -83,6 +83,11 @@ typedef uint32_t ioline_t; typedef GPIO_TypeDef *ioportid_t;
/**
+ * @brief Type of an pad identifier.
+ */
+typedef uint32_t iopadid_t;
+
+/**
* @brief Port Configuration.
* @details This structure stores the configuration parameters of all pads
* belonging to a port.
diff --git a/os/hal/ports/KINETIS/LLD/hal_usb_lld.h b/os/hal/ports/KINETIS/LLD/hal_usb_lld.h index bd4eb39..ed65b3b 100644 --- a/os/hal/ports/KINETIS/LLD/hal_usb_lld.h +++ b/os/hal/ports/KINETIS/LLD/hal_usb_lld.h @@ -356,6 +356,25 @@ struct USBDriver { /*===========================================================================*/
/**
+ * @brief Host wake-up procedure duration.
+ */
+#if !defined(USB_HOST_WAKEUP_DURATION) || defined(__DOXYGEN__)
+#define USB_HOST_WAKEUP_DURATION 2
+#endif
+
+/**
+ * @brief Start of host wake-up procedure.
+ *
+ * @notapi
+ */
+#define usb_lld_wakeup_host(usbp) \
+ do{ \
+ USB0->CTL |= USBx_CTL_RESUME; \
+ osalThreadSleepMilliseconds(USB_HOST_WAKEUP_DURATION); \
+ USB0->CTL &= ~USBx_CTL_RESUME; \
+ } while (false)
+
+/**
* @brief Returns the current frame number.
*
* @param[in] usbp pointer to the @p USBDriver object
|