Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 23
4.4.5.2 Switch Releases
Switch Release events are only passed to the application if a switch depression was done previously. It is
advisable to suspend switch releases if the application does not handle them in the current state handler to
prevent an unused release event to be passed to the application killing any current blinking, scrolling or
active timeouts.
The application can cancel the release event of the current depressed switch by calling the macro:
HW_KBD_CANCEL_CURRENT_SWITCH_RELEASE;
If an application does not want to handle any switch release events in the current handler, then the macro
below should be used.
CORE_SUSPEND_SWITCH_RELEASE;
To re-enable switch releases to be passed as events again, then the macro below should be called.
CORE_ENABLE_SWITCH_RELEASE;
4.4.5.3 Popup Cancel Event
If a popup state handler generates a melody, the UI specifies that any switch depression will cancel the
melody and proceed with processing. The application can define all switch cases to handle killing the
melody.
The application can make use of the macro shown below. This macro will trap the “allowed” switch
depress events and crown events and wrap it all in one core system event COREEVENT_POPUPCANCEL.
The trapped switches are now stored in COREEventArgument. This will also cancel the currently active
melody.
CORE_REQUEST_MELODY_POPUPCANCEL;
The “allowed” switch depress events mentioned above indicates the switch events that matches the key
mask on the foregroundstate handler. By default, EL switch depression are not passed as an event to the
application. The UI might specify that the EL also cancel a popup. It is required that popup state handlers
that requires the EL to cancel the popup must call the macro CORE_ALLOW_ALL_KEYMASK to have the EL
depress events be processed. When the popup has processed the popup cancel event, it can restore or
specify a new keymask.
4.4.5.4 Ring Edges and Pulses
Ring Trailing Edges are ring events passed to the application by default. Ring Leading Edge Events are
suspended by default.
To request ring pulse events to be passed to the application, the macro below should be called:
CORE_ENABLE_PULSE_MODE;
To request ring edge events again, the macro below should be used:
CORE_DISABLE_PULSE_MODE;
To suspend all ring types of ring edge events, the macro below should be used:
CORE_SUSPEND_RING_EVENTS;