added touchpad demo

ugfx_release_2.6
Tectu 2012-08-13 02:48:05 +02:00
parent 1c105a40cf
commit 2285ddfc63
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
#include "ch.h"
#include "hal.h"
#include "gdisp.h"
#include "touchpad.h"
TOUCHPADDriver TOUCHPADD1 = {
&SPID1,
};
int main(void) {
halInit();
chSysInit();
gdispInit();
gdispClear(Lime);
tpInit(&TOUCHPADD1);
tpCalibrate();
while (TRUE) {
gdispFillCircle(tpReadX(), tpReadY(), 3, Black);
chThdSleepMilliseconds(100);
}
}