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 
45 /******************************************************************************/
46 /********************** Macros and Constants Definitions **********************/
47 /******************************************************************************/
48 
49 /* GPIO Indexes */
50 #ifndef XILINX_PLATFORM
51 #define GPIO_RESET_N 0
52 #define GPIO_LDAC_N 1
53 #define GPIO_SPI_QPI 2
54 #define GPIO_ALERT_N 3
55 #define GPIO_SYNC_EVENTS 4
56 #define GPIO_RED 5 //GPIO_6
57 #define GPIO_GREEN 6 //GPIO_7
58 #define GPIO_BLUE 7 //GPIO_8
59 #define TOTAL_GPIOS 8
60 #else
61 #define GPIO_LDAC_N 0
62 #define GPIO_ALERT_N 1
63 #define GPIO_RED 2 /* GPIO_6 */
64 #define GPIO_GREEN 3 /* GPIO_7 */
65 #define GPIO_BLUE 4 /* GPIO_8 */
66 #define GPIO_9 5
67 #define GPIO_RESET_N 6
68 #define GPIO_SPI_QPI 7
69 #define TOTAL_GPIOS 8
70 #endif /* XILINX_PLATFORM */
71 
72 #define GPIO_BANK_0_PINS 32
73 #define GPIO_BANK_1_PINS 22
74 #define GPIO_BANK_2_PINS 32
75 #define GPIO_BANK_3_OFFSET (GPIO_BANK_0_PINS + GPIO_BANK_1_PINS + \
76  GPIO_BANK_2_PINS)
77 
78 #define GPIO_OFFSET GPIO_BANK_3_OFFSET
79 
80 #define MAX_BUFF_SAMPLES 10000
81 #define UART_BAUDRATE 115200
82 
83 #define SPI_DEVICE_ID XPAR_PS7_SPI_0_DEVICE_ID
84 #define GPIO_DEVICE_ID XPAR_PS7_GPIO_0_DEVICE_ID
85 #define UART_DEVICE_ID XPAR_XUARTPS_0_DEVICE_ID
86 #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
87 
88 #define UART_IRQ_ID XPAR_XUARTPS_1_INTR
89 
90 #define TX_CORE_BASEADDR XPAR_AXI_AD3552R_DAC_BASEADDR
91 #define TX_DMA_BASEADDR XPAR_AXI_DAC_DMA_BASEADDR
92 #define TX_CLKGEN_BASEADDR XPAR_AXI_CLKGEN_BASEADDR
93 
94 #define GPIO_OPS &xil_gpio_ops
95 #define GPIO_EXTRA &xil_gpio_param
96 #define SPI_EXTRA &xil_spi_param
97 
98 #endif // __PARAMETERS_H__
xilinx_gpio.h
xilinx_spi.h