Tactex Controls Inc. TCIMTCEXP100 Manuel D’Utilisation

Page de 18
MTC Express
3-2
MTCPointer
typedef struct MTCPOINTER 
{
BOOL
valid_pointer;
int           pointer_num;
float
pressure;
float
x_pos;
float
y_pos;
float x_vel;
float
y_vel;
} MTCPointer;
API Function Descriptions
Connecting and Disconnecting
MTCHandle MTC_New(MTCCreate mtcCreate)
This function creates an instance of a Tactex MTC object.  In the
process, this function does the following:
a.
Allocates memory for the MTC object.
b.
Reads the mapping (configuration) file from disk.
c.
Reads the normalization file from disk.  If a normalization file 
with the name specified does not exist, then one is 
automatically created.
d.
Opens the serial communication driver.
e.
"pings" the MTC to verify a connection.
f.
Determines the MTC Express firmware version.
Parameters:
mtcCreate
- A structure specifying the input and output serial ports and
locations of the mapping and normalization files.
Return:
MTC_New()
returns a handle to a touch pad instance.  It returns 
NULL
if
the function failed to create a new instance of the MTC.
MTC_GetLastError()
can be called with a NULL argument to
determine the cause of failure.
BOOL MTC_Delete(MTCHandle hMTC)
This function stops the communication with the MTC identified by 
hMTC
and frees the system resources allocated for the particular MTC.
Parameters:
hMTC
- handle of the MTC.
Return:
MTC_Delete()
returns a 
TRUE
if successful. Otherwise a 
FALSE
is
returned.