M851 WristApp Design Guide Rev 1.2
Timex Corporation 34
Time Zone Check Resource
• Exact Match with Reference Time.
Timer Resource
• Countdown reaches 0:00.00.
• Countup reaches specified time of resource.
• Halfway
2
Count is reached (countup and
countdown).
Stopwatch Resource
• Countup data reached maximum time.
Synchro
• Countup data reached maximum time.
When an event is requested, the kernel will pass the event COREEVENT_EVENTGENERATION to the
foreground application regardless of resource ownership.
When a popup is requested, the kernel will acknowledge the request and queues the resource popup. When
the kernel completes other higher priority tasks, it will then proceed with the popup check operation. If
multiple popups are queued, the popup priority is based on the following order: TIMER, BACKUP, TIME
ZONE CHECK, TIMER and SYNCHRO.
The application owner of the resource will now become the foreground application. The current state
would be the popup state (COREPOPUPSTATE).
If the application generates a message that can be cancelled by any switch depression, the macro
CORE_REQUEST_MELODY_POPUPCANCEL must be called in the popup state handler. If a switch was
used to cancel the melody, the kernel will convert the switch event into the event
COREEVENT_POPUPCANCEL with the old switch event in COREEventArgument. The popup
application must look at the entry in the COREEventArgument so that it can process the crown set event.
After completing the operation, the application must request a popdown through the macro
CORE_REQ_POPDOWN.
APPLICATION NOTE
• Before an alarm or appointment application popup request for a popdown, it is advise that it checks all
the entries in the database that matches the current time in the popup clock and if available, restart the
popup sequence for the new entry. It is up to the application to determine how many more matching
entries to popup. Take note that the application is not requesting a new popup here from the kernel.
4.6.3 Time Of Day Resource
The Time-of-Day resource keeps track of the time (second, minute, hour, date, month, year, day of week
and week number). The resource provides a number of methods that can be used to manipulate, modify
any data or status bits of a specific resource. Refer to the M851 Application Programming Interface
Document for more details in using the TOD Resource.
TOD Resource Data Structure:
Offset Data Type Description
0 Application Index Index of application owner
1 Resource Flag Specifies status of the resource and how this data
2
Typical use of this event is to track the halfway mark of a timer count. This mark can be any number
between 0:00.00 and the countdown time.