Use Teensy as Midi and USB Keyboard controller at the same time

ybr

Member
Hi there,

I'm making a footcontroller for music software. Most actions I'm controlling using Midi CC messages but some actions are not supported using Midi.
Would it be possible to run my Teensy LC as both a Midi contoller and USB keyboard at the same time? In that way I could use key combinations directly from Teensy to do everything I want to do.

Best,

YBR
 
Would it be possible to run my Teensy LC as both a Midi contoller and USB keyboard at the same time?

Yes. But this isn't one of the options in the Tools > USB Type menu, so you'll need to edit usb_desc.h to create that combination. See the comments in that file for instructions.
 
Thanks Paul, I've tried to make it work but I didn't manage to yet. It doesn't seems to show up in the USB menu.

This is what I got so far, any pointers how to get it to work?

Code:
  #elif defined(KEYBOARD_MIDI)
  #define VENDOR_ID		0x16C0
  #define PRODUCT_ID		0x04D4
  #define MANUFACTURER_NAME	{'T','e','e','n','s','y','d','u','i','n','o'}
  #define MANUFACTURER_NAME_LEN	11
  #define PRODUCT_NAME		{'K','e','y','b','o','a','r','d','/','M','I','D','I'}
  #define PRODUCT_NAME_LEN	13
  #define EP0_SIZE		64
  #define NUM_ENDPOINTS         6
  #define NUM_USB_BUFFERS	16
  #define NUM_INTERFACE		2
  #define SEREMU_INTERFACE      1	// Serial emulation
  #define SEREMU_TX_ENDPOINT    1
  #define SEREMU_TX_SIZE        64
  #define SEREMU_TX_INTERVAL    1
  #define SEREMU_RX_ENDPOINT    2
  #define SEREMU_RX_SIZE        32
  #define SEREMU_RX_INTERVAL    2
  #define MIDI_INTERFACE        0	// MIDI
  #define MIDI_NUM_CABLES       1
  #define MIDI_TX_ENDPOINT      3
  #define MIDI_TX_SIZE          64
  #define MIDI_RX_ENDPOINT      4
  #define MIDI_RX_SIZE          64
  #define ENDPOINT1_CONFIG	ENDPOINT_TRANSMIT_ONLY
  #define ENDPOINT2_CONFIG	ENDPOINT_RECEIVE_ONLY
  #define ENDPOINT3_CONFIG	ENDPOINT_TRANSMIT_ONLY
  #define ENDPOINT4_CONFIG	ENDPOINT_RECEIVE_ONLY
  #define ENDPOINT5_CONFIG	ENDPOINT_TRANSMIT_ONLY
  #define ENDPOINT6_CONFIG	ENDPOINT_RECEIVE_ONLY
 
I'm also unable to achieve this.

Any further insight in how to accomplish this?

I'm using VSCode & Platformio.
For test purposes I've duplicated the USB_MIDI section of usb_desc.h and given it the 'name' USB_MIDI_AND_KEYBOARD.
I have not yet attempted to add the keyboard functionality to it.
So, it's just an additional #elif near the end of the file.
Code:
/* Teensyduino Core Library
 * http://www.pjrc.com/teensy/
 * Copyright (c) 2017 PJRC.COM, LLC.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * 1. The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * 2. If the Software is incorporated into a build system that allows
 * selection among a list of target devices, then similar target
 * devices manufactured by PJRC.COM must be included in the list of
 * target devices and selectable in the same manner.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#pragma once

// This header is NOT meant to be included when compiling
// user sketches in Arduino.  The low-level functions
// provided by usb_dev.c are meant to be called only by
// code which provides higher-level interfaces to the user.

#include <stdint.h>
#include <stddef.h>

#define ENDPOINT_TRANSMIT_UNUSED 0x00020000
#define ENDPOINT_TRANSMIT_ISOCHRONOUS 0x00C40000
#define ENDPOINT_TRANSMIT_BULK 0x00C80000
#define ENDPOINT_TRANSMIT_INTERRUPT 0x00CC0000
#define ENDPOINT_RECEIVE_UNUSED 0x00000002
#define ENDPOINT_RECEIVE_ISOCHRONOUS 0x000000C4
#define ENDPOINT_RECEIVE_BULK 0x000000C8
#define ENDPOINT_RECEIVE_INTERRUPT 0x000000CC

/*
Each group of #define lines below corresponds to one of the
settings in the Tools > USB Type menu.  This file defines what
type of USB device is actually created for each of those menu
options.

Each "interface" is a set of functionality your PC or Mac will
use and treat as if it is a unique device.  Within each interface,
the "endpoints" are the actual communication channels.  Most
interfaces use 1, 2 or 3 endpoints.  By editing only this file,
you can customize the USB Types to be any collection of interfaces.

To modify a USB Type, delete the XYZ_INTERFACE lines for any
interfaces you wish to remove, and copy them from another USB Type
for any you want to add.

Give each interface a unique number, and edit NUM_INTERFACE to
reflect the total number of interfaces.

Next, assign unique endpoint numbers to all the endpoints across
all the interfaces your device has.  You can reuse an endpoint
number for transmit and receive, but the same endpoint number must
not be used twice to transmit, or twice to receive.

Most endpoints also require their maximum size, and some also
need an interval specification (the number of milliseconds the
PC will check for data from that endpoint).  For existing
interfaces, usually these other settings should not be changed.

Edit NUM_ENDPOINTS to be at least the largest endpoint number used.

Edit the ENDPOINT*_CONFIG lines so each endpoint is configured
the proper way (transmit, receive, or both).

If you are using existing interfaces (making your own device with
a different set of interfaces) the code in all other files should
automatically adapt to the new endpoints you specify here.

If you need to create a new type of interface, you'll need to write
the code which sends and receives packets, and presents an API to
the user.  Usually, a pair of files are added for the actual code,
and code is also added in usb_dev.c for any control transfers,
interrupt-level code, or other very low-level stuff not possible
from the packet send/receive functons.  Code also is added in
usb_inst.c to create an instance of your C++ object.  This message
gives a quick summary of things you will need to know:
https://forum.pjrc.com/threads/49045?p=164512&viewfull=1#post164512

You may edit the Vendor and Product ID numbers, and strings.  If
the numbers are changed, Teensyduino may not be able to automatically
find and reboot your board when you click the Upload button in
the Arduino IDE.  You will need to press the Program button on
Teensy to initiate programming.

Some operating systems, especially Windows, may cache USB device
info.  Changes to the device name may not update on the same
computer unless the vendor or product ID numbers change, or the
"bcdDevice" revision code is increased.

If these instructions are missing steps or could be improved, please
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' \
  }
#define PRODUCT_NAME_LEN 10
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_USB_BUFFERS 12
#define NUM_INTERFACE 2
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 4
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#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

#elif defined(USB_KEYBOARDONLY)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D0
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                       \
  {                                        \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd' \
  }
#define PRODUCT_NAME_LEN 8
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_USB_BUFFERS 14
#define NUM_INTERFACE 3
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2 // TODO: is this ok for 480 Mbit speed
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1  // TODO: is this ok for 480 Mbit speed
#define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_HID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0482
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                  \
  {                                                                                                                   \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'M', 'o', 'u', 's', 'e', '/', 'J', 'o', 'y', 's', 't', 'i', 'c', 'k' \
  }
#define PRODUCT_NAME_LEN 23
#define EP0_SIZE 64
#define NUM_ENDPOINTS 6
#define NUM_USB_BUFFERS 24
#define NUM_INTERFACE 5
#define SEREMU_INTERFACE 2 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 4 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MOUSE_INTERFACE 1 // Mouse
#define MOUSE_ENDPOINT 5
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 1
#define JOYSTICK_INTERFACE 3 // Joystick
#define JOYSTICK_ENDPOINT 6
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 2
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_SERIAL_HID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0487
#define DEVICE_CLASS 0xEF
#define DEVICE_SUBCLASS 0x02
#define DEVICE_PROTOCOL 0x01
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                                     \
  {                                                                                                                                                      \
    'S', 'e', 'r', 'i', 'a', 'l', '/', 'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'M', 'o', 'u', 's', 'e', '/', 'J', 'o', 'y', 's', 't', 'i', 'c', 'k' \
  }
#define PRODUCT_NAME_LEN 30
#define EP0_SIZE 64
#define NUM_ENDPOINTS 7
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define KEYBOARD_INTERFACE 2 // Keyboard
#define KEYBOARD_ENDPOINT 4
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 5 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 5
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MOUSE_INTERFACE 3 // Mouse
#define MOUSE_ENDPOINT 6
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 2
#define JOYSTICK_INTERFACE 4 // Joystick
#define JOYSTICK_ENDPOINT 7
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 1
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_TOUCHSCREEN)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D3
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                   \
  {                                                                                                    \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'T', 'o', 'u', 'c', 'h', 's', 'c', 'r', 'e', 'e', 'n' \
  }
#define PRODUCT_NAME_LEN 20
#define EP0_SIZE 64
#define NUM_ENDPOINTS 5
#define NUM_INTERFACE 4
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MULTITOUCH_INTERFACE 3 // Touchscreen
#define MULTITOUCH_ENDPOINT 5
#define MULTITOUCH_SIZE 8
#define MULTITOUCH_FINGERS 10
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_HID_TOUCHSCREEN)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D4
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                 \
  {                                                                                                                                  \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'M', 'o', 'u', 's', 'e', '/', 'T', 'o', 'u', 'c', 'h', 's', 'c', 'r', 'e', 'e', 'n' \
  }
#define PRODUCT_NAME_LEN 26
#define EP0_SIZE 64
#define NUM_ENDPOINTS 6
#define NUM_INTERFACE 5
#define SEREMU_INTERFACE 2 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 3 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MOUSE_INTERFACE 1 // Mouse
#define MOUSE_ENDPOINT 6
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 2
#define MULTITOUCH_INTERFACE 4 // Touchscreen
#define MULTITOUCH_ENDPOINT 5
#define MULTITOUCH_SIZE 8
#define MULTITOUCH_FINGERS 10
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_MIDI)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                      \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I' \
  }
#define PRODUCT_NAME_LEN 11
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MIDI_INTERFACE 0 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI4)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define BCD_DEVICE 0x0211
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                \
  {                                                                 \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '4' \
  }
#define PRODUCT_NAME_LEN 13
#define EP0_SIZE 64
#define NUM_ENDPOINTS 3
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MIDI_INTERFACE 0 // MIDI
#define MIDI_NUM_CABLES 4
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI16)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define BCD_DEVICE 0x0212
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                     \
  {                                                                      \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '1', '6' \
  }
#define PRODUCT_NAME_LEN 14
#define EP0_SIZE 64
#define NUM_ENDPOINTS 3
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MIDI_INTERFACE 0 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0489
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                      \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I' \
  }
#define PRODUCT_NAME_LEN 11
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 3
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI4_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0489
#define BCD_DEVICE 0x0211
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                \
  {                                                                 \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '4' \
  }
#define PRODUCT_NAME_LEN 13
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 3
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 4
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI16_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0489
#define BCD_DEVICE 0x0212
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                     \
  {                                                                      \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '1', '6' \
  }
#define PRODUCT_NAME_LEN 14
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 3
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_RAWHID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0486
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200      // recommended: 0x0100 to 0xFFFF
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                         \
  {                                                                                          \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o', ' ', 'R', 'a', 'w', 'H', 'I', 'D' \
  }
#define PRODUCT_NAME_LEN 18
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define RAWHID_INTERFACE 0 // RawHID
#define RAWHID_TX_ENDPOINT 3
#define RAWHID_TX_SIZE 64
#define RAWHID_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define RAWHID_RX_ENDPOINT 4
#define RAWHID_RX_SIZE 64
#define RAWHID_RX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_INTERFACE 1   // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_UNUSED

#elif defined(USB_FLIGHTSIM)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0488
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                 \
  {                                                                                                                                  \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'F', 'l', 'i', 'g', 'h', 't', ' ', 'S', 'i', 'm', ' ', 'C', 'o', 'n', 't', 'r', 'o', 'l', 's' \
  }
#define PRODUCT_NAME_LEN 26
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
#define FLIGHTSIM_TX_ENDPOINT 3
#define FLIGHTSIM_TX_SIZE 64
#define FLIGHTSIM_TX_INTERVAL 1
#define FLIGHTSIM_RX_ENDPOINT 4
#define FLIGHTSIM_RX_SIZE 64
#define FLIGHTSIM_RX_INTERVAL 1
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 1
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY

#elif defined(USB_FLIGHTSIM_JOYSTICK)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0488
#define BCD_DEVICE 0x0211
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                 \
  {                                                                                                                                  \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'F', 'l', 'i', 'g', 'h', 't', ' ', 'S', 'i', 'm', ' ', 'C', 'o', 'n', 't', 'r', 'o', 'l', 's' \
  }
#define PRODUCT_NAME_LEN 26
#define EP0_SIZE 64
#define NUM_ENDPOINTS 5
#define NUM_INTERFACE 3
#define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
#define FLIGHTSIM_TX_ENDPOINT 3
#define FLIGHTSIM_TX_SIZE 64
#define FLIGHTSIM_TX_INTERVAL 1
#define FLIGHTSIM_RX_ENDPOINT 4
#define FLIGHTSIM_RX_SIZE 64
#define FLIGHTSIM_RX_INTERVAL 1
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 1
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define JOYSTICK_INTERFACE 2 // Joystick
#define JOYSTICK_ENDPOINT 5
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 1
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_TRANSMIT_ONLY

#elif defined(USB_MTPDISK)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D1
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                          \
  {                                                                           \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'T', 'P', ' ', 'D', 'i', 's', 'k' \
  }
#define PRODUCT_NAME_LEN 15
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define MTP_INTERFACE 0 // MTP Disk
#define MTP_TX_ENDPOINT 3
#define MTP_TX_SIZE 64
#define MTP_RX_ENDPOINT 3
#define MTP_RX_SIZE 64
#define MTP_EVENT_ENDPOINT 4
#define MTP_EVENT_SIZE 16
#define MTP_EVENT_INTERVAL 10
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 1
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY

#elif defined(USB_AUDIO)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D2
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                           \
  {                                                            \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'A', 'u', 'd', 'i', 'o' \
  }
#define PRODUCT_NAME_LEN 12
#define EP0_SIZE 64
#define NUM_ENDPOINTS 5
#define NUM_INTERFACE 4
#define SEREMU_INTERFACE 0 // Serial emulation
#define SEREMU_TX_ENDPOINT 1
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define AUDIO_INTERFACE 1 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 3
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 4
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 5
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
#define ENDPOINT5_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS

#elif defined(USB_MIDI_AUDIO_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048A
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                    \
  {                                                                                     \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', '/', 'A', 'u', 'd', 'i', 'o' \
  }
#define PRODUCT_NAME_LEN 17
#define EP0_SIZE 64
#define NUM_ENDPOINTS 8
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE 64
#define MIDI_RX_ENDPOINT 5
#define MIDI_RX_SIZE 64
#define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 6
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 7
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 8
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
#define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS

#elif defined(USB_MIDI16_AUDIO_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048A
#define BCD_DEVICE 0x0212
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                   \
  {                                                                                                    \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '1', '6', '/', 'A', 'u', 'd', 'i', 'o' \
  }
#define PRODUCT_NAME_LEN 20
#define EP0_SIZE 64
#define NUM_ENDPOINTS 8
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE 64
#define MIDI_RX_ENDPOINT 5
#define MIDI_RX_SIZE 64
#define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 6
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 7
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 8
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
#define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS

#elif defined(USB_EVERYTHING)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0476
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200      // recommended: 0x0100 to 0xFFFF
#define DEVICE_CLASS 0xEF
#define DEVICE_SUBCLASS 0x02
#define DEVICE_PROTOCOL 0x01
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                     \
  {                                                                      \
    'A', 'l', 'l', ' ', 'T', 'h', 'e', ' ', 'T', 'h', 'i', 'n', 'g', 's' \
  }
#define PRODUCT_NAME_LEN 14
#define EP0_SIZE 64
#define NUM_ENDPOINTS 15
#define NUM_INTERFACE 13
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 2
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE 64
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE 64
#define KEYBOARD_INTERFACE 3 // Keyboard
#define KEYBOARD_ENDPOINT 4
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define MOUSE_INTERFACE 4 // Mouse
#define MOUSE_ENDPOINT 5
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 2
#define RAWHID_INTERFACE 5 // RawHID
#define RAWHID_TX_ENDPOINT 6
#define RAWHID_TX_SIZE 64
#define RAWHID_TX_INTERVAL 1
#define RAWHID_RX_ENDPOINT 6
#define RAWHID_RX_SIZE 64
#define RAWHID_RX_INTERVAL 1
#define FLIGHTSIM_INTERFACE 6 // Flight Sim Control
#define FLIGHTSIM_TX_ENDPOINT 9
#define FLIGHTSIM_TX_SIZE 64
#define FLIGHTSIM_TX_INTERVAL 1
#define FLIGHTSIM_RX_ENDPOINT 9
#define FLIGHTSIM_RX_SIZE 64
#define FLIGHTSIM_RX_INTERVAL 1
#define JOYSTICK_INTERFACE 7 // Joystick
#define JOYSTICK_ENDPOINT 10
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 1
/*
  #define MTP_INTERFACE		8	// MTP Disk
  #define MTP_TX_ENDPOINT	11
  #define MTP_TX_SIZE		64
  #define MTP_RX_ENDPOINT	3
  #define MTP_RX_SIZE		64
  #define MTP_EVENT_ENDPOINT	11
  #define MTP_EVENT_SIZE	16
  #define MTP_EVENT_INTERVAL	10
*/
#define KEYMEDIA_INTERFACE 8 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 12
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define AUDIO_INTERFACE 9 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 13
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 13
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 14
#define MULTITOUCH_INTERFACE 12 // Touchscreen
#define MULTITOUCH_ENDPOINT 15
#define MULTITOUCH_SIZE 8
#define MULTITOUCH_FINGERS 10
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT4_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT7_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT9_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT10_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT11_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT12_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT13_CONFIG (ENDPOINT_RECEIVE_ISOCHRONOUS | ENDPOINT_TRANSMIT_ISOCHRONOUS)
#define ENDPOINT14_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT15_CONFIG ENDPOINT_TRANSMIT_ONLY
#elif defined(USB_MIDI_AND_KEYBOARD)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'P', 'h', 'i', 'l', 's', 'w', 'o', 'r', 'k', 's', 'h','o','p' \
  }
#define MANUFACTURER_NAME_LEN 13
#define PRODUCT_NAME                                                                                                       \
  {                                                                                                                        \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', ' ', 'A', 'N', 'D', ' ', 'K', 'E', 'Y', 'B', 'O', 'A', 'R', 'D' \
  }
#define PRODUCT_NAME_LEN 24
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MIDI_INTERFACE 0 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#endif

#ifdef USB_DESC_LIST_DEFINE
#if defined(NUM_ENDPOINTS) && NUM_ENDPOINTS > 0
// NUM_ENDPOINTS = number of non-zero endpoints (0 to 7)
extern const uint32_t usb_endpoint_config_table[NUM_ENDPOINTS];

typedef struct
{
  uint16_t wValue;
  uint16_t wIndex;
  const uint8_t *addr;
  uint16_t length;
} usb_descriptor_list_t;

extern const usb_descriptor_list_t usb_descriptor_list[];
#endif // NUM_ENDPOINTS
#endif // USB_DESC_LIST_DEFINE

Here's the platformio.ini to go with it.
Code:
[env:teensy40]
platform = teensy
board = teensy40
framework = arduino
#build_flags = -D USB_MIDI
build_flags = -D USB_MIDI_AND_KEYBOARD
monitor_speed = 115200
[platformio]
description = Tennsy4MIDIController

When the build flag is -D USB_MIDI, all is well and I get a clean usable result.
When the build flag is as shown above (-D USB_MIDI_AND_KEYBOARD) every reference to 'usbMIDI' in my code throws a compiler error.

Code:
src\main.cpp:459:3: error: 'usbMIDI' was not declared in this scope
   usbMIDI.sendControlChange(contRecord, 127, MobiusChannel);
   ^
src\main.cpp: In function 'void SelectTrack(int)':
Compiling .pio\build\teensy40\libe20\I2CMux\I2CMux.cpp.o
src\main.cpp:488:3: error: 'usbMIDI' was not declared in this scope
   usbMIDI.sendControlChange(47 + TrackNo, 127, MobiusChannel);
   ^
src\main.cpp: In function 'void pollStatus()':
src\main.cpp:602:5: error: 'usbMIDI' was not declared in this scope
     usbMIDI.sendNoteOn(1, 1, MobiusChannel); // 60 = C4

What is the problem?

Edit:
Out of curiosity, I renamed the USB_MIDI entry in usb_dev.h to USB_MODI and changed the build flag to suit. This also rendered my application un-compileable. It seems that there's something amis here that a mere mortal such as myself has no chance of resolving.
 
I know it's nearly a year on, but did you get anywhere with this? I'm looking to do exactly the same thing, and whilst I haven't started yet, the methods described above are exactly what I thought I needed to do, so I have a feeling I'm going to run in to exactly the same trouble. Any hints would be really helpful!
 
Hi, yes I did. I use VSCode & PlatformIO to do my development and I am working with a Teensy4, so in my world these files are

C:\Users\Phil\.platformio\packages\framework-arduinoteensy\cores\teensy4\usb_desc.h and
C:\Users\Phil\.platformio\packages\framework-arduinoteensy\cores\teensy4\usb_desc.c

If you're using a different teensy, then the path would be a little different, annoyingly the files, though NOT board dependent are duplicated. If I change board, I'll have to propagate the changes.... Crap!

I also edited the same files for the Arduino IDE, which on my machine are at: C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4\usb_desc.h & usb_desc.c

I added MIDI+KEYBOARD & MIDI+KEYBOARD+SERIAL to the arduino IDE USB type: menu but I can't remember how.

Here are the edited files:
usb_desc.h
Code:
/* Teensyduino Core Library
 * http://www.pjrc.com/teensy/
 * Copyright (c) 2017 PJRC.COM, LLC.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * 1. The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * 2. If the Software is incorporated into a build system that allows
 * selection among a list of target devices, then similar target
 * devices manufactured by PJRC.COM must be included in the list of
 * target devices and selectable in the same manner.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#pragma once

// This header is NOT meant to be included when compiling
// user sketches in Arduino.  The low-level functions
// provided by usb_dev.c are meant to be called only by
// code which provides higher-level interfaces to the user.

#include <stdint.h>
#include <stddef.h>

#define ENDPOINT_TRANSMIT_UNUSED 0x00020000
#define ENDPOINT_TRANSMIT_ISOCHRONOUS 0x00C40000
#define ENDPOINT_TRANSMIT_BULK 0x00C80000
#define ENDPOINT_TRANSMIT_INTERRUPT 0x00CC0000
#define ENDPOINT_RECEIVE_UNUSED 0x00000002
#define ENDPOINT_RECEIVE_ISOCHRONOUS 0x000000C4
#define ENDPOINT_RECEIVE_BULK 0x000000C8
#define ENDPOINT_RECEIVE_INTERRUPT 0x000000CC
#define ENDPOINT_RECEIVE_ONLY 0x19  // ADDED BY PJC 20200821
#define ENDPOINT_TRANSMIT_ONLY 0x15 // ADDED BY PJC 20200821

/*
Each group of #define lines below corresponds to one of the
settings in the Tools > USB Type menu.  This file defines what
type of USB device is actually created for each of those menu
options.

Each "interface" is a set of functionality your PC or Mac will
use and treat as if it is a unique device.  Within each interface,
the "endpoints" are the actual communication channels.  Most
interfaces use 1, 2 or 3 endpoints.  By editing only this file,
you can customize the USB Types to be any collection of interfaces.

To modify a USB Type, delete the XYZ_INTERFACE lines for any
interfaces you wish to remove, and copy them from another USB Type
for any you want to add.

Give each interface a unique number, and edit NUM_INTERFACE to
reflect the total number of interfaces.

Next, assign unique endpoint numbers to all the endpoints across
all the interfaces your device has.  You can reuse an endpoint
number for transmit and receive, but the same endpoint number must
not be used twice to transmit, or twice to receive.

Most endpoints also require their maximum size, and some also
need an interval specification (the number of milliseconds the
PC will check for data from that endpoint).  For existing
interfaces, usually these other settings should not be changed.

Edit NUM_ENDPOINTS to be at least the largest endpoint number used.

Edit the ENDPOINT*_CONFIG lines so each endpoint is configured
the proper way (transmit, receive, or both).

If you are using existing interfaces (making your own device with
a different set of interfaces) the code in all other files should
automatically adapt to the new endpoints you specify here.

If you need to create a new type of interface, you'll need to write
the code which sends and receives packets, and presents an API to
the user.  Usually, a pair of files are added for the actual code,
and code is also added in usb_dev.c for any control transfers,
interrupt-level code, or other very low-level stuff not possible
from the packet send/receive functons.  Code also is added in
usb_inst.c to create an instance of your C++ object.  This message
gives a quick summary of things you will need to know:
https://forum.pjrc.com/threads/49045?p=164512&viewfull=1#post164512

You may edit the Vendor and Product ID numbers, and strings.  If
the numbers are changed, Teensyduino may not be able to automatically
find and reboot your board when you click the Upload button in
the Arduino IDE.  You will need to press the Program button on
Teensy to initiate programming.

Some operating systems, especially Windows, may cache USB device
info.  Changes to the device name may not update on the same
computer unless the vendor or product ID numbers change, or the
"bcdDevice" revision code is increased.

If these instructions are missing steps or could be improved, please
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 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' \
  }
#define PRODUCT_NAME_LEN 10
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_USB_BUFFERS 12
#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
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 4
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
//#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

#elif defined(USB_DUAL_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048B
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                      \
  {                                                       \
    'D', 'u', 'a', 'l', ' ', 'S', 'e', 'r', 'i', 'a', 'l' \
  }
#define PRODUCT_NAME_LEN 11
#define EP0_SIZE 64
#define NUM_ENDPOINTS 5
#define NUM_INTERFACE 4
#define CDC_IAD_DESCRIPTOR 1 // Serial
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define CDC2_STATUS_INTERFACE 2 // SerialUSB1
#define CDC2_DATA_INTERFACE 3
#define CDC2_ACM_ENDPOINT 4
#define CDC2_RX_ENDPOINT 5
#define CDC2_TX_ENDPOINT 5
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_TRIPLE_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048C
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                \
  {                                                                 \
    'T', 'r', 'i', 'p', 'l', 'e', ' ', 'S', 'e', 'r', 'i', 'a', 'l' \
  }
#define PRODUCT_NAME_LEN 13
#define EP0_SIZE 64
#define NUM_ENDPOINTS 7
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1 // Serial
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define CDC2_STATUS_INTERFACE 2 // SerialUSB1
#define CDC2_DATA_INTERFACE 3
#define CDC2_ACM_ENDPOINT 4
#define CDC2_RX_ENDPOINT 5
#define CDC2_TX_ENDPOINT 5
#define CDC3_STATUS_INTERFACE 4 // SerialUSB2
#define CDC3_DATA_INTERFACE 5
#define CDC3_ACM_ENDPOINT 6
#define CDC3_RX_ENDPOINT 7
#define CDC3_TX_ENDPOINT 7
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_KEYBOARDONLY)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D0
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                       \
  {                                        \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd' \
  }
#define PRODUCT_NAME_LEN 8
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_USB_BUFFERS 14
#define NUM_INTERFACE 3
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2 // TODO: is this ok for 480 Mbit speed
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1  // TODO: is this ok for 480 Mbit speed
#define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_HID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0482
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                  \
  {                                                                                                                   \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'M', 'o', 'u', 's', 'e', '/', 'J', 'o', 'y', 's', 't', 'i', 'c', 'k' \
  }
#define PRODUCT_NAME_LEN 23
#define EP0_SIZE 64
#define NUM_ENDPOINTS 6
#define NUM_USB_BUFFERS 24
#define NUM_INTERFACE 5
#define SEREMU_INTERFACE 2 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 4 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MOUSE_INTERFACE 1 // Mouse
#define MOUSE_ENDPOINT 5
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 1
#define JOYSTICK_INTERFACE 3 // Joystick
#define JOYSTICK_ENDPOINT 6
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 2
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_SERIAL_HID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0487
#define DEVICE_CLASS 0xEF
#define DEVICE_SUBCLASS 0x02
#define DEVICE_PROTOCOL 0x01
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                                     \
  {                                                                                                                                                      \
    'S', 'e', 'r', 'i', 'a', 'l', '/', 'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'M', 'o', 'u', 's', 'e', '/', 'J', 'o', 'y', 's', 't', 'i', 'c', 'k' \
  }
#define PRODUCT_NAME_LEN 30
#define EP0_SIZE 64
#define NUM_ENDPOINTS 7
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define KEYBOARD_INTERFACE 2 // Keyboard
#define KEYBOARD_ENDPOINT 4
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 5 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 5
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MOUSE_INTERFACE 3 // Mouse
#define MOUSE_ENDPOINT 6
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 2
#define JOYSTICK_INTERFACE 4 // Joystick
#define JOYSTICK_ENDPOINT 7
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 1
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_TOUCHSCREEN)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D3
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                   \
  {                                                                                                    \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'T', 'o', 'u', 'c', 'h', 's', 'c', 'r', 'e', 'e', 'n' \
  }
#define PRODUCT_NAME_LEN 20
#define EP0_SIZE 64
#define NUM_ENDPOINTS 5
#define NUM_INTERFACE 4
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MULTITOUCH_INTERFACE 3 // Touchscreen
#define MULTITOUCH_ENDPOINT 5
#define MULTITOUCH_SIZE 9
#define MULTITOUCH_FINGERS 10
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_HID_TOUCHSCREEN)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D4
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                 \
  {                                                                                                                                  \
    'K', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '/', 'M', 'o', 'u', 's', 'e', '/', 'T', 'o', 'u', 'c', 'h', 's', 'c', 'r', 'e', 'e', 'n' \
  }
#define PRODUCT_NAME_LEN 26
#define EP0_SIZE 64
#define NUM_ENDPOINTS 6
#define NUM_INTERFACE 5
#define SEREMU_INTERFACE 2 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define KEYBOARD_INTERFACE 0 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 3 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 4
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define MOUSE_INTERFACE 1 // Mouse
#define MOUSE_ENDPOINT 6
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 2
#define MULTITOUCH_INTERFACE 4 // Touchscreen
#define MULTITOUCH_ENDPOINT 5
#define MULTITOUCH_SIZE 9
#define MULTITOUCH_FINGERS 10
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_MIDI)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                      \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I' \
  }
#define PRODUCT_NAME_LEN 11
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MIDI_INTERFACE 0 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI4)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define BCD_DEVICE 0x0211
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                \
  {                                                                 \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '4' \
  }
#define PRODUCT_NAME_LEN 13
#define EP0_SIZE 64
#define NUM_ENDPOINTS 3
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MIDI_INTERFACE 0 // MIDI
#define MIDI_NUM_CABLES 4
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI16)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define BCD_DEVICE 0x0212
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                     \
  {                                                                      \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '1', '6' \
  }
#define PRODUCT_NAME_LEN 14
#define EP0_SIZE 64
#define NUM_ENDPOINTS 3
#define NUM_INTERFACE 2
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define MIDI_INTERFACE 0 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0489
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                      \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I' \
  }
#define PRODUCT_NAME_LEN 11
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 3
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI4_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0489
#define BCD_DEVICE 0x0211
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                \
  {                                                                 \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '4' \
  }
#define PRODUCT_NAME_LEN 13
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 3
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 4
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_MIDI16_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0489
#define BCD_DEVICE 0x0212
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                     \
  {                                                                      \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '1', '6' \
  }
#define PRODUCT_NAME_LEN 14
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 3
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_RAWHID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0486
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200      // recommended: 0x0100 to 0xFFFF
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                         \
  {                                                                                          \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o', ' ', 'R', 'a', 'w', 'H', 'I', 'D' \
  }
#define PRODUCT_NAME_LEN 18
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define RAWHID_INTERFACE 0 // RawHID
#define RAWHID_TX_ENDPOINT 3
#define RAWHID_TX_SIZE 64
#define RAWHID_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define RAWHID_RX_ENDPOINT 4
#define RAWHID_RX_SIZE 64
#define RAWHID_RX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_INTERFACE 1   // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_UNUSED

#elif defined(USB_FLIGHTSIM)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0488
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                 \
  {                                                                                                                                  \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'F', 'l', 'i', 'g', 'h', 't', ' ', 'S', 'i', 'm', ' ', 'C', 'o', 'n', 't', 'r', 'o', 'l', 's' \
  }
#define PRODUCT_NAME_LEN 26
#define EP0_SIZE 64
#define NUM_ENDPOINTS 3
#define NUM_INTERFACE 2
#define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
#define FLIGHTSIM_TX_ENDPOINT 3
#define FLIGHTSIM_TX_SIZE 64
#define FLIGHTSIM_TX_INTERVAL 1
#define FLIGHTSIM_RX_ENDPOINT 3
#define FLIGHTSIM_RX_SIZE 64
#define FLIGHTSIM_RX_INTERVAL 1
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK

#elif defined(USB_FLIGHTSIM_JOYSTICK)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0488
#define BCD_DEVICE 0x0211
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                                                 \
  {                                                                                                                                  \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'F', 'l', 'i', 'g', 'h', 't', ' ', 'S', 'i', 'm', ' ', 'C', 'o', 'n', 't', 'r', 'o', 'l', 's' \
  }
#define PRODUCT_NAME_LEN 26
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 3
#define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
#define FLIGHTSIM_TX_ENDPOINT 3
#define FLIGHTSIM_TX_SIZE 64
#define FLIGHTSIM_TX_INTERVAL 1
#define FLIGHTSIM_RX_ENDPOINT 3
#define FLIGHTSIM_RX_SIZE 64
#define FLIGHTSIM_RX_INTERVAL 1
#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define JOYSTICK_INTERFACE 2 // Joystick
#define JOYSTICK_ENDPOINT 4
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 1
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_MTPDISK)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D1
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                          \
  {                                                                           \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'T', 'P', ' ', 'D', 'i', 's', 'k' \
  }
#define PRODUCT_NAME_LEN 15
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 2
#define MTP_INTERFACE 0 // MTP Disk
#define MTP_TX_ENDPOINT 3
#define MTP_TX_SIZE_12 64
#define MTP_TX_SIZE_480 512
#define MTP_RX_ENDPOINT 3
#define MTP_RX_SIZE_12 64
#define MTP_RX_SIZE_480 512
#define MTP_EVENT_ENDPOINT 4
#define MTP_EVENT_SIZE 32
#define MTP_EVENT_INTERVAL_12 10 // 10 = 10 ms
#define MTP_EVENT_INTERVAL_480 7 // 7 = 8 ms
#define SEREMU_INTERFACE 1       // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT

#elif defined(USB_AUDIO)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x04D2
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                           \
  {                                                            \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'A', 'u', 'd', 'i', 'o' \
  }
#define PRODUCT_NAME_LEN 12
#define EP0_SIZE 64
#define NUM_ENDPOINTS 4
#define NUM_INTERFACE 4
#define SEREMU_INTERFACE 0 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2
#define AUDIO_INTERFACE 1 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 3
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 3
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 4
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS + ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_ISOCHRONOUS

#elif defined(USB_MIDI_AUDIO_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048A
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                    \
  {                                                                                     \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', '/', 'A', 'u', 'd', 'i', 'o' \
  }
#define PRODUCT_NAME_LEN 17
#define EP0_SIZE 64
#define NUM_ENDPOINTS 6
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 5
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 5
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 6
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS + ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_ISOCHRONOUS

#elif defined(USB_MIDI16_AUDIO_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048A
#define BCD_DEVICE 0x0212
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                                                   \
  {                                                                                                    \
    'T', 'e', 'e', 'n', 's', 'y', ' ', 'M', 'I', 'D', 'I', 'x', '1', '6', '/', 'A', 'u', 'd', 'i', 'o' \
  }
#define PRODUCT_NAME_LEN 20
#define EP0_SIZE 64
#define NUM_ENDPOINTS 8
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 5
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 5
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 6
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS + ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_ISOCHRONOUS

#elif defined(USB_EVERYTHING)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0476
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200      // recommended: 0x0100 to 0xFFFF
#define DEVICE_CLASS 0xEF
#define DEVICE_SUBCLASS 0x02
#define DEVICE_PROTOCOL 0x01
#define MANUFACTURER_NAME                                 \
  {                                                       \
    'T', 'e', 'e', 'n', 's', 'y', 'd', 'u', 'i', 'n', 'o' \
  }
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME                                                     \
  {                                                                      \
    'A', 'l', 'l', ' ', 'T', 'h', 'e', ' ', 'T', 'h', 'i', 'n', 'g', 's' \
  }
#define PRODUCT_NAME_LEN 14
#define EP0_SIZE 64
#define NUM_ENDPOINTS 15
#define NUM_INTERFACE 13
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 2
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 3
#define MIDI_TX_SIZE 64
#define MIDI_RX_ENDPOINT 3
#define MIDI_RX_SIZE 64
#define KEYBOARD_INTERFACE 3 // Keyboard
#define KEYBOARD_ENDPOINT 4
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define MOUSE_INTERFACE 4 // Mouse
#define MOUSE_ENDPOINT 5
#define MOUSE_SIZE 8
#define MOUSE_INTERVAL 2
#define RAWHID_INTERFACE 5 // RawHID
#define RAWHID_TX_ENDPOINT 6
#define RAWHID_TX_SIZE 64
#define RAWHID_TX_INTERVAL 1
#define RAWHID_RX_ENDPOINT 6
#define RAWHID_RX_SIZE 64
#define RAWHID_RX_INTERVAL 1
#define FLIGHTSIM_INTERFACE 6 // Flight Sim Control
#define FLIGHTSIM_TX_ENDPOINT 9
#define FLIGHTSIM_TX_SIZE 64
#define FLIGHTSIM_TX_INTERVAL 1
#define FLIGHTSIM_RX_ENDPOINT 9
#define FLIGHTSIM_RX_SIZE 64
#define FLIGHTSIM_RX_INTERVAL 1
#define JOYSTICK_INTERFACE 7 // Joystick
#define JOYSTICK_ENDPOINT 10
#define JOYSTICK_SIZE 12 //  12 = normal, 64 = extreme joystick
#define JOYSTICK_INTERVAL 1
/*
  #define MTP_INTERFACE		8	// MTP Disk
  #define MTP_TX_ENDPOINT	11
  #define MTP_TX_SIZE		64
  #define MTP_RX_ENDPOINT	3
  #define MTP_RX_SIZE		64
  #define MTP_EVENT_ENDPOINT	11
  #define MTP_EVENT_SIZE	16
  #define MTP_EVENT_INTERVAL	10
*/
#define KEYMEDIA_INTERFACE 8 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 12
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define AUDIO_INTERFACE 9 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 13
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 13
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 14
#define MULTITOUCH_INTERFACE 12 // Touchscreen
#define MULTITOUCH_ENDPOINT 15
#define MULTITOUCH_SIZE 9
#define MULTITOUCH_FINGERS 10
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT4_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT7_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT9_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT10_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT11_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
#define ENDPOINT12_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT13_CONFIG (ENDPOINT_RECEIVE_ISOCHRONOUS | ENDPOINT_TRANSMIT_ISOCHRONOUS)
#define ENDPOINT14_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT15_CONFIG ENDPOINT_TRANSMIT_ONLY

#elif defined(USB_KEYBOARD_MIDI) // ADDED BY PJC 20200821
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485

#define MANUFACTURER_NAME                                                \
  {                                                                      \
    'P', 'h', 'i', 'l', 's', ' ', 'W', 'o', 'r', 'k', 's', 'h', 'o', 'p' \
  }
#define MANUFACTURER_NAME_LEN 14
#define PRODUCT_NAME                  \
  {                                   \
    'J', 'y', 'n', 'x', 'I', 'I', 'I' \
  }
#define PRODUCT_NAME_LEN 7
#define EP0_SIZE 64
#define NUM_ENDPOINTS 5
#define NUM_USB_BUFFERS 16
#define NUM_INTERFACE 3 // keymedia switched off

#define SEREMU_INTERFACE 1 // Serial emulation
#define SEREMU_TX_ENDPOINT 2
#define SEREMU_TX_SIZE 64
#define SEREMU_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
#define SEREMU_RX_ENDPOINT 2
#define SEREMU_RX_SIZE 32
#define SEREMU_RX_INTERVAL 2 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT // serial tx & rx

#define KEYBOARD_INTERFACE 2 // Keyboard
#define KEYBOARD_ENDPOINT 3
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 10 // the original "1" here was causing missed keys
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT //keyboard

/* #define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 5
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4 // TODO: is this ok for 480 Mbit speed
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT // keymedia */ 

#define MIDI_INTERFACE 3 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 4
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define ENDPOINT4_CONFIG	ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
 
#elif defined(USB_KEYBOARD_MIDI_SERIAL)         // ADDED BY PJC 20200821
/*
TODO: this is bollocks and needs to closey follow the section above
*/
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
#define MANUFACTURER_NAME                                                \
  {                                                                      \
    'P', 'h', 'i', 'l', 's', ' ', 'W', 'o', 'r', 'k', 's', 'h', 'o', 'p' \
  }
#define MANUFACTURER_NAME_LEN 14
#define PRODUCT_NAME                  \
  {                                   \
    'J', 'y', 'n', 'x', 'I', 'I', 'I' \
  }

#define PRODUCT_NAME_LEN 7
#define EP0_SIZE 64
#define NUM_ENDPOINTS 7
#define NUM_USB_BUFFERS 30
#define NUM_INTERFACE 4
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 6
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 6
#define MIDI_TX_SIZE 64
#define MIDI_TX_SIZE_12 64
#define MIDI_TX_SIZE_480 512
#define MIDI_RX_ENDPOINT 7
#define MIDI_RX_SIZE 64
#define MIDI_RX_SIZE_12 64
#define MIDI_RX_SIZE_480 512
#define KEYBOARD_INTERFACE 3 // Keyboard
#define KEYBOARD_ENDPOINT 4
#define KEYBOARD_SIZE 8
#define KEYBOARD_INTERVAL 1
#define KEYMEDIA_INTERFACE 4 // Keyboard Media Keys
#define KEYMEDIA_ENDPOINT 5
#define KEYMEDIA_SIZE 8
#define KEYMEDIA_INTERVAL 4
#define ENDPOINT1_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ONLY
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ONLY
#endif

#ifdef USB_DESC_LIST_DEFINE
#if defined(NUM_ENDPOINTS) && NUM_ENDPOINTS > 0
// NUM_ENDPOINTS = number of non-zero endpoints (0 to 7)
extern const uint32_t usb_endpoint_config_table[NUM_ENDPOINTS];

typedef struct
{
  uint16_t wValue;
  uint16_t wIndex;
  const uint8_t *addr;
  uint16_t length;
} usb_descriptor_list_t;

extern const usb_descriptor_list_t usb_descriptor_list[];
#endif // NUM_ENDPOINTS
#endif // USB_DESC_LIST_DEFINE

usb_desc.c
Code:
/* Teensyduino Core Library
 * http://www.pjrc.com/teensy/
 * Copyright (c) 2019 PJRC.COM, LLC.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * 1. The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * 2. If the Software is incorporated into a build system that allows
 * selection among a list of target devices, then similar target
 * devices manufactured by PJRC.COM must be included in the list of
 * target devices and selectable in the same manner.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

//#if F_CPU >= 20000000

#define USB_DESC_LIST_DEFINE
#include "usb_desc.h"
#ifdef NUM_ENDPOINTS
#include "usb_names.h"
#include "imxrt.h"
#include "avr_functions.h"
#include "avr/pgmspace.h"

// At very slow CPU speeds, the OCRAM just isn't fast enough for
// USB to work reliably.  But the precious/limited DTCM is.  So
// as an ugly workaround, undefine DMAMEM so all buffers which
// would normally be allocated in OCRAM are placed in DTCM.
#if defined(F_CPU) && F_CPU < 30000000
#undef DMAMEM
#endif

// USB Descriptors are binary data which the USB host reads to
// automatically detect a USB device's capabilities.  The format
// and meaning of every field is documented in numerous USB
// standards.  When working with USB descriptors, despite the
// complexity of the standards and poor writing quality in many
// of those documents, remember descriptors are nothing more
// than constant binary data that tells the USB host what the
// device can do.  Computers will load drivers based on this data.
// Those drivers then communicate on the endpoints specified by
// the descriptors.

// To configure a new combination of interfaces or make minor
// changes to existing configuration (eg, change the name or ID
// numbers), usually you would edit "usb_desc.h".  This file
// is meant to be configured by the header, so generally it is
// only edited to add completely new USB interfaces or features.



// **************************************************************
//   USB Device
// **************************************************************

#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[] = {
        18,                                     // bLength
        1,                                      // bDescriptorType
        0x00, 0x02,                             // bcdUSB
#ifdef DEVICE_CLASS
        DEVICE_CLASS,                           // bDeviceClass
#else
	0,
#endif
#ifdef DEVICE_SUBCLASS
        DEVICE_SUBCLASS,                        // bDeviceSubClass
#else
	0,
#endif
#ifdef DEVICE_PROTOCOL
        DEVICE_PROTOCOL,                        // bDeviceProtocol
#else
	0,
#endif
        EP0_SIZE,                               // bMaxPacketSize0
        LSB(VENDOR_ID), MSB(VENDOR_ID),         // idVendor
        LSB(PRODUCT_ID), MSB(PRODUCT_ID),       // idProduct
#ifdef BCD_DEVICE
	LSB(BCD_DEVICE), MSB(BCD_DEVICE),       // bcdDevice
#else
  // For USB types that don't explicitly define BCD_DEVICE,
  // use the minor version number to help teensy_ports
  // identify which Teensy model is used.
  #if defined(__IMXRT1062__) && defined(ARDUINO_TEENSY40)
        0x79, 0x02, // Teensy 4.0
  #elif defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41)
        0x80, 0x02, // Teensy 4.1
  #elif defined(__IMXRT1062__) && defined(ARDUINO_TEENSY_MICROMOD)
        0x81, 0x02, // Teensy MicroMod
  #else
        0x00, 0x02,
  #endif
#endif
        1,                                      // iManufacturer
        2,                                      // iProduct
        3,                                      // iSerialNumber
        1                                       // bNumConfigurations
};

PROGMEM static const uint8_t qualifier_descriptor[] = {	// 9.6.2 Device_Qualifier, page 264
	10,					// bLength
	6,					// bDescriptorType
	0x00, 0x02,				// bcdUSB
#ifdef DEVICE_CLASS
        DEVICE_CLASS,                           // bDeviceClass
#else
	0,
#endif
#ifdef DEVICE_SUBCLASS
        DEVICE_SUBCLASS,                        // bDeviceSubClass
#else
	0,
#endif
#ifdef DEVICE_PROTOCOL
        DEVICE_PROTOCOL,                        // bDeviceProtocol
#else
	0,
#endif
        EP0_SIZE,                               // bMaxPacketSize0
        1,					// bNumConfigurations
        0                                       // bReserved
};

// These descriptors must NOT be "const", because the USB DMA
// has trouble accessing flash memory with enough bandwidth
// while the processor is executing from flash.



// **************************************************************
//   HID Report Descriptors
// **************************************************************

// Each HID interface needs a special report descriptor that tells
// the meaning and format of the data.

#ifdef KEYBOARD_INTERFACE
// Keyboard Protocol 1, HID 1.11 spec, Appendix B, page 59-60
static uint8_t keyboard_report_desc[] = {
        0x05, 0x01,                     // Usage Page (Generic Desktop),
        0x09, 0x06,                     // Usage (Keyboard),
        0xA1, 0x01,                     // Collection (Application),
        0x75, 0x01,                     //   Report Size (1),
        0x95, 0x08,                     //   Report Count (8),
        0x05, 0x07,                     //   Usage Page (Key Codes),
        0x19, 0xE0,                     //   Usage Minimum (224),
        0x29, 0xE7,                     //   Usage Maximum (231),
        0x15, 0x00,                     //   Logical Minimum (0),
        0x25, 0x01,                     //   Logical Maximum (1),
        0x81, 0x02,                     //   Input (Data, Variable, Absolute), ;Modifier keys
        0x95, 0x01,                     //   Report Count (1),
        0x75, 0x08,                     //   Report Size (8),
        0x81, 0x03,                     //   Input (Constant),          ;Reserved byte
        0x95, 0x05,                     //   Report Count (5),
        0x75, 0x01,                     //   Report Size (1),
        0x05, 0x08,                     //   Usage Page (LEDs),
        0x19, 0x01,                     //   Usage Minimum (1),
        0x29, 0x05,                     //   Usage Maximum (5),
        0x91, 0x02,                     //   Output (Data, Variable, Absolute), ;LED report
        0x95, 0x01,                     //   Report Count (1),
        0x75, 0x03,                     //   Report Size (3),
        0x91, 0x03,                     //   Output (Constant),         ;LED report padding
        0x95, 0x06,                     //   Report Count (6),
        0x75, 0x08,                     //   Report Size (8),
        0x15, 0x00,                     //   Logical Minimum (0),
        0x25, 0x7F,                     //   Logical Maximum(104),
        0x05, 0x07,                     //   Usage Page (Key Codes),
        0x19, 0x00,                     //   Usage Minimum (0),
        0x29, 0x7F,                     //   Usage Maximum (104),
        0x81, 0x00,                     //   Input (Data, Array),       ;Normal keys
        0xC0                            // End Collection
};
#endif

#ifdef KEYMEDIA_INTERFACE
static uint8_t keymedia_report_desc[] = {
        0x05, 0x0C,                     // Usage Page (Consumer)
        0x09, 0x01,                     // Usage (Consumer Controls)
        0xA1, 0x01,                     // Collection (Application)
        0x75, 0x0A,                     //   Report Size (10)
        0x95, 0x04,                     //   Report Count (4)
        0x19, 0x00,                     //   Usage Minimum (0)
        0x2A, 0x9C, 0x02,               //   Usage Maximum (0x29C)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x26, 0x9C, 0x02,               //   Logical Maximum (0x29C)
        0x81, 0x00,                     //   Input (Data, Array)
        0x05, 0x01,                     //   Usage Page (Generic Desktop)
        0x75, 0x08,                     //   Report Size (8)
        0x95, 0x03,                     //   Report Count (3)
        0x19, 0x00,                     //   Usage Minimum (0)
        0x29, 0xB7,                     //   Usage Maximum (0xB7)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x26, 0xB7, 0x00,               //   Logical Maximum (0xB7)
        0x81, 0x00,                     //   Input (Data, Array)
        0xC0                            // End Collection
};
#endif

#ifdef MOUSE_INTERFACE
// Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension
static uint8_t mouse_report_desc[] = {
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x02,                     // Usage (Mouse)
        0xA1, 0x01,                     // Collection (Application)
        0x85, 0x01,                     //   REPORT_ID (1)
        0x05, 0x09,                     //   Usage Page (Button)
        0x19, 0x01,                     //   Usage Minimum (Button #1)
        0x29, 0x08,                     //   Usage Maximum (Button #8)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x25, 0x01,                     //   Logical Maximum (1)
        0x95, 0x08,                     //   Report Count (8)
        0x75, 0x01,                     //   Report Size (1)
        0x81, 0x02,                     //   Input (Data, Variable, Absolute)
        0x05, 0x01,                     //   Usage Page (Generic Desktop)
        0x09, 0x30,                     //   Usage (X)
        0x09, 0x31,                     //   Usage (Y)
        0x09, 0x38,                     //   Usage (Wheel)
        0x15, 0x81,                     //   Logical Minimum (-127)
        0x25, 0x7F,                     //   Logical Maximum (127)
        0x75, 0x08,                     //   Report Size (8),
        0x95, 0x03,                     //   Report Count (3),
        0x81, 0x06,                     //   Input (Data, Variable, Relative)
        0x05, 0x0C,                     //   Usage Page (Consumer)
        0x0A, 0x38, 0x02,               //   Usage (AC Pan)
        0x15, 0x81,                     //   Logical Minimum (-127)
        0x25, 0x7F,                     //   Logical Maximum (127)
        0x75, 0x08,                     //   Report Size (8),
        0x95, 0x01,                     //   Report Count (1),
        0x81, 0x06,                     //   Input (Data, Variable, Relative)
        0xC0,                           // End Collection
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x02,                     // Usage (Mouse)
        0xA1, 0x01,                     // Collection (Application)
        0x85, 0x02,                     //   REPORT_ID (2)
        0x05, 0x01,                     //   Usage Page (Generic Desktop)
        0x09, 0x30,                     //   Usage (X)
        0x09, 0x31,                     //   Usage (Y)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x26, 0xFF, 0x7F,               //   Logical Maximum (32767)
        0x75, 0x10,                     //   Report Size (16),
        0x95, 0x02,                     //   Report Count (2),
        0x81, 0x02,                     //   Input (Data, Variable, Absolute)
        0xC0                            // End Collection
};
#endif

#ifdef JOYSTICK_INTERFACE
#if JOYSTICK_SIZE == 12
static uint8_t joystick_report_desc[] = {
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x04,                     // Usage (Joystick)
        0xA1, 0x01,                     // Collection (Application)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x25, 0x01,                     //   Logical Maximum (1)
        0x75, 0x01,                     //   Report Size (1)
        0x95, 0x20,                     //   Report Count (32)
        0x05, 0x09,                     //   Usage Page (Button)
        0x19, 0x01,                     //   Usage Minimum (Button #1)
        0x29, 0x20,                     //   Usage Maximum (Button #32)
        0x81, 0x02,                     //   Input (variable,absolute)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x25, 0x07,                     //   Logical Maximum (7)
        0x35, 0x00,                     //   Physical Minimum (0)
        0x46, 0x3B, 0x01,               //   Physical Maximum (315)
        0x75, 0x04,                     //   Report Size (4)
        0x95, 0x01,                     //   Report Count (1)
        0x65, 0x14,                     //   Unit (20)
        0x05, 0x01,                     //   Usage Page (Generic Desktop)
        0x09, 0x39,                     //   Usage (Hat switch)
        0x81, 0x42,                     //   Input (variable,absolute,null_state)
        0x05, 0x01,                     //   Usage Page (Generic Desktop)
        0x09, 0x01,                     //   Usage (Pointer)
        0xA1, 0x00,                     //   Collection ()
        0x15, 0x00,                     //     Logical Minimum (0)
        0x26, 0xFF, 0x03,               //     Logical Maximum (1023)
        0x75, 0x0A,                     //     Report Size (10)
        0x95, 0x04,                     //     Report Count (4)
        0x09, 0x30,                     //     Usage (X)
        0x09, 0x31,                     //     Usage (Y)
        0x09, 0x32,                     //     Usage (Z)
        0x09, 0x35,                     //     Usage (Rz)
        0x81, 0x02,                     //     Input (variable,absolute)
        0xC0,                           //   End Collection
        0x15, 0x00,                     //   Logical Minimum (0)
        0x26, 0xFF, 0x03,               //   Logical Maximum (1023)
        0x75, 0x0A,                     //   Report Size (10)
        0x95, 0x02,                     //   Report Count (2)
        0x09, 0x36,                     //   Usage (Slider)
        0x09, 0x36,                     //   Usage (Slider)
        0x81, 0x02,                     //   Input (variable,absolute)
        0xC0                            // End Collection
};
#elif JOYSTICK_SIZE == 64
// extreme joystick  (to use this, edit JOYSTICK_SIZE to 64 in usb_desc.h)
//  128 buttons   16
//    6 axes      12
//   17 sliders   34
//    4 pov        2
static uint8_t joystick_report_desc[] = {
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x04,                     // Usage (Joystick)
        0xA1, 0x01,                     // Collection (Application)
        0x15, 0x00,                     // Logical Minimum (0)
        0x25, 0x01,                     // Logical Maximum (1)
        0x75, 0x01,                     // Report Size (1)
        0x95, 0x80,                     // Report Count (128)
        0x05, 0x09,                     // Usage Page (Button)
        0x19, 0x01,                     // Usage Minimum (Button #1)
        0x29, 0x80,                     // Usage Maximum (Button #128)
        0x81, 0x02,                     // Input (variable,absolute)
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x01,                     // Usage (Pointer)
        0xA1, 0x00,                     // Collection ()
        0x15, 0x00,                     // Logical Minimum (0)
        0x27, 0xFF, 0xFF, 0, 0,         // Logical Maximum (65535)
        0x75, 0x10,                     // Report Size (16)
        0x95, 23,                       // Report Count (23)
        0x09, 0x30,                     // Usage (X)
        0x09, 0x31,                     // Usage (Y)
        0x09, 0x32,                     // Usage (Z)
        0x09, 0x33,                     // Usage (Rx)
        0x09, 0x34,                     // Usage (Ry)
        0x09, 0x35,                     // Usage (Rz)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x09, 0x36,                     // Usage (Slider)
        0x81, 0x02,                     // Input (variable,absolute)
        0xC0,                           // End Collection
        0x15, 0x00,                     // Logical Minimum (0)
        0x25, 0x07,                     // Logical Maximum (7)
        0x35, 0x00,                     // Physical Minimum (0)
        0x46, 0x3B, 0x01,               // Physical Maximum (315)
        0x75, 0x04,                     // Report Size (4)
        0x95, 0x04,                     // Report Count (4)
        0x65, 0x14,                     // Unit (20)
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x39,                     // Usage (Hat switch)
        0x09, 0x39,                     // Usage (Hat switch)
        0x09, 0x39,                     // Usage (Hat switch)
        0x09, 0x39,                     // Usage (Hat switch)
        0x81, 0x42,                     // Input (variable,absolute,null_state)
        0xC0                            // End Collection
};
#endif // JOYSTICK_SIZE
#endif // JOYSTICK_INTERFACE

#ifdef MULTITOUCH_INTERFACE
// https://forum.pjrc.com/threads/32331-USB-HID-Touchscreen-support-needed
// https://msdn.microsoft.com/en-us/library/windows/hardware/jj151563%28v=vs.85%29.aspx
// https://msdn.microsoft.com/en-us/library/windows/hardware/jj151565%28v=vs.85%29.aspx
// https://msdn.microsoft.com/en-us/library/windows/hardware/ff553734%28v=vs.85%29.aspx
// https://msdn.microsoft.com/en-us/library/windows/hardware/jj151564%28v=vs.85%29.aspx
// download.microsoft.com/download/a/d/f/adf1347d-08dc-41a4-9084-623b1194d4b2/digitizerdrvs_touch.docx
static uint8_t multitouch_report_desc[] = {
        0x05, 0x0D,                     // Usage Page (Digitizer)
        0x09, 0x04,                     // Usage (Touch Screen)
        0xa1, 0x01,                     // Collection (Application)
        0x09, 0x22,                     //   Usage (Finger)
        0xA1, 0x02,                     //   Collection (Logical)
        0x09, 0x42,                     //     Usage (Tip Switch)
        0x15, 0x00,                     //     Logical Minimum (0)
        0x25, 0x01,                     //     Logical Maximum (1)
        0x75, 0x01,                     //     Report Size (1)
        0x95, 0x01,                     //     Report Count (1)
        0x81, 0x02,                     //     Input (variable,absolute)
        0x09, 0x51,                     //     Usage (Contact Identifier)
        0x25, 0x7F,                     //     Logical Maximum (127)
        0x75, 0x07,                     //     Report Size (7)
        0x95, 0x01,                     //     Report Count (1)
        0x81, 0x02,                     //     Input (variable,absolute)
        0x09, 0x30,                     //     Usage (Pressure)
        0x26, 0xFF, 0x00,               //     Logical Maximum (255)
        0x75, 0x08,                     //     Report Size (8)
        0x95, 0x01,                     //     Report Count (1)
        0x81, 0x02,                     //     Input (variable,absolute)
        0x05, 0x01,                     //     Usage Page (Generic Desktop)
        0x09, 0x30,                     //     Usage (X)
        0x09, 0x31,                     //     Usage (Y)
        0x26, 0xFF, 0x7F,               //     Logical Maximum (32767)
        0x65, 0x00,                     //     Unit (None)  <-- probably needs real units?
        0x75, 0x10,                     //     Report Size (16)
        0x95, 0x02,                     //     Report Count (2)
        0x81, 0x02,                     //     Input (variable,absolute)
        0xC0,                           //   End Collection
        0x05, 0x0D,                     //   Usage Page (Digitizer)
        0x27, 0xFF, 0xFF, 0, 0,         //   Logical Maximum (65535)
        0x75, 0x10,                     //   Report Size (16)
        0x95, 0x01,                     //   Report Count (1)
        0x09, 0x56,                     //   Usage (Scan Time)
        0x81, 0x02,                     //   Input (variable,absolute)
        0x09, 0x54,                     //   USAGE (Contact count)
        0x25, 0x7f,                     //   LOGICAL_MAXIMUM (127)
        0x95, 0x01,                     //   REPORT_COUNT (1)
        0x75, 0x08,                     //   REPORT_SIZE (8)
        0x81, 0x02,                     //   INPUT (Data,Var,Abs)
        0x05, 0x0D,                     //   Usage Page (Digitizers)
        0x09, 0x55,                     //   Usage (Contact Count Maximum)
        0x25, MULTITOUCH_FINGERS,       //   Logical Maximum (10)
        0x75, 0x08,                     //   Report Size (8)
        0x95, 0x01,                     //   Report Count (1)
        0xB1, 0x02,                     //   Feature (variable,absolute)
        0xC0                            // End Collection
};
#endif

#ifdef SEREMU_INTERFACE
static uint8_t seremu_report_desc[] = {
        0x06, 0xC9, 0xFF,               // Usage Page 0xFFC9 (vendor defined)
        0x09, 0x04,                     // Usage 0x04
        0xA1, 0x5C,                     // Collection 0x5C
        0x75, 0x08,                     //   report size = 8 bits (global)
        0x15, 0x00,                     //   logical minimum = 0 (global)
        0x26, 0xFF, 0x00,               //   logical maximum = 255 (global)
        0x95, SEREMU_TX_SIZE,           //   report count (global)
        0x09, 0x75,                     //   usage (local)
        0x81, 0x02,                     //   Input
        0x95, SEREMU_RX_SIZE,           //   report count (global)
        0x09, 0x76,                     //   usage (local)
        0x91, 0x02,                     //   Output
        0x95, 0x04,                     //   report count (global)
        0x09, 0x76,                     //   usage (local)
        0xB1, 0x02,                     //   Feature
        0xC0                            // end collection
};
#endif

#ifdef RAWHID_INTERFACE
static uint8_t rawhid_report_desc[] = {
        0x06, LSB(RAWHID_USAGE_PAGE), MSB(RAWHID_USAGE_PAGE),
        0x0A, LSB(RAWHID_USAGE), MSB(RAWHID_USAGE),
        0xA1, 0x01,                     // Collection 0x01
        0x75, 0x08,                     //   report size = 8 bits
        0x15, 0x00,                     //   logical minimum = 0
        0x26, 0xFF, 0x00,               //   logical maximum = 255
        0x95, RAWHID_TX_SIZE,           //   report count
        0x09, 0x01,                     //   usage
        0x81, 0x02,                     //   Input (array)
        0x95, RAWHID_RX_SIZE,           //   report count
        0x09, 0x02,                     //   usage
        0x91, 0x02,                     //   Output (array)
        0xC0                            // end collection
};
#endif

#ifdef FLIGHTSIM_INTERFACE
static uint8_t flightsim_report_desc[] = {
        0x06, 0x1C, 0xFF,               // Usage page = 0xFF1C
        0x0A, 0x39, 0xA7,               // Usage = 0xA739
        0xA1, 0x01,                     // Collection 0x01
        0x75, 0x08,                     //   report size = 8 bits
        0x15, 0x00,                     //   logical minimum = 0
        0x26, 0xFF, 0x00,               //   logical maximum = 255
        0x95, FLIGHTSIM_TX_SIZE,        //   report count
        0x09, 0x01,                     //   usage
        0x81, 0x02,                     //   Input (array)
        0x95, FLIGHTSIM_RX_SIZE,        //   report count
        0x09, 0x02,                     //   usage
        0x91, 0x02,                     //   Output (array)
        0xC0                            // end collection
};
#endif


// **************************************************************
//   USB Descriptor Sizes
// **************************************************************

// pre-compute the size and position of everything in the config descriptor
//
#define CONFIG_HEADER_DESCRIPTOR_SIZE	9

#define CDC_IAD_DESCRIPTOR_POS		CONFIG_HEADER_DESCRIPTOR_SIZE
#ifdef  CDC_IAD_DESCRIPTOR
#define CDC_IAD_DESCRIPTOR_SIZE		8
#else
#define CDC_IAD_DESCRIPTOR_SIZE		0
#endif

#define CDC_DATA_INTERFACE_DESC_POS	CDC_IAD_DESCRIPTOR_POS+CDC_IAD_DESCRIPTOR_SIZE
#ifdef  CDC_DATA_INTERFACE
#define CDC_DATA_INTERFACE_DESC_SIZE	9+5+5+4+5+7+9+7+7
#else
#define CDC_DATA_INTERFACE_DESC_SIZE	0
#endif

#define CDC2_DATA_INTERFACE_DESC_POS    CDC_DATA_INTERFACE_DESC_POS+CDC_DATA_INTERFACE_DESC_SIZE
#ifdef  CDC2_DATA_INTERFACE
#define CDC2_DATA_INTERFACE_DESC_SIZE   8 + 9+5+5+4+5+7+9+7+7
#else
#define CDC2_DATA_INTERFACE_DESC_SIZE   0
#endif

#define CDC3_DATA_INTERFACE_DESC_POS    CDC2_DATA_INTERFACE_DESC_POS+CDC2_DATA_INTERFACE_DESC_SIZE
#ifdef  CDC3_DATA_INTERFACE
#define CDC3_DATA_INTERFACE_DESC_SIZE   8 + 9+5+5+4+5+7+9+7+7
#else
#define CDC3_DATA_INTERFACE_DESC_SIZE   0
#endif

#define MIDI_INTERFACE_DESC_POS		CDC3_DATA_INTERFACE_DESC_POS+CDC3_DATA_INTERFACE_DESC_SIZE
#ifdef  MIDI_INTERFACE
  #if !defined(MIDI_NUM_CABLES) || MIDI_NUM_CABLES < 1 || MIDI_NUM_CABLES > 16
  #error "MIDI_NUM_CABLES must be defined between 1 to 16"
  #endif
#define MIDI_INTERFACE_DESC_SIZE	9+7+((6+6+9+9)*MIDI_NUM_CABLES)+(9+4+MIDI_NUM_CABLES)*2
#else
#define MIDI_INTERFACE_DESC_SIZE	0
#endif

#define KEYBOARD_INTERFACE_DESC_POS	MIDI_INTERFACE_DESC_POS+MIDI_INTERFACE_DESC_SIZE
#ifdef  KEYBOARD_INTERFACE
#define KEYBOARD_INTERFACE_DESC_SIZE	9+9+7
#define KEYBOARD_HID_DESC_OFFSET	KEYBOARD_INTERFACE_DESC_POS+9
#else
#define KEYBOARD_INTERFACE_DESC_SIZE	0
#endif

#define MOUSE_INTERFACE_DESC_POS	KEYBOARD_INTERFACE_DESC_POS+KEYBOARD_INTERFACE_DESC_SIZE
#ifdef  MOUSE_INTERFACE
#define MOUSE_INTERFACE_DESC_SIZE	9+9+7
#define MOUSE_HID_DESC_OFFSET		MOUSE_INTERFACE_DESC_POS+9
#else
#define MOUSE_INTERFACE_DESC_SIZE	0
#endif

#define RAWHID_INTERFACE_DESC_POS	MOUSE_INTERFACE_DESC_POS+MOUSE_INTERFACE_DESC_SIZE
#ifdef  RAWHID_INTERFACE
#define RAWHID_INTERFACE_DESC_SIZE	9+9+7+7
#define RAWHID_HID_DESC_OFFSET		RAWHID_INTERFACE_DESC_POS+9
#else
#define RAWHID_INTERFACE_DESC_SIZE	0
#endif

#define FLIGHTSIM_INTERFACE_DESC_POS	RAWHID_INTERFACE_DESC_POS+RAWHID_INTERFACE_DESC_SIZE
#ifdef  FLIGHTSIM_INTERFACE
#define FLIGHTSIM_INTERFACE_DESC_SIZE	9+9+7+7
#define FLIGHTSIM_HID_DESC_OFFSET	FLIGHTSIM_INTERFACE_DESC_POS+9
#else
#define FLIGHTSIM_INTERFACE_DESC_SIZE	0
#endif

#define SEREMU_INTERFACE_DESC_POS	FLIGHTSIM_INTERFACE_DESC_POS+FLIGHTSIM_INTERFACE_DESC_SIZE
#ifdef  SEREMU_INTERFACE
#define SEREMU_INTERFACE_DESC_SIZE	9+9+7+7
#define SEREMU_HID_DESC_OFFSET		SEREMU_INTERFACE_DESC_POS+9
#else
#define SEREMU_INTERFACE_DESC_SIZE	0
#endif

#define JOYSTICK_INTERFACE_DESC_POS	SEREMU_INTERFACE_DESC_POS+SEREMU_INTERFACE_DESC_SIZE
#ifdef  JOYSTICK_INTERFACE
#define JOYSTICK_INTERFACE_DESC_SIZE	9+9+7
#define JOYSTICK_HID_DESC_OFFSET	JOYSTICK_INTERFACE_DESC_POS+9
#else
#define JOYSTICK_INTERFACE_DESC_SIZE	0
#endif

#define MTP_INTERFACE_DESC_POS		JOYSTICK_INTERFACE_DESC_POS+JOYSTICK_INTERFACE_DESC_SIZE
#ifdef  MTP_INTERFACE
#define MTP_INTERFACE_DESC_SIZE		9+7+7+7
#else
#define MTP_INTERFACE_DESC_SIZE	0
#endif

#define KEYMEDIA_INTERFACE_DESC_POS	MTP_INTERFACE_DESC_POS+MTP_INTERFACE_DESC_SIZE
#ifdef  KEYMEDIA_INTERFACE
#define KEYMEDIA_INTERFACE_DESC_SIZE	9+9+7
#define KEYMEDIA_HID_DESC_OFFSET	KEYMEDIA_INTERFACE_DESC_POS+9
#else
#define KEYMEDIA_INTERFACE_DESC_SIZE	0
#endif

#define AUDIO_INTERFACE_DESC_POS	KEYMEDIA_INTERFACE_DESC_POS+KEYMEDIA_INTERFACE_DESC_SIZE
#ifdef  AUDIO_INTERFACE
#define AUDIO_INTERFACE_DESC_SIZE	8 + 9+10+12+9+12+10+9 + 9+9+7+11+9+7 + 9+9+7+11+9+7+9
#else
#define AUDIO_INTERFACE_DESC_SIZE	0
#endif

#define MULTITOUCH_INTERFACE_DESC_POS	AUDIO_INTERFACE_DESC_POS+AUDIO_INTERFACE_DESC_SIZE
#ifdef  MULTITOUCH_INTERFACE
#define MULTITOUCH_INTERFACE_DESC_SIZE	9+9+7
#define MULTITOUCH_HID_DESC_OFFSET	MULTITOUCH_INTERFACE_DESC_POS+9
#else
#define MULTITOUCH_INTERFACE_DESC_SIZE	0
#endif

#define EXPERIMENTAL_INTERFACE_DESC_POS	MULTITOUCH_INTERFACE_DESC_POS+MULTITOUCH_INTERFACE_DESC_SIZE
#ifdef  EXPERIMENTAL_INTERFACE
#define EXPERIMENTAL_INTERFACE_DESC_SIZE 9+7+7
#define EXPERIMENTAL_HID_DESC_OFFSET	MULTITOUCH_INTERFACE_DESC_POS+9
#else
#define EXPERIMENTAL_INTERFACE_DESC_SIZE 0
#endif

#define CONFIG_DESC_SIZE		EXPERIMENTAL_INTERFACE_DESC_POS+EXPERIMENTAL_INTERFACE_DESC_SIZE



// **************************************************************
//   USB Configuration
// **************************************************************

// USB Configuration Descriptor.  This huge descriptor tells all
// of the devices capabilities.

PROGMEM const uint8_t usb_config_descriptor_480[CONFIG_DESC_SIZE] = {
        // configuration descriptor, USB spec 9.6.3, page 264-266, Table 9-10
        9,                                      // bLength;
        2,                                      // bDescriptorType;
        LSB(CONFIG_DESC_SIZE),                 // wTotalLength
        MSB(CONFIG_DESC_SIZE),
        NUM_INTERFACE,                          // bNumInterfaces
        1,                                      // bConfigurationValue
        0,                                      // iConfiguration
        0xC0,                                   // bmAttributes
        50,                                     // bMaxPower

#ifdef CDC_IAD_DESCRIPTOR
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        CDC_STATUS_INTERFACE,                   // bFirstInterface
        2,                                      // bInterfaceCount
        0x02,                                   // bFunctionClass
        0x02,                                   // bFunctionSubClass
        0x01,                                   // bFunctionProtocol
        0,                                      // iFunction
#endif

#ifdef CDC_DATA_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC_STATUS_INTERFACE,			// bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x02,                                   // bInterfaceClass
        0x02,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x00,                                   // bDescriptorSubtype
        0x10, 0x01,                             // bcdCDC
        // Call Management Functional Descriptor, CDC Spec 5.2.3.2, Table 27
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x01,                                   // bDescriptorSubtype
        0x01,                                   // bmCapabilities
        1,                                      // bDataInterface
        // Abstract Control Management Functional Descriptor, CDC Spec 5.2.3.3, Table 28
        4,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x02,                                   // bDescriptorSubtype
        0x06,                                   // bmCapabilities
        // Union Functional Descriptor, CDC Spec 5.2.3.8, Table 33
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x06,                                   // bDescriptorSubtype
        CDC_STATUS_INTERFACE,                   // bMasterInterface
        CDC_DATA_INTERFACE,                     // bSlaveInterface0
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC_ACM_ENDPOINT | 0x80,                // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        LSB(CDC_ACM_SIZE),MSB(CDC_ACM_SIZE),    // wMaxPacketSize
        5,                                      // bInterval
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC_DATA_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x0A,                                   // bInterfaceClass
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC_RX_ENDPOINT,                        // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_RX_SIZE_480),MSB(CDC_RX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC_TX_ENDPOINT | 0x80,                 // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_TX_SIZE_480),MSB(CDC_TX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
#endif // CDC_DATA_INTERFACE

#ifdef CDC2_DATA_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        CDC2_STATUS_INTERFACE,                  // bFirstInterface
        2,                                      // bInterfaceCount
        0x02,                                   // bFunctionClass
        0x02,                                   // bFunctionSubClass
        0x01,                                   // bFunctionProtocol
        0,                                      // iFunction
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC2_STATUS_INTERFACE,                  // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x02,                                   // bInterfaceClass
        0x02,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x00,                                   // bDescriptorSubtype
        0x10, 0x01,                             // bcdCDC
        // Call Management Functional Descriptor, CDC Spec 5.2.3.2, Table 27
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x01,                                   // bDescriptorSubtype
        0x01,                                   // bmCapabilities
        1,                                      // bDataInterface
        // Abstract Control Management Functional Descriptor, CDC Spec 5.2.3.3, Table 28
        4,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x02,                                   // bDescriptorSubtype
        0x06,                                   // bmCapabilities
        // Union Functional Descriptor, CDC Spec 5.2.3.8, Table 33
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x06,                                   // bDescriptorSubtype
        CDC2_STATUS_INTERFACE,                  // bMasterInterface
        CDC2_DATA_INTERFACE,                    // bSlaveInterface0
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC2_ACM_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        CDC_ACM_SIZE, 0,                        // wMaxPacketSize
        5,                                      // bInterval
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC2_DATA_INTERFACE,                    // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x0A,                                   // bInterfaceClass
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC2_RX_ENDPOINT,                       // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_RX_SIZE_480),MSB(CDC_RX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC2_TX_ENDPOINT | 0x80,                // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_TX_SIZE_480),MSB(CDC_TX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
#endif // CDC2_DATA_INTERFACE

#ifdef CDC3_DATA_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        CDC3_STATUS_INTERFACE,                  // bFirstInterface
        2,                                      // bInterfaceCount
        0x02,                                   // bFunctionClass
        0x02,                                   // bFunctionSubClass
        0x01,                                   // bFunctionProtocol
        0,                                      // iFunction
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC3_STATUS_INTERFACE,                  // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x02,                                   // bInterfaceClass
        0x02,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x00,                                   // bDescriptorSubtype
        0x10, 0x01,                             // bcdCDC
        // Call Management Functional Descriptor, CDC Spec 5.2.3.2, Table 27
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x01,                                   // bDescriptorSubtype
        0x01,                                   // bmCapabilities
        1,                                      // bDataInterface
        // Abstract Control Management Functional Descriptor, CDC Spec 5.2.3.3, Table 28
        4,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x02,                                   // bDescriptorSubtype
        0x06,                                   // bmCapabilities
        // Union Functional Descriptor, CDC Spec 5.2.3.8, Table 33
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x06,                                   // bDescriptorSubtype
        CDC3_STATUS_INTERFACE,                  // bMasterInterface
        CDC3_DATA_INTERFACE,                    // bSlaveInterface0
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC3_ACM_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        CDC_ACM_SIZE, 0,                        // wMaxPacketSize
        5,                                      // bInterval
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC3_DATA_INTERFACE,                    // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x0A,                                   // bInterfaceClass
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC3_RX_ENDPOINT,                       // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_RX_SIZE_480),MSB(CDC_RX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC3_TX_ENDPOINT | 0x80,                // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_TX_SIZE_480),MSB(CDC_TX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
#endif // CDC3_DATA_INTERFACE

#ifdef MIDI_INTERFACE
	// configuration for 480 Mbit/sec speed
        // Standard MS Interface Descriptor,
        9,                                      // bLength
        4,                                      // bDescriptorType
        MIDI_INTERFACE,                         // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x01,                                   // bInterfaceClass (0x01 = Audio)
        0x03,                                   // bInterfaceSubClass (0x03 = MIDI)
        0x00,                                   // bInterfaceProtocol (unused for MIDI)
        0,                                      // iInterface
        // MIDI MS Interface Header, USB MIDI 6.1.2.1, page 21, Table 6-2
        7,                                      // bLength
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x01,                                   // bDescriptorSubtype = MS_HEADER
        0x00, 0x01,                             // bcdMSC = revision 01.00
	LSB(7+(6+6+9+9)*MIDI_NUM_CABLES),       // wTotalLength
	MSB(7+(6+6+9+9)*MIDI_NUM_CABLES),
        // MIDI IN Jack Descriptor, B.4.3, Table B-7 (embedded), page 40
        6,                                      // bLength
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x02,                                   // bDescriptorSubtype = MIDI_IN_JACK
        0x01,                                   // bJackType = EMBEDDED
        1,                                      // bJackID, ID = 1
        0,                                      // iJack
        // MIDI IN Jack Descriptor, B.4.3, Table B-8 (external), page 40
        6,                                      // bLength
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x02,                                   // bDescriptorSubtype = MIDI_IN_JACK
        0x02,                                   // bJackType = EXTERNAL
        2,                                      // bJackID, ID = 2
        0,                                      // iJack
        // MIDI OUT Jack Descriptor, B.4.4, Table B-9, page 41
        9,
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x03,                                   // bDescriptorSubtype = MIDI_OUT_JACK
        0x01,                                   // bJackType = EMBEDDED
        3,                                      // bJackID, ID = 3
        1,                                      // bNrInputPins = 1 pin
        2,                                      // BaSourceID(1) = 2
        1,                                      // BaSourcePin(1) = first pin
        0,                                      // iJack
        // MIDI OUT Jack Descriptor, B.4.4, Table B-10, page 41
        9,
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x03,                                   // bDescriptorSubtype = MIDI_OUT_JACK
        0x02,                                   // bJackType = EXTERNAL
        4,                                      // bJackID, ID = 4
        1,                                      // bNrInputPins = 1 pin
        1,                                      // BaSourceID(1) = 1
        1,                                      // BaSourcePin(1) = first pin
        0,                                      // iJack
  #if MIDI_NUM_CABLES >= 2
	#define MIDI_INTERFACE_JACK_PAIR(a, b, c, d) \
		6, 0x24, 0x02, 0x01, (a), 0, \
		6, 0x24, 0x02, 0x02, (b), 0, \
		9, 0x24, 0x03, 0x01, (c), 1, (b), 1, 0, \
		9, 0x24, 0x03, 0x02, (d), 1, (a), 1, 0,
	MIDI_INTERFACE_JACK_PAIR(5, 6, 7, 8)
  #endif
  #if MIDI_NUM_CABLES >= 3
	MIDI_INTERFACE_JACK_PAIR(9, 10, 11, 12)
  #endif
  #if MIDI_NUM_CABLES >= 4
	MIDI_INTERFACE_JACK_PAIR(13, 14, 15, 16)
  #endif
  #if MIDI_NUM_CABLES >= 5
	MIDI_INTERFACE_JACK_PAIR(17, 18, 19, 20)
  #endif
  #if MIDI_NUM_CABLES >= 6
	MIDI_INTERFACE_JACK_PAIR(21, 22, 23, 24)
  #endif
  #if MIDI_NUM_CABLES >= 7
	MIDI_INTERFACE_JACK_PAIR(25, 26, 27, 28)
  #endif
  #if MIDI_NUM_CABLES >= 8
	MIDI_INTERFACE_JACK_PAIR(29, 30, 31, 32)
  #endif
  #if MIDI_NUM_CABLES >= 9
	MIDI_INTERFACE_JACK_PAIR(33, 34, 35, 36)
  #endif
  #if MIDI_NUM_CABLES >= 10
	MIDI_INTERFACE_JACK_PAIR(37, 38, 39, 40)
  #endif
  #if MIDI_NUM_CABLES >= 11
	MIDI_INTERFACE_JACK_PAIR(41, 42, 43, 44)
  #endif
  #if MIDI_NUM_CABLES >= 12
	MIDI_INTERFACE_JACK_PAIR(45, 46, 47, 48)
  #endif
  #if MIDI_NUM_CABLES >= 13
	MIDI_INTERFACE_JACK_PAIR(49, 50, 51, 52)
  #endif
  #if MIDI_NUM_CABLES >= 14
	MIDI_INTERFACE_JACK_PAIR(53, 54, 55, 56)
  #endif
  #if MIDI_NUM_CABLES >= 15
	MIDI_INTERFACE_JACK_PAIR(57, 58, 59, 60)
  #endif
  #if MIDI_NUM_CABLES >= 16
	MIDI_INTERFACE_JACK_PAIR(61, 62, 63, 64)
  #endif
        // Standard Bulk OUT Endpoint Descriptor, B.5.1, Table B-11, pae 42
        9,                                      // bLength
        5,                                      // bDescriptorType = ENDPOINT
        MIDI_RX_ENDPOINT,                       // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MIDI_RX_SIZE_480),MSB(MIDI_RX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
        0,                                      // bRefresh
        0,                                      // bSynchAddress
        // Class-specific MS Bulk OUT Endpoint Descriptor, B.5.2, Table B-12, page 42
        4+MIDI_NUM_CABLES,                      // bLength
        0x25,                                   // bDescriptorSubtype = CS_ENDPOINT
        0x01,                                   // bJackType = MS_GENERAL
        MIDI_NUM_CABLES,                        // bNumEmbMIDIJack = number of jacks
        1,                                      // BaAssocJackID(1) = jack ID #1
  #if MIDI_NUM_CABLES >= 2
        5,
  #endif
  #if MIDI_NUM_CABLES >= 3
        9,
  #endif
  #if MIDI_NUM_CABLES >= 4
        13,
  #endif
  #if MIDI_NUM_CABLES >= 5
        17,
  #endif
  #if MIDI_NUM_CABLES >= 6
        21,
  #endif
  #if MIDI_NUM_CABLES >= 7
        25,
  #endif
  #if MIDI_NUM_CABLES >= 8
        29,
  #endif
  #if MIDI_NUM_CABLES >= 9
        33,
  #endif
  #if MIDI_NUM_CABLES >= 10
        37,
  #endif
  #if MIDI_NUM_CABLES >= 11
        41,
  #endif
  #if MIDI_NUM_CABLES >= 12
        45,
  #endif
  #if MIDI_NUM_CABLES >= 13
        49,
  #endif
  #if MIDI_NUM_CABLES >= 14
        53,
  #endif
  #if MIDI_NUM_CABLES >= 15
        57,
  #endif
  #if MIDI_NUM_CABLES >= 16
        61,
  #endif
        // Standard Bulk IN Endpoint Descriptor, B.5.1, Table B-11, pae 42
        9,                                      // bLength
        5,                                      // bDescriptorType = ENDPOINT
        MIDI_TX_ENDPOINT | 0x80,                // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MIDI_TX_SIZE_480),MSB(MIDI_TX_SIZE_480),// wMaxPacketSize
        0,                                      // bInterval
        0,                                      // bRefresh
        0,                                      // bSynchAddress
        // Class-specific MS Bulk IN Endpoint Descriptor, B.5.2, Table B-12, page 42
        4+MIDI_NUM_CABLES,                      // bLength
        0x25,                                   // bDescriptorSubtype = CS_ENDPOINT
        0x01,                                   // bJackType = MS_GENERAL
        MIDI_NUM_CABLES,                        // bNumEmbMIDIJack = number of jacks
        3,                                      // BaAssocJackID(1) = jack ID #3
  #if MIDI_NUM_CABLES >= 2
        7,
  #endif
  #if MIDI_NUM_CABLES >= 3
        11,
  #endif
  #if MIDI_NUM_CABLES >= 4
        15,
  #endif
  #if MIDI_NUM_CABLES >= 5
        19,
  #endif
  #if MIDI_NUM_CABLES >= 6
        23,
  #endif
  #if MIDI_NUM_CABLES >= 7
        27,
  #endif
  #if MIDI_NUM_CABLES >= 8
        31,
  #endif
  #if MIDI_NUM_CABLES >= 9
        35,
  #endif
  #if MIDI_NUM_CABLES >= 10
        39,
  #endif
  #if MIDI_NUM_CABLES >= 11
        43,
  #endif
  #if MIDI_NUM_CABLES >= 12
        47,
  #endif
  #if MIDI_NUM_CABLES >= 13
        51,
  #endif
  #if MIDI_NUM_CABLES >= 14
        55,
  #endif
  #if MIDI_NUM_CABLES >= 15
        59,
  #endif
  #if MIDI_NUM_CABLES >= 16
        63,
  #endif
#endif // MIDI_INTERFACE

#ifdef KEYBOARD_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        KEYBOARD_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x01,                                   // bInterfaceSubClass (0x01 = Boot)
        0x01,                                   // bInterfaceProtocol (0x01 = Keyboard)
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(keyboard_report_desc)),      // wDescriptorLength
        MSB(sizeof(keyboard_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        KEYBOARD_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        KEYBOARD_SIZE, 0,                       // wMaxPacketSize
        KEYBOARD_INTERVAL,                      // bInterval
#endif // KEYBOARD_INTERFACE

#ifdef MOUSE_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        MOUSE_INTERFACE,                        // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass (0x01 = Boot)
        0x00,                                   // bInterfaceProtocol (0x02 = Mouse)
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(mouse_report_desc)),         // wDescriptorLength
        MSB(sizeof(mouse_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MOUSE_ENDPOINT | 0x80,                  // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        MOUSE_SIZE, 0,                          // wMaxPacketSize
        MOUSE_INTERVAL,                         // bInterval
#endif // MOUSE_INTERFACE

#ifdef RAWHID_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        RAWHID_INTERFACE,                       // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(rawhid_report_desc)),        // wDescriptorLength
        MSB(sizeof(rawhid_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        RAWHID_TX_ENDPOINT | 0x80,              // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        RAWHID_TX_SIZE, 0,                      // wMaxPacketSize
        RAWHID_TX_INTERVAL,                     // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        RAWHID_RX_ENDPOINT,                     // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        RAWHID_RX_SIZE, 0,                      // wMaxPacketSize
        RAWHID_RX_INTERVAL,			// bInterval
#endif // RAWHID_INTERFACE

#ifdef FLIGHTSIM_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        FLIGHTSIM_INTERFACE,                    // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(flightsim_report_desc)),     // wDescriptorLength
        MSB(sizeof(flightsim_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        FLIGHTSIM_TX_ENDPOINT | 0x80,           // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        FLIGHTSIM_TX_SIZE, 0,                   // wMaxPacketSize
        FLIGHTSIM_TX_INTERVAL,                  // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        FLIGHTSIM_RX_ENDPOINT,                  // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        FLIGHTSIM_RX_SIZE, 0,                   // wMaxPacketSize
        FLIGHTSIM_RX_INTERVAL,			// bInterval
#endif // FLIGHTSIM_INTERFACE

#ifdef SEREMU_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        SEREMU_INTERFACE,                       // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(seremu_report_desc)),        // wDescriptorLength
        MSB(sizeof(seremu_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        SEREMU_TX_ENDPOINT | 0x80,              // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        SEREMU_TX_SIZE, 0,                      // wMaxPacketSize
        SEREMU_TX_INTERVAL,                     // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        SEREMU_RX_ENDPOINT,                     // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        SEREMU_RX_SIZE, 0,                      // wMaxPacketSize
        SEREMU_RX_INTERVAL,			// bInterval
#endif // SEREMU_INTERFACE

#ifdef JOYSTICK_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        JOYSTICK_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(joystick_report_desc)),      // wDescriptorLength
        MSB(sizeof(joystick_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        JOYSTICK_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        JOYSTICK_SIZE, 0,                       // wMaxPacketSize
        JOYSTICK_INTERVAL,                      // bInterval
#endif // JOYSTICK_INTERFACE

#ifdef MTP_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        MTP_INTERFACE,                          // bInterfaceNumber
        0,                                      // bAlternateSetting
        3,                                      // bNumEndpoints
        0x06,                                   // bInterfaceClass (0x06 = still image)
        0x01,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MTP_TX_ENDPOINT | 0x80,                 // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MTP_TX_SIZE_480),MSB(MTP_TX_SIZE_480), // wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MTP_RX_ENDPOINT,                        // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MTP_RX_SIZE_480),MSB(MTP_RX_SIZE_480), // wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MTP_EVENT_ENDPOINT | 0x80,              // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        MTP_EVENT_SIZE, 0,                      // wMaxPacketSize
        MTP_EVENT_INTERVAL_480,                 // bInterval
#endif // MTP_INTERFACE

#ifdef KEYMEDIA_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        KEYMEDIA_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(keymedia_report_desc)),      // wDescriptorLength
        MSB(sizeof(keymedia_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        KEYMEDIA_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        KEYMEDIA_SIZE, 0,                       // wMaxPacketSize
        KEYMEDIA_INTERVAL,                      // bInterval
#endif // KEYMEDIA_INTERFACE

#ifdef AUDIO_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        AUDIO_INTERFACE,                        // bFirstInterface
        3,                                      // bInterfaceCount
        0x01,                                   // bFunctionClass
        0x01,                                   // bFunctionSubClass
        0x00,                                   // bFunctionProtocol
        0,                                      // iFunction
	// Standard AudioControl (AC) Interface Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-1, page 36
	9,					// bLength
	4,					// bDescriptorType, 4 = INTERFACE
	AUDIO_INTERFACE,			// bInterfaceNumber
	0,					// bAlternateSetting
	0,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	1,					// bInterfaceSubclass, 1 = AUDIO_CONTROL
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Class-specific AC Interface Header Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-2, page 37-38
	10,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	0x01,					// bDescriptorSubtype, 1 = HEADER
	0x00, 0x01,				// bcdADC (version 1.0)
	LSB(62), MSB(62),			// wTotalLength
	2,					// bInCollection
	AUDIO_INTERFACE+1,			// baInterfaceNr(1) - Transmit to PC
	AUDIO_INTERFACE+2,			// baInterfaceNr(2) - Receive from PC
	// Input Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-3, page 39
	12,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	0x02,					// bDescriptorSubType, 2 = INPUT_TERMINAL
	1,					// bTerminalID
	//0x01, 0x02,				// wTerminalType, 0x0201 = MICROPHONE
	//0x03, 0x06,				// wTerminalType, 0x0603 = Line Connector
	0x02, 0x06,				// wTerminalType, 0x0602 = Digital Audio
	0,					// bAssocTerminal, 0 = unidirectional
	2,					// bNrChannels
	0x03, 0x00,				// wChannelConfig, 0x0003 = Left & Right Front
	0,					// iChannelNames
	0, 					// iTerminal
	// Output Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-4, page 40
	9,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	3,					// bDescriptorSubtype, 3 = OUTPUT_TERMINAL
	2,					// bTerminalID
	0x01, 0x01,				// wTerminalType, 0x0101 = USB_STREAMING
	0,					// bAssocTerminal, 0 = unidirectional
	1,					// bCSourceID, connected to input terminal, ID=1
	0,					// iTerminal
	// Input Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-3, page 39
	12,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	2,					// bDescriptorSubType, 2 = INPUT_TERMINAL
	3,					// bTerminalID
	0x01, 0x01,				// wTerminalType, 0x0101 = USB_STREAMING
	0,					// bAssocTerminal, 0 = unidirectional
	2,					// bNrChannels
	0x03, 0x00,				// wChannelConfig, 0x0003 = Left & Right Front
	0,					// iChannelNames
	0, 					// iTerminal
	// Volume feature descriptor
	10,					// bLength
	0x24, 				// bDescriptorType = CS_INTERFACE
	0x06, 				// bDescriptorSubType = FEATURE_UNIT
	0x31, 				// bUnitID
	0x03, 				// bSourceID (Input Terminal)
	0x01, 				// bControlSize (each channel is 1 byte, 3 channels)
	0x01, 				// bmaControls(0) Master: Mute
	0x02, 				// bmaControls(1) Left: Volume
	0x02, 				// bmaControls(2) Right: Volume
	0x00,				// iFeature
	// Output Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-4, page 40
	9,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	3,					// bDescriptorSubtype, 3 = OUTPUT_TERMINAL
	4,					// bTerminalID
	//0x02, 0x03,				// wTerminalType, 0x0302 = Headphones
	0x02, 0x06,				// wTerminalType, 0x0602 = Digital Audio
	0,					// bAssocTerminal, 0 = unidirectional
	0x31,				// bCSourceID, connected to feature, ID=31
	0,					// iTerminal
	// Standard AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.1, Table 4-18, page 59
	// Alternate 0: default setting, disabled zero bandwidth
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+1,			// bInterfaceNumber
	0,					// bAlternateSetting
	0,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Alternate 1: streaming data
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+1,			// bInterfaceNumber
	1,					// bAlternateSetting
	1,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Class-Specific AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.2, Table 4-19, page 60
	7, 					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	1,					// bDescriptorSubtype, 1 = AS_GENERAL
	2,					// bTerminalLink: Terminal ID = 2
	3,					// bDelay (approx 3ms delay, audio lib updates)
	0x01, 0x00,				// wFormatTag, 0x0001 = PCM
	// Type I Format Descriptor
	// USB DCD for Audio Data Formats 1.0, Section 2.2.5, Table 2-1, page 10
	11,					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	2,					// bDescriptorSubtype = FORMAT_TYPE
	1,					// bFormatType = FORMAT_TYPE_I
	2,					// bNrChannels = 2
	2,					// bSubFrameSize = 2 byte
	16,					// bBitResolution = 16 bits
	1,					// bSamFreqType = 1 frequency
	LSB(44100), MSB(44100), 0,		// tSamFreq
	// Standard AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.1, Table 4-20, page 61-62
	9, 					// bLength
	5, 					// bDescriptorType, 5 = ENDPOINT_DESCRIPTOR
	AUDIO_TX_ENDPOINT | 0x80,		// bEndpointAddress
	0x09, 					// bmAttributes = isochronous, adaptive
	LSB(AUDIO_TX_SIZE), MSB(AUDIO_TX_SIZE),	// wMaxPacketSize
	4,			 		// bInterval, 4 = every 8 micro-frames
	0,					// bRefresh
	0,					// bSynchAddress
	// Class-Specific AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.2, Table 4-21, page 62-63
	7,  					// bLength
	0x25,  					// bDescriptorType, 0x25 = CS_ENDPOINT
	1,  					// bDescriptorSubtype, 1 = EP_GENERAL
	0x00,  					// bmAttributes
	0,  					// bLockDelayUnits, 1 = ms
	0x00, 0x00,  				// wLockDelay
	// Standard AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.1, Table 4-18, page 59
	// Alternate 0: default setting, disabled zero bandwidth
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+2,			// bInterfaceNumber
	0,					// bAlternateSetting
	0,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Alternate 1: streaming data
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+2,			// bInterfaceNumber
	1,					// bAlternateSetting
	2,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Class-Specific AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.2, Table 4-19, page 60
	7, 					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	1,					// bDescriptorSubtype, 1 = AS_GENERAL
	3,					// bTerminalLink: Terminal ID = 3
	3,					// bDelay (approx 3ms delay, audio lib updates)
	0x01, 0x00,				// wFormatTag, 0x0001 = PCM
	// Type I Format Descriptor
	// USB DCD for Audio Data Formats 1.0, Section 2.2.5, Table 2-1, page 10
	11,					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	2,					// bDescriptorSubtype = FORMAT_TYPE
	1,					// bFormatType = FORMAT_TYPE_I
	2,					// bNrChannels = 2
	2,					// bSubFrameSize = 2 byte
	16,					// bBitResolution = 16 bits
	1,					// bSamFreqType = 1 frequency
	LSB(44100), MSB(44100), 0,		// tSamFreq
	// Standard AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.1, Table 4-20, page 61-62
	9, 					// bLength
	5, 					// bDescriptorType, 5 = ENDPOINT_DESCRIPTOR
	AUDIO_RX_ENDPOINT,			// bEndpointAddress
	0x05, 					// bmAttributes = isochronous, asynchronous
	LSB(AUDIO_RX_SIZE), MSB(AUDIO_RX_SIZE),	// wMaxPacketSize
	4,			 		// bInterval, 4 = every 8 micro-frames
	0,					// bRefresh
	AUDIO_SYNC_ENDPOINT | 0x80,		// bSynchAddress
	// Class-Specific AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.2, Table 4-21, page 62-63
	7,  					// bLength
	0x25,  					// bDescriptorType, 0x25 = CS_ENDPOINT
	1,  					// bDescriptorSubtype, 1 = EP_GENERAL
	0x00,  					// bmAttributes
	0,  					// bLockDelayUnits, 1 = ms
	0x00, 0x00,  				// wLockDelay
	// Standard AS Isochronous Audio Synch Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.2.1, Table 4-22, page 63-64
	9, 					// bLength
	5, 					// bDescriptorType, 5 = ENDPOINT_DESCRIPTOR
	AUDIO_SYNC_ENDPOINT | 0x80,		// bEndpointAddress
	0x11, 					// bmAttributes = isochronous, feedback
	4, 0,					// wMaxPacketSize, 4 bytes
	4,			 		// bInterval, 4 = 4 = every 8 micro-frames
	7,					// bRefresh,
	0,					// bSynchAddress
#endif

#ifdef MULTITOUCH_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        MULTITOUCH_INTERFACE,                   // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(multitouch_report_desc)),    // wDescriptorLength
        MSB(sizeof(multitouch_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MULTITOUCH_ENDPOINT | 0x80,             // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        MULTITOUCH_SIZE, 0,                     // wMaxPacketSize
        4,                                      // bInterval, 4 = 1ms
#endif // MULTITOUCH_INTERFACE

#ifdef EXPERIMENTAL_INTERFACE
	// configuration for 480 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        EXPERIMENTAL_INTERFACE,                 // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0xFF,                                   // bInterfaceClass (0xFF = Vendor)
        0x6A,                                   // bInterfaceSubClass
        0xFF,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        1 | 0x80,                               // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(512), MSB(512),                     // wMaxPacketSize
        1,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        1,                                      // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(512), MSB(512),                     // wMaxPacketSize
        1,                                      // bInterval
#endif // EXPERIMENTAL_INTERFACE
};


PROGMEM const uint8_t usb_config_descriptor_12[CONFIG_DESC_SIZE] = {
        // configuration descriptor, USB spec 9.6.3, page 264-266, Table 9-10
        9,                                      // bLength;
        2,                                      // bDescriptorType;
        LSB(CONFIG_DESC_SIZE),                 // wTotalLength
        MSB(CONFIG_DESC_SIZE),
        NUM_INTERFACE,                          // bNumInterfaces
        1,                                      // bConfigurationValue
        0,                                      // iConfiguration
        0xC0,                                   // bmAttributes
        50,                                     // bMaxPower

#ifdef CDC_IAD_DESCRIPTOR
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        CDC_STATUS_INTERFACE,                   // bFirstInterface
        2,                                      // bInterfaceCount
        0x02,                                   // bFunctionClass
        0x02,                                   // bFunctionSubClass
        0x01,                                   // bFunctionProtocol
        0,                                      // iFunction
#endif

#ifdef CDC_DATA_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC_STATUS_INTERFACE,			// bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x02,                                   // bInterfaceClass
        0x02,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x00,                                   // bDescriptorSubtype
        0x10, 0x01,                             // bcdCDC
        // Call Management Functional Descriptor, CDC Spec 5.2.3.2, Table 27
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x01,                                   // bDescriptorSubtype
        0x01,                                   // bmCapabilities
        1,                                      // bDataInterface
        // Abstract Control Management Functional Descriptor, CDC Spec 5.2.3.3, Table 28
        4,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x02,                                   // bDescriptorSubtype
        0x06,                                   // bmCapabilities
        // Union Functional Descriptor, CDC Spec 5.2.3.8, Table 33
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x06,                                   // bDescriptorSubtype
        CDC_STATUS_INTERFACE,                   // bMasterInterface
        CDC_DATA_INTERFACE,                     // bSlaveInterface0
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC_ACM_ENDPOINT | 0x80,                // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        CDC_ACM_SIZE, 0,                        // wMaxPacketSize
        16,                                     // bInterval
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC_DATA_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x0A,                                   // bInterfaceClass
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC_RX_ENDPOINT,                        // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_RX_SIZE_12),MSB(CDC_RX_SIZE_12),// wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC_TX_ENDPOINT | 0x80,                 // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(CDC_TX_SIZE_12),MSB(CDC_TX_SIZE_12),// wMaxPacketSize
        0,                                      // bInterval
#endif // CDC_DATA_INTERFACE

#ifdef CDC2_DATA_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        CDC2_STATUS_INTERFACE,                  // bFirstInterface
        2,                                      // bInterfaceCount
        0x02,                                   // bFunctionClass
        0x02,                                   // bFunctionSubClass
        0x01,                                   // bFunctionProtocol
        0,                                      // iFunction
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC2_STATUS_INTERFACE,                  // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x02,                                   // bInterfaceClass
        0x02,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x00,                                   // bDescriptorSubtype
        0x10, 0x01,                             // bcdCDC
        // Call Management Functional Descriptor, CDC Spec 5.2.3.2, Table 27
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x01,                                   // bDescriptorSubtype
        0x01,                                   // bmCapabilities
        1,                                      // bDataInterface
        // Abstract Control Management Functional Descriptor, CDC Spec 5.2.3.3, Table 28
        4,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x02,                                   // bDescriptorSubtype
        0x06,                                   // bmCapabilities
        // Union Functional Descriptor, CDC Spec 5.2.3.8, Table 33
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x06,                                   // bDescriptorSubtype
        CDC2_STATUS_INTERFACE,                  // bMasterInterface
        CDC2_DATA_INTERFACE,                    // bSlaveInterface0
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC2_ACM_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        CDC_ACM_SIZE, 0,                        // wMaxPacketSize
        64,                                     // bInterval
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC2_DATA_INTERFACE,                    // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x0A,                                   // bInterfaceClass
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC2_RX_ENDPOINT,                       // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        CDC_RX_SIZE_12, 0,                      // wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC2_TX_ENDPOINT | 0x80,                // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        CDC_TX_SIZE_12, 0,                      // wMaxPacketSize
        0,                                      // bInterval
#endif // CDC2_DATA_INTERFACE

#ifdef CDC3_DATA_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        CDC3_STATUS_INTERFACE,                  // bFirstInterface
        2,                                      // bInterfaceCount
        0x02,                                   // bFunctionClass
        0x02,                                   // bFunctionSubClass
        0x01,                                   // bFunctionProtocol
        0,                                      // iFunction
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC3_STATUS_INTERFACE,                  // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x02,                                   // bInterfaceClass
        0x02,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x00,                                   // bDescriptorSubtype
        0x10, 0x01,                             // bcdCDC
        // Call Management Functional Descriptor, CDC Spec 5.2.3.2, Table 27
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x01,                                   // bDescriptorSubtype
        0x01,                                   // bmCapabilities
        1,                                      // bDataInterface
        // Abstract Control Management Functional Descriptor, CDC Spec 5.2.3.3, Table 28
        4,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x02,                                   // bDescriptorSubtype
        0x06,                                   // bmCapabilities
        // Union Functional Descriptor, CDC Spec 5.2.3.8, Table 33
        5,                                      // bFunctionLength
        0x24,                                   // bDescriptorType
        0x06,                                   // bDescriptorSubtype
        CDC3_STATUS_INTERFACE,                  // bMasterInterface
        CDC3_DATA_INTERFACE,                    // bSlaveInterface0
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC3_ACM_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        CDC_ACM_SIZE, 0,                        // wMaxPacketSize
        64,                                     // bInterval
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        CDC3_DATA_INTERFACE,                    // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x0A,                                   // bInterfaceClass
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC3_RX_ENDPOINT,                       // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        CDC_RX_SIZE_12, 0,                      // wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        CDC3_TX_ENDPOINT | 0x80,                // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        CDC_TX_SIZE_12, 0,                      // wMaxPacketSize
        0,                                      // bInterval
#endif // CDC3_DATA_INTERFACE

#ifdef MIDI_INTERFACE
	// configuration for 12 Mbit/sec speed
        // Standard MS Interface Descriptor,
        9,                                      // bLength
        4,                                      // bDescriptorType
        MIDI_INTERFACE,                         // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x01,                                   // bInterfaceClass (0x01 = Audio)
        0x03,                                   // bInterfaceSubClass (0x03 = MIDI)
        0x00,                                   // bInterfaceProtocol (unused for MIDI)
        0,                                      // iInterface
        // MIDI MS Interface Header, USB MIDI 6.1.2.1, page 21, Table 6-2
        7,                                      // bLength
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x01,                                   // bDescriptorSubtype = MS_HEADER
        0x00, 0x01,                             // bcdMSC = revision 01.00
	LSB(7+(6+6+9+9)*MIDI_NUM_CABLES),       // wTotalLength
	MSB(7+(6+6+9+9)*MIDI_NUM_CABLES),
        // MIDI IN Jack Descriptor, B.4.3, Table B-7 (embedded), page 40
        6,                                      // bLength
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x02,                                   // bDescriptorSubtype = MIDI_IN_JACK
        0x01,                                   // bJackType = EMBEDDED
        1,                                      // bJackID, ID = 1
        0,                                      // iJack
        // MIDI IN Jack Descriptor, B.4.3, Table B-8 (external), page 40
        6,                                      // bLength
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x02,                                   // bDescriptorSubtype = MIDI_IN_JACK
        0x02,                                   // bJackType = EXTERNAL
        2,                                      // bJackID, ID = 2
        0,                                      // iJack
        // MIDI OUT Jack Descriptor, B.4.4, Table B-9, page 41
        9,
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x03,                                   // bDescriptorSubtype = MIDI_OUT_JACK
        0x01,                                   // bJackType = EMBEDDED
        3,                                      // bJackID, ID = 3
        1,                                      // bNrInputPins = 1 pin
        2,                                      // BaSourceID(1) = 2
        1,                                      // BaSourcePin(1) = first pin
        0,                                      // iJack
        // MIDI OUT Jack Descriptor, B.4.4, Table B-10, page 41
        9,
        0x24,                                   // bDescriptorType = CS_INTERFACE
        0x03,                                   // bDescriptorSubtype = MIDI_OUT_JACK
        0x02,                                   // bJackType = EXTERNAL
        4,                                      // bJackID, ID = 4
        1,                                      // bNrInputPins = 1 pin
        1,                                      // BaSourceID(1) = 1
        1,                                      // BaSourcePin(1) = first pin
        0,                                      // iJack
  #if MIDI_NUM_CABLES >= 2
	#define MIDI_INTERFACE_JACK_PAIR(a, b, c, d) \
		6, 0x24, 0x02, 0x01, (a), 0, \
		6, 0x24, 0x02, 0x02, (b), 0, \
		9, 0x24, 0x03, 0x01, (c), 1, (b), 1, 0, \
		9, 0x24, 0x03, 0x02, (d), 1, (a), 1, 0,
	MIDI_INTERFACE_JACK_PAIR(5, 6, 7, 8)
  #endif
  #if MIDI_NUM_CABLES >= 3
	MIDI_INTERFACE_JACK_PAIR(9, 10, 11, 12)
  #endif
  #if MIDI_NUM_CABLES >= 4
	MIDI_INTERFACE_JACK_PAIR(13, 14, 15, 16)
  #endif
  #if MIDI_NUM_CABLES >= 5
	MIDI_INTERFACE_JACK_PAIR(17, 18, 19, 20)
  #endif
  #if MIDI_NUM_CABLES >= 6
	MIDI_INTERFACE_JACK_PAIR(21, 22, 23, 24)
  #endif
  #if MIDI_NUM_CABLES >= 7
	MIDI_INTERFACE_JACK_PAIR(25, 26, 27, 28)
  #endif
  #if MIDI_NUM_CABLES >= 8
	MIDI_INTERFACE_JACK_PAIR(29, 30, 31, 32)
  #endif
  #if MIDI_NUM_CABLES >= 9
	MIDI_INTERFACE_JACK_PAIR(33, 34, 35, 36)
  #endif
  #if MIDI_NUM_CABLES >= 10
	MIDI_INTERFACE_JACK_PAIR(37, 38, 39, 40)
  #endif
  #if MIDI_NUM_CABLES >= 11
	MIDI_INTERFACE_JACK_PAIR(41, 42, 43, 44)
  #endif
  #if MIDI_NUM_CABLES >= 12
	MIDI_INTERFACE_JACK_PAIR(45, 46, 47, 48)
  #endif
  #if MIDI_NUM_CABLES >= 13
	MIDI_INTERFACE_JACK_PAIR(49, 50, 51, 52)
  #endif
  #if MIDI_NUM_CABLES >= 14
	MIDI_INTERFACE_JACK_PAIR(53, 54, 55, 56)
  #endif
  #if MIDI_NUM_CABLES >= 15
	MIDI_INTERFACE_JACK_PAIR(57, 58, 59, 60)
  #endif
  #if MIDI_NUM_CABLES >= 16
	MIDI_INTERFACE_JACK_PAIR(61, 62, 63, 64)
  #endif
        // Standard Bulk OUT Endpoint Descriptor, B.5.1, Table B-11, pae 42
        9,                                      // bLength
        5,                                      // bDescriptorType = ENDPOINT
        MIDI_RX_ENDPOINT,                       // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MIDI_RX_SIZE_12),MSB(MIDI_RX_SIZE_12),// wMaxPacketSize
        0,                                      // bInterval
        0,                                      // bRefresh
        0,                                      // bSynchAddress
        // Class-specific MS Bulk OUT Endpoint Descriptor, B.5.2, Table B-12, page 42
        4+MIDI_NUM_CABLES,                      // bLength
        0x25,                                   // bDescriptorSubtype = CS_ENDPOINT
        0x01,                                   // bJackType = MS_GENERAL
        MIDI_NUM_CABLES,                        // bNumEmbMIDIJack = number of jacks
        1,                                      // BaAssocJackID(1) = jack ID #1
  #if MIDI_NUM_CABLES >= 2
        5,
  #endif
  #if MIDI_NUM_CABLES >= 3
        9,
  #endif
  #if MIDI_NUM_CABLES >= 4
        13,
  #endif
  #if MIDI_NUM_CABLES >= 5
        17,
  #endif
  #if MIDI_NUM_CABLES >= 6
        21,
  #endif
  #if MIDI_NUM_CABLES >= 7
        25,
  #endif
  #if MIDI_NUM_CABLES >= 8
        29,
  #endif
  #if MIDI_NUM_CABLES >= 9
        33,
  #endif
  #if MIDI_NUM_CABLES >= 10
        37,
  #endif
  #if MIDI_NUM_CABLES >= 11
        41,
  #endif
  #if MIDI_NUM_CABLES >= 12
        45,
  #endif
  #if MIDI_NUM_CABLES >= 13
        49,
  #endif
  #if MIDI_NUM_CABLES >= 14
        53,
  #endif
  #if MIDI_NUM_CABLES >= 15
        57,
  #endif
  #if MIDI_NUM_CABLES >= 16
        61,
  #endif
        // Standard Bulk IN Endpoint Descriptor, B.5.1, Table B-11, pae 42
        9,                                      // bLength
        5,                                      // bDescriptorType = ENDPOINT
        MIDI_TX_ENDPOINT | 0x80,                // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MIDI_TX_SIZE_12),MSB(MIDI_TX_SIZE_12),// wMaxPacketSize
        0,                                      // bInterval
        0,                                      // bRefresh
        0,                                      // bSynchAddress
        // Class-specific MS Bulk IN Endpoint Descriptor, B.5.2, Table B-12, page 42
        4+MIDI_NUM_CABLES,                      // bLength
        0x25,                                   // bDescriptorSubtype = CS_ENDPOINT
        0x01,                                   // bJackType = MS_GENERAL
        MIDI_NUM_CABLES,                        // bNumEmbMIDIJack = number of jacks
        3,                                      // BaAssocJackID(1) = jack ID #3
  #if MIDI_NUM_CABLES >= 2
        7,
  #endif
  #if MIDI_NUM_CABLES >= 3
        11,
  #endif
  #if MIDI_NUM_CABLES >= 4
        15,
  #endif
  #if MIDI_NUM_CABLES >= 5
        19,
  #endif
  #if MIDI_NUM_CABLES >= 6
        23,
  #endif
  #if MIDI_NUM_CABLES >= 7
        27,
  #endif
  #if MIDI_NUM_CABLES >= 8
        31,
  #endif
  #if MIDI_NUM_CABLES >= 9
        35,
  #endif
  #if MIDI_NUM_CABLES >= 10
        39,
  #endif
  #if MIDI_NUM_CABLES >= 11
        43,
  #endif
  #if MIDI_NUM_CABLES >= 12
        47,
  #endif
  #if MIDI_NUM_CABLES >= 13
        51,
  #endif
  #if MIDI_NUM_CABLES >= 14
        55,
  #endif
  #if MIDI_NUM_CABLES >= 15
        59,
  #endif
  #if MIDI_NUM_CABLES >= 16
        63,
  #endif
#endif // MIDI_INTERFACE

#ifdef KEYBOARD_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        KEYBOARD_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x01,                                   // bInterfaceSubClass (0x01 = Boot)
        0x01,                                   // bInterfaceProtocol (0x01 = Keyboard)
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(keyboard_report_desc)),      // wDescriptorLength
        MSB(sizeof(keyboard_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        KEYBOARD_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        KEYBOARD_SIZE, 0,                       // wMaxPacketSize
        KEYBOARD_INTERVAL,                      // bInterval
#endif // KEYBOARD_INTERFACE

#ifdef MOUSE_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        MOUSE_INTERFACE,                        // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass (0x01 = Boot)
        0x00,                                   // bInterfaceProtocol (0x02 = Mouse)
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(mouse_report_desc)),         // wDescriptorLength
        MSB(sizeof(mouse_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MOUSE_ENDPOINT | 0x80,                  // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        MOUSE_SIZE, 0,                          // wMaxPacketSize
        MOUSE_INTERVAL,                         // bInterval
#endif // MOUSE_INTERFACE

#ifdef RAWHID_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        RAWHID_INTERFACE,                       // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(rawhid_report_desc)),        // wDescriptorLength
        MSB(sizeof(rawhid_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        RAWHID_TX_ENDPOINT | 0x80,              // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        RAWHID_TX_SIZE, 0,                      // wMaxPacketSize
        RAWHID_TX_INTERVAL,                     // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        RAWHID_RX_ENDPOINT,                     // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        RAWHID_RX_SIZE, 0,                      // wMaxPacketSize
        RAWHID_RX_INTERVAL,			// bInterval
#endif // RAWHID_INTERFACE

#ifdef FLIGHTSIM_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        FLIGHTSIM_INTERFACE,                    // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(flightsim_report_desc)),     // wDescriptorLength
        MSB(sizeof(flightsim_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        FLIGHTSIM_TX_ENDPOINT | 0x80,           // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        FLIGHTSIM_TX_SIZE, 0,                   // wMaxPacketSize
        FLIGHTSIM_TX_INTERVAL,                  // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        FLIGHTSIM_RX_ENDPOINT,                  // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        FLIGHTSIM_RX_SIZE, 0,                   // wMaxPacketSize
        FLIGHTSIM_RX_INTERVAL,			// bInterval
#endif // FLIGHTSIM_INTERFACE

#ifdef SEREMU_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        SEREMU_INTERFACE,                       // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(seremu_report_desc)),        // wDescriptorLength
        MSB(sizeof(seremu_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        SEREMU_TX_ENDPOINT | 0x80,              // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        SEREMU_TX_SIZE, 0,                      // wMaxPacketSize
        SEREMU_TX_INTERVAL,                     // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        SEREMU_RX_ENDPOINT,                     // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        SEREMU_RX_SIZE, 0,                      // wMaxPacketSize
        SEREMU_RX_INTERVAL,			// bInterval
#endif // SEREMU_INTERFACE

#ifdef JOYSTICK_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        JOYSTICK_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(joystick_report_desc)),      // wDescriptorLength
        MSB(sizeof(joystick_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        JOYSTICK_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        JOYSTICK_SIZE, 0,                       // wMaxPacketSize
        JOYSTICK_INTERVAL,                      // bInterval
#endif // JOYSTICK_INTERFACE

#ifdef MTP_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        MTP_INTERFACE,                          // bInterfaceNumber
        0,                                      // bAlternateSetting
        3,                                      // bNumEndpoints
        0x06,                                   // bInterfaceClass (0x06 = still image)
        0x01,                                   // bInterfaceSubClass
        0x01,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MTP_TX_ENDPOINT | 0x80,                 // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MTP_TX_SIZE_12),MSB(MTP_TX_SIZE_12),// wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MTP_RX_ENDPOINT,                        // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(MTP_RX_SIZE_12),MSB(MTP_RX_SIZE_12),// wMaxPacketSize
        0,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MTP_EVENT_ENDPOINT | 0x80,              // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        MTP_EVENT_SIZE, 0,                      // wMaxPacketSize
        MTP_EVENT_INTERVAL_12,                  // bInterval
#endif // MTP_INTERFACE

#ifdef KEYMEDIA_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        KEYMEDIA_INTERFACE,                     // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(keymedia_report_desc)),      // wDescriptorLength
        MSB(sizeof(keymedia_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        KEYMEDIA_ENDPOINT | 0x80,               // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        KEYMEDIA_SIZE, 0,                       // wMaxPacketSize
        KEYMEDIA_INTERVAL,                      // bInterval
#endif // KEYMEDIA_INTERFACE

#ifdef AUDIO_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface association descriptor, USB ECN, Table 9-Z
        8,                                      // bLength
        11,                                     // bDescriptorType
        AUDIO_INTERFACE,                        // bFirstInterface
        3,                                      // bInterfaceCount
        0x01,                                   // bFunctionClass
        0x01,                                   // bFunctionSubClass
        0x00,                                   // bFunctionProtocol
        0,                                      // iFunction
	// Standard AudioControl (AC) Interface Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-1, page 36
	9,					// bLength
	4,					// bDescriptorType, 4 = INTERFACE
	AUDIO_INTERFACE,			// bInterfaceNumber
	0,					// bAlternateSetting
	0,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	1,					// bInterfaceSubclass, 1 = AUDIO_CONTROL
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Class-specific AC Interface Header Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-2, page 37-38
	10,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	0x01,					// bDescriptorSubtype, 1 = HEADER
	0x00, 0x01,				// bcdADC (version 1.0)
	LSB(62), MSB(62),			// wTotalLength
	2,					// bInCollection
	AUDIO_INTERFACE+1,			// baInterfaceNr(1) - Transmit to PC
	AUDIO_INTERFACE+2,			// baInterfaceNr(2) - Receive from PC
	// Input Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-3, page 39
	12,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	0x02,					// bDescriptorSubType, 2 = INPUT_TERMINAL
	1,					// bTerminalID
	//0x01, 0x02,				// wTerminalType, 0x0201 = MICROPHONE
	//0x03, 0x06,				// wTerminalType, 0x0603 = Line Connector
	0x02, 0x06,				// wTerminalType, 0x0602 = Digital Audio
	0,					// bAssocTerminal, 0 = unidirectional
	2,					// bNrChannels
	0x03, 0x00,				// wChannelConfig, 0x0003 = Left & Right Front
	0,					// iChannelNames
	0, 					// iTerminal
	// Output Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-4, page 40
	9,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	3,					// bDescriptorSubtype, 3 = OUTPUT_TERMINAL
	2,					// bTerminalID
	0x01, 0x01,				// wTerminalType, 0x0101 = USB_STREAMING
	0,					// bAssocTerminal, 0 = unidirectional
	1,					// bCSourceID, connected to input terminal, ID=1
	0,					// iTerminal
	// Input Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-3, page 39
	12,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	2,					// bDescriptorSubType, 2 = INPUT_TERMINAL
	3,					// bTerminalID
	0x01, 0x01,				// wTerminalType, 0x0101 = USB_STREAMING
	0,					// bAssocTerminal, 0 = unidirectional
	2,					// bNrChannels
	0x03, 0x00,				// wChannelConfig, 0x0003 = Left & Right Front
	0,					// iChannelNames
	0, 					// iTerminal
	// Volume feature descriptor
	10,					// bLength
	0x24, 				// bDescriptorType = CS_INTERFACE
	0x06, 				// bDescriptorSubType = FEATURE_UNIT
	0x31, 				// bUnitID
	0x03, 				// bSourceID (Input Terminal)
	0x01, 				// bControlSize (each channel is 1 byte, 3 channels)
	0x01, 				// bmaControls(0) Master: Mute
	0x02, 				// bmaControls(1) Left: Volume
	0x02, 				// bmaControls(2) Right: Volume
	0x00,				// iFeature
	// Output Terminal Descriptor
	// USB DCD for Audio Devices 1.0, Table 4-4, page 40
	9,					// bLength
	0x24,					// bDescriptorType, 0x24 = CS_INTERFACE
	3,					// bDescriptorSubtype, 3 = OUTPUT_TERMINAL
	4,					// bTerminalID
	//0x02, 0x03,				// wTerminalType, 0x0302 = Headphones
	0x02, 0x06,				// wTerminalType, 0x0602 = Digital Audio
	0,					// bAssocTerminal, 0 = unidirectional
	0x31,				// bCSourceID, connected to feature, ID=31
	0,					// iTerminal
	// Standard AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.1, Table 4-18, page 59
	// Alternate 0: default setting, disabled zero bandwidth
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+1,			// bInterfaceNumber
	0,					// bAlternateSetting
	0,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Alternate 1: streaming data
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+1,			// bInterfaceNumber
	1,					// bAlternateSetting
	1,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Class-Specific AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.2, Table 4-19, page 60
	7, 					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	1,					// bDescriptorSubtype, 1 = AS_GENERAL
	2,					// bTerminalLink: Terminal ID = 2
	3,					// bDelay (approx 3ms delay, audio lib updates)
	0x01, 0x00,				// wFormatTag, 0x0001 = PCM
	// Type I Format Descriptor
	// USB DCD for Audio Data Formats 1.0, Section 2.2.5, Table 2-1, page 10
	11,					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	2,					// bDescriptorSubtype = FORMAT_TYPE
	1,					// bFormatType = FORMAT_TYPE_I
	2,					// bNrChannels = 2
	2,					// bSubFrameSize = 2 byte
	16,					// bBitResolution = 16 bits
	1,					// bSamFreqType = 1 frequency
	LSB(44100), MSB(44100), 0,		// tSamFreq
	// Standard AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.1, Table 4-20, page 61-62
	9, 					// bLength
	5, 					// bDescriptorType, 5 = ENDPOINT_DESCRIPTOR
	AUDIO_TX_ENDPOINT | 0x80,		// bEndpointAddress
	0x09, 					// bmAttributes = isochronous, adaptive
	LSB(AUDIO_TX_SIZE), MSB(AUDIO_TX_SIZE),	// wMaxPacketSize
	1,			 		// bInterval, 1 = every frame
	0,					// bRefresh
	0,					// bSynchAddress
	// Class-Specific AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.2, Table 4-21, page 62-63
	7,  					// bLength
	0x25,  					// bDescriptorType, 0x25 = CS_ENDPOINT
	1,  					// bDescriptorSubtype, 1 = EP_GENERAL
	0x00,  					// bmAttributes
	0,  					// bLockDelayUnits, 1 = ms
	0x00, 0x00,  				// wLockDelay
	// Standard AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.1, Table 4-18, page 59
	// Alternate 0: default setting, disabled zero bandwidth
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+2,			// bInterfaceNumber
	0,					// bAlternateSetting
	0,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Alternate 1: streaming data
	9,					// bLenght
	4,					// bDescriptorType = INTERFACE
	AUDIO_INTERFACE+2,			// bInterfaceNumber
	1,					// bAlternateSetting
	2,					// bNumEndpoints
	1,					// bInterfaceClass, 1 = AUDIO
	2,					// bInterfaceSubclass, 2 = AUDIO_STREAMING
	0,					// bInterfaceProtocol
	0,					// iInterface
	// Class-Specific AS Interface Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.5.2, Table 4-19, page 60
	7, 					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	1,					// bDescriptorSubtype, 1 = AS_GENERAL
	3,					// bTerminalLink: Terminal ID = 3
	3,					// bDelay (approx 3ms delay, audio lib updates)
	0x01, 0x00,				// wFormatTag, 0x0001 = PCM
	// Type I Format Descriptor
	// USB DCD for Audio Data Formats 1.0, Section 2.2.5, Table 2-1, page 10
	11,					// bLength
	0x24,					// bDescriptorType = CS_INTERFACE
	2,					// bDescriptorSubtype = FORMAT_TYPE
	1,					// bFormatType = FORMAT_TYPE_I
	2,					// bNrChannels = 2
	2,					// bSubFrameSize = 2 byte
	16,					// bBitResolution = 16 bits
	1,					// bSamFreqType = 1 frequency
	LSB(44100), MSB(44100), 0,		// tSamFreq
	// Standard AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.1, Table 4-20, page 61-62
	9, 					// bLength
	5, 					// bDescriptorType, 5 = ENDPOINT_DESCRIPTOR
	AUDIO_RX_ENDPOINT,			// bEndpointAddress
	0x05, 					// bmAttributes = isochronous, asynchronous
	LSB(AUDIO_RX_SIZE), MSB(AUDIO_RX_SIZE),	// wMaxPacketSize
	1,			 		// bInterval, 1 = every frame
	0,					// bRefresh
	AUDIO_SYNC_ENDPOINT | 0x80,		// bSynchAddress
	// Class-Specific AS Isochronous Audio Data Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.1.2, Table 4-21, page 62-63
	7,  					// bLength
	0x25,  					// bDescriptorType, 0x25 = CS_ENDPOINT
	1,  					// bDescriptorSubtype, 1 = EP_GENERAL
	0x00,  					// bmAttributes
	0,  					// bLockDelayUnits, 1 = ms
	0x00, 0x00,  				// wLockDelay
	// Standard AS Isochronous Audio Synch Endpoint Descriptor
	// USB DCD for Audio Devices 1.0, Section 4.6.2.1, Table 4-22, page 63-64
	9, 					// bLength
	5, 					// bDescriptorType, 5 = ENDPOINT_DESCRIPTOR
	AUDIO_SYNC_ENDPOINT | 0x80,		// bEndpointAddress
	0x11, 					// bmAttributes = isochronous, feedback
	3, 0,					// wMaxPacketSize, 3 bytes
	1,			 		// bInterval, 1 = every frame
	5,					// bRefresh, 5 = 32ms
	0,					// bSynchAddress
#endif

#ifdef MULTITOUCH_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        MULTITOUCH_INTERFACE,                   // bInterfaceNumber
        0,                                      // bAlternateSetting
        1,                                      // bNumEndpoints
        0x03,                                   // bInterfaceClass (0x03 = HID)
        0x00,                                   // bInterfaceSubClass
        0x00,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // HID interface descriptor, HID 1.11 spec, section 6.2.1
        9,                                      // bLength
        0x21,                                   // bDescriptorType
        0x11, 0x01,                             // bcdHID
        0,                                      // bCountryCode
        1,                                      // bNumDescriptors
        0x22,                                   // bDescriptorType
        LSB(sizeof(multitouch_report_desc)),    // wDescriptorLength
        MSB(sizeof(multitouch_report_desc)),
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        MULTITOUCH_ENDPOINT | 0x80,             // bEndpointAddress
        0x03,                                   // bmAttributes (0x03=intr)
        MULTITOUCH_SIZE, 0,                     // wMaxPacketSize
        1,                                      // bInterval
#endif // MULTITOUCH_INTERFACE

#ifdef EXPERIMENTAL_INTERFACE
	// configuration for 12 Mbit/sec speed
        // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
        9,                                      // bLength
        4,                                      // bDescriptorType
        EXPERIMENTAL_INTERFACE,                 // bInterfaceNumber
        0,                                      // bAlternateSetting
        2,                                      // bNumEndpoints
        0xFF,                                   // bInterfaceClass (0xFF = Vendor)
        0x6A,                                   // bInterfaceSubClass
        0xFF,                                   // bInterfaceProtocol
        0,                                      // iInterface
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        1 | 0x80,                               // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(64), MSB(64),                       // wMaxPacketSize
        1,                                      // bInterval
        // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
        7,                                      // bLength
        5,                                      // bDescriptorType
        1,                                      // bEndpointAddress
        0x02,                                   // bmAttributes (0x02=bulk)
        LSB(64), MSB(64),                       // wMaxPacketSize
        1,                                      // bInterval
#endif // EXPERIMENTAL_INTERFACE
};


__attribute__ ((section(".dmabuffers"), aligned(32)))
uint8_t usb_descriptor_buffer[CONFIG_DESC_SIZE];





// **************************************************************
//   String Descriptors
// **************************************************************

// The descriptors above can provide human readable strings,
// referenced by index numbers.  These descriptors are the
// actual string data

/* defined in usb_names.h
struct usb_string_descriptor_struct {
        uint8_t bLength;
        uint8_t bDescriptorType;
        uint16_t wString[];
};
*/

extern struct usb_string_descriptor_struct usb_string_manufacturer_name
        __attribute__ ((weak, alias("usb_string_manufacturer_name_default")));
extern struct usb_string_descriptor_struct usb_string_product_name
        __attribute__ ((weak, alias("usb_string_product_name_default")));
extern struct usb_string_descriptor_struct usb_string_serial_number
        __attribute__ ((weak, alias("usb_string_serial_number_default")));

PROGMEM const struct usb_string_descriptor_struct string0 = {
        4,
        3,
        {0x0409}
};

PROGMEM const struct usb_string_descriptor_struct usb_string_manufacturer_name_default = {
        2 + MANUFACTURER_NAME_LEN * 2,
        3,
        MANUFACTURER_NAME
};
PROGMEM const struct usb_string_descriptor_struct usb_string_product_name_default = {
	2 + PRODUCT_NAME_LEN * 2,
        3,
        PRODUCT_NAME
};
struct usb_string_descriptor_struct usb_string_serial_number_default = {
        12,
        3,
        {0,0,0,0,0,0,0,0,0,0}
};
#ifdef MTP_INTERFACE
PROGMEM const struct usb_string_descriptor_struct usb_string_mtp = {
	2 + 3 * 2,
	3,
	{'M','T','P'}
};
#endif

void usb_init_serialnumber(void)
{
	char buf[11];
	uint32_t i, num;

	num = HW_OCOTP_MAC0 & 0xFFFFFF;
	// add extra zero to work around OS-X CDC-ACM driver bug
	if (num < 10000000) num = num * 10;
	ultoa(num, buf, 10);
	for (i=0; i<10; i++) {
		char c = buf[i];
		if (!c) break;
		usb_string_serial_number_default.wString[i] = c;
	}
	usb_string_serial_number_default.bLength = i * 2 + 2;
}


// **************************************************************
//   Descriptors List
// **************************************************************

// This table provides access to all the descriptor data above.

const usb_descriptor_list_t usb_descriptor_list[] = {
	//wValue, wIndex, address,          length
	{0x0100, 0x0000, device_descriptor, sizeof(device_descriptor)},
	{0x0600, 0x0000, qualifier_descriptor, sizeof(qualifier_descriptor)},
	{0x0200, 0x0000, usb_config_descriptor_480, CONFIG_DESC_SIZE},
	{0x0700, 0x0000, usb_config_descriptor_12, CONFIG_DESC_SIZE},
#ifdef SEREMU_INTERFACE
	{0x2200, SEREMU_INTERFACE, seremu_report_desc, sizeof(seremu_report_desc)},
	{0x2100, SEREMU_INTERFACE, usb_config_descriptor_480+SEREMU_HID_DESC_OFFSET, 9},
#endif
#ifdef KEYBOARD_INTERFACE
        {0x2200, KEYBOARD_INTERFACE, keyboard_report_desc, sizeof(keyboard_report_desc)},
        {0x2100, KEYBOARD_INTERFACE, usb_config_descriptor_480+KEYBOARD_HID_DESC_OFFSET, 9},
#endif
#ifdef MOUSE_INTERFACE
        {0x2200, MOUSE_INTERFACE, mouse_report_desc, sizeof(mouse_report_desc)},
        {0x2100, MOUSE_INTERFACE, usb_config_descriptor_480+MOUSE_HID_DESC_OFFSET, 9},
#endif
#ifdef JOYSTICK_INTERFACE
        {0x2200, JOYSTICK_INTERFACE, joystick_report_desc, sizeof(joystick_report_desc)},
        {0x2100, JOYSTICK_INTERFACE, usb_config_descriptor_480+JOYSTICK_HID_DESC_OFFSET, 9},
#endif
#ifdef RAWHID_INTERFACE
	{0x2200, RAWHID_INTERFACE, rawhid_report_desc, sizeof(rawhid_report_desc)},
	{0x2100, RAWHID_INTERFACE, usb_config_descriptor_480+RAWHID_HID_DESC_OFFSET, 9},
#endif
#ifdef FLIGHTSIM_INTERFACE
	{0x2200, FLIGHTSIM_INTERFACE, flightsim_report_desc, sizeof(flightsim_report_desc)},
	{0x2100, FLIGHTSIM_INTERFACE, usb_config_descriptor_480+FLIGHTSIM_HID_DESC_OFFSET, 9},
#endif
#ifdef KEYMEDIA_INTERFACE
        {0x2200, KEYMEDIA_INTERFACE, keymedia_report_desc, sizeof(keymedia_report_desc)},
        {0x2100, KEYMEDIA_INTERFACE, usb_config_descriptor_480+KEYMEDIA_HID_DESC_OFFSET, 9},
#endif
#ifdef MULTITOUCH_INTERFACE
        {0x2200, MULTITOUCH_INTERFACE, multitouch_report_desc, sizeof(multitouch_report_desc)},
        {0x2100, MULTITOUCH_INTERFACE, usb_config_descriptor_480+MULTITOUCH_HID_DESC_OFFSET, 9},
#endif
#ifdef MTP_INTERFACE
	{0x0304, 0x0409, (const uint8_t *)&usb_string_mtp, 0},
#endif
        {0x0300, 0x0000, (const uint8_t *)&string0, 0},
        {0x0301, 0x0409, (const uint8_t *)&usb_string_manufacturer_name, 0},
        {0x0302, 0x0409, (const uint8_t *)&usb_string_product_name, 0},
        {0x0303, 0x0409, (const uint8_t *)&usb_string_serial_number, 0},
	{0, 0, NULL, 0}
};





#endif // NUM_ENDPOINTS
//#endif // F_CPU >= 20 MHz

Good luck.
 
You star! Thank you so much!
Give me a few days go get back in front of my laptop and I'll have a play.
 
You star! Thank you so much!
Give me a few days go get back in front of my laptop and I'll have a play.

I've just had a look to see where the entry is for the Arduino IDE menu.
As I said, I don't use the Arduino IDE anymore, but here's how you add it (for a Teensy 4):
In my world the file is C:\Program Files (x86)\Arduino\hardware\teensy\avr\boards.txt
and here's the contents:
Code:
menu.usb=USB Type
menu.speed=CPU Speed
menu.opt=Optimize
menu.keys=Keyboard Layout


teensy41.name=Teensy 4.1
#teensy41.upload.maximum_size=8126464
teensy41.build.board=TEENSY41
teensy41.build.flags.ld=-Wl,--gc-sections,--relax "-T{build.core.path}/imxrt1062_t41.ld"
#teensy41.upload.maximum_data_size=524288
teensy41.upload.tool=teensyloader
teensy41.upload.protocol=halfkay
teensy41.build.core=teensy4
teensy41.build.mcu=imxrt1062
teensy41.build.warn_data_percentage=99
teensy41.build.toolchain=arm/bin/
teensy41.build.command.gcc=arm-none-eabi-gcc
teensy41.build.command.g++=arm-none-eabi-g++
teensy41.build.command.ar=arm-none-eabi-gcc-ar
teensy41.build.command.objcopy=arm-none-eabi-objcopy
teensy41.build.command.objdump=arm-none-eabi-objdump
teensy41.build.command.linker=arm-none-eabi-gcc
teensy41.build.command.size=arm-none-eabi-size
teensy41.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib
teensy41.build.flags.dep=-MMD
teensy41.build.flags.optimize=-Os
teensy41.build.flags.cpu=-mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16
teensy41.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=154
teensy41.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing
teensy41.build.flags.c=
teensy41.build.flags.S=-x assembler-with-cpp
teensy41.build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++
teensy41.serial.restart_cmd=false
teensy41.menu.usb.serial=Serial
teensy41.menu.usb.serial.build.usbtype=USB_SERIAL
teensy41.menu.usb.serial2=Dual Serial
teensy41.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL
teensy41.menu.usb.serial3=Triple Serial
teensy41.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL
teensy41.menu.usb.keyboard=Keyboard
teensy41.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensy41.menu.usb.keyboard.fake_serial=teensy_gateway
teensy41.menu.usb.touch=Keyboard + Touch Screen
teensy41.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensy41.menu.usb.touch.fake_serial=teensy_gateway
teensy41.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
teensy41.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
teensy41.menu.usb.hidtouch.fake_serial=teensy_gateway
teensy41.menu.usb.hid=Keyboard + Mouse + Joystick
teensy41.menu.usb.hid.build.usbtype=USB_HID
teensy41.menu.usb.hid.fake_serial=teensy_gateway
teensy41.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensy41.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensy41.menu.usb.midi=MIDI
teensy41.menu.usb.midi.build.usbtype=USB_MIDI
teensy41.menu.usb.midi.fake_serial=teensy_gateway
teensy41.menu.usb.midi4=MIDIx4
teensy41.menu.usb.midi4.build.usbtype=USB_MIDI4
teensy41.menu.usb.midi4.fake_serial=teensy_gateway
teensy41.menu.usb.midi16=MIDIx16
teensy41.menu.usb.midi16.build.usbtype=USB_MIDI16
teensy41.menu.usb.midi16.fake_serial=teensy_gateway
teensy41.menu.usb.serialmidi=Serial + MIDI
teensy41.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensy41.menu.usb.serialmidi4=Serial + MIDIx4
teensy41.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensy41.menu.usb.serialmidi16=Serial + MIDIx16
teensy41.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
teensy41.menu.usb.audio=Audio
teensy41.menu.usb.audio.build.usbtype=USB_AUDIO
teensy41.menu.usb.audio.fake_serial=teensy_gateway
teensy41.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensy41.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensy41.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio
teensy41.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL
teensy41.menu.usb.mtp=MTP Disk (Experimental)
teensy41.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensy41.menu.usb.mtp.fake_serial=teensy_gateway
teensy41.menu.usb.rawhid=Raw HID
teensy41.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy41.menu.usb.rawhid.fake_serial=teensy_gateway
teensy41.menu.usb.flightsim=Flight Sim Controls
teensy41.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensy41.menu.usb.flightsim.fake_serial=teensy_gateway
teensy41.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick
teensy41.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK
teensy41.menu.usb.flightsimjoystick.fake_serial=teensy_gateway
#teensy41.menu.usb.disable=No USB
#teensy41.menu.usb.disable.build.usbtype=USB_DISABLED

teensy41.menu.speed.600=600 MHz
teensy41.menu.speed.528=528 MHz
teensy41.menu.speed.450=450 MHz
teensy41.menu.speed.396=396 MHz
teensy41.menu.speed.150=150 MHz
teensy41.menu.speed.24=24 MHz
teensy41.menu.speed.720=720 MHz (overclock)
teensy41.menu.speed.816=816 MHz (overclock)
teensy41.menu.speed.912=912 MHz (overclock, cooling req'd)
teensy41.menu.speed.960=960 MHz (overclock, cooling req'd)
teensy41.menu.speed.1008=1.008 GHz (overclock, cooling req'd)
teensy41.menu.speed.1008.build.fcpu=1008000000
teensy41.menu.speed.960.build.fcpu=960000000
teensy41.menu.speed.912.build.fcpu=912000000
teensy41.menu.speed.816.build.fcpu=816000000
teensy41.menu.speed.720.build.fcpu=720000000
teensy41.menu.speed.600.build.fcpu=600000000
teensy41.menu.speed.528.build.fcpu=528000000
teensy41.menu.speed.450.build.fcpu=450000000
teensy41.menu.speed.396.build.fcpu=396000000
teensy41.menu.speed.150.build.fcpu=150000000
teensy41.menu.speed.24.build.fcpu=24000000

teensy41.menu.opt.o2std=Faster
teensy41.menu.opt.o2std.build.flags.optimize=-O2
teensy41.menu.opt.o2std.build.flags.ldspecs=
#teensy41.menu.opt.o2lto=Faster with LTO
#teensy41.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
#teensy41.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensy41.menu.opt.o1std=Fast
teensy41.menu.opt.o1std.build.flags.optimize=-O1
teensy41.menu.opt.o1std.build.flags.ldspecs=
#teensy41.menu.opt.o1lto=Fast with LTO
#teensy41.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
#teensy41.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin
teensy41.menu.opt.o3std=Fastest
teensy41.menu.opt.o3std.build.flags.optimize=-O3
teensy41.menu.opt.o3std.build.flags.ldspecs=
#teensy41.menu.opt.o3purestd=Fastest + pure-code
#teensy41.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__
#teensy41.menu.opt.o3purestd.build.flags.ldspecs=
#teensy41.menu.opt.o3lto=Fastest with LTO
#teensy41.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
#teensy41.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
#teensy41.menu.opt.o3purelto=Fastest + pure-code with LTO
#teensy41.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects
#teensy41.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin
teensy41.menu.opt.ogstd=Debug
teensy41.menu.opt.ogstd.build.flags.optimize=-Og
teensy41.menu.opt.ogstd.build.flags.ldspecs=
#teensy41.menu.opt.oglto=Debug with LTO
#teensy41.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
#teensy41.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensy41.menu.opt.osstd=Smallest Code
teensy41.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensy41.menu.opt.osstd.build.flags.ldspecs=
#teensy41.menu.opt.oslto=Smallest Code with LTO
#teensy41.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
#teensy41.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin

teensy41.menu.keys.en-us=US English
teensy41.menu.keys.en-us.build.keylayout=US_ENGLISH
teensy41.menu.keys.fr-ca=Canadian French
teensy41.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensy41.menu.keys.xx-ca=Canadian Multilingual
teensy41.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensy41.menu.keys.cz-cz=Czech
teensy41.menu.keys.cz-cz.build.keylayout=CZECH
teensy41.menu.keys.da-da=Danish
teensy41.menu.keys.da-da.build.keylayout=DANISH
teensy41.menu.keys.fi-fi=Finnish
teensy41.menu.keys.fi-fi.build.keylayout=FINNISH
teensy41.menu.keys.fr-fr=French
teensy41.menu.keys.fr-fr.build.keylayout=FRENCH
teensy41.menu.keys.fr-be=French Belgian
teensy41.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensy41.menu.keys.fr-ch=French Swiss
teensy41.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensy41.menu.keys.de-de=German
teensy41.menu.keys.de-de.build.keylayout=GERMAN
teensy41.menu.keys.de-dm=German (Mac)
teensy41.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensy41.menu.keys.de-ch=German Swiss
teensy41.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensy41.menu.keys.is-is=Icelandic
teensy41.menu.keys.is-is.build.keylayout=ICELANDIC
teensy41.menu.keys.en-ie=Irish
teensy41.menu.keys.en-ie.build.keylayout=IRISH
teensy41.menu.keys.it-it=Italian
teensy41.menu.keys.it-it.build.keylayout=ITALIAN
teensy41.menu.keys.no-no=Norwegian
teensy41.menu.keys.no-no.build.keylayout=NORWEGIAN
teensy41.menu.keys.pt-pt=Portuguese
teensy41.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensy41.menu.keys.pt-br=Portuguese Brazilian
teensy41.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensy41.menu.keys.rs-rs=Serbian (Latin Only)
teensy41.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensy41.menu.keys.es-es=Spanish
teensy41.menu.keys.es-es.build.keylayout=SPANISH
teensy41.menu.keys.es-mx=Spanish Latin America
teensy41.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensy41.menu.keys.sv-se=Swedish
teensy41.menu.keys.sv-se.build.keylayout=SWEDISH
teensy41.menu.keys.tr-tr=Turkish (partial)
teensy41.menu.keys.tr-tr.build.keylayout=TURKISH
teensy41.menu.keys.en-gb=United Kingdom
teensy41.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensy41.menu.keys.usint=US International
teensy41.menu.keys.usint.build.keylayout=US_INTERNATIONAL




teensyMM.name=Teensy MicroMod
#teensyMM.upload.maximum_size=16515072
teensyMM.build.board=TEENSY_MICROMOD
teensyMM.build.flags.ld=-Wl,--gc-sections,--relax "-T{build.core.path}/imxrt1062_mm.ld"
#teensyMM.upload.maximum_data_size=524288
#teensyMM.upload.maximum_data_size=1048576
teensyMM.upload.tool=teensyloader
teensyMM.upload.protocol=halfkay
teensyMM.build.core=teensy4
teensyMM.build.mcu=imxrt1062
teensyMM.build.warn_data_percentage=99
teensyMM.build.toolchain=arm/bin/
teensyMM.build.command.gcc=arm-none-eabi-gcc
teensyMM.build.command.g++=arm-none-eabi-g++
teensyMM.build.command.ar=arm-none-eabi-gcc-ar
teensyMM.build.command.objcopy=arm-none-eabi-objcopy
teensyMM.build.command.objdump=arm-none-eabi-objdump
teensyMM.build.command.linker=arm-none-eabi-gcc
teensyMM.build.command.size=arm-none-eabi-size
teensyMM.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib
teensyMM.build.flags.dep=-MMD
teensyMM.build.flags.optimize=-Os
teensyMM.build.flags.cpu=-mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16
teensyMM.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=154
teensyMM.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing
teensyMM.build.flags.c=
teensyMM.build.flags.S=-x assembler-with-cpp
teensyMM.build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++
teensyMM.serial.restart_cmd=false
teensyMM.menu.usb.serial=Serial
teensyMM.menu.usb.serial.build.usbtype=USB_SERIAL
teensyMM.menu.usb.serial2=Dual Serial
teensyMM.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL
teensyMM.menu.usb.serial3=Triple Serial
teensyMM.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL
teensyMM.menu.usb.keyboard=Keyboard
teensyMM.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensyMM.menu.usb.keyboard.fake_serial=teensy_gateway
teensyMM.menu.usb.touch=Keyboard + Touch Screen
teensyMM.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensyMM.menu.usb.touch.fake_serial=teensy_gateway
teensyMM.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
teensyMM.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
teensyMM.menu.usb.hidtouch.fake_serial=teensy_gateway
teensyMM.menu.usb.hid=Keyboard + Mouse + Joystick
teensyMM.menu.usb.hid.build.usbtype=USB_HID
teensyMM.menu.usb.hid.fake_serial=teensy_gateway
teensyMM.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensyMM.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensyMM.menu.usb.midi=MIDI
teensyMM.menu.usb.midi.build.usbtype=USB_MIDI
teensyMM.menu.usb.midi.fake_serial=teensy_gateway
teensyMM.menu.usb.midi4=MIDIx4
teensyMM.menu.usb.midi4.build.usbtype=USB_MIDI4
teensyMM.menu.usb.midi4.fake_serial=teensy_gateway
teensyMM.menu.usb.midi16=MIDIx16
teensyMM.menu.usb.midi16.build.usbtype=USB_MIDI16
teensyMM.menu.usb.midi16.fake_serial=teensy_gateway
teensyMM.menu.usb.serialmidi=Serial + MIDI
teensyMM.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensyMM.menu.usb.serialmidi4=Serial + MIDIx4
teensyMM.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensyMM.menu.usb.serialmidi16=Serial + MIDIx16
teensyMM.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
teensyMM.menu.usb.audio=Audio
teensyMM.menu.usb.audio.build.usbtype=USB_AUDIO
teensyMM.menu.usb.audio.fake_serial=teensy_gateway
teensyMM.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensyMM.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensyMM.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio
teensyMM.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL
teensyMM.menu.usb.mtp=MTP Disk (Experimental)
teensyMM.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensyMM.menu.usb.mtp.fake_serial=teensy_gateway
teensyMM.menu.usb.rawhid=Raw HID
teensyMM.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensyMM.menu.usb.rawhid.fake_serial=teensy_gateway
teensyMM.menu.usb.flightsim=Flight Sim Controls
teensyMM.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensyMM.menu.usb.flightsim.fake_serial=teensy_gateway
teensyMM.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick
teensyMM.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK
teensyMM.menu.usb.flightsimjoystick.fake_serial=teensy_gateway
#teensyMM.menu.usb.disable=No USB
#teensyMM.menu.usb.disable.build.usbtype=USB_DISABLED

teensyMM.menu.speed.600=600 MHz
teensyMM.menu.speed.528=528 MHz
teensyMM.menu.speed.450=450 MHz
teensyMM.menu.speed.396=396 MHz
teensyMM.menu.speed.150=150 MHz
teensyMM.menu.speed.24=24 MHz
teensyMM.menu.speed.720=720 MHz (overclock)
teensyMM.menu.speed.816=816 MHz (overclock)
teensyMM.menu.speed.912=912 MHz (overclock, cooling req'd)
teensyMM.menu.speed.960=960 MHz (overclock, cooling req'd)
teensyMM.menu.speed.1008=1.008 GHz (overclock, cooling req'd)
teensyMM.menu.speed.1008.build.fcpu=1008000000
teensyMM.menu.speed.960.build.fcpu=960000000
teensyMM.menu.speed.912.build.fcpu=912000000
teensyMM.menu.speed.816.build.fcpu=816000000
teensyMM.menu.speed.720.build.fcpu=720000000
teensyMM.menu.speed.600.build.fcpu=600000000
teensyMM.menu.speed.528.build.fcpu=528000000
teensyMM.menu.speed.450.build.fcpu=450000000
teensyMM.menu.speed.396.build.fcpu=396000000
teensyMM.menu.speed.150.build.fcpu=150000000
teensyMM.menu.speed.24.build.fcpu=24000000

teensyMM.menu.opt.o2std=Faster
teensyMM.menu.opt.o2std.build.flags.optimize=-O2
teensyMM.menu.opt.o2std.build.flags.ldspecs=
#teensyMM.menu.opt.o2lto=Faster with LTO
#teensyMM.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
#teensyMM.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensyMM.menu.opt.o1std=Fast
teensyMM.menu.opt.o1std.build.flags.optimize=-O1
teensyMM.menu.opt.o1std.build.flags.ldspecs=
#teensyMM.menu.opt.o1lto=Fast with LTO
#teensyMM.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
#teensyMM.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin
teensyMM.menu.opt.o3std=Fastest
teensyMM.menu.opt.o3std.build.flags.optimize=-O3
teensyMM.menu.opt.o3std.build.flags.ldspecs=
#teensyMM.menu.opt.o3purestd=Fastest + pure-code
#teensyMM.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__
#teensyMM.menu.opt.o3purestd.build.flags.ldspecs=
#teensyMM.menu.opt.o3lto=Fastest with LTO
#teensyMM.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
#teensyMM.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
#teensyMM.menu.opt.o3purelto=Fastest + pure-code with LTO
#teensyMM.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects
#teensyMM.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin
teensyMM.menu.opt.ogstd=Debug
teensyMM.menu.opt.ogstd.build.flags.optimize=-Og
teensyMM.menu.opt.ogstd.build.flags.ldspecs=
#teensyMM.menu.opt.oglto=Debug with LTO
#teensyMM.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
#teensyMM.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensyMM.menu.opt.osstd=Smallest Code
teensyMM.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensyMM.menu.opt.osstd.build.flags.ldspecs=
#teensyMM.menu.opt.oslto=Smallest Code with LTO
#teensyMM.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
#teensyMM.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin

teensyMM.menu.keys.en-us=US English
teensyMM.menu.keys.en-us.build.keylayout=US_ENGLISH
teensyMM.menu.keys.fr-ca=Canadian French
teensyMM.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensyMM.menu.keys.xx-ca=Canadian Multilingual
teensyMM.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensyMM.menu.keys.cz-cz=Czech
teensyMM.menu.keys.cz-cz.build.keylayout=CZECH
teensyMM.menu.keys.da-da=Danish
teensyMM.menu.keys.da-da.build.keylayout=DANISH
teensyMM.menu.keys.fi-fi=Finnish
teensyMM.menu.keys.fi-fi.build.keylayout=FINNISH
teensyMM.menu.keys.fr-fr=French
teensyMM.menu.keys.fr-fr.build.keylayout=FRENCH
teensyMM.menu.keys.fr-be=French Belgian
teensyMM.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensyMM.menu.keys.fr-ch=French Swiss
teensyMM.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensyMM.menu.keys.de-de=German
teensyMM.menu.keys.de-de.build.keylayout=GERMAN
teensyMM.menu.keys.de-dm=German (Mac)
teensyMM.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensyMM.menu.keys.de-ch=German Swiss
teensyMM.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensyMM.menu.keys.is-is=Icelandic
teensyMM.menu.keys.is-is.build.keylayout=ICELANDIC
teensyMM.menu.keys.en-ie=Irish
teensyMM.menu.keys.en-ie.build.keylayout=IRISH
teensyMM.menu.keys.it-it=Italian
teensyMM.menu.keys.it-it.build.keylayout=ITALIAN
teensyMM.menu.keys.no-no=Norwegian
teensyMM.menu.keys.no-no.build.keylayout=NORWEGIAN
teensyMM.menu.keys.pt-pt=Portuguese
teensyMM.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensyMM.menu.keys.pt-br=Portuguese Brazilian
teensyMM.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensyMM.menu.keys.rs-rs=Serbian (Latin Only)
teensyMM.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensyMM.menu.keys.es-es=Spanish
teensyMM.menu.keys.es-es.build.keylayout=SPANISH
teensyMM.menu.keys.es-mx=Spanish Latin America
teensyMM.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensyMM.menu.keys.sv-se=Swedish
teensyMM.menu.keys.sv-se.build.keylayout=SWEDISH
teensyMM.menu.keys.tr-tr=Turkish (partial)
teensyMM.menu.keys.tr-tr.build.keylayout=TURKISH
teensyMM.menu.keys.en-gb=United Kingdom
teensyMM.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensyMM.menu.keys.usint=US International
teensyMM.menu.keys.usint.build.keylayout=US_INTERNATIONAL




teensy40.name=Teensy 4.0
#teensy40.upload.maximum_size=2031616
teensy40.build.board=TEENSY40
teensy40.build.flags.ld=-Wl,--gc-sections,--relax "-T{build.core.path}/imxrt1062.ld"
#teensy40.upload.maximum_data_size=524288
#teensy40.upload.maximum_data_size=1048576
teensy40.upload.tool=teensyloader
teensy40.upload.protocol=halfkay
teensy40.build.core=teensy4
teensy40.build.mcu=imxrt1062
teensy40.build.warn_data_percentage=99
teensy40.build.toolchain=arm/bin/
teensy40.build.command.gcc=arm-none-eabi-gcc
teensy40.build.command.g++=arm-none-eabi-g++
teensy40.build.command.ar=arm-none-eabi-gcc-ar
teensy40.build.command.objcopy=arm-none-eabi-objcopy
teensy40.build.command.objdump=arm-none-eabi-objdump
teensy40.build.command.linker=arm-none-eabi-gcc
teensy40.build.command.size=arm-none-eabi-size
teensy40.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib
teensy40.build.flags.dep=-MMD
teensy40.build.flags.optimize=-Os
teensy40.build.flags.cpu=-mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16
teensy40.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=154
teensy40.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing
teensy40.build.flags.c=
teensy40.build.flags.S=-x assembler-with-cpp
teensy40.build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++
teensy40.serial.restart_cmd=false
teensy40.menu.usb.serial=Serial
teensy40.menu.usb.serial.build.usbtype=USB_SERIAL
teensy40.menu.usb.serial2=Dual Serial
teensy40.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL
teensy40.menu.usb.serial3=Triple Serial
teensy40.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL
teensy40.menu.usb.keyboard=Keyboard
teensy40.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensy40.menu.usb.keyboard.fake_serial=teensy_gateway
teensy40.menu.usb.touch=Keyboard + Touch Screen
teensy40.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensy40.menu.usb.touch.fake_serial=teensy_gateway
teensy40.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
teensy40.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
teensy40.menu.usb.hidtouch.fake_serial=teensy_gateway
teensy40.menu.usb.hid=Keyboard + Mouse + Joystick
teensy40.menu.usb.hid.build.usbtype=USB_HID
teensy40.menu.usb.hid.fake_serial=teensy_gateway
teensy40.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensy40.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensy40.menu.usb.midi=MIDI
teensy40.menu.usb.midi.build.usbtype=USB_MIDI
teensy40.menu.usb.midi.fake_serial=teensy_gateway
teensy40.menu.usb.midikb=MIDI+KEYBOARD
teensy40.menu.usb.midikb.build.usbtype=USB_KEYBOARD_MIDI
teensy40.menu.usb.midikb.fake_serial=teensy_gateway
teensy40.menu.usb.midikbs=MIDI+KEYBOARD+SERIAL
teensy40.menu.usb.midikbs.build.usbtype=USB_KEYBOARD_MIDI_SERIAL
teensy40.menu.usb.midikbs.fake_serial=teensy_gateway
teensy40.menu.usb.midi4=MIDIx4
teensy40.menu.usb.midi4.build.usbtype=USB_MIDI4
teensy40.menu.usb.midi4.fake_serial=teensy_gateway
teensy40.menu.usb.midi16=MIDIx16
teensy40.menu.usb.midi16.build.usbtype=USB_MIDI16
teensy40.menu.usb.midi16.fake_serial=teensy_gateway
teensy40.menu.usb.serialmidi=Serial + MIDI
teensy40.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensy40.menu.usb.serialmidi4=Serial + MIDIx4
teensy40.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensy40.menu.usb.serialmidi16=Serial + MIDIx16
teensy40.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
teensy40.menu.usb.audio=Audio
teensy40.menu.usb.audio.build.usbtype=USB_AUDIO
teensy40.menu.usb.audio.fake_serial=teensy_gateway
teensy40.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensy40.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensy40.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio
teensy40.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL
teensy40.menu.usb.mtp=MTP Disk (Experimental)
teensy40.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensy40.menu.usb.mtp.fake_serial=teensy_gateway
teensy40.menu.usb.rawhid=Raw HID
teensy40.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy40.menu.usb.rawhid.fake_serial=teensy_gateway
teensy40.menu.usb.flightsim=Flight Sim Controls
teensy40.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensy40.menu.usb.flightsim.fake_serial=teensy_gateway
teensy40.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick
teensy40.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK
teensy40.menu.usb.flightsimjoystick.fake_serial=teensy_gateway
#teensy40.menu.usb.disable=No USB
#teensy40.menu.usb.disable.build.usbtype=USB_DISABLED

teensy40.menu.speed.600=600 MHz
teensy40.menu.speed.528=528 MHz
teensy40.menu.speed.450=450 MHz
teensy40.menu.speed.396=396 MHz
teensy40.menu.speed.150=150 MHz
teensy40.menu.speed.24=24 MHz
teensy40.menu.speed.720=720 MHz (overclock)
teensy40.menu.speed.816=816 MHz (overclock)
teensy40.menu.speed.912=912 MHz (overclock, cooling req'd)
teensy40.menu.speed.960=960 MHz (overclock, cooling req'd)
teensy40.menu.speed.1008=1.008 GHz (overclock, cooling req'd)
teensy40.menu.speed.1008.build.fcpu=1008000000
teensy40.menu.speed.960.build.fcpu=960000000
teensy40.menu.speed.912.build.fcpu=912000000
teensy40.menu.speed.816.build.fcpu=816000000
teensy40.menu.speed.720.build.fcpu=720000000
teensy40.menu.speed.600.build.fcpu=600000000
teensy40.menu.speed.528.build.fcpu=528000000
teensy40.menu.speed.450.build.fcpu=450000000
teensy40.menu.speed.396.build.fcpu=396000000
teensy40.menu.speed.150.build.fcpu=150000000
teensy40.menu.speed.24.build.fcpu=24000000

teensy40.menu.opt.o2std=Faster
teensy40.menu.opt.o2std.build.flags.optimize=-O2
teensy40.menu.opt.o2std.build.flags.ldspecs=
#teensy40.menu.opt.o2lto=Faster with LTO
#teensy40.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
#teensy40.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensy40.menu.opt.o1std=Fast
teensy40.menu.opt.o1std.build.flags.optimize=-O1
teensy40.menu.opt.o1std.build.flags.ldspecs=
#teensy40.menu.opt.o1lto=Fast with LTO
#teensy40.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
#teensy40.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin
teensy40.menu.opt.o3std=Fastest
teensy40.menu.opt.o3std.build.flags.optimize=-O3
teensy40.menu.opt.o3std.build.flags.ldspecs=
#teensy40.menu.opt.o3purestd=Fastest + pure-code
#teensy40.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__
#teensy40.menu.opt.o3purestd.build.flags.ldspecs=
#teensy40.menu.opt.o3lto=Fastest with LTO
#teensy40.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
#teensy40.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
#teensy40.menu.opt.o3purelto=Fastest + pure-code with LTO
#teensy40.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects
#teensy40.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin
teensy40.menu.opt.ogstd=Debug
teensy40.menu.opt.ogstd.build.flags.optimize=-Og
teensy40.menu.opt.ogstd.build.flags.ldspecs=
#teensy40.menu.opt.oglto=Debug with LTO
#teensy40.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
#teensy40.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensy40.menu.opt.osstd=Smallest Code
teensy40.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensy40.menu.opt.osstd.build.flags.ldspecs=
#teensy40.menu.opt.oslto=Smallest Code with LTO
#teensy40.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
#teensy40.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin

teensy40.menu.keys.en-us=US English
teensy40.menu.keys.en-us.build.keylayout=US_ENGLISH
teensy40.menu.keys.fr-ca=Canadian French
teensy40.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensy40.menu.keys.xx-ca=Canadian Multilingual
teensy40.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensy40.menu.keys.cz-cz=Czech
teensy40.menu.keys.cz-cz.build.keylayout=CZECH
teensy40.menu.keys.da-da=Danish
teensy40.menu.keys.da-da.build.keylayout=DANISH
teensy40.menu.keys.fi-fi=Finnish
teensy40.menu.keys.fi-fi.build.keylayout=FINNISH
teensy40.menu.keys.fr-fr=French
teensy40.menu.keys.fr-fr.build.keylayout=FRENCH
teensy40.menu.keys.fr-be=French Belgian
teensy40.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensy40.menu.keys.fr-ch=French Swiss
teensy40.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensy40.menu.keys.de-de=German
teensy40.menu.keys.de-de.build.keylayout=GERMAN
teensy40.menu.keys.de-dm=German (Mac)
teensy40.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensy40.menu.keys.de-ch=German Swiss
teensy40.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensy40.menu.keys.is-is=Icelandic
teensy40.menu.keys.is-is.build.keylayout=ICELANDIC
teensy40.menu.keys.en-ie=Irish
teensy40.menu.keys.en-ie.build.keylayout=IRISH
teensy40.menu.keys.it-it=Italian
teensy40.menu.keys.it-it.build.keylayout=ITALIAN
teensy40.menu.keys.no-no=Norwegian
teensy40.menu.keys.no-no.build.keylayout=NORWEGIAN
teensy40.menu.keys.pt-pt=Portuguese
teensy40.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensy40.menu.keys.pt-br=Portuguese Brazilian
teensy40.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensy40.menu.keys.rs-rs=Serbian (Latin Only)
teensy40.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensy40.menu.keys.es-es=Spanish
teensy40.menu.keys.es-es.build.keylayout=SPANISH
teensy40.menu.keys.es-mx=Spanish Latin America
teensy40.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensy40.menu.keys.sv-se=Swedish
teensy40.menu.keys.sv-se.build.keylayout=SWEDISH
teensy40.menu.keys.tr-tr=Turkish (partial)
teensy40.menu.keys.tr-tr.build.keylayout=TURKISH
teensy40.menu.keys.en-gb=United Kingdom
teensy40.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensy40.menu.keys.usint=US International
teensy40.menu.keys.usint.build.keylayout=US_INTERNATIONAL


teensy36.name=Teensy 3.6
teensy36.upload.maximum_size=1048576
teensy36.upload.maximum_data_size=262144
teensy36.upload.tool=teensyloader
teensy36.upload.protocol=halfkay
teensy36.build.board=TEENSY36
teensy36.build.core=teensy3
teensy36.build.mcu=mk66fx1m0
teensy36.build.warn_data_percentage=99
teensy36.build.toolchain=arm/bin/
teensy36.build.command.gcc=arm-none-eabi-gcc
teensy36.build.command.g++=arm-none-eabi-g++
teensy36.build.command.ar=arm-none-eabi-gcc-ar
teensy36.build.command.objcopy=arm-none-eabi-objcopy
teensy36.build.command.objdump=arm-none-eabi-objdump
teensy36.build.command.linker=arm-none-eabi-gcc
teensy36.build.command.size=arm-none-eabi-size
teensy36.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access
teensy36.build.flags.dep=-MMD
teensy36.build.flags.optimize=-Os
teensy36.build.flags.cpu=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant
teensy36.build.flags.defs=-D__MK66FX1M0__ -DTEENSYDUINO=154
teensy36.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
teensy36.build.flags.c=
teensy36.build.flags.S=-x assembler-with-cpp
teensy36.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk66fx1m0.ld"
teensy36.build.flags.libs=-larm_cortexM4lf_math -lm -lstdc++
teensy36.serial.restart_cmd=false
teensy36.menu.usb.serial=Serial
teensy36.menu.usb.serial.build.usbtype=USB_SERIAL
teensy36.menu.usb.serial2=Dual Serial
teensy36.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL
teensy36.menu.usb.serial3=Triple Serial
teensy36.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL
teensy36.menu.usb.keyboard=Keyboard
teensy36.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensy36.menu.usb.keyboard.fake_serial=teensy_gateway
teensy36.menu.usb.touch=Keyboard + Touch Screen
teensy36.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensy36.menu.usb.touch.fake_serial=teensy_gateway
teensy36.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
teensy36.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
teensy36.menu.usb.hidtouch.fake_serial=teensy_gateway
teensy36.menu.usb.hid=Keyboard + Mouse + Joystick
teensy36.menu.usb.hid.build.usbtype=USB_HID
teensy36.menu.usb.hid.fake_serial=teensy_gateway
teensy36.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensy36.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensy36.menu.usb.midi=MIDI
teensy36.menu.usb.midi.build.usbtype=USB_MIDI
teensy36.menu.usb.midi.fake_serial=teensy_gateway
teensy36.menu.usb.midi4=MIDIx4
teensy36.menu.usb.midi4.build.usbtype=USB_MIDI4
teensy36.menu.usb.midi4.fake_serial=teensy_gateway
teensy36.menu.usb.midi16=MIDIx16
teensy36.menu.usb.midi16.build.usbtype=USB_MIDI16
teensy36.menu.usb.midi16.fake_serial=teensy_gateway
teensy36.menu.usb.serialmidi=Serial + MIDI
teensy36.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensy36.menu.usb.serialmidi4=Serial + MIDIx4
teensy36.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensy36.menu.usb.serialmidi16=Serial + MIDIx16
teensy36.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
teensy36.menu.usb.audio=Audio
teensy36.menu.usb.audio.build.usbtype=USB_AUDIO
teensy36.menu.usb.audio.fake_serial=teensy_gateway
teensy36.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensy36.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensy36.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio
teensy36.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL
teensy36.menu.usb.mtp=MTP Disk (Experimental)
teensy36.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensy36.menu.usb.mtp.fake_serial=teensy_gateway
teensy36.menu.usb.rawhid=Raw HID
teensy36.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy36.menu.usb.rawhid.fake_serial=teensy_gateway
teensy36.menu.usb.flightsim=Flight Sim Controls
teensy36.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensy36.menu.usb.flightsim.fake_serial=teensy_gateway
teensy36.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick
teensy36.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK
teensy36.menu.usb.flightsimjoystick.fake_serial=teensy_gateway
teensy36.menu.usb.everything=All of the Above
teensy36.menu.usb.everything.build.usbtype=USB_EVERYTHING
teensy36.menu.usb.disable=No USB
teensy36.menu.usb.disable.build.usbtype=USB_DISABLED

teensy36.menu.speed.180=180 MHz
teensy36.menu.speed.168=168 MHz
teensy36.menu.speed.144=144 MHz
teensy36.menu.speed.120=120 MHz
teensy36.menu.speed.96=96 MHz
teensy36.menu.speed.72=72 MHz
teensy36.menu.speed.48=48 MHz
teensy36.menu.speed.24=24 MHz
teensy36.menu.speed.16=16 MHz (No USB)
teensy36.menu.speed.8=8 MHz (No USB)
teensy36.menu.speed.4=4 MHz (No USB)
teensy36.menu.speed.2=2 MHz (No USB)
teensy36.menu.speed.192=192 MHz (overclock)
teensy36.menu.speed.216=216 MHz (overclock)
teensy36.menu.speed.240=240 MHz (overclock)
teensy36.menu.speed.256=256 MHz (overclock)
teensy36.menu.speed.256.build.fcpu=256000000
teensy36.menu.speed.240.build.fcpu=240000000
teensy36.menu.speed.216.build.fcpu=216000000
teensy36.menu.speed.192.build.fcpu=192000000
teensy36.menu.speed.180.build.fcpu=180000000
teensy36.menu.speed.168.build.fcpu=168000000
teensy36.menu.speed.144.build.fcpu=144000000
teensy36.menu.speed.120.build.fcpu=120000000
teensy36.menu.speed.96.build.fcpu=96000000
teensy36.menu.speed.72.build.fcpu=72000000
teensy36.menu.speed.48.build.fcpu=48000000
teensy36.menu.speed.24.build.fcpu=24000000
teensy36.menu.speed.16.build.fcpu=16000000
teensy36.menu.speed.8.build.fcpu=8000000
teensy36.menu.speed.4.build.fcpu=4000000
teensy36.menu.speed.2.build.fcpu=2000000

teensy36.menu.opt.o2std=Faster
teensy36.menu.opt.o2std.build.flags.optimize=-O2
teensy36.menu.opt.o2std.build.flags.ldspecs=
teensy36.menu.opt.o2lto=Faster with LTO
teensy36.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
teensy36.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensy36.menu.opt.o1std=Fast
teensy36.menu.opt.o1std.build.flags.optimize=-O1
teensy36.menu.opt.o1std.build.flags.ldspecs=
teensy36.menu.opt.o1lto=Fast with LTO
teensy36.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
teensy36.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin
teensy36.menu.opt.o3std=Fastest
teensy36.menu.opt.o3std.build.flags.optimize=-O3
teensy36.menu.opt.o3std.build.flags.ldspecs=
teensy36.menu.opt.o3purestd=Fastest + pure-code
teensy36.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__
teensy36.menu.opt.o3purestd.build.flags.ldspecs=
teensy36.menu.opt.o3lto=Fastest with LTO
teensy36.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
teensy36.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
teensy36.menu.opt.o3purelto=Fastest + pure-code with LTO
teensy36.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects
teensy36.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin
teensy36.menu.opt.ogstd=Debug
teensy36.menu.opt.ogstd.build.flags.optimize=-Og
teensy36.menu.opt.ogstd.build.flags.ldspecs=
teensy36.menu.opt.oglto=Debug with LTO
teensy36.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
teensy36.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensy36.menu.opt.osstd=Smallest Code
teensy36.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensy36.menu.opt.osstd.build.flags.ldspecs=
teensy36.menu.opt.oslto=Smallest Code with LTO
teensy36.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
teensy36.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin

teensy36.menu.keys.en-us=US English
teensy36.menu.keys.en-us.build.keylayout=US_ENGLISH
teensy36.menu.keys.fr-ca=Canadian French
teensy36.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensy36.menu.keys.xx-ca=Canadian Multilingual
teensy36.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensy36.menu.keys.cz-cz=Czech
teensy36.menu.keys.cz-cz.build.keylayout=CZECH
teensy36.menu.keys.da-da=Danish
teensy36.menu.keys.da-da.build.keylayout=DANISH
teensy36.menu.keys.fi-fi=Finnish
teensy36.menu.keys.fi-fi.build.keylayout=FINNISH
teensy36.menu.keys.fr-fr=French
teensy36.menu.keys.fr-fr.build.keylayout=FRENCH
teensy36.menu.keys.fr-be=French Belgian
teensy36.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensy36.menu.keys.fr-ch=French Swiss
teensy36.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensy36.menu.keys.de-de=German
teensy36.menu.keys.de-de.build.keylayout=GERMAN
teensy36.menu.keys.de-dm=German (Mac)
teensy36.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensy36.menu.keys.de-ch=German Swiss
teensy36.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensy36.menu.keys.is-is=Icelandic
teensy36.menu.keys.is-is.build.keylayout=ICELANDIC
teensy36.menu.keys.en-ie=Irish
teensy36.menu.keys.en-ie.build.keylayout=IRISH
teensy36.menu.keys.it-it=Italian
teensy36.menu.keys.it-it.build.keylayout=ITALIAN
teensy36.menu.keys.no-no=Norwegian
teensy36.menu.keys.no-no.build.keylayout=NORWEGIAN
teensy36.menu.keys.pt-pt=Portuguese
teensy36.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensy36.menu.keys.pt-br=Portuguese Brazilian
teensy36.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensy36.menu.keys.rs-rs=Serbian (Latin Only)
teensy36.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensy36.menu.keys.es-es=Spanish
teensy36.menu.keys.es-es.build.keylayout=SPANISH
teensy36.menu.keys.es-mx=Spanish Latin America
teensy36.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensy36.menu.keys.sv-se=Swedish
teensy36.menu.keys.sv-se.build.keylayout=SWEDISH
teensy36.menu.keys.tr-tr=Turkish (partial)
teensy36.menu.keys.tr-tr.build.keylayout=TURKISH
teensy36.menu.keys.en-gb=United Kingdom
teensy36.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensy36.menu.keys.usint=US International
teensy36.menu.keys.usint.build.keylayout=US_INTERNATIONAL


teensy35.name=Teensy 3.5
teensy35.upload.maximum_size=524288
teensy35.upload.maximum_data_size=262136
teensy35.upload.tool=teensyloader
teensy35.upload.protocol=halfkay
teensy35.build.board=TEENSY35
teensy35.build.core=teensy3
teensy35.build.mcu=mk64fx512
teensy35.build.warn_data_percentage=98
teensy35.build.toolchain=arm/bin/
teensy35.build.command.gcc=arm-none-eabi-gcc
teensy35.build.command.g++=arm-none-eabi-g++
teensy35.build.command.ar=arm-none-eabi-gcc-ar
teensy35.build.command.objcopy=arm-none-eabi-objcopy
teensy35.build.command.objdump=arm-none-eabi-objdump
teensy35.build.command.linker=arm-none-eabi-gcc
teensy35.build.command.size=arm-none-eabi-size
teensy35.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access
teensy35.build.flags.dep=-MMD
teensy35.build.flags.optimize=-Os
teensy35.build.flags.cpu=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant
teensy35.build.flags.defs=-D__MK64FX512__ -DTEENSYDUINO=154
teensy35.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
teensy35.build.flags.c=
teensy35.build.flags.S=-x assembler-with-cpp
teensy35.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk64fx512.ld"
teensy35.build.flags.libs=-larm_cortexM4lf_math -lm -lstdc++
teensy35.serial.restart_cmd=false
teensy35.menu.usb.serial=Serial
teensy35.menu.usb.serial.build.usbtype=USB_SERIAL
teensy35.menu.usb.serial2=Dual Serial
teensy35.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL
teensy35.menu.usb.serial3=Triple Serial
teensy35.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL
teensy35.menu.usb.keyboard=Keyboard
teensy35.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensy35.menu.usb.keyboard.fake_serial=teensy_gateway
teensy35.menu.usb.touch=Keyboard + Touch Screen
teensy35.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensy35.menu.usb.touch.fake_serial=teensy_gateway
teensy35.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
teensy35.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
teensy35.menu.usb.hidtouch.fake_serial=teensy_gateway
teensy35.menu.usb.hid=Keyboard + Mouse + Joystick
teensy35.menu.usb.hid.build.usbtype=USB_HID
teensy35.menu.usb.hid.fake_serial=teensy_gateway
teensy35.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensy35.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensy35.menu.usb.midi=MIDI
teensy35.menu.usb.midi.build.usbtype=USB_MIDI
teensy35.menu.usb.midi.fake_serial=teensy_gateway
teensy35.menu.usb.midi4=MIDIx4
teensy35.menu.usb.midi4.build.usbtype=USB_MIDI4
teensy35.menu.usb.midi4.fake_serial=teensy_gateway
teensy35.menu.usb.midi16=MIDIx16
teensy35.menu.usb.midi16.build.usbtype=USB_MIDI16
teensy35.menu.usb.midi16.fake_serial=teensy_gateway
teensy35.menu.usb.serialmidi=Serial + MIDI
teensy35.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensy35.menu.usb.serialmidi4=Serial + MIDIx4
teensy35.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensy35.menu.usb.serialmidi16=Serial + MIDIx16
teensy35.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
teensy35.menu.usb.audio=Audio
teensy35.menu.usb.audio.build.usbtype=USB_AUDIO
teensy35.menu.usb.audio.fake_serial=teensy_gateway
teensy35.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensy35.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensy35.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio
teensy35.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL
teensy35.menu.usb.mtp=MTP Disk (Experimental)
teensy35.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensy35.menu.usb.mtp.fake_serial=teensy_gateway
teensy35.menu.usb.rawhid=Raw HID
teensy35.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy35.menu.usb.rawhid.fake_serial=teensy_gateway
teensy35.menu.usb.flightsim=Flight Sim Controls
teensy35.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensy35.menu.usb.flightsim.fake_serial=teensy_gateway
teensy35.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick
teensy35.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK
teensy35.menu.usb.flightsimjoystick.fake_serial=teensy_gateway
teensy35.menu.usb.everything=All of the Above
teensy35.menu.usb.everything.build.usbtype=USB_EVERYTHING
teensy35.menu.usb.disable=No USB
teensy35.menu.usb.disable.build.usbtype=USB_DISABLED

teensy35.menu.speed.120=120 MHz
teensy35.menu.speed.96=96 MHz
teensy35.menu.speed.72=72 MHz
teensy35.menu.speed.48=48 MHz
teensy35.menu.speed.24=24 MHz
teensy35.menu.speed.16=16 MHz (No USB)
teensy35.menu.speed.8=8 MHz (No USB)
teensy35.menu.speed.4=4 MHz (No USB)
teensy35.menu.speed.2=2 MHz (No USB)
teensy35.menu.speed.144=144 MHz (overclock)
teensy35.menu.speed.168=168 MHz (overclock)
teensy35.menu.speed.168.build.fcpu=168000000
teensy35.menu.speed.144.build.fcpu=144000000
teensy35.menu.speed.120.build.fcpu=120000000
teensy35.menu.speed.96.build.fcpu=96000000
teensy35.menu.speed.72.build.fcpu=72000000
teensy35.menu.speed.48.build.fcpu=48000000
teensy35.menu.speed.24.build.fcpu=24000000
teensy35.menu.speed.16.build.fcpu=16000000
teensy35.menu.speed.8.build.fcpu=8000000
teensy35.menu.speed.4.build.fcpu=4000000
teensy35.menu.speed.2.build.fcpu=2000000

teensy35.menu.opt.o2std=Faster
teensy35.menu.opt.o2std.build.flags.optimize=-O2
teensy35.menu.opt.o2std.build.flags.ldspecs=
teensy35.menu.opt.o2lto=Faster with LTO
teensy35.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
teensy35.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensy35.menu.opt.o1std=Fast
teensy35.menu.opt.o1std.build.flags.optimize=-O1
teensy35.menu.opt.o1std.build.flags.ldspecs=
teensy35.menu.opt.o1lto=Fast with LTO
teensy35.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
teensy35.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin
teensy35.menu.opt.o3std=Fastest
teensy35.menu.opt.o3std.build.flags.optimize=-O3
teensy35.menu.opt.o3std.build.flags.ldspecs=
teensy35.menu.opt.o3purestd=Fastest + pure-code
teensy35.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__
teensy35.menu.opt.o3purestd.build.flags.ldspecs=
teensy35.menu.opt.o3lto=Fastest with LTO
teensy35.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
teensy35.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
teensy35.menu.opt.o3purelto=Fastest + pure-code with LTO
teensy35.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects
teensy35.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin
teensy35.menu.opt.ogstd=Debug
teensy35.menu.opt.ogstd.build.flags.optimize=-Og
teensy35.menu.opt.ogstd.build.flags.ldspecs=
teensy35.menu.opt.oglto=Debug with LTO
teensy35.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
teensy35.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensy35.menu.opt.osstd=Smallest Code
teensy35.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensy35.menu.opt.osstd.build.flags.ldspecs=
teensy35.menu.opt.oslto=Smallest Code with LTO
teensy35.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
teensy35.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin

teensy35.menu.keys.en-us=US English
teensy35.menu.keys.en-us.build.keylayout=US_ENGLISH
teensy35.menu.keys.fr-ca=Canadian French
teensy35.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensy35.menu.keys.xx-ca=Canadian Multilingual
teensy35.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensy35.menu.keys.cz-cz=Czech
teensy35.menu.keys.cz-cz.build.keylayout=CZECH
teensy35.menu.keys.da-da=Danish
teensy35.menu.keys.da-da.build.keylayout=DANISH
teensy35.menu.keys.fi-fi=Finnish
teensy35.menu.keys.fi-fi.build.keylayout=FINNISH
teensy35.menu.keys.fr-fr=French
teensy35.menu.keys.fr-fr.build.keylayout=FRENCH
teensy35.menu.keys.fr-be=French Belgian
teensy35.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensy35.menu.keys.fr-ch=French Swiss
teensy35.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensy35.menu.keys.de-de=German
teensy35.menu.keys.de-de.build.keylayout=GERMAN
teensy35.menu.keys.de-dm=German (Mac)
teensy35.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensy35.menu.keys.de-ch=German Swiss
teensy35.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensy35.menu.keys.is-is=Icelandic
teensy35.menu.keys.is-is.build.keylayout=ICELANDIC
teensy35.menu.keys.en-ie=Irish
teensy35.menu.keys.en-ie.build.keylayout=IRISH
teensy35.menu.keys.it-it=Italian
teensy35.menu.keys.it-it.build.keylayout=ITALIAN
teensy35.menu.keys.no-no=Norwegian
teensy35.menu.keys.no-no.build.keylayout=NORWEGIAN
teensy35.menu.keys.pt-pt=Portuguese
teensy35.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensy35.menu.keys.pt-br=Portuguese Brazilian
teensy35.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensy35.menu.keys.rs-rs=Serbian (Latin Only)
teensy35.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensy35.menu.keys.es-es=Spanish
teensy35.menu.keys.es-es.build.keylayout=SPANISH
teensy35.menu.keys.es-mx=Spanish Latin America
teensy35.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensy35.menu.keys.sv-se=Swedish
teensy35.menu.keys.sv-se.build.keylayout=SWEDISH
teensy35.menu.keys.tr-tr=Turkish (partial)
teensy35.menu.keys.tr-tr.build.keylayout=TURKISH
teensy35.menu.keys.en-gb=United Kingdom
teensy35.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensy35.menu.keys.usint=US International
teensy35.menu.keys.usint.build.keylayout=US_INTERNATIONAL


teensy31.name=Teensy 3.2 / 3.1
teensy31.upload.maximum_size=262144
teensy31.upload.maximum_data_size=65536
teensy31.upload.tool=teensyloader
teensy31.upload.protocol=halfkay
teensy31.build.board=TEENSY32
teensy31.build.core=teensy3
teensy31.build.mcu=mk20dx256
teensy31.build.warn_data_percentage=97
teensy31.build.toolchain=arm/bin/
teensy31.build.command.gcc=arm-none-eabi-gcc
teensy31.build.command.g++=arm-none-eabi-g++
teensy31.build.command.ar=arm-none-eabi-gcc-ar
teensy31.build.command.objcopy=arm-none-eabi-objcopy
teensy31.build.command.objdump=arm-none-eabi-objdump
teensy31.build.command.linker=arm-none-eabi-gcc
teensy31.build.command.size=arm-none-eabi-size
teensy31.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access
teensy31.build.flags.dep=-MMD
teensy31.build.flags.optimize=-Os
teensy31.build.flags.cpu=-mthumb -mcpu=cortex-m4 -fsingle-precision-constant
teensy31.build.flags.defs=-D__MK20DX256__ -DTEENSYDUINO=154
teensy31.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
teensy31.build.flags.c=
teensy31.build.flags.S=-x assembler-with-cpp
teensy31.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk20dx256.ld"
teensy31.build.flags.libs=-larm_cortexM4l_math -lm -lstdc++
teensy31.serial.restart_cmd=false
teensy31.menu.usb.serial=Serial
teensy31.menu.usb.serial.build.usbtype=USB_SERIAL
teensy31.menu.usb.serial2=Dual Serial
teensy31.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL
teensy31.menu.usb.serial3=Triple Serial
teensy31.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL
teensy31.menu.usb.keyboard=Keyboard
teensy31.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensy31.menu.usb.keyboard.fake_serial=teensy_gateway
teensy31.menu.usb.touch=Keyboard + Touch Screen
teensy31.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensy31.menu.usb.touch.fake_serial=teensy_gateway
teensy31.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
teensy31.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
teensy31.menu.usb.hidtouch.fake_serial=teensy_gateway
teensy31.menu.usb.hid=Keyboard + Mouse + Joystick
teensy31.menu.usb.hid.build.usbtype=USB_HID
teensy31.menu.usb.hid.fake_serial=teensy_gateway
teensy31.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensy31.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensy31.menu.usb.midi=MIDI
teensy31.menu.usb.midi.build.usbtype=USB_MIDI
teensy31.menu.usb.midi.fake_serial=teensy_gateway
teensy31.menu.usb.midi4=MIDIx4
teensy31.menu.usb.midi4.build.usbtype=USB_MIDI4
teensy31.menu.usb.midi4.fake_serial=teensy_gateway
teensy31.menu.usb.midi16=MIDIx16
teensy31.menu.usb.midi16.build.usbtype=USB_MIDI16
teensy31.menu.usb.midi16.fake_serial=teensy_gateway
teensy31.menu.usb.serialmidi=Serial + MIDI
teensy31.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensy31.menu.usb.serialmidi4=Serial + MIDIx4
teensy31.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensy31.menu.usb.serialmidi16=Serial + MIDIx16
teensy31.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
teensy31.menu.usb.audio=Audio
teensy31.menu.usb.audio.build.usbtype=USB_AUDIO
teensy31.menu.usb.audio.fake_serial=teensy_gateway
teensy31.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensy31.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensy31.menu.usb.serialmidi16audio=Serial + MIDIx16 + Audio
teensy31.menu.usb.serialmidi16audio.build.usbtype=USB_MIDI16_AUDIO_SERIAL
teensy31.menu.usb.mtp=MTP Disk (Experimental)
teensy31.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensy31.menu.usb.mtp.fake_serial=teensy_gateway
teensy31.menu.usb.rawhid=Raw HID
teensy31.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy31.menu.usb.rawhid.fake_serial=teensy_gateway
teensy31.menu.usb.flightsim=Flight Sim Controls
teensy31.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensy31.menu.usb.flightsim.fake_serial=teensy_gateway
teensy31.menu.usb.flightsimjoystick=Flight Sim Controls + Joystick
teensy31.menu.usb.flightsimjoystick.build.usbtype=USB_FLIGHTSIM_JOYSTICK
teensy31.menu.usb.flightsimjoystick.fake_serial=teensy_gateway
teensy31.menu.usb.everything=All of the Above
teensy31.menu.usb.everything.build.usbtype=USB_EVERYTHING
teensy31.menu.usb.disable=No USB
teensy31.menu.usb.disable.build.usbtype=USB_DISABLED

teensy31.menu.speed.96=96 MHz (overclock)
teensy31.menu.speed.72=72 MHz
teensy31.menu.speed.48=48 MHz
teensy31.menu.speed.24=24 MHz
teensy31.menu.speed.16=16 MHz (No USB)
teensy31.menu.speed.8=8 MHz (No USB)
teensy31.menu.speed.4=4 MHz (No USB)
teensy31.menu.speed.2=2 MHz (No USB)
teensy31.menu.speed.120=120 MHz (overclock)
#uncomment these if you want to try faster overclocking
#teensy31.menu.speed.144=144 MHz (overclock)
#teensy31.menu.speed.168=168 MHz (overclock)
teensy31.menu.speed.168.build.fcpu=168000000
teensy31.menu.speed.144.build.fcpu=144000000
teensy31.menu.speed.120.build.fcpu=120000000
teensy31.menu.speed.96.build.fcpu=96000000
teensy31.menu.speed.72.build.fcpu=72000000
teensy31.menu.speed.48.build.fcpu=48000000
teensy31.menu.speed.24.build.fcpu=24000000
teensy31.menu.speed.16.build.fcpu=16000000
teensy31.menu.speed.8.build.fcpu=8000000
teensy31.menu.speed.4.build.fcpu=4000000
teensy31.menu.speed.2.build.fcpu=2000000

teensy31.menu.opt.o2std=Faster
teensy31.menu.opt.o2std.build.flags.optimize=-O2
teensy31.menu.opt.o2std.build.flags.ldspecs=
teensy31.menu.opt.o2lto=Faster with LTO
teensy31.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
teensy31.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensy31.menu.opt.o1std=Fast
teensy31.menu.opt.o1std.build.flags.optimize=-O1
teensy31.menu.opt.o1std.build.flags.ldspecs=
teensy31.menu.opt.o1lto=Fast with LTO
teensy31.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
teensy31.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin
teensy31.menu.opt.o3std=Fastest
teensy31.menu.opt.o3std.build.flags.optimize=-O3
teensy31.menu.opt.o3std.build.flags.ldspecs=
teensy31.menu.opt.o3purestd=Fastest + pure-code
teensy31.menu.opt.o3purestd.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__
teensy31.menu.opt.o3purestd.build.flags.ldspecs=
teensy31.menu.opt.o3lto=Fastest with LTO
teensy31.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
teensy31.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
teensy31.menu.opt.o3purelto=Fastest + pure-code with LTO
teensy31.menu.opt.o3purelto.build.flags.optimize=-O3 -mpure-code -D__PURE_CODE__ -flto -fno-fat-lto-objects
teensy31.menu.opt.o3purelto.build.flags.ldspecs=-fuse-linker-plugin
teensy31.menu.opt.ogstd=Debug
teensy31.menu.opt.ogstd.build.flags.optimize=-Og
teensy31.menu.opt.ogstd.build.flags.ldspecs=
teensy31.menu.opt.oglto=Debug with LTO
teensy31.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
teensy31.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensy31.menu.opt.osstd=Smallest Code
teensy31.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensy31.menu.opt.osstd.build.flags.ldspecs=
teensy31.menu.opt.oslto=Smallest Code with LTO
teensy31.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
teensy31.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin

teensy31.menu.keys.en-us=US English
teensy31.menu.keys.en-us.build.keylayout=US_ENGLISH
teensy31.menu.keys.fr-ca=Canadian French
teensy31.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensy31.menu.keys.xx-ca=Canadian Multilingual
teensy31.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensy31.menu.keys.cz-cz=Czech
teensy31.menu.keys.cz-cz.build.keylayout=CZECH
teensy31.menu.keys.da-da=Danish
teensy31.menu.keys.da-da.build.keylayout=DANISH
teensy31.menu.keys.fi-fi=Finnish
teensy31.menu.keys.fi-fi.build.keylayout=FINNISH
teensy31.menu.keys.fr-fr=French
teensy31.menu.keys.fr-fr.build.keylayout=FRENCH
teensy31.menu.keys.fr-be=French Belgian
teensy31.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensy31.menu.keys.fr-ch=French Swiss
teensy31.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensy31.menu.keys.de-de=German
teensy31.menu.keys.de-de.build.keylayout=GERMAN
teensy31.menu.keys.de-dm=German (Mac)
teensy31.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensy31.menu.keys.de-ch=German Swiss
teensy31.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensy31.menu.keys.is-is=Icelandic
teensy31.menu.keys.is-is.build.keylayout=ICELANDIC
teensy31.menu.keys.en-ie=Irish
teensy31.menu.keys.en-ie.build.keylayout=IRISH
teensy31.menu.keys.it-it=Italian
teensy31.menu.keys.it-it.build.keylayout=ITALIAN
teensy31.menu.keys.no-no=Norwegian
teensy31.menu.keys.no-no.build.keylayout=NORWEGIAN
teensy31.menu.keys.pt-pt=Portuguese
teensy31.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensy31.menu.keys.pt-br=Portuguese Brazilian
teensy31.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensy31.menu.keys.rs-rs=Serbian (Latin Only)
teensy31.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensy31.menu.keys.es-es=Spanish
teensy31.menu.keys.es-es.build.keylayout=SPANISH
teensy31.menu.keys.es-mx=Spanish Latin America
teensy31.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensy31.menu.keys.sv-se=Swedish
teensy31.menu.keys.sv-se.build.keylayout=SWEDISH
teensy31.menu.keys.tr-tr=Turkish (partial)
teensy31.menu.keys.tr-tr.build.keylayout=TURKISH
teensy31.menu.keys.en-gb=United Kingdom
teensy31.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensy31.menu.keys.usint=US International
teensy31.menu.keys.usint.build.keylayout=US_INTERNATIONAL

teensy31.vid.0=0x16C0
teensy31.vid.1=0x16C0
teensy31.vid.2=0x16C0
teensy31.vid.3=0x16C0
teensy31.vid.4=0x16C0
teensy31.pid.0=0x0483
teensy31.pid.1=0x0487
teensy31.pid.2=0x0489
teensy31.pid.3=0x048A
teensy31.pid.4=0x0476

teensy30.name=Teensy 3.0
teensy30.upload.maximum_size=131072
teensy30.upload.maximum_data_size=16384
teensy30.upload.tool=teensyloader
teensy30.upload.protocol=halfkay
teensy30.build.board=TEENSY30
teensy30.build.core=teensy3
teensy30.build.mcu=mk20dx128
teensy30.build.warn_data_percentage=94
teensy30.build.toolchain=arm/bin/
teensy30.build.command.gcc=arm-none-eabi-gcc
teensy30.build.command.g++=arm-none-eabi-g++
teensy30.build.command.ar=arm-none-eabi-gcc-ar
teensy30.build.command.objcopy=arm-none-eabi-objcopy
teensy30.build.command.objdump=arm-none-eabi-objdump
teensy30.build.command.linker=arm-none-eabi-gcc
teensy30.build.command.size=arm-none-eabi-size
teensy30.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access
teensy30.build.flags.dep=-MMD
teensy30.build.flags.optimize=-Os
teensy30.build.flags.cpu=-mthumb -mcpu=cortex-m4 -fsingle-precision-constant
teensy30.build.flags.defs=-D__MK20DX128__ -DTEENSYDUINO=154
teensy30.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
teensy30.build.flags.c=
teensy30.build.flags.S=-x assembler-with-cpp
teensy30.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mk20dx128.ld"
teensy30.build.flags.ldspecs=--specs=nano.specs
teensy30.build.flags.libs=-larm_cortexM4l_math -lm -lstdc++
teensy30.serial.restart_cmd=false

teensy30.menu.usb.serial=Serial
teensy30.menu.usb.serial.build.usbtype=USB_SERIAL
teensy30.menu.usb.keyboard=Keyboard
teensy30.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensy30.menu.usb.keyboard.fake_serial=teensy_gateway
teensy30.menu.usb.hid=Keyboard + Mouse + Joystick
teensy30.menu.usb.hid.build.usbtype=USB_HID
teensy30.menu.usb.hid.fake_serial=teensy_gateway
teensy30.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensy30.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensy30.menu.usb.touch=Keyboard + Touch Screen
teensy30.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensy30.menu.usb.touch.fake_serial=teensy_gateway
teensy30.menu.usb.midi=MIDI
teensy30.menu.usb.midi.build.usbtype=USB_MIDI
teensy30.menu.usb.midi.fake_serial=teensy_gateway
teensy30.menu.usb.midi4=MIDIx4
teensy30.menu.usb.midi4.build.usbtype=USB_MIDI4
teensy30.menu.usb.midi4.fake_serial=teensy_gateway
teensy30.menu.usb.serialmidi=Serial + MIDI
teensy30.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensy30.menu.usb.serialmidi4=Serial + MIDIx4
teensy30.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensy30.menu.usb.audio=Audio
teensy30.menu.usb.audio.build.usbtype=USB_AUDIO
teensy30.menu.usb.audio.fake_serial=teensy_gateway
teensy30.menu.usb.serialmidiaudio=Serial + MIDI + Audio
teensy30.menu.usb.serialmidiaudio.build.usbtype=USB_MIDI_AUDIO_SERIAL
teensy30.menu.usb.mtp=MTP Disk (Experimental)
teensy30.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensy30.menu.usb.mtp.fake_serial=teensy_gateway
teensy30.menu.usb.rawhid=Raw HID
teensy30.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy30.menu.usb.rawhid.fake_serial=teensy_gateway
teensy30.menu.usb.flightsim=Flight Sim Controls
teensy30.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensy30.menu.usb.flightsim.fake_serial=teensy_gateway
teensy30.menu.usb.disable=No USB
teensy30.menu.usb.disable.build.usbtype=USB_DISABLED

teensy30.menu.speed.96=96 MHz (overclock)
teensy30.menu.speed.48=48 MHz
teensy30.menu.speed.24=24 MHz
teensy30.menu.speed.96.build.fcpu=96000000
teensy30.menu.speed.48.build.fcpu=48000000
teensy30.menu.speed.24.build.fcpu=24000000

teensy30.menu.opt.o2std=Faster
teensy30.menu.opt.o2std.build.flags.optimize=-O2
teensy30.menu.opt.o2std.build.flags.ldspecs=
teensy30.menu.opt.o2lto=Faster with LTO
teensy30.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
teensy30.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensy30.menu.opt.o1std=Fast
teensy30.menu.opt.o1std.build.flags.optimize=-O1
teensy30.menu.opt.o1std.build.flags.ldspecs=
teensy30.menu.opt.o1lto=Fast with LTO
teensy30.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
teensy30.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin
teensy30.menu.opt.o3std=Fastest
teensy30.menu.opt.o3std.build.flags.optimize=-O3
teensy30.menu.opt.o3std.build.flags.ldspecs=
teensy30.menu.opt.o3lto=Fastest with LTO
teensy30.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
teensy30.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
teensy30.menu.opt.ogstd=Debug
teensy30.menu.opt.ogstd.build.flags.optimize=-Og
teensy30.menu.opt.ogstd.build.flags.ldspecs=
teensy30.menu.opt.oglto=Debug with LTO
teensy30.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
teensy30.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensy30.menu.opt.osstd=Smallest Code
teensy30.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensy30.menu.opt.osstd.build.flags.ldspecs=
teensy30.menu.opt.oslto=Smallest Code with LTO
teensy30.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
teensy30.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin

teensy30.menu.keys.en-us=US English
teensy30.menu.keys.en-us.build.keylayout=US_ENGLISH
teensy30.menu.keys.fr-ca=Canadian French
teensy30.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensy30.menu.keys.xx-ca=Canadian Multilingual
teensy30.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensy30.menu.keys.cz-cz=Czech
teensy30.menu.keys.cz-cz.build.keylayout=CZECH
teensy30.menu.keys.da-da=Danish
teensy30.menu.keys.da-da.build.keylayout=DANISH
teensy30.menu.keys.fi-fi=Finnish
teensy30.menu.keys.fi-fi.build.keylayout=FINNISH
teensy30.menu.keys.fr-fr=French
teensy30.menu.keys.fr-fr.build.keylayout=FRENCH
teensy30.menu.keys.fr-be=French Belgian
teensy30.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensy30.menu.keys.fr-ch=French Swiss
teensy30.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensy30.menu.keys.de-de=German
teensy30.menu.keys.de-de.build.keylayout=GERMAN
teensy30.menu.keys.de-dm=German (Mac)
teensy30.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensy30.menu.keys.de-ch=German Swiss
teensy30.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensy30.menu.keys.is-is=Icelandic
teensy30.menu.keys.is-is.build.keylayout=ICELANDIC
teensy30.menu.keys.en-ie=Irish
teensy30.menu.keys.en-ie.build.keylayout=IRISH
teensy30.menu.keys.it-it=Italian
teensy30.menu.keys.it-it.build.keylayout=ITALIAN
teensy30.menu.keys.no-no=Norwegian
teensy30.menu.keys.no-no.build.keylayout=NORWEGIAN
teensy30.menu.keys.pt-pt=Portuguese
teensy30.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensy30.menu.keys.pt-br=Portuguese Brazilian
teensy30.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensy30.menu.keys.rs-rs=Serbian (Latin Only)
teensy30.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensy30.menu.keys.es-es=Spanish
teensy30.menu.keys.es-es.build.keylayout=SPANISH
teensy30.menu.keys.es-mx=Spanish Latin America
teensy30.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensy30.menu.keys.sv-se=Swedish
teensy30.menu.keys.sv-se.build.keylayout=SWEDISH
teensy30.menu.keys.tr-tr=Turkish (partial)
teensy30.menu.keys.tr-tr.build.keylayout=TURKISH
teensy30.menu.keys.en-gb=United Kingdom
teensy30.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensy30.menu.keys.usint=US International
teensy30.menu.keys.usint.build.keylayout=US_INTERNATIONAL


teensyLC.name=Teensy LC
teensyLC.upload.maximum_size=63488
teensyLC.upload.maximum_data_size=8192
teensyLC.upload.tool=teensyloader
teensyLC.upload.protocol=halfkay
teensyLC.build.board=TEENSYLC
teensyLC.build.core=teensy3
teensyLC.build.mcu=mkl26z64
teensyLC.build.warn_data_percentage=88
teensyLC.build.toolchain=arm/bin/
teensyLC.build.command.gcc=arm-none-eabi-gcc
teensyLC.build.command.g++=arm-none-eabi-g++
teensyLC.build.command.ar=arm-none-eabi-gcc-ar
teensyLC.build.command.objcopy=arm-none-eabi-objcopy
teensyLC.build.command.objdump=arm-none-eabi-objdump
teensyLC.build.command.linker=arm-none-eabi-gcc
teensyLC.build.command.size=arm-none-eabi-size
teensyLC.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access
teensyLC.build.flags.dep=-MMD
teensyLC.build.flags.cpu=-mthumb -mcpu=cortex-m0plus -fsingle-precision-constant
teensyLC.build.flags.defs=-D__MKL26Z64__ -DTEENSYDUINO=154
teensyLC.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
teensyLC.build.flags.c=
teensyLC.build.flags.S=-x assembler-with-cpp
teensyLC.build.flags.ld=-Wl,--gc-sections,--relax,--defsym=__rtc_localtime={extra.time.local} "-T{build.core.path}/mkl26z64.ld"
teensyLC.build.flags.libs=-larm_cortexM0l_math -lm -lstdc++
teensyLC.serial.restart_cmd=false
teensyLC.menu.usb.serial=Serial
teensyLC.menu.usb.serial.build.usbtype=USB_SERIAL
teensyLC.menu.usb.serial2=Dual Serial
teensyLC.menu.usb.serial2.build.usbtype=USB_DUAL_SERIAL
teensyLC.menu.usb.serial3=Triple Serial
teensyLC.menu.usb.serial3.build.usbtype=USB_TRIPLE_SERIAL
teensyLC.menu.usb.keyboard=Keyboard
teensyLC.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
teensyLC.menu.usb.keyboard.fake_serial=teensy_gateway
teensyLC.menu.usb.hid=Keyboard + Mouse + Joystick
teensyLC.menu.usb.hid.build.usbtype=USB_HID
teensyLC.menu.usb.hid.fake_serial=teensy_gateway
teensyLC.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensyLC.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensyLC.menu.usb.touch=Keyboard + Touch Screen
teensyLC.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
teensyLC.menu.usb.touch.fake_serial=teensy_gateway
teensyLC.menu.usb.midi=MIDI
teensyLC.menu.usb.midi.build.usbtype=USB_MIDI
teensyLC.menu.usb.midi.fake_serial=teensy_gateway
teensyLC.menu.usb.midi4=MIDIx4
teensyLC.menu.usb.midi4.build.usbtype=USB_MIDI4
teensyLC.menu.usb.midi4.fake_serial=teensy_gateway
teensyLC.menu.usb.serialmidi=Serial + MIDI
teensyLC.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
teensyLC.menu.usb.serialmidi4=Serial + MIDIx4
teensyLC.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
teensyLC.menu.usb.mtp=MTP Disk (Experimental)
teensyLC.menu.usb.mtp.build.usbtype=USB_MTPDISK
teensyLC.menu.usb.mtp.fake_serial=teensy_gateway
teensyLC.menu.usb.rawhid=Raw HID
teensyLC.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensyLC.menu.usb.rawhid.fake_serial=teensy_gateway
teensyLC.menu.usb.flightsim=Flight Sim Controls
teensyLC.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensyLC.menu.usb.flightsim.fake_serial=teensy_gateway
teensyLC.menu.usb.disable=No USB
teensyLC.menu.usb.disable.build.usbtype=USB_DISABLED

teensyLC.menu.speed.48=48 MHz
teensyLC.menu.speed.24=24 MHz
teensyLC.menu.speed.48.build.fcpu=48000000
teensyLC.menu.speed.24.build.fcpu=24000000

teensyLC.menu.opt.osstd=Smallest Code
teensyLC.menu.opt.osstd.build.flags.optimize=-Os --specs=nano.specs
teensyLC.menu.opt.osstd.build.flags.ldspecs=
teensyLC.menu.opt.oslto=Smallest Code with LTO
teensyLC.menu.opt.oslto.build.flags.optimize=-Os -flto -fno-fat-lto-objects --specs=nano.specs
teensyLC.menu.opt.oslto.build.flags.ldspecs=-fuse-linker-plugin
teensyLC.menu.opt.ogstd=Debug
teensyLC.menu.opt.ogstd.build.flags.optimize=-Og
teensyLC.menu.opt.ogstd.build.flags.ldspecs=
teensyLC.menu.opt.oglto=Debug with LTO
teensyLC.menu.opt.oglto.build.flags.optimize=-Og -flto -fno-fat-lto-objects
teensyLC.menu.opt.oglto.build.flags.ldspecs=-fuse-linker-plugin
teensyLC.menu.opt.o3std=Fastest
teensyLC.menu.opt.o3std.build.flags.optimize=-O3
teensyLC.menu.opt.o3std.build.flags.ldspecs=
teensyLC.menu.opt.o3lto=Fastest with LTO
teensyLC.menu.opt.o3lto.build.flags.optimize=-O3 -flto -fno-fat-lto-objects
teensyLC.menu.opt.o3lto.build.flags.ldspecs=-fuse-linker-plugin
teensyLC.menu.opt.o2std=Faster
teensyLC.menu.opt.o2std.build.flags.optimize=-O2
teensyLC.menu.opt.o2std.build.flags.ldspecs=
teensyLC.menu.opt.o2lto=Faster with LTO
teensyLC.menu.opt.o2lto.build.flags.optimize=-O2 -flto -fno-fat-lto-objects
teensyLC.menu.opt.o2lto.build.flags.ldspecs=-fuse-linker-plugin
teensyLC.menu.opt.o1std=Fast
teensyLC.menu.opt.o1std.build.flags.optimize=-O1
teensyLC.menu.opt.o1std.build.flags.ldspecs=
teensyLC.menu.opt.o1lto=Fast with LTO
teensyLC.menu.opt.o1lto.build.flags.optimize=-O1 -flto -fno-fat-lto-objects
teensyLC.menu.opt.o1lto.build.flags.ldspecs=-fuse-linker-plugin

teensyLC.menu.keys.en-us=US English
teensyLC.menu.keys.en-us.build.keylayout=US_ENGLISH
teensyLC.menu.keys.fr-ca=Canadian French
teensyLC.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensyLC.menu.keys.xx-ca=Canadian Multilingual
teensyLC.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensyLC.menu.keys.cz-cz=Czech
teensyLC.menu.keys.cz-cz.build.keylayout=CZECH
teensyLC.menu.keys.da-da=Danish
teensyLC.menu.keys.da-da.build.keylayout=DANISH
teensyLC.menu.keys.fi-fi=Finnish
teensyLC.menu.keys.fi-fi.build.keylayout=FINNISH
teensyLC.menu.keys.fr-fr=French
teensyLC.menu.keys.fr-fr.build.keylayout=FRENCH
teensyLC.menu.keys.fr-be=French Belgian
teensyLC.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensyLC.menu.keys.fr-ch=French Swiss
teensyLC.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensyLC.menu.keys.de-de=German
teensyLC.menu.keys.de-de.build.keylayout=GERMAN
teensyLC.menu.keys.de-dm=German (Mac)
teensyLC.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensyLC.menu.keys.de-ch=German Swiss
teensyLC.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensyLC.menu.keys.is-is=Icelandic
teensyLC.menu.keys.is-is.build.keylayout=ICELANDIC
teensyLC.menu.keys.en-ie=Irish
teensyLC.menu.keys.en-ie.build.keylayout=IRISH
teensyLC.menu.keys.it-it=Italian
teensyLC.menu.keys.it-it.build.keylayout=ITALIAN
teensyLC.menu.keys.no-no=Norwegian
teensyLC.menu.keys.no-no.build.keylayout=NORWEGIAN
teensyLC.menu.keys.pt-pt=Portuguese
teensyLC.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensyLC.menu.keys.pt-br=Portuguese Brazilian
teensyLC.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensyLC.menu.keys.rs-rs=Serbian (Latin Only)
teensyLC.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensyLC.menu.keys.es-es=Spanish
teensyLC.menu.keys.es-es.build.keylayout=SPANISH
teensyLC.menu.keys.es-mx=Spanish Latin America
teensyLC.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensyLC.menu.keys.sv-se=Swedish
teensyLC.menu.keys.sv-se.build.keylayout=SWEDISH
teensyLC.menu.keys.tr-tr=Turkish (partial)
teensyLC.menu.keys.tr-tr.build.keylayout=TURKISH
teensyLC.menu.keys.en-gb=United Kingdom
teensyLC.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensyLC.menu.keys.usint=US International
teensyLC.menu.keys.usint.build.keylayout=US_INTERNATIONAL


teensypp2.name=Teensy++ 2.0
teensypp2.upload.maximum_size=130048
teensypp2.upload.maximum_data_size=8192
teensypp2.upload.tool=teensyloader
teensypp2.upload.protocol=halfkay
teensypp2.build.board=TEENSY2PP
teensypp2.build.core=teensy
teensypp2.build.mcu=at90usb1286
teensypp2.build.warn_data_percentage=94
teensypp2.build.toolchain=avr/bin/
teensypp2.build.command.gcc=avr-gcc
teensypp2.build.command.g++=avr-g++
teensypp2.build.command.ar=avr-ar
teensypp2.build.command.objcopy=avr-objcopy
teensypp2.build.command.objdump=avr-objdump
teensypp2.build.command.linker=avr-gcc
teensypp2.build.command.size=avr-size
teensypp2.build.flags.common=-g -Wall -ffunction-sections -fdata-sections
teensypp2.build.flags.dep=-MMD
teensypp2.build.flags.optimize=-Os
teensypp2.build.flags.cpu=-mmcu=at90usb1286
teensypp2.build.flags.defs=-DTEENSYDUINO=154 -DARDUINO_ARCH_AVR
teensypp2.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++11
teensypp2.build.flags.c=
teensypp2.build.flags.S=-x assembler-with-cpp
teensypp2.build.flags.ld=-Wl,--gc-sections,--relax
teensypp2.build.flags.ldspecs=
teensypp2.build.flags.libs=-lm
teensypp2.build.serial_number=true
teensypp2.serial.restart_cmd=true

teensypp2.menu.usb.serial=Serial
teensypp2.menu.usb.serial.build.usbtype=USB_SERIAL
teensypp2.menu.usb.hid=Keyboard + Mouse + Joystick
teensypp2.menu.usb.hid.build.usbtype=USB_HID
teensypp2.menu.usb.hid.fake_serial=teensy_gateway
teensypp2.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensypp2.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensypp2.menu.usb.int_disk=Disk(Internal) + Keyboard
teensypp2.menu.usb.int_disk.build.usbtype=USB_DISK
teensypp2.menu.usb.int_disk.fake_serial=teensy_gateway
teensypp2.menu.usb.int_disk.build.elfpatch=mktinyfat
teensypp2.menu.usb.sd_disk=Disk(SD Card) + Keyboard
teensypp2.menu.usb.sd_disk.build.usbtype=USB_DISK_SDFLASH
teensypp2.menu.usb.sd_disk.fake_serial=teensy_gateway
teensypp2.menu.usb.midi=MIDI
teensypp2.menu.usb.midi.build.usbtype=USB_MIDI
teensypp2.menu.usb.midi.fake_serial=teensy_gateway
teensypp2.menu.usb.rawhid=Raw HID
teensypp2.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensypp2.menu.usb.rawhid.fake_serial=teensy_gateway
teensypp2.menu.usb.flightsim=Flight Sim Controls
teensypp2.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensypp2.menu.usb.flightsim.fake_serial=teensy_gateway
teensypp2.menu.speed.16=16 MHz
teensypp2.menu.speed.8=8 MHz
teensypp2.menu.speed.4=4 MHz
teensypp2.menu.speed.2=2 MHz
teensypp2.menu.speed.1=1 MHz
teensypp2.menu.speed.16.build.fcpu=16000000L
teensypp2.menu.speed.8.build.fcpu=8000000L
teensypp2.menu.speed.4.build.fcpu=4000000L
teensypp2.menu.speed.2.build.fcpu=2000000L
teensypp2.menu.speed.1.build.fcpu=1000000L

teensypp2.menu.keys.en-us=US English
teensypp2.menu.keys.en-us.build.keylayout=US_ENGLISH
teensypp2.menu.keys.fr-ca=Canadian French
teensypp2.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensypp2.menu.keys.xx-ca=Canadian Multilingual
teensypp2.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensypp2.menu.keys.cz-cz=Czech
teensypp2.menu.keys.cz-cz.build.keylayout=CZECH
teensypp2.menu.keys.da-da=Danish
teensypp2.menu.keys.da-da.build.keylayout=DANISH
teensypp2.menu.keys.fi-fi=Finnish
teensypp2.menu.keys.fi-fi.build.keylayout=FINNISH
teensypp2.menu.keys.fr-fr=French
teensypp2.menu.keys.fr-fr.build.keylayout=FRENCH
teensypp2.menu.keys.fr-be=French Belgian
teensypp2.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensypp2.menu.keys.fr-ch=French Swiss
teensypp2.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensypp2.menu.keys.de-de=German
teensypp2.menu.keys.de-de.build.keylayout=GERMAN
teensypp2.menu.keys.de-dm=German (Mac)
teensypp2.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensypp2.menu.keys.de-ch=German Swiss
teensypp2.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensypp2.menu.keys.is-is=Icelandic
teensypp2.menu.keys.is-is.build.keylayout=ICELANDIC
teensypp2.menu.keys.en-ie=Irish
teensypp2.menu.keys.en-ie.build.keylayout=IRISH
teensypp2.menu.keys.it-it=Italian
teensypp2.menu.keys.it-it.build.keylayout=ITALIAN
teensypp2.menu.keys.no-no=Norwegian
teensypp2.menu.keys.no-no.build.keylayout=NORWEGIAN
teensypp2.menu.keys.pt-pt=Portuguese
teensypp2.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensypp2.menu.keys.pt-br=Portuguese Brazilian
teensypp2.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensypp2.menu.keys.rs-rs=Serbian (Latin Only)
teensypp2.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensypp2.menu.keys.es-es=Spanish
teensypp2.menu.keys.es-es.build.keylayout=SPANISH
teensypp2.menu.keys.es-mx=Spanish Latin America
teensypp2.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensypp2.menu.keys.sv-se=Swedish
teensypp2.menu.keys.sv-se.build.keylayout=SWEDISH
teensypp2.menu.keys.tr-tr=Turkish (partial)
teensypp2.menu.keys.tr-tr.build.keylayout=TURKISH
teensypp2.menu.keys.en-gb=United Kingdom
teensypp2.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensypp2.menu.keys.usint=US International
teensypp2.menu.keys.usint.build.keylayout=US_INTERNATIONAL


teensy2.name=Teensy 2.0
teensy2.upload.maximum_size=32256
teensy2.upload.maximum_data_size=2560
teensy2.upload.tool=teensyloader
teensy2.upload.protocol=halfkay
teensy2.build.board=TEENSY2
teensy2.build.core=teensy
teensy2.build.mcu=atmega32u4
teensy2.build.warn_data_percentage=80
teensy2.build.toolchain=avr/bin/
teensy2.build.command.gcc=avr-gcc
teensy2.build.command.g++=avr-g++
teensy2.build.command.ar=avr-ar
teensy2.build.command.objcopy=avr-objcopy
teensy2.build.command.objdump=avr-objdump
teensy2.build.command.linker=avr-gcc
teensy2.build.command.size=avr-size
teensy2.build.flags.common=-g -Wall -ffunction-sections -fdata-sections
teensy2.build.flags.dep=-MMD
teensy2.build.flags.optimize=-Os
teensy2.build.flags.cpu=-mmcu=atmega32u4
teensy2.build.flags.defs=-DTEENSYDUINO=154 -DARDUINO_ARCH_AVR
teensy2.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++11
teensy2.build.flags.c=
teensy2.build.flags.S=-x assembler-with-cpp
teensy2.build.flags.ld=-Wl,--gc-sections,--relax
teensy2.build.flags.ldspecs=
teensy2.build.flags.libs=-lm
teensy2.build.serial_number=true
teensy2.serial.restart_cmd=true

teensy2.menu.usb.serial=Serial
teensy2.menu.usb.serial.build.usbtype=USB_SERIAL
teensy2.menu.usb.hid=Keyboard + Mouse + Joystick
teensy2.menu.usb.hid.build.usbtype=USB_HID
teensy2.menu.usb.hid.fake_serial=teensy_gateway
teensy2.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
teensy2.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
teensy2.menu.usb.int_disk=Disk(Internal) + Keyboard
teensy2.menu.usb.int_disk.build.usbtype=USB_DISK
teensy2.menu.usb.int_disk.fake_serial=teensy_gateway
teensy2.menu.usb.int_disk.build.elfpatch=mktinyfat
teensy2.menu.usb.sd_disk=Disk(SD Card) + Keyboard
teensy2.menu.usb.sd_disk.build.usbtype=USB_DISK_SDFLASH
teensy2.menu.usb.sd_disk.fake_serial=teensy_gateway
teensy2.menu.usb.midi=MIDI
teensy2.menu.usb.midi.build.usbtype=USB_MIDI
teensy2.menu.usb.midi.fake_serial=teensy_gateway
teensy2.menu.usb.rawhid=Raw HID
teensy2.menu.usb.rawhid.build.usbtype=USB_RAWHID
teensy2.menu.usb.rawhid.fake_serial=teensy_gateway
teensy2.menu.usb.flightsim=Flight Sim Controls
teensy2.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
teensy2.menu.usb.flightsim.fake_serial=teensy_gateway
teensy2.menu.speed.16=16 MHz
teensy2.menu.speed.8=8 MHz
teensy2.menu.speed.4=4 MHz
teensy2.menu.speed.2=2 MHz
teensy2.menu.speed.1=1 MHz
teensy2.menu.speed.16.build.fcpu=16000000L
teensy2.menu.speed.8.build.fcpu=8000000L
teensy2.menu.speed.4.build.fcpu=4000000L
teensy2.menu.speed.2.build.fcpu=2000000L
teensy2.menu.speed.1.build.fcpu=1000000L

teensy2.menu.keys.en-us=US English
teensy2.menu.keys.en-us.build.keylayout=US_ENGLISH
teensy2.menu.keys.fr-ca=Canadian French
teensy2.menu.keys.fr-ca.build.keylayout=CANADIAN_FRENCH
teensy2.menu.keys.xx-ca=Canadian Multilingual
teensy2.menu.keys.xx-ca.build.keylayout=CANADIAN_MULTILINGUAL
teensy2.menu.keys.cz-cz=Czech
teensy2.menu.keys.cz-cz.build.keylayout=CZECH
teensy2.menu.keys.da-da=Danish
teensy2.menu.keys.da-da.build.keylayout=DANISH
teensy2.menu.keys.fi-fi=Finnish
teensy2.menu.keys.fi-fi.build.keylayout=FINNISH
teensy2.menu.keys.fr-fr=French
teensy2.menu.keys.fr-fr.build.keylayout=FRENCH
teensy2.menu.keys.fr-be=French Belgian
teensy2.menu.keys.fr-be.build.keylayout=FRENCH_BELGIAN
teensy2.menu.keys.fr-ch=French Swiss
teensy2.menu.keys.fr-ch.build.keylayout=FRENCH_SWISS
teensy2.menu.keys.de-de=German
teensy2.menu.keys.de-de.build.keylayout=GERMAN
teensy2.menu.keys.de-dm=German (Mac)
teensy2.menu.keys.de-dm.build.keylayout=GERMAN_MAC
teensy2.menu.keys.de-ch=German Swiss
teensy2.menu.keys.de-ch.build.keylayout=GERMAN_SWISS
teensy2.menu.keys.is-is=Icelandic
teensy2.menu.keys.is-is.build.keylayout=ICELANDIC
teensy2.menu.keys.en-ie=Irish
teensy2.menu.keys.en-ie.build.keylayout=IRISH
teensy2.menu.keys.it-it=Italian
teensy2.menu.keys.it-it.build.keylayout=ITALIAN
teensy2.menu.keys.no-no=Norwegian
teensy2.menu.keys.no-no.build.keylayout=NORWEGIAN
teensy2.menu.keys.pt-pt=Portuguese
teensy2.menu.keys.pt-pt.build.keylayout=PORTUGUESE
teensy2.menu.keys.pt-br=Portuguese Brazilian
teensy2.menu.keys.pt-br.build.keylayout=PORTUGUESE_BRAZILIAN
teensy2.menu.keys.rs-rs=Serbian (Latin Only)
teensy2.menu.keys.rs-rs.build.keylayout=SERBIAN_LATIN_ONLY
teensy2.menu.keys.es-es=Spanish
teensy2.menu.keys.es-es.build.keylayout=SPANISH
teensy2.menu.keys.es-mx=Spanish Latin America
teensy2.menu.keys.es-mx.build.keylayout=SPANISH_LATIN_AMERICA
teensy2.menu.keys.sv-se=Swedish
teensy2.menu.keys.sv-se.build.keylayout=SWEDISH
teensy2.menu.keys.tr-tr=Turkish (partial)
teensy2.menu.keys.tr-tr.build.keylayout=TURKISH
teensy2.menu.keys.en-gb=United Kingdom
teensy2.menu.keys.en-gb.build.keylayout=UNITED_KINGDOM
teensy2.menu.keys.usint=US International
teensy2.menu.keys.usint.build.keylayout=US_INTERNATIONAL
 
Back
Top