How to get touch events in my app from the unified touch driver?

We have just completed porting the Multi-Touch HW adapter application for the FT5x06 using the Toradex CE libraries and it appears to be working fine. Thanks to Toradex support for their help finding my bug :wink: The HW adapter has been put in the AutoRun folder on the Colibri iMX6 board, the unified driver is installed, and touch events are posted on the debug console as expected. So far so good.

Now the only mystery remaining is how to access the unified touch driver from our application to retrieve the touch events posted by the HW adapter. The HW adapter uses DeviceIoControl to post events, and I have searched all over the place for information on how our application can get those events, but I’m unable to figure this out.

I am presuming that my app has to do some DeviceIoControl to get these events. So far I have successfully created the file like this:

Now I need to know how to do the opposite of IOCTL_SET_TOUCH_EVENT that the HW adapter does.

I expect this is quite simple once you know what to do. Are there any examples of this? C or C++ examples would be fine. I can port them over to C#, which we are using to develop our application.

Events should be routed as regular touch events in the OS, as long as the unified touch driver is correctly installed.
Can you enable serial console and see if you see the output described here:
I don’t have the HW available at the moment so I can’t test myself, sorry for this.

Your statement “Events should be routed as regular touch events in the OS” is all the information I needed. There seems to be lots of information on the Internet on how to do this so I don’t think I’ll have any problems.

The touch driver shows the proper debug output as indicated in so I’m confident everything will work out fine.

Thanks again for your help.