Commit graph

109 commits

Author SHA1 Message Date
dean
c7ed745518 DM: add copyrights 2018-05-09 16:25:49 -04:00
dean
d27f766c8d update usb stuff 2018-03-20 11:43:31 -04:00
dean
6ead93c424 DM: some usb host fixes (still not working) 2017-10-24 15:26:52 -04:00
dean
7bae00e11e DM: updates for rev B 2017-10-17 15:48:37 -04:00
dean
ce608f2037 DM: added support for samd51J20A 2017-08-01 17:56:30 -04:00
dean
5c7e00eb2d DM: mostly fixed usb enumeration delay 2017-07-25 15:45:48 -04:00
dean
7e76b3c452 DM: clocked to 120MHZ, peripherals to 100, USB to 48 2017-07-11 18:39:24 -04:00
dean
37b9881cbe DM: added samd51 support 2017-06-30 17:24:28 -04:00
ladyada
10a9c83c3d Merge remote-tracking branch 'upstream/master'
Conflicts:
	boards.txt
	platform.txt
2017-04-21 14:17:17 -04:00
Martino Facchin
b9ac48c782 Implement low power functionality on USB subsystem
This enables remote wakeup on CDC driver, so we can safely call standby() and maintain the Serial prints on resume.
2017-04-04 10:50:22 +02:00
ladyada
af9e214f6b Merge remote-tracking branch 'upstream/master'
Conflicts:
	README.md
	boards.txt
	cores/arduino/USB/USBCore.cpp
	platform.txt
	variants/arduino_zero/variant.cpp
2017-01-15 17:17:21 -05:00
Cristian Maglie
428433f963 Merge branch 'bootloader-cmsis-fix' 2016-12-20 16:59:12 +01:00
Sandeep Mistry
80f629c379 Correct epBank1EnableTransferComplete 2016-12-19 16:30:52 -05:00
Martino Facchin
86ae860677 Enlarge USB serialNumber buffer 2016-12-15 18:34:05 +01:00
Sandeep Mistry
38683e36b6 Changes required for new CMSIS package upgrade
Fixes some compile errors and warnings
2016-12-02 10:48:52 -05:00
Cristian Maglie
b06501baee Fix regression: SerialUSB.available() do not return correct values
Fix #172
2016-10-10 12:43:14 +02:00
Sandeep Mistry
b2462a5a1a Remove line state check in Serial_::write
It’s no longer needed with the timeout mechanism in USBCore.
2016-08-31 11:21:40 -04:00
Sandeep Mistry
8f7873cea5 Add comment on inspiration 2016-08-31 11:21:40 -04:00
Sandeep Mistry
8afe969ed2 Make transmit timeout per endpoint 2016-08-31 11:21:40 -04:00
Sandeep Mistry
b627e00b17 Add USB send timeout
Timeout is checked on the next send attempt. Initial timeout is set to
70ms, after a time out occurs and the previous transfer is still not
complete a send will report as failed. If a send times out, a ZLP will
be in the send queue to check for future timeouts.
2016-08-31 11:21:40 -04:00
Cristian Maglie
5dd2adc41d USBD: Rewritten RX/TX LED conditions in a slighlty more clear way 2016-08-29 17:06:56 +02:00
Cristian Maglie
0605c11e76 USBD: RX LED now blinks again (fixed regression) 2016-08-29 17:05:16 +02:00
Cristian Maglie
4691ef4ba0 USB: Added optimized Stream::readBytes for EP OUT handler
This bypass the generic (but inefficient) implementation of Stream::readBytes
and uses an optimized version of readBytes than can do efficient multi-byte reads.
2016-08-24 12:50:37 +02:00
Cristian Maglie
3127d1dc51 USB-CDC: Increased buffer size to 256 bytes
This change improves read performance when massive data is sent
via USB by exploiting the hardware capability to handle multi-packet
transfers autonomously.
2016-08-24 12:50:25 +02:00
Cristian Maglie
5265e1215a USB: EP0 ::recv method has been merged with ::read method
It makes no sense to have ::recv calling repeatedly ::read in this
case.
2016-08-24 12:37:27 +02:00
Cristian Maglie
2e44a4d961 USBD: Added critical sections to EP OUT handler 2016-08-24 01:04:58 +02:00
Cristian Maglie
a9127228d6 USB: Slightly refactored EP OUT handler
Now the release() function only performs the action that is called for,
i.e. release the endpoint and let it receive data. All the buffers handling
has been inlined in the callers, this also slightly improves performance
because it allows to remove some redundant checks.
2016-08-24 01:04:58 +02:00
Cristian Maglie
87bf6e1bf1 Fixed some comments 2016-08-24 01:04:58 +02:00
Cristian Maglie
3ba1a35296 Moved EPHandler in USBDevice headers
The reference to the upper USBDevice class is passed on
the EPHandler constructor.
2016-08-24 01:04:58 +02:00
Cristian Maglie
7d37753904 USB-CDC: OUT EP is now handled with a custom EPHandler 2016-08-24 01:04:58 +02:00
Cristian Maglie
9f24bbe9a8 USB: Added an OUT EP handler with double buffering. 2016-08-24 01:04:58 +02:00
Cristian Maglie
b2ddb2267d USB: Added interface to possibly setup dynamic USB EP Handler 2016-08-24 01:04:58 +02:00
Cristian Maglie
34bf5421f8 USB: set return type of USBDevice::recv(ep) to int
this is the proper type to encapsulate a byte when data is available
or -1 when there is no data.
2016-08-24 01:04:58 +02:00
Cristian Maglie
40d9554ed3 USB-CDC: Avoid need to send ZLP by sending up to (EPX_SIZE-1) bytes at a time 2016-08-24 01:04:58 +02:00
Cristian Maglie
07263f8bf3 USB-CDC: reset EP OUT count upon reception 2016-08-24 01:04:58 +02:00
Cristian Maglie
19ae0eb4d4 USB-CDC: access to rx buffer is now ISR-protected 2016-08-24 01:04:58 +02:00
Cristian Maglie
9f678cb416 USB-CDC: Refactored EP OUT handling 2016-08-24 01:04:58 +02:00
Sandeep Mistry
e4f7bf513d Add private availableForStore method, and use in Serial_::accept 2016-08-24 01:04:58 +02:00
Sandeep Mistry
cea1d20f27 Enable transfer complete in USBDeviceClass::recv once bank is empty 2016-08-24 01:04:58 +02:00
ladyada
fed20f6e49 Fix for PWM on many pins, now works on: 5, 6, 9, 10, 11, 12, 13, 15 (A1), 16 (A2)
Merge remote-tracking branch 'upstream/master'

Conflicts:
	cores/arduino/wiring_analog.c
	platform.txt
2016-07-25 00:17:37 -04:00
Cristian Maglie
0d644d73e9 Removed unused code 2016-07-20 12:27:00 +02:00
Arturo Guadalupi
5b2c475376 Merge pull request #148 from sandeepmistry/SerialUSB.availableForWrite
Add Serial_::availableForWrite()
2016-07-07 18:12:49 +02:00
Sandeep Mistry
97e9c26fd7 Add Serial_::availableForWrite 2016-06-06 10:00:21 -04:00
Sandeep Mistry
8d0c167462 Change return value of Serial_::write to be the # of bytes written
Previous 0 was always returned.
2016-05-27 11:22:49 -04:00
Sandeep Mistry
8ef9bb3d7b Make return value of USBDeviceClass::send the bytes sent 2016-05-27 11:21:34 -04:00
ladyada
b86cc80a04 Merge branch 'master' into atsamr 2016-05-23 19:31:16 -04:00
ladyada
71c6f9d68b align back to mainline (and put in missing Serial5) - not sure if USB serial LEDs were causing hangups on 1200baud bumps? :/ 2016-05-19 23:34:33 -04:00
ladyada
25cd637acb Merge branch 'master' into atsamr
Conflicts:
	boards.txt
2016-05-13 20:16:32 -04:00
ladyada
402a502ed7 Merge branch 'master' of https://github.com/arduino/ArduinoCore-samd
Conflicts:
	boards.txt
	platform.txt
	variants/arduino_zero/variant.h
2016-05-13 20:05:12 -04:00
Cristian Maglie
2e9e453586 Merge branch 'usb-tx-rx-led' of https://github.com/sandeepmistry/ArduinoCore-samd 2016-04-19 16:18:36 +02:00