no-OS
parameters.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __PARAMETERS_H__
34 #define __PARAMETERS_H__
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 
40 #include <xparameters.h>
41 #include "xilinx_spi.h"
42 #include "xilinx_gpio.h"
43 #include "xil_cache.h"
44 #ifdef IIO_SUPPORT
45 #include "xilinx_uart.h"
46 #endif
47 
48 /******************************************************************************/
49 /********************** Macros and Constants Definitions **********************/
50 /******************************************************************************/
51 
52 /* GPIO Indexes */
53 #ifndef XILINX_PLATFORM
54 #define GPIO_RESET_N 0
55 #define GPIO_LDAC_N 1
56 #define GPIO_SPI_QPI 2
57 #define GPIO_ALERT_N 3
58 #define GPIO_SYNC_EVENTS 4
59 #define GPIO_RED 5 //GPIO_6
60 #define GPIO_GREEN 6 //GPIO_7
61 #define GPIO_BLUE 7 //GPIO_8
62 #define TOTAL_GPIOS 8
63 #else
64 #define GPIO_LDAC_N 0
65 #define GPIO_ALERT_N 1
66 #define GPIO_RED 2 /* GPIO_6 */
67 #define GPIO_GREEN 3 /* GPIO_7 */
68 #define GPIO_BLUE 4 /* GPIO_8 */
69 #define GPIO_9 5
70 #define GPIO_RESET_N 6
71 #define GPIO_SPI_QPI 7
72 #define TOTAL_GPIOS 8
73 #endif /* XILINX_PLATFORM */
74 
75 #define GPIO_BANK_0_PINS 32
76 #define GPIO_BANK_1_PINS 22
77 #define GPIO_BANK_2_PINS 32
78 #define GPIO_BANK_3_OFFSET (GPIO_BANK_0_PINS + GPIO_BANK_1_PINS + \
79  GPIO_BANK_2_PINS)
80 
81 #define GPIO_OFFSET GPIO_BANK_3_OFFSET
82 
83 #define MAX_BUFF_SAMPLES 10000
84 #define UART_BAUDRATE 115200
85 
86 #define SPI_DEVICE_ID XPAR_PS7_SPI_0_DEVICE_ID
87 #define GPIO_DEVICE_ID XPAR_PS7_GPIO_0_DEVICE_ID
88 #define UART_DEVICE_ID XPAR_XUARTPS_0_DEVICE_ID
89 #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
90 
91 #define UART_IRQ_ID XPAR_XUARTPS_1_INTR
92 
93 #define TX_CORE_BASEADDR XPAR_AXI_AD3552R_DAC_BASEADDR
94 #define TX_DMA_BASEADDR XPAR_AXI_DAC_DMA_BASEADDR
95 #define TX_CLKGEN_BASEADDR XPAR_AXI_CLKGEN_BASEADDR
96 
97 #define GPIO_OPS &xil_gpio_ops
98 #define GPIO_EXTRA &xil_gpio_param
99 #define SPI_EXTRA &xil_spi_param
100 
101 #endif // __PARAMETERS_H__
xilinx_uart.h
xilinx_gpio.h
xilinx_spi.h