From 9220a1ea3cb149b05af5d099b4e36674a1292e1d Mon Sep 17 00:00:00 2001 From: Tectu Date: Fri, 8 Jun 2012 00:07:43 +0200 Subject: cleanup & doc --- touchpad.h | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'touchpad.h') diff --git a/touchpad.h b/touchpad.h index c9a686c6..24ded2e5 100644 --- a/touchpad.h +++ b/touchpad.h @@ -15,12 +15,49 @@ volatile struct cal { float yn; }; +/* + * Description: initializes touchpad (SPI) + * + * param: none + * + * return: none + */ void tpInit(void); + +/* + * Description: reads out PEN_IRQ from touchpad controller + * + * param: none + * + * return: 1 = touchpad pressed / 0 = touchpad not pressed + */ uint8_t tpIRQ(void); + +/* + * Description: reads-out X coordinate, calibrated + * + * param: none + * + * return: X coordinate, relative to screen zero-point + */ uint16_t tpReadX(void); + +/* + * Description: reads-out Y coordinate, calibrated + * + * param: none + * + * return: Y coordinate, relative to screen zero-point + */ uint16_t tpReadY(void); + +/* + * Description: calibration routine + * + * param: none + * + * return: none + */ void tpCalibrate(void); -void tpCalibrate2(void); -void tpDrawCross(uint16_t x, uint16_t y); #endif -- cgit v1.2.3