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

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

?? os_viewc.c

?? ucos2 is a file system for embedded applications which can be used on any media, for which you can p
?? C
字號:
/*
*********************************************************************************************************
*                                               uC/OS-View
*
*                                 (c) Copyright 2005, Micrium, Weston, FL
*                                           All Rights Reserved
*
*                                            NXP LPC2000 (ARM7)
*                                             IAR C Compiler
*
*
* Filename   : OS_VIEWc.C
* Version    : V1.20
* Programmer : Jean J. Labrosse
*********************************************************************************************************
*/

#include <includes.h>

/*
*********************************************************************************************************
*                                              CONSTANTS
*********************************************************************************************************
*/

#define  BIT0      0x01
#define  BIT1      0x02
#define  BIT2      0x04
#define  BIT3      0x08
#define  BIT4      0x10
#define  BIT5      0x20
#define  BIT6      0x40
#define  BIT7      0x80

/*$PAGE*/
/*
*********************************************************************************************************
*                                           EXIT uC/OS-View
*
* Description: This function is called if your target needs to 'uninstall' uC/OS-View.
*
* Note(s)    :
*********************************************************************************************************
*/

void  OSView_Exit (void)
{
}

/*
*********************************************************************************************************
*                                           Obtain CPU name
*********************************************************************************************************
*/

void  OSView_GetCPUName (INT8U *s)
{
    INT8U  cpu_clk_freq;


    cpu_clk_freq = (INT8U)(BSP_CPU_ClkFreq() / 1000000L);
    (void)OS_StrCopy(s, "NXP LPC2000 (xx MHz)");
    s[13] = cpu_clk_freq / 10 + '0';
    s[14] = cpu_clk_freq % 10 + '0';
}

/*
*********************************************************************************************************
*                                  Obtain Interrupt Stack information
*********************************************************************************************************
*/

INT32U  OSView_GetIntStkBase (void)
{
    return (0);                                       /* We are not using an ISR stack                 */
}


INT32U  OSView_GetIntStkSize (void)
{
    return (0);                                       /* We are not using an ISR stack                 */
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                    INITIALISE uC/OS-View COM PORT
*
* Description: Initialize the hardware required for the OS to run. This will work on any target hardware,
*              but may have to be tailored a little (regarding the clock frequency). Of course the same
*              holds true if for some reason you choose to use another timer.
*
* Note(s)    : 1) This function assumes that a free running timer has been initialized.  The timer can
*                 either be a 16 bits or 32 bits timer.  Your application needs to provide a function
*                 called OSView_TmrRd() that reads the current counts of this timer.  The free running
*                 timer is initialized by the BSP function OSView_TmrInit().
*********************************************************************************************************
*/

void  OSView_InitTarget (INT32U baud_rate)
{
    INT16U     div;                                      /* Baud rate divisor                          */
    INT8U      divlo;
    INT8U      divhi;
    INT8U      lcr;										 /* Line Control Register                      */
    INT32U     pinsel;
    INT32U     pclk_freq;
#if OS_CRITICAL_METHOD == 3                              /* Allocate storage for CPU status register   */
    OS_CPU_SR  cpu_sr   = 0;
#endif


    OSView_TmrInit();                                    /* Initialize the free running timer          */

                                                         /* Compute divisor for desired baud rate      */
    pclk_freq = BSP_CPU_PclkFreq();
    div       = (INT16U)(((2 * pclk_freq / 16 / baud_rate) + 1) / 2);
    divlo     =  div & 0x00FF;                          /* Split divisor into LOW and HIGH bytes      */
    divhi     = (div >> 8) & 0x00FF;
    lcr       = 0x03;                                   /* 8 Bits, 1 Stop, No Parity                  */

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_0
    OS_ENTER_CRITICAL();
	pinsel              = PINSEL0;					     /* Enable UART0 I/Os                          */
	pinsel             &= 0xFFFFFFF0;
	pinsel             |= 0x00000005;
    PINSEL0             = pinsel;
    U0LCR               = BIT7;                          /* Set divisor access bit                     */
    U0DLL               = divlo;                         /* Load divisor                               */
    U0DLM               = divhi;
    U0LCR               = lcr;                           /* Set line control register (Bit 8 is 0)     */
    U0IER               = 0x00;                          /* Disable both Rx and Tx interrupts          */
    U0FCR               = 0x01;                          /* Enable FIFO, flush Rx & Tx                 */
    OS_EXIT_CRITICAL();
                                                         /* VIC UART #0 Initialization                 */
    VICIntSelect       &= ~(1 << VIC_UART0);             /* Enable interrupts                          */
    VICVectAddr15       = (INT32U)OSView_RxTxISRHandler; /* Set the vector address                     */
    VICVectCntl15       = 0x20 | VIC_UART0;              /* Enable vectored interrupts                 */
    VICIntEnable        =  (1 << VIC_UART0);             /* Enable Interrupts                          */
#endif

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_1
    OS_ENTER_CRITICAL();
	pinsel              = PINSEL0;						 /* Enable UART1 I/Os                          */
	pinsel             &= 0xFFF0FFFF;
	pinsel             |= 0x00050000;
    PINSEL0             = pinsel;
    U1LCR               = BIT7;                          /* Set divisor access bit                     */
    U1DLL               = divlo;                         /* Load divisor                               */
    U1DLM               = divhi;
    U1LCR               = lcr;                           /* Set line control register (Bit 8 is 0)     */
    U1IER               = 0x00;                          /* Disable both Rx and Tx interrupts          */
    U1FCR               = 0x01;                          /* Enable FIFO, flush Rx & Tx                 */
    OS_EXIT_CRITICAL();
                                                         /* VIC UART #1 Initialization                 */
    VICIntSelect       &= ~(1 << VIC_UART1);             /* Enable interrupts                          */
    VICVectAddr15       = (INT32U)OSView_RxTxISRHandler; /* Set the vector address                     */
    VICVectCntl15       = 0x20 | VIC_UART1;              /* Enable vectored interrupts                 */
    VICIntEnable        =  (1 << VIC_UART1);             /* Enable Interrupts                          */
#endif
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                       Disable Rx Interrupts
*********************************************************************************************************
*/

void  OSView_RxIntDis (void)
{
#if OS_VIEW_COMM_SEL == OS_VIEW_UART_0
    U0IER = 0;
#endif

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_1
    U1IER = 0;
#endif
}

/*
*********************************************************************************************************
*                                       Enable Rx Interrupts
*********************************************************************************************************
*/

void  OSView_RxIntEn (void)
{
#if OS_VIEW_COMM_SEL == OS_VIEW_UART_0
    U0IER = BIT0;
#endif

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_1
    U1IER = BIT0;
#endif
}

/*
*********************************************************************************************************
*                                 Rx Communication handler for uC/OS-View
*
* Description: This function is called by OSView_RxISR (see OS_VIEWa.ASM) to process a received
*              character interrupt.
*
* Note(s)    : This adaptation of uC/OS-View assumes that a 'combined' interrupt is generated by the UART
*              and thus this function is not needed.
*********************************************************************************************************
*/

void  OSView_RxISRHandler (void)
{
}

/*
*********************************************************************************************************
*                                Rx/Tx Communication handler for uC/OS-View
*
* Description: This function is NOT called because the M16C has a separate Rx and Tx ISR.
*********************************************************************************************************
*/

void  OSView_RxTxISRHandler (void)
{
    volatile  INT8U  rx_data;
    volatile  INT8U  lsr;
    volatile  INT8U  iir;



#if OS_VIEW_COMM_SEL == OS_VIEW_UART_0
    iir = U0IIR & 0x0F;
    while (iir != 1) {
        switch (iir) {
            case  0:                                   /* Modem interrupt?                             */
                 break;

            case  2:                                   /* Transmitted character?                       */
                 OSView_TxHandler();
                 break;

            case  4:                                   /* Received a character?                        */
                 lsr     = U0LSR;
                 rx_data = U0RBR;
                 OSView_RxHandler(rx_data);            /* Call the generic Rx handler                  */
                 break;

            case  6:                                   /* Receive Line Status interrupt?               */
                 break;

            case 12:                                   /* CTI interrupt?                               */
                 break;
        }
        iir = U0IIR & 0x0F;
    }
#endif

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_1
    iir = U1IIR & 0x0F;
    while (iir != 1) {
        switch (iir) {
            case  0:                                   /* Modem interrupt?                             */
                 break;

            case  2:                                   /* Transmitted character?                       */
                 OSView_TxHandler();
                 break;

            case  4:                                   /* Received a character?                        */
                 lsr     = U1LSR;
                 rx_data = U1RBR;
                 OSView_RxHandler(rx_data);            /* Call the generic Rx handler                  */
                 break;

            case  6:                                   /* Receive Line Status interrupt?               */
                 break;

            case 12:                                   /* CTI interrupt?                               */
                 break;
        }
        iir = U1IIR & 0x0F;
    }
#endif

    VICVectAddr = 0x00000000L;                         /* Clear the vector address register            */
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                      Communication for uC/OS-View
*
* Description: Send 1 character to COM Port
*********************************************************************************************************
*/

void  OSView_Tx1 (INT8U c)
{
#if OS_VIEW_COMM_SEL == OS_VIEW_UART_0
    U0THR = c;
#endif

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_1
    U1THR = c;
#endif
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                       Disable Tx Interrupts
*********************************************************************************************************
*/

void  OSView_TxIntDis (void)
{
#if OS_VIEW_COMM_SEL == OS_VIEW_UART_0
    U0IER = BIT0;                                /* Just enable the receive interrupts                 */
#endif

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_1
    U1IER = BIT0;                                /* Just enable the receive interrupts                 */
#endif
}

/*
*********************************************************************************************************
*                                       Enable Tx Interrupts
*********************************************************************************************************
*/

void  OSView_TxIntEn (void)
{
#if OS_VIEW_COMM_SEL == OS_VIEW_UART_0
    U0IER = BIT1 | BIT0;
#endif

#if OS_VIEW_COMM_SEL == OS_VIEW_UART_1
    U1IER = BIT1 | BIT0;
#endif
}

/*
*********************************************************************************************************
*                                 Tx Communication handler for uC/OS-View
*                                            (PORT SPECIFIC)
*
* Description: Handle transmission of a character
*
* Note(s)    : 1) This function is called by OSView_RxISR (see OS_VIEWa.ASM)
*              2) This adaptation of uC/OS-View assumes that a 'combined' interrupt is generated by the
*                 UART and thus this function is not needed.
*********************************************************************************************************
*/

void  OSView_TxISRHandler (void)
{
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷综合五月天| 色婷婷国产精品| 在线视频欧美区| 欧美不卡视频一区| 亚洲中国最大av网站| 国产jizzjizz一区二区| 欧美精品第1页| 亚洲免费av高清| 高清视频一区二区| 日韩限制级电影在线观看| 亚洲精品欧美激情| 色老综合老女人久久久| 欧美国产激情一区二区三区蜜月| 五月天网站亚洲| 色婷婷激情综合| 国产精品久久久久久久久免费樱桃 | 欧美视频中文字幕| 国产精品欧美一级免费| 国产麻豆成人传媒免费观看| 欧美一激情一区二区三区| 亚洲午夜免费电影| 91国偷自产一区二区开放时间| 国产午夜精品在线观看| 激情图片小说一区| 日韩美女视频在线| 欧美aaaaa成人免费观看视频| 欧美视频在线一区二区三区| 一区二区在线观看视频| 91在线一区二区三区| 国产女同性恋一区二区| 国产成人精品亚洲777人妖| 欧美哺乳videos| 久久精品国产亚洲一区二区三区| 宅男噜噜噜66一区二区66| 午夜电影网亚洲视频| 欧美日韩一区二区三区在线| 亚洲精品美腿丝袜| 在线观看国产日韩| 亚洲成国产人片在线观看| 欧美日韩一区二区欧美激情| 亚洲国产视频a| 在线不卡一区二区| 男女性色大片免费观看一区二区 | 国产精品18久久久久久久久| 久久精品欧美一区二区三区不卡| 国产成人亚洲综合色影视| 国产精品天干天干在观线| 97久久超碰国产精品| 亚洲综合激情网| 欧美一区二区精品久久911| 美女爽到高潮91| 国产三级三级三级精品8ⅰ区| 成人v精品蜜桃久久一区| 亚洲女人小视频在线观看| 欧美日韩免费不卡视频一区二区三区| 日日夜夜免费精品| 日韩欧美国产麻豆| 国产成人av一区二区| 亚洲男人天堂一区| 91精品久久久久久久99蜜桃| 久久不见久久见免费视频7| 国产亚洲1区2区3区| 91网站黄www| 日韩av一级片| 国产免费观看久久| 日本精品免费观看高清观看| 日韩精品一二三区| 日本一区二区三级电影在线观看| eeuss鲁片一区二区三区在线看| 亚洲影视在线播放| 久久美女艺术照精彩视频福利播放| 成人亚洲精品久久久久软件| 亚洲最新视频在线播放| 欧美xingq一区二区| 色综合久久综合| 国内精品在线播放| 亚洲夂夂婷婷色拍ww47| 久久久久高清精品| 在线观看91精品国产麻豆| 成人做爰69片免费看网站| 午夜精品影院在线观看| 国产精品久久久99| 日韩欧美中文一区二区| 色综合久久中文综合久久97 | 欧美精品一区二区蜜臀亚洲| 91猫先生在线| 国产精品1区2区3区| 日韩精品91亚洲二区在线观看| 日本一区免费视频| 日韩三级免费观看| 欧美日韩中文另类| www.视频一区| 国产成人夜色高潮福利影视| 男女视频一区二区| 午夜精品一区二区三区免费视频| 日韩一区在线播放| 国产午夜亚洲精品理论片色戒| 日韩一区二区视频| 欧美日韩一区二区欧美激情| 色综合中文综合网| 亚洲欧美综合在线精品| 精品久久久久久久久久久久包黑料 | 国产亚洲成av人在线观看导航| 国产一区美女在线| 亚洲伊人伊色伊影伊综合网| 久久尤物电影视频在线观看| 欧美一区二区三区视频在线 | 顶级嫩模精品视频在线看| 久久国产剧场电影| 玖玖九九国产精品| 美女精品自拍一二三四| 日本aⅴ精品一区二区三区 | 亚洲精品va在线观看| 1024国产精品| 亚洲久草在线视频| 综合av第一页| 亚洲激情av在线| 一区二区三区四区激情| 亚洲综合清纯丝袜自拍| 亚洲韩国一区二区三区| 午夜免费久久看| 美女爽到高潮91| 国产激情一区二区三区| 成人高清视频在线| 91蝌蚪porny九色| 欧美视频在线观看一区| 欧美精品成人一区二区三区四区| 91精品婷婷国产综合久久竹菊| 884aa四虎影成人精品一区| 欧美电影免费观看高清完整版| 欧美精品一区二区三区高清aⅴ | 中文字幕一区二| 亚洲欧美日本韩国| 午夜国产精品一区| 国产专区欧美精品| www.久久久久久久久| 欧美四级电影在线观看| 日韩欧美精品三级| 国产嫩草影院久久久久| 一区二区三区欧美久久| 免费视频一区二区| 国产高清在线观看免费不卡| 91免费视频网| 欧美一区二区三区四区视频| 国产日韩欧美激情| 一区二区三区精品视频在线| 免费观看成人鲁鲁鲁鲁鲁视频| 久久99九九99精品| 91麻豆免费观看| 欧美成人精品1314www| 自拍偷拍亚洲综合| 美女一区二区视频| av在线一区二区三区| 欧美一区二区三区四区在线观看| 国产欧美日韩在线| 天涯成人国产亚洲精品一区av| 国产精品综合av一区二区国产馆| 色婷婷久久综合| 国产亚洲欧洲997久久综合| 亚洲男人天堂av网| 激情欧美一区二区| 91久久精品一区二区三区| 欧美大度的电影原声| 一个色综合网站| 国产91丝袜在线播放0| 欧美日韩成人综合| 国产精品久久久久影院色老大 | 极品瑜伽女神91| 欧美性猛交xxxxxx富婆| 日本一区二区电影| 久久99精品网久久| 欧美日韩一区二区三区在线| 国产精品久久精品日日| 狠狠色丁香九九婷婷综合五月| 欧美视频精品在线观看| 国产精品国产馆在线真实露脸 | 亚洲高清视频在线| av高清久久久| 国产婷婷一区二区| 久久精品国产成人一区二区三区| 91啪亚洲精品| 国产精品萝li| 国产91色综合久久免费分享| 精品成人私密视频| 日本一区中文字幕| 欧美日韩一区二区在线视频| 亚洲欧美激情在线| 99综合影院在线| 国产精品三级视频| 国产成人夜色高潮福利影视| 精品国产免费一区二区三区四区| 婷婷成人综合网| 欧美理论片在线| 亚洲成av人片一区二区三区| 91免费在线看| 亚洲乱码中文字幕综合| 色综合天天综合网国产成人综合天| 国产精品女同一区二区三区| 国内成人精品2018免费看| 精品国产在天天线2019|