mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13869 from evedon/cleanup-usb-drivers
Create a USB drivers librarypull/13918/head
commit
c6094f7b36
|
@ -284,7 +284,7 @@ matrix:
|
|||
# Check that example compiles without rtos
|
||||
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp
|
||||
- |
|
||||
rm -r cmsis/CMSIS_5/CMSIS/RTOS2 cmsis/device/rtos drivers/source/usb connectivity/cellular connectivity/drivers/cellular \
|
||||
rm -r cmsis/CMSIS_5/CMSIS/RTOS2 cmsis/device/rtos drivers/usb connectivity/cellular connectivity/drivers/cellular \
|
||||
connectivity/libraries/ppp connectivity/netsocket connectivity/nanostack connectivity/lwipstack features/frameworks/greentea-client \
|
||||
features/frameworks/utest features/frameworks/unity BUILD
|
||||
- python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0
|
||||
|
|
|
@ -114,7 +114,7 @@ add_subdirectory(events EXCLUDE_FROM_ALL)
|
|||
add_subdirectory(connectivity EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(storage EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(drivers/device_key EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(drivers/source/usb EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(drivers/usb EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(features EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(platform/FEATURE_EXPERIMENTAL_API EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(cmsis/CMSIS_5/CMSIS/RTOS2 EXCLUDE_FROM_ALL)
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_library(mbed-usb INTERFACE)
|
||||
|
||||
target_include_directories(mbed-usb
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-usb
|
||||
INTERFACE
|
||||
AsyncOp.cpp
|
||||
ByteBuffer.cpp
|
||||
EndpointResolver.cpp
|
||||
LinkedListBase.cpp
|
||||
OperationListBase.cpp
|
||||
PolledQueue.cpp
|
||||
TaskBase.cpp
|
||||
USBAudio.cpp
|
||||
USBCDC.cpp
|
||||
USBCDC_ECM.cpp
|
||||
USBDevice.cpp
|
||||
USBHID.cpp
|
||||
USBKeyboard.cpp
|
||||
USBMIDI.cpp
|
||||
USBMSD.cpp
|
||||
USBMouse.cpp
|
||||
USBMouseKeyboard.cpp
|
||||
USBSerial.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-usb INTERFACE mbed-storage)
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_library(mbed-usb INTERFACE)
|
||||
|
||||
target_include_directories(mbed-usb
|
||||
INTERFACE
|
||||
include
|
||||
include/usb
|
||||
)
|
||||
|
||||
target_sources(mbed-usb
|
||||
INTERFACE
|
||||
source/AsyncOp.cpp
|
||||
source/ByteBuffer.cpp
|
||||
source/EndpointResolver.cpp
|
||||
source/LinkedListBase.cpp
|
||||
source/OperationListBase.cpp
|
||||
source/PolledQueue.cpp
|
||||
source/TaskBase.cpp
|
||||
source/USBAudio.cpp
|
||||
source/USBCDC.cpp
|
||||
source/USBCDC_ECM.cpp
|
||||
source/USBDevice.cpp
|
||||
source/USBHID.cpp
|
||||
source/USBKeyboard.cpp
|
||||
source/USBMIDI.cpp
|
||||
source/USBMSD.cpp
|
||||
source/USBMouse.cpp
|
||||
source/USBMouseKeyboard.cpp
|
||||
source/USBSerial.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(mbed-usb INTERFACE mbed-storage)
|
|
@ -22,8 +22,8 @@
|
|||
#include "USBDescriptor.h"
|
||||
#include "USBDevice_Types.h"
|
||||
#include "platform/Callback.h"
|
||||
#include "drivers/internal/PolledQueue.h"
|
||||
#include "drivers/internal/Task.h"
|
||||
#include "usb/internal/PolledQueue.h"
|
||||
#include "usb/internal/Task.h"
|
||||
#include "BlockDevice.h"
|
||||
#include "Mutex.h"
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef MBED_OPERATION_LIST_BASE_H
|
||||
#define MBED_OPERATION_LIST_BASE_H
|
||||
|
||||
#include "drivers/internal/LinkedListBase.h"
|
||||
#include "usb/internal/LinkedListBase.h"
|
||||
|
||||
class AsyncOp;
|
||||
|
|
@ -18,9 +18,10 @@
|
|||
#ifndef POLLED_QUEUE_H
|
||||
#define POLLED_QUEUE_H
|
||||
|
||||
#include "drivers/internal/TaskQueue.h"
|
||||
#include "usb/internal/TaskQueue.h"
|
||||
#include "platform/Callback.h"
|
||||
#include "LinkedList.h"
|
||||
|
||||
namespace events {
|
||||
/**
|
||||
* \defgroup drivers_PolledQueue PolledQueue class
|
|
@ -19,7 +19,7 @@
|
|||
#define MBED_TASK_H
|
||||
|
||||
#include "events/EventQueue.h"
|
||||
#include "drivers/internal/TaskBase.h"
|
||||
#include "usb/internal/TaskBase.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
#include "platform/Callback.h"
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef TASK_QUEUE_H
|
||||
#define TASK_QUEUE_H
|
||||
|
||||
#include "drivers/internal/TaskBase.h"
|
||||
#include "usb/internal/TaskBase.h"
|
||||
#include "platform/Callback.h"
|
||||
#include "mbed_critical.h"
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "drivers/internal/PolledQueue.h"
|
||||
#include "usb/internal/PolledQueue.h"
|
||||
|
||||
#include "events/mbed_events.h"
|
||||
#include "platform/Callback.h"
|
|
@ -15,8 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "drivers/internal/TaskBase.h"
|
||||
#include "drivers/internal/TaskQueue.h"
|
||||
#include "usb/internal/TaskBase.h"
|
||||
#include "usb/internal/TaskQueue.h"
|
||||
#include "events/mbed_events.h"
|
||||
#include "rtos/Semaphore.h"
|
||||
#include "platform/mbed_critical.h"
|
|
@ -185,7 +185,7 @@ class MSDUtils(object):
|
|||
return False
|
||||
|
||||
@staticmethod
|
||||
def _disk_path_windows(serial):
|
||||
def _disk_path_windows(serial):
|
||||
c = wmi.WMI()
|
||||
for physical_disk in c.Win32_DiskDrive():
|
||||
if serial == physical_disk.SerialNumber:
|
|
@ -163,4 +163,3 @@ You may want to connect the device directly to the host machine with no hubs on
|
|||
[LN-linux_xhci_patch]: https://github.com/torvalds/linux/commit/f5249461b504d35aa1a40140983b7ec415807d9e
|
||||
[LN-xhci_lkml_discussion]: https://lkml.org/lkml/2016/12/15/388
|
||||
[LN-xhci_setpci]: https://linuxmusicians.com/viewtopic.php?t=16901
|
||||
|
Loading…
Reference in New Issue