no-OS
Loading...
Searching...
No Matches
parameters.h
Go to the documentation of this file.
1/***************************************************************************/
34#ifndef __PARAMETERS_H__
35#define __PARAMETERS_H__
36
37#include "maxim_irq.h"
38#include "maxim_spi.h"
39#include "maxim_gpio.h"
40#include "maxim_uart.h"
41#include "maxim_uart_stdio.h"
42
43#if (TARGET_NUM == 32690)
44#define UART_IRQ_ID UART2_IRQn
45#define UART_DEVICE_ID 2
46#define UART_BAUDRATE 57600
47#else
48#define UART_IRQ_ID UART0_IRQn
49#define UART_DEVICE_ID 0
50#define UART_BAUDRATE 57600
51#endif
52#define UART_EXTRA &adxl355_uart_extra_ip
53#define UART_OPS &max_uart_ops
54
55#if (TARGET_NUM == 78000)
56#define SPI_DEVICE_ID 1
57#define SPI_CS 1
58#elif (TARGET_NUM == 32650)
59#define SPI_DEVICE_ID 1
60#define SPI_CS 0
61#elif (TARGET_NUM == 32690)
62#define SPI_DEVICE_ID 0
63#define SPI_CS 1
64#else
65#define SPI_DEVICE_ID 0
66#define SPI_CS 0
67#endif
68
69#define SPI_BAUDRATE 1000000
70#define SPI_OPS &max_spi_ops
71#define SPI_EXTRA &adxl355_spi_extra_ip
72
75
76#define GPIO_OPS &max_gpio_ops
77
78#if (TARGET_NUM == 78000)
79#define GPIO_DRDY_PIN_NUM 19
80#define GPIO_DRDY_PORT_NUM 0
81/* Setting for Port1 Pin9 used for DATA_READY.
82Has to be adapted accordingly if another pin is used.
83*/
84#define NVIC_GPIO_IRQ GPIO0_IRQn
85#define GPIO_IRQ_ID 0
86#elif (TARGET_NUM == 32655)
87#define GPIO_DRDY_PIN_NUM 9
88#define GPIO_DRDY_PORT_NUM 1
89/* Setting for Port1 Pin9 used for DATA_READY.
90Has to be adapted accordingly if another pin is used.
91 */
92#define NVIC_GPIO_IRQ GPIO1_IRQn
93#define GPIO_IRQ_ID 1
94#elif (TARGET_NUM == 32690)
95#define GPIO_DRDY_PIN_NUM 14
96#define GPIO_DRDY_PORT_NUM 0
97#define NVIC_GPIO_IRQ GPIO0_IRQn
98#define GPIO_IRQ_ID 0
99#endif
100
101#define GPIO_EXTRA &adxl355_gpio_extra_ip
102
104
105#define ADXL355_GPIO_TRIG_IRQ_ID GPIO_DRDY_PIN_NUM
106#define ADXL355_GPIO_CB_HANDLE MXC_GPIO_GET_GPIO(GPIO_DRDY_PORT_NUM)
107
108#define GPIO_IRQ_OPS &max_gpio_irq_ops
109#define GPIO_IRQ_EXTRA &adxl355_gpio_extra_ip
110
112
113#endif /* __PARAMETERS_H__ */
struct aducm_spi_init_param adxl355_spi_extra_ip
Definition parameters.c:36
struct no_os_gpio_init_param adxl355_gpio_drdy_ip
Definition parameters.c:43
struct max_uart_init_param adxl355_uart_extra_ip
Definition parameters.c:36
struct max_gpio_init_param adxl355_gpio_extra_ip
Definition parameters.c:51
GPIO platform specific init parameters.
Definition maxim_gpio.h:55
Maxim specific SPI initialization parameters.
Definition maxim_spi.h:53
Aditional UART config parameters.
Definition maxim_uart.h:55
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67