Post Go back to editing

Drag and Drop Using the BF548 TouchScreen Driver Example

Hi Himanshu,

I just have another quick question about the touchscreen. I want implement drag and drop touchscreen controls, so that I can drag my blocks around. Right now, I am still using Sequencer DAV event in the AD7877 callback function to implement a version of this, but I was wondering if I could implement this idea using the PENIRQ and PENIRQ_RELEASE events.

My idea is to have the touchscreen detect when the screen is being touched, during which time it will continously store the touchscreen coordinate values into a dynamically allocated buffer. When it detects a screen release event, it will know to stop storing values, and will the parse through the buffer it just created to interpret the touchscreen path. I've tried implementing this, but it seems like the PENIRQ and PENIRQ_RELEASE events do not register.

Kind Regards,