;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Copyright (c) 2001-2002 TIMEX Corporation.
; 
; This document is the property of, and contains information proprietary to
; TIMEX Corporation.  It is to be returned upon request.  Reproduction by any
; means, disclosure, or use of its contents for other than the expressed
; purpose for which it is loaned, without the written consent of TIMEX
; Corporation, is strictly prohibited.
;
; File Name:    alm.h
;
; Purpose:      ALARM Header File
;
; File Change History:
;
;               05/16/2000 NLS - Created appt.h for m841
;
; M851 Development:
;
;               11/27/2001 JDS - Modified for M851.
;               01/29/2002 JDS - Created from alm.h
;               04/25/2002 JDS - Created from appt.h
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; state definitions
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CAUTION!: ALM and APPT MUST have this same def in order to use the SNOOZE 10 MIN 
;           and DELETE TIME OUT states.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; The UTL state defs below can be found in utldef.h.
;ALMMODEBANNERSTATE        equ     COREBANNERSTATE ; Def not needed but this defs the sequence
;UTLDEFAULTSTATE           equ     COREDEFAULTSTATE
;ALMSETBANNERSTATE         equ     CORESETBANNERSTATE ; Def not needed but this defs the sequence
ALMSETSTATE               equ     CORESETSTATE
;UTLPOPUPSTATE             equ     COREPOPUPSTATE
ALMPASSWORDDEFAULTSTATE   equ     COREPASSWORDDEFAULTSTATE
ALMPASSWORDSETBANNERSTATE equ     COREPASSWORDSETBANNERSTATE
ALMPASSWORDSETSTATE       equ     COREPASSWORDSETSTATE
;; The state defs below can be found in utldef.h.
;;UTLDELETETIMEOUTSTATE    equ     COREMISCSTATE3
;;UTLYOUROCKSETSTATE       equ     COREMISCSTATE4

;; Use these (uncomment those defs in utldef.h) 
;; if we use the set snooze feature then remove YOUROCK
;;UTLPOPUPSETBANNERSTATE   equ     COREMISCSTATE4
;;UTLPOPUPSETSTATE         equ     COREMISCSTATE5
;;UTLSNOOZE10MINSTATE      equ     COREMISCSTATE6

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; ALM APPLICATION DATABASE
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; ALM MAX ASD SIZE - APPT ASD is a little larger
; than the ALM ASD. As long as the fields
; are the same thru UTLASDSEARCHRECORDPTROFFSET
; then there will not be a problem using the common utilities.
; NOTE: Make the ALARM ASD the SAME SIZE as APPT.
; This is so the common routines will work.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ALMASDSYSTEMDATASIZE            equ     30 See UTLASDSYSTEMDATASIZE in Utldef.h

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; SWITCH EVENT REDEFINITIONS
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ALMEVENT_MODEDEPRESS            EQU COREEVENT_SWITCH1DEPRESS
ALMEVENT_STOPRESETDEPRESS       EQU COREEVENT_SWITCH2DEPRESS
ALMEVENT_STARTSPLITDEPRESS      EQU COREEVENT_SWITCH3DEPRESS

ALMEVENT_MODERELEASE            EQU COREEVENT_SWITCH1RELEASE
ALMEVENT_STOPRESETRELEASE       EQU COREEVENT_SWITCH2RELEASE

ALMEVENT_POPUP_CANCEL           EQU COREEVENT_MELODYPOPUPCANCEL

ALMEVENT_CROWN_EL_RELEASE       EQU COREEVENT_CROWN_EL_RELEASE
ALMEVENT_CROWN_HOME             EQU COREEVENT_CROWN_HOME
ALMEVENT_CROWN_SET              EQU COREEVENT_CROWN_SET1 

ALMEVENT_CW_EDGE_TRAILING       EQU COREEVENT_CW_EDGE_TRAILING
ALMEVENT_CCW_EDGE_TRAILING      EQU COREEVENT_CCW_EDGE_TRAILING

ALMEVENT_CW_PULSES              EQU COREEVENT_CW_PULSES
ALMEVENT_CCW_PULSES             EQU COREEVENT_CCW_PULSES

ALMEVENT_TIMEOUTDONE_LORES      EQU COREEVENT_TIMEOUTDONE_LOWRES
ALMEVENT_TIMEOUTDONE_HIGHRES    EQU COREEVENT_TIMEOUTDONE_HIGHRES
ALMEVENT_STICKY_TIMEOUTDONE     EQU COREEVENT_STICKY_TIMEOUTDONE

ALMEVENT_STATEENTRY             EQU COREEVENT_STATEENTRY
ALMEVENT_MELODY_DONE            EQU COREEVENT_MELODY_DONE
ALMEVENT_MELODYPOPUPCANCEL      EQU COREEVENT_MELODYPOPUPCANCEL
ALMEVENT_END_OF_SCROLL          EQU COREEVENT_END_OF_SCROLLING_MESS
ALMEVENT_ANYSWITCHDEPRESS       EQU COREEVENT_ANYSWITCHDEPRESS
ALMEVENT_PRIMARY_TIME_CHANGE    EQU COREEVENT_PRIMARY_TIME_CHANGE

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Background handler event definitions
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ALMEVENT_PORINIT                EQU COREEVENT_PORINIT
ALMEVENT_INIT                   EQU COREEVENT_INIT
ALMEVENT_UPDATEDATABASEHEADER   EQU COREEVENT_UPDATEDATABASEHEADER
ALMEVENT_REFRESH_START          EQU COREEVENT_REFRESH_START
ALMEVENT_REFRESH_CONTINUE       EQU COREEVENT_REFRESH_CONTINUE
ALMEVENT_TASKEXIT               EQU COREEVENT_TASKEXIT
ALMEVENT_DAY_UPDATE             EQU COREEVENT_DAY_UPDATE
ALMEVENT_HOUR_UPDATE            EQU COREEVENT_HOUR_UPDATE
ALMEVENT_TZC_EXPIRED_POPUP      EQU COREEVENT_TZC_EXPIRED_POPUP

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; SWITCH MASK REDEFINITIONS
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ALMSWITCHMASK_MODE              EQU     bCORESwitch1
ALMSWITCHMASK_STOPRESET         EQU     bCORESwitch2
ALMSWITCHMASK_STARTSPLIT        EQU     bCORESwitch3
ALMSWITCHMASK_CW                EQU     bCORECWSwitch
ALMSWITCHMASK_CCW               EQU     bCORECCWSwitch
ALMSWITCHMASK_EL                EQU     bCOREELSwitch


ALMSWITCHMASK_SETSTATE_NOKEYS   EQU     0


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; ALM SET - SET POSITIONS
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ALMSETPOSITIONTIME          EQU     00H  ; The time the alarm will expire
ALMSETPOSITIONFREQ          EQU     01H  ; The Frequency UTLDAILY, UTLWKDAYS, UTLWKENDS, UTLWEEKLYSU .. SA
ALMSETPOSITIONDMMESSAGE     EQU     02H  ; Any character position in the LCDScrollMessage.

