User manual

552
mikoBasic PRO for PIC32
MikroElektronika
TP_Press_Detect
Prototype
sub function TP_Press_Detect() as byte
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 dened before using this function.
Example
‘ Touch Panel module connections
dim DriveA as sbit at LATC13_bit
DriveB as sbit at LATC14_bit
DriveA_Direction as sbit at TRISC13_bit
DriveB_Direction as sbit at TRISC14_bit
‘ End Touch Panel module connections
if (TP_Press_Detect() <> 0) then
...
end if
Notes None.