Hello,
You need to call periodically D4D_CheckTouchScreen();
In the eGUI examples, this is done using PIT timer interrupt. You can mantain some timing flags to be used in your application. This is the typical code:
/**************************************************************//*!
* Periodic IRQ callback or IRQ function
******************************************************************/
void pit_ch0_callback(void)
{
static Byte actual_time = 0;
TIME_FLAGS flags;
actual_time++;
flags.all = (LWord)(actual_time ^ (actual_time - 1));
time.all |= flags.all;
if(flags.bits.b50ms)
{
// Key_CheckKeys();
D4D_CheckTouchScreen();
}
D4D_TimeTickPut();
if(flags.bits.b100ms)
{
time100sm_cnt++;
}
}
The flags definition:
// typedef definitions
typedef union
{
LWord all;
struct
{
unsigned b25ms :1;
unsigned b50ms : 1;
unsigned b100ms : 1;
unsigned b200ms : 1;
unsigned b400ms : 1;
unsigned b800ms : 1;
unsigned b1600ms : 1;
unsigned b3200ms : 1;
}bits;
}TIME_FLAGS;
// global variables externs
extern TIME_FLAGS time;
extern LWord time100sm_cnt;
Best Regards,
Luis