Commit Graph

42 Commits

Author SHA1 Message Date
Martino Facchin 8cab209ef9 [PUSB] Fix static initialization order fiasco
For details see:
https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
2015-10-02 11:59:24 +02:00
Cristian Maglie cabae13e55 [PUSB] Fixed the correct number of endpoints 2015-10-02 11:59:23 +02:00
Cristian Maglie c07f988609 [PUSB] Global functions PUSB_* are now methods of PluggableUSB class 2015-10-02 11:59:22 +02:00
Nico 948c73c5e3 Fix compiler warnings in USBCore.cpp 2015-09-28 16:30:39 +02:00
NicoHood 98301ba23a Added u2 Series support 2015-08-12 17:48:17 +02:00
NicoHood d1fe40060e Added 16 byte endpoint support 2015-08-12 17:48:17 +02:00
NicoHood 77cc20f119 Added missing static inline to USB Recv function 2015-08-12 17:48:17 +02:00
Martino Facchin 3cf30dff25 rename Setup typedef struct to USBSetup
was really too common
2015-07-16 13:13:52 +02:00
Martino Facchin 3ee0fa1265 Add support for waking up a host via USB HID
this is a rework of commit fbcf94801b8bba7f1c8c79cc7ae402b6b9dbb2d3
2015-07-16 13:13:51 +02:00
Martino Facchin 3e516e93c4 remove 3 endpoints to match at32u4 limit 2015-07-16 13:12:15 +02:00
Martino Facchin 8fbc30bd8a add numInterfaces field to PUSBCallbacks 2015-07-16 13:12:15 +02:00
Martino Facchin a1ba49e7c8 make CDC function non removable 2015-07-16 13:12:14 +02:00
Martino Facchin 15edf1c6c8 remove useless variable 2015-07-16 13:12:14 +02:00
Martino Facchin d3815e7e36 add PluggableUSB module 2015-07-16 13:12:14 +02:00
Martino Facchin 8518b4a545 move _initEndpoints from PROGMEM to RAM 2015-07-16 13:12:14 +02:00
Martino Facchin f71f63a644 Use generic composite device descriptor 2015-07-16 13:12:13 +02:00
Martino Facchin f1973e73cb Move EP defines to header 2015-07-16 13:12:13 +02:00
Cristian Maglie 60e6ec22f1 Fixed trivial include error introduced in previous commit 2e3e539b... oops... 2014-09-12 16:58:05 +02:00
Cristian Maglie 2fd1c5b428 Merge branch 'usbcdc-improved' into ide-1.5.x 2014-05-26 13:38:07 +02:00
Paul Brook 5962f155f7 Improve CDC read code
Read CDC data from USB FIFO on demand instead of in ISR.
Remove superfluous ring buffer.

Signed-off-by: Paul Brook <paul@nowt.org>
2014-05-24 00:34:56 +02:00
Paul Brook b57b2ae3c1 Fix race condition in USB CDC transmit
If the Start of Frame interrupt triggers just after the call
to USB_SendSpace in USB_Send then we can get data loss.
When the first bank is full and the second partially full,
the SOF handler will release the second bank via USB_Flush.
Data is then lost due to overflow as USB_Send continues writing data
to the now-closed bank.

Fix this by re-checking the FIFO status inside LockEP, immediately before
doing the data write.

Signed-off-by: Paul Brook <paul@nowt.org>
2014-05-24 00:34:56 +02:00
Cristian Maglie b9f95980c7 Fixed other trivial warnings in AVR USB core.
See #1877
2014-04-20 23:08:55 +02:00
Cristian Maglie 15d74b2530 Removed other unused variables in CDC.cpp and HID.cpp
See #1877
2014-04-20 20:56:51 +02:00
Cristian Maglie 40d87e96d7 Removed 'USB_MANUFACTURER' constant redefinition for known VIDs.
See #1877
2014-04-20 20:49:04 +02:00
Angus Gratton ff47a782f5 Remove hardcoded product names (all provided for in boards.txt) 2013-07-17 14:38:05 +02:00
Angus Gratton 0340b90366 Fix whitespace (tabify), oops 2013-07-17 14:37:49 +02:00
Angus Gratton a33cba585f Allow USB product and manufacturer strings to be supplied in boards.txt 2013-07-17 14:37:29 +02:00
Cristian Maglie 1668039101 Added support for Arduino Esplora 2012-12-07 18:11:07 +01:00
David A. Mellis cfec7864e9 Adding LilyPad Arduino USB. 2012-11-01 10:45:50 -04:00
David A. Mellis 42ca56fb83 Adding Micro. 2012-10-27 14:12:26 -04:00
David A. Mellis 69fa44473b Updating USB core to work at 8 MHz (different PLLCSR value). 2012-10-18 15:03:23 -04:00
Peter Van Hoyweghen dc86d26a11 Avoid serial buffer overrun on leonardo 2012-09-13 08:46:45 -04:00
Zach Eveland 757a77ab67 renamed Leonardo USB_ class to USBDevice_ to be unambiguous. renamed "USB" object to "USBDevice" to prevent conflict with USB Host library (thanks Massimo) 2012-05-01 11:18:15 -04:00
Zach Eveland d755d0035d changed PID values for Leonardo bootloader and sketch
done to avoid driver problems for users who installed the pre-release bootloader and driver
2012-04-25 15:56:18 -04:00
Zach Eveland e2e0260094 Micro I hardly knew ye 2012-04-09 10:12:14 -04:00
Zach Eveland ec83f55b62 sketch USB VID and PID values are passed in from boards.txt at compile time now. changed sketch PIDs to final values. also uncommented Micro section in boards.txt 2012-04-09 08:06:35 -04:00
Cristian Maglie b407337677 Fix for some strange behaviours during board reset 2012-03-07 16:21:04 +01:00
Zach Eveland 58fc0d17cc added asynchronous buffering of received CDC characters
This fixes the issue Federico reported where bytes written by host but not read by sketch would cause serial connection to lock up.  Ring buffer implementation is based on HardwareSerial.cpp.

Adds public accept() method to CDC.
2011-12-18 17:52:35 -05:00
Zach Eveland 8e0f035c9b added automatic one-shot TX and RX LED control for sketch USB 2011-09-16 14:32:25 -04:00
Zach Eveland 7166603c89 added to sketch iProduct and iManufacturer strings identifying board as either an "Arduino Leonardo" or "Arduino Micro" manufactured by "Arduino LLC" 2011-09-16 12:29:47 -04:00
Zach Eveland af635024db support for non-Leonardo boards is back! 2011-08-30 11:50:08 -04:00
Zach Eveland ddd3418a4f Serial via USB works
Integrated rest of Peter's USB implementation
2011-08-14 16:59:34 -04:00