aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/usb_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/templates/usb_lld.c')
-rw-r--r--os/hal/templates/usb_lld.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/os/hal/templates/usb_lld.c b/os/hal/templates/usb_lld.c
index bfb214d7f..ac3ec32b4 100644
--- a/os/hal/templates/usb_lld.c
+++ b/os/hal/templates/usb_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_USB || defined(__DOXYGEN__)
+#if (HAL_USE_USB == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -37,7 +37,7 @@
/**
* @brief USB1 driver identifier.
*/
-#if PLATFORM_USB_USE_USB1 || defined(__DOXYGEN__)
+#if (PLATFORM_USB_USE_USB1 == TRUE) || defined(__DOXYGEN__)
USBDriver USBD1;
#endif
@@ -98,10 +98,10 @@ static const USBEndpointConfig ep0config = {
*/
void usb_lld_init(void) {
-#if PLATFORM_USB_USE_USB1
+#if PLATFORM_USB_USE_USB1 == TRUE
/* Driver initialization.*/
usbObjectInit(&USBD1);
-#endif /* PLATFORM_USB_USE_USB1 */
+#endif
}
/**
@@ -115,11 +115,11 @@ void usb_lld_start(USBDriver *usbp) {
if (usbp->state == USB_STOP) {
/* Enables the peripheral.*/
-#if PLATFORM_USB_USE_USB1
+#if PLATFORM_USB_USE_USB1 == TRUE
if (&USBD1 == usbp) {
}
-#endif /* PLATFORM_USB_USE_USB1 */
+#endif
}
/* Configures the peripheral.*/
@@ -138,11 +138,11 @@ void usb_lld_stop(USBDriver *usbp) {
/* Resets the peripheral.*/
/* Disables the peripheral.*/
-#if PLATFORM_USB_USE_USB1
+#if PLATFORM_USB_USE_USB1 == TRUE
if (&USBD1 == usbp) {
}
-#endif /* PLATFORM_USB_USE_USB1 */
+#endif
}
}
@@ -385,6 +385,6 @@ void usb_lld_clear_in(USBDriver *usbp, usbep_t ep) {
}
-#endif /* HAL_USE_USB */
+#endif /* HAL_USE_USB == TRUE */
/** @} */