/* -*- Mode:C; Tab-width:4 -*- */
/*                                                                       */
/*                                                                       */
/*                      RESTRICTED RIGHTS LEGEND                         */
/*                                                                       */
/* Use, duplication, or disclosure by the Government is subject to       */
/* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in  */
/* Technical Data and Computer Software clause at 252.227-7013.          */
/*                                                                       */
/*                    TEXAS INSTRUMENTS INCORPORATED.                    */
/*                            P.O. BOX 149149                            */
/*                         AUSTIN, TEXAS 78714-9149                      */
/*                              MS 2151                                  */
/*                                                                       */
/*  Copyright (C) 1987,1988,1989,1990 Texas Instruments Incorporated.    */
/*  All rights reserved.                                                 */
/*                                                                       */

/*  9-26-88  BJ  Add the constant  HANDLE_MICRONET_PORTS.                */
/*  8/28/89  clm - removed redundant and incorrect definition of struct            */
/*                           CntrlParam.  CIncludes:Files.h contains the current version.  */

#ifndef ___MICRONET_DEVICE___
#define ___MICRONET_DEVICE___


#include <types.h>
#ifndef __QUICKDRAW__
#include <Quickdraw.h>
#endif
#ifndef __WINDOWS__
#include <windows.h>
#endif
#include <devices.h>
#include <files.h>

#define NULL 0

#define TV_CHANNEL 1
#define MISC_CHANNEL 4

extern Boolean find_mx();
extern Boolean find_host();

/* control opcodes. */	 
#define GetAcb                         1
#define SendCommand                    2
#define GetCommand                     3
#define PRINTF                         4
#define SELECT_WORD_LOC                5
#define ADD_OPEN_FUNCTION              6
#define REMOVE_OPEN_FUNCTION           7
#define ADD_CLOSE_FUNCTION             8
#define REMOVE_CLOSE_FUNCTION          9
#define ADD_HANDLER_FUNCTION          10
#define REMOVE_HANDLER_FUNCTION       11
#define HANDLE_MICRONET_PORTS           12

/* These are defined in portmap.h
#define IOCTL_PMAP_SET                13
#define IOCTL_PMAP_UNSET              14
#define IOCTL_PMAP_GET                15
*/

#define READ_STARTUP                  16

extern Boolean doneFlag;
extern Boolean debugFlag;
extern Rect dragRect;

#define IO_DEFERED 1 /* valued returned on async requests when no acb available. */
#define aRdCmd 2  /* Value of low order byte of ioTrap word for a read command.    */
#define aWrCmd 3  /* Value of low order byte of ioTrap word for a write command.   */
#define actlCmd 3 /* Value of low order byte of ioTrap word for a control command. */
#define aStsCmd 3 /* Value of low order byte of ioTrap word for a status command.  */

/* 08/28/89 clm - this definition is redundant and no longer correct.
   Removing it; the version of CntrlParam defined in CIncludes:Files.h is
   the current version. */

/*  All of these have already been defined in the CIncludes directory
struct ioParam
{
  short ioRefNum;
  char ioVersNum;
  char ioPermssn;
  Ptr ioMisc;
  Ptr ioBuffer;
  long ioReqCount;
  long ioActCount;
  short ioPosMode;
  long ioPosOffset;
};
*/

/*
struct cntrlParam
{
  short ioCRefNum;
  unsigned short csCode;
  short csParam[10];
};
*/

/*
typedef struct ParamBlockRec
{
  struct QElem *qLink;
  short qType;
  short ioTrap;
  Ptr ioCmdAddr;
  ProcPtr ioCompletion;
  OSErr ioResult;
  char *ioNamePtr;
  short ioVRefNum;
  union
	{
	  struct ioParam ioParams;
	  struct cntrlParam cntrlParams;
	} parms;
} ParamBlockRec, *ParamBlkPtr;
*/

#endif