forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert mbed-usb target, enable mbed-usb tests (ARMmbed#49)
* Convert mbed-usb target, enable mbed-usb tests * Fix ByteBuffer compile error * Add missing requirements, fix some pyserial issues * Move CDC_ECM to its own target since it needs RTOS
- Loading branch information
1 parent
f317dbc
commit 7cd7e60
Showing
21 changed files
with
157 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,4 @@ target_sources(mbed-core-sources | |
source/Watchdog.cpp | ||
) | ||
|
||
add_subdirectory(usb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(usb_device) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_subdirectory(basic) | ||
add_subdirectory(hid) | ||
add_subdirectory(msd) | ||
add_subdirectory(serial) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2022 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT "DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "USB Device is not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
mbed-usb-device-basic | ||
TEST_SOURCES | ||
main.cpp | ||
USBEndpointTester.cpp | ||
USBTester.cpp | ||
HOST_TESTS_DIR | ||
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests" | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
TEST_REQUIRED_LIBS | ||
mbed-usb | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2022 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT "DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "USB Device is not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
mbed-usb-device-hid | ||
TEST_SOURCES | ||
main.cpp | ||
HOST_TESTS_DIR | ||
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests" | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
TEST_REQUIRED_LIBS | ||
mbed-usb | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) 2022 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT "DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "USB Device is not supported for this target") | ||
endif() | ||
|
||
if(MBED_GREENTEA_TEST_BAREMETAL) | ||
set(TEST_SKIPPED "USB MSD test is not compatible with mbed-baremetal") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
mbed-usb-device-msd | ||
TEST_SOURCES | ||
main.cpp | ||
HOST_TESTS_DIR | ||
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests" | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
TEST_REQUIRED_LIBS | ||
mbed-usb-msd | ||
mbed-storage-fat | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2022 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT "DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "USB Device is not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
mbed-usb-device-serial | ||
TEST_SOURCES | ||
main.cpp | ||
HOST_TESTS_DIR | ||
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests" | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
TEST_REQUIRED_LIBS | ||
mbed-usb | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters