aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
authorDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-13 12:57:06 -0300
committerDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-13 12:57:06 -0300
commitc9cc2abf3e6854f68a87f72e73cd4eec92262317 (patch)
treef150a240f548edd8f840c19cdea7749b146c46af /os/hal/src
parent442b723c127c7e5b808862a50de12d9e49ccf3bf (diff)
downloadChibiOS-Contrib-c9cc2abf3e6854f68a87f72e73cd4eec92262317.tar.gz
ChibiOS-Contrib-c9cc2abf3e6854f68a87f72e73cd4eec92262317.tar.bz2
ChibiOS-Contrib-c9cc2abf3e6854f68a87f72e73cd4eec92262317.zip
USBH: cleanup
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/hal_usbh.c9
-rw-r--r--os/hal/src/usbh/hal_usbh_hid.c3
-rw-r--r--os/hal/src/usbh/hal_usbh_msd.c19
3 files changed, 20 insertions, 11 deletions
diff --git a/os/hal/src/hal_usbh.c b/os/hal/src/hal_usbh.c
index d0d3cb7..007ef1b 100644
--- a/os/hal/src/hal_usbh.c
+++ b/os/hal/src/hal_usbh.c
@@ -20,15 +20,8 @@
#if HAL_USE_USBH
#include "usbh/internal.h"
-#include <string.h>
-
-//devices
#include "usbh/dev/hub.h"
-#include "usbh/dev/aoa.h"
-#include "usbh/dev/ftdi.h"
-#include "usbh/dev/msd.h"
-#include "usbh/dev/hid.h"
-#include "usbh/dev/uvc.h"
+#include <string.h>
#if USBH_DEBUG_ENABLE_TRACE
#define udbgf(f, ...) usbDbgPrintf(f, ##__VA_ARGS__)
diff --git a/os/hal/src/usbh/hal_usbh_hid.c b/os/hal/src/usbh/hal_usbh_hid.c
index 4b20fd3..5b2823f 100644
--- a/os/hal/src/usbh/hal_usbh_hid.c
+++ b/os/hal/src/usbh/hal_usbh_hid.c
@@ -182,7 +182,8 @@ deinit:
}
static void _hid_unload(usbh_baseclassdriver_t *drv) {
- (void)drv;
+ USBHHIDDriver *const hidp = (USBHHIDDriver *)drv;
+
}
static void _in_cb(usbh_urb_t *urb) {
diff --git a/os/hal/src/usbh/hal_usbh_msd.c b/os/hal/src/usbh/hal_usbh_msd.c
index d631484..f212516 100644
--- a/os/hal/src/usbh/hal_usbh_msd.c
+++ b/os/hal/src/usbh/hal_usbh_msd.c
@@ -65,7 +65,20 @@ static void _lun_object_deinit(USBHMassStorageLUNDriver *lunp);
/* USB Class driver loader for MSD */
/*===========================================================================*/
-USBHMassStorageDriver USBHMSD[HAL_USBHMSD_MAX_INSTANCES];
+struct USBHMassStorageDriver {
+ /* inherited from abstract class driver */
+ _usbh_base_classdriver_data
+
+ usbh_ep_t epin;
+ usbh_ep_t epout;
+ uint8_t ifnum;
+ uint8_t max_lun;
+ uint32_t tag;
+
+ USBHMassStorageLUNDriver *luns;
+};
+
+static USBHMassStorageDriver USBHMSD[HAL_USBHMSD_MAX_INSTANCES];
static void _msd_init(void);
static usbh_baseclassdriver_t *_msd_load(usbh_device_t *dev, const uint8_t *descriptor, uint16_t rem);
@@ -184,7 +197,7 @@ alloc_ok:
MSBLKD[i].next = msdp->luns;
msdp->luns = &MSBLKD[i];
MSBLKD[i].msdp = msdp;
- MSBLKD[i].state = BLK_ACTIVE; /* transition directly to active, instead of BLK_STOP */
+ MSBLKD[i].state = BLK_ACTIVE;
luns--;
}
}
@@ -705,6 +718,7 @@ static void _lun_object_init(USBHMassStorageLUNDriver *lunp) {
*/
}
+/*
void usbhmsdLUNStart(USBHMassStorageLUNDriver *lunp) {
osalDbgCheck(lunp != NULL);
osalSysLock();
@@ -724,6 +738,7 @@ void usbhmsdLUNStop(USBHMassStorageLUNDriver *lunp) {
//lunp->state = BLK_STOP;
osalSysUnlock();
}
+*/
bool usbhmsdLUNConnect(USBHMassStorageLUNDriver *lunp) {
osalDbgCheck(lunp != NULL);