;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; 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:    sch.h
;
; Purpose:      Schedule Mode Header File
;
; File Change History:
;
;				12/11/2001 RBR - Created header file for M851
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;---------------------------------------------------
; Allocation Size on POR INIT.
;---------------------------------------------------



SCHADDALLOCATIONSIZE		equ		080h




;---------------------------------------------------
; Boundary Conditions Related Equates.
;---------------------------------------------------

SCHMAXNOENTRIES				equ		250	 		    ; Maximum Number of Entries
													;   is 250

SCHENDOFLISTENTRY           equ     255
SCHFIRSTENTRYRECNO			equ     0

SCHOFFSETNOOFRECORDS        equ     1
SCHOFFSETOFGROUPTYPEFROMADD equ     2
SCHOFFSETOFGROUPTYPEMESSINFO equ    3


;---------------------------------------------------
; Redefinition of CORE States
;---------------------------------------------------

SCHBANNERSTATE          	equ     COREBANNERSTATE
SCHDEFAULTSTATE         	equ     COREDEFAULTSTATE
SCHSET1BANNERSTATE      	equ     CORESET1BANNERSTATE
SCHSET1STATE            	equ     CORESET1STATE


;---------------------------------------------------
; Redefinition of CORE Events used
;---------------------------------------------------

SCHEVENT_STATEENTRY         equ     COREEVENT_STATEENTRY
SCHEVENT_TIMEOUTLORES       equ     COREEVENT_TIMEOUTDONE_LOWRES
SCHEVENT_TIMEOUTDONE_HIRES	equ		COREEVENT_TIMEOUTDONE_HIGHRES
SCHEVENT_STICKY_TIMEOUTDONE equ		COREEVENT_STICKY_TIMEOUTDONE
SCHEVENT_CROWN_EL_DEPRESS  	equ		COREEVENT_CROWN_EL_DEPRESS
SCHEVENT_CROWN_HOME  		equ		COREEVENT_CROWN_HOME
SCHEVENT_CROWN_SET1	    	equ		COREEVENT_CROWN_SET1	   
SCHEVENT_CW_PULSES	    	equ		COREEVENT_CW_PULSES	   
SCHEVENT_CCW_PULSES	    	equ		COREEVENT_CCW_PULSES	   
SCHEVENT_CW_EDGE	    	equ		COREEVENT_CW_EDGE_TRAILING	   
SCHEVENT_CCW_EDGE	    	equ		COREEVENT_CCW_EDGE_TRAILING	   
SCHEVENT_ANYSWITCHDEPRESS   equ		COREEVENT_ANYSWITCHDEPRESS	   
SCHEVENT_ANYSWITSCHELEASE	equ		COREEVENT_ANYSWITCHRELEASE	   

SCHEVENT_MODEDEPRESS  		equ     COREEVENT_SWITCH1DEPRESS
SCHEVENT_STARTSPLITDEPRESS	equ     COREEVENT_SWITCH2DEPRESS
SCHEVENT_STOPRESETDEPRESS	equ     COREEVENT_SWITCH3DEPRESS

SCHEVENT_MODERELEASE  		equ     COREEVENT_SWITCH1RELEASE
SCHEVENT_STARTSPLITRELEASE	equ     COREEVENT_SWITCH2RELEASE
SCHEVENT_STOPRESETRELEASE	equ     COREEVENT_SWITCH3RELEASE



SCHEVENT_DISPLAY_TODRES	  	equ		COREEVENT_DISPLAY_UPDATE_TODRES	   
SCHEVENT_DISPLAY_STPRES		equ		COREEVENT_DISPLAY_UPDATE_STPRES	   
SCHEVENT_MELODY_DONE	    equ		COREEVENT_MELODY_DONE	   



;------------------------------------------------
; Switch Definition masked in State handlers
;------------------------------------------------

SCHDEFAULTSWITCHMASKED      equ  	(bCORESwitch1 | bCORECWSwitch | bCORECCWSwitch)
SCHSET1STATESWITCHMASKED	equ 	(bCORECWSwitch    | bCORECCWSwitch)
									 


SCHFIRSTRECSCHEDULE         equ		0

SCHDATETIMEMESSLENGHT       equ    	7
SCHDATEANDTIMESIZE			equ     6
SCHSIZEOFDATEONLY			equ     3
SCHSIZEOFDATEANDTIMEONLY	equ     5

SCHSIZEOFPTZDATATOCOPY		equ     7
SCHSIZEOFTIMEONLY			equ     2






SCHDOW_AND_TIME				equ  	bSCHTimeEnabled
SCHDATE_ONLY				equ		bSCHDateEnabled
SCHDATE_AND_TIME			equ		bSCHDateEnabled + bSCHTimeEnabled



; Schedule Group Name Offset

SCHGROUPTYPEMESSINFOLENGTH	 equ    19

SCHSCHEDNAMESIZERECORDOFFSET equ     7
SCHSCHEDNAMEMESSRECORDOFFSET equ     8