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 #endif
29
30 /* Includes ------------------------------------------------------------------*/
31 #include "stm32l4xx_hal.h"
32
33 /* Private includes ----------------------------------------------------------*/
34 /* USER CODE BEGIN Includes */
35
36 /* USER CODE END Includes */
37
38 /* Exported types ------------------------------------------------------------*/
39 /* USER CODE BEGIN ET */
40
41 /* USER CODE END ET */
42
43 /* Exported constants --------------------------------------------------------*/
44 /* USER CODE BEGIN EC */
45
46 /* USER CODE END EC */
47
48 /* Exported macro ------------------------------------------------------------*/
49 /* USER CODE BEGIN EM */
50
51 /* USER CODE END EM */
52
53 /* Exported functions prototypes ---------------------------------------------*/
54 void Error_Handler(void);
55
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 /* USER CODE BEGIN Private defines */
105
106 #define A121_SPI_HANDLE hspi1
107 #define MODULE_I2C_HANDLE hi2c2
108 #define MODULE_RTC_HANDLE hrtc
109 #define MODULE_UART1_HANDLE huart2
110 #define MODULE_UART2_HANDLE huart1
111
112 #define MAIN_UART_HANDLE huart2
113 #define DEBUG_UART_HANDLE huart1
114
115 #define EXPLORATION_SERVER_UART_HANDLE huart2
116
117 /* USER CODE END Private defines */
118
119 #ifdef __cplusplus
120 }
121 #endif
122
123 #endif /* __MAIN_H */
124
125 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Error_Handler
void Error_Handler(void)