aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-09 19:42:36 -0300
committerDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-09 19:42:36 -0300
commit6b7161b90a3572bbb7717d0317306741043528e5 (patch)
tree934fd84bd72b0d5140208d14392e79294c713b1b
parent665643c9e47709e6915b22398571be978b59a891 (diff)
downloadChibiOS-Contrib-6b7161b90a3572bbb7717d0317306741043528e5.tar.gz
ChibiOS-Contrib-6b7161b90a3572bbb7717d0317306741043528e5.tar.bz2
ChibiOS-Contrib-6b7161b90a3572bbb7717d0317306741043528e5.zip
USBH: moved usbh/desciter.h and usbh/debug.h to usbh/internal.h
-rw-r--r--os/hal/include/hal_usbh.h7
-rw-r--r--os/hal/include/usbh/dev/uvc.h6
-rw-r--r--os/hal/include/usbh/internal.h3
-rw-r--r--os/hal/src/usbh/hal_usbh_ftdi.c3
-rw-r--r--os/hal/src/usbh/hal_usbh_msd.c3
-rw-r--r--os/hal/src/usbh/hal_usbh_uvc.c2
-rw-r--r--testhal/STM32/STM32F4xx/USB_HOST/main.c2
-rw-r--r--testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c5
8 files changed, 10 insertions, 21 deletions
diff --git a/os/hal/include/hal_usbh.h b/os/hal/include/hal_usbh.h
index f6e78e9..d686cfd 100644
--- a/os/hal/include/hal_usbh.h
+++ b/os/hal/include/hal_usbh.h
@@ -429,13 +429,6 @@ struct usbh_baseclassdriver {
_usbh_base_classdriver_data
};
-
-/*===========================================================================*/
-/* Helper functions. */
-/*===========================================================================*/
-#include <usbh/desciter.h> /* descriptor iterators */
-#include <usbh/debug.h> /* debug */
-
#endif
#endif /* HAL_USBH_H_ */
diff --git a/os/hal/include/usbh/dev/uvc.h b/os/hal/include/usbh/dev/uvc.h
index bc46a71..817d465 100644
--- a/os/hal/include/usbh/dev/uvc.h
+++ b/os/hal/include/usbh/dev/uvc.h
@@ -22,11 +22,7 @@
#if HAL_USE_USBH && HAL_USBH_USE_UVC
-/* TODO:
- *
- *
- */
-
+#include "usbh/desciter.h"
/*===========================================================================*/
/* Driver pre-compile time settings. */
diff --git a/os/hal/include/usbh/internal.h b/os/hal/include/usbh/internal.h
index 70d2f7a..89695f0 100644
--- a/os/hal/include/usbh/internal.h
+++ b/os/hal/include/usbh/internal.h
@@ -137,6 +137,9 @@ void _usbh_urb_abort_and_waitS(usbh_urb_t *urb, usbh_urbstatus_t status);
#define sizeof_array(x) (sizeof(x)/sizeof(*(x)))
+#include "usbh/desciter.h" /* descriptor iterators */
+#include "usbh/debug.h"
+
#endif
#endif /* USBH_INTERNAL_H_ */
diff --git a/os/hal/src/usbh/hal_usbh_ftdi.c b/os/hal/src/usbh/hal_usbh_ftdi.c
index 9822969..a01c566 100644
--- a/os/hal/src/usbh/hal_usbh_ftdi.c
+++ b/os/hal/src/usbh/hal_usbh_ftdi.c
@@ -27,9 +27,6 @@
#include "usbh/dev/ftdi.h"
#include "usbh/internal.h"
-//#pragma GCC optimize("Og")
-
-
#if USBHFTDI_DEBUG_ENABLE_TRACE
#define udbgf(f, ...) usbDbgPrintf(f, ##__VA_ARGS__)
#define udbg(f, ...) usbDbgPuts(f, ##__VA_ARGS__)
diff --git a/os/hal/src/usbh/hal_usbh_msd.c b/os/hal/src/usbh/hal_usbh_msd.c
index f2a4e39..d631484 100644
--- a/os/hal/src/usbh/hal_usbh_msd.c
+++ b/os/hal/src/usbh/hal_usbh_msd.c
@@ -27,9 +27,6 @@
#include "usbh/dev/msd.h"
#include "usbh/internal.h"
-//#pragma GCC optimize("Og")
-
-
#if USBHMSD_DEBUG_ENABLE_TRACE
#define udbgf(f, ...) usbDbgPrintf(f, ##__VA_ARGS__)
#define udbg(f, ...) usbDbgPuts(f, ##__VA_ARGS__)
diff --git a/os/hal/src/usbh/hal_usbh_uvc.c b/os/hal/src/usbh/hal_usbh_uvc.c
index ac3663e..3f362a2 100644
--- a/os/hal/src/usbh/hal_usbh_uvc.c
+++ b/os/hal/src/usbh/hal_usbh_uvc.c
@@ -27,9 +27,9 @@
#error "USBHUVC needs HAL_USBH_USE_IAD"
#endif
+#include <string.h>
#include "usbh/dev/uvc.h"
#include "usbh/internal.h"
-#include <string.h>
#if USBHUVC_DEBUG_ENABLE_TRACE
#define udbgf(f, ...) usbDbgPrintf(f, ##__VA_ARGS__)
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/main.c b/testhal/STM32/STM32F4xx/USB_HOST/main.c
index 7cf14e1..a450019 100644
--- a/testhal/STM32/STM32F4xx/USB_HOST/main.c
+++ b/testhal/STM32/STM32F4xx/USB_HOST/main.c
@@ -18,6 +18,8 @@
#include "hal.h"
#include "ff.h"
#include <string.h>
+#include "usbh/debug.h" /* for usbDbgPuts/usbDbgPrintf */
+
#define UVC_TO_MSD_PHOTOS_CAPTURE FALSE
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 d8c5bbe..9c56866 100644
--- a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c
+++ b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c
@@ -18,9 +18,10 @@
#include "hal.h"
#if HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS
-#include "usbh/internal.h"
-#include "usbh_custom_class_example.h"
+
#include <string.h>
+#include "usbh_custom_class_example.h"
+#include "usbh/internal.h"
#if USBH_DEBUG_ENABLE_TRACE
#define udbgf(f, ...) usbDbgPrintf(f, ##__VA_ARGS__)