The contents of the usb directory were moved to appropriate locations and the usb directory removed.
* Public USB headers moved under drivers/
* Internal USB headers moved under drivers/internal/
* USB Source code moved under drivers/source/usb/
* Moved usb/device/hal/ under hal/usb/
* Moved usb/device/USBPhy/ under hal/usb/
* Merged usb/device/targets/ into targets/
* Separated public and private USB API documentation under Doxygen groups drivers-public-api and drivers-internal-api.
This test case uses `hidapi` -- a cross-platform Python module.
To keep the initial Mbed setup as simple as possible, the `hidapi`
module is skipped on Linux hosts because of its external dependancies
for this platform.
The module can be easily installed following instructions from the
README file.
The test case is skipped if the host machine lacks `hidapi` module.
Wait for the host driver to finish setup before sending any HID reports
from the device.
USBHID::wait_ready() blocks until the device reaches 'configured' state,
but the state of the host HID driver remains unknown to the device.
To successfully use pyusb on Windows hosts, a Zadig configuration has to
be performed. Since config for basic tests has already been provided,
use it again.
A DTR line is used to signal that the host has configured a terminal and
is ready to transmit and receive data from the USB CDC/Serial device.
When this test suite is run with the use of a Linux host, a workaround has
to be used to overcome some platform specific DTR line behavior.
Every time the serial port file descriptor is opened, the DTR line is
asserted until the terminal attributes are set.
As a consequence, the device receives a premature DTR signal with a
duration of 200-500 us before the correct, long-lasting DTR signal set by
the host-side test script. (tested on the Linux kernel 4.15.0)
The solution is to wait for the first DTR spike, ignore it, and wait for
the correct DTR signal again.
Despite having ECHO and ECHOCTL POSIX lflags disabled by default by
pyserial, a delay is needed for host to properly handle data received
from USB serial/CDC device.
With no delay host would echo 0x00-0x31 characters prefixed with '^'.
Although the USB spec sets the upper limit on FS isochronous endpoint
payloads to 1023 B, this value is hard to test in practice. Moreover,
not all the targets Mbed OS supports (like NUCLEO_F207ZG) are able to
handle all the endpoints set to max.
Fix the host script issues present on Windows machines.
Add 0 B payload size to bulk endpoints test.
Update halt and abort tests according to PR comments.
Add an explicit request to start reading on OUT endpoints.
Remove the endpoint parameter from endpoint callbacks. This
information is redundant because endpoints are known at
construction time because they must be in the configuration
descriptor.
Fix the following warnings:
-[Warning] USBTester.cpp@45,0: #1299-D: members and base-classes will
be initialized in declaration order, not in member initialisation
list order
-[Warning] USBTester.h@41,0: #1300-D: ~USBTester inherits implicit
virtual
-[Warning] USBAudio.cpp@345,0: #1035-D: single-precision operand
implicitly converted to double-precision
-[Warning] USBHID.cpp@29,0: #1300-D: ~AsyncSend inherits implicit
virtual
-[Warning] USBHID.cpp@61,0: #1300-D: ~AsyncRead inherits implicit
virtual
-[Warning] USBHID.cpp@93,0: #1300-D: ~AsyncWait inherits implicit
virtual
-[Warning] EndpointResolver.cpp@125,26: '<<' in boolean context, did
you mean '<' ? [-Wint-in-bool-context]