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  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of Analog Devices, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived from this
21  * software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR
24  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
26  * EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
29  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
32  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *******************************************************************************/
34 #ifndef __PARAMETERS_H__
35 #define __PARAMETERS_H__
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include "stm32_hal.h"
41 #include "stm32_irq.h"
42 #include "stm32_spi.h"
43 #include "stm32_gpio.h"
44 #include "stm32_uart.h"
45 #include "stm32_uart_stdio.h"
46 
47 /******************************************************************************/
48 /********************** Macros and Constants Definitions **********************/
49 /******************************************************************************/
50 extern UART_HandleTypeDef huart2;
51 
52 #ifdef IIO_SUPPORT
53 #define INTC_DEVICE_ID 0
54 #define IIO_APP_HUART (&huart2)
55 #endif
56 #define UART_IRQ_ID USART2_IRQn
57 #define UART_DEVICE_ID 2
58 #define UART_BAUDRATE 115200
59 #define UART_OPS &stm32_uart_ops
60 
61 #define SPI_DEVICE_ID 1
62 #define SPI_CS 4
63 #define SPI_CS_PORT 0
64 #define SPI_OPS &stm32_spi_ops
65 
66 extern struct stm32_uart_init_param xuip;
67 extern struct stm32_spi_init_param xsip;
68 
69 #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:46
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:46
stm32_gpio.h
Header file for stm32 gpio specifics.
xuip
struct max_uart_init_param xuip
Definition: parameters.c:42
stm32_hal.h
huart2
UART_HandleTypeDef huart2