no-OS
parameters.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef __PARAMETERS_H__
41 #define __PARAMETERS_H__
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include "maxim_irq.h"
47 #include "maxim_spi.h"
48 #include "maxim_gpio.h"
49 #include "maxim_uart.h"
50 #include "maxim_uart_stdio.h"
51 
52 /******************************************************************************/
53 /********************** Macros and Constants Definitions **********************/
54 /******************************************************************************/
55 
56 #ifdef IIO_SUPPORT
57 #define INTC_DEVICE_ID 0
58 #endif
59 
60 #if (TARGET_NUM == 32690)
61 #define UART_IRQ_ID UART2_IRQn
62 #define UART_DEVICE_ID 2
63 #define UART_BAUDRATE 57600
64 #else
65 #define UART_IRQ_ID UART0_IRQn
66 #define UART_DEVICE_ID 0
67 #define UART_BAUDRATE 57600
68 #endif
69 #define UART_EXTRA &adxl355_uart_extra_ip
70 #define UART_OPS &max_uart_ops
71 
72 #if (TARGET_NUM == 78000)
73 #define SPI_DEVICE_ID 1
74 #define SPI_CS 1
75 #elif (TARGET_NUM == 32650)
76 #define SPI_DEVICE_ID 1
77 #define SPI_CS 0
78 #elif (TARGET_NUM == 32690)
79 #define SPI_DEVICE_ID 0
80 #define SPI_CS 1
81 #else
82 #define SPI_DEVICE_ID 0
83 #define SPI_CS 0
84 #endif
85 
86 #define SPI_BAUDRATE 1000000
87 #define SPI_OPS &max_spi_ops
88 #define SPI_EXTRA &adxl355_spi_extra_ip
89 
92 
93 #ifdef IIO_TRIGGER_EXAMPLE
94 #define GPIO_OPS &max_gpio_ops
95 
96 #if (TARGET_NUM == 78000)
97 #define GPIO_DRDY_PIN_NUM 19
98 #define GPIO_DRDY_PORT_NUM 0
99 /* Setting for Port1 Pin9 used for DATA_READY.
100 Has to be adapted accordingly if another pin is used.
101 */
102 #define NVIC_GPIO_IRQ GPIO0_IRQn
103 #define GPIO_IRQ_ID 0
104 #elif (TARGET_NUM == 32655)
105 #define GPIO_DRDY_PIN_NUM 9
106 #define GPIO_DRDY_PORT_NUM 1
107 /* Setting for Port1 Pin9 used for DATA_READY.
108 Has to be adapted accordingly if another pin is used.
109  */
110 #define NVIC_GPIO_IRQ GPIO1_IRQn
111 #define GPIO_IRQ_ID 1
112 #elif (TARGET_NUM == 32690)
113 #define GPIO_DRDY_PIN_NUM 14
114 #define GPIO_DRDY_PORT_NUM 0
115 #define NVIC_GPIO_IRQ GPIO0_IRQn
116 #define GPIO_IRQ_ID 0
117 #else
118 #error IIO_TRIGGER_EXAMPLE is currently supported only on max32655 and max 78000 targets.
119 #endif
120 
121 #define GPIO_EXTRA &adxl355_gpio_extra_ip
122 
123 extern struct no_os_gpio_init_param adxl355_gpio_drdy_ip;
124 
125 #define ADXL355_GPIO_TRIG_IRQ_ID GPIO_DRDY_PIN_NUM
126 #define ADXL355_GPIO_CB_HANDLE MXC_GPIO_GET_GPIO(GPIO_DRDY_PORT_NUM)
127 
128 #define GPIO_IRQ_OPS &max_gpio_irq_ops
129 #define GPIO_IRQ_EXTRA &adxl355_gpio_extra_ip
130 
131 extern struct max_gpio_init_param adxl355_gpio_extra_ip;
132 #endif
133 
134 #endif /* __PARAMETERS_H__ */
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
max_spi_init_param
Maxim specific SPI initialization parameters.
Definition: maxim_spi.h:59
adxl355_spi_extra_ip
struct aducm_spi_init_param adxl355_spi_extra_ip
Definition: parameters.c:48
max_uart_init_param
Aditional UART config parameters.
Definition: maxim_uart.h:61
max_gpio_init_param
GPIO platform specific init parameters.
Definition: maxim_gpio.h:61
adxl355_uart_extra_ip
struct max_uart_init_param adxl355_uart_extra_ip
Definition: parameters.c:48