Mikroelektronika MIKROE-738 Datenbogen

Seite von 682
mikroC PRO for PIC32
MikroElektronika
581
TP_Press_Detect
Prototype
char TP_Press_Detect();
Description Detects if the touch panel has been pressed.
Parameters None. 
Returns
1
 - if touch panel is pressed. 
-
 0
 - otherwise. 
Requires
Global variables: 
DriveA:
 DriveA. 
DriveB:
 DriveB. 
DriveA_Direction: 
Direction of DriveA pin. 
DriveB_Direction:
 Direction of DriveB pin. 
must be defined before using this function.
Example
// Touch Panel module connections
sbit DriveA at LATC13_bit;
sbit DriveB at LATC14_bit;
sbit DriveA_Direction at TRISC13_bit;
sbit DriveB_Direction at TRISC14_bit;
// End Touch Panel module connections
if (TP_Press_Detect()) {
  ...
}
Notes
None.