Programming Examples
Appendix B
B-3
ktx_dp.h file
/************************************************************************
* KTX_DP.H *
* *
* Description: *
* *
* This file contains defintions for all of the common structures *
* and type definitions used by the example 1784–KTX Scanner software. *
* *
* History: *
* *
* 02/22/93 MJG Original creation. *
* *
************************************************************************/
#ifndef
KTX_DP_H
/* Prevent multiple inclusions */
#define KTX_DP_H 1
/**** atomic data types ****/
#define
UBYTE
unsigned char
#define
BYTE
char
#define
UWORD
unsigned short
#define
WORD
short
#define
USHORT
unsigned short
#define
SHORT
short
#define
UINT
unsigned int
#define
ULONG
unsigned long
#define
LONG
long
#define
BOOL
int
#define
METACHAR
short
/*============================================================================
CONFIG_DATA – defines the bits associated with the config byte.
The host can use this byte to control the behavior of
the scanner firmware. The bits are active–high.
=============================================================================*/
typedef struct
{
UBYTE interrupt_after_each_scan:1;
UBYTE debug_flag:1;
UBYTE enable_cos_detect:1;
UBYTE undefined:5;
} CONFIG_DATA;
/*=============================================================================
RUNNING_STATUS – defines the bits associated with the running status byte.
Used by the scanner firmware to notify the host of running
status.
=============================================================================*/
typedef struct
{
UBYTE end_of_scan_list:1;
UBYTE adapter_addr_flt:1;
UBYTE undefined:6;
} RUNNING_STATUS;
/*=============================================================================
OPERATING_STATUS – this word is part of the dual port and contains boolean
status information about the operation of the scanner firmware.
==============================================================================*/
typedef struct
{
UWORD program_mode:1;
UWORD test_mode:1;
UWORD run_mode:1;
UWORD debug_flag:1;