diff options
author | Diego Ismirlian <dismirlian (at) google's mail.com> | 2017-07-09 18:36:07 -0300 |
---|---|---|
committer | Diego Ismirlian <dismirlian (at) google's mail.com> | 2017-07-09 18:36:07 -0300 |
commit | 89ecbb7daa7132d8815e7b3507a011348ccd0518 (patch) | |
tree | 3beab017f3b2e72659175ab2cdd80378ca1fdcff | |
parent | 025ca5345a8ffbb7de3b1c64fb0a5ddbbdacd3b0 (diff) | |
download | ChibiOS-Contrib-89ecbb7daa7132d8815e7b3507a011348ccd0518.tar.gz ChibiOS-Contrib-89ecbb7daa7132d8815e7b3507a011348ccd0518.tar.bz2 ChibiOS-Contrib-89ecbb7daa7132d8815e7b3507a011348ccd0518.zip |
USBH: Cleanup example for out-of-tree driver
3 files changed, 5 insertions, 5 deletions
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h index da9c7f8..a13aa89 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h @@ -141,7 +141,7 @@ #define HAL_USBHHUB_MAX_INSTANCES 1
#define HAL_USBHHUB_MAX_PORTS 6
-#define HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS 1
+#define HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS TRUE
/* debug */
#define USBH_DEBUG_ENABLE TRUE
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c index 23d5559..d8c5bbe 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c +++ b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c @@ -16,6 +16,8 @@ */ #include "hal.h" + +#if HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS #include "usbh/internal.h" #include "usbh_custom_class_example.h" #include <string.h> @@ -138,3 +140,4 @@ static void _init(void) { } } +#endif diff --git a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h index b84f2b7..3f00fe7 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h @@ -20,8 +20,7 @@ #include "hal_usbh.h" -#if HAL_USE_USBH - +#if HAL_USE_USBH && HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -72,8 +71,6 @@ extern "C" { #endif /* API goes here */ - /* global initializer */ - void usbhCustomInit(void); #ifdef __cplusplus } #endif |