Small changes
Dependencies: FATFileSystem
Fork of EALib by
Revision 20:74540582e639, committed 2014-12-19
- Comitter:
- embeddedartists
- Date:
- Fri Dec 19 15:22:22 2014 +0000
- Parent:
- 18:9f1f1a8b4729
- Commit message:
- Fixed bug in AR1021 driver causing problems when aborting calibration
Changed in this revision
AR1021.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;