]> git.sur5r.net Git - freertos/blob - Demo/PPC405_Xilinx_Virtex4_GCC/TestApp_Peripheral/src/TestApp_Peripheral.c
Add PPC405 port in V10.1 format.
[freertos] / Demo / PPC405_Xilinx_Virtex4_GCC / TestApp_Peripheral / src / TestApp_Peripheral.c
1 /*
2  *
3  * Xilinx, Inc.
4  * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A 
5  * COURTESY TO YOU.  BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
6  * ONE POSSIBLE   IMPLEMENTATION OF THIS FEATURE, APPLICATION OR 
7  * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION 
8  * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE 
9  * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION
10  * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO 
11  * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO 
12  * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE 
13  * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY 
14  * AND FITNESS FOR A PARTICULAR PURPOSE.
15  */
16
17 /*
18  * Xilinx EDK 10.1 EDK_K.15
19  *
20  * This file is a sample test application
21  *
22  * This application is intended to test and/or illustrate some 
23  * functionality of your system.  The contents of this file may
24  * vary depending on the IP in your system and may use existing
25  * IP driver functions.  These drivers will be generated in your
26  * XPS project when you run the "Generate Libraries" menu item
27  * in XPS.
28  *
29  * Your XPS project directory is at:
30  *    C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PPC405_Xilinx_Virtex4_GCC\
31  */
32
33
34 // Located in: ppc405_0/include/xparameters.h
35 #include "xparameters.h"
36
37 #include "xcache_l.h"
38
39 #include "xintc.h"
40 #include "xexception_l.h"
41 #include "intc_header.h"
42 #include "xuartlite.h"
43 #include "uartlite_header.h"
44 #include "uartlite_intr_header.h"
45 #include "xbasic_types.h"
46 #include "xgpio.h"
47 #include "gpio_header.h"
48
49 //====================================================
50
51 int main (void) {
52
53
54    static XIntc intc;
55
56    XCache_EnableICache(0x00000001);
57    XCache_EnableDCache(0x00000001);
58    static XUartLite RS232_Uart_UartLite;
59
60
61    {
62       XStatus status;
63                         
64 //      status = IntcSelfTestExample(XPAR_XPS_INTC_0_DEVICE_ID);
65
66    } 
67         
68    {
69        XStatus Status;
70
71 //       Status = IntcInterruptSetup(&intc, XPAR_XPS_INTC_0_DEVICE_ID);
72
73    }
74
75
76    {
77       XStatus status;
78       
79  //     status = UartLiteSelfTestExample(XPAR_RS232_UART_DEVICE_ID);
80    }
81         
82    {
83       XStatus Status;
84 //      Status = UartLiteIntrExample(&intc, &RS232_Uart_UartLite, \
85 //                                  XPAR_RS232_UART_DEVICE_ID, \
86 //                                  XPAR_XPS_INTC_0_RS232_UART_INTERRUPT_INTR);
87    }
88
89
90    {
91       XStatus status;
92       
93       status = GpioOutputExample(XPAR_LEDS_4BIT_DEVICE_ID,4);
94    }
95
96
97    {
98       XStatus status;
99       
100       status = GpioOutputExample(XPAR_LEDS_POSITIONS_DEVICE_ID,5);
101    }
102
103    XCache_DisableDCache();
104    XCache_DisableICache();
105    return 0;
106 }
107