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

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

?? xuartlite.c

?? 本程序用xilinx EDK9.1運(yùn)行
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
}/****************************************************************************//**** This function resets the FIFOs, both transmit and receive, of the UART such* that they are emptied.  Since the UART does not have any way to disable it* from receiving data, it may be necessary for the application to reset the* FIFOs to get rid of any unwanted data.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** None.** @note** None.******************************************************************************/void XUartLite_ResetFifos(XUartLite *InstancePtr){    Xuint32 Register;    XASSERT_VOID(InstancePtr != XNULL);    XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);    /* Read the status register 1st such that the next write to the control     * register won't destroy the state of the interrupt enable bit     */    Register =        XIo_In32(InstancePtr->RegBaseAddress + XUL_STATUS_REG_OFFSET);    /*     * Mask off the interrupt enable bit to maintain it's state.     */    Register &= XUL_SR_INTR_ENABLED;    /* Write to the control register to reset both FIFOs, these bits are     * self-clearing such that there's no need to clear them     */    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET,              Register | XUL_CR_FIFO_TX_RESET | XUL_CR_FIFO_RX_RESET);}/****************************************************************************//**** This function determines if the specified UART is sending data. If the* transmitter register is not empty, it is sending data.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** A value of XTRUE if the UART is sending data, otherwise XFALSE.** @note** None.******************************************************************************/Xboolean XUartLite_IsSending(XUartLite *InstancePtr){    Xuint32 StatusRegister;    /*     * Assert validates the input arguments     */    XASSERT_NONVOID(InstancePtr != XNULL);    /* Read the status register to determine if the transmitter is     * empty     */    StatusRegister = XIo_In32(InstancePtr->RegBaseAddress + XUL_STATUS_REG_OFFSET);    /* If the transmitter is not empty then indicate that the UART is still     * sending some data     */    return ((StatusRegister & XUL_SR_TX_FIFO_EMPTY) == 0);}/****************************************************************************** This function provides a stub handler such that if the application does not* define a handler but enables interrupts, this function will be called.** @param    CallBackRef has no purpose but is necessary to match the*           interface for a handler.* @param    ByteCount has no purpose but is necessary to match the*           interface for a handler.** @return** None.** @note** None.******************************************************************************/static void StubHandler(void *CallBackRef, unsigned int ByteCount){    /*     * Assert occurs always since this is a stub and should never be called     */    XASSERT_VOID_ALWAYS();}/****************************************************************************//**** This function sends a buffer that has been previously specified by setting* up the instance variables of the instance. This function is designed to be* an internal function for the XUartLite component such that it may be called* from a shell function that sets up the buffer or from an interrupt handler.** This function sends the specified buffer of data to the UART in either* polled or interrupt driven modes. This function is non-blocking such that* it will return before the data has been sent by the UART.** In a polled mode, this function will only send as much data as the UART can* buffer, either in the transmitter or in the FIFO if present and enabled.* The application may need to call it repeatedly to send a buffer.** In interrupt mode, this function will start sending the specified buffer and* then the interrupt handler of the driver will continue until the buffer* has been sent. A callback function, as specified by the application, will* be called to indicate the completion of sending the buffer.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** NumBytes is the number of bytes actually sent (put into the UART transmitter* and/or FIFO).** @note** None.******************************************************************************/unsigned int XUartLite_SendBuffer(XUartLite *InstancePtr){    unsigned int SentCount = 0;    Xuint8 StatusRegister;    /* Read the line status register to determine if the transmitter is     * full     */    StatusRegister = XUartLite_mGetStatusReg(InstancePtr->RegBaseAddress);    /*     * Fill the FIFO from the the buffer that was specified     */    while (((StatusRegister & XUL_SR_TX_FIFO_FULL) == 0) &&           (SentCount < InstancePtr->SendBuffer.RemainingBytes))    {        XIo_Out32(InstancePtr->RegBaseAddress + XUL_TX_FIFO_OFFSET,                  InstancePtr->SendBuffer.NextBytePtr[SentCount]);        SentCount++;        StatusRegister = XUartLite_mGetStatusReg(InstancePtr->RegBaseAddress);    }    /* Enter a critical region by disabling all the UART interrupts to allow     * this call to stop a previous operation that may be interrupt driven     */    StatusRegister = XUartLite_mGetStatusReg(InstancePtr->RegBaseAddress);    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET, 0);    /*     * Update the buffer to reflect the bytes that were sent from it     */    InstancePtr->SendBuffer.NextBytePtr += SentCount;    InstancePtr->SendBuffer.RemainingBytes -= SentCount;    /*     * Increment associated counters     */     InstancePtr->Stats.CharactersTransmitted += SentCount;    /* Restore the interrupt enable register to it's previous value such     * that the critical region is exited     */    StatusRegister &= XUL_CR_ENABLE_INTR;    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET, StatusRegister);    /*     * Return the number of bytes that were sent, althought they really were     * only put into the FIFO, not completely sent yet     */    return SentCount;}/****************************************************************************//**** This function receives a buffer that has been previously specified by setting* up the instance variables of the instance. This function is designed to be* an internal function for the XUartLite component such that it may be called* from a shell function that sets up the buffer or from an interrupt handler.** This function will attempt to receive a specified number of bytes of data* from the UART and store it into the specified buffer. This function is* designed for either polled or interrupt driven modes. It is non-blocking* such that it will return if there is no data has already received by the* UART.** In a polled mode, this function will only receive as much data as the UART* can buffer, either in the receiver or in the FIFO if present and enabled.* The application may need to call it repeatedly to receive a buffer. Polled* mode is the default mode of operation for the driver.** In interrupt mode, this function will start receiving and then the interrupt* handler of the driver will continue until the buffer has been received. A* callback function, as specified by the application, will be called to indicate* the completion of receiving the buffer or when any receive errors or timeouts* occur. Interrupt mode must be enabled using the SetOptions function.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** The number of bytes received.** @note** None.******************************************************************************/unsigned int XUartLite_ReceiveBuffer(XUartLite *InstancePtr){    Xuint8 StatusRegister;    unsigned int ReceivedCount = 0;    /* Loop until there is not more data buffered by the UART or the specified     * number of bytes is received     */    while (ReceivedCount < InstancePtr->ReceiveBuffer.RemainingBytes)    {        /* Read the Status Register to determine if there is any data in         * the receiver/FIFO         */        StatusRegister = XUartLite_mGetStatusReg(InstancePtr->RegBaseAddress);        /* If there is data ready to be removed, then put the next byte         * received into the specified buffer and update the stats to reflect         * any receive errors for the byte         */        if (StatusRegister & XUL_SR_RX_FIFO_VALID_DATA)        {            InstancePtr->ReceiveBuffer.NextBytePtr[ReceivedCount++] =                XIo_In32(InstancePtr->RegBaseAddress + XUL_RX_FIFO_OFFSET);            XUartLite_mUpdateStats(InstancePtr, StatusRegister);        }        /* There's no more data buffered, so exit such that this function does         * not block waiting for data         */        else        {            break;        }    }    /* Enter a critical region by disabling all the UART interrupts to allow     * this call to stop a previous operation that may be interrupt driven     */    StatusRegister = XUartLite_mGetStatusReg(InstancePtr->RegBaseAddress);    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET, 0);    /* Update the receive buffer to reflect the number of bytes that was     * received     */    InstancePtr->ReceiveBuffer.NextBytePtr += ReceivedCount;    InstancePtr->ReceiveBuffer.RemainingBytes -= ReceivedCount;    /*     * Increment associated counters in the statistics     */    InstancePtr->Stats.CharactersReceived += ReceivedCount;    /* Restore the interrupt enable register to it's previous value such     * that the critical region is exited     */    StatusRegister &= XUL_CR_ENABLE_INTR;    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET, StatusRegister);    return ReceivedCount;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费不卡视频| 成人中文字幕合集| 国产午夜精品福利| 日韩一级片网址| 欧美丝袜丝nylons| 精品在线播放免费| 日韩精品一二三四| 欧美aa在线视频| 日韩国产精品久久久| 最好看的中文字幕久久| 亚洲色图视频网| 亚洲综合图片区| 丝袜国产日韩另类美女| 久久99热狠狠色一区二区| 久久疯狂做爰流白浆xx| 国产精品一区二区在线看| 日本午夜精品一区二区三区电影| 日本不卡高清视频| 久久69国产一区二区蜜臀| 国产成人免费视频一区| 成人a级免费电影| 色域天天综合网| 欧美日韩国产综合久久| 91麻豆精品国产自产在线观看一区| 欧美日韩国产精选| 69成人精品免费视频| 日韩一级二级三级精品视频| 欧美日本在线视频| 欧美精品一区二区三区蜜桃| 26uuu亚洲综合色| 中文字幕在线一区免费| 日韩**一区毛片| 国产一区二区三区四| 波多野洁衣一区| 欧美一级二级三级乱码| 国产精品久久久久久久久果冻传媒| 亚洲一卡二卡三卡四卡五卡| 国产原创一区二区三区| 91黄色免费观看| 久久免费的精品国产v∧| 亚洲综合区在线| 国产精品主播直播| 欧美一区二区三区视频在线| 中文字幕精品三区| 日本欧美大码aⅴ在线播放| 国产一区二区调教| 欧美三级三级三级爽爽爽| 欧美成人aa大片| 欧美激情中文字幕| 麻豆国产精品视频| 欧美日韩中文精品| 亚洲视频1区2区| 国产大陆a不卡| 欧美大黄免费观看| 日日骚欧美日韩| 欧洲中文字幕精品| 综合欧美一区二区三区| 粉嫩高潮美女一区二区三区 | 亚洲国产另类精品专区| 成人午夜碰碰视频| 久久久久久电影| 奇米一区二区三区av| 欧美色图第一页| 一区二区三区在线观看网站| 国产jizzjizz一区二区| 久久综合久久综合久久| 天堂蜜桃91精品| 欧洲人成人精品| 成人欧美一区二区三区| 国产精品一级在线| 精品国产91九色蝌蚪| 麻豆国产精品官网| 日韩亚洲欧美中文三级| 午夜精品久久久久久久 | 久久综合色鬼综合色| 亚洲图片自拍偷拍| 99久久精品免费看国产| 中文字幕在线视频一区| 国产精品一级黄| 国产精品久久久久久久久果冻传媒 | 日韩美女精品在线| 99久久亚洲一区二区三区青草 | 国产成人夜色高潮福利影视| 亚洲精品在线三区| 大胆亚洲人体视频| 亚洲欧洲av一区二区三区久久| 99久久精品国产导航| 亚洲少妇最新在线视频| 99精品在线免费| 国产精品福利一区| 97久久超碰国产精品| 一区二区欧美国产| 欧美日本在线观看| 精品一区二区在线播放| 精品免费国产二区三区| 日本欧美一区二区在线观看| 日韩欧美自拍偷拍| 国产福利精品一区| 日韩一区在线看| 欧美日本免费一区二区三区| 青青草97国产精品免费观看| 久久九九久久九九| 91视视频在线直接观看在线看网页在线看| 国产精品美女久久久久久| 欧美在线视频你懂得| 久久99久久99小草精品免视看| 久久久久久久av麻豆果冻| 91麻豆文化传媒在线观看| 天天免费综合色| 国产亚洲欧洲一区高清在线观看| 91亚洲精品久久久蜜桃| 人禽交欧美网站| 国产午夜精品久久久久久免费视 | 538在线一区二区精品国产| 免费欧美在线视频| 国产视频不卡一区| 在线欧美一区二区| 美女一区二区三区在线观看| 综合婷婷亚洲小说| 91精品婷婷国产综合久久性色| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 99国产精品久久久久| 一区二区三区欧美日韩| 久久久另类综合| 欧美日韩久久久| eeuss国产一区二区三区| 亚洲国产va精品久久久不卡综合| 欧美一级理论性理论a| 粉嫩嫩av羞羞动漫久久久 | 欧美成人一区二区| 一区二区三国产精华液| 一区二区三区在线播放| 在线这里只有精品| 大白屁股一区二区视频| 视频一区二区国产| 一区二区三区四区在线免费观看| 久久久久久久久久久黄色| 91精品一区二区三区久久久久久 | 免费精品视频在线| 一区二区久久久久| 国产精品盗摄一区二区三区| 国产亚洲一区二区在线观看| 日韩一区二区电影网| 在线电影院国产精品| 在线看日韩精品电影| 亚洲影院在线观看| 国产精品久久久久三级| 欧美大片一区二区| 欧美一级二级在线观看| 欧美精品123区| 欧美人成免费网站| 欧美日本国产一区| 欧美日韩在线不卡| 欧美三级中文字幕| 欧美日韩黄色影视| 91精品国产一区二区人妖| 欧美人与性动xxxx| 欧美二区三区91| 欧美日韩在线免费视频| 欧美日韩国产成人在线免费| 欧美色爱综合网| 欧美一区二区三区在线看| 欧美一区二区三区成人| 欧美一激情一区二区三区| 日韩视频免费观看高清完整版在线观看 | 国产精品综合二区| 蜜臀久久久99精品久久久久久| 五月天婷婷综合| 老司机精品视频线观看86| 精品综合久久久久久8888| 国产一区二区三区黄视频| 国产福利一区二区三区在线视频| 国产很黄免费观看久久| 成人av综合一区| 欧美亚洲综合久久| 4438x亚洲最大成人网| 欧美日韩国产天堂| 欧美变态tickling挠脚心| 色综合视频在线观看| 欧美欧美欧美欧美首页| 日韩欧美一二三| 欧美极品美女视频| 亚洲妇女屁股眼交7| 三级欧美在线一区| 成人精品电影在线观看| 欧美三区在线观看| 久久这里只有精品视频网| 中文字幕亚洲精品在线观看| 天堂成人免费av电影一区| 国产精品亚洲第一区在线暖暖韩国 | 国产福利不卡视频| 高清免费成人av| 在线观看中文字幕不卡| 久久综合色综合88| 亚洲精品五月天| 国产乱妇无码大片在线观看| 91麻豆6部合集magnet| 欧美一区二区三区四区视频 | 成熟亚洲日本毛茸茸凸凹| 欧美三级蜜桃2在线观看|