亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? pc.c

?? arm lpc2000 應(yīng)用歷程 arm lpc2000 應(yīng)用歷程
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
{
//change by cmj
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    


//    PC_ExitFlag  = FALSE;                                  /* Indicate that we are not exiting yet!    */
//    OSTickDOSCtr =     1;                                  /* Initialize the DOS tick counter          */
//    PC_TickISR   = PC_VectGet(VECT_TICK);                  /* Get MS-DOS's tick vector                 */
    
//    PC_VectSet(VECT_DOS_CHAIN, PC_TickISR);                /* Store MS-DOS's tick to chain             */
    
//    setjmp(PC_JumpBuf);                                    /* Capture where we are in DOS              */
//    if (PC_ExitFlag == TRUE) {                             /* See if we are exiting back to DOS        */
//        OS_ENTER_CRITICAL();
//        PC_SetTickRate(18);                                /* Restore tick rate to 18.2 Hz             */
//        OS_EXIT_CRITICAL();
//        PC_VectSet(VECT_TICK, PC_TickISR);                 /* Restore DOS's tick vector                */
//        PC_DispClrScr(DISP_FGND_WHITE + DISP_BGND_BLACK);  /* Clear the display                        */
//        exit(0);                                           /* Return to DOS                            */
//    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                       ELAPSED TIME INITIALIZATION
*
* Description : This function initialize the elapsed time module by determining how long the START and
*               STOP functions take to execute.  In other words, this function calibrates this module
*               to account for the processing time of the START and STOP functions.
*
* Arguments   : None.
*
* Returns     : None.
*********************************************************************************************************
*/
void PC_ElapsedInit(void)
{
    PC_ElapsedOverhead = 0;
    PC_ElapsedStart();
    PC_ElapsedOverhead = PC_ElapsedStop();
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                         INITIALIZE PC'S TIMER #2
*
* Description : This function initialize the PC's Timer #2 to be used to measure the time between events.
*               Timer #2 will be running when the function returns.
*
* Arguments   : None.
*
* Returns     : None.
*********************************************************************************************************
*/
//change by cmj
        void PC_ElapsedStart(void)
{
    PC_ElapsedOverhead = T0TC;
}

//void PC_ElapsedStart(void)
//{
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    
//    INT8U      data;


//    OS_ENTER_CRITICAL();
//    data  = (INT8U)inp(0x61);                              /* Disable timer #2                         */
//    data &= 0xFE;
//    outp(0x61, data);
//    outp(TICK_T0_8254_CWR,  TICK_T0_8254_CTR2_MODE0);      /* Program timer #2 for Mode 0              */
//    outp(TICK_T0_8254_CTR2, 0xFF);
//    outp(TICK_T0_8254_CTR2, 0xFF);
//    data |= 0x01;                                          /* Start the timer                          */
//    outp(0x61, data);
//    OS_EXIT_CRITICAL();
//}
/*$PAGE*/
/*
*********************************************************************************************************
*                                 STOP THE PC'S TIMER #2 AND GET ELAPSED TIME
*
* Description : This function stops the PC's Timer #2, obtains the elapsed counts from when it was
*               started and converts the elapsed counts to micro-seconds.
*
* Arguments   : None.
*
* Returns     : The number of micro-seconds since the timer was last started.
*
* Notes       : - The returned time accounts for the processing time of the START and STOP functions.
*               - 54926 represents 54926S-16 or, 0.838097 which is used to convert timer counts to
*                 micro-seconds.  The clock source for the PC's timer #2 is 1.19318 MHz (or 0.838097 uS)
*********************************************************************************************************
*/
//change by cmj
        INT16U PC_ElapsedStop(void)
{
    return ((T0TC - PC_ElapsedOverhead) / (Fpclk / 1000000));
}

//INT16U PC_ElapsedStop(void)
//{
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    
//    INT8U      data;
//    INT8U      low;
//    INT8U      high;
//    INT16U     cnts;


//    OS_ENTER_CRITICAL();
//    data  = (INT8U)inp(0x61);                                    /* Disable the timer                  */
//    data &= 0xFE;
//    outp(0x61, data);
//    outp(TICK_T0_8254_CWR, TICK_T0_8254_CTR2_LATCH);             /* Latch the timer value              */
//    low  = inp(TICK_T0_8254_CTR2);
//    high = inp(TICK_T0_8254_CTR2);
//    cnts = (INT16U)0xFFFF - (((INT16U)high << 8) + (INT16U)low); /* Compute time it took for operation */
//    OS_EXIT_CRITICAL();
//    return ((INT16U)((INT32U)cnts * 54926L >> 16) - PC_ElapsedOverhead);
//}
/*$PAGE*/
/*
*********************************************************************************************************
*                                       GET THE CURRENT DATE AND TIME
*
* Description: This function obtains the current date and time from the PC.
*
* Arguments  : s     is a pointer to where the ASCII string of the current date and time will be stored.
*                    You must allocate at least 21 bytes (includes the NUL) of storage in the return 
*                    string.  The date and time will be formatted as follows:
*
*                        "YYYY-MM-DD  HH:MM:SS"
*
* Returns    : none
*********************************************************************************************************
*/
//change by cmj
        void PC_GetDateTime (char *s)
{
    INT32U da_year,da_mon,da_day,ti_hour,ti_min,ti_sec;
    

    ti_sec = SEC;
    ti_min = MIN;
    ti_hour = HOUR;
    da_day = DOM;
    da_mon = MONTH;
    da_year = YEAR;

    sprintf(s, "%04d-%02d-%02d  %02d:%02d:%02d",
               da_year,da_mon,da_day,ti_hour,ti_min,ti_sec);
}

//void PC_GetDateTime (char *s)
//{
//    struct time now;
//    struct date today;


//    gettime(&now);
//    getdate(&today);
//    sprintf(s, "%04d-%02d-%02d  %02d:%02d:%02d",
//               today.da_year,
//               today.da_mon,
//               today.da_day,
//               now.ti_hour,
//               now.ti_min,
//               now.ti_sec);
//}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        CHECK AND GET KEYBOARD KEY
*
* Description: This function checks to see if a key has been pressed at the keyboard and returns TRUE if
*              so.  Also, if a key is pressed, the key is read and copied where the argument is pointing
*              to.
*
* Arguments  : c     is a pointer to where the read key will be stored.
*
* Returns    : TRUE  if a key was pressed
*              FALSE otherwise
*********************************************************************************************************
*/
//change by cmj
    BOOLEAN PC_GetKey (INT16S *c)
{
    if ((U0LSR & 0x00000001) != 0)
    {
        *c = U0RBR;
        return (TRUE);
    }
    else
    {
        *c = 0x00;
        return (FALSE);
    }
}

//BOOLEAN PC_GetKey (INT16S *c)
//{
//    if (kbhit()) {                                         /* See if a key has been pressed            */
//        *c = (INT16S)getch();                              /* Get key pressed                          */
//        return (TRUE);
//    } else {
//        *c = 0x00;                                         /* No key pressed                           */
//        return (FALSE);
//    }
//}
/*$PAGE*/
/*
*********************************************************************************************************
*                                      SET THE PC'S TICK FREQUENCY
*
* Description: This function is called to change the tick rate of a PC.
*
* Arguments  : freq      is the desired frequency of the ticker (in Hz)
*
* Returns    : none
*
* Notes      : 1) The magic number 2386360 is actually twice the input frequency of the 8254 chip which
*                 is always 1.193180 MHz.
*              2) The equation computes the counts needed to load into the 8254.  The strange equation
*                 is actually used to round the number using integer arithmetic.  This is equivalent to
*                 the floating point equation:
*
*                             1193180.0 Hz
*                     count = ------------ + 0.5
*                                 freq
*********************************************************************************************************
*/
//del by cmj
//void PC_SetTickRate (INT16U freq)
//{
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    
//    INT16U     count;


//    if (freq == 18) {                            /* See if we need to restore the DOS frequency        */
//        count = 0;
//    } else if (freq > 0) {                        
                                                 /* Compute 8254 counts for desired frequency and ...  */
                                                 /* ... round to nearest count                         */
//        count = (INT16U)(((INT32U)2386360L / freq + 1) >> 1); 
//    } else {
//        count = 0;
//    }
//    OS_ENTER_CRITICAL();
//    outp(TICK_T0_8254_CWR,  TICK_T0_8254_CTR0_MODE3); /* Load the 8254 with desired frequency          */  
//    outp(TICK_T0_8254_CTR0, count & 0xFF);            /* Low  byte                                     */
//    outp(TICK_T0_8254_CTR0, (count >> 8) & 0xFF);     /* High byte                                     */
//    OS_EXIT_CRITICAL();
//}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        OBTAIN INTERRUPT VECTOR
*
* Description: This function reads the pointer stored at the specified vector.
*
* Arguments  : vect  is the desired interrupt vector number, a number between 0 and 255.
*
* Returns    : The address of the Interrupt handler stored at the desired vector location.
*********************************************************************************************************
*/
//del by cmj
//void *PC_VectGet (INT8U vect)
//{
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    
//    INT16U    *pvect;
//    INT16U     off;
//    INT16U     seg;
    
    
//    pvect = (INT16U *)MK_FP(0x0000, vect * 4);        /* Point into IVT at desired vector location     */
//    OS_ENTER_CRITICAL();
//    off   = *pvect++;                                 /* Obtain the vector's OFFSET                    */
//    seg   = *pvect;                                   /* Obtain the vector's SEGMENT                   */
//    OS_EXIT_CRITICAL();
//    return (MK_FP(seg, off));
//}

/*
*********************************************************************************************************
*                                        INSTALL INTERRUPT VECTOR
*
* Description: This function sets an interrupt vector in the interrupt vector table.
*
* Arguments  : vect  is the desired interrupt vector number, a number between 0 and 255.
*              isr   is a pointer to a function to execute when the interrupt or exception occurs.
*
* Returns    : none
*********************************************************************************************************
*/
//del by cmj
//void PC_VectSet (INT8U vect, void (*isr)(void))
//{
//#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
//    OS_CPU_SR  cpu_sr;
//#endif    
//    INT16U    *pvect;
    
    
//    pvect    = (INT16U *)MK_FP(0x0000, vect * 4);     /* Point into IVT at desired vector location     */
//    OS_ENTER_CRITICAL();
//    *pvect++ = (INT16U)FP_OFF(isr);                   /* Store ISR offset                              */
//    *pvect   = (INT16U)FP_SEG(isr);                   /* Store ISR segment                             */
//    OS_EXIT_CRITICAL();
//}


//add by cmj
        INT8U random(INT8U seed)
{
    uint16 temp;

    temp = rand();
    temp = temp % seed;
	return temp;
}

/*********************************************************************************************************
**                            End Of File
********************************************************************************************************/

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品国产| 亚洲福利视频一区二区| 日韩视频一区在线观看| 国产精品一级片在线观看| 日本大胆欧美人术艺术动态| 五月综合激情日本mⅴ| 一个色在线综合| 一个色在线综合| 亚洲一区国产视频| 性做久久久久久久免费看| 亚洲成人www| 蜜臀av性久久久久蜜臀aⅴ四虎| 日韩高清不卡一区二区| 日本不卡视频在线| 国产一区美女在线| 国产福利91精品一区二区三区| 粉嫩aⅴ一区二区三区四区| 99久久免费精品| 在线视频一区二区三| 欧美日韩在线综合| 欧美一区二区日韩| 久久久精品人体av艺术| 国产精品不卡一区| 夜夜揉揉日日人人青青一国产精品 | 欧美精品123区| 日韩一区二区视频| 久久日韩粉嫩一区二区三区| 国产清纯美女被跳蛋高潮一区二区久久w | 免费人成黄页网站在线一区二区| 国产激情视频一区二区三区欧美 | 不卡在线观看av| 日韩欧美一区在线观看| 久久综合视频网| 久久不见久久见中文字幕免费| 91精品国产综合久久久久久| 婷婷国产在线综合| 91在线国产福利| 亚洲日本va在线观看| 丁香婷婷深情五月亚洲| 欧美午夜片在线看| 日韩欧美黄色影院| 亚洲资源中文字幕| 国产黄人亚洲片| 99久免费精品视频在线观看| 欧美视频在线播放| 久久久综合网站| 亚洲精品美腿丝袜| 欧美国产国产综合| 国产精品国产自产拍在线| 一区二区免费视频| 久久精品国产亚洲高清剧情介绍| 国产aⅴ综合色| 欧美老年两性高潮| 国产拍揄自揄精品视频麻豆| 亚洲国产综合人成综合网站| 国产一区二区女| 在线一区二区三区做爰视频网站| 日韩精品一区二区三区蜜臀| 亚洲视频你懂的| 麻豆精品视频在线观看免费| 99久久精品国产观看| 欧美成人vr18sexvr| 一区二区三区在线视频观看| 国产一区二区三区| 欧美日韩亚洲不卡| 亚洲同性同志一二三专区| 蜜桃精品视频在线| 91同城在线观看| 久久久综合激的五月天| 亚洲国产欧美一区二区三区丁香婷| 国产精品亚洲第一| 欧美高清一级片在线| 17c精品麻豆一区二区免费| 精品亚洲成av人在线观看| 91福利精品视频| 中文字幕不卡在线播放| 久久疯狂做爰流白浆xx| 亚洲国产日韩一级| 精品国产一区二区三区忘忧草| 亚洲线精品一区二区三区八戒| 国产一区二区三区观看| 欧美日韩中文一区| 日本欧美肥老太交大片| 日韩视频一区二区三区| 日韩精品一区二区三区三区免费 | 在线一区二区三区| 韩国欧美国产1区| 视频一区中文字幕国产| 亚洲精品少妇30p| 亚洲日韩欧美一区二区在线| 欧美国产综合色视频| 97se狠狠狠综合亚洲狠狠| 亚洲福利一区二区| 欧美一区二区三区系列电影| 9l国产精品久久久久麻豆| 五月天亚洲精品| 精品久久久网站| 99久精品国产| 美女一区二区三区在线观看| 欧美激情中文字幕| 99久久久精品免费观看国产蜜| 一区二区三区在线高清| 亚洲欧美一区二区视频| 99久久亚洲一区二区三区青草 | 欧美日韩国产大片| 国产成人精品综合在线观看| 亚洲国产成人va在线观看天堂| 精品精品欲导航| 精品视频一区二区三区免费| 91免费版在线看| av激情亚洲男人天堂| 日韩黄色免费电影| 久久久久久久久一| 国产一区二区三区免费| 国产精品毛片久久久久久久| 欧美一区二区在线看| 日本久久电影网| 色综合久久天天| 91精品国产福利| 欧美一区二区三区在| 久久免费精品国产久精品久久久久| 国产欧美日韩不卡免费| 亚洲精品高清在线| 久久精品99国产精品| www.在线欧美| 精品国产乱码久久久久久影片| 久久网站最新地址| 欧美一级日韩不卡播放免费| 欧美日本在线播放| 欧美色电影在线| 欧美日韩在线播放三区四区| 色综合久久久久综合99| av亚洲产国偷v产偷v自拍| 91免费观看国产| 91蝌蚪国产九色| 欧美日韩免费观看一区三区| 91在线观看污| 99久久国产免费看| 精品久久久久久亚洲综合网| 欧美一区二区三区免费视频 | 精品在线一区二区三区| 亚洲不卡在线观看| 日韩中文欧美在线| 国产综合成人久久大片91| 欧美人伦禁忌dvd放荡欲情| 国产精品第13页| 亚洲成在人线免费| 老司机午夜精品| 成人app网站| 欧美日韩免费电影| 久久精品人人做| 亚洲宅男天堂在线观看无病毒| 日韩av成人高清| 丰满少妇久久久久久久| 欧美影视一区二区三区| 久久亚洲一区二区三区明星换脸 | 日韩一区欧美一区| 日韩国产精品久久| 成人黄色免费短视频| 91精品麻豆日日躁夜夜躁| 国产精品久久夜| 久久99精品一区二区三区三区| 成人美女在线观看| 欧美一级高清片| 亚洲精品va在线观看| 精品一区二区三区免费播放| 一本到三区不卡视频| 精品国产1区2区3区| 亚洲成a人v欧美综合天堂| 成人免费视频播放| 日韩欧美激情在线| 国产日韩av一区| 久久99精品久久久久久久久久久久| 91亚洲精华国产精华精华液| 精品国产精品一区二区夜夜嗨| 五月天激情小说综合| 91污在线观看| 亚洲青青青在线视频| 不卡电影免费在线播放一区| 久久精品日产第一区二区三区高清版| 日本怡春院一区二区| 欧美久久免费观看| 亚洲国产一区视频| 7777精品伊人久久久大香线蕉完整版 | 欧美mv日韩mv| 久久91精品国产91久久小草| 欧美精品粉嫩高潮一区二区| 午夜伦欧美伦电影理论片| 欧美日本韩国一区| 午夜精品福利一区二区三区蜜桃| 色播五月激情综合网| 亚洲免费观看高清完整版在线观看 | 欧洲激情一区二区| 亚洲综合色视频| 欧美日韩激情一区二区| 奇米一区二区三区| 久久久不卡网国产精品二区 | 精品国产乱码久久久久久浪潮| 国产成人精品免费一区二区| 中文字幕人成不卡一区|