User manual

Table Of Contents
586
mikoC PRO for PIC32
MikroElektronika
TP_TFT_Press_Detect
Prototype
char TP_TFT_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:
- DriveX_Left: DriveX_Left pin.
- DriveX_Right: DriveX_Right pin.
- DriveY_Up: DriveY_Up pin.
- DriveY_Down: DriveY_Down pin.
- DriveX_Left_Direction: Direction of DriveX_Left pin.
- DriveX_Right_Direction: Direction of DriveX_Right pin.
- DriveY_Up_Direction: Direction of DriveY_Up pin.
- DriveY_Down_Direction: Direction of DriveY_Down pin.
must be dened before using this function.
Example
// Touch Panel module connections
sbit DriveX_Left at LATB13_bit;
sbit DriveX_Right at LATB11_bit;
sbit DriveY_Up at LATB12_bit;
sbit DriveY_Down at LATB10_bit;
sbit DriveX_Left_Direction at TRISB13_bit;
sbit DriveX_Right_Direction at TRISB11_bit;
sbit DriveY_Up_Direction at TRISB12_bit;
sbit DriveY_Down_Direction at TRISB10_bit;
// End Touch Panel module connections
if (TP_TFT_Press_Detect()) {
...
}
Notes None.