QWSLinuxTPMouseHandlerPrivate::QWSLinuxTPMouseHandlerPrivate( QWSLinuxTPMouseHandler *h )
: mouseFD(-1), samples(QT_QWS_TP_SAMPLE_SIZE), currSample(0), lastSample(0),
numSamples(0), skipCount(0), handler(h)
{
printf("\n inside ltp handler private \n");
#if defined(QT_QWS_IPAQ)
# ifdef QT_QWS_IPAQ_RAW
if ((mouseFD = open( "/dev/h3600_tsraw", O_RDONLY | O_NDELAY)) < 0) {
# else
if ((mouseFD = open( "/dev/h3600_ts", O_RDONLY | O_NDELAY)) < 0) {
# endif
qWarning( "Cannot open /dev/h3600_ts (%s)", strerror(errno));
return;
}
#elif defined(QT_QWS_EBX)
//# ifdef QT_QWS_EBX_TSRAW
# if 0
if ((mouseFD = open( "/dev/tsraw", O_RDONLY | O_NDELAY)) < 0) {
qWarning( "Cannot open /dev/tsraw (%s)", strerror(errno));
return;
}
# else
if ((mouseFD = open( "/dev/ts", O_RDONLY | O_NDELAY)) < 0) {
qWarning( "Cannot open /dev/ts (%s)", strerror(errno));
return;
}
# endif
#endif
mouseFD = open( "/dev/ttyS1", O_RDONLY | O_NDELAY);
printf("\n MOUSEFD :%d",mouseFD);
if(mouseFD==0)
printf("\n device openned \n");
else printf("\n cannot open touch screen \n");
printf("\n after socket notifier \n");
connect(mouseNotifier, SIGNAL(activated(int)),this, SLOT(readMouseData()));
waspressed=FALSE;
mouseIdx = 0;
printf("\n after mouseidx \n");
}
QWSLinuxTPMouseHandlerPrivate::QWSLinuxTPMouseHandlerPrivate( QWSLinuxTPMouseHandler *h )
: mouseFD(-1), samples(QT_QWS_TP_SAMPLE_SIZE), currSample(0), lastSample(0),
numSamples(0), skipCount(0), handler(h)
{
printf("\n inside ltp handler private \n");
#if defined(QT_QWS_IPAQ)
# ifdef QT_QWS_IPAQ_RAW
if ((mouseFD = open( "/dev/h3600_tsraw", O_RDONLY | O_NDELAY)) < 0) {
# else
if ((mouseFD = open( "/dev/h3600_ts", O_RDONLY | O_NDELAY)) < 0) {
# endif
qWarning( "Cannot open /dev/h3600_ts (%s)", strerror(errno));
return;
}
#elif defined(QT_QWS_EBX)
//# ifdef QT_QWS_EBX_TSRAW
# if 0
if ((mouseFD = open( "/dev/tsraw", O_RDONLY | O_NDELAY)) < 0) {
qWarning( "Cannot open /dev/tsraw (%s)", strerror(errno));
return;
}
# else
if ((mouseFD = open( "/dev/ts", O_RDONLY | O_NDELAY)) < 0) {
qWarning( "Cannot open /dev/ts (%s)", strerror(errno));
return;
}
# endif
#endif
mouseFD = open( "/dev/ttyS1", O_RDONLY | O_NDELAY);
printf("\n MOUSEFD :%d",mouseFD);
if(mouseFD==0)
printf("\n device openned \n");
else printf("\n cannot open touch screen \n");
QSocketNotifier *mouseNotifier;
mouseNotifier = new QSocketNotifier( mouseFD, QSocketNotifier::Read, this );
printf("\n after socket notifier \n");
connect(mouseNotifier, SIGNAL(activated(int)),this, SLOT(readMouseData()));
waspressed=FALSE;
mouseIdx = 0;
printf("\n after mouseidx \n");
}
To copy to clipboard, switch view to plain text mode
Bookmarks