Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: LPC1768_Mini-DK_EasyWeb_DM9161 LPC1768_Mini-DK LPC1768_Mini-DK
Fork of Mini-DK by
Diff: TouchADS7843/Touch.cpp
- Revision:
- 21:a3a843d09295
- Parent:
- 20:5feb12e3801f
- Child:
- 22:9d05a7e6dc9d
diff -r 5feb12e3801f -r a3a843d09295 TouchADS7843/Touch.cpp --- a/TouchADS7843/Touch.cpp Tue Mar 18 19:23:57 2014 +0000 +++ b/TouchADS7843/Touch.cpp Sun Mar 23 19:50:47 2014 +0000 @@ -260,4 +260,29 @@ LCD->cls(); } +void TouchScreenADS7843::GetCalibration(Matrix * matrixPtr, Coordinate * screenPtr) +{ + uint8_t i; + Matrix * mp1; + mp1 = &matrix; + *matrixPtr = *mp1; + for(i=0;i<3;i++) + { + screenPtr[i].x = ScreenSample[i].x; + screenPtr[i].y = ScreenSample[i].y; + } +} +void TouchScreenADS7843::SetCalibration(Matrix * matrixPtr, Coordinate * screenPtr) +{ + uint8_t i; + Matrix * mp1; + mp1 = &matrix; + *mp1 = *matrixPtr; + for(i=0;i<3;i++) + { + ScreenSample[i].x = screenPtr[i].x; + ScreenSample[i].y = screenPtr[i].y; + } + setCalibrationMatrix( &DisplaySample[0],&ScreenSample[0],&matrix) ; +}