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

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

?? bsp.c

?? several peripheral examples of LPC2368 embedded chip
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
}
#endif

/*
*********************************************************************************************************
*                                         GET 'PUSH BUTTON' STATUS
*
* Description : This function is used to get the status of any push button on the board.
*
* Arguments   : push_button    is the number of the push button to probe
*                              1    probe the push button B1
*********************************************************************************************************
*/

CPU_BOOLEAN  PB_GetStatus (CPU_INT08U push_button_id)
{
    BOOLEAN  status;


    status = DEF_FALSE;

    switch (push_button_id) {
        case 1:
             if ((FIO2PIN & (1 << 10)) == 0) {
                 status =  (DEF_TRUE);
             }
             break;

        default:
             break;
    }

    return (status);
}

/*
*********************************************************************************************************
*                                         LED INITIALIZATION
*
* Description : This function should be called by your application code before you make use of any of the
*               functions found in this module.
*
* Arguments   : none
*********************************************************************************************************
*/

void  LED_Init (void)
{
    LED_Off(0);                                                         /* Turn OFF all the LEDs                                    */
}

/*
*********************************************************************************************************
*                                             LED ON
*
* Description : This function is used to control any or all the LEDs on the board.
*
* Arguments   : led    is the number of the LED to control
*                      0    indicates that you want ALL the LEDs to be ON
*                      1    turns ON LED1  on the board
*                      .
*                      .
*                      8    turns ON LED8 on the board
*********************************************************************************************************
*/

void  LED_On (CPU_INT08U led)
{
    if (led == 0) {
        FIO2SET    =    0xFF;                                           /* Turn on ALL LEDs                                        */
    }

    if ((led >= 1) && (led <= 8)) {
        led--;                                                          /* Ex: If led is 1, then subtract 1 to indicate bit 0       */
        FIO2SET =  (1 << led);                                          /* Turn on the selected LED                                 */
    }
}

/*
*********************************************************************************************************
*                                             LED OFF
*
* Description : This function is used to control any or all the LEDs on the board.
*
* Arguments   : led    is the number of the LED to turn OFF
*                      0    indicates that you want ALL the LEDs to be OFF
*                      1    turns OFF LED1  on the board
*                      .
*                      .
*                      8    turns OFF LED8 on the board
*********************************************************************************************************
*/

void  LED_Off (CPU_INT08U led)
{
    if (led == 0) {
        FIO2CLR    =    0xFF;                                           /* Turn off ALL LEDs                                        */
    }

    if ((led >= 1) && (led <= 8)) {
        led--;                                                          /* Ex: If led is 1, then subtract 1 to indicate bit 0       */
        FIO2CLR =  (1 << led);                                          /* Turn off the selected LED                                */
    }
}

/*
*********************************************************************************************************
*                                             LED TOGGLE
*
* Description : This function is used to toggle any or all the LEDs on the board.
*
* Arguments   : led    is the number of the LED to control
*                      0    indicates that you want to toggle ALL the LEDs
*                      1    toggles LED1  on the board
*                      .
*                      .
*                      8    toggles LED8 on the board
*********************************************************************************************************
*/

void  LED_Toggle (CPU_INT08U led)
{
    CPU_INT08U  status;


    if (led == 0) {
        status     =    FIO2PIN;
        FIO2SET    =   ~status;
        FIO2CLR    =    status;
    }

    if ((led >= 1) && (led <= 8)) {
        led--;                                                          /* Ex: If led is 1, then subtract 1 to indicate bit 0       */
        if ((FIO2PIN & (1 << led)) == 0) {                              /* If the LED is currently off                              */
            FIO2SET =  (1 << 0);                                        /* Turn on the selected LED                                 */
        } else {
            FIO2CLR =  (1 << led);                                      /* Turn off the selected LED                                */
        }
    }
}

/*
*********************************************************************************************************
*                                     INITIALIZE TIMER FOR uC/OS-View
*
* Description : This function is called to by uC/OS-View to initialize the free running timer that is
*               used to make time measurements.
*
* Arguments   : none
*
* Returns     ; none
*
* Note(s)     : 1) This function is EMPTY because the timer is initialized elsewhere.
*               2) BSP_DEBUG must be defined to 0 in order for the shared OS / OS-View
*                  timer to free-run.
*********************************************************************************************************
*/

#if OS_VIEW_MODULE > 0
void  OSView_TmrInit (void)
{
}
#endif

/*
*********************************************************************************************************
*                                     READ TIMER FOR uC/OS-View
*
* Description : This function is called to read the current counts of a 32 bit free running timer.
*
*               Timer #0 of the LPC2000 is used.  This is an UP-timer.
*
* Arguments   : none
*
* Returns     ; The 32 bit counts of the timer assuming the timer (MUST be an UP counter).
*********************************************************************************************************
*/

#if OS_VIEW_MODULE > 0
CPU_INT32U  OSView_TmrRd (void)
{
    if (OSRunning == TRUE) {
        return ((CPU_INT32U)T0TC);
    } else {
        return (0);
    }
}
#endif

/*
*********************************************************************************************************
*                                       TICKER INITIALIZATION
*
* Description : This function is called to initialize uC/OS-II's tick source (typically a timer generating
*               interrupts every 1 to 100 mS).
*
* Arguments   : none
*
* Note(s)     : 1) The timer is setup for output compare mode BUT 'MUST' also 'freerun' so that the timer
*                  count goes from 0x00000000 to 0xFFFFFFFF to ALSO be able to read the free running count.
*                  The reason this is needed is because we use the free-running count in uC/OS-View.
*********************************************************************************************************
*/

static  void  Tmr_TickInit (void)
{
    CPU_INT32U  cClkFrq;
    CPU_INT32U  pClkFrq;

                                                                        /* VIC timer #0 Initialization                              */
    VICIntSelect       &= ~(1 << VIC_TIMER0);                           /* Configure the timer interrupt as an IRQ source           */
    VICVectAddr4        =  (CPU_INT32U)Tmr_TickISR_Handler;             /* Set the vector address                                   */
    VICIntEnable        =  (1 << VIC_TIMER0);                           /* Enable the timer interrupt source                        */

    cClkFrq             =   BSP_CPU_ClkFreq();                          /* Get the CPU clock frequency                              */
    PCLKSEL0           &= ~(3 << 2);                                    /* Clear the timer 0 PCLK selection bits so PCLKDIV = 4     */
    pClkFrq             =   cClkFrq / 4;                                /* Determine the peripheral clock frequency                 */

    Tmr_ReloadCnts      =   pClkFrq / OS_TICKS_PER_SEC;                 /* Calculate the # of counts necessary for the OS ticker    */

    T0TCR               =  (1 << 1);                                    /* Disable and reset counter 0 and the prescale counter 0   */
    T0TCR              &= ~(1 << 1);                                    /* Clear the reset bit                                      */
    T0PC                =   4;                                          /* Prescaler is set to divider by 4                         */

#if BSP_DEBUG == 0
    T0MR0               =   T0TC + Tmr_ReloadCnts;
    T0MCR               =   1;                                          /* Interrupt on MR0 (match register 0).                     */
#else
    T0MR0               =   Tmr_ReloadCnts;
    T0MCR               =   3;                                          /* Interrupt on MR0 (reset TC), stop TC                     */
#endif
    T0CCR               =   0;                                          /* Capture is disabled.                                     */
    T0EMR               =   0;                                          /* No external match output.                                */
    T0TCR               =   1;                                          /* Enable timer 0                                           */
}


/*
*********************************************************************************************************
*                                         TIMER #0 IRQ HANDLER
*
* Description : This function handles the timer interrupt that is used to generate TICKs for uC/OS-II.
*
* Arguments   : none
*
* Note(s)     : 1) The timer is 'reloaded' with the count at compare + the time for the next interrupt.
*                  Since we are using 'unsigned' integer math, overflows are irrelevant.
*********************************************************************************************************
*/

void  Tmr_TickISR_Handler (void)
{
    T0IR        = 0xFF;                                                 /* Clear timer #0 interrupt                                 */

#if BSP_DEBUG == 0
    T0MR0      += Tmr_ReloadCnts;                                       /* Reload 'relative' to current interrupt time              */
#endif

    OSTimeTick();                                                       /* Call uC/OS-II's OSTimeTick()                             */
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女在线一区二区| 国产婷婷色一区二区三区| 欧美精品一区二| 亚洲黄色小视频| 成人性生交大合| 久久亚洲影视婷婷| 日韩中文字幕亚洲一区二区va在线 | 92国产精品观看| 91精品国产高清一区二区三区| 国产精品丝袜黑色高跟| 久久99精品久久只有精品| 国产精品美女一区二区在线观看| 亚洲狠狠丁香婷婷综合久久久| 国产精品456| 日韩精品专区在线| 美洲天堂一区二卡三卡四卡视频| 97久久超碰国产精品电影| 欧美mv和日韩mv国产网站| 亚洲成人动漫在线观看| 欧美四级电影在线观看| 亚洲影院理伦片| 欧美亚洲日本国产| 亚洲欧美日本在线| 91老师国产黑色丝袜在线| 亚洲一区二区av在线| 欧美精品电影在线播放| 久久机这里只有精品| 中文子幕无线码一区tr| 91免费在线视频观看| 午夜伦理一区二区| 久久久国产精华| 91国偷自产一区二区三区成为亚洲经典 | 国产凹凸在线观看一区二区| 亚洲色图色小说| 欧美一区二区精品久久911| 丁香激情综合国产| 水野朝阳av一区二区三区| 欧美v亚洲v综合ⅴ国产v| caoporn国产一区二区| 午夜精品久久久久久久99樱桃 | 成人白浆超碰人人人人| 亚洲视频在线一区观看| 日韩欧美www| 91啦中文在线观看| 国产原创一区二区| 亚洲影院免费观看| 国产精品无遮挡| 精品美女一区二区三区| 在线视频综合导航| 成人精品在线视频观看| 欧美bbbbb| 日产欧产美韩系列久久99| 亚洲视频小说图片| 国产精品无人区| 久久蜜桃av一区精品变态类天堂 | 亚洲三级免费观看| 国产精品视频看| 久久久久国色av免费看影院| 欧美电影免费观看高清完整版在线| 91丨九色丨蝌蚪丨老版| 国产成人精品亚洲午夜麻豆| 九九九久久久精品| 久88久久88久久久| 麻豆成人免费电影| 蜜桃视频第一区免费观看| 性久久久久久久久| 免费视频最近日韩| 99久久er热在这里只有精品66| 国产风韵犹存在线视精品| 国产一区二区三区香蕉| 激情欧美一区二区| 精久久久久久久久久久| 国产在线国偷精品产拍免费yy| 蜜桃久久久久久久| 国产一区二区三区在线观看精品| 精品在线播放免费| 国产成人av在线影院| 成人精品国产福利| 在线一区二区视频| 精品视频一区二区不卡| 日韩免费高清视频| 国产日韩精品一区二区三区在线| 国产精品乱码久久久久久| 亚洲美女淫视频| 天天综合色天天| 国产一区二区三区观看| 色综合夜色一区| 91精品国产综合久久久久| 久久久久久电影| 一区二区三区资源| 久久99国产精品麻豆| 高清久久久久久| 精品视频全国免费看| 久久久久国色av免费看影院| 亚洲另类中文字| 青青草视频一区| 国产日韩一级二级三级| 亚洲综合一区二区| 国产成人综合亚洲网站| 欧美色综合影院| 国产精品污www在线观看| 日韩精品电影一区亚洲| 成人av网站免费| 日韩欧美国产精品一区| 尤物av一区二区| 欧美午夜不卡视频| 国产精品嫩草99a| 奇米888四色在线精品| 色哟哟一区二区| 国产精品人成在线观看免费| 日精品一区二区三区| 色伊人久久综合中文字幕| 久久久亚洲精华液精华液精华液| 丝袜亚洲另类欧美| 91麻豆免费看片| 中文字幕欧美激情| 国产传媒日韩欧美成人| 国产欧美综合色| 国产美女一区二区三区| 精品少妇一区二区三区日产乱码 | 日韩高清欧美激情| 欧美视频在线一区二区三区| 亚洲精品久久7777| 在线精品国精品国产尤物884a| 日韩电影一区二区三区| 91麻豆精品国产91久久久久| 亚洲综合av网| 欧美高清视频在线高清观看mv色露露十八 | 国产91露脸合集magnet| 亚洲精品在线三区| 国产精品伊人色| 成人欧美一区二区三区视频网页| av一二三不卡影片| 日韩理论片中文av| 欧美日韩国产综合草草| 香蕉久久夜色精品国产使用方法| 欧美无乱码久久久免费午夜一区| 亚洲一区二区三区四区五区中文| 欧美日韩一区二区在线观看| 免费看精品久久片| 美国欧美日韩国产在线播放| 久久婷婷久久一区二区三区| caoporn国产精品| 亚洲在线视频免费观看| 91精品国产综合久久香蕉麻豆| 韩国精品一区二区| 成人精品视频一区二区三区 | 国产一区二三区好的| 国产日韩精品视频一区| 色狠狠综合天天综合综合| 午夜精品久久久久久不卡8050| 日韩女优电影在线观看| 国产91综合网| 日本午夜一区二区| 中文字幕在线一区免费| 欧美精品久久天天躁| 国产麻豆视频一区| 亚洲综合偷拍欧美一区色| 欧美精品一区二区三区在线播放| 一本一本大道香蕉久在线精品 | 中文字幕日韩欧美一区二区三区| 777奇米四色成人影色区| 成人午夜在线免费| 经典三级视频一区| 亚洲一区二区三区激情| 中文字幕欧美日韩一区| 精品国产乱码久久久久久闺蜜| 91亚洲国产成人精品一区二区三| 国产美女在线观看一区| 日日摸夜夜添夜夜添亚洲女人| 一区二区三区美女视频| 国产女同性恋一区二区| 精品国产污污免费网站入口| 欧美性一二三区| 91久久一区二区| 91蜜桃视频在线| 99久久综合精品| 不卡在线观看av| 成人午夜视频福利| 国产成人精品一区二| 国产精品1区二区.| 久久电影网站中文字幕| 韩国一区二区三区| 裸体歌舞表演一区二区| 美女mm1313爽爽久久久蜜臀| 日本成人在线网站| 极品少妇xxxx精品少妇偷拍| 久久福利资源站| 国产电影精品久久禁18| 成人一区二区三区视频| 成人久久视频在线观看| 97久久超碰国产精品电影| 色诱视频网站一区| 欧美猛男超大videosgay| 91麻豆精品国产| 久久久久久久综合色一本| 国产精品久线观看视频| 亚洲精品国产一区二区三区四区在线| 夜夜嗨av一区二区三区| 日韩av中文字幕一区二区 |