no-OS
parameters.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * @file parameters.h
3  * @brief Definitions specific to STM32 platform used by eval-adxl313z
4  * project.
5  * @author GMois (george.mois@analog.com)
6 ********************************************************************************
7  * Copyright 2022(c) Analog Devices, Inc.
8  *
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions are met:
13  * - Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * - Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  * - Neither the name of Analog Devices, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  * - The use of this software may or may not infringe the patent rights
23  * of one or more patent holders. This license does not release you
24  * from the requirement that you obtain separate licenses from these
25  * patent holders to use this software.
26  * - Use of the software either in source or binary form, must be run
27  * on or directly connected to an Analog Devices Inc. component.
28  *
29  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
30  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
31  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32  * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
33  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
35  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
37  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *******************************************************************************/
40 #ifndef __PARAMETERS_H__
41 #define __PARAMETERS_H__
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include "stm32_hal.h"
47 #include "stm32_irq.h"
48 #include "stm32_spi.h"
49 #include "stm32_gpio.h"
50 #include "stm32_uart.h"
51 #include "stm32_uart_stdio.h"
52 
53 /******************************************************************************/
54 /********************** Macros and Constants Definitions **********************/
55 /******************************************************************************/
56 extern UART_HandleTypeDef huart2;
57 
58 #ifdef IIO_SUPPORT
59 #define INTC_DEVICE_ID 0
60 #define IIO_APP_HUART (&huart2)
61 #define UART_IRQ_ID USART2_IRQn
62 #endif
63 #define UART_DEVICE_ID 2
64 #define UART_BAUDRATE 115200
65 #define UART_OPS &stm32_uart_ops
66 
67 #define SPI_DEVICE_ID 1
68 #define SPI_CS 4
69 #define SPI_CS_PORT GPIOA
70 #define SPI_OPS &stm32_spi_ops
71 
72 extern struct stm32_uart_init_param xuip;
73 extern struct stm32_spi_init_param xsip;
74 
75 #endif /* __PARAMETERS_H__ */
stm32_spi_init_param
Structure holding the initialization parameters for stm32 platform specific SPI parameters.
Definition: stm32_spi.h:51
stm32_spi.h
Header file for the stm32 spi driver.
stm32_uart_init_param
Specific initialization parameters for stm32 UART.
Definition: stm32_uart.h:52
stm32_uart.h
Header file of UART driver for STM32.
stm32_uart_stdio.h
Header file of stm32 UART driver stdout/stdin redirection.
stm32_irq.h
Header file for stm32 irq specifics.
xsip
struct max_spi_init_param xsip
Definition: parameters.c:54
stm32_gpio.h
Header file for stm32 gpio specifics.
xuip
struct max_uart_init_param xuip
stm32_hal.h
huart2
UART_HandleTypeDef huart2