![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_48.png)
6-38
DatabUsing Graphics Tools
Programmer’s Manual
panning screen.
Example 6-36 Get LCD display origin on panning screen
U16 x, y;
/* get the position of LCD display screen on panning screen */
CursorGetOrigin(&x, &y);
6.34
Allocate memory for Panning Screen
P_VOID
GetScreenMem
(U16 width U16 height)
This routine will allocate memory for panning screen with specified size. However,
the size of the new panning screen area cannot be larger than 64K. If no memory
is available, it will return NULL.
Example 6-37 Allocate memory for panning screen
P_U8 screenPtr;
/* allocate memory for panning screen with width 320 and height 240 */
screenPtr = (P_U8)GetScreenMem(320, 240);
Personal Portable System Manager
Programmer’s Manual
7-1
Chapter 7
Database Management
PPSM supports global database for applications to store and manage data. Data
type may be formatted or unformatted.
The Database Tools enable applications to:
create and delete multiple databases
add and delete records from databases
store, retrieve and modify data
search for particular data in a database
get status about a database
This chapter gives some example usages of the database tools to help user
getting up to speed fast. The system will call Lmalloc() to create the database. In
power reset, all database content will be erased. Application programmer needs
to save the database information into the flash or eeprom individually.
7.1
Data Format
PPSM database tools support two types of data, formatted and unformatted.
7.1.1
Formatted Data
Formatted data means text data, and is field accessible. Seven fields, as labeled
in
Table 7-1
, will be used frequently in the PDA environment and have been
predefined. Other Formatted Data fields can be defined by an application should
need arise. When a new record is created, the number of Formatted Data fields is
seven by default. PPSM allows users to add additional user-defined fields in a
record. The number of maximum user defined field allowed in PPSM is defined by
PPSM at compile time, currently it is five. Notice that searching is only done on
Formatted Data, not Unformatted Data.
There is a size limit of 60 bytes imposed on each formatted data field.
Table 7-1 Predefined field format used in the PDA environment
Field Index
Field Name
Max. Field Size
DB_LAST
Last Name
60
DB_FIRST
First Name
60
DB_HOME
Home Phone
60
DB_OFFICE
Office Phone
60
DB_ADDRESS
Address
60
DB_FAX
Fax
60
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.