请教,从WINCE5.0里移植网卡驱动到6.0里,总是进不了中断服务程序?
本帖最后由 spacexplorer 于 2014-01-19 11:41:10 编辑 在oallib/intr/intr.c里使能了外部中断:
OALIntrStaticTranslate(SYSINTR_ETH, IRQ_EINT15);
value = IRQ_EINT15;
OALIntrEnableIrqs(1, &value);
NdisZeroMemory (&Characteristics, sizeof (Characteristics));
Characteristics.MajorNdisVersion = (UCHAR)SMSC9118_NDIS_MAJOR_VERSION;
Characteristics.MinorNdisVersion = (UCHAR)SMSC9118_NDIS_MINOR_VERSION;
Characteristics.CheckForHangHandler = Smsc9118CheckForHang;
Characteristics.DisableInterruptHandler = smscDisableIntr;
Characteristics.EnableInterruptHandler = smscEnableIntr;
Characteristics.HaltHandler = Smsc9118Halt;
Characteristics.HandleInterruptHandler = Smsc9118HandleInterrupt;
Characteristics.InitializeHandler = Smsc9118Initialize;
Characteristics.ISRHandler = Smsc9118Isr;
Characteristics.QueryInformationHandler = Smsc9118QueryInformation;
Characteristics.ReconfigureHandler = NULL;
Characteristics.ResetHandler = Smsc9118Reset;
Characteristics.SendHandler = NULL;
Characteristics.SetInformationHandler = Smsc9118SetInformation;
Characteristics.TransferDataHandler = NULL;
Characteristics.ReturnPacketHandler = Smsc9118GetReturnedPackets;
Characteristics.SendPacketsHandler = Smsc9118SendPackets;
Characteristics.AllocateCompleteHandler = NULL;
Status = NdisMRegisterMiniport (gSmsc9118MiniportBlock.NdisWrapperHandle,
&Characteristics,
sizeof (Characteristics));
if (Status == NDIS_STATUS_SUCCESS)
{
SMSC_TRACE0(DBG_INIT, "NdisMRegisterMiniport OK.\r\n");
}
----------------------------------------
status = NdisMRegisterInterrupt (&(pAdapter->Interrupt),
pAdapter->hMiniportAdapterHandle,
(UINT)pAdapter->ucInterruptNumber,
(UINT)0xf,
(BOOLEAN)TRUE,
(BOOLEAN)TRUE,
NdisInterruptLatched);
if (status == NDIS_STATUS_SUCCESS)
{
SMSC_TRACE0(DBG_INIT," Interrupt Connected\r\n");
}