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

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

?? uart.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 2 頁
字號:
        // 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.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产99久久6| 国产一区美女在线| 日韩欧美国产午夜精品| 激情欧美日韩一区二区| 日韩码欧中文字| 欧美成人女星排名| 一本大道av一区二区在线播放| 亚洲成人一区二区| 国产精品国产自产拍在线| 欧美日韩精品一区二区三区蜜桃 | 不卡大黄网站免费看| 天堂久久一区二区三区| 1024成人网| 国产精品免费丝袜| 国产欧美日韩另类视频免费观看| 在线免费观看不卡av| 色综合久久天天| 成人不卡免费av| 国产一区二区精品久久| 蜜桃精品视频在线观看| 日韩国产欧美在线视频| 午夜激情一区二区三区| 亚洲第一主播视频| 亚洲一级不卡视频| 亚洲午夜免费电影| 亚洲午夜精品一区二区三区他趣| 色婷婷av一区| 亚洲一区成人在线| 亚洲色图视频网站| 亚洲午夜av在线| 一区av在线播放| 亚洲mv在线观看| 美女免费视频一区二区| 国内精品伊人久久久久av一坑 | 一区二区三区在线免费观看| 亚洲欧洲日韩av| 亚洲国产精品天堂| 老司机精品视频线观看86| 裸体在线国模精品偷拍| 国产成人久久精品77777最新版本| 国产一区二区成人久久免费影院| 不卡的电影网站| 在线观看91av| 欧美国产精品劲爆| 亚洲成人资源网| 国产乱码精品一区二区三区忘忧草| 成人性生交大片免费看在线播放| 色先锋资源久久综合| 久久一日本道色综合| 亚洲欧美乱综合| 国产在线视频一区二区三区| 91麻豆福利精品推荐| 91精品久久久久久蜜臀| 国产精品国产自产拍在线| 视频一区中文字幕| 99国产精品久久久| 国产欧美一区二区三区在线老狼| 一级特黄大欧美久久久| 狠狠色狠狠色综合系列| 欧美日韩一区二区三区不卡| 国产日本欧洲亚洲| 国产乱码精品一区二区三区av | 一区二区三区四区av| 国产精选一区二区三区| 日韩一区二区精品葵司在线| 国产精品对白交换视频| 顶级嫩模精品视频在线看| 久久亚洲精精品中文字幕早川悠里| 亚洲激情在线激情| 国产成人av资源| 亚洲国产高清不卡| 国产成人免费9x9x人网站视频| 日韩一区二区免费电影| 蜜臀久久99精品久久久久久9| 精品视频在线免费看| 国产精品久久久久久久久晋中 | 91理论电影在线观看| 日本一区二区成人在线| 成人av在线网| 亚洲色大成网站www久久九九| 成人性生交大片| 亚洲精品国产第一综合99久久| 亚洲一区二区在线视频| 丝袜亚洲精品中文字幕一区| 在线播放91灌醉迷j高跟美女| 同产精品九九九| 日韩午夜三级在线| 韩国一区二区视频| 日韩毛片精品高清免费| 欧美午夜视频网站| 国精产品一区一区三区mba视频| 欧美va亚洲va| 色综合色综合色综合| 日韩和欧美一区二区三区| 欧美一区二区网站| 丁香网亚洲国际| 午夜精品一区二区三区三上悠亚 | 国产欧美日韩在线观看| 91色|porny| 黑人巨大精品欧美一区| 亚洲免费观看高清| 精品99久久久久久| 欧美中文字幕亚洲一区二区va在线| 久久精工是国产品牌吗| 中文字幕亚洲区| 欧美一区二区性放荡片| 色婷婷久久一区二区三区麻豆| 蜜臀av性久久久久蜜臀aⅴ | 亚洲欧洲一区二区三区| 4438成人网| 欧美片网站yy| 91精品1区2区| 97久久超碰国产精品| 韩国av一区二区三区| 日本欧美一区二区三区| 一区二区在线观看av| 国产精品麻豆网站| 国产亚洲自拍一区| 久久久久久99久久久精品网站| 欧美日韩国产不卡| 91蜜桃在线免费视频| 成人黄色大片在线观看| 国产成人av影院| 高清在线观看日韩| 国产成人综合网站| 国产精品中文有码| 精品一区二区三区在线观看| 日韩成人一级片| 日韩av中文字幕一区二区三区| 香蕉久久夜色精品国产使用方法| 亚洲品质自拍视频网站| 伊人夜夜躁av伊人久久| 亚洲国产精品欧美一二99| 五月激情综合色| 蜜桃视频在线一区| 国产一区三区三区| 成人黄色小视频| 欧美午夜精品久久久久久超碰 | 国产精品美女久久久久av爽李琼| 国产日韩欧美在线一区| 最新国产精品久久精品| 亚洲国产另类av| 国产在线视频一区二区| 色成人在线视频| 日本道免费精品一区二区三区| 欧美性受xxxx黑人xyx性爽| 国产不卡在线一区| 91久久久免费一区二区| 在线综合+亚洲+欧美中文字幕| 久久久五月婷婷| 亚洲韩国精品一区| 成人亚洲一区二区一| 在线观看www91| 中文字幕久久午夜不卡| 亚洲午夜影视影院在线观看| 久久av中文字幕片| 欧美日韩在线一区二区| 久久久不卡网国产精品二区| 婷婷激情综合网| 91色.com| 国产精品进线69影院| 国产综合久久久久久鬼色| 欧美日韩精品一区二区三区蜜桃| 国产日产欧美精品一区二区三区| 天天综合天天综合色| 97久久超碰国产精品电影| 久久先锋资源网| 久久99久久99小草精品免视看| 欧美在线观看视频一区二区| 久久久美女毛片| 韩国精品主播一区二区在线观看| 欧美日韩激情在线| 有坂深雪av一区二区精品| 99国产精品久久久久| 亚洲国产精品99久久久久久久久| 久久精品国产99国产精品| 91精品中文字幕一区二区三区| 亚洲国产精品自拍| 欧美精品久久久久久久多人混战| 亚洲日本电影在线| 色综合久久久久综合99| 亚洲免费成人av| 日本二三区不卡| 午夜久久久影院| 7777精品伊人久久久大香线蕉最新版| 一区二区在线观看视频在线观看| 91视频com| 肉肉av福利一精品导航| 欧美一区二区三区视频| 国内久久婷婷综合| 国产精品色哟哟| 欧美丝袜丝交足nylons图片| 首页国产丝袜综合| 久久综合精品国产一区二区三区| 国产不卡在线播放| 一区二区三区在线视频免费| 欧美精品视频www在线观看| 狠狠色丁香婷婷综合久久片| 椎名由奈av一区二区三区| 91精品视频网|