Просмотр исходного кода

Add multi-touch definitions (experimental)

teensy4-core
PaulStoffregen 8 лет назад
Родитель
Сommit
66e3239ef5
2 измененных файлов: 39 добавлений и 3 удалений
  1. +2
    -2
      teensy3/usb_desc.c
  2. +37
    -1
      teensy3/usb_desc.h

+ 2
- 2
teensy3/usb_desc.c Просмотреть файл

@@ -272,7 +272,7 @@ static uint8_t joystick_report_desc[] = {
// 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)
0x05, 0x0D, // Usage Page (Digitizer)
0x09, 0x04, // Usage (Touch Screen)
0xa1, 0x01, // Collection (Application)
0x09, 0x22, // Usage (Finger)
@@ -313,7 +313,7 @@ static uint8_t multitouch_report_desc[] = {
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (variable,absolute)
0x05, 0x0d, // Usage Page (Digitizers)
0x05, 0x0D, // Usage Page (Digitizers)
0x09, 0x55, // Usage (Contact Count Maximum)
0x25, 0x0A, // Logical Maximum (10)
0x75, 0x08, // Report Size (8)

+ 37
- 1
teensy3/usb_desc.h Просмотреть файл

@@ -226,6 +226,42 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
#define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT7_CONFIG ENDPOINT_TRANSIMIT_ONLY

#elif defined(USB_TOUCHSCREEN)
#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 {'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_USB_BUFFERS 15
#define NUM_INTERFACE 4
#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 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 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

#elif defined(USB_MIDI)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485
@@ -349,7 +385,7 @@ let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports

#elif defined(USB_AUDIO)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0485 // TODO: assign unique
#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',' ','A','u','d','i','o'}

Загрузка…
Отмена
Сохранить