Russ Butler
09c1d2cf1e
Add abort API to USBDevice
...
Add the function endpoint_abort and ensure ongoing transfer are
aborted when an endpoint is removed.
2019-02-22 10:52:34 -06:00
Russ Butler
544282d934
Update USBDevice to reflect the updated USBPhy
...
Update USBDevice so the USB buffers are user supplied.
2019-02-22 10:52:34 -06:00
Russ Butler
4c398a308f
Call disconnect when uninitializing USB
...
Disconnect USB when uninitializing USB so it is in a well defined
state.
2019-02-22 10:52:33 -06:00
Russ Butler
7c96e22fa7
Move USBDevice processing out of user callbacks
...
Perform processing triggered by user callbacks when USB is being
unlocked rather than synchronously. This prevents recursive callbacks
which reduces stack usage. This also prevents state change inside
the user callback which makes the code easier to reason about.
2019-02-22 10:52:33 -06:00
Russ Butler
3168a92231
Change USBDevice read handling
...
Remove the USBDevice function read_start and automatically start all
reads internally in USBDevice. This patch also renames the function
read_finish to read.
2019-02-22 10:52:33 -06:00
Russ Butler
57ca5bc335
Add and assert USB callback completion
...
Assert that when a callback is completed it is the active callback.
2019-02-22 10:52:33 -06:00
Russ Butler
caace4ac61
Update USBDevice and configure to use a USBPhy
...
Update the USBDevice class API so it matches mbed-os's naming
conventions, has a more robust API and uses USBPhy as its backend.
2019-02-22 10:52:32 -06:00
Russ Butler
f7cb2cd280
Update USB licenses and format code
...
Update USB licenses from MIT to Apache 2 and run astyle on the code.
2019-02-22 10:52:32 -06:00
Russ Butler
a4b6cfe90a
Copy USBDevice from unsupported
...
Copy the USBDevice code out of unsupported and into a top level USB
folder in preparation for development.
squash
2019-02-22 10:52:32 -06:00