Aleksandar Kodzhabashev
/
TrackballQuery
An example of using polling PS/2 using the modified mbed PS/2 library
Diff: mylib/PS2/PS2MS.cpp
- Revision:
- 8:41b35bda9d48
- Parent:
- 2:e35627187804
- Child:
- 9:2c85d7f99a14
--- a/mylib/PS2/PS2MS.cpp Wed Mar 05 18:53:20 2014 +0000 +++ b/mylib/PS2/PS2MS.cpp Thu Mar 06 10:38:43 2014 +0000 @@ -33,7 +33,7 @@ while (work.cStart == work.cEnd) { wait_ms(1); if ((timeout > 0) && (tot.read_ms() > timeout)) { - // printf("Timeout occured.\n"); + //printf("T "); return EOF; } } @@ -68,7 +68,7 @@ * Start bit. */ if (dat.read() != 0) { - // printf("Illegal start bit condition.\n"); + //printf("Illegal start bit condition.\n"); } work.bitcnt++; break; @@ -85,7 +85,7 @@ oddpar++; } if ((oddpar % 2) != 1) { - // printf("Data parity error.\n"); + //printf("Data parity error.\n"); } work.bitcnt++; break; @@ -94,7 +94,7 @@ * Stop bit. */ if (dat.read() != 1) { - // printf("Illegal stop bit condition.\n"); + //printf("Illegal stop bit condition.\n"); } if (work.cStart != ((work.cEnd + 1) % RINGBUFSIZ)) { work.cEnd++; @@ -120,7 +120,7 @@ /* * Illegal internal state. */ - // printf("Illegal internal state found.\n"); + //printf("Illegal internal state found.\n"); init_work(); } break;