diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-09-30 22:27:11 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-09-30 22:55:21 -0400 |
commit | 9ec2ad0992511a8aff7e5974266fd032c680f862 (patch) | |
tree | 420bcfe41a47a96e538821738c9b9a13ab4b982b /lib/pjrc_usb_serial/usb_serial.patch | |
parent | d05aa81927af8672656b0b3f0ccdefb6e6b42f94 (diff) | |
download | kutter-9ec2ad0992511a8aff7e5974266fd032c680f862.tar.gz kutter-9ec2ad0992511a8aff7e5974266fd032c680f862.tar.xz kutter-9ec2ad0992511a8aff7e5974266fd032c680f862.zip |
lib: Remove pjrc_usb_serial
The pjrc_usb_serial is no longer used.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'lib/pjrc_usb_serial/usb_serial.patch')
-rw-r--r-- | lib/pjrc_usb_serial/usb_serial.patch | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/lib/pjrc_usb_serial/usb_serial.patch b/lib/pjrc_usb_serial/usb_serial.patch deleted file mode 100644 index 73fef81a..00000000 --- a/lib/pjrc_usb_serial/usb_serial.patch +++ /dev/null @@ -1,108 +0,0 @@ ---- ../../../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 - -+#include <string.h> - #define USB_SERIAL_PRIVATE_INCLUDE - #include "usb_serial.h" - -@@ -146,7 +147,7 @@ - // in here should only be done by those who've read chapter 9 of the USB - // spec and relevant portions of any USB class specifications! - --static uint8_t PROGMEM device_descriptor[] = { -+static const uint8_t PROGMEM device_descriptor[] = { - 18, // bLength - 1, // bDescriptorType - 0x00, 0x02, // bcdUSB -@@ -164,7 +165,7 @@ - }; - - #define CONFIG1_DESC_SIZE (9+9+5+5+4+5+7+9+7+7) --static uint8_t PROGMEM config1_descriptor[CONFIG1_DESC_SIZE] = { -+static const uint8_t PROGMEM config1_descriptor[CONFIG1_DESC_SIZE] = { - // configuration descriptor, USB spec 9.6.3, page 264-266, Table 9-10 - 9, // bLength; - 2, // bDescriptorType; -@@ -248,22 +249,22 @@ - uint8_t bDescriptorType; - int16_t wString[]; - }; --static struct usb_string_descriptor_struct PROGMEM string0 = { -+static const struct usb_string_descriptor_struct PROGMEM string0 = { - 4, - 3, - {0x0409} - }; --static struct usb_string_descriptor_struct PROGMEM string1 = { -+static const struct usb_string_descriptor_struct PROGMEM string1 = { - sizeof(STR_MANUFACTURER), - 3, - STR_MANUFACTURER - }; --static struct usb_string_descriptor_struct PROGMEM string2 = { -+static const struct usb_string_descriptor_struct PROGMEM string2 = { - sizeof(STR_PRODUCT), - 3, - STR_PRODUCT - }; --static struct usb_string_descriptor_struct PROGMEM string3 = { -+static const struct usb_string_descriptor_struct PROGMEM string3 = { - sizeof(STR_SERIAL_NUMBER), - 3, - STR_SERIAL_NUMBER -@@ -271,7 +272,7 @@ - - // This table defines which descriptor data is sent for each specific - // request from the host (in wValue and wIndex). --static struct descriptor_list_struct { -+static const struct descriptor_list_struct { - uint16_t wValue; - uint16_t wIndex; - const uint8_t *addr; -@@ -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) - { -- return *(uint32_t *)cdc_line_coding; -+ uint32_t res; -+ memcpy(&res, cdc_line_coding, sizeof(res)); -+ return res; - } - 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; |