⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdppfs.c

📁 ARM9基于WINDOWSCE的BSP源代码
💻 C
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
// Release Status:OS005-SW-70002-r0p0-00REL0
// $Copyright: 
// ----------------------------------------------------------------
// This confidential and proprietary software may be used only as
// authorised by a licensing agreement from ARM Limited
//   (C) COPYRIGHT 2004 ARM Limited
//       ALL RIGHTS RESERVED
// The entire notice above must be reproduced on all authorised
// copies and copies may only be made to the extent permitted
// by a licensing agreement from ARM Limited.
// ----------------------------------------------------------------
// File:     mdppfs.c,v
// Revision: 1.1
// ----------------------------------------------------------------
// $
/*++
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.

Module Name:

   mdppfs.c

Abstract:

   This file implements the NK kernel ppfs client side interface

   NOTE: There is no parallel port on the Z228 Development Board

--*/

#include "windows.h"
#include "win_plat.h"

/*
 * Write register in bits 0-7
 * Read register in bits 8-15
 * Control bits (msw only)
 *
 * This side:
 * 0x8000  - Data byte ready (tx)
 * 0x0800  - Ack to ack (noticed other side's ack)
 * 0x2000  - Waiting for byte (rx)
 * Other side:
 * 0x0002  - Ack (noticed this side's byte)
 * 0x0010  - Data byte ready (rx)
 */

void OEMWriteDebugString(unsigned short *str);

typedef volatile DWORD *PVDWORD;    /* pointer to a volatile dword */

BOOL NoPPFS = TRUE;                 // parallel port disconnected flag

//***************************************************************************
// OEMParallelPortGetByte - Get byte from parallel port
//
// Input -  none
// Ouput -  if parallel port disconnected, set NoPPFS=TRUE and returns -1
//          else returns byte received from parallel port
//***************************************************************************
int OEMParallelPortGetByte(void)
{

    OEMWriteDebugString(TEXT("OEMParallelPortGetByte: Warning - Parallel interface not supported.\r\n"));
    NoPPFS=TRUE;                    // set parallel port to disconnected
    return -1;                      // and return failure
}

//***************************************************************************
// OEMParallelPortSendByte - send byte out parallel port
//
// Input -  chData=byte to send
//
// Output - sets NoPPFS=TRUE if parallel port disconnected
//***************************************************************************
VOID OEMParallelPortSendByte(BYTE chData)
{
    OEMWriteDebugString(TEXT("OEMParallelPortSendByte: Warning - Parallel interface not supported.\r\n"));
    NoPPFS=TRUE;                    // set parallel port to disconnected
}

⌨️ 快捷键说明

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