main.h
Go to the documentation of this file.
1 /* USER CODE BEGIN Header */
2 /**
3 ******************************************************************************
4 * @file : main.h
5 * @brief : Header for main.c file.
6 * This file contains the common defines of the application.
7 ******************************************************************************
8 * @attention
9 *
10 * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
11 * All rights reserved.</center></h2>
12 *
13 * This software component is licensed by ST under BSD 3-Clause license,
14 * the "License"; You may not use this file except in compliance with the
15 * License. You may obtain a copy of the License at:
16 * opensource.org/licenses/BSD-3-Clause
17 *
18 ******************************************************************************
19 */
20 /* USER CODE END Header */
21
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef __MAIN_H
24 #define __MAIN_H
25
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30
31 /* Includes ------------------------------------------------------------------*/
32 #include "stm32l4xx_hal.h"
33
34 /* Private includes ----------------------------------------------------------*/
35 /* USER CODE BEGIN Includes */
36
37 /* USER CODE END Includes */
38
39 /* Exported types ------------------------------------------------------------*/
40 /* USER CODE BEGIN ET */
41
42 /* USER CODE END ET */
43
44 /* Exported constants --------------------------------------------------------*/
45 /* USER CODE BEGIN EC */
46
47 /* USER CODE END EC */
48
49 /* Exported macro ------------------------------------------------------------*/
50 /* USER CODE BEGIN EM */
51
52 /* USER CODE END EM */
53
54 /* Exported functions prototypes ---------------------------------------------*/
55 void Error_Handler(void);
56
57 /* USER CODE BEGIN EFP */
58
59 /* USER CODE END EFP */
60
61 /* Private defines -----------------------------------------------------------*/
62 #define INTERRUPT_Pin GPIO_PIN_3
63 #define INTERRUPT_GPIO_Port GPIOB
64 #define INTERRUPT_EXTI_IRQn EXTI3_IRQn
65 #define MISC_GPIO2_Pin GPIO_PIN_3
66 #define MISC_GPIO2_GPIO_Port GPIOH
67 #define WAKE_UP_Pin GPIO_PIN_11
68 #define WAKE_UP_GPIO_Port GPIOA
69 #define WAKE_UP_EXTI_IRQn EXTI15_10_IRQn
70 #define DEBUG_UART_RX_Pin GPIO_PIN_10
71 #define DEBUG_UART_RX_GPIO_Port GPIOA
72 #define MCU_INT_Pin GPIO_PIN_9
73 #define MCU_INT_GPIO_Port GPIOB
74 #define DEBUG_UART_TX_Pin GPIO_PIN_9
75 #define DEBUG_UART_TX_GPIO_Port GPIOA
76 #define I2C_ADDRESS_Pin GPIO_PIN_0
77 #define I2C_ADDRESS_GPIO_Port GPIOH
78 #define I2C_SCL_Pin GPIO_PIN_10
79 #define I2C_SCL_GPIO_Port GPIOB
80 #define UART_RX_Pin GPIO_PIN_3
81 #define UART_RX_GPIO_Port GPIOA
82 #define UART_TX_Pin GPIO_PIN_2
83 #define UART_TX_GPIO_Port GPIOA
84 #define ENABLE_Pin GPIO_PIN_12
85 #define ENABLE_GPIO_Port GPIOB
86 #define I2C_SDA_Pin GPIO_PIN_11
87 #define I2C_SDA_GPIO_Port GPIOB
88 #define SPI_MOSI_Pin GPIO_PIN_7
89 #define SPI_MOSI_GPIO_Port GPIOA
90 #define SPI_MISO_Pin GPIO_PIN_6
91 #define SPI_MISO_GPIO_Port GPIOA
92 #define SPI_SCK_Pin GPIO_PIN_5
93 #define SPI_SCK_GPIO_Port GPIOA
94 #define UART_CTS_Pin GPIO_PIN_0
95 #define UART_CTS_GPIO_Port GPIOA
96 #define MISC_GPIO0_Pin GPIO_PIN_1
97 #define MISC_GPIO0_GPIO_Port GPIOB
98 #define SPI_SS_Pin GPIO_PIN_0
99 #define SPI_SS_GPIO_Port GPIOB
100 #define MISC_GPIO1_Pin GPIO_PIN_4
101 #define MISC_GPIO1_GPIO_Port GPIOA
102 #define UART_RTS_Pin GPIO_PIN_1
103 #define UART_RTS_GPIO_Port GPIOA
104
105 /* USER CODE BEGIN Private defines */
106
107 #define A121_SPI_HANDLE hspi1
108 #define MODULE_I2C_HANDLE hi2c2
109 #define MODULE_RTC_HANDLE hrtc
110 #define MODULE_UART1_HANDLE huart2
111 #define MODULE_UART2_HANDLE huart1
112
113 #define MAIN_UART_HANDLE huart2
114 #define DEBUG_UART_HANDLE huart1
115
116 #define EXPLORATION_SERVER_UART_HANDLE huart2
117
118 /* USER CODE END Private defines */
119
120 #ifdef __cplusplus
121 }
122 #endif
123
124 #endif /* __MAIN_H */
Error_Handler
void Error_Handler(void)