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

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

?? os_viewc.c

?? 基于ucos的arm7 lpc2138的lcd程序
?? 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一区二区三区免费野_久草精品视频
奇米777欧美一区二区| 蜜臀久久99精品久久久画质超高清 | 91精品国产91久久综合桃花| 国产精品一级在线| 中文字幕亚洲视频| 精品日韩一区二区| 91久久奴性调教| 激情五月婷婷综合网| 一区二区三区在线观看视频| 欧美不卡123| 欧美色涩在线第一页| 岛国av在线一区| 日本成人中文字幕| 一个色妞综合视频在线观看| 国产欧美日韩视频一区二区| 欧美一卡二卡三卡四卡| 日本久久电影网| 成人午夜私人影院| 韩国av一区二区三区| 日韩激情中文字幕| 一级特黄大欧美久久久| 中文字幕一区日韩精品欧美| 精品国产不卡一区二区三区| 欧美一区二区三区视频| 91福利视频久久久久| 成人久久视频在线观看| 国产一区二区久久| 久久电影网站中文字幕| 日韩va欧美va亚洲va久久| 一区二区三区欧美视频| 1区2区3区欧美| 亚洲欧洲色图综合| 中文字幕成人在线观看| 国产嫩草影院久久久久| 久久久久久综合| 久久九九国产精品| 欧美xxx久久| 2022国产精品视频| 精品国精品自拍自在线| 26uuu久久综合| 2023国产精品自拍| 久久久电影一区二区三区| 国产色综合久久| 国产欧美一区视频| 国产精品久久毛片a| 中文字幕视频一区| 亚洲欧美日韩中文字幕一区二区三区 | 色综合天天综合狠狠| 91视频免费播放| 色婷婷激情综合| 欧美在线你懂得| 欧美日韩精品一区二区三区四区 | 欧美精品一区二区三区四区| 日韩一区二区免费在线观看| 精品国产三级电影在线观看| 亚洲精品一线二线三线| 国产欧美日韩一区二区三区在线观看| 久久精品一二三| 综合久久久久久| 亚洲一二三四久久| 奇米精品一区二区三区在线观看一| 美女www一区二区| 国产一区二区福利视频| 99久久99久久精品免费观看 | 91成人网在线| 91精品国产色综合久久不卡蜜臀| 精品国产污网站| 1区2区3区欧美| 天天综合网天天综合色| 九九视频精品免费| 色综合天天综合网国产成人综合天 | 国产欧美精品国产国产专区| 亚洲婷婷在线视频| 性欧美疯狂xxxxbbbb| 激情国产一区二区 | 在线观看亚洲专区| 91精品国产一区二区三区蜜臀| 精品成人免费观看| 亚洲欧美日韩国产一区二区三区 | 亚洲欧美怡红院| 丝袜美腿亚洲一区| 国产白丝精品91爽爽久久| 色婷婷久久久亚洲一区二区三区 | 亚洲精品高清在线观看| 美洲天堂一区二卡三卡四卡视频| 福利一区在线观看| 欧美人牲a欧美精品| 国产精品天美传媒沈樵| 午夜精品久久久久久| 国产成人一区在线| 欧美一区二区三区爱爱| 中文字幕中文字幕一区| 蜜桃av一区二区| 色网综合在线观看| 26uuu久久天堂性欧美| 亚洲第一在线综合网站| 成人综合日日夜夜| 日韩写真欧美这视频| |精品福利一区二区三区| 国模娜娜一区二区三区| 欧美亚洲另类激情小说| 欧美激情一区二区在线| 美女在线一区二区| 在线欧美小视频| 中文字幕+乱码+中文字幕一区| 日产国产欧美视频一区精品| 91视频www| 国产网站一区二区三区| 蜜桃精品在线观看| 精品1区2区3区| 亚洲色图另类专区| 高潮精品一区videoshd| 欧美zozozo| 麻豆精品蜜桃视频网站| 欧美三级资源在线| 亚洲另类在线一区| av一区二区久久| 久久久久久99久久久精品网站| 蜜臀91精品一区二区三区| 欧美日韩一区在线| 亚洲自拍欧美精品| 91麻豆.com| 亚洲色图制服诱惑| 成人免费高清在线| 国产精品色在线| 国产.欧美.日韩| 国产人妖乱国产精品人妖| 精品一区二区免费| 日韩精品一区二| 精品一区在线看| 精品久久一区二区三区| 另类小说综合欧美亚洲| 欧美一区三区二区| 另类专区欧美蜜桃臀第一页| 日韩免费观看2025年上映的电影| 日韩和欧美一区二区三区| 欧美日韩一级大片网址| 亚洲777理论| 91麻豆精品国产91久久久更新时间 | 欧美日韩中文字幕一区| 一区二区在线免费| 日本道色综合久久| 亚洲狠狠爱一区二区三区| 欧美性猛交xxxx乱大交退制版| 亚洲一区二区在线视频| 欧美无乱码久久久免费午夜一区| 国产精品免费人成网站| 成av人片一区二区| 亚洲欧洲无码一区二区三区| 91在线观看污| 亚洲欧美偷拍另类a∨色屁股| 欧美最猛黑人xxxxx猛交| 亚洲第一综合色| 精品少妇一区二区三区在线视频| 国产一区二区三区不卡在线观看| 久久精品综合网| 色一区在线观看| 午夜影视日本亚洲欧洲精品| 欧美一区二区成人6969| 懂色av一区二区三区免费看| 国产精品久久久久久久第一福利| www.日韩在线| 亚洲成人午夜影院| 日韩视频123| 国产成人av电影| 亚洲另类在线一区| 日韩欧美成人激情| 成人福利在线看| 亚洲一区二区三区在线播放| 91精品国产免费| 国产精品18久久久久久久久久久久| 成人免费一区二区三区在线观看| 精品视频色一区| 国产精品一区三区| 亚洲一区二区三区四区五区黄| 欧美成人a在线| 99在线精品视频| 日韩不卡在线观看日韩不卡视频| 欧美国产一区在线| 欧美男生操女生| 成人综合婷婷国产精品久久蜜臀| 亚洲一区二区视频在线观看| 国产婷婷色一区二区三区 | 欧美综合视频在线观看| 美女在线视频一区| 亚洲欧美色一区| 久久久久久9999| 欧美精品久久一区二区三区| 成人高清av在线| 韩国三级中文字幕hd久久精品| 亚洲免费在线播放| 久久久蜜臀国产一区二区| 在线欧美一区二区| 成人av网站在线观看| 美脚の诱脚舐め脚责91 | 制服丝袜中文字幕亚洲| 成人性生交大合| 麻豆91在线播放免费| 亚洲人妖av一区二区| 久久久久久久性|