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

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

?? xuartlite_intr.c

?? 關于xilinx大學計劃配需教程實驗五源代碼
?? C
字號:
/* $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);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
尤物在线观看一区| 久久久久久99精品| 91麻豆国产在线观看| 国产精品一二三| 国产一区二区三区在线看麻豆| 亚洲一二三专区| 亚洲国产精品视频| 亚洲一区二区四区蜜桃| 亚洲v日本v欧美v久久精品| 亚洲国产一二三| 三级不卡在线观看| 久久 天天综合| 国产伦精品一区二区三区免费迷| 国产一区免费电影| 国产.精品.日韩.另类.中文.在线.播放| 国产一区二区三区免费播放| 懂色av中文字幕一区二区三区| 国产精品一区二区黑丝| 99视频一区二区| 在线观看日韩高清av| 欧美精品日韩精品| 日韩欧美三级在线| 国产精品久久久久影院老司| 亚洲精品日日夜夜| 男女男精品视频网| 国产suv一区二区三区88区| 91在线观看免费视频| 欧美吻胸吃奶大尺度电影 | 成人动漫一区二区| 色综合婷婷久久| 91精品国产综合久久精品麻豆| 日韩精品一区二区在线| 中文字幕国产一区二区| 亚洲香蕉伊在人在线观| 狠狠色丁香久久婷婷综合_中 | 色综合色狠狠天天综合色| 色婷婷精品久久二区二区蜜臀av| 欧美一区永久视频免费观看| 久久精品视频一区| 亚洲一区二区三区不卡国产欧美 | 国产亚洲欧洲997久久综合| 自拍偷拍国产精品| 久久99国产乱子伦精品免费| 91麻豆swag| 日韩一级完整毛片| 国产精品毛片无遮挡高清| 亚洲成人免费观看| 成人手机在线视频| 日韩一区和二区| 亚洲一线二线三线视频| 国产成人午夜99999| 欧美日韩免费在线视频| 亚洲日本一区二区| 国产一区二区伦理片| 92国产精品观看| 亚洲国产精品精华液2区45| 日本91福利区| 欧美三级午夜理伦三级中视频| 久久久久久久久久久电影| 五月婷婷欧美视频| 在线欧美小视频| 国产精品久99| 国产成人av电影在线播放| 日韩欧美区一区二| 日本成人在线不卡视频| 欧美亚洲日本国产| 一区在线播放视频| 国产a视频精品免费观看| 精品国产三级电影在线观看| 日韩**一区毛片| 在线电影国产精品| 日韩电影在线免费看| 欧美日韩在线免费视频| 亚洲综合一区二区三区| 欧美色爱综合网| 一区二区久久久| 欧美在线看片a免费观看| 亚洲视频在线观看一区| 91在线国产福利| 亚洲免费av高清| 91久久精品网| 午夜精品一区二区三区三上悠亚| 色哟哟一区二区三区| 亚洲国产精品久久一线不卡| 欧美日韩一级二级| 日韩精品色哟哟| 精品av久久707| 国产v综合v亚洲欧| 亚洲免费观看高清完整| 色哦色哦哦色天天综合| 亚洲综合久久久| 日韩视频国产视频| 国产精品一区二区黑丝 | 91网站最新网址| 亚洲日本va午夜在线影院| 在线观看日韩电影| 日本不卡一区二区| 久久久精品国产免大香伊| 成人午夜视频在线| 亚洲最大色网站| 精品国产一区二区三区久久影院| 国产精品77777竹菊影视小说| 亚洲国产精品精华液ab| 欧美羞羞免费网站| 精品制服美女丁香| 国产精品久久久久毛片软件| 色嗨嗨av一区二区三区| 蜜臀av国产精品久久久久| 久久这里都是精品| 欧美自拍偷拍一区| 韩日精品视频一区| 亚洲人吸女人奶水| 精品乱码亚洲一区二区不卡| 不卡的av电影在线观看| 丝袜国产日韩另类美女| 日本一区二区三区免费乱视频| 色婷婷综合久久久中文一区二区| 日韩成人午夜电影| 中文字幕av一区 二区| 91麻豆精品国产| 91网站最新地址| 国产精品亚洲综合一区在线观看| 亚洲精品国产第一综合99久久 | 欧美喷水一区二区| 国产成人在线色| 亚洲电影在线播放| 亚洲欧洲综合另类| 久久一日本道色综合| 欧美撒尿777hd撒尿| 色呦呦一区二区三区| 精品一区二区免费| 午夜精品久久久久久久久久久| 国产精品久99| 久久久久久久久99精品| 日韩一区二区免费在线观看| 在线观看日产精品| 成av人片一区二区| 国产精品一区二区在线观看不卡| 日韩精品视频网| 亚洲va在线va天堂| 亚洲激情图片一区| 综合久久久久久久| 亚洲日本在线天堂| 国产三级三级三级精品8ⅰ区| 欧美一级欧美三级| 91麻豆精品国产无毒不卡在线观看| 91亚洲永久精品| 99久久综合99久久综合网站| 国产福利精品一区| 国产精品亚洲一区二区三区在线| 日韩影院在线观看| 免费不卡在线视频| 日韩av电影免费观看高清完整版| 亚洲va国产va欧美va观看| 亚洲国产日韩一级| 亚洲亚洲人成综合网络| 亚洲综合久久av| 污片在线观看一区二区| 亚洲成人www| 日韩中文字幕区一区有砖一区| 性欧美大战久久久久久久久| 午夜精品久久久久久| 亚洲国产你懂的| 午夜影院在线观看欧美| 日韩成人伦理电影在线观看| 日韩精品福利网| 国内精品国产成人| 国产福利精品导航| 一本久久综合亚洲鲁鲁五月天| 99精品视频在线免费观看| 99久久精品国产一区二区三区 | 午夜精品久久久| 久久国产综合精品| 99视频一区二区| 欧亚洲嫩模精品一区三区| 欧美日韩成人综合在线一区二区 | 久久久激情视频| 中文字幕中文字幕一区| 亚洲精品视频在线观看网站| 婷婷成人激情在线网| 精品一区二区在线播放| 成人小视频在线| 欧美日韩aaaaaa| 久久久久久久免费视频了| 亚洲欧美国产高清| 欧美aaa在线| 91在线国内视频| 欧美精品一区二区精品网| 亚洲欧美激情视频在线观看一区二区三区| 亚洲一本大道在线| 国产一区二区三区电影在线观看| 91麻豆国产自产在线观看| 欧美精品 日韩| 亚洲欧美激情一区二区| 老司机精品视频在线| 色综合一个色综合亚洲| 久久天堂av综合合色蜜桃网 | 欧美精品免费视频| 亚洲国产电影在线观看| 日本免费在线视频不卡一不卡二|