aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pjrc_usb_serial/usb_serial.patch
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pjrc_usb_serial/usb_serial.patch')
-rw-r--r--lib/pjrc_usb_serial/usb_serial.patch39
1 files changed, 36 insertions, 3 deletions
diff --git a/lib/pjrc_usb_serial/usb_serial.patch b/lib/pjrc_usb_serial/usb_serial.patch
index 5aaa08e8..73fef81a 100644
--- a/lib/pjrc_usb_serial/usb_serial.patch
+++ b/lib/pjrc_usb_serial/usb_serial.patch
@@ -1,5 +1,5 @@
---- usb_serial.c 2011-04-19 05:54:12.000000000 -0400
-+++ usb_serial.c 2016-06-04 23:48:52.590001697 -0400
+--- ../../../lib/pjrc/usb_serial/usb_serial.c 2011-04-19 05:54:12.000000000 -0400
++++ usb_serial.c 2017-08-07 11:32:47.106357362 -0400
@@ -30,6 +30,7 @@
// Version 1.6: fix zero length packet bug
// Version 1.7: fix usb_serial_set_control
@@ -62,7 +62,24 @@
uint16_t wValue;
uint16_t wIndex;
const uint8_t *addr;
-@@ -646,7 +647,9 @@
+@@ -324,7 +325,7 @@
+ UDCON = 0; // enable attach resistor
+ usb_configuration = 0;
+ cdc_line_rtsdtr = 0;
+- UDIEN = (1<<EORSTE)|(1<<SOFE);
++ UDIEN = (1<<EORSTE);
+ sei();
+ }
+
+@@ -358,6 +359,7 @@
+ UEINTX = 0x6B;
+ goto retry;
+ }
++ UEIENX = (1<<RXOUTE);
+ SREG = intr_state;
+ return -1;
+ }
+@@ -646,7 +648,9 @@
// communication
uint32_t usb_serial_get_baud(void)
{
@@ -73,3 +90,19 @@
}
uint8_t usb_serial_get_stopbits(void)
{
+@@ -772,7 +776,14 @@
+ //
+ ISR(USB_COM_vect)
+ {
+- uint8_t intbits;
++ uint8_t intbits = UEINT;
++ if (intbits & (1<<CDC_RX_ENDPOINT)) {
++ UENUM = CDC_RX_ENDPOINT;
++ UEIENX = 0;
++ extern void sched_wake_tasks(void);
++ sched_wake_tasks();
++ return;
++ }
+ const uint8_t *list;
+ const uint8_t *cfg;
+ uint8_t i, n, len, en;