Production Test Program (PTP) for the LPC4088 Experiment Base Board
Dependencies: EALib I2S LM75B SDFileSystem mbed
Diff: TestDisplay.cpp
- Revision:
- 7:48375cb50f3a
- Parent:
- 2:2f4b7535ceb3
--- a/TestDisplay.cpp Tue Sep 09 14:20:12 2014 +0000 +++ b/TestDisplay.cpp Thu Sep 25 07:17:44 2014 +0000 @@ -162,11 +162,18 @@ delays++; } - int vh,vl,r,ty; - if (_touch.info(&vh,&vl,&r,&ty)) { - printf("Touch info: v%d.%d, %d-bit resolution, type 0x%x\n", vh, vl, r, ty); - } else { - printf("Failed to read touch information\n"); + int vh,vl,r,ty,att; + for (att = 1; att <= 5;att++) { + if (_touch.info(&vh,&vl,&r,&ty)) { + printf("Touch info: v%d.%d, %d-bit resolution, type 0x%x\n", vh, vl, r, ty); + break; + } else { + printf("Attempt %d to get touch controller info failed...\n", att); + wait(1); + } + } + if (att > 5) { + printf("Failed to read touch controller info even after %d attempts\n", att); break; }