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

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

?? pc.c

?? 在PROTEUS中使用ARM處理器及uC/OS-II移植理解
?? 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一区二区三区免费野_久草精品视频
亚洲欧美日韩一区二区| 国产一区二区三区美女| 亚洲欧洲综合另类在线| 国产精品久久三| 欧美极品aⅴ影院| 中文字幕一区二区日韩精品绯色| 青青草原综合久久大伊人精品 | 国产精品 欧美精品| 日韩精品亚洲专区| 亚洲成人一二三| 三级久久三级久久久| 日韩不卡在线观看日韩不卡视频| 亚洲成a人片在线不卡一二三区 | 色狠狠av一区二区三区| 日本视频一区二区三区| 天堂av在线一区| 免费高清视频精品| 国产在线播精品第三| 国产一区二区在线观看视频| 国产成人啪午夜精品网站男同| 懂色av一区二区三区蜜臀| 亚洲激情网站免费观看| 国产目拍亚洲精品99久久精品| 欧美一区二区在线观看| 欧美本精品男人aⅴ天堂| 久久久久久久久岛国免费| 中文在线资源观看网站视频免费不卡 | 国产不卡在线一区| 日本乱码高清不卡字幕| 狠狠色2019综合网| 高清久久久久久| 91在线一区二区三区| 欧美色倩网站大全免费| 欧美一级爆毛片| 欧美激情一区二区三区| 欧美日韩一二三区| 日韩精品一区二区三区老鸭窝| 久久新电视剧免费观看| 欧美国产日韩精品免费观看| 成人av网址在线| 日韩午夜激情视频| 欧美aaaaaa午夜精品| 一本色道久久综合狠狠躁的推荐| 国产乱妇无码大片在线观看| 免费看黄色91| 懂色中文一区二区在线播放| 91精品国产91久久综合桃花| 国产精品国产三级国产普通话99| 久久久亚洲午夜电影| 精品国产亚洲一区二区三区在线观看| 欧美一区二区三区不卡| 欧美人体做爰大胆视频| 欧美成人激情免费网| 亚洲欧美日韩在线不卡| 成人动漫一区二区在线| 日韩—二三区免费观看av| 欧美性生活大片视频| 九一九一国产精品| 亚洲欧美日韩国产另类专区| 91精品国产黑色紧身裤美女| 成人av先锋影音| 亚洲福利视频三区| 亚洲视频狠狠干| 欧美一区二区成人6969| av电影天堂一区二区在线| 国产亚洲短视频| eeuss鲁片一区二区三区在线观看| 久久午夜免费电影| 国产成人精品一区二区三区网站观看| 精品国产三级电影在线观看| 成人天堂资源www在线| 久久美女高清视频| 国产乱人伦精品一区二区在线观看| 欧美日韩一区在线观看| 日本亚洲免费观看| 日韩亚洲欧美在线观看| 免费人成在线不卡| 国产三区在线成人av| 国产一级精品在线| 欧美成人一区二区| 自拍偷拍亚洲综合| 美女精品一区二区| 91精品国产乱码久久蜜臀| 国产精品国模大尺度视频| 午夜欧美一区二区三区在线播放| 黑人精品欧美一区二区蜜桃| 日韩三级精品电影久久久| 国产揄拍国内精品对白| 亚洲天堂福利av| 亚洲成人在线网站| 91精品国产综合久久福利| 成人sese在线| 国产成人鲁色资源国产91色综| 日韩和欧美的一区| 中文字幕人成不卡一区| 国产欧美一区二区精品性色| 久久亚洲一区二区三区四区| 日韩欧美自拍偷拍| 4438亚洲最大| 欧美高清视频www夜色资源网| 国产91丝袜在线18| 免费成人美女在线观看.| 亚洲视频一二区| 欧美国产成人在线| 国产精品第一页第二页第三页| 日韩午夜在线观看视频| 欧美美女激情18p| 成人性生交大片| 亚洲一区在线电影| 1024成人网| 亚洲在线视频免费观看| 日本高清免费不卡视频| 青青国产91久久久久久| 天堂蜜桃一区二区三区| 日本一区二区三区在线不卡| 99re6这里只有精品视频在线观看| 亚洲一卡二卡三卡四卡无卡久久| 91麻豆精品国产综合久久久久久 | 欧美激情综合五月色丁香小说| 777奇米四色成人影色区| 欧美日韩亚洲不卡| 亚洲精品在线一区二区| 亚洲制服丝袜av| 国产在线精品一区二区三区不卡| 99这里都是精品| 日韩一区二区三区在线| 国产精品久久看| 强制捆绑调教一区二区| 国产.欧美.日韩| 欧美日韩国产影片| 欧美日韩一区国产| 欧美一级搡bbbb搡bbbb| 欧美一区二区成人| 精品欧美黑人一区二区三区| 日本一区二区高清| 一区二区三区波多野结衣在线观看| 专区另类欧美日韩| 亚洲人成亚洲人成在线观看图片| 天天av天天翘天天综合网色鬼国产 | 欧洲中文字幕精品| 三级不卡在线观看| 国产校园另类小说区| 色又黄又爽网站www久久| 日韩精品一卡二卡三卡四卡无卡| 国产午夜精品一区二区| 在线影视一区二区三区| 麻豆91精品视频| 1024成人网| 欧美大片一区二区| 97精品国产露脸对白| 日韩中文字幕一区二区三区| 久久久精品国产免费观看同学| 91农村精品一区二区在线| 美脚の诱脚舐め脚责91| 亚洲日本免费电影| 日韩三级精品电影久久久| 91麻豆成人久久精品二区三区| 亚洲小说欧美激情另类| 国产午夜久久久久| 91精品婷婷国产综合久久性色| 成人18视频日本| 美女国产一区二区| 亚洲一区二三区| 国产色91在线| 日韩精品一区二区在线| 色就色 综合激情| 国产精品99久久久久久久vr| 欧美国产1区2区| 日韩美女视频一区二区在线观看| 91免费看`日韩一区二区| 麻豆精品国产91久久久久久| 一区二区三区丝袜| 久久先锋资源网| 日韩一区二区在线播放| 在线精品视频免费播放| 大胆欧美人体老妇| 久久精品99国产精品| 亚洲高清久久久| 国产精品欧美一级免费| 亚洲精品一区二区三区影院| 欧美日本韩国一区二区三区视频| a亚洲天堂av| 国产激情视频一区二区三区欧美 | 精品一区二区三区免费观看| 亚洲国产欧美在线人成| 国产精品电影一区二区三区| 国产视频一区在线播放| 2021国产精品久久精品| 91精品国产黑色紧身裤美女| 欧美日韩一二三| 在线日韩一区二区| 色婷婷综合视频在线观看| 成人黄色一级视频| 国产电影精品久久禁18| 国产中文字幕精品| 久久99日本精品| 美女视频黄 久久| 天天av天天翘天天综合网色鬼国产| 亚洲综合清纯丝袜自拍| 一区二区三区精品|