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

📄 common.c

📁 WinCE5.0BSP for Renesas SH7770
💻 C
字号:
//
//  Copyright(C) Renesas Technology Corp. 1999-2003. All rights reserved.
//
//  Serial driver for ITS-DS7
//
//  FILE      : common.c
//  CREATED   : 2002.06.26
//  MODIFIED  : 2003.06.20
//  AUTHOR    : Renesas Technology Corp.
//  HARDWARE  : RENESAS ITS-DS7
//  HISTORY   : 
//              2003.06.20
//              - Created release code.
//                (based on Serial driver for ITS-DS4 Source Kit Ver.1.2.0 for WCE 4.2)
//

#include <windows.h>
#include <serhw.h>
#include <nkintr.h>

#include "platform.h"
#include "oalintr.h"

extern const DEVICE_LIST IoDL;
extern const HW_VTBL SCIF0IoVTbl;
extern const HW_VTBL SCIF3IoVTbl;

#ifdef NOMODEM
//
// DetectModem - called by device.exe to allow this driver to detect modem cards
//
// Return is NULL for an undetected card or else it is the name of the device key
// under HLM\Drivers\PCMCIA for this driver (i.e. "Modem")
//
// Note:
//  This function normally exported by ser_card or equivalent modem driver.
//  If no modem exists on system, export a dummy routine.
//
#include <cardserv.h>
#include <sockserv.h>
LPTSTR
DetectModem(
           CARD_SOCKET_HANDLE hSock,
           UCHAR  DevType,
           LPTSTR DevKey,
           DWORD  DevKeyLen
           )
{
    return (NULL);
}
#endif
/*
HWOBJ	SCIF0IoObj = {
		(PDEVICE_LIST) &IoDL,
		THREAD_AT_INIT,
		SYSINTR_SCIF0,
		NULL,
		(PHW_VTBL) &SCIF0IoVTbl
		};
HWOBJ	SCIF3IoObj = {
		(PDEVICE_LIST) &IoDL,
		THREAD_AT_INIT,
		SYSINTR_IR,
		NULL,
		(PHW_VTBL) &SCIF3IoVTbl
		};

const
PHWOBJ	HWObjects[] = {						// object pointer table
		&SCIF0IoObj,						// COM1:
		&SCIF3IoObj,						// COM4:
};

const
DEVICE_LIST IoDL = {
		"serial.dll",							// dll
		sizeof(HWObjects)/sizeof(PHWOBJ),		// number of elements in table
		(PHWOBJ *) HWObjects					// pointer to object pointer table
		};
*/

/*****************************************************************************
*	FUNCTION :		SL_GetSerialObject
*	DESCRIPTION :	Return the function map
*	INPUTS :		
*	OUTPUTS :		None
*	DESIGN NOTES :	
*	CAUTIONS :		
*	
*   NOTES :			The DEVICE_LIST structure that contains information
*					about the devices supported in this implementation.
*****************************************************************************/
//PDEVICE_LIST GetSerialObject(VOID)
//{
//	return	((PDEVICE_LIST) &IoDL);
//}

/*
PHWOBJ
GetSerialObject(
               DWORD DeviceArrayIndex
               )
{
    PHWOBJ pSerObj;

    // We do not have a statically allocated array of HWObjs.  Instead, we 
    // allocate a new HWObj for each instance of the driver.  The MDD will 
    // always call GetSerialObj/HWInit/HWDeinit in that order, so we can do 
    // the alloc here and do any subsequent free in HWDeInit.

    // Allocate space for the HWOBJ.
    pSerObj = (PHWOBJ)LocalAlloc( LPTR, sizeof(HWOBJ) );
    if ( !pSerObj )
        return (NULL);

    // Fill in the HWObj structure that we just allocated.
//    if( DeviceArrayIndex == 0 ){
        pSerObj->BindFlags = THREAD_IN_PDD;            // We take care of our own IST
        pSerObj->dwIntID   = SYSINTR_SCIF0;            // SysIntr is filled in at init time
        pSerObj->pFuncTbl  = (HW_VTBL *) &SCIF0IoVTbl; // Return pointer to appropriate functions
//    }
//    else{
//        pSerObj->BindFlags = THREAD_IN_PDD;            // We take care of our own IST
//        pSerObj->dwIntID   = SYSINTR_IR;               // SysIntr is filled in at init time
//        pSerObj->pFuncTbl  = (HW_VTBL *) &SCIF3IoVTbl; // Return pointer to appropriate functions
//    }

    // Now return this structure to the MDD.
    return (pSerObj);
}
*/

⌨️ 快捷键说明

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