no-OS
parameters.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * @file parameters.h
3  * @brief Parameters header file
4  * @author Robert Budai (robert.budai@analog.com)
5  ********************************************************************************
6  * Copyright (c) 2024 Analog Devices, Inc.
7  *
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met:
12  * - Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * - Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in
16  * the documentation and/or other materials provided with the
17  * distribution.
18  * - Neither the name of Analog Devices, Inc. nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  * - The use of this software may or may not infringe the patent rights
22  * of one or more patent holders. This license does not release you
23  * from the requirement that you obtain separate licenses from these
24  * patent holders to use this software.
25  * - Use of the software either in source or binary form, must be run
26  * on or directly connected to an Analog Devices Inc. component.
27  *
28  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
29  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
30  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31  * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
32  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33  * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
34  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  *******************************************************************************/
39 
40 #ifndef __PARAMETERS_H__
41 #define __PARAMETERS_H__
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 
47 #include "maxim_gpio.h"
48 #include "maxim_i2c.h"
49 #include "maxim_irq.h"
50 #include "maxim_spi.h"
51 #include "maxim_timer.h"
52 #include "maxim_uart.h"
53 #include "maxim_uart_stdio.h"
54 #include "maxim_usb_uart.h"
55 
56 /******************************************************************************/
57 /********************** Macros and Constants Definitions **********************/
58 /******************************************************************************/
59 
60 #define INTC_DEVICE_ID 0
61 #define UART_DEVICE_ID 1
62 #define UART_BAUDRATE 115200
63 #define UART_IRQ_ID USB_IRQn
64 #define UART_OPS &max_usb_uart_ops
65 #define UART_EXTRA &iio_demo_usb_uart_extra_ip
66 
67 #define SPI_CS 0
68 #define SPI_DEVICE_ID 2
69 #define SPI_BAUDRATE 15000000
70 #define SPI_OPS &max_spi_ops
71 
72 #define I2C_EXTRA &vddioh_i2c_extra
73 #define GPIO_EXTRA &vddioh_gpio_extra
74 #define GPIO_OPS &max_gpio_ops
75 #define SPI_PQM_DEVICE_ID 1
76 #define SPI_PQM_BAUDRATE 6000000
77 #define SPI_PQM_EXTRA &spi_extra_ip
78 #define UART_STDIO_EXT &uart_stdio_extra_ip
79 
80 #define TIMER_DEVICE_ID 0
81 #define TIMER_FREQUENCY 1000
82 #define TIMER_TICK_PERIOD 16384
83 #define TIMER_OPS &max_timer_ops
84 #define TIMER_IRQ_ID TMR0_IRQn
85 #define TIMER_IRQ_OPS &max_irq_ops
86 #define TIMER_IRQ_EXTRA NULL
87 #define TIMER_CB_HANDLE MXC_TMR0
88 #define TIMER_TRIG_IRQ_ID TMR0_IRQn
89 
90 #define RESET_GPIO_PIN_NUM 27
91 #define RESET_GPIO_PORT_NUM 1
92 #define GPIO_OPS &max_gpio_ops
93 #define RESET_GPIO_EXTRA &max_reset_gpio_extra_ip
94 
95 #define INTR_GPIO_PIN_NUM 30
96 #define INTR_GPIO_PORT_NUM 0
97 #define INTR_GPIO_EXTRA &max_reset_gpio_extra_ip
98 #define INTR_GPIO_IRQ_ID 0
99 #define INTR_OPS &max_gpio_irq_ops
100 
101 /******************************************************************************/
102 /************************ Variable Declarations ******************************/
103 /******************************************************************************/
104 
107 extern struct max_spi_init_param spi_extra_ip;
113 
114 #endif /* __PARAMETERS_H__ */
iio_demo_usb_uart_extra_ip
struct max_usb_uart_init_param iio_demo_usb_uart_extra_ip
Definition: parameters.c:66
uart_stdio_extra_ip
struct max_uart_init_param uart_stdio_extra_ip
Definition: parameters.c:64
max_i2c_init_param
Definition: maxim_i2c.h:64
max_spi_init_param
Maxim specific SPI initialization parameters.
Definition: maxim_spi.h:59
max_reset_gpio_extra_ip
struct max_gpio_init_param max_reset_gpio_extra_ip
Definition: parameters.c:70
vddioh_i2c_extra
struct max_i2c_init_param vddioh_i2c_extra
Definition: parameters.c:54
iio_demo_uart_extra_ip
struct max_uart_init_param iio_demo_uart_extra_ip
Definition: parameters.c:48
max_uart_init_param
Aditional UART config parameters.
Definition: maxim_uart.h:61
max_intr_gpio_extra_ip
struct max_gpio_init_param max_intr_gpio_extra_ip
Definition: parameters.c:74
max_gpio_init_param
GPIO platform specific init parameters.
Definition: maxim_gpio.h:61
vddioh_gpio_extra
struct max_gpio_init_param vddioh_gpio_extra
Definition: parameters.c:50
max_usb_uart_init_param
Aditional UART config parameters.
Definition: maxim_usb_uart.h:48
spi_extra_ip
struct stm32_spi_init_param spi_extra_ip
Definition: parameters.c:144