Ticket #3744: wacom_bamboo2.patch
File wacom_bamboo2.patch, 4.2 KB (added by , 15 years ago) |
---|
-
src/add-ons/kernel/drivers/input/wacom/wacom.c
115 115 116 116 // we need these four for a Wacom tablet 117 117 size_t controlTransferLength; 118 int i;118 int tryCount; 119 119 char repData[2] = { 0x02, 0x02 }; 120 120 char retData[2] = { 0x00, 0x00 }; 121 121 … … 227 227 // absolute mode, pressure data, etc.) 228 228 controlTransferLength = 2; 229 229 230 for ( i = 0; i < 5; i++) {230 for (tryCount = 0; tryCount < 5; tryCount++) { 231 231 // HID Class-Specific Request, Host to device (=0x21): 232 232 // SET_REPORT (=0x09) type Feature (=3) with ID 2 (=2) of 233 233 // Interface #0 (=0) to repData (== { 0x02, 0x02 }) … … 235 235 repData, &controlTransferLength); 236 236 237 237 if (st < B_OK) { 238 dprintf(ID "add_device() - control transfer 2 failed: %ld \239 \n", st);238 dprintf(ID "add_device() - control transfer 2 failed: %ld" 239 "\n", st); 240 240 } 241 241 242 242 // check if registers are set correctly … … 248 248 retData, &controlTransferLength); 249 249 250 250 if (st < B_OK) { 251 dprintf(ID "add_device() - control transfer 3 failed: %ld \252 \n", st);251 dprintf(ID "add_device() - control transfer 3 failed: %ld" 252 "\n", st); 253 253 } 254 254 255 dprintf(ID "retData: %u - %u\n", retData[0], retData[1]);256 dprintf("====================================\n");255 DPRINTF_INFO((ID "add_device() - retData: %u - %u\n", 256 retData[0], retData[1])); 257 257 258 if (retData[0] == repData[0] && retData[1] == repData[1]) break; 259 258 if (retData[0] == repData[0] && retData[1] == repData[1]) { 259 DPRINTF_INFO((ID "add_device() - successfully set " 260 "'Wacom'-mode\n")); 261 break; 262 } 260 263 } 261 264 262 dprintf(ID "count: %u\n", i); 265 DPRINTF_INFO((ID "add_device() - number of tries: %u\n", 266 tryCount + 1)); 263 267 264 if ( i> 4) {268 if (tryCount > 4) { 265 269 dprintf(ID "add_device() - set 'Wacom'-mode failed\n"); 266 270 } 267 271 } -
src/add-ons/input_server/devices/wacom/TabletDevice.h
75 75 DEVICE_VOLITO, 76 76 DEVICE_PENSTATION, 77 77 DEVICE_CINTIQ, 78 DEVICE_BAMBOO, 78 79 }; 79 80 80 81 enum { -
src/add-ons/input_server/devices/wacom/TabletDevice.cpp
134 134 case 0x16: // Graphire 4 6x8 (tested) 135 135 SetDevice(16704.0, 12064.0, DEVICE_GRAPHIRE); 136 136 break; 137 case 0x17: // BambooFun 4x5 (from Linux Wacom Project) 138 SetDevice(14760.0, 9225.0, DEVICE_BAMBOO); 139 break; 140 case 0x18: // BambooFun 6x8 (from Linux Wacom Project) 141 SetDevice(21648.0, 13530.0, DEVICE_BAMBOO); 142 break; 137 143 case 0x20: 138 144 SetDevice(12700.0, 10600.0, DEVICE_INTUOS); 139 145 break; … … 202 208 // SetDevice(3450.0, 2100.0, DEVICE_PENSTATION); 203 209 SetDevice(3248.0, 2320.0, DEVICE_PENSTATION); 204 210 break; 211 case 0x65: // Bamboo (from Linux Wacom Project) 212 SetDevice(14760.0, 9225.0, DEVICE_BAMBOO); 213 break; 214 case 0x69: // Bamboo1 (from Linux Wacom Project) 215 SetDevice(5104.0, 3712.0, DEVICE_BAMBOO); 216 break; 205 217 case 0xB0: 206 218 SetDevice(25400.0, 20320.0, DEVICE_INTUOS3); 207 219 break; … … 264 276 hasContact = true; 265 277 break; 266 278 } 267 case DEVICE_GRAPHIRE: { 279 case DEVICE_GRAPHIRE: 280 case DEVICE_BAMBOO: 281 { 268 282 xPos = data[3] << 8 | data[2]; 269 283 yPos = data[5] << 8 | data[4]; 270 284 … … 658 672 case 0x16: 659 673 *name = "Wacom Graphire4 6x8\" USB"; 660 674 break; 675 case 0x17: 676 *name = "Wacom BambooFun 4x5\" USB"; 677 break; 678 case 0x18: 679 *name = "Wacom BambooFun 6x8\" USB"; 680 break; 661 681 case 0x20: 662 682 *name = "Wacom Intuos 4x5\" USB"; 663 683 break; … … 727 747 case 0x64: 728 748 *name = "Wacom PenPartner.1 USB"; 729 749 break; 750 case 0x65: 751 *name = "Wacom Bamboo USB"; 752 break; 753 case 0x69: 754 *name = "Wacom Bamboo1 USB"; 755 break; 730 756 731 757 case 0xB0: 732 758 *name = "Wacom Intuos3 4x5 USB";