Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 41
0 Application Index Index of application owner
1 Resource Flag Specifies status of the resource
2 Update Flag Specifies if month, date and year data are required for
an exact match
3 Previous Counter Sample
For resource use only
4 Hundredth data Running hundredths data in BCD format
5 Second data Running seconds data in BCD format
6 Minute data Running minute data in BCD format
7 Hour data Running hours data in BCD format
8 Linked TMR ID Index Link to TMR Resource
9 Linked STP ID Index Link to STP Resource
Resource flag bit definitions:
Bit Name Description
0
bKReserved
Resource is owned
1
bKActive
Resource is active
2
bKDispUpdRequest
Display update request
3
bKTMRLink
Link to a timer resource
4
bKSTPLink
Link to a stopwatch resource
5
bKNotReset
Indicates resource is not in reset state
6
bKGeneratePopup
Popup Request for resource events
7
bKGenerateEvent
Event Request for resource events
Update flag bit definitions:
Bit Name Description
0
bKSYNSecondUpd
Seconds data has been updated
1
bKSYNMinuteUpd
Minute data has been updated
2
bKSYNHourUpd
Hour data has been updated
3
Unused
4
Unused
5
Unused
6
Unused
7
bKSYNRunout
Indicates if synchro resource has run out
0 = not reached maximum time
1 = reached maximum time (100 Hours)
4.7 Application System Data
Application specific variables are stored in the Application System Data (ASD). These variables are often
used in the overall operation of the application.
IMPORTANT: For applications that use any timer resource, the kernel will store the resource index at the
top of the ASD. The application is responsible for allocating the required number of bytes in the ASD for
the resource index.
Since the ASD is stored in heap memory, applications can have its ASD stored anywhere in the heap. For
this reason, access to the ASD variables is done through relative addressing. The kernel variable,
CORECurrentASDAddress, stores the start address of the ASD of the foreground application. For the
Background Handler, the start address of the ASD is stored in COREBackgroundASDAddress during
execution.
The following code show how to access a variable in the ASD during foreground execution: