no-OS
parameters.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef __PARAMETERS_H__
35 #define __PARAMETERS_H__
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include <stdio.h>
41 #include <xparameters.h>
42 #include <xil_cache.h>
43 #include <xilinx_uart.h>
44 
45 #include "axi_pwm_extra.h"
46 #include "spi_engine.h"
47 
48 /******************************************************************************/
49 /********************** Macros and Constants Definitions **********************/
50 /******************************************************************************/
51 #ifdef _XPARAMETERS_PS_H_
52 #define UART_DEVICE_ID XPAR_XUARTPS_0_DEVICE_ID
53 #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
54 
55 #ifdef XPS_BOARD_ZCU102
56 #define UART_IRQ_ID XPAR_XUARTPS_0_INTR
57 #else
58 #define UART_IRQ_ID XPAR_XUARTPS_1_INTR
59 #endif
60 
61 #else // _XPARAMETERS_PS_H_
62 #define UART_DEVICE_ID XPAR_AXI_UART_DEVICE_ID
63 #define INTC_DEVICE_ID XPAR_INTC_SINGLE_DEVICE_ID
64 #define UART_IRQ_ID XPAR_AXI_INTC_AXI_UART_INTERRUPT_INTR
65 #endif // _XPARAMETERS_PS_H_
66 
67 #define UART_EXTRA &uart_extra_ip
68 #define UART_OPS &xil_uart_ops
69 
70 #define DCACHE_INVALIDATE Xil_DCacheInvalidateRange
71 
72 #define UART_BAUDRATE 115200
73 
74 #define DMA_BASEADDR XPAR_AXI_PULSAR_ADC_DMA_BASEADDR
75 #define SPI_ENGINE_BASEADDR XPAR_SPI_PULSAR_ADC_SPI_PULSAR_ADC_AXI_REGMAP_BASEADDR
76 #define RX_CLKGEN_BASEADDR XPAR_SPI_CLKGEN_BASEADDR
77 #define AXI_PWMGEN_BASEADDR XPAR_PULSAR_ADC_TRIGGER_GEN_BASEADDR
78 #define ADC_DDR_BASEADDR (XPAR_DDR_MEM_BASEADDR + 0x800000)
79 
80 #define SAMPLES_PER_CHANNEL_PLATFORM 2000
81 #define MAX_SIZE_BASE_ADDR (SAMPLES_PER_CHANNEL_PLATFORM * sizeof(uint32_t))
82 
83 #define SPI_ENG_REF_CLK_FREQ_HZ XPAR_PS7_SPI_0_SPI_CLK_FREQ_HZ
84 
85 #define REFCLK_RATE 160000000
86 
87 #define SPI_DEVICE_ID 0
88 #define SPI_OPS &spi_eng_platform_ops
89 #define SPI_EXTRA &spi_eng_init_param
90 #define SPI_CS 0
91 #define SPI_BAUDRATE 80000000
92 
93 #define PWM_OPS &axi_pwm_ops
94 #define PWM_EXTRA &pulsar_adc_axi_pwm_init
95 #define PWM_PERIOD 555
96 #define PWM_DUTY 10
97 
98 #define PULSAR_ADC_ADC_REF_VOLTAGE 5000
99 
100 extern struct xil_uart_init_param uart_extra_ip;
103 #endif /* __PARAMETERS_H__ */
pulsar_adc_axi_pwm_init
struct axi_pwm_init_param pulsar_adc_axi_pwm_init
Definition: parameters.c:48
xilinx_uart.h
uart_extra_ip
struct xil_uart_init_param uart_extra_ip
Definition: parameters.c:40
spi_eng_init_param
struct spi_engine_init_param spi_eng_init_param
Definition: parameters.c:55
spi_engine.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
axi_pwm_extra.h