/* * タッチペンの位置を表示 */ // arm7.c #include void VcountHandler(){ inputGetAndSend(); } int main() { irqInit(); fifoInit(); irqSet(IRQ_VCOUNT, VcountHandler); irqEnable(IRQ_VCOUNT); while(1){ swiWaitForVBlank(); } } // arm9.c #include #include int main(void) { touchPosition touch; consoleDemoInit(); while(1){ touchRead(&touch); iprintf("\x1b[2;2HTouch x = %04i, %04i\n", touch.rawx, touch.px); iprintf("\x1b[3;2HTouch y = %04i, %04i\n", touch.rawy, touch.py); swiWaitForVBlank(); } return 0; }