我也顺便打个广告,本人也有支持ESRI ARCGIS的.shp文件的地图的Windows mobile 5.0/6.0手机GIS地图软件----移动GIS(MobileGIS),PC端的服务软件----移动GIS服务平台(MobileGISServer),可成套出售,可以完成以下功能:
1,通过GPRS上网连接后台服务端程序来实时传输在外工作的数据到后台数据库!
if (!CeSetThreadPriority(GetCurrentThread(),
pHCDevice->ControllerIstThreadPriority))
{ }
RETAILMSG(1, (TEXT("SDControl.c_SDControllerIstThread:go into while and WaitForSingleObject !\r\n")));
if (pHCDevice->DriverShutdown)
{
return 0;
}
// loop until all interrupts are serviced while (interrupts = GetMMCInterrupts(pHCDevice))
{
if (interrupts & MMC_IREG_TINT) {
// no one should be turning this on
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_DAT_ERR)
{
// no one should be turning this on
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_RES_ERR)
{
// no one should be turning this on
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_RD_STALLED)
{
// no one should be turning this on
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_SDIO_SUSPEND_ACK)
{
// no one should be turning this on
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_CLOCK_IS_OFF)
{
// no one should be turning this on
DEBUG_ASSERT(FALSE);
// mask the interrupt
CLOCK_OFF_INTERRUPT_OFF(pHCDevice);
}
if (interrupts & MMC_IREG_END_CMD)
{
handleEndCommandInterrupt(pHCDevice);
}
if (interrupts & MMC_IREG_STOP_CMD)
{
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_RXFIFO_REQ )
{
HandleReceiveInterrupt(pHCDevice);
}
if (interrupts & MMC_IREG_TXFIFO_REQ)
{
HandleXmitInterrupt(pHCDevice);
}
if (interrupts & MMC_IREG_PROG_DONE)
{
HandleProgramDone(pHCDevice);
}
// DATA transfer done should be checked last so that the
// HandleReceive and HandleTransmit
// have a chance to finish copying from the fifos if (interrupts & MMC_IREG_DATA_TRAN_DONE)
{
HandleTransferDone(pHCDevice);
}
if (interrupts & MMC_IREG_SDIO_INT)
{
HandleSDIOInterrupt(pHCDevice);
}
}
#if 0
if( pHCDevice->CurrentState == ReadDataTransfer )
{
if (!CLOCK_IS_ON(pHCDevice))
{
//DbgPrintZo(SDCARD_ZONE_WARN, (TEXT("CLOCK IS OFF during transfer!\n")));
SDClockOn(pHCDevice);
}
}
#endif
InterruptDone( SYSINTR_SDMMC);
}
// get the interrupt masks so we know which ones we don't care about
// the handlers will turn off (mask) interrupts
interruptMask = (~(READ_MMC_REGISTER_DWORD(pHCDevice, MMC_IMASK)))
& MMC_IREG_INTERRUPTS;
通过打印信息看出:程序一直在主线程SDControllerIstThread中的while中一直运行 DWORD SDControllerIstThread(PSDH_HARDWARE_CONTEXT pHCDevice)
{
DWORD waitStatus; // wait status
DWORD interrupts; // current interrupts
if (!CeSetThreadPriority(GetCurrentThread(),
pHCDevice->ControllerIstThreadPriority))
{
}
while(1)
{ RETAILMSG(1, (TEXT("SDControl.c_SDControllerIstThread:go into while and WaitForSingleObject !\r\n")));
waitStatus = WaitForSingleObject(pHCDevice->hControllerInterruptEvent, INFINITE);
if (pHCDevice->DriverShutdown)
{
return 0;
}
// loop until all interrupts are serviced
while (interrupts = GetMMCInterrupts(pHCDevice))
{
if (interrupts & MMC_IREG_TINT) {
// no one should be turning this on
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_DAT_ERR)
{
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_RES_ERR)
{ DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_RD_STALLED)
{
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_SDIO_SUSPEND_ACK)
{
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_CLOCK_IS_OFF)
{
DEBUG_ASSERT(FALSE);
// mask the interrupt
CLOCK_OFF_INTERRUPT_OFF(pHCDevice);
}
if (interrupts & MMC_IREG_END_CMD)
{
HandleEndCommandInterrupt(pHCDevice);
}
if (interrupts & MMC_IREG_STOP_CMD)
{
DEBUG_ASSERT(FALSE);
}
if (interrupts & MMC_IREG_RXFIFO_REQ )
{
//RETAILMSG(1, (TEXT("SDControl.c_SDControllerIstThread:MMC_IREG_RXFIFO_REQ\r\n")));
HandleReceiveInterrupt(pHCDevice);
}