![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_86.png)
15-10
Programmer’s Manual
Personal Portable System Manager
Programmer’s Manual
Using SysInterrupt Handling
16-1
Chapter 16 Using System Tools
PPSM provides additional tools for applications to access and control system
resources.
16.1
PPSM Initialization
STATUS
PPSMInit
(U16
)
PPSM needs to be initialized. PPSMInit() must first be called before any of the
PPSM tools can be called. It performs all the system initialization, hardware
devices initialization and performs calibration for the pen input panel and the LCD
display.
A device driver (PenInit.c) function CalibratePen( U16 logoFlag) is called to set
the touch panel origin and touch panel maximum value if PPSMInit(TRUE) is called.
This function should call PenSetInputOrg(X, Y) and PenSetInputMax(X, Y). The
coordinate of origin is the top left corner of the touch panel in terms of display
screen coordinate. The coordinate of maximum is the bottom right corner of the
touch panel in terms of display screen coordinate.
The default touch panel calculation value is based on a touch panel that has 320
pixels by 240 pixels (physical sizes 12 cm by 9 cm), using a 10-bit A/D convertor.
An offset of 100 (in A/D output unit) is chosen as the A/D non-linear area around
the edge of the touch panel.
The caller of CalibratePen() can specify if logo display is required or not. If the
logoFlag is FALSE, no logo is displayed. By default, a Motorola Logo and two
cross-hairs (one at top right corner and the other at bottom left corner) are
displayed on the LCD screen for calibration. The user must press these two cross-
hairs, in no particular order, before PPSM will continue execution.
Example 16-1 Initialize PPSM
62
63
/* Initialize PPSM with pen calibration */
PPSMInit(TRUE);
LCD Screen
(160 x 240)
Touch Panel
Org - (-10, -10)
Max - (169, 249)
Figure 16-1 example of calibarting a system
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.