A library with drivers for different peripherals on the LPC4088 QuickStart Board or related add-on boards.
Fork of EALib by
Diff: AR1021.cpp
- Revision:
- 19:74540582e639
- Parent:
- 12:15597e45eea0
diff -r 9f1f1a8b4729 -r 74540582e639 AR1021.cpp --- a/AR1021.cpp Mon Oct 27 10:18:08 2014 +0000 +++ b/AR1021.cpp Fri Dec 19 15:22:22 2014 +0000 @@ -121,10 +121,16 @@ do { // disable touch result = cmd(AR1021_CMD_DISABLE_TOUCH, NULL, 0, NULL, 0); + if (result == -AR1021_RESP_STAT_CANCEL_CALIB) { + debug("calibration was cancelled, short delay and try again"); + wait_us(50); + result = cmd(AR1021_CMD_DISABLE_TOUCH, NULL, 0, NULL, 0); + } if (result != 0) { debug("disable touch failed (%d)\n", result); break; } + wait_us(50); char regOffset = 0; int regOffLen = 1;