Fix CDC device driver not returning written character on putchar success.
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 22 Jan 2018 04:57:24 +0000 (15:57 +1100)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 22 Jan 2018 04:58:05 +0000 (15:58 +1100)
LUFA/DoxygenPages/ChangeLog.txt
LUFA/Drivers/USB/Class/Device/CDCClassDevice.c

index da8a658..8f299f7 100644 (file)
@@ -10,6 +10,8 @@
   *  <b>Fixed:</b>
   *  - Core:
   *   - Fixed DeviceUsesOUTPipe flag not being set correctly in the HID host class driver (thanks to Wolfgang Schnerring)
+  *   - Fixed CDC Device class driver's internal serial stream created by \ref CDC_Device_CreateStream not returning the written
+  *     character after a successful write (thanks to NicoHood)
   *  - Library Applications:
   *   - Fixed bootloaders not disabling global interrupts during erase and write operations (thanks to Zoltan)
   *
index 27f8e72..bf6e301 100644 (file)
@@ -323,7 +323,7 @@ void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterf
 static int CDC_Device_putchar(char c,
                               FILE* Stream)
 {
-       return CDC_Device_SendByte((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
+       return CDC_Device_SendByte((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : c;
 }
 
 static int CDC_Device_getchar(FILE* Stream)