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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pc.c

?? 周立功LPC213X開發(fā)板光盤.rar
?? C
?? 第 1 頁 / 共 2 頁
字號:
{
//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
********************************************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区在线视频观看| 日韩毛片视频在线看| 一区二区三区欧美亚洲| 久久er99精品| 欧美视频在线一区| 国产精品国产三级国产普通话99 | 亚洲成av人片一区二区三区 | 亚洲成在线观看| 国产精品系列在线播放| 69久久99精品久久久久婷婷| 亚洲色欲色欲www| 国产精品亚洲视频| 日韩精品一区二区三区在线播放| 亚洲午夜精品在线| 91尤物视频在线观看| 国产欧美一区二区在线观看| 开心九九激情九九欧美日韩精美视频电影 | 亚洲欧美日韩一区二区| 高清在线不卡av| xfplay精品久久| 另类小说图片综合网| 91精品免费观看| 亚洲va天堂va国产va久| 欧美亚洲丝袜传媒另类| 亚洲黄色小视频| 91欧美一区二区| 中文字幕一区二区5566日韩| 国产a区久久久| 国产日韩三级在线| 国产一区免费电影| 久久综合狠狠综合久久激情 | 日韩激情一二三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 亚洲国产精品激情在线观看| 国产乱码一区二区三区| 26uuu精品一区二区三区四区在线| 美女视频黄 久久| 日韩一区二区三免费高清| 奇米影视一区二区三区小说| 欧美一区二区在线不卡| 日韩不卡在线观看日韩不卡视频| 欧美肥妇毛茸茸| 蜜臀av性久久久久蜜臀aⅴ流畅| 7777精品久久久大香线蕉| 日韩成人精品在线观看| 91精品国产综合久久久久久久| 日日摸夜夜添夜夜添亚洲女人| 在线不卡的av| 久久精品国产一区二区三 | 精品国产一区二区三区不卡| 久久精品国产99久久6| 亚洲国产精品一区二区久久| 欧美综合在线视频| 午夜影院在线观看欧美| 欧美夫妻性生活| 狠狠狠色丁香婷婷综合久久五月| 久久亚洲一区二区三区四区| 国产成a人无v码亚洲福利| 最新国产成人在线观看| 在线欧美日韩国产| 日韩在线一区二区三区| 日韩视频不卡中文| 国产精品一级黄| 亚洲日本欧美天堂| 91.com在线观看| 国产一区二区精品在线观看| 国产精品久久看| 欧美在线看片a免费观看| 免费人成在线不卡| 久久精品在线观看| 色综合久久久久网| 青青草97国产精品免费观看| 久久日一线二线三线suv| 97久久人人超碰| 日本中文字幕一区二区视频| 国产三级精品在线| 在线看日本不卡| 久久99热国产| 亚洲欧洲成人自拍| 538在线一区二区精品国产| 国产一区二区三区久久悠悠色av | 欧美一二三区在线观看| 国产福利不卡视频| 一区二区三区在线高清| 日韩三级.com| 成人app网站| 日本免费新一区视频| 国产精品美女久久久久久久久| 欧美性色黄大片手机版| 国模套图日韩精品一区二区| 亚洲视频一区二区在线| 欧美一区二区三区白人| 99久久免费国产| 免费黄网站欧美| 亚洲欧美一区二区在线观看| 日韩一级二级三级| 91蝌蚪porny| 久久成人18免费观看| 亚洲色欲色欲www| 精品国产成人系列| 91电影在线观看| 国产在线一区二区综合免费视频| 夜夜精品浪潮av一区二区三区| 精品国产91乱码一区二区三区 | 欧美精品三级日韩久久| 成人激情小说乱人伦| 美女在线观看视频一区二区| 亚洲另类中文字| 久久久久久综合| 91精品在线麻豆| 色综合久久久网| 国产成人精品综合在线观看 | 成人综合激情网| 人人爽香蕉精品| 亚洲视频免费在线| 久久久亚洲午夜电影| 欧美日韩成人综合| 99久久婷婷国产精品综合| 国产呦精品一区二区三区网站| 亚洲图片欧美色图| 国产精品传媒入口麻豆| 久久美女艺术照精彩视频福利播放| 欧美日韩精品综合在线| www.成人网.com| 国产一区二区三区电影在线观看 | 亚洲欧美日韩国产综合在线| 久久久亚洲精品石原莉奈| 69av一区二区三区| 欧美中文字幕不卡| 99精品视频中文字幕| 丁香六月综合激情| 久久精品国产免费看久久精品| 亚洲午夜国产一区99re久久| 成人免费一区二区三区在线观看| 久久久国际精品| 精品成人免费观看| 日韩视频永久免费| 欧美一区二区三区四区高清| 欧美日韩中文一区| 欧美亚州韩日在线看免费版国语版| 99精品在线观看视频| 成人av网站免费观看| 国产成人综合网| 国产九色sp调教91| 极品少妇xxxx偷拍精品少妇| 青青草原综合久久大伊人精品| 亚洲国产精品麻豆| 亚洲综合另类小说| 亚洲一区日韩精品中文字幕| 亚洲精品视频在线观看网站| 亚洲日本在线观看| 亚洲欧美二区三区| 亚洲欧洲另类国产综合| 专区另类欧美日韩| 亚洲欧美日韩在线| 一区二区三区免费网站| 一区二区三区高清在线| 亚洲主播在线播放| 亚洲1区2区3区4区| 五月天精品一区二区三区| 天使萌一区二区三区免费观看| 亚洲成人激情社区| 日韩专区一卡二卡| 麻豆国产91在线播放| 久久99精品久久久久久国产越南| 韩国女主播成人在线| 国产精品自在在线| 精品国产一区二区三区不卡 | 国产精品免费视频一区| 国产精品久久久久久久久果冻传媒| 欧美经典一区二区三区| 国产精品久久久久久久久晋中| 亚洲天堂av老司机| 亚洲国产精品一区二区久久恐怖片| 午夜不卡av免费| 美女www一区二区| 在线不卡a资源高清| 亚洲精品成人天堂一二三| 欧美一级欧美三级| 欧美va亚洲va在线观看蝴蝶网| 亚洲国产激情av| 亚洲无人区一区| 国产毛片一区二区| 日本精品免费观看高清观看| 99国产一区二区三精品乱码| 91久久精品一区二区三区| 欧美精品在线视频| 久久午夜国产精品| 成人性生交大片| 免费看欧美女人艹b| 亚洲一区二区精品久久av| 久久久精品中文字幕麻豆发布| 国产日韩在线不卡| 亚洲女与黑人做爰| 日韩经典一区二区| 成人深夜福利app| 欧美视频一区在线| 精品少妇一区二区三区视频免付费 | 国产馆精品极品| 久久精品av麻豆的观看方式|