Commit Graph

70 Commits (05fc0f526319523e87ae9467b1cbc361fb755416)

Author SHA1 Message Date
Pharap b6aba2f985
Fix bug in templated attach function
The arguments passed to `Callback<void()>`'s constructor were the wrong way round,
thus preventing the `attach` function from being instantiated.
This patch corrects that by switching the order of the arguments.
2019-01-10 21:16:13 +00:00
jeromecoutant 408209989e TARGET_STM USB astyle 2018-06-27 15:01:23 +02:00
Cruz Monrreal baf563709a
Merge pull request #7090 from jorisa/usbserial-write-nonblocking
Add non-blocking write function for USBCDC
2018-06-14 10:20:26 -05:00
Russ Butler 96d3667f20 Fix USB on Kinetis devices
Set correct SYSMPU register for proper USB operation.  This bug was
introduced when the SYSMPU register names and defines were updated
in the commit:
"K64F: Updated the SYSMPU SDK driver"
93f8cfed05
2018-06-08 10:56:09 -05:00
Joris Aerts 1fb57a3d38 Add non-blocking write function for USBCDC 2018-06-01 18:04:04 +02:00
daid 62599a97f7 Add support for STEVAL-3DP001V1 board, which has an STM32F401VE chip. This support is based on the NUCLEO-F401RE board. Which has the same amount of flash/ram but less pins available on the chip. 2018-02-28 09:37:39 +01:00
Cruz Monrreal fe87499af8
Merge pull request #5874 from c1728p9/usb_fixes_and_improvements
USB fixes and improvements
2018-01-26 10:37:13 -06:00
Cruz Monrreal 6a708d1cf8
Merge pull request #5878 from c1728p9/lpc_usb_stability_fixes
LPC USB stability fixes
2018-01-22 10:25:13 -06:00
Russ Butler 6fe0aa0074 Fix LPC17XX and LPC40XX USB data throttling
Only clear the USB read buffer when endpointRead is called. This
allows data to be read with endpointReadResult without also allowing
USB to transfer more data. Instead additional data is transferred explicitly
with a call to endpointRead.
2018-01-17 21:50:20 -06:00
Russ Butler eda332cbf8 Fix LPC17XX and LPC40XX USB race condition
If a SETUP packet arrives shortly after an IN then the packets will be
processed in the wrong order - SETUP first then IN. This causes
the subsequent control transfer to fail. Fix this problem by processing
IN packets before processing SETUP packets.
2018-01-17 21:50:18 -06:00
Russ Butler 352ff8df14 Kinetis USB improvements and fixes
Make the following improvements and fixes:

1.
Update the Kinetis USB driver so that endpointReadResult only reads the
result of the last read and does not trigger a new read. Instead
move the code to trigger new reads into endpointRead.

2.
Fix the race condition in controlIn caused by a call to
EP0read() followed immediately by  EP0readStage(). This is done by
setting up to read the next setup packet (ignoring the status stage)
in endpointReadResult rather than in EP0readStage. This makes the
function EP0readStage unnecissary.

3.
Remove the Kinetis workaround in controlOut in USBDevice.cpp since
point 2 fixes this bug. For more info on this see the PR which
added this workaround - https://github.com/ARMmbed/mbed-os/pull/414
2018-01-17 20:58:16 -06:00
Russ Butler beaac1525e Fix clearing of ISTAT in Kinetis USB
The ISTAT register is write 1 to clear. Because of this ORing this
register with itself fill clear all bits that are set. This patch
updates the code to use plain assignment so only desired
bit is cleared.
2018-01-17 20:54:08 -06:00
Russ Butler 48cf4d85d1 Remove use of deprecated attach in USB
Attach callbacks with the assignment operator rather than with the
deprecated attach function. This fixes deprecation warnings.

This patch also adds the ability to attach a Callback directly.
2018-01-17 20:54:05 -06:00
Russ Butler 6decbedbb8 Fix local static initialization in USB
The local static initialization in USB was causing multiple problems:
-Configurable descriptor values are set only once
-USB descriptor initialization causes a trap in debug builds since
 this is acquiring a mutex in an interrupt handler
-Extra ram used since all descriptors  are in RAM

This patch fixes these problems by making fixed descriptors
static const so they are stored in flash and never need to be
initialized and by making descriptors that do change a member
of the class so they are always initialized when requested
rather than once though lazy static local initialization.
2018-01-17 20:53:57 -06:00
Adam Heinrich da81229186 NUCLEO_F413ZH: Add support for the NUCLEO-F413ZH board
Merged from the existing TARGET_DISCO_F413ZH code (which has the same MCU)
and TARGET_NUCLEO_F412ZG code (which has the same Nucleo-144 board and
pinout).
2017-12-29 15:30:10 +01:00
Martin Kojtal 02beec7ee3
Merge pull request #5567 from bcostm/dev_usbdevice_disco-f413zh
STM32: Add USB Device on DISCO_F413ZH
2017-12-12 17:32:03 +00:00
Steven Cooreman 5dd46136ad Remove usage from USB driver as well 2017-12-01 12:13:06 +01:00
Martin Kojtal 221b8a84b1
Merge pull request #5580 from bcostm/dev_usb_speed_disco-f746ng
DISCO_F746NG: add usp_speed configuration
2017-11-30 18:09:47 +00:00
Steven Cooreman 2becfbe2e4 Convert USB library from em_int to em_core 2017-11-25 13:03:40 +01:00
bcostm b1073c165f DISCO_F746NG: add usp_speed config 2017-11-24 16:52:59 +01:00
bcostm ada482a4c3 STM32: Add USB Device on DISCO_F413ZH 2017-11-23 11:11:58 +01:00
bcostm dc9eab795e STM32 USBDevice: Add DISCO_F429ZI 2017-11-17 13:10:52 +01:00
bcostm 8f4b6e241d STM32 USBDevice: Add DISCO_F407VG target 2017-09-05 14:08:52 +02:00
bcostm 9e3b509a99 STM32 USBDevice: Add NUCLEO_F446RE target 2017-09-05 14:08:52 +02:00
bcostm 1d72b3124d STM32 USBDevice: Remove disco-f429zi, clean-up nucleo-f103rb 2017-09-05 13:24:32 +02:00
bcostm 211d2011eb STM32 USBDevice: add more supported targets 2017-09-05 13:24:32 +02:00
bcostm 58c9f4b9bd STM32 USBDevice: refactor files 2017-09-05 13:24:32 +02:00
ccli8 478a1b62ea [NUC472/M453] Support USB device/host for chip series
With this fix, USB support is not limited to one target.
2017-08-22 09:30:23 +08:00
ccli8 cacc444b73 [M487] Support USB device/host 2017-08-22 09:27:31 +08:00
jeromecoutant bdd4f18acb ST USB config files 2017-07-11 16:29:44 +02:00
Mihail Stoyanov 717150cdf2 Reorganize vendor specific code into targets folders, following the mbed-os/targets/ design pattern 2017-06-27 14:20:36 -05:00
Jimmy Brisson 453d9ee96c Deduplicate USBHAL_STM_TARGET.h 2017-06-26 14:55:29 -05:00
Jimmy Brisson d103979e92 Merge pull request #4572 from bcostm/add_usb_disco_l072cz
DISCO_L072CZ_LRWAN1: Add support of USB Device
2017-06-26 10:28:31 -05:00
Jimmy Brisson 1dfc2296a7 Merge pull request #4400 from jeromecoutant/PR_USB_REORG
STM32 USBDevice files
2017-06-26 10:21:19 -05:00
bcostm cc47104059 DISCO_L072CZ_LRWAN1: Remove unused code 2017-06-20 16:12:32 +02:00
bcostm 24d94c8425 DISCO_L072CZ_LRWAN1: Add USB device configuration files 2017-06-20 16:07:07 +02:00
bcostm f6a48838ad DISCO_L475VG_IOT01A: Move USB device config files 2017-06-12 17:03:12 +02:00
Mahadevan Mahesh 30ef311933 Issue#4250: Fix USB driver for Kinetis devices
Move memory allocation to be done at a different location. Currently allocated
in a function that is called from the interrupt handler.

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-06-02 16:36:23 -05:00
jeromecoutant 2c610b392e Move STM32 USB device cpp file with other cpp files 2017-05-29 12:08:51 +02:00
jeromecoutant ba073da70a STM32 USBDevice : simplify include files
NB: there is now a default configuration
2017-05-29 12:08:48 +02:00
Michel Jaouen f27f3bbfee USBHOST: fix build for TARGET_STM 2017-05-10 09:33:29 +02:00
Mihail Stoyanov 301ce550c9 Fixed STM32 USB Device support by migrating all specific target headers to unsupported features where they belong until USB support is officially introduced in mbed OS 5 2017-04-28 17:23:07 +01:00
Jimmy Brisson 143e3462a3 Merge pull request #4210 from adbridge/usb_logo
USB: Added support for the logo key to the keyboard
2017-04-24 10:56:29 -05:00
adbridge d23520ebb2 Maxim USB library update
Adding support for new platforms into official USB library
2017-04-21 17:06:46 +01:00
adbridge 906286f446 Added support for the logo key to the keyboard
Minor change - List of key modifiers updated to include the
logo/GUI/windows key. Also added the options to specify the right hand
versions of the keys rather than just the left if for some reason
someone wants to do this.

Changes are limited to the keyboard header file and are backwards
compatible.

The new modifier values are in line with the table given on page 56 of
this document http://www.usb.org/developers/hidpage/HID1_11.pdf
2017-04-21 16:56:56 +01:00
Anna Bridge 2e2fe377b3 bus reset for KL25Z fix, USBSerial update
1. added call to busReset() to KL25Z HAL; now the USB stack survives if you disconnect the cable, similar to LPC40 2. busReset callback to update terminal_connected in USBCDC 3. new bool USBSerial::connected() to read protected terminal_connected property, useful when you want to check if the terminal is ready from main app
2017-04-19 15:38:51 +01:00
bcostm bca2617662 STM32L0: add family in USBEndpoints.h 2017-03-30 14:50:13 +02:00
Michel Jaouen 5913cf309e USBAudio: writesync with 1 sample jitter capability. 2017-03-28 10:22:20 +02:00
Michel Jaouen 873cacfc73 Revert "Revert "Target stm usb config""
This reverts commit ec329be6f2.
2017-03-14 15:57:28 +01:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00