File tree Expand file tree Collapse file tree 7 files changed +36
-8
lines changed Expand file tree Collapse file tree 7 files changed +36
-8
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,9 @@ No setup method has been verified for this platform.
68
68
69
69
# # Running tests
70
70
1. Plug both USB interfaces (* DAPLink* and * USB device* ) to your host machine.
71
- 1. Run tests:
71
+ 1. An addtional macro ` USB_DEVICE_TESTS ` is needed to be defined when runing tests:
72
72
` ` `
73
- mbed test -t <toolchain> -m <target> -n tests-usb_device-*
73
+ mbed test -t <toolchain> -m <target> -DUSB_DEVICE_TESTS - n tests-usb_device-*
74
74
` ` `
75
75
76
76
# # Known issues
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2018-2018 , ARM Limited, All Rights Reserved
2
+ * Copyright (c) 2018-2020 , ARM Limited, All Rights Reserved
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License"); you may
15
15
* limitations under the License.
16
16
*/
17
17
18
+ #if USB_DEVICE_TESTS
19
+
18
20
#if defined(MBED_CONF_RTOS_PRESENT)
19
21
20
22
#include " stdint.h"
@@ -863,3 +865,4 @@ void USBEndpointTester::start_ep_in_abort_test()
863
865
write_start (_endpoints[EP_INT_IN], _endpoint_buffs[EP_INT_IN], (*_endpoint_configs)[EP_INT_IN].max_packet );
864
866
}
865
867
#endif
868
+ #endif // USB_DEVICE_TESTS
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2018-2018 , ARM Limited, All Rights Reserved
2
+ * Copyright (c) 2018-2020 , ARM Limited, All Rights Reserved
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License"); you may
15
15
* limitations under the License.
16
16
*/
17
17
18
+ #if USB_DEVICE_TESTS
19
+
18
20
#if defined(MBED_CONF_RTOS_PRESENT)
19
21
20
22
#include " stdint.h"
@@ -705,3 +707,4 @@ void USBTester::epbulk_out_callback()
705
707
read_start (bulk_out, bulk_buf, sizeof (bulk_buf));
706
708
}
707
709
#endif
710
+ #endif // USB_DEVICE_TESTS
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2018-2018 , ARM Limited, All Rights Reserved
2
+ * Copyright (c) 2018-2020 , ARM Limited, All Rights Reserved
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License"); you may
15
15
* limitations under the License.
16
16
*/
17
17
18
+ #if !USB_DEVICE_TESTS
19
+ #error [NOT_SUPPORTED] usb device tests not enabled
20
+ #else
21
+
18
22
#if !defined(MBED_CONF_RTOS_PRESENT)
19
23
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
20
24
#else
@@ -666,3 +670,4 @@ int main()
666
670
667
671
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
668
672
#endif // !defined(MBED_CONF_RTOS_PRESENT)
673
+ #endif // !defined(USB_DEVICE_TESTS)
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2018-2019 , ARM Limited, All Rights Reserved
2
+ * Copyright (c) 2018-2020 , ARM Limited, All Rights Reserved
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License"); you may
14
14
* See the License for the specific language governing permissions and
15
15
* limitations under the License.
16
16
*/
17
+
18
+ #if !USB_DEVICE_TESTS
19
+ #error [NOT_SUPPORTED] usb device tests not enabled
20
+ #else
21
+
17
22
#if !defined(MBED_CONF_RTOS_PRESENT)
18
23
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
19
24
#else
@@ -389,3 +394,4 @@ int main()
389
394
390
395
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
391
396
#endif // !defined(MBED_CONF_RTOS_PRESENT)
397
+ #endif // !defined(USB_DEVICE_TESTS)
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2019, Arm Limited and affiliates.
2
+ * Copyright (c) 2019-2020 , Arm Limited and affiliates.
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License");
15
15
* limitations under the License.
16
16
*/
17
17
18
+ #if !USB_DEVICE_TESTS
19
+ #error [NOT_SUPPORTED] usb device tests not enabled
20
+ #else
21
+
18
22
#if !defined(MBED_CONF_RTOS_PRESENT)
19
23
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
20
24
#else
@@ -488,3 +492,4 @@ int main()
488
492
489
493
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
490
494
#endif // !defined(MBED_CONF_RTOS_PRESENT)
495
+ #endif // !defined(USB_DEVICE_TESTS)
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2018-2019 , ARM Limited, All Rights Reserved
2
+ * Copyright (c) 2018-2020 , ARM Limited, All Rights Reserved
3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License"); you may
14
14
* See the License for the specific language governing permissions and
15
15
* limitations under the License.
16
16
*/
17
+
18
+ #if !USB_DEVICE_TESTS
19
+ #error [NOT_SUPPORTED] usb device tests not enabled
20
+ #else
21
+
17
22
#if !defined(MBED_CONF_RTOS_PRESENT)
18
23
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
19
24
#else
@@ -853,3 +858,4 @@ int main()
853
858
854
859
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
855
860
#endif // !defined(MBED_CONF_RTOS_PRESENT)
861
+ #endif // !defined(USB_DEVICE_TESTS)
You can’t perform that action at this time.
0 commit comments