lptio.h

来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C头文件 代码 · 共 50 行

H
50
字号
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 1995-1998  Microsoft Corporation

Module Name:

lptio.h

Abstract:

Constants and Functions definitions

Notes:


--*/
//===========================================================================
// The status and control bits mapping of LPT port are as
//          status                  control
//     x--- ----   Busy         ---- x---   nSelect
//     -x-- ----   nAck         ---- -x--   Init
//     --x- ----   PError       ---- --x-   nAutofd
//     ---x ----   Select       ---- ---x   nStrobe
//     ---- x---   nFault
//
#define LPT_STATUS_BITS    0xF8
#define LPT_BITS_INVERT    0x48
#define LPT_NOTBUSY        0x80
#define LPT_PAPEROUT       0x20
#define LPT_SELECT         0x10
#define LPT_NFAULT         0x08

// max count passed by vcomm no more than 4K bytes
#define LPT_MAX_WRITE      2048

// guarantee max BUSY response no more than 20us
#define MAX_WAIT_BUSY      20
//===========================================================================
//   Function prototype
//===========================================================================
BOOL   LPT_WriteFewBytes(PPortInformation, LPSTR);
DWORD  SetError(BYTE);
BOOL   CheckPrinterStatus(PPortInformation PortObj, unsigned uStatusPort);
void   OutByte(ULONG, BYTE);
BYTE   CheckStatus(unsigned);
BYTE   CheckStatusRare(unsigned);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?