Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > USB touch screen descriptor for inbuilt driver

Reply
Thread Tools Display Modes

USB touch screen descriptor for inbuilt driver

 
 
Junior Member
Join Date: May 2011
Location: Maidenhead UK
Posts: 3

 
      05-25-2011
Hi all,

My first post and the first time I have had to code a microcontroller to be a USB device. This device also has a keyboard, that works fine.

My problem is that I can make the touchscreen move the cursor but can't press any buttons especially the tap points in the calibration screen. Please has anyone a generic touch screen descriptor or can tell me what I have done wrong?

Below is my current descriptor, I have tried an absolute coordinate mouse one too but using this I don't have access to the inbuilt calibration dialogue in "Control panel / Table PC settings". The descriptors comments are a bit out of sync with the values, I have been experimenting a bit!

I want to use the inbuilt Microsoft drivers, they are more than good enough for me and I don't want to write my own.

Thanks in advance

Bevis

0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x09, 0x04, // touch screen 0x02, // USAGE (Pen)
0xa1, 0x01, // COLLECTION (Application)
0x85, 0x01, // REPORT_ID (Pen) //To match this descriptor, byte[0] of IN packet should be = 0x01 always for this demo
0x09, 0x20, // USAGE (Stylus)
0xa1, 0x00, // COLLECTION (Physical)
0x09, 0x42, // USAGE (Tip Switch) //(byte[1] bit 0)
0x09, 0x51 // contact 0x44, // USAGE (Barrel Switch) //(byte[1] bit 1)
0x09, 0x45, // USAGE (Eraser Switch) //(byte[1] bit 2)
0x09, 0x3c, // USAGE (Invert) //(byte[1] bit 3)
0x09, 0x32, // USAGE (In Range) //(byte[1] bit 4)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x05, // REPORT_COUNT (5)
0x81, 0x02, // INPUT (Data,Var,Abs) //Makes five, 1-bit IN packet fields (byte[1] bits 0-4)) for (USAGE) tip sw, barrel sw, invert sw, in range sw. Send '1' here when switch is active. Send '0' when switch not active.
0x95, 0x0b, // REPORT_COUNT (11)
0x81, 0x03, // INPUT (Cnst,Var,Abs) //Makes eleven, 1-bit IN packet fields (byte[1] bits 5-7, and byte[2] all bits) with no usage. These are pad bits that don't contain useful data.
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x26, 0xff, 0x7f, // LOGICAL_MAXIMUM (32767)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0xa4, // PUSH
0x55, 0x0d, // UNIT_EXPONENT (-3)
0x65, 0x33, // UNIT (Inch,EngLinear) //(10^-3 inches = 1/1000 of an inch = 1 mil)
0x09, 0x30, // USAGE (X) //(byte[3] and byte[4])
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0)
0x81, 0x02, // INPUT (Data,Var,Abs) //Makes one, 16-bit IN packet field used for (USAGE) X-coordinate input info. Valid values 0 to 32767.
0x09, 0x31, // USAGE (Y) //(byte[5] and byte[6])
0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0)
0x81, 0x02, // INPUT (Data,Var,Abs) //Makes one, 16-bit IN packet field used for (USAGE) Y-coordinate input info. Valid values 0 to 32767.
0xb4, // POP
0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x09, 0x30, // USAGE (Tip Pressure) //(byte[7] and byte[8])
0x81, 0x02, // INPUT (Data,Var,Abs) //Makes one, 16-bit IN packet field used for (USAGE) tip pressure input info. Valid values 0 to 32767
0x09, 0x3d, // USAGE (X Tilt) //(byte[9] and byte[10])
0x09, 0x3e, // USAGE (Y Tilt) //(byte[11] and byte[12])
0x16, 0x01, 0x80, // LOGICAL_MINIMUM (-32767)
0x95, 0x02, // REPORT_COUNT (2)
0x81, 0x02, // INPUT (Data,Var,Abs) //Makes two, 16-bit IN packet fields, used for (USAGE) X-Tilt and Y-Tilt. Valid values -32767 to 32767
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
 
Reply With Quote
 
 
 
 
Junior Member
Join Date: May 2011
Location: Maidenhead UK
Posts: 3

 
      05-25-2011
BTW I am developing this on a Vista Home Premium laptop using CCSs compiler for the microchip PIC24FJ256GB110 , it needs to work in 7 too.
 
Reply With Quote
 
Junior Member
Join Date: May 2011
Location: Maidenhead UK
Posts: 3

 
      05-26-2011
Half solved, I needed to set the inrange and tip switch bits, then release them.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COM port driver inf issue shivaprasad Windows Vista Drivers 4 11-14-2009 04:45 PM
blue screen when installing drivers vista,nivida driver 1508 or 15 viper Windows Vista Hardware 0 01-16-2008 09:44 PM
Going Golfing but not with Vista markbyrn Windows Vista Games 15 03-08-2007 10:59 AM
Re: No Matter What Installations Won't Boot On My Laptop Richard Urban Windows Vista Installation 1 01-06-2007 05:08 AM
ATI X1600 AGP 512MB - blue screen during setup (driver in infinite loop) Colin Nash [MVP] Windows Vista Installation 3 11-21-2006 07:22 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59