Absolute Mouse Coordinates in USBFS

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi folks,

   

I am currently working on a touch application which should use absolute coordinates.

   

How can I change the relative coordinates into absolute coordinates in USBFS?

   

I have read through the datasheet component but it either doesn't say or I've missed it.

   

Thanks

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Relative coordinates are referring to a point they are relative to. So, when you keep track of the reference point you can calculate the absolute distance.

   

Problem might be that a relative point can be expressed with fewer bytes than absolute coordinates. This would require a change in the USBFS definitions.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob, thanks for your reply.

   

My plan is to generate the positions in my own functions and send the absolute position over usb as suggested here:

   

http://www.winvistatips.com/threads/does-hid-driver-support-absolute-positioning-mouse.185015/

   

Can you tell me where I can change the descriptor? Can I modify it in the dialogue box or is it a "dirty hack" trick?

   

Thanks again

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I do not like/use "dirty hacks" at all. Your USBFS is an interface, so both sides have to agree about the data exchanged.

   

I'm not quite fit with USBFS, but afaik the settings have to be made in the HID descriptor and are concerned with tte report size.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi again,

   

I am trying to implement the following driver:

   

http://www.codeproject.com/Articles/1001891/A-USB-HID-Keyboard-Mouse-Touchscreen-emulator-with

   

Version - Single Touch

   

Does anybody know how to change the Hex 0x66 to 0x65 for UNIT - NONE using the USBFS Descriptors. Cypress UNIT Value is 0x66, instead of 0x65 as described in this tutorial. Is the tutorial wrong?

   

When plugging the device into the USB port of my computer, a USB HID Device is identified but I get an exclamation mark in the device manager. Is my initialization code wrong (meaning I am using the APIs incorrectly) or is it the driver?

   

Does anybody have an idea?

   

Fail Code of the Driver is Code 10: "This device cannot start. (Code 10)"

   

Regards Julian

0 Likes