|
|
|
|
|
|
|
|
#define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
#define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
#define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
#define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
|
|
|
|
|
|
#elif defined(USB_HID_TOUCHSCREEN) |
|
|
|
|
|
#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 {'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_USB_BUFFERS 20 |
|
|
|
|
|
#define NUM_INTERFACE 5 |
|
|
|
|
|
#define SEREMU_INTERFACE 2 // 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 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 ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY |
|
|
|
|
|
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
|
|
|
#elif defined(USB_MIDI) |
|
|
#elif defined(USB_MIDI) |
|
|
#define VENDOR_ID 0x16C0 |
|
|
#define VENDOR_ID 0x16C0 |
|
|
#define PRODUCT_ID 0x0485 |
|
|
#define PRODUCT_ID 0x0485 |
|
|
|
|
|
|
|
|
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY |
|
|
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY |
|
|
|
|
|
|
|
|
|
|
|
#elif defined(USB_FLIGHTSIM_JOYSTICK) |
|
|
|
|
|
#define VENDOR_ID 0x16C0 |
|
|
|
|
|
#define PRODUCT_ID 0x048D |
|
|
|
|
|
#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_USB_BUFFERS 20 |
|
|
|
|
|
#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 16 |
|
|
|
|
|
#define JOYSTICK_INTERVAL 1 |
|
|
|
|
|
#define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY |
|
|
|
|
|
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY |
|
|
|
|
|
#define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#elif defined(USB_MTPDISK) |
|
|
#elif defined(USB_MTPDISK) |
|
|
#define VENDOR_ID 0x16C0 |
|
|
#define VENDOR_ID 0x16C0 |
|
|
#define PRODUCT_ID 0x0489 |
|
|
#define PRODUCT_ID 0x0489 |
|
|
|
|
|
|
|
|
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS |
|
|
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS |
|
|
#define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_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_USB_BUFFERS 31 |
|
|
|
|
|
#define NUM_INTERFACE 12 |
|
|
|
|
|
#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_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 16 |
|
|
|
|
|
#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 9 // Keyboard Media Keys |
|
|
|
|
|
#define KEYMEDIA_ENDPOINT 12 |
|
|
|
|
|
#define KEYMEDIA_SIZE 8 |
|
|
|
|
|
#define KEYMEDIA_INTERVAL 4 |
|
|
|
|
|
#define AUDIO_INTERFACE 10 // 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 11 // Touchscreen |
|
|
|
|
|
#define MULTITOUCH_ENDPOINT 15 |
|
|
|
|
|
#define MULTITOUCH_SIZE 9 |
|
|
|
|
|
#define MULTITOUCH_FINGERS 10 |
|
|
|
|
|
#define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT2_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE |
|
|
|
|
|
#define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE |
|
|
|
|
|
#define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE |
|
|
|
|
|
#define ENDPOINT7_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE |
|
|
|
|
|
#define ENDPOINT8_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT9_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE |
|
|
|
|
|
#define ENDPOINT10_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT11_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE |
|
|
|
|
|
#define ENDPOINT12_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
#define ENDPOINT13_CONFIG (ENDPOINT_RECEIVE_ISOCHRONOUS|ENDPOINT_TRANSMIT_ISOCHRONOUS) |
|
|
|
|
|
#define ENDPOINT14_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS |
|
|
|
|
|
#define ENDPOINT15_CONFIG ENDPOINT_TRANSIMIT_ONLY |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifdef USB_DESC_LIST_DEFINE |
|
|
#ifdef USB_DESC_LIST_DEFINE |