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

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

?? xuartlite_intr.c

?? Xilinx XC4VSX35為核心的 XtremeDSP Development Kit-IV 開發板的例程
?? C
字號:
/* $Id: xuartlite_intr.c,v 1.9 2005/01/04 18:06:01 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);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品免费视频网站| 肉丝袜脚交视频一区二区| 国产成人自拍高清视频在线免费播放| 日韩一区二区免费电影| 麻豆国产欧美日韩综合精品二区| 日韩视频一区二区在线观看| 久久精品噜噜噜成人av农村| 久久在线免费观看| 成人性生交大合| 亚洲色图视频免费播放| 在线观看av一区| 日av在线不卡| 国产片一区二区| 91在线视频在线| 视频一区中文字幕| 精品国产乱码久久| 成人免费毛片高清视频| 亚洲色图一区二区三区| 欧美高清视频www夜色资源网| 日本网站在线观看一区二区三区| 久久亚洲私人国产精品va媚药| 成人性视频免费网站| 亚洲综合激情网| 欧美mv日韩mv亚洲| 99精品黄色片免费大全| 三级精品在线观看| 亚洲国产高清不卡| 欧美电影在线免费观看| 国产制服丝袜一区| 亚洲乱码国产乱码精品精98午夜| 欧美一区二区黄| jlzzjlzz欧美大全| 免费的国产精品| 国产精品国产三级国产aⅴ原创| 欧美日韩免费一区二区三区视频| 国产精品亚洲第一| 性欧美疯狂xxxxbbbb| 久久久久国产一区二区三区四区| 色欧美日韩亚洲| 国内精品伊人久久久久av影院 | 日韩一区二区在线看| 成人自拍视频在线| 日韩不卡在线观看日韩不卡视频| 国产精品女同一区二区三区| 在线电影院国产精品| 99久久精品免费精品国产| 久久国产精品99久久久久久老狼 | 91免费看片在线观看| 久久精品国产精品青草| 一区二区三区在线看| 国产亚洲一区二区在线观看| 5月丁香婷婷综合| 色综合天天性综合| 国产精品 欧美精品| 日本成人在线电影网| 亚洲一二三四久久| 亚洲欧美激情小说另类| 国产亚洲婷婷免费| 日韩一区二区三区免费观看| 欧美日韩在线精品一区二区三区激情| 东方aⅴ免费观看久久av| 麻豆国产欧美一区二区三区| 亚洲成人综合在线| 一区二区三区在线观看视频| 中文字幕一区二区三区色视频| 欧美精品一区二区在线播放| 欧美一二三在线| 日韩一区二区三区在线| 欧美一区日本一区韩国一区| 欧美三级中文字幕| 欧洲日韩一区二区三区| 色综合一个色综合亚洲| 99精品欧美一区二区三区小说 | 一区二区三区日韩欧美| 国产精品久久久久一区二区三区共| 欧美精品一区二区三| 日韩欧美的一区| 欧美成人一区二区三区片免费| 宅男在线国产精品| 日韩限制级电影在线观看| 在线播放/欧美激情| 欧美一区二区黄色| 欧美大度的电影原声| 2020国产精品自拍| 久久蜜桃av一区精品变态类天堂| 欧美成人video| 精品成人私密视频| 国产亚洲1区2区3区| 中文av一区特黄| 亚洲精品亚洲人成人网在线播放| 亚洲靠逼com| 亚洲超碰精品一区二区| 日本在线播放一区二区三区| 免费视频最近日韩| 国产成人自拍网| 91丨九色丨尤物| 在线观看成人小视频| 欧美日韩国产123区| 日韩欧美电影在线| 国产午夜精品理论片a级大结局| 国产精品天干天干在观线| 亚洲欧洲中文日韩久久av乱码| 亚洲午夜电影网| 久热成人在线视频| 成人黄色软件下载| 欧美精品视频www在线观看| 精品国内二区三区| 亚洲同性同志一二三专区| 亚洲成人av福利| 久久se这里有精品| 91猫先生在线| 日韩一级二级三级精品视频| 欧美—级在线免费片| 亚洲一区在线视频| 精品在线视频一区| 91麻豆免费看| 精品久久久久久久久久久久久久久 | 亚洲午夜久久久久久久久久久 | 国产精品国产三级国产普通话蜜臀| 亚洲最新在线观看| 激情文学综合网| 色偷偷一区二区三区| 日韩一区二区三区免费看 | 久久婷婷久久一区二区三区| 亚洲精品亚洲人成人网| 国产一区二区三区在线观看精品 | 国产欧美一区在线| 日本在线不卡一区| 色综合久久天天综合网| 久久婷婷国产综合精品青草| 有坂深雪av一区二区精品| 欧美午夜精品免费| 精品国产人成亚洲区| 亚洲一区二区三区四区不卡| 亚洲欧美在线aaa| 蜜桃视频一区二区三区在线观看| 成人福利视频在线看| 日韩欧美中文字幕精品| 一区二区三区在线免费视频| 成人性生交大合| 亚洲精品在线免费观看视频| 亚洲亚洲精品在线观看| 午夜亚洲国产au精品一区二区| 成人动漫一区二区| 一区二区中文视频| 色94色欧美sute亚洲线路一久| 亚洲伦理在线精品| 欧美午夜片在线看| 日韩成人免费电影| 久久五月婷婷丁香社区| 成人亚洲精品久久久久软件| 中文字幕一区二| 欧美午夜精品理论片a级按摩| 性做久久久久久| 日韩欧美国产精品一区| 国产一区二区三区综合| 国产精品美女久久福利网站| 91色.com| 亚洲国产日韩a在线播放性色| 欧美一区二区三区婷婷月色| 国产在线播放一区| 中文字幕一区二区三区在线观看| 色婷婷激情久久| 午夜精品久久久久久不卡8050| 日韩午夜在线观看| 国产精品77777| 亚洲色图在线播放| 欧美一区二区人人喊爽| 粉嫩蜜臀av国产精品网站| 亚洲伊人色欲综合网| 精品国产一区二区三区av性色| 不卡的av网站| 亚洲成人动漫在线观看| 久久网站热最新地址| 欧美综合一区二区| 黄一区二区三区| 亚洲精品午夜久久久| 精品久久国产字幕高潮| 色吧成人激情小说| 黑人精品欧美一区二区蜜桃| 亚洲欧美综合在线精品| 欧美一级二级三级蜜桃| 91在线小视频| 精品一区二区在线视频| 亚洲免费大片在线观看| 日韩免费电影网站| 一本一本大道香蕉久在线精品 | 成人的网站免费观看| 亚洲福利国产精品| 中文字幕免费不卡在线| 欧美日本乱大交xxxxx| 国产乱色国产精品免费视频| 亚洲综合视频在线| 亚洲国产高清不卡| 欧美成人vr18sexvr| 欧美在线|欧美| 成人激情免费电影网址| 久久精品国产77777蜜臀| 夜夜爽夜夜爽精品视频| 国产三级精品三级|