#ident "$Id: x25clock.h,v 1.1 1995/03/16 17:18:14 garyp Exp $"
/*****************************************************************************
 * Copyright (c) 1988-95 Digi International Inc., All Rights Reserved
 * 
 * This  software  contains  proprietary  and  confidential   information   of
 * Digi International  Inc.   By  accepting  transfer  of this copy, Recipient
 * agrees to retain this software in  confidence,  to  prevent  disclosure  to
 * others,  and  to make no  use of this software other than that for which it
 * was delivered.  This is an unpublished copyright work  Digi   International
 * Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is
 * strictly prohibited.
 * 
 * Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc.
 * Confidential  when   combined   with   the   aggregated  modules  for  this
 * product) OBJECT CODE ONLY SOURCE MATERIALS
 * 
 * (C) COPYRIGHT Digi International Inc. 1995
 * 
 * All Rights Reserved
 * 
 * US   Government   Users   Restricted   Rights   -   Use,   duplication   or
 * disclosure  restricted by GSA ADP Schedule Contract with Digi International
 * Inc.
 * 
 *****************************************************************************/

/*******************************************************************
 *
 *  SpiderX25 X25 PLP Driver
 *
 *  Copyright 1991 Spider Systems Limited
 *
 *  X25CLOCK.H
 *
 *
 *******************************************************************/

/*
 *	x25clock.h
 *	 /projects/common/PBRAIN/SCCS/pbrainF/dev/sys/x25/0/s.x25clock.h
 *	@(#)x25clock.h	1.6
 *
 *	Last delta created	15:13:19 1/30/91
 *	This file extracted	18:32:53 11/19/92
 *
 */

/* ----------------------------------------------------------------------
   External definitions of routines available from clock.c and macros
   ---------------------------------------------------------------------- */

extern void startT22(struct x25vcformat FAR *);
extern void startT23(struct x25vcformat FAR *);
extern void stop_vc_timers(struct x25vcformat FAR *);
extern void start_random_timer(struct lsformat FAR *);
extern void stop_ls_timers(struct lsformat FAR *);
extern void x_examtimer(struct x25vcformat FAR *);
extern void l_examtimer(struct lsformat FAR *);

/* ----------------------------------------------------------------------
        Macros concerning the start/stop of vc clocks

   Used in conjunction with subroutines declared in X25clock.c

   ---------------------------------------------------------------------- */

#define	startT21(vv)	vv->xtock[0] = (ushort) vv->xbase->T21value
#define	 stopT21(vv)	vv->xtock[0] = 0

#define	 stopT22(vv)	vv->xtock[0] = 0

#define	 stopT23(vv)	vv->xtock[0] = 0

#define	startT24(vv)	vv->xtock[1] = (ushort) vv->xbase->Tvalue
#define	 stopT24(vv)	vv->xtock[1] = 0

#define	startT25(vv)	vv->xtock[3] = (ushort) vv->xbase->T25value
#define	 stopT25(vv)	vv->xtock[3] = 0

#define	startT26(vv)	vv->xtock[0] = (ushort) vv->xbase->T26value
#define	 stopT26(vv)	vv->xtock[0] = 0

#define	start_ackdelay(vv) vv->xtock[2] = (ushort) vv->xbase->ACKDELAY
#define	 stop_ackdelay(vv) vv->xtock[2] = 0

/* ----------------------------------------------------------------------
      Macros concerning stop/start of the LSAP clocks
   ---------------------------------------------------------------------- */

#define		startT20(ll)	ll->ltock[1] = (ushort) ll->lbase->T20value
#define		 stopT20(ll)	ll->ltock[1] = 0

#define	start_idle_timer(ll)	ll->ltock[2] = (ushort) ll->lbase->idlevalue
#define	 stop_idle_timer(ll)	ll->ltock[2] = 0

#define	start_connect_timer(ll)	ll->ltock[2] = (ushort) ll->lbase->connectvalue
#define	 stop_connect_timer(ll)	ll->ltock[2] = 0

#define	 stop_random_timer(ll)	ll->ltock[3] = 0

