Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/Pmods/Common/sw/axi_interrupts.h

raw symbols SCIP
1 /**************************************************************************//**
2 * @file axi_interrupts.h
3 * @brief AXI Interrupts handling functions header file.
4 * @author ATofan ([email protected])
5 *
6 *******************************************************************************
7 * Copyright 2011(c) Analog Devices, Inc.
8 *
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without modification,
12 * are permitted provided that the following conditions are met:
13 * - Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * - Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
19 * - Neither the name of Analog Devices, Inc. nor the names of its
20 * contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
22 * - The use of this software may or may not infringe the patent rights
23 * of one or more patent holders. This license does not release you
24 * from the requirement that you obtain separate licenses from these
25 * patent holders to use this software.
26 * - Use of the software either in source or binary form, must be run
27 * on or directly connected to an Analog Devices Inc. component.
28 *
29 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED
30 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY
31 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34 * INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 *******************************************************************************
41 * SVN Revision: $WCREV$
42 ******************************************************************************/
43 #include "system_config.h"
44
45 #ifndef AXI_INTERRUPTS_H_
46 #define AXI_INTERRUPTS_H_
47
48 #if(USE_PS7 == 0)
49 #include "xparameters.h"
50 #include "mb_interface.h"
51 #include "xintc_l.h"
52 #include "Xintc_l.h"
53
54 // Interrupt controller
55 #define INTC_BASEADDR XPAR_AXI_INTC_0_BASEADDR
56 // UART
57 #define UART_BASEADDR XPAR_USB_UART_BASEADDR
58 #define UART_INTERRUPT XPAR_AXI_INTC_0_USB_UART_INTERRUPT_INTR
59 #define UART_INTERRUPT_MASK XPAR_USB_UART_INTERRUPT_MASK
60 // Timer
61 #define TIMER_BASEADDR XPAR_AXI_TIMER_0_BASEADDR
62 #define TIMER_INTERRUPT XPAR_AXI_INTC_0_AXI_TIMER_0_INTERRUPT_INTR
63 #define TIMER_INTERRUPT_MASK XPAR_AXI_TIMER_0_INTERRUPT_MASK
64 // External Interrupts
65 #define EXT_BASEADDR XPAR_AXI_GPIO_0_BASEADDR
66 #define EXT_INTERRUPT XPAR_AXI_INTC_0_AXI_GPIO_0_IP2INTC_IRPT_INTR
67 #define EXT_INTERRUPT_MASK XPAR_AXI_GPIO_0_IP2INTC_IRPT_MASK
68 // LEDs
69 #define LED_BASEADDR XPAR_LEDS_4BITS_BASEADDR
70
71 void AxiUartIntrHandler(void);
72 void AxiTimerIntrHandler(void);
73 void AxiIntcInit(void);
74 void AxiUartIntrEnable(void);
75 void AxiTimerIntrEnable(void);
76 void AxiIntrInit(void);
77 void AxiIntrEnable(int intrNr);
78 void AxiIntrDisable(int intrNr);
79 char AxiUartReadChar(void);
80 void AxiExtIntrEnable(void);
81 void AxiExtIntrHandler(void);
82 #endif
83
84 #endif /* AXI_INTERRUPTS_H_ */