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