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

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

?? xuartlite_intr.c

?? <基于fpga的嵌入式設計上的光盤的第四章第二個實驗
?? 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一区二区三区免费野_久草精品视频
91麻豆精品国产91| 中文字幕二三区不卡| 亚洲欧洲日韩av| 日韩精品乱码av一区二区| 免费人成黄页网站在线一区二区| 精品无人码麻豆乱码1区2区 | 亚洲h精品动漫在线观看| 国模套图日韩精品一区二区| 欧美日韩精品欧美日韩精品一| 国产亚洲精品aa| 精品一区二区精品| 666欧美在线视频| 亚洲一区免费视频| 91久久精品一区二区三区| 欧美精品一区二区三区蜜桃视频| 亚洲香蕉伊在人在线观| 国产一区在线视频| 国产欧美日韩在线视频| 国产一区999| 国产精品久久久久一区二区三区共| 美女一区二区在线观看| 日韩欧美国产午夜精品| 免费在线欧美视频| 欧美一区二区人人喊爽| 日本 国产 欧美色综合| 日韩欧美国产小视频| 国产一区激情在线| 国产午夜精品在线观看| 国产69精品一区二区亚洲孕妇| 国产精品久久久久精k8 | 一区二区理论电影在线观看| 91在线观看成人| 天天射综合影视| 欧美一区二区在线播放| 麻豆91在线看| 亚洲乱码国产乱码精品精可以看| 色噜噜久久综合| 老色鬼精品视频在线观看播放| 日韩一区二区在线观看视频播放| 国产一区二区在线视频| 中文字幕一区二区三| 欧美精品久久天天躁| 亚洲国产精品久久久久秋霞影院 | 狠狠色2019综合网| 成人免费一区二区三区在线观看| 91视频观看视频| 国产一区二区三区精品视频| 亚洲日本va在线观看| 91精品国产综合久久婷婷香蕉| 亚洲免费在线电影| 欧美精品一区二区三区四区 | 欧美电影影音先锋| 国内外精品视频| 另类小说图片综合网| 最新热久久免费视频| 欧美大片在线观看一区二区| 欧美色倩网站大全免费| 成人av免费在线观看| 丰满亚洲少妇av| 精品一区二区三区日韩| 日本一不卡视频| 亚洲成人一二三| 亚洲综合色成人| 亚洲精品国产一区二区三区四区在线 | 日本久久电影网| 色综合激情久久| 欧美在线视频全部完| 不卡av在线网| 色噜噜狠狠一区二区三区果冻| 国产亚洲精品bt天堂精选| 国产成人福利片| 免费看精品久久片| 国产一区二区电影| 国产乱理伦片在线观看夜一区| 国产一区美女在线| 国产黄色成人av| 在线影院国内精品| 欧美日韩久久一区| 久久综合一区二区| 亚洲国产wwwccc36天堂| 日韩不卡在线观看日韩不卡视频| 国产真实乱偷精品视频免| 色久综合一二码| 国产日韩欧美电影| 免费在线观看日韩欧美| 欧美又粗又大又爽| 欧美精品丝袜久久久中文字幕| 麻豆一区二区三区| 99精品一区二区| 国产精品私人自拍| 九九热在线视频观看这里只有精品| 色偷偷成人一区二区三区91| 精品国产一区二区三区忘忧草| 亚洲午夜视频在线| 色又黄又爽网站www久久| 亚洲国产激情av| 国产成人久久精品77777最新版本| 欧美精品久久久久久久多人混战| 国产精品无遮挡| 国产99久久久国产精品| 精品国产一区二区三区久久影院| 午夜精品久久久久久久久| 色94色欧美sute亚洲线路一ni| 在线成人小视频| 久久网这里都是精品| 日本成人在线视频网站| 欧美日韩视频在线一区二区| 成人欧美一区二区三区在线播放| 成人在线视频一区| 国产午夜精品福利| 99国产精品久久久久久久久久久| 国产精品欧美一区二区三区| 不卡在线观看av| 亚洲国产电影在线观看| 91浏览器打开| 成人av网在线| 亚洲在线免费播放| 91精品国产综合久久婷婷香蕉| 国产欧美一区二区三区在线看蜜臀 | 狠狠色狠狠色综合日日91app| 欧美日韩一区小说| 一区二区在线看| 九色综合国产一区二区三区| 成a人片亚洲日本久久| 亚洲自拍都市欧美小说| 91精品国产福利| 成人福利视频网站| 亚洲超丰满肉感bbw| 精品国产一区久久| 色哟哟国产精品免费观看| 男女男精品视频网| 亚洲欧美日韩久久精品| 精品1区2区在线观看| 91欧美激情一区二区三区成人| 欧美国产精品一区二区| 91成人网在线| 亚洲欧美成人一区二区三区| 欧美视频在线播放| 亚洲v日本v欧美v久久精品| 日韩一区二区免费视频| 91麻豆国产香蕉久久精品| 青草av.久久免费一区| 一区二区在线观看免费视频播放| 欧美草草影院在线视频| 欧美一a一片一级一片| 99久久精品情趣| 久久精品国产99国产| 日本不卡高清视频| 免费高清视频精品| 日本一区中文字幕| 美女一区二区在线观看| 亚洲国产精品一区二区尤物区| 中文字幕一区二区在线播放| 亚洲国产精品高清| 国产精品热久久久久夜色精品三区 | 国产精品自拍网站| 成人激情黄色小说| www.激情成人| 久久久99久久| 中文字幕一区二区三区四区| 亚洲欧洲在线观看av| 夜夜精品浪潮av一区二区三区 | 精品乱人伦小说| 中文字幕av一区二区三区免费看| 中文字幕av一区二区三区免费看 | 欧美一区二区三区精品| 久久综合丝袜日本网| 久久久www成人免费毛片麻豆| 亚洲国产高清aⅴ视频| 亚洲综合自拍偷拍| 国产一区二区在线观看视频| 成人激情免费网站| 欧美乱熟臀69xxxxxx| 国产视频一区二区在线观看| 亚洲视频一二三区| 麻豆精品国产91久久久久久| 久久99精品久久久久久国产越南 | 成人免费观看视频| 欧美精品亚洲一区二区在线播放| 欧美精品一区二区精品网| 亚洲日本在线a| 国产成人综合亚洲网站| 欧美性猛片aaaaaaa做受| 国产亚洲综合在线| 亚洲成在线观看| av一区二区三区四区| 欧美成人女星排行榜| 亚洲综合激情小说| av成人免费在线观看| 国产欧美日韩视频在线观看| 亚洲乱码国产乱码精品精98午夜 | 日韩和欧美一区二区三区| 99免费精品在线| 中文字幕一区二区日韩精品绯色| 日韩av在线免费观看不卡| 欧美在线视频全部完| 日韩美女视频一区二区| 91福利在线观看| 日韩极品在线观看| 欧美唯美清纯偷拍|