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

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

?? xuartlite.c

?? Xilinx XC4VSX35為核心的 XtremeDSP Development Kit-IV 開發(fā)板的例程
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: xuartlite.c,v 1.21 2005/01/21 18:38:24 meinelte Exp $ *//*******************************************************************************       XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"*       AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND*       SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,*       OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,*       APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION*       THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,*       AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE*       FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY*       WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE*       IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR*       REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF*       INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS*       FOR A PARTICULAR PURPOSE.**       (c) Copyright 2002 Xilinx Inc.*       All rights reserved.******************************************************************************//****************************************************************************//**** @file xuartlite.c** Contains required functions for the XUartLite driver. See the xuartlite.h* header file for more details on this driver.** <pre>* MODIFICATION HISTORY:** Ver   Who  Date     Changes* ----- ---- -------- -----------------------------------------------* 1.00a ecm  08/31/01 First release* 1.00b jhl  02/21/02 Repartitioned the driver for smaller files* 1.00b rmm  05/13/03 Fixed diab compiler warnings relating to asserts* </pre>******************************************************************************//***************************** Include Files ********************************/#include "xbasic_types.h"#include "xstatus.h"#include "xparameters.h"#include "xuartlite.h"#include "xuartlite_i.h"#include "xio.h"/************************** Constant Definitions ****************************//**************************** Type Definitions ******************************//***************** Macros (Inline Functions) Definitions ********************//************************** Variable Definitions ****************************//************************** Function Prototypes *****************************/static void StubHandler(void *CallBackRef, unsigned int ByteCount);/****************************************************************************//**** Initialize a XUartLite instance.  The receive and transmit FIFOs of the* UART are not flushed, so the user may want to flush them. The hardware* device does not have any way to disable the receiver such that any valid* data may be present in the receive FIFO.  This function disables the UART* interrupt. The baudrate and format of the data are fixed in the hardware* at hardware build time.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.* @param    DeviceId is the unique id of the device controlled by this*           XUartLite instance.  Passing in a device id associates the*           generic XUartLite instance to a specific device, as chosen by*           the caller or application developer.** @return** - XST_SUCCESS if everything starts up as expected.* - XST_DEVICE_NOT_FOUND if the device is not found in the configuration table.** @note** None.******************************************************************************/XStatus XUartLite_Initialize(XUartLite *InstancePtr, Xuint16 DeviceId){    XUartLite_Config *UartLiteConfigPtr;    /*     * Assert validates the input arguments     */    XASSERT_NONVOID(InstancePtr != XNULL);    /*     * Lookup the device configuration in the configuration table. Use this     * configuration info when initializing this component.     */    UartLiteConfigPtr = XUartLite_LookupConfig(DeviceId);    if (UartLiteConfigPtr == (XUartLite_Config *)XNULL)    {        return XST_DEVICE_NOT_FOUND;    }    /*     * Set some default values, including setting the callback     * handlers to stubs.     */    InstancePtr->SendBuffer.NextBytePtr = XNULL;    InstancePtr->SendBuffer.RemainingBytes = 0;    InstancePtr->SendBuffer.RequestedBytes = 0;    InstancePtr->ReceiveBuffer.NextBytePtr = XNULL;    InstancePtr->ReceiveBuffer.RemainingBytes = 0;    InstancePtr->ReceiveBuffer.RequestedBytes = 0;    InstancePtr->IsReady = XCOMPONENT_IS_READY;    InstancePtr->RegBaseAddress = UartLiteConfigPtr->RegBaseAddr;    InstancePtr->RecvHandler = StubHandler;    InstancePtr->SendHandler = StubHandler;    /* Write to the control register to disable the interrupts, don't     * reset the FIFOs are the user may want the data that's present     */    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET, 0);    /*     * Clear the statistics for this driver     */    XUartLite_mClearStats(InstancePtr);    return XST_SUCCESS;}/****************************************************************************//**** This functions sends the specified buffer of data using 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. If the UART is busy* sending data, it will return and indicate zero bytes were sent.** In a polled mode, this function will only send as much data as the UART can* buffer in the FIFO. 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 sending data 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.* @param    BufferPtr is pointer to a buffer of data to be sent.* @param    NumBytes contains the number of bytes to be sent. A value of zero*           will stop a previous send operation that is in progress in interrupt*           mode. Any data that was already put into the transmit FIFO will be*           sent.** @return** The number of bytes actually sent.** @note** The number of bytes is not asserted so that this function may be called with* a value of zero to stop an operation that is already in progress.*******************************************************************************/unsigned int XUartLite_Send(XUartLite *InstancePtr, Xuint8 *DataBufferPtr,                            unsigned int NumBytes){    unsigned int BytesSent;    Xuint32 StatusRegister;    /*     * Assert validates the input arguments     */    XASSERT_NONVOID(InstancePtr != XNULL);    XASSERT_NONVOID(DataBufferPtr != XNULL);    XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);    XASSERT_NONVOID(((signed)NumBytes) >= 0);    /* Enter a critical region by disabling 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);    /* Setup the specified buffer to be sent by setting the instance     * variables so it can be sent with polled or interrupt mode     */    InstancePtr->SendBuffer.RequestedBytes = NumBytes;    InstancePtr->SendBuffer.RemainingBytes = NumBytes;    InstancePtr->SendBuffer.NextBytePtr = DataBufferPtr;    /* Restore the interrupt enable register to it's previous value such     * that the critical region is exited.     * This is done here to minimize the amount of time the interrupt is     * disabled since there is only one interrupt and the receive could     * be filling up while interrupts are blocked.     */    StatusRegister &= XUL_CR_ENABLE_INTR;    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET, StatusRegister);    /* Send the buffer using the UART and return the number of bytes sent */    BytesSent = XUartLite_SendBuffer(InstancePtr);    return BytesSent;}/****************************************************************************//**** 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 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 in the FIFO. 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 receiving data 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.* @param    BufferPtr is pointer to buffer for data to be received into* @param    NumBytes is the number of bytes to be received. A value of zero will*           stop a previous receive operation that is in progress in interrupt mode.** @return** The number of bytes received.** @note** The number of bytes is not asserted so that this function may be called with* a value of zero to stop an operation that is already in progress.******************************************************************************/unsigned int XUartLite_Recv(XUartLite *InstancePtr, Xuint8 *DataBufferPtr,                            unsigned int NumBytes){    unsigned int ReceivedCount;    Xuint32 StatusRegister;    /*     * Assert validates the input arguments     */    XASSERT_NONVOID(InstancePtr != XNULL);    XASSERT_NONVOID(DataBufferPtr != XNULL);    XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);    XASSERT_NONVOID(((signed)NumBytes) >= 0);    /* 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);    /* Setup the specified buffer to be received by setting the instance     * variables so it can be received with polled or interrupt mode     */    InstancePtr->ReceiveBuffer.RequestedBytes = NumBytes;    InstancePtr->ReceiveBuffer.RemainingBytes = NumBytes;    InstancePtr->ReceiveBuffer.NextBytePtr = DataBufferPtr;    /* 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);    /* Receive the data from the UART and return the number of bytes     * received     * This is done here to minimize the amount of time the interrupt is     * disabled since there is only one interrupt and the transmit could     * be emptying out while interrupts are blocked.     */    ReceivedCount = XUartLite_ReceiveBuffer(InstancePtr);    return ReceivedCount;}/****************************************************************************//**** 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色老头久久综合| 国产精品亚洲成人| 一区二区在线观看视频| 日本一区二区视频在线| 2021国产精品久久精品| 亚洲精品一区二区三区香蕉| 欧美一区二区美女| 日韩一区二区三| 国产精品久久久久久福利一牛影视| 欧美成人一区二区| 久久夜色精品一区| 国产农村妇女毛片精品久久麻豆| 久久影音资源网| 国产精品免费久久| 亚洲一区二区av电影| 丝袜美腿高跟呻吟高潮一区| 日本在线不卡一区| 国产精品一区二区91| www.日韩在线| 51午夜精品国产| 26uuu国产在线精品一区二区| 久久只精品国产| 日韩伦理免费电影| 天天操天天综合网| 国产黄色91视频| 91香蕉国产在线观看软件| 91官网在线免费观看| 日韩欧美一级精品久久| 国产精品福利在线播放| 亚洲18影院在线观看| 精品在线观看视频| 日本福利一区二区| 日韩欧美成人激情| 亚洲精品v日韩精品| 久久精品噜噜噜成人av农村| 9色porny自拍视频一区二区| 欧美高清精品3d| 国产精品视频你懂的| 亚洲成va人在线观看| 国产99精品国产| 欧美日韩一二区| 国产精品成人免费精品自在线观看| 亚洲综合精品久久| 国产成人免费视频网站| 欧美日韩国产片| 国产精品久久久久精k8 | 8x8x8国产精品| 国产亚洲一区二区在线观看| 亚洲国产色一区| 91在线精品秘密一区二区| 欧美videos中文字幕| 亚洲制服丝袜av| 成人午夜av在线| 欧美精品一区二区三区高清aⅴ | 午夜欧美电影在线观看| 欧美日韩高清一区二区三区| 国产欧美1区2区3区| 久久精品国产精品亚洲综合| 欧美色涩在线第一页| 亚洲欧洲日本在线| 成人国产一区二区三区精品| 日韩精品中午字幕| 日韩综合在线视频| 欧美在线观看一区二区| 专区另类欧美日韩| 99久久精品免费看国产| 欧美国产禁国产网站cc| 国产高清在线观看免费不卡| 精品国产伦理网| 国产综合色产在线精品| 日韩午夜在线观看| 美女一区二区三区在线观看| 欧美日本在线播放| 日韩精品欧美精品| 3751色影院一区二区三区| 亚洲高清三级视频| 欧美视频在线一区| 亚洲第一会所有码转帖| 欧美三级日本三级少妇99| 亚洲国产一区视频| 欧美一区午夜视频在线观看| 午夜精品福利一区二区蜜股av | 日韩欧美国产三级| 玖玖九九国产精品| 久久久亚洲午夜电影| 国产风韵犹存在线视精品| 国产日韩亚洲欧美综合| 成人av在线一区二区三区| 国产精品少妇自拍| 91蝌蚪porny九色| 亚洲亚洲人成综合网络| 欧美一区二区精美| 国产精品一区在线观看你懂的| 欧美激情一区二区三区| 色妹子一区二区| 五月综合激情网| 欧美成人一区二区三区| 成人一区二区三区| 伊人色综合久久天天| 日韩亚洲欧美成人一区| 国产成人综合精品三级| 亚洲久本草在线中文字幕| 日韩一区二区在线看| 高清国产午夜精品久久久久久| 国产精品亲子伦对白| 欧美视频精品在线观看| 国产综合色视频| 亚洲午夜电影网| 久久一夜天堂av一区二区三区| 99精品视频一区二区三区| 日韩av在线发布| 综合久久久久久| 日韩午夜电影在线观看| www.亚洲激情.com| 精品一区二区三区免费| 亚洲美女屁股眼交| 精品国产a毛片| 欧洲在线/亚洲| 国产伦精品一区二区三区在线观看| 亚洲日本电影在线| 久久一区二区三区四区| 欧美日韩不卡在线| 91欧美激情一区二区三区成人| 青青草国产精品亚洲专区无| 自拍偷在线精品自拍偷无码专区 | 欧美蜜桃一区二区三区| www.亚洲精品| 激情综合五月婷婷| 亚洲va韩国va欧美va| 国产精品久久三区| xvideos.蜜桃一区二区| 欧美三级日韩在线| 色噜噜久久综合| 成人av电影免费在线播放| 黄色日韩网站视频| 日韩av电影天堂| 五月天网站亚洲| 伊人婷婷欧美激情| 亚洲图片你懂的| 成人欧美一区二区三区| 国产亚洲欧美激情| 久久免费视频色| 欧美本精品男人aⅴ天堂| 欧美人与z0zoxxxx视频| 欧美性xxxxxx少妇| 在线观看亚洲一区| 一本色道久久综合狠狠躁的推荐| 国产精品夜夜爽| 国产一区二区福利| 国产精品一区二区久久不卡 | av电影在线观看一区| 国产精品99久| 国产一本一道久久香蕉| 美女爽到高潮91| 美女网站在线免费欧美精品| 日本欧美在线看| 久久成人羞羞网站| 国产一区二区三区蝌蚪| 九色|91porny| 国产美女av一区二区三区| 国产精品99久久久久久似苏梦涵| 国产精品中文有码| 成年人国产精品| 精品动漫一区二区三区在线观看| 日韩一区国产二区欧美三区| 精品免费99久久| 久久久九九九九| 综合亚洲深深色噜噜狠狠网站| 17c精品麻豆一区二区免费| 亚洲视频一二三区| 午夜欧美大尺度福利影院在线看| 日韩va亚洲va欧美va久久| 久久av资源站| 成人毛片在线观看| 欧美艳星brazzers| 日韩免费福利电影在线观看| 国产日韩av一区| ...av二区三区久久精品| 一区二区三区四区不卡视频 | 国产一区亚洲一区| 高清beeg欧美| 欧美日韩久久久一区| 精品国产一区二区三区四区四 | 精品国产凹凸成av人导航| 日本一二三不卡| 亚洲国产综合人成综合网站| 蜜桃久久精品一区二区| av不卡在线播放| 日韩亚洲欧美一区| 亚洲日本在线观看| 日韩激情一区二区| 波多野结衣中文字幕一区 | 欧美久久久久久久久中文字幕| 精品欧美乱码久久久久久 | 蜜臀av一级做a爰片久久| 成人网男人的天堂| 91麻豆精品国产91久久久更新时间 | 午夜视频在线观看一区二区三区| 精品一区中文字幕| 欧美在线小视频|