Fixed blocking CDC streams not aborting when the host is disconnected.
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 4 Jan 2010 00:14:09 +0000 (00:14 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 4 Jan 2010 00:14:09 +0000 (00:14 +0000)
LUFA/Drivers/USB/Class/Device/CDC.c
LUFA/ManPages/ChangeLog.txt
LUFA/ManPages/LUFAPoweredProjects.txt
LUFA/ManPages/WhyUseLUFA.txt

index c274853..16bc015 100644 (file)
@@ -263,6 +263,9 @@ static int CDC_Device_getchar_Blocking(FILE* Stream)
 {\r
        while (!(CDC_Device_BytesReceived((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream))))\r
        {\r
+               if (USB_DeviceState == DEVICE_STATE_Unattached)\r
+                 return _FDEV_EOF;\r
+       \r
                CDC_Device_USBTask((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream));\r
                USB_USBTask();\r
        }\r
index eea1f2b..03c19b4 100644 (file)
@@ -27,6 +27,7 @@
   *  - Fixed AVRISP project not able to enter programming mode when ISP protocol is used\r
   *  - Fixed AVRISP PDI race condition where the guard time between direction changes could be interpreted as a start bit\r
   *  - Fixed ADC_IsReadingComplete() returning an inverted result\r
+  *  - Fixed blocking CDC streams not aborting when the host is disconnected\r
   *\r
   *  \section Sec_ChangeLog091223 Version 091223\r
   *\r
index f1b3688..df31db8 100644 (file)
  *  - Arcade Controller: http://fletchtronics.net/arcade-controller-made-petunia\r
  *  - Bicycle POV: http://www.code.google.com/p/bicycleledpov/\r
  *  - CAMTRIG, a remote Camera Trigger device: http://code.astraw.com/projects/motmot/camtrig\r
+ *  - ClockTamer, a configurable clock generator: http://code.google.com/p/clock-tamer/\r
  *  - "Fingerlicking Wingdinger" (WARNING: Bad Language if no Javascript), a MIDI controller: http://noisybox.net/electronics/wingdinger/\r
  *  - Garmin GPS USB to NMEA standard serial sentence translator: http://github.com/nall/garmin-transmogrifier/tree/master\r
- *  - Generic HID Device Creator : http://generichid.sourceforge.net/\r
+ *  - Generic HID Device Creator: http://generichid.sourceforge.net/\r
  *  - NES Controller USB modification: http://projects.peterpolidoro.net/video/NESUSB.htm\r
+ *  - Linux Secure Storage Dongle: http://github.com/TomMD/teensy\r
  *  - MakeTV Episode Dispenser: http://www.youtube.com/watch?v=BkWUi18hl3g\r
  *  - Opendous-JTAG, an open source JTAG device: http://code.google.com/p/opendous-jtag/\r
  *  - Openkubus, an open source hardware-based authentication dongle: http://code.google.com/p/openkubus/\r
  *  - Orbee, a USB connected RGB Orb for notifications: http://www.franksworkshop.com.au/Electronics/Orbee/Orbee.htm\r
  *  - Programmable XBOX controller: http://richard-burke.dyndns.org/wordpress/pan-galactic-gargantuan-gargle-brain-aka-xbox-360-usb-controller/\r
+ *  - Purdue Interactive Kiosk: https://engineering.purdue.edu/477grp4/\r
  *  - Reprap with LUFA, a LUFA powered 3D printer: http://code.google.com/p/at90usb1287-code-for-arduino-and-eclipse/\r
  *  - SEGA Megadrive/Genesis Development Cartridge: http://www.makestuff.eu/wordpress/?page_id=398\r
  *  - Stripe Snoop, a Magnetic Card reader: http://www.ossguy.com/ss_usb/\r
index 34976ec..22ac75f 100644 (file)
@@ -40,7 +40,7 @@
  *    into difficulties or need some advice. In addition, you can also email the library author to recieve personalised\r
  *    support when you need it (subject to author's schedule).\r
  *\r
- *   <small>* Atmel Stack Mouse Device Demo 4292 bytes, LUFA Mouse Low Level Device Demo 3336 bytes, under identical build\r
+ *   <small>* Atmel Stack Mouse Device Demo 4292 bytes, LUFA Mouse Low Level Device Demo 3392 bytes, under identical build\r
  *   environments</small>\r
  */\r
  
\ No newline at end of file