diff options
author | Tectu <joel@unormal.org> | 2012-08-13 20:59:29 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-08-13 20:59:29 +0200 |
commit | 1a6eed0c07806b5d5129024eb3645907e25a4139 (patch) | |
tree | be483881cffda9ffaad974894dd7060f2bd96274 /demos | |
parent | 72d1bef6c3e020106cffad04799f7fd7737a2ebf (diff) | |
download | uGFX-1a6eed0c07806b5d5129024eb3645907e25a4139.tar.gz uGFX-1a6eed0c07806b5d5129024eb3645907e25a4139.tar.bz2 uGFX-1a6eed0c07806b5d5129024eb3645907e25a4139.zip |
added touchpad demo
Diffstat (limited to 'demos')
-rw-r--r-- | demos/touchpad/main.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/demos/touchpad/main.c b/demos/touchpad/main.c new file mode 100644 index 00000000..8a1d3275 --- /dev/null +++ b/demos/touchpad/main.c @@ -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(); + + gdispClear(Lime); + + while (TRUE) { + gdispDrawFillCircle(tpReadX(), tpReadY(), 3, Black); + } +} + |