M851 WristApp Design Guide Rev 1.2
Timex Corporation 100
jr Z, cntDefaultStateTimeoutHiResDoneEvent
; Check if crown set event.
cp A, #CNT_CROWNSET
jr NZ, cntDefaultStateExit
;**************************************************************
; CROWN SET
;**************************************************************
; request a state change to the set banner state
ld B, #CNTSETBANNERSTATE
CORE_REQ_STATE_CHANGE
cntDefaultStateExit:
ret
cntDefaultStateStateEntryEvent:
;**************************************************************
; STATE ENTRY
;**************************************************************
; Suspend ring event. Not used in this state.
CORE_SUSPEND_RING_EVENTS
; allow switch releases to be passed to this current state
CORE_ENABLE_SWITCH_RELEASE
;-------------------------------------------------------------
; W A R N I N G !!! This is a fall through. Do not rearrange.
;-------------------------------------------------------------
cntDefaultSubStateEntry:
cntDefaultStateStopResetReleaseEvent:
;**************************************************************
; STOP/RESET RELEASE
;**************************************************************
push IY
; display message count
LCD_CLR_DISPLAY
LCD_DISP_SEG_MSG_COUNT
pop IY
;--------------------------------------------------------------
; Displays an arrow on the small dot matrix. The position will
; depend on the count direction.
;--------------------------------------------------------------
car cntDisplayArrowOnSDM
;--------------------------------------------------------------
; Displays the counter data on the main dot matrix using
; large fonts.
;--------------------------------------------------------------
jr cntDisplayCounterData
cntDefaultStateStartSplitDepressEvent:
;**************************************************************
; START/SPLIT DEPRESS
;**************************************************************
; Cancel current switch release. Not needed in this state.
HW_KBD_CANCEL_CURRENT_SWITCH_RELEASE
; Get the current counter value.
ld HL, IY
add HL, #CNTDATALOOFFSET
ld HL, [HL]