Henry Gabryjelski
8afd0523b1
Fix unintended fall-through
...
The compiler found this, not me. Building with
all warnings enabled is recommended.
2020-01-16 16:15:34 -08:00
Kay Sievers
23fd362a72
USBCore: Read the SAMD51 serial number
...
Export the unique hardware serial number from the SAMD51 MCU
to the USB device descriptor.
Remove the concatenation of the USB class device string, it is
superfluous, and an USB interface property should not become a
part of the USB device property.
Tested on SAMD21 and SAMD51:
Before:
SAMD21: 10BD8E4051504C3750202020FF0B1410MIDI
SAMD51: MIDI
After:
SAMD21: 10BD8E4051504C3750202020FF0B1410
SAMD51: AAFC165853574E514D202020FF083C44
2019-06-23 22:02:35 +02:00
hathach
ab16f9899d
add menu dropdown list for usb stack selection
2019-05-01 01:01:59 +07:00
hathach
9c07070580
get msc & hid example work with metro m0 express
2019-04-30 00:12:17 +07:00
ladyada
4d8adc9be4
Merge branch 'master' of https://github.com/arduino/ArduinoCore-samd into arduino-master
2019-03-08 14:03:54 -05:00
Martino Facchin
3b38a41278
Inplement USBDevice.end()
2018-10-23 11:19:08 +02:00
dean
bcc44cc6a1
DM: samd51 USB fix for rebase
2018-09-04 11:50:37 -04:00
dean
b7e942d924
DM: fix stuff from rebase
2018-08-30 15:40:15 -04:00
dean
87eae6f55c
DM: add copyrights
2018-08-30 15:12:51 -04:00
dean
7f74c2126e
update usb stuff
2018-08-30 15:08:16 -04:00
dean
9eecac827b
DM: updates for rev B
2018-08-30 14:59:16 -04:00
dean
c1827b289d
DM: added support for samd51J20A
2018-08-30 14:46:42 -04:00
dean
4810822d26
DM: mostly fixed usb enumeration delay
2018-08-30 14:44:35 -04:00
dean
b5c2b6483b
DM: clocked to 120MHZ, peripherals to 100, USB to 48
2018-08-30 14:44:35 -04:00
dean
358b11addd
DM: added samd51 support
2018-08-30 14:32:21 -04:00
ladyada
d19c8e35a9
cleaned up slight difference in USB union bitflags with a new USBDevice.h - compiles blink
2018-08-30 14:21:26 -04:00
ladyada
012d86c1d3
make it so native USB is Serial
2018-08-30 14:12:25 -04:00
Martino Facchin
f4dfac890f
Always call new DoubleBufferedEPOutHandler on reconnect
...
Avoid memory leak by deleting the buffers; DoubleBufferedEPOutHandler should be refactored (in beta branch) to allow separate "new" and "setup" procedures
Fixes #350
2018-08-24 12:24:49 +02:00
Martino Facchin
2bb54068a2
Don't reallocate USB buffers if already allocated
...
USB Configuration was meant to run only once, but if the board comes back from standby the host can reconfigure the device again.
Probably a cleaner patch could be free()-ing the buffers on standby() to release the memory but at least we don't leak anymore.
Fixes https://github.com/arduino/ArduinoCore-samd/issues/293
2018-01-25 11:20:41 -05:00
Sandeep Mistry
d58b840f63
Add missing USBCON wrapper
2018-01-08 10:41:14 -05:00
Sandeep Mistry
0ee62489c0
Replace utoa + toupper with custom loop
2017-08-23 19:21:01 +02:00
Sandeep Mistry
61b060c732
Slim serial number to hex string conversion
2017-08-23 19:21:01 +02:00
Sandeep Mistry
9370464ad0
Use SAMD21 serial number for USB serial number prefix
2017-08-23 19:21:01 +02: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
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
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
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
9f678cb416
USB-CDC: Refactored EP OUT handling
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
Cristian Maglie
0d644d73e9
Removed unused code
2016-07-20 12:27:00 +02:00
Sandeep Mistry
8ef9bb3d7b
Make return value of USBDeviceClass::send the bytes sent
2016-05-27 11:21:34 -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
Sandeep Mistry
cee4a8d8e6
Descriptor type (0x03) should be second byte for string descriptor
2016-03-30 14:00:57 -04:00
Sandeep Mistry
ba1ad40168
Add cast for string passed into strlen
2016-03-30 14:00:57 -04:00
Cristian Maglie
ea894b1efe
Fixed USB sendStringDescriptor
2016-03-30 14:00:56 -04:00
Sandeep Mistry
ba02d346d2
Add USB transfer RX/TX LED blinking
...
Only enabled if PIN_LED_TXL or PIN_LED_RXL is defined
2016-03-04 15:16:31 -05:00
Luke McConnell
069b760174
Resolve compiler warning in USBCore
...
Resolve compiler warning from performing arithmetic on void pointers
2016-01-03 15:25:20 +00:00
Martino Facchin
86fa94fdc7
PUSB: add iSerial USB field
2015-10-21 16:48:13 +02:00
Martino Facchin
02945cc78e
[PluggableUSB] port to stable API
2015-10-12 15:28:07 +02:00