Преглед на файлове

Fix USB descriptors for Windows

main
PaulStoffregen преди 4 години
родител
ревизия
e599c1acc7
променени са 2 файла, в които са добавени 18 реда и са изтрити 5 реда
  1. +15
    -2
      teensy4/usb_desc.c
  2. +3
    -3
      teensy4/usb_desc.h

+ 15
- 2
teensy4/usb_desc.c Целия файл

@@ -72,6 +72,19 @@
#define LSB(n) ((n) & 255)
#define MSB(n) (((n) >> 8) & 255)

#ifdef CDC_IAD_DESCRIPTOR
#ifndef DEVICE_CLASS
#define DEVICE_CLASS 0xEF
#endif
#ifndef DEVICE_SUBCLASS
#define DEVICE_SUBCLASS 0x02
#endif
#ifndef DEVICE_PROTOCOL
#define DEVICE_PROTOCOL 0x01
#endif
#endif


// USB Device Descriptor. The USB host reads this first, to learn
// what type of device is connected.
static uint8_t device_descriptor[] = {
@@ -1630,7 +1643,7 @@ PROGMEM const uint8_t usb_config_descriptor_480[CONFIG_DESC_SIZE] = {
4, // bDescriptorType
EXPERIMENTAL_INTERFACE, // bInterfaceNumber
0, // bAlternateSetting
1, // bNumEndpoints
2, // bNumEndpoints
0xFF, // bInterfaceClass (0xFF = Vendor)
0x6A, // bInterfaceSubClass
0xFF, // bInterfaceProtocol
@@ -2644,7 +2657,7 @@ PROGMEM const uint8_t usb_config_descriptor_12[CONFIG_DESC_SIZE] = {
4, // bDescriptorType
EXPERIMENTAL_INTERFACE, // bInterfaceNumber
0, // bAlternateSetting
1, // bNumEndpoints
2, // bNumEndpoints
0xFF, // bInterfaceClass (0xFF = Vendor)
0x6A, // bInterfaceSubClass
0xFF, // bInterfaceProtocol

+ 3
- 3
teensy4/usb_desc.h Целия файл

@@ -114,7 +114,6 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#if defined(USB_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0483
#define DEVICE_CLASS 2 // 2 = Communication Class
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME {'U','S','B',' ','S','e','r','i','a','l'}
@@ -122,7 +121,8 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_USB_BUFFERS 12
#define NUM_INTERFACE 3
#define NUM_INTERFACE 2
#define CDC_IAD_DESCRIPTOR 1 // Serial
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1
#define CDC_ACM_ENDPOINT 2
@@ -133,7 +133,7 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define EXPERIMENTAL_INTERFACE 2
//#define EXPERIMENTAL_INTERFACE 2
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_UNUSED
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_BULK

Loading…
Отказ
Запис