Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 45
4.10.1 Foreground Use
The kernel allocates 24 bytes for foreground use. These variables are guaranteed to store application
specific variables only when the application is the foreground application. Mode changes and popups may
change these variables. Applications must initialize these variables during state entry events.
The common foreground variables is referenced using the label COREForegroundCommonBuffer. If
the application does not use the 101 byte scroll buffer, it can make use of that space as a common
foreground buffer.
4.10.2 Background Handler Use
These variables are to be used during the execution of the application’s background handler. Upon
completion of the background handler execution, the variables are not guaranteed to retain their values. A
foreground application may use these variables only during processing a one foreground task like a system
event processing. After processing the event, the data is no longer valid.
The common background variables is referenced using the label COREBackgroundCommonBuffer.
4.11 Background Handler
The Background Handler is a background task handler for an application. The application need not be the
foreground application for the background handler to be called and executed. The table below shows the
events being processed in the Background Handler. The events are stored in the variable
COREBackgroundEvent.
Kernel System Event When Used:
COREEVENT_PORINIT
Used only for ROM-based application to
setup/initialize the variables (or files)
required by the application.
Used/passed only during system powerup.
COREEVENT_INIT
Used to setup/initialize the variables (or
files) required by the application.
Used/Passed only when a communication
session has ended.
COREEVENT_TASKEXIT
The backgournd handler is executed by the
kernel with this event prior to any mode
change including popups.
COREEVENT_PEEK
Passed by the kernel to inform the
application to display data on the screen for
peek operation. This must be supported by
an appointment and occasion application
types.
It is advised that applications check first the
existence of the application before
requesting a peek at the application.
The PEEK event handler should clear the
display prior to displaying any data.
It should not use any of the foreground
common variables when displaying the
data.