Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 32
Displays the message “ENTER
PASSWORD”;
Requests a 1.5 second banner timeout;
On timeout expiration, request a state
change to the Password Set State index;
Process the Crown_Home event to
request a state change to the Password
Default State index;
Process switch events to bypass the
timeout and request a state change to the
Password Set State index;
corePasswordSetStateHandler
Handles the following:
Handles all the events required to request
input from the user for a two character
password;
Process the Crown_Home event to check
if the password entered is correct;
If password is correct, request a state
change to the default state index;
If password is incorrect, then display the
message “PASSWORD INVALID” and
request a state change to the password
default state index after a 2 second
timeout period.
utlYouRockStateManager
If a WristApp does not support a set state, then the
set banner state should use this function. It
handles the following:
Display the message “YOU ROCK!”;
Process the Crown_Home event to
request a state change to the default state
index.
The code section below shows how the You Rock State Manager is used in the code:
SetStateManager:
car utlYouRockStateManager
ret
The WristApp developer can choose to customize the operation of the built-in state handlers by preempting
the system event passed by the OS. The code section below shows a way to bypass the message displayed
on state entry to the utlYouRockStateManager with a custom message.
SetStateManager:
; preempt the STATE_ENTRY event for custom processing
ld A, [CORECurrentEvent]
cp A, #COREEVENT_STATEENTRY
jr NZ, process_event_in_default_handler
; display customized banner message
ld IY, #MY_CUSTOM_MESSAGE
LCD_DISP_BANNER_MSG
ret
process_event_in_default_handler: