cleanup & doc

This commit is contained in:
Tectu 2012-06-08 00:07:43 +02:00
parent cb3292bf36
commit 9220a1ea3c
2 changed files with 40 additions and 3 deletions

View File

@ -116,7 +116,7 @@ uint16_t tpReadY(void) {
} }
} }
void tpDrawCross(uint16_t x, uint16_t y) { static void tpDrawCross(uint16_t x, uint16_t y) {
lcdDrawLine(x-15, y, x-2, y, 0xffff); lcdDrawLine(x-15, y, x-2, y, 0xffff);
lcdDrawLine(x+2, y, x+15, y, 0xffff); lcdDrawLine(x+2, y, x+15, y, 0xffff);
lcdDrawLine(x, y-15, x, y-2, 0xffff); lcdDrawLine(x, y-15, x, y-2, 0xffff);

View File

@ -15,12 +15,49 @@ volatile struct cal {
float yn; float yn;
}; };
/*
* Description: initializes touchpad (SPI)
*
* param: none
*
* return: none
*/
void tpInit(void); 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); uint8_t tpIRQ(void);
/*
* Description: reads-out X coordinate, calibrated
*
* param: none
*
* return: X coordinate, relative to screen zero-point
*/
uint16_t tpReadX(void); uint16_t tpReadX(void);
/*
* Description: reads-out Y coordinate, calibrated
*
* param: none
*
* return: Y coordinate, relative to screen zero-point
*/
uint16_t tpReadY(void); uint16_t tpReadY(void);
/*
* Description: calibration routine
*
* param: none
*
* return: none
*/
void tpCalibrate(void); void tpCalibrate(void);
void tpCalibrate2(void);
void tpDrawCross(uint16_t x, uint16_t y);
#endif #endif