You are here

Absolute Mouse Coordinates in USBFS | Cypress Semiconductor

Absolute Mouse Coordinates in USBFS

Summary: 4 Replies, Latest post by programming_µcs on 05 Sep 2016 07:17 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
programming_µcs's picture
User
10 posts

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

 

user_1377889's picture
User
9839 posts

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

programming_µcs's picture
User
10 posts

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-pos...

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

user_1377889's picture
User
9839 posts

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

programming_µcs's picture
User
10 posts

Hi again,

I am trying to implement the following driver:

http://www.codeproject.com/Articles/1001891/A-USB-HID-Keyboard-Mouse-Tou...

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

Log in to post new comments.