no-OS
parameters.h
Go to the documentation of this file.
1 /********************************************************************************
2  * @brief Definitions specific to Maxim platform used by max31855 project.
3  * @author Ciprian Regus (ciprian.regus@analog.com)
4  ********************************************************************************
5  * Copyright 2023(c) Analog Devices, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  * - Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * - Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  * - Neither the name of Analog Devices, Inc. nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  * - The use of this software may or may not infringe the patent rights
21  * of one or more patent holders. This license does not release you
22  * from the requirement that you obtain separate licenses from these
23  * patent holders to use this software.
24  * - Use of the software either in source or binary form, must be run
25  * on or directly connected to an Analog Devices Inc. component.
26  *
27  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
28  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
29  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30  * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
31  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32  * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
33  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37  *******************************************************************************/
38 #ifndef __PARAMETERS_H__
39 #define __PARAMETERS_H__
40 
41 #include "maxim_uart.h"
42 #include "maxim_uart_stdio.h"
43 #include "maxim_spi.h"
44 #include "maxim_irq.h"
45 #include "maxim_gpio.h"
46 
47 #ifdef IIO_SUPPORT
48 #define INTC_DEVICE_ID 0
49 #endif
50 #define UART_IRQ_ID UART0_IRQn
51 #define UART_DEVICE_ID 0
52 #define UART_BAUDRATE 57600
53 #define UART_OPS &max_uart_ops
54 #define UART_EXTRA &max_uart_extra
55 
56 #if (TARGET_NUM == 32650)
57 #define SPI_DEVICE_ID 1
58 #define SPI_CS 0
59 #elif (TARGET_NUM == 32660) || (TARGET_NUM == 32655)
60 #define SPI_DEVICE_ID 0
61 #define SPI_CS 0
62 #elif (TARGET_NUM == 32665)
63 #define SPI_DEVICE_ID 2
64 #define SPI_CS 0
65 #elif (TARGET_NUM == 78000)
66 #define SPI_DEVICE_ID 1
67 #define SPI_CS 1
68 #endif
69 
70 #define SPI_MAX_SPEED 1000000
71 #define SPI_OPS &max_spi_ops
72 #define SPI_EXTRA &max_spi_extra
73 
75 extern struct max_spi_init_param max_spi_extra;
76 
77 #endif /* __PARAMETERS_H__ */
max_uart_extra
struct max_uart_init_param max_uart_extra
Definition: parameters.c:41
max_spi_extra
struct max_spi_init_param max_spi_extra
Definition: parameters.c:45
max_spi_init_param
Maxim specific SPI initialization parameters.
Definition: maxim_spi.h:59
max_uart_init_param
Aditional UART config parameters.
Definition: maxim_uart.h:61