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

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

?? uart.c

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
        // There are no characters, so return a failure.
        //
        return(-1);
    }
}
#endif

//*****************************************************************************
//
//! Waits for a character from the specified port.
//!
//! \param ulBase is the base address of the UART port.
//!
//! Gets a character from the receive FIFO for the specified port.  If there
//! are no characters available, this function will wait until a character is
//! received before returning.
//!
//! \return Returns the character read from the specified port, cast as an
//! \e int.
//
//*****************************************************************************
#if defined(GROUP_charget) || defined(BUILD_ALL) || defined(DOXYGEN)
long
UARTCharGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Wait until a char is available.
    //
    while(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE)
    {
    }

    //
    // Now get the char.
    //
    return(HWREG(ulBase + UART_O_DR));
}
#endif

//*****************************************************************************
//
//! Sends a character to the specified port.
//!
//! \param ulBase is the base address of the UART port.
//! \param ucData is the character to be transmitted.
//!
//! Writes the character \e ucData to the transmit FIFO for the specified port.
//! This function does not block, so if there is no space available, then a
//! \b false is returned, and the application will have to retry the function
//! later.
//!
//! \return Returns \b true if the character was successfully placed in the
//! transmit FIFO, and \b false if there was no space available in the transmit
//! FIFO.
//
//*****************************************************************************
#if defined(GROUP_charnonblockingput) || defined(BUILD_ALL) || defined(DOXYGEN)
tBoolean
UARTCharNonBlockingPut(unsigned long ulBase, unsigned char ucData)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // See if there is space in the transmit FIFO.
    //
    if(!(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF))
    {
        //
        // Write this character to the transmit FIFO.
        //
        HWREG(ulBase + UART_O_DR) = ucData;

        //
        // Success.
        //
        return(true);
    }
    else
    {
        //
        // There is no space in the transmit FIFO, so return a failure.
        //
        return(false);
    }
}
#endif

//*****************************************************************************
//
//! Waits to send a character from the specified port.
//!
//! \param ulBase is the base address of the UART port.
//! \param ucData is the character to be transmitted.
//!
//! Sends the character \e ucData to the transmit FIFO for the specified port.
//! If there is no space available in the transmit FIFO, this function will
//! wait until there is space available before returning.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_charput) || defined(BUILD_ALL) || defined(DOXYGEN)
void
UARTCharPut(unsigned long ulBase, unsigned char ucData)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Wait until space is available.
    //
    while(HWREG(ulBase + UART_O_FR) & UART_FR_TXFF)
    {
    }

    //
    // Send the char.
    //
    HWREG(ulBase + UART_O_DR) = ucData;
}
#endif

//*****************************************************************************
//
//! Causes a BREAK to be sent.
//!
//! \param ulBase is the base address of the UART port.
//! \param bBreakState controls the output level.
//!
//! Calling this function with \e bBreakState set to \b true will assert a
//! break condition on the UART.  Calling this function with \e bBreakState set
//! to \b false will remove the break condition.  For proper transmission of a
//! break command, the break must be asserted for at least two complete frames.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_breakctl) || defined(BUILD_ALL) || defined(DOXYGEN)
void
UARTBreakCtl(unsigned long ulBase, tBoolean bBreakState)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Set the break condition as requested.
    //
    HWREG(ulBase + UART_O_LCR_H) =
        (bBreakState ?
         (HWREG(ulBase + UART_O_LCR_H) | UART_LCR_H_BRK) :
         (HWREG(ulBase + UART_O_LCR_H) & ~(UART_LCR_H_BRK)));
}
#endif

//*****************************************************************************
//
//! Registers an interrupt handler for a UART interrupt.
//!
//! \param ulBase is the base address of the UART port.
//! \param pfnHandler is a pointer to the function to be called when the
//! UART interrupt occurs.
//!
//! This function does the actual registering of the interrupt handler.  This
//! will enable the global interrupt in the interrupt controller; specific UART
//! interrupts must be enabled via UARTIntEnable().  It is the interrupt
//! handler's responsibility to clear the interrupt source.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intregister) || defined(BUILD_ALL) || defined(DOXYGEN)
void
UARTIntRegister(unsigned long ulBase, void (*pfnHandler)(void))
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Determine the interrupt number based on the UART port.
    //
    ulInt = (ulBase == UART0_BASE) ? INT_UART0 : INT_UART1;

    //
    // Register the interrupt handler.
    //
    IntRegister(ulInt, pfnHandler);

    //
    // Enable the UART interrupt.
    //
    IntEnable(ulInt);
}
#endif

//*****************************************************************************
//
//! Unregisters an interrupt handler for a UART interrupt.
//!
//! \param ulBase is the base address of the UART port.
//!
//! This function does the actual unregistering of the interrupt handler.  It
//! will clear the handler to be called when a UART interrupt occurs.  This
//! will also mask off the interrupt in the interrupt controller so that the
//! interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intunregister) || defined(BUILD_ALL) || defined(DOXYGEN)
void
UARTIntUnregister(unsigned long ulBase)
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Determine the interrupt number based on the UART port.
    //
    ulInt = (ulBase == UART0_BASE) ? INT_UART0 : INT_UART1;

    //
    // Disable the interrupt.
    //
    IntDisable(ulInt);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ulInt);
}
#endif

//*****************************************************************************
//
//! Enables individual UART interrupt sources.
//!
//! \param ulBase is the base address of the UART port.
//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled.
//!
//! Enables the indicated UART interrupt sources.  Only the sources that are
//! enabled can be reflected to the processor interrupt; disabled sources have
//! no effect on the processor.
//!
//! The parameter \e ulIntFlags is the logical OR of any of the following:
//!
//! - UART_INT_OE - Overrun Error interrupt
//! - UART_INT_BE - Break Error interrupt
//! - UART_INT_PE - Parity Error interrupt
//! - UART_INT_FE - Framing Error interrupt
//! - UART_INT_RT - Receive Timeout interrupt
//! - UART_INT_TX - Transmit interrupt
//! - UART_INT_RX - Receive interrupt
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intenable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
UARTIntEnable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Enable the specified interrupts.
    //
    HWREG(ulBase + UART_O_IM) |= ulIntFlags;
}
#endif

//*****************************************************************************
//
//! Disables individual UART interrupt sources.
//!
//! \param ulBase is the base address of the UART port.
//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled.
//!
//! Disables the indicated UART interrupt sources.  Only the sources that are
//! enabled can be reflected to the processor interrupt; disabled sources have
//! no effect on the processor.
//!
//! The parameter \e ulIntFlags has the same definition as the same parameter
//! to UARTIntEnable().
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intdisable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
UARTIntDisable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Disable the specified interrupts.
    //
    HWREG(ulBase + UART_O_IM) &= ~(ulIntFlags);
}
#endif

//*****************************************************************************
//
//! Gets the current interrupt status.
//!
//! \param ulBase is the base address of the UART port.
//! \param bMasked is false if the raw interrupt status is required and true
//! if the masked interrupt status is required.
//!
//! This returns the interrupt status for the specified UART.  Either the raw
//! interrupt status or the status of interrupts that are allowed to reflect to
//! the processor can be returned.
//!
//! \return The current interrupt status, enumerated as a bit field of
//! values described in UARTIntEnable().
//
//*****************************************************************************
#if defined(GROUP_intstatus) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
UARTIntStatus(unsigned long ulBase, tBoolean bMasked)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Return either the interrupt status or the raw interrupt status as
    // requested.
    //
    if(bMasked)
    {
        return(HWREG(ulBase + UART_O_MIS));
    }
    else
    {
        return(HWREG(ulBase + UART_O_RIS));
    }
}
#endif

//*****************************************************************************
//
//! Clears UART interrupt sources.
//!
//! \param ulBase is the base address of the UART port.
//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared.
//!
//! The specified UART interrupt sources are cleared, so that they no longer
//! assert.  This must be done in the interrupt handler to keep it from being
//! called again immediately upon exit.
//!
//! The parameter \e ulIntFlags has the same definition as the same parameter
//! to UARTIntEnable().
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intclear) || defined(BUILD_ALL) || defined(DOXYGEN)
void
UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE));

    //
    // Clear the requested interrupt sources.
    //
    HWREG(ulBase + UART_O_ICR) = ulIntFlags;
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区亚洲| 丁香天五香天堂综合| 国产成人av一区| 成人黄色av电影| 亚洲精品在线一区二区| 一区二区三区国产精品| 国产成人综合视频| 日韩欧美亚洲另类制服综合在线| 亚洲精选一二三| 国产老肥熟一区二区三区| 精品视频免费在线| 国产精品久线在线观看| 激情深爱一区二区| 欧美日韩激情一区二区三区| 国产女同互慰高潮91漫画| 丝袜亚洲另类欧美综合| 色综合激情五月| 国产精品久久国产精麻豆99网站| 激情文学综合插| 国产精品免费视频网站| 日韩成人av影视| 欧美丰满一区二区免费视频| 中文字幕亚洲欧美在线不卡| 成人精品免费看| 国产偷国产偷亚洲高清人白洁| 精品影视av免费| 欧美精品一区二区在线观看| 蜜臀va亚洲va欧美va天堂| 欧美日韩免费一区二区三区视频| 亚洲最大成人网4388xx| 色婷婷av一区二区三区之一色屋| 亚洲精品中文在线| 99vv1com这只有精品| 中文字幕中文字幕在线一区| 成人黄页毛片网站| 国产精品久久夜| 色综合一个色综合| 一区二区在线观看视频| 91捆绑美女网站| 综合久久久久综合| 色偷偷成人一区二区三区91| 亚洲精品久久7777| 欧美三级欧美一级| 日本亚洲最大的色成网站www| 制服.丝袜.亚洲.另类.中文| 三级欧美韩日大片在线看| 欧美人体做爰大胆视频| 日韩成人免费看| 精品国产伦理网| 国产黑丝在线一区二区三区| 中文字幕一区二区三区色视频| 成人激情av网| 亚洲综合在线免费观看| 在线观看av不卡| 日本伊人精品一区二区三区观看方式 | 国产精品私人自拍| proumb性欧美在线观看| 一区二区三区电影在线播| 欧美女孩性生活视频| 久久99在线观看| 成人免费在线播放视频| 欧美日韩一区二区三区不卡| 国产一区二区三区在线观看免费| 国产精品福利在线播放| 欧美日韩国产一级二级| 国产在线精品免费av| 亚洲丝袜自拍清纯另类| 欧美日精品一区视频| 极品少妇一区二区| 亚洲精品成人在线| 欧美tickling挠脚心丨vk| av亚洲精华国产精华精华| 午夜不卡在线视频| 国产精品污污网站在线观看| 欧美日韩国产片| 懂色av一区二区夜夜嗨| 香蕉久久一区二区不卡无毒影院 | 亚洲国产精品激情在线观看| 色婷婷综合久久久久中文一区二区| 天天亚洲美女在线视频| 中文字幕一区二区三区乱码在线| 91麻豆精品国产自产在线观看一区| 国产精品一区专区| 五月天精品一区二区三区| 国产精品入口麻豆原神| 欧美群妇大交群中文字幕| 国产不卡视频在线观看| 日韩影院在线观看| 亚洲精品网站在线观看| 日本一区二区视频在线观看| 日韩精品在线一区二区| 欧美综合久久久| 成人蜜臀av电影| 美女免费视频一区二区| 亚洲国产日韩综合久久精品| 中文字幕欧美日韩一区| 欧美成人欧美edvon| 欧美在线观看视频一区二区 | 国产一区二区导航在线播放| 丝袜美腿亚洲一区| 一区二区三区四区av| 国产精品久久久久天堂| 国产日产精品一区| 久久婷婷国产综合精品青草| 91精品国产免费| 欧美一区二区三区四区久久| 欧美日韩一区视频| 欧美性猛交xxxxxx富婆| 色综合久久88色综合天天| 91香蕉视频mp4| 91免费在线播放| 99久久精品国产网站| 不卡的av电影| 成人高清视频在线| av中文字幕在线不卡| 99久久精品国产精品久久| 成人av电影免费在线播放| 成人免费的视频| 91麻豆高清视频| 色域天天综合网| 欧美性三三影院| 欧美日韩精品一区二区天天拍小说| 欧美中文字幕一区二区三区| 欧美日韩欧美一区二区| 欧美一区二区福利视频| 精品少妇一区二区三区在线视频| 日韩欧美国产1| 精品免费视频一区二区| 精品日产卡一卡二卡麻豆| 久久综合网色—综合色88| www成人在线观看| 国产精品色婷婷| 亚洲免费在线视频一区 二区| 不卡的av网站| 色欧美88888久久久久久影院| 色狠狠av一区二区三区| 国产女人18毛片水真多成人如厕 | 成人精品视频.| 91香蕉视频污| 在线播放欧美女士性生活| 亚洲精品在线电影| 亚洲三级小视频| 日精品一区二区| 国产精品 欧美精品| 在线亚洲+欧美+日本专区| 欧美久久久影院| 久久久久综合网| 亚洲影院在线观看| 国模大尺度一区二区三区| 岛国精品一区二区| 欧美日韩国产首页| 国产日韩欧美一区二区三区综合| 亚洲日本免费电影| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产风韵犹存在线视精品| 91在线观看成人| 日韩欧美色综合网站| 国产精品久99| 麻豆成人免费电影| 99热在这里有精品免费| 91精品欧美综合在线观看最新| 国产日产欧产精品推荐色| 午夜久久久久久电影| 成人av先锋影音| 日韩欧美色综合网站| 亚洲亚洲精品在线观看| 丰满岳乱妇一区二区三区| 在线不卡一区二区| 专区另类欧美日韩| 精彩视频一区二区| 88在线观看91蜜桃国自产| 亚洲情趣在线观看| 国产高清久久久| 日韩一区二区在线免费观看| 一区二区久久久| 成人免费观看av| 久久婷婷一区二区三区| 日韩在线a电影| 欧美性一区二区| 综合中文字幕亚洲| 成人激情电影免费在线观看| 欧美成人三级在线| 日本 国产 欧美色综合| 在线日韩一区二区| 亚洲天堂福利av| 国产精品自拍在线| 亚洲精品一区二区三区蜜桃下载 | 国内精品自线一区二区三区视频| 欧美三区免费完整视频在线观看| 一区在线观看视频| 成人国产一区二区三区精品| 久久久精品影视| 国产一区二区在线电影| 日韩午夜在线观看视频| 午夜精品福利在线| 欧美日韩你懂的| 丝袜美腿成人在线| 欧美系列在线观看| 一区二区三区丝袜| 欧美色精品在线视频|