/*++ Copyright (C) Microsoft Corporation, 1993 - 1999 Module Name: util.h Abstract: This module contains utility code used by other 1284 modules. Author: Robbie Harris (Hewlett-Packard) 20-May-1998 Environment: Kernel mode Revision History : --*/ #ifndef _UTIL_ #define _UTIL_ // Standard Maximum Timing values #define IEEE_MAXTIME_TL 35 // Max time Tl from the IEEE spec #define DEFAULT_RECEIVE_TIMEOUT 330 #define ParEnterCriticalSection(Xtension) xTension->bCriticalSection = TRUE #define ParExitCriticalSection(Xtension) xTension->bCriticalSection = FALSE // The following macros may be used to test the contents of the Device // Status Regisger (DSR). These macros account for the hardware // inversion of the nBusy (aka PtrBusy, PeriphAck) signal. ////////////////////////////////////////////////////////////////////////////// #if (1 == DVRH_USE_FAST_MACROS) #define DSR_TEST_MASK(b7,b6,b5,b4,b3) \ ((UCHAR)(b7==DONT_CARE? 0: BIT_7_SET) | \ (b6==DONT_CARE? 0: BIT_6_SET) | \ (b5==DONT_CARE? 0: BIT_5_SET) | \ (b4==DONT_CARE? 0: BIT_4_SET) | \ (b3==DONT_CARE? 0: BIT_3_SET) ) #else #define DSR_TEST_MASK(b7,b6,b5,b4,b3) \ ((UCHAR)((b7==DONT_CARE?0:1)<