Minigui移植uClinux 联系客服

发布时间 : 星期三 文章Minigui移植uClinux更新完毕开始阅读8d147661172ded630a1cb65b

if( matrixPtr->Divider != 0 ) {

/* Operation order is important since we are doing integer */ /* math. Make sure you add all terms together before */ /* dividing, so that the remainder is not rounded off */ /* prematurely. */

displayPtr->x = ( (matrixPtr->An * screenPtr->x) + (matrixPtr->Bn * screenPtr->y) + matrixPtr->Cn

) / matrixPtr->Divider ;

displayPtr->y = ( (matrixPtr->Dn * screenPtr->x) + (matrixPtr->En * screenPtr->y) + matrixPtr->Fn

) / matrixPtr->Divider ; } else {

retvalue = -1 ; }

return( retvalue ) ;

} /* end of getDisplayPoint() */

Readpos.c 程序,帮助你读取触摸屏的值

#include

typedef struct {

unsigned short pressure; unsigned short x; unsigned short y; unsigned short pad; } TS_EVENT;

static TS_EVENT ts_event;

static int ts;

int main() {

ts = open (\ if (ts < 0) {

fprintf (stderr, \ return 0; }

while(1) {

if( read (ts, &ts_event, sizeof (TS_EVENT))) {

printf(\ } } }