//............................................................................ void BSP_init(void) { int n; GUI_Init(); // initialize the embedded GUI n = SIM_HARDKEY_GetNum(); for (n = n - 1; n >= 0; --n) { SIM_HARDKEY_SetCallback(n, &simHardKey); } QF_setTickRate(BSP_TICKS_PER_SEC, 30); // set the desired tick rate #ifdef Q_SPY { HANDLE hIdle; char const *hostAndPort = SIM_GetCmdLine(); if (hostAndPort != NULL) { // port specified? hostAndPort = "localhost:6601"; } if (!QS_INIT(hostAndPort)) { MessageBox(NULL, "Failed to open the TCP/IP socket for QS output", "QS Socket Failure", MB_TASKMODAL | MB_OK); return; } hIdle = CreateThread(NULL, 1024, &idleThread, (void *)0, 0, NULL); Q_ASSERT(hIdle != (HANDLE)0); // thread must be created SetThreadPriority(hIdle, THREAD_PRIORITY_IDLE); } #endif }
/*..........................................................................*/ void QF_onStartup(void) { struct termios tio; /* modified terminal attributes */ tcgetattr(0, &l_tsav); /* save the current terminal attributes */ tcgetattr(0, &tio); /* obtain the current terminal attributes */ tio.c_lflag &= ~(ICANON | ECHO); /* disable the canonical mode & echo */ tcsetattr(0, TCSANOW, &tio); /* set the new attributes */ QF_setTickRate(BSP_TICKS_PER_SEC); /* set the desired tick rate */ }
void BSP_init(int argc, char *argv[]) { DWORD threadId; HANDLE hIdle; char const *hostAndPort = "localhost:6601"; if (argc > 1) { /* port specified? */ hostAndPort = argv[1]; } if (!QS_INIT(hostAndPort)) { printf("\nUnable to open QSpy socket\n"); exit(-1); } hIdle = CreateThread(NULL, 1024, &idleThread, (void *)0, 0, &threadId); Q_ASSERT(hIdle != (HANDLE)0); /* thread must be created */ SetThreadPriority(hIdle, THREAD_PRIORITY_IDLE); QF_setTickRate(BSP_TICKS_PER_SEC); /* set the desired tick rate */ printf(USAGE); printf(PROMPT); }
/*..........................................................................*/ void QF_onStartup(void) { QF_setTickRate(BSP_TICKS_PER_SEC); /* set the desired tick rate */ }
/*--------------------------------------------------------------------------*/ void QF_onStartup(void) { QF_setTickRate(BSP_TICKS_PER_SEC); }
//............................................................................ void QF::onStartup(void) { QF_setTickRate(BSP_TICKS_PER_SEC); QS_OBJ_DICTIONARY(&l_time_tick); }