/* $Id: hps.std.h,v 2.2 91/01/10 20:42:54 dave Exp $ */
/****************************************************************/
/* hps.std.h: System level data types and constants.			*/
/****************************************************************/
/*																*/
/*                 Confidential Information                     */
/*      Limited Distribution to Authorized Persons Only         */
/*     Created 1988 and Protected as an Unpublished Work        */
/*          Under the U.S. Copyright Act of 1976.               */
/*         Copyright (c) 1988, Systech Corporation              */
/*                  All Rights Reserved                         */
/*																*/
/*	THIS SOFTWARE IS LICENSED BY AND IS THE	CONFIDENTIAL AND 	*/
/*	PROPRIETARY PROPERTY OF SYSTECH COMPUTER CORPORATION AND 	*/
/*	MAY NOT, WITHOUT THE PRIOR WRITTEN CONSENT OF SYSTECH 		*/
/*	COMPUTER CORPORATION, BE REPRODUCED, USED OR DISCLOSED 		*/
/*	EXCEPT IN ACCORDANCE WITH A SYSTECH COMPUTER CORPORATION 	*/
/*	SOFTWARE LICENSE AGREEMENT.									*/
/****************************************************************/
/*																*/
/* This file defines some basic data types (to insure that the	*/
/* HPS on-board processor and the host processor agree on byte-	*/
/* within-word ordering, long and short word sizes, etc) and	*/
/* other system level constants.								*/
/*																*/
/****************************************************************/


/*
 *	Standard data types.
 */

typedef int				bool;
typedef unsigned long	bit32;
typedef unsigned short	bit16;
typedef unsigned char	bit8;

#ifdef INC_UTYPES
typedef unsigned char	uchar;
typedef unsigned short	ushort;
typedef unsigned long	ulong;
#endif


/*
 *	32-bit value structure designed for the 68000.
 */

typedef union
{
	bit32 hps_32;
	struct
	{
		bit16 WH;
		bit16 WL;
	} hps_2x16;
	struct
	{
		bit8 HH;
		bit8 HL;
		bit8 LH;
		bit8 LL;
	} hps_4x8;
} HPS_LONG;


/*
 *	Convenient #defines to use with HPS_LONG union.
 */

#define wl			hps_2x16.WL
#define wh			hps_2x16.WH
#define ll			hps_4x8.LL
#define lh			hps_4x8.LH
#define hl			hps_4x8.HL
#define hh			dpram_addr.HH



/*
 *	Manifest constants.
 */

#ifndef YES
#define YES			1
#endif

#ifndef NO
#define NO			0
#endif

#ifndef TRUE
#define TRUE		YES
#endif

#ifndef FALSE
#define FALSE		NO
#endif

#ifndef ON
#define ON			YES
#endif

#ifndef OFF
#define OFF			NO
#endif

#ifndef NULL
#define NULL		0
#endif

#ifndef EOS
#define EOS			0
#endif

#ifndef SUCCESS
#define SUCCESS		0
#endif

#ifndef FAIL
#define FAIL		(-1)
#endif

/*
 *	Bit positions.
 */

#ifndef	BIT0		/* assume these are always defined in a group. */

#define BIT0		((bit16)0x0001)
#define BIT1		((bit16)0x0002)
#define BIT2		((bit16)0x0004)
#define BIT3		((bit16)0x0008)
#define BIT4		((bit16)0x0010)
#define BIT5		((bit16)0x0020)
#define BIT6		((bit16)0x0040)
#define BIT7		((bit16)0x0080)
#define BIT8		((bit16)0x0100)
#define BIT9		((bit16)0x0200)
#define BIT10		((bit16)0x0400)
#define BIT11		((bit16)0x0800)
#define BIT12		((bit16)0x1000)
#define BIT13		((bit16)0x2000)
#define BIT14		((bit16)0x4000)
#define BIT15		((bit16)0x8000)
#define BIT16		((bit32)0x00010000)
#define BIT17		((bit32)0x00020000)
#define BIT18		((bit32)0x00040000)
#define BIT19		((bit32)0x00080000)
#define BIT20		((bit32)0x00100000)
#define BIT21		((bit32)0x00200000)
#define BIT22		((bit32)0x00400000)
#define BIT23		((bit32)0x00800000)
#define BIT24		((bit32)0x01000000)
#define BIT25		((bit32)0x02000000)
#define BIT26		((bit32)0x04000000)
#define BIT27		((bit32)0x08000000)
#define BIT28		((bit32)0x10000000)
#define BIT29		((bit32)0x20000000)
#define BIT30		((bit32)0x40000000)
#define BIT31		((bit32)0x80000000)

#endif

/*
 * MODIFICATION HISTORY:
 *
 * $Log:	hps.std.h,v $
 * Revision 1.1.2.1  92/06/24  13:53:27  marker
 * Branch RISCOS_5_01_2_FIXES off of trunk.
 * 
 * Revision 2.2  91/01/10  20:42:54  dave
 * Update header.
 * COSMETIC
 * 
 */
