diff options
Diffstat (limited to 'testprotokoll.c')
-rw-r--r-- | testprotokoll.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testprotokoll.c b/testprotokoll.c index 76d03bd..3924504 100644 --- a/testprotokoll.c +++ b/testprotokoll.c @@ -13,13 +13,13 @@ SynapticsReadPacket(int fd) int inSync = 0; unsigned char pBuf[7], u; - while(read(fd,&u, 1) == 1) + while(read(fd,&u, 1) == 1) { pBuf[count++] = u; /* check first byte */ - if((count == 1) && ((u & 0xC8) != 0x80)) + if((count == 1) && ((u & 0xC8) != 0x80)) { inSync = 0; count = 0; @@ -28,7 +28,7 @@ SynapticsReadPacket(int fd) } /* check 4th byte */ - if((count == 4) && ((u & 0xc8) != 0xc0)) + if((count == 4) && ((u & 0xc8) != 0xc0)) { inSync = 0; count = 0; @@ -36,7 +36,7 @@ SynapticsReadPacket(int fd) continue; } - if(count >= 6) + if(count >= 6) { /* Full packet received */ if(!inSync) { inSync = 1; @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) if(argc > 1) outputformat = atoi(argv[1]); - + fd=open("/dev/psaux", O_RDONLY); if(fd==-1) @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) printf("Error opening /dev/psaux\n"); exit(1); } - + SynapticsReadPacket(fd); close(fd); |