aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/USBv1
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2017-09-09 11:20:03 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2017-09-09 11:20:03 +0000
commit7da97fec6a03aaecd0238c5b7ac46651bbd080d5 (patch)
treeda41c73bf474129c7832306f8898dd27d0a34307 /os/hal/ports/STM32/LLD/USBv1
parent66cf5195f983d64d24e708333907679529449b0b (diff)
downloadChibiOS-7da97fec6a03aaecd0238c5b7ac46651bbd080d5.tar.gz
ChibiOS-7da97fec6a03aaecd0238c5b7ac46651bbd080d5.tar.bz2
ChibiOS-7da97fec6a03aaecd0238c5b7ac46651bbd080d5.zip
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
Diffstat (limited to 'os/hal/ports/STM32/LLD/USBv1')
-rw-r--r--os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h
index 7971189ae..db199e33d 100644
--- a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h
+++ b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h
@@ -422,7 +422,7 @@ struct USBDriver {
/**
* @brief Connects the USB device.
*
- * @api
+ * @notapi
*/
#if !defined(usb_lld_connect_bus)
#define usb_lld_connect_bus(usbp) (STM32_USB->BCDR |= USB_BCDR_DPPU)
@@ -431,7 +431,7 @@ struct USBDriver {
/**
* @brief Disconnect the USB device.
*
- * @api
+ * @notapi
*/
#if !defined(usb_lld_disconnect_bus)
#define usb_lld_disconnect_bus(usbp) (STM32_USB->BCDR &= ~USB_BCDR_DPPU)
@@ -448,6 +448,20 @@ struct USBDriver {
#endif
#endif /* STM32L1XX */
+/**
+ * @brief Start of host wake-up procedure.
+ *
+ * @notapi
+ */
+#define usb_lld_start_wakeup_host(usbp) (STM32_USB->CNTR |= USB_CNTR_RESUME)
+
+/**
+ * @brief Stop of host wake-up procedure.
+ *
+ * @notapi
+ */
+#define usb_lld_stop_wakeup_host(usbp) (STM32_USB->CNTR &= ~USB_CNTR_RESUME)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/