hi,

i have a doubt about the usage of touch screen driver in qt/embedded. i had connected a serial touch screen to the com port (/dev/ttyS1) of my board(blackfin processor -BF537 EZKIT). i had also compiled qt-embedded-3.3.5 with the option "-qt-mouse-linuxtp" and altered the file qmouselinuxtp_qws.cpp as follows:

Qt Code:
  1. QWSLinuxTPMouseHandlerPrivate::QWSLinuxTPMouseHandlerPrivate( QWSLinuxTPMouseHandler *h )
  2. : mouseFD(-1), samples(QT_QWS_TP_SAMPLE_SIZE), currSample(0), lastSample(0),
  3. numSamples(0), skipCount(0), handler(h)
  4. {
  5. printf("\n inside ltp handler private \n");
  6. #if defined(QT_QWS_IPAQ)
  7. # ifdef QT_QWS_IPAQ_RAW
  8. if ((mouseFD = open( "/dev/h3600_tsraw", O_RDONLY | O_NDELAY)) < 0) {
  9. # else
  10. if ((mouseFD = open( "/dev/h3600_ts", O_RDONLY | O_NDELAY)) < 0) {
  11. # endif
  12. qWarning( "Cannot open /dev/h3600_ts (%s)", strerror(errno));
  13. return;
  14. }
  15. #elif defined(QT_QWS_EBX)
  16. //# ifdef QT_QWS_EBX_TSRAW
  17. # if 0
  18. if ((mouseFD = open( "/dev/tsraw", O_RDONLY | O_NDELAY)) < 0) {
  19. qWarning( "Cannot open /dev/tsraw (%s)", strerror(errno));
  20. return;
  21. }
  22. # else
  23. if ((mouseFD = open( "/dev/ts", O_RDONLY | O_NDELAY)) < 0) {
  24. qWarning( "Cannot open /dev/ts (%s)", strerror(errno));
  25. return;
  26. }
  27. # endif
  28. #endif
  29.  
  30. mouseFD = open( "/dev/ttyS1", O_RDONLY | O_NDELAY);
  31. printf("\n MOUSEFD :%d",mouseFD);
  32.  
  33. if(mouseFD==0)
  34. printf("\n device openned \n");
  35. else printf("\n cannot open touch screen \n");
  36.  
  37. QSocketNotifier *mouseNotifier;
  38. mouseNotifier = new QSocketNotifier( mouseFD, QSocketNotifier::Read, this );
  39.  
  40. printf("\n after socket notifier \n");
  41. connect(mouseNotifier, SIGNAL(activated(int)),this, SLOT(readMouseData()));
  42. waspressed=FALSE;
  43. mouseIdx = 0;
  44. printf("\n after mouseidx \n");
  45.  
  46. }
To copy to clipboard, switch view to plain text mode 

so that when i export the mouse variable as:

export QWS_MOUSE_PROTO=linuxtp:/dev/ttyS1.

it will surely open the device. the flow of this file is that, it first opens the device, creates a socket notifier to the device and whenever any data comes it calls the readMouseData function. in that , the datas are read directly from the port as they come(if my understanding is correct).

my question is during this process is there any role for device driver ?i mean the driver present in the OS(uClinux)? will the open call in the above function, call the device driver open function present in the uClinux?

if this query is concerned with the OS(uClinux)? and not the with qt application ,then i apologize for posting in this forum.