AN2385 Freescale Semiconductor / Motorola, AN2385 Datasheet - Page 10

no-image

AN2385

Manufacturer Part Number
AN2385
Description
GPRS Wireless Internet Connectivity Using DragonBall and Palm OS Based PDAs Application Note
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Program Source Code
}
//-----------------------------------------------------------------------//
//-----------------------------------------------------------------------//
//
// Objective:
//
// Called by:
//
//-----------------------------------------------------------------------//
static void AppEventLoop(void)
{
}
//-----------------------------------------------------------------------//
//-----------------------------------------------------------------------//
//
// Objective:
//
//
// Called by:
//
//-----------------------------------------------------------------------//
static Boolean AppHandleEvent(EventPtr eventP)
{
10
// Write the saved preferences / saved-state information.
// will be backed up during a HotSync.
PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum,
// Close all the open forms.
SrmClose(portId);
FrmCloseAllForms ();
UInt16 error;
EventType event;
do
while (event.eType != appStopEvent);
UInt16 formId;
FormPtr frmP;
if (eventP->eType == frmLoadEvent)
&prefs, sizeof (prefs), true);
{
}
{
// Load the form resource.
formId = eventP->data.frmLoad.formID;
frmP = FrmInitForm(formId);
FrmSetActiveForm(frmP);
// Set the event handler for the form.
// currently active form is called by FrmHandleEvent each time
// it receives an event.
switch (formId)
StarterPalmMain()
This routine loads form resources and set the event handler //
AppEventLoop()
for the form loaded.
This routine is the event loop for this application.
EvtGetEvent(&event, evtWaitForever);
if (! SysHandleEvent(&event))
{
Freescale Semiconductor, Inc.
For More Information On This Product,
Function:
if (! MenuHandleEvent(0, &event, &error))
Function:
Go to: www.freescale.com
if (! AppHandleEvent(&event))
FrmDispatchEvent(&event);
AppEventLoop
AppHandleEvent
The handler of the
This data
MOTOROLA
//
//
//
//
//
//
//
//
//
//

Related parts for AN2385