Russ Butler
72cc182aa4
Limit USB control transfer size
...
Limit the size of control reads to the max packet size of endpoint
zero. This fixes the handling of large transfers.
2019-01-29 12:27:23 -06:00
Russ Butler
c443a259dc
Correct Kinetis 256 byte ctrl transfers
...
Correctly handle control transfers which are a multiple of 256 bytes
by checking for a non-zero value in the upper byte of size.
2019-01-29 12:27:23 -06:00
Russ Butler
0f2b808c88
Fix Kinetis endpoint initialization
...
Fully setup endpoint before enabling it in endpoint_add. This prevents
undefined behavior due to previous configuration.
2019-01-29 12:27:23 -06:00
Russ Butler
58f49940e8
Remove the USB directory from mbed 2 travis
...
Don't include the USB directory when testing mbed 2 on travis.
2019-01-29 12:27:23 -06:00
Russ Butler
58f9b02517
Update USBCDC and USBSerial
...
Update the USBCDC and USBSerial classes to the new API. This patch also
updates the blocking behavior to unblock at the appropriate times and
to let the processor sleep when blocking rather than busy waiting.
2019-01-29 12:27:23 -06:00
Russ Butler
a6c249b223
Add USB utility classes
...
Add an allocation free linked list implementation. Additionally add
the class AsyncOp which provides blocking and wakeup funcionality
to simplify making asynchronous operations block.
2019-01-29 12:27:22 -06:00
Russ Butler
cf6cbfec00
Update USBPhy doxygen
...
Update USBPhy doxygen to pull in handbook copyedits. Also update the
docs to reflect the enhanced USBPhy API.
2019-01-29 12:27:22 -06:00
Russ Butler
392ceae16d
Update the Kinetis USB driver to the new API
...
Update this driver to match the new zero-copy API.
2019-01-29 12:27:22 -06:00
Russ Butler
f30ecb77a3
Update the LPC17XX driver to the new API
...
Update this driver to match the new zero-copy API.
2019-01-29 12:27:22 -06:00
Russ Butler
9b09f43f04
Update USBTester for the new USB API
...
Update the class USBTester so it works with the new zero-copy
USBDevice API.
2019-01-29 12:27:22 -06:00
Russ Butler
b8995e8c29
Add abort API to USBDevice
...
Add the function endpoint_abort and ensure ongoing transfer are
aborted when an endpoint is removed.
2019-01-29 12:27:22 -06:00
Russ Butler
3c42cd7bd1
Update USBDevice to reflect the updated USBPhy
...
Update USBDevice so the USB buffers are user supplied.
2019-01-29 12:27:22 -06:00
Russ Butler
6b3d46893b
Update USBPhy to allow zero copy transfers
...
Update the USBPhy to allow for zero copy USB transfers on devices
which support it. This also aligns more closely with the CMSIS USB
driver model.
2019-01-29 12:27:22 -06:00
Russ Butler
bf2dd81784
Call disconnect when uninitializing USB
...
Disconnect USB when uninitializing USB so it is in a well defined
state.
2019-01-29 12:27:22 -06:00
Russ Butler
cb3c9d5ed7
Explicitly return when endpoint 0 is stalled
...
Stalling endpoint 0 indicates the end of a control transfer.
Return immediately when this occurs rather than continuing processing.
In particular, this patch prevents status from erroneously being
sent when _request_setup returns false inside _complete_request.
2019-01-29 12:27:22 -06:00
Russ Butler
38ab9b502f
Allow transfer to start when configuring USB
...
Allow reads and writes to be started when entering the configured
state.
2019-01-29 12:27:22 -06:00
Russ Butler
3dd9b7a8dc
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-01-29 12:27:21 -06:00
Russ Butler
1730b497c9
Update stall state on set and clear feature
...
Call USBDevice::endpoint_stall/unstall in the request to set/clear
halt so the endpoint state is properly updated in the array
_endpoint_info.
2019-01-29 12:27:21 -06:00
Russ Butler
22f1dbe14c
Fix USB init problems
...
Initialize the _transfer structure so the behavior is the same
regardless of prior memory contents. This fixes a hang during
USB testing when CI flags are used.
2019-01-29 12:27:21 -06:00
Russ Butler
2c202ac224
Update USBTester for simplified read handling
...
Remove read_start and replace read_finish with read to match the new
USBDevice API.
2019-01-29 12:27:21 -06:00
Russ Butler
679ca0dc0a
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-01-29 12:27:21 -06:00
Russ Butler
a8ac294f34
Add and assert USB callback completion
...
Assert that when a callback is completed it is the active callback.
2019-01-29 12:27:21 -06:00
Russ Butler
91d1707b3d
Update Kinetis USB to match the USBPhy API
...
Copy the Kinetis USB driver files from
mbed-os\features\unsupported\USBDevice\targets\TARGET_Freescale
and update them to match the new USBPhy API.
2019-01-29 12:27:21 -06:00
Russ Butler
d3195af1d2
Add Kinetis USB files
2019-01-29 12:27:21 -06:00
Russ Butler
411fae0bea
Remove mbed 2 USB tests from Travis
...
Remove the mbed 2 USB tests since USB support will be part of mbed 5.
2019-01-29 12:27:21 -06:00
Russ Butler
d5f0d1a304
Add USBPhy for the LPC17xx
...
Move the LPC17xx USB driver files from
mbed-os\features\unsupported\USBDevice\targets\TARGET_NXP
and update them to match the new USBPhy API.
2019-01-29 12:27:21 -06:00
Russ Butler
a9dccd4c94
Add USBDevice test code
...
Add a USB test and the class USBTester.cpp to go along with it.
2019-01-29 12:27:21 -06:00
Russ Butler
c855577662
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-01-29 12:27:20 -06:00
Russ Butler
14b0c313ed
Update USB licenses and format code
...
Update USB licenses from MIT to Apache 2 and run astyle on the code.
2019-01-29 12:27:20 -06:00
Russ Butler
61a575af23
Copy USBDevice from unsupported
...
Copy the USBDevice code out of unsupported and into a top level USB
folder in preparation for development.
squash
2019-01-29 12:27:20 -06:00
Russ Butler
913c2e8502
Add USBPhy, USB HAL and Utility class
...
Add the USBPhy and USBPhyEvents abstract classes, the HAL header using
this class and the EndpointResolver utility class.
2019-01-29 12:27:20 -06:00
Martin Kojtal
d1b367fbab
Merge pull request #9483 from mprse/ticker_sleep_lock_fix
...
Fix for Issue #7308 (Deep_sleep_lock Ticker.h Issue)
2019-01-29 09:27:12 +01:00
Cruz Monrreal
e965aa6640
Merge pull request #9509 from vmedcy/psoc6-daplink-hex
...
PSOC6.py: generate hex files with 16 bytes per row
2019-01-28 10:38:15 -06:00
Cruz Monrreal
66cda8a8fe
Merge pull request #9499 from bridadan/remove_yotta_modules
...
Remove unused yotta module metadata
2019-01-28 10:37:30 -06:00
Cruz Monrreal
545d229ab1
Merge pull request #9497 from ARMmbed/AnotherButler-patch-2
...
Remove yotta from README.md
2019-01-28 10:36:36 -06:00
Cruz Monrreal
953acef94c
Merge pull request #9482 from maciejbocianski/arch_pro_spi_pins
...
ARCH_PRO: add missing SPI pin definitions
2019-01-28 10:34:37 -06:00
Cruz Monrreal
f5730a91b2
Merge pull request #9474 from VeijoPesonen/fix-newlines_at_end-of-files
...
Fix newlines at end of files
2019-01-28 10:33:37 -06:00
Cruz Monrreal
7f8ebc75cd
Merge pull request #9466 from vmedcy/psoc6-target-hook
...
Improve PSoC 6 post-build hooks, whitelist makefile export
2019-01-28 10:33:12 -06:00
Cruz Monrreal
b49d949b50
Merge pull request #9393 from pan-/fix-safe-enum-type-safety
...
BLE: Fix SafeEnum type safety
2019-01-28 10:31:52 -06:00
Martin Kojtal
0bc9bcc0ed
Merge pull request #9498 from ARMmbed/AnotherButler-patch-3
...
Remove outdated text and fix spelling in README.md
2019-01-28 11:05:15 +01:00
Martin Kojtal
489e52e428
Merge pull request #9410 from jeromecoutant/PR_F756_L486
...
STM32F756 and STM32L486 alignment with STM32F746 and STM32L476
2019-01-28 10:22:48 +01:00
Martin Kojtal
e3cf2e4adc
Merge pull request #9500 from janjongboom/patch-4
...
TCPSocket.cpp setting socket should terminate with semicolon
2019-01-28 10:21:52 +01:00
Volodymyr Medvid
5c384f10e7
PSOC6.py: generate hex files with 16 bytes per row
...
DAPLink implementation on Cypress kits cannot handle hex files
with 64 bytes per row: refer to https://github.com/ARMmbed/DAPLink ,
source/daplink/drag-n-drop/intelhex.c, hex_line_t struct, data field.
2019-01-25 10:07:00 -08:00
Amanda Butler
36438a1d70
Remove outdated content from README.md
...
Remove requested outdated content, and update TOC to reflect changes.
2019-01-25 09:57:19 -06:00
Martin Kojtal
daefce6bf4
Merge pull request #9492 from cmonr/travisCI-fix-license_check
...
Travis CI: Fix for license check job
2019-01-25 12:33:21 +01:00
Cruz Monrreal
eb26d82ca9
Merge pull request #9223 from kfnta/future_sequana_psa_binnaries_importer
...
Update PSA binaries importer for FUTURE_SEQUANA_PSA
2019-01-24 17:02:44 -06:00
Cruz Monrreal II
e28bf5ae11
Replaced '|' with '>' (affects how newlines are parsed)
2019-01-24 16:56:05 -06:00
Jan Jongboom
ca987568d8
TCPSocket.cpp setting socket should terminate with semicolon
2019-01-24 14:25:34 -08:00
Cruz Monrreal
615ed31f7a
Merge pull request #9488 from 0xc0170/fix_licenses
...
Fix licenses in travis test and realtek lib
2019-01-24 16:16:38 -06:00
Cruz Monrreal II
50a99a0572
Updated license_check to work a bit better across line boundries.
...
Swapped out 'git grep' for 'grep' since it can take in a --max-count flag.
The license _header_ will always be at the top.
Also enabled output so that PR authors can know what the problem files are.
2019-01-24 16:14:50 -06:00