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

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

?? xuartlite.c

?? Xilinx XC4VSX35為核心的 XtremeDSP Development Kit-IV 開發板的例程
?? C
?? 第 1 頁 / 共 2 頁
字號:
** 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();}/****************************************************************************** Looks up the device configuration based on the unique device ID.  The table* UartliteConfigTable contains the configuration info for each device in the* system.** @param DeviceId is the unique device ID to match on.** @return** A pointer to the configuration data for the device, or XNULL if no match* was found.** @note** None.*******************************************************************************/XUartLite_Config *XUartLite_LookupConfig(Xuint16 DeviceId){    XUartLite_Config *CfgPtr = XNULL;    int i;    for (i=0; i < XPAR_XUARTLITE_NUM_INSTANCES; i++)    {        if (XUartLite_ConfigTable[i].DeviceId == DeviceId)        {            CfgPtr = &XUartLite_ConfigTable[i];            break;        }    }    return CfgPtr;}/****************************************************************************//**** 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;    Xuint32 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     */    SentCount = 0;    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);    }    /*     * 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;    /*     * 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;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费毛片a| 久久久久久久电影| 久久精子c满五个校花| 一区二区不卡在线视频 午夜欧美不卡在| 性做久久久久久免费观看欧美| 国产成人免费高清| 精品久久人人做人人爰| 亚洲国产精品尤物yw在线观看| 国产成人亚洲综合a∨婷婷图片| 欧美精品色一区二区三区| 一区在线播放视频| 国产99久久久国产精品潘金网站| 制服丝袜亚洲色图| 亚洲第一主播视频| 色婷婷一区二区三区四区| 国产欧美一二三区| 国产一区二区三区在线观看免费视频 | 亚洲成人激情综合网| 不卡在线视频中文字幕| 精品国一区二区三区| 亚洲18女电影在线观看| 欧美在线小视频| 亚洲色欲色欲www| 成人h精品动漫一区二区三区| 久久久亚洲综合| 国产在线国偷精品免费看| 91麻豆精品国产91久久久更新时间 | 成人高清伦理免费影院在线观看| 精品国产乱码久久久久久蜜臀 | 日韩一区和二区| 人人狠狠综合久久亚洲| 欧美日韩大陆一区二区| 五月婷婷激情综合网| 欧美日韩一区二区三区高清| 亚洲日本在线天堂| 欧美在线观看你懂的| 亚洲精品日日夜夜| 精品视频色一区| 亚洲国产wwwccc36天堂| 制服.丝袜.亚洲.中文.综合| 日韩国产欧美视频| 精品日韩欧美一区二区| 国产精品996| 中国av一区二区三区| 91啪亚洲精品| 亚洲sss视频在线视频| 9191精品国产综合久久久久久| 日韩中文字幕一区二区三区| 精品国产电影一区二区| 国产成人小视频| 亚洲免费成人av| 在线电影国产精品| 久久国产免费看| 国产精品女同一区二区三区| 99久久综合国产精品| 亚洲1区2区3区视频| 日韩欧美www| www..com久久爱| 性欧美大战久久久久久久久| 精品欧美一区二区久久| 成人av免费网站| 丝袜亚洲另类欧美综合| 久久精品欧美日韩| 欧美影院午夜播放| 国产成人夜色高潮福利影视| 亚洲精品国产精华液| 日韩视频在线永久播放| 成人三级在线视频| 日韩电影在线观看网站| 国产日产欧美一区| 欧美日本一区二区三区四区| 国产伦理精品不卡| 亚洲一区二区精品3399| 久久网站热最新地址| 色狠狠色狠狠综合| 国产一区在线观看麻豆| 亚洲电影欧美电影有声小说| 国产日韩欧美综合一区| 欧美一区二区播放| 99国产精品久久久久久久久久久| 蜜桃一区二区三区在线观看| 最新国产成人在线观看| 日韩精品在线一区| 欧美性色黄大片手机版| caoporn国产一区二区| 久久国产麻豆精品| 天天综合色天天| 亚洲日本中文字幕区| 欧美国产欧美综合| 精品国产1区2区3区| 欧美日韩国产经典色站一区二区三区| 国产成人亚洲综合a∨婷婷图片| 日本网站在线观看一区二区三区| 国产精品美女久久久久久久久| 精品日韩在线一区| 91麻豆精品国产91久久久久久久久| av在线不卡网| 国产激情一区二区三区桃花岛亚洲| 丝瓜av网站精品一区二区| 一卡二卡欧美日韩| 自拍偷在线精品自拍偷无码专区| www国产成人| 日韩欧美国产午夜精品| 7878成人国产在线观看| 欧美三级日韩三级国产三级| 色呦呦日韩精品| 成人高清在线视频| 国产成人av资源| 国产一区二区福利| 久88久久88久久久| 久久精品国产澳门| 精品亚洲成a人在线观看 | 亚洲无人区一区| 亚洲精品中文在线| 一区二区三区**美女毛片| 国产精品国产三级国产aⅴ中文| 久久精品一区二区三区不卡 | 日韩免费高清av| 精品日产卡一卡二卡麻豆| 精品少妇一区二区三区视频免付费| 日韩一区二区在线播放| 精品精品欲导航| 久久精品亚洲乱码伦伦中文 | 成人三级伦理片| 99精品黄色片免费大全| 日本久久一区二区三区| 欧美色老头old∨ideo| 在线综合亚洲欧美在线视频| 日韩一卡二卡三卡| 久久久午夜精品| 最好看的中文字幕久久| 一区二区三区四区视频精品免费| 亚洲高清免费观看| 麻豆91免费看| 从欧美一区二区三区| 日本韩国欧美国产| 7878成人国产在线观看| 欧美久久久久久久久久| 久久99精品一区二区三区三区| 亚洲国产精品欧美一二99| 日本欧美在线看| 久久福利资源站| 粉嫩在线一区二区三区视频| 色婷婷综合五月| 日韩免费一区二区三区在线播放| 日本一区二区三区四区在线视频| 亚洲手机成人高清视频| 偷拍自拍另类欧美| 国产精品一二三区在线| 欧美性三三影院| 国产亚洲欧洲一区高清在线观看| 亚洲欧美日韩国产中文在线| 麻豆精品国产91久久久久久| 91色在线porny| 久久综合久久99| 一区二区三区加勒比av| 国产一区二区三区视频在线播放| 91小视频免费看| 久久人人爽爽爽人久久久| 一区二区三区91| 国产成人av网站| 欧美高清www午色夜在线视频| 国产精品嫩草99a| 精品一二三四区| 欧美日韩色一区| 亚洲欧美偷拍另类a∨色屁股| 久久99久久久欧美国产| 日本韩国一区二区| 国产拍揄自揄精品视频麻豆| 青青草伊人久久| 在线观看日韩电影| 国产精品国产三级国产aⅴ中文| 老司机午夜精品| 欧美老女人第四色| 亚洲老司机在线| 大美女一区二区三区| 精品久久久久久久人人人人传媒| 亚洲夂夂婷婷色拍ww47| 国产成人日日夜夜| 91精品国产一区二区| 亚洲电影第三页| 在线视频国内一区二区| 国产精品视频一区二区三区不卡| 久久99精品国产| 这里只有精品免费| 丝袜诱惑亚洲看片| 欧美亚洲高清一区| 亚洲自拍偷拍九九九| 日本高清不卡在线观看| 最新日韩在线视频| 成人爽a毛片一区二区免费| 久久精品夜色噜噜亚洲a∨| 精品一区二区三区在线观看国产| 欧美伦理视频网站| 日本怡春院一区二区| 欧美一区在线视频| 麻豆国产欧美日韩综合精品二区 | 91精品国产入口| 蜜臀久久久久久久| 精品国产免费一区二区三区香蕉|