Download Pluto 5 Manual

Transcript
Page 120
3.9.18 TouchScreenCommsMode
void TouchScreenCommsMode(const DEVICE *dev, BYTE mode)
3.9.18.1 Description
Set the communication mode with the Touch Screen Controller:
COMMAND_MODE: Bi-directional, with ELO or MicroTouch command/response protocol, polled, in-line
code. (blocking – not interrupt driven)
TOUCH_DATA_MODE: Uni-directional streaming touch data from controller to Pluto 5. Interrupt driven,
with touch data packet buffer controlled by driver
3.9.18.2 Parameters
3.9.18.2.1 Parameter 1 – dev
Touch Screen Device. One of the following:
EloDevice
ELO Touch Screen Controllers
MicroTouchDevice
MicroTouch Touch Screen Controllers
3.9.18.2.2 Parameter 2 – mode
One of the following:
COMMAND_MODE
TOUCH_DATA_MODE
3.9.18.3 Return Value
None.
3.9.18.4 Example
See section 3.8.9 Example User Code Structure.
3.9.19 TouchScreenGetNextData
TOUCHDATA *TouchScreenGetNextData(TOUCHDATA *touch_packet)
3.9.19.1 Description
Get the next Touch Data Packet from the Touch Event Buffer.
3.9.19.2 Parameters
3.9.19.2.1 Parameter 1 - touch_packet
Touch Data Packets have the following structure:
typedef struct touchdata {
UWORD x;
UWORD y;
UWORD z;
UBYTE status;
} TOUCHDATA;
The x, y co-ordinate values are unscaled 10-bit values in the range 0-1023.
3.9.19.3 Return Value
Touch Data Packet or NULL if buffer empty.
3.9.19.4 Example
If (TouchScreenGetNextData (&packet) != NULL )
{
x
= TouchScreenGetX(&packet);
y
= TouchScreenGetY(&packet);
status = TouchScreenGetTouchStatus(&packet);
}
Document No. 80-16040 Issue 6r1
HEBER LTD