no-OS
parameters.h
Go to the documentation of this file.
1 /***************************************************************************/
35 #ifndef __PARAMETERS_H__
36 #define __PARAMETERS_H__
37 
38 /******************************************************************************/
39 /***************************** Include Files **********************************/
40 /******************************************************************************/
41 #include <stdio.h>
42 #include <xparameters.h>
43 #include <xil_cache.h>
44 #include <xilinx_uart.h>
45 #include "xilinx_gpio.h"
46 #include "axi_pwm_extra.h"
47 #include "spi_engine.h"
48 
49 /******************************************************************************/
50 /********************** Macros and Constants Definitions **********************/
51 /******************************************************************************/
52 #ifdef _XPARAMETERS_PS_H_
53 #define UART_DEVICE_ID XPAR_XUARTPS_0_DEVICE_ID
54 #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
55 
56 #ifdef XPS_BOARD_ZCU102
57 #define UART_IRQ_ID XPAR_XUARTPS_0_INTR
58 #else
59 #define UART_IRQ_ID XPAR_XUARTPS_1_INTR
60 #endif
61 
62 #else // _XPARAMETERS_PS_H_
63 #define UART_DEVICE_ID XPAR_AXI_UART_DEVICE_ID
64 #define INTC_DEVICE_ID XPAR_INTC_SINGLE_DEVICE_ID
65 #define UART_IRQ_ID XPAR_AXI_INTC_AXI_UART_INTERRUPT_INTR
66 #endif // _XPARAMETERS_PS_H_
67 
68 #define UART_BAUDRATE 115200
69 #define UART_EXTRA &uart_extra_ip
70 
71 #define DMA_BASEADDR XPAR_AXI_AD738X_DMA_BASEADDR
72 #define SPI_ENGINE_BASEADDR XPAR_SPI_AD738X_ADC_SPI_AD738X_ADC_AXI_REGMAP_BASEADDR
73 #define RX_CLKGEN_BASEADDR XPAR_SPI_CLKGEN_BASEADDR
74 #define AXI_PWMGEN_BASEADDR XPAR_SPI_TRIGGER_GEN_BASEADDR
75 
76 #define SPI_DEVICE_ID 0
77 #define SPI_CS 0
78 #define SPI_BAUDRATE 80000000
79 #define SPI_EXTRA &spi_eng_init_param
80 
81 #define TRIGGER_PWM_ID 0
82 #define TRIGGER_PERIOD_NS 250
83 #define TRIGGER_DUTY_NS 10
84 #define TRIGGER_PWM_EXTRA &axi_pwm_init_param
85 
86 #define SAMPLES_PER_CHANNEL 1000
87 #define BYTES_PER_SAMPLE 2
88 #define MAX_SIZE_BASE_ADDR (SAMPLES_PER_CHANNEL * 2 * BYTES_PER_SAMPLE)
89 
90 #define DCACHE_INVALIDATE Xil_DCacheInvalidateRange
91 
93 extern struct axi_clkgen_init clkgen_init;
97 
98 #define SPI_OPS &spi_eng_platform_ops
99 #define PWM_OPS &axi_pwm_ops
100 #define UART_OPS &xil_uart_ops
101 #define CLKGEN_INIT &clkgen_init
102 #define OFFLOAD_INIT &spi_engine_offload_init_param
103 
104 
105 #endif /* __PARAMETERS_H__ */
xilinx_uart.h
uart_extra_ip
struct xil_uart_init_param uart_extra_ip
Definition: parameters.c:40
clkgen_init
struct axi_clkgen_init clkgen_init
Definition: common_data.c:80
axi_clkgen_init
Definition: clk_axi_clkgen.h:50
spi_eng_init_param
struct spi_engine_init_param spi_eng_init_param
Definition: parameters.c:55
spi_engine.h
xilinx_gpio.h
xil_uart_init_param
Structure holding the initialization parameters for Xilinx platform specific UART parameters.
Definition: xilinx_uart.h:67
axi_pwm_init_param
Structure holding the initialization parameters for axi PWM.
Definition: axi_pwm_extra.h:50
spi_engine_init_param
Structure containing the init parameters needed by the SPI engine.
Definition: spi_engine.h:83
spi_engine_offload_init_param
Structure containing the init parameters needed by the offload module.
Definition: spi_engine.h:143
axi_pwm_extra.h