我找到答案了
原来是我程序太菜了,有些隐蔽的东西没有发觉。惭愧
现在贴出来给大家笑话一下。
//////////////////////////////////////////////
原来在ser2410_ser.c中有如下程序
const
HW_VTBL IoVTbl = {
SerInitSerial,
SL_PostInit,
SerDeinit,
SerOpen,
SerClose,
SL_GetInterruptType,
SL_RxIntr,
SL_TxIntrEx,
SL_ModemIntr,
SL_LineIntr,
SL_GetRxBufferSize,
SerPowerOff,
SerPowerOn,
SL_ClearDTR,
SL_SetDTR,
SL_ClearRTS,
SL_SetRTS,
SerEnableSerial,
SerDisableSerial,
SL_ClearBreak,
SL_SetBreak,
SL_XmitComChar,
SL_GetStatus,
SL_Reset,
SL_GetModemStatus,
SerGetCommProperties,
SL_PurgeComm,
SL_SetDCB,
SL_SetCommTimeouts,
};
extern const HW_VTBL SerCardIoVTbl;
const
HW_VTBL IrVTbl = {
SerInitIR,
SL_PostInit,
SerDeinit,
SerOpen,
SerClose,
SL_GetInterruptType,
SL_RxIntr,
SL_TxIntrEx,
SL_ModemIntr,
SL_LineIntr,
SL_GetRxBufferSize,
SerPowerOff,
SerPowerOn,
SL_ClearDTR,
SL_SetDTR,
SL_ClearRTS,
SL_SetRTS,
SerEnableIR,
SerDisableIR,
SL_ClearBreak,
SL_SetBreak,
SL_XmitComChar,
SL_GetStatus,
SL_Reset,
SL_GetModemStatus,
SerGetCommProperties,
SL_PurgeComm,
SL_SetDCB,
SL_SetCommTimeouts,
};
其实MDD.c里所出现的HWInit//PVOID (*HWInit)(ULONG Identifier, PVOID pMDDContext); //只是函数指针,分层驱动就是通过这些函数来实现的。
程序太烂了,惭愧。还有些不明白,再看。 |