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

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

?? xuartlite_intr.c

?? 本程序用xilinx EDK9.1運(yùn)行
?? C
字號(hào):
/* $Id: xuartlite_intr.c,v 1.1 2006/02/17 22:36:36 moleres 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_intr.c** This file contains interrupt-related functions for the UART Lite component* (XUartLite).** <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* </pre>******************************************************************************//***************************** Include Files ********************************/#include "xbasic_types.h"#include "xuartlite.h"#include "xuartlite_i.h"#include "xio.h"/************************** Constant Definitions ****************************//**************************** Type Definitions ******************************//***************** Macros (Inline Functions) Definitions ********************//************************** Function Prototypes *****************************/static void ReceiveDataHandler(XUartLite *InstancePtr);static void SendDataHandler(XUartLite *InstancePtr);/************************** Variable Definitions ****************************/typedef void (*Handler)(XUartLite *InstancePtr);/****************************************************************************//**** This function sets the handler that will be called when an event (interrupt)* occurs in the driver. The purpose of the handler is to allow application* specific processing to be performed.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.* @param    FuncPtr is the pointer to the callback function.* @param    CallBackRef is the upper layer callback reference passed back when*           the callback function is invoked.** @return** None.** @notes** There is no assert on the CallBackRef since the driver doesn't know what it* is (nor should it)******************************************************************************/void XUartLite_SetRecvHandler(XUartLite *InstancePtr,                              XUartLite_Handler FuncPtr, void *CallBackRef){    /*     * Assert validates the input arguments     * CallBackRef not checked, no way to know what is valid     */    XASSERT_VOID(InstancePtr != XNULL);    XASSERT_VOID(FuncPtr != XNULL);    XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);    InstancePtr->RecvHandler = FuncPtr;    InstancePtr->RecvCallBackRef = CallBackRef;}/****************************************************************************//**** This function sets the handler that will be called when an event (interrupt)* occurs in the driver. The purpose of the handler is to allow application* specific processing to be performed.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.* @param    FuncPtr is the pointer to the callback function.* @param    CallBackRef is the upper layer callback reference passed back when*           the callback function is invoked.** @return** None.** @notes** There is no assert on the CallBackRef since the driver doesn't know what it* is (nor should it)******************************************************************************/void XUartLite_SetSendHandler(XUartLite *InstancePtr,                              XUartLite_Handler FuncPtr, void *CallBackRef){    /*     * Assert validates the input arguments     * CallBackRef not checked, no way to know what is valid     */    XASSERT_VOID(InstancePtr != XNULL);    XASSERT_VOID(FuncPtr != XNULL);    XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);    InstancePtr->SendHandler = FuncPtr;    InstancePtr->SendCallBackRef = CallBackRef;}/****************************************************************************//**** This function is the interrupt handler for the UART lite driver.* It must be connected to an interrupt system by the user such that it is* called when an interrupt for any UART lite occurs. This function* does not save or restore the processor context such that the user must* ensure this occurs.** @param    InstancePtr contains a pointer to the instance of the UART that*           the interrupt is for.** @return** None.** @note** None.*******************************************************************************/void XUartLite_InterruptHandler(XUartLite *InstancePtr){    Xuint32 IsrStatus;    XASSERT_VOID(InstancePtr != XNULL);    /* Read the status register to determine which, coulb be both     * interrupt is active     */    IsrStatus = XIo_In32(InstancePtr->RegBaseAddress + XUL_STATUS_REG_OFFSET);    if ((IsrStatus & (XUL_SR_RX_FIFO_FULL | XUL_SR_RX_FIFO_VALID_DATA)) != 0)    {        ReceiveDataHandler(InstancePtr);    }    if ((IsrStatus & XUL_SR_TX_FIFO_EMPTY) != 0)    {        SendDataHandler(InstancePtr);    }}/****************************************************************************//**** This function handles the interrupt when data is received, either a single* byte when FIFOs are not enabled, or multiple bytes with the FIFO.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** None.** @note** None.******************************************************************************/static void ReceiveDataHandler(XUartLite *InstancePtr){    /*     * If there are bytes still to be received in the specified buffer     * go ahead and receive them     */    if (InstancePtr->ReceiveBuffer.RemainingBytes != 0)    {        XUartLite_ReceiveBuffer(InstancePtr);    }    /* If the last byte of a message was received then call the application     * handler, this code should not use an else from the previous check of     * the number of bytes to receive because the call to receive the buffer     * updates the bytes to receive     */    if (InstancePtr->ReceiveBuffer.RemainingBytes == 0)    {        InstancePtr->RecvHandler(InstancePtr->RecvCallBackRef,                                 InstancePtr->ReceiveBuffer.RequestedBytes -                                 InstancePtr->ReceiveBuffer.RemainingBytes);    }    /* Update the receive stats to reflect the receive interrupt */    InstancePtr->Stats.ReceiveInterrupts++;}/****************************************************************************//**** This function handles the interrupt when data has been sent, the transmit* FIFO is empty (transmitter holding register).** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** None.** @note** None.******************************************************************************/static void SendDataHandler(XUartLite *InstancePtr){    /*     * If there are not bytes to be sent from the specified buffer ,     * call the callback function     */    if (InstancePtr->SendBuffer.RemainingBytes == 0)    {        /* Call the application handler to indicate the data has been sent */        InstancePtr->SendHandler(InstancePtr->SendCallBackRef,                                 InstancePtr->SendBuffer.RequestedBytes -                                 InstancePtr->SendBuffer.RemainingBytes);    }    /*     * Otherwise there is still more data to send in the specified buffer     * so go ahead and send it     */    else    {        XUartLite_SendBuffer(InstancePtr);    }    /* Update the transmit stats to reflect the transmit interrupt */    InstancePtr->Stats.TransmitInterrupts++;}/*****************************************************************************//**** This function disables the UART interrupt. After calling this function,* data may still be received by the UART but no interrupt will be generated* since the hardware device has no way to disable the receiver.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** None.** @note** None.******************************************************************************/void XUartLite_DisableInterrupt(XUartLite *InstancePtr){    XASSERT_VOID(InstancePtr != XNULL);    XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);    /* Write to the control register to disable the interrupts, the only other     * bits in this register are the FIFO reset bits such that writing them     * to zero will not affect them.     */    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET, 0);}/*****************************************************************************//**** This function enables the UART interrupt such that an interrupt will occur* when data is received or data has been transmitted.  The device contains* 16 byte receive and transmit FIFOs such that an interrupt is generated* anytime there is data in the receive FIFO and when the transmit FIFO* transitions from not empty to empty.** @param    InstancePtr is a pointer to the XUartLite instance to be worked on.** @return** None.** @note** None.******************************************************************************/void XUartLite_EnableInterrupt(XUartLite *InstancePtr){    XASSERT_VOID(InstancePtr != XNULL);    XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);    /* Write to the control register to enable the interrupts, the only other     * bits in this register are the FIFO reset bits such that writing them     * to zero will not affect them.     */    XIo_Out32(InstancePtr->RegBaseAddress + XUL_CONTROL_REG_OFFSET,              XUL_CR_ENABLE_INTR);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美高清视频www夜色资源网| 国产伦精品一区二区三区免费迷| 欧美日韩亚洲国产综合| 国产精品萝li| 欧美三级资源在线| 国产尤物一区二区在线| 亚洲色图一区二区| 日韩一二在线观看| 97久久久精品综合88久久| 天天综合网 天天综合色| 久久免费午夜影院| 成人av一区二区三区| 亚洲成人免费视频| 中文一区二区完整视频在线观看| 91黄色免费网站| 激情文学综合插| 亚洲第四色夜色| 日韩美女天天操| 色综合天天综合在线视频| 精油按摩中文字幕久久| 一区二区高清在线| 久久久久国产精品麻豆| 欧美少妇一区二区| 丁香五精品蜜臀久久久久99网站| 日韩激情视频在线观看| 久久精品一区二区三区四区| 欧美三区在线观看| 成人18视频日本| 韩国欧美一区二区| 亚洲电影激情视频网站| 精品成a人在线观看| 欧美色老头old∨ideo| 丁香啪啪综合成人亚洲小说| 麻豆精品久久久| 一区在线观看视频| 久久精品视频免费| 日韩欧美www| 91麻豆国产香蕉久久精品| 国产一区91精品张津瑜| 天天综合网 天天综合色| 亚洲精品日韩一| 国产精品国产馆在线真实露脸| 精品少妇一区二区三区免费观看| 欧美偷拍一区二区| 欧美日韩一区二区在线视频| 欧美日韩国产一区二区三区地区| 欧美综合在线视频| 欧美精品1区2区| 欧美一区二区精美| 精品少妇一区二区三区免费观看 | 91丨porny丨首页| 色综合久久久久久久久久久| 91麻豆蜜桃一区二区三区| 在线观看亚洲a| 欧美猛男男办公室激情| 欧美一区二区美女| 久久精品夜色噜噜亚洲a∨| 中文av一区特黄| 亚洲精品第一国产综合野| 亚洲国产精品天堂| 日韩av中文字幕一区二区三区| 精品在线你懂的| 99久久婷婷国产综合精品电影| 99久久99久久精品免费看蜜桃| 色综合天天性综合| 91精品国模一区二区三区| 久久网站热最新地址| 亚洲欧洲另类国产综合| 亚洲韩国一区二区三区| 日本sm残虐另类| 成人小视频免费观看| 欧美在线色视频| 精品动漫一区二区三区在线观看| 欧美国产欧美综合| 亚洲一二三四在线| 精品一二三四在线| 日本韩国欧美在线| 久久亚洲私人国产精品va媚药| 日韩码欧中文字| 日本色综合中文字幕| 成人高清av在线| 91精品国模一区二区三区| 欧美国产一区二区在线观看| 亚洲一二三四在线观看| 国产一区二区三区在线看麻豆| 95精品视频在线| 欧美大片在线观看一区| 亚洲欧美激情视频在线观看一区二区三区| 日韩不卡在线观看日韩不卡视频| 从欧美一区二区三区| 欧美日本一区二区在线观看| 亚洲国产精品成人综合色在线婷婷| 亚洲精品国产一区二区三区四区在线| 热久久国产精品| 色先锋资源久久综合| 26uuu国产电影一区二区| 亚洲国产欧美另类丝袜| 国产福利一区二区三区视频在线| 欧美性生活大片视频| 国产精品丝袜一区| 蜜臂av日日欢夜夜爽一区| 色欧美片视频在线观看在线视频| 国产亚洲欧美一区在线观看| 午夜亚洲国产au精品一区二区| 波波电影院一区二区三区| 日韩欧美电影在线| 调教+趴+乳夹+国产+精品| 91在线免费播放| 国产偷国产偷亚洲高清人白洁| 奇米影视在线99精品| 在线免费观看日本欧美| 国产亲近乱来精品视频| 久久aⅴ国产欧美74aaa| 678五月天丁香亚洲综合网| 亚洲影院在线观看| 色综合视频在线观看| 国产精品不卡在线观看| 盗摄精品av一区二区三区| 欧美精品一区二区三区在线| 欧美aaaaaa午夜精品| 欧美色图第一页| 亚洲你懂的在线视频| 99精品偷自拍| 中文字幕+乱码+中文字幕一区| 韩国中文字幕2020精品| 精品国产乱码久久久久久夜甘婷婷 | 国产一区二区影院| 日韩视频中午一区| 欧美a一区二区| 欧美久久久久免费| 亚洲一区二区三区美女| 在线免费观看成人短视频| 亚洲欧美色图小说| 一本色道**综合亚洲精品蜜桃冫| 中文字幕欧美日韩一区| 成人激情免费电影网址| 亚洲国产精品传媒在线观看| 成熟亚洲日本毛茸茸凸凹| 国产精品免费网站在线观看| 成人福利电影精品一区二区在线观看| 国产欧美一区二区在线| 99精品视频在线观看免费| 亚洲日本va在线观看| www.色精品| 亚洲最新在线观看| 欧美少妇bbb| 青娱乐精品视频在线| 精品国产网站在线观看| 国产一区二区在线看| 中文字幕第一区二区| www.欧美日韩| 亚洲国产综合色| 91精品国产免费| 狠狠色丁香久久婷婷综合丁香| 久久免费看少妇高潮| 成人a区在线观看| 一区二区三区产品免费精品久久75| 欧美午夜精品一区| 免播放器亚洲一区| 日本一区免费视频| 91蝌蚪porny| 日精品一区二区| 久久久亚洲午夜电影| caoporm超碰国产精品| 亚洲午夜免费电影| 精品国产乱子伦一区| 成人av免费在线播放| 亚洲va欧美va天堂v国产综合| 日韩免费看的电影| 成人黄色电影在线| 午夜精品一区二区三区免费视频 | 亚洲国产精品天堂| 精品va天堂亚洲国产| 色综合一个色综合亚洲| 日韩成人一区二区| 亚洲国产高清在线| 欧美日本不卡视频| 成人午夜视频网站| 日韩专区在线视频| 欧美韩国日本综合| 欧美美女bb生活片| 9i在线看片成人免费| 日韩av高清在线观看| 中文子幕无线码一区tr| 91精品国产综合久久福利软件| 成人高清av在线| 免费人成在线不卡| 亚洲男同1069视频| 久久青草国产手机看片福利盒子 | 最新欧美精品一区二区三区| 欧美一区二区三区四区高清| 国产白丝精品91爽爽久久 | 成人午夜视频在线观看| 日韩中文字幕亚洲一区二区va在线 | aaa亚洲精品| 国模冰冰炮一区二区| 亚洲成va人在线观看| 中文字幕亚洲在| 久久久三级国产网站| 欧美日本一道本在线视频|