F439_CPP_TX-RX_LoRa_Project
Loading...
Searching...
No Matches
main.h
Go to the documentation of this file.
1
/* USER CODE BEGIN Header */
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 "stm32f4xx_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
55
/* USER CODE BEGIN EFP */
56
57
/* USER CODE END EFP */
58
59
/* Private defines -----------------------------------------------------------*/
60
#define SX1262_TX_ENABLE_Pin GPIO_PIN_6
61
#define SX1262_TX_ENABLE_GPIO_Port GPIOF
62
#define SX1262_RX_ENABLE_Pin GPIO_PIN_7
63
#define SX1262_RX_ENABLE_GPIO_Port GPIOF
64
#define MCO_Pin GPIO_PIN_0
65
#define MCO_GPIO_Port GPIOH
66
#define USB_PowerSwitchOn_Pin GPIO_PIN_6
67
#define USB_PowerSwitchOn_GPIO_Port GPIOG
68
#define USB_OverCurrent_Pin GPIO_PIN_7
69
#define USB_OverCurrent_GPIO_Port GPIOG
70
#define SX1262_CS_Pin GPIO_PIN_9
71
#define SX1262_CS_GPIO_Port GPIOC
72
#define SPI1_FRAM_CS_Pin GPIO_PIN_15
73
#define SPI1_FRAM_CS_GPIO_Port GPIOA
74
#define DIO1_LORA_Pin GPIO_PIN_10
75
#define DIO1_LORA_GPIO_Port GPIOC
76
#define DIO1_LORA_EXTI_IRQn EXTI15_10_IRQn
77
#define SX1262_NRESET_Pin GPIO_PIN_11
78
#define SX1262_NRESET_GPIO_Port GPIOC
79
#define SX1262_BUSY_Pin GPIO_PIN_12
80
#define SX1262_BUSY_GPIO_Port GPIOC
81
82
/* USER CODE BEGIN Private defines */
83
84
#define SX1262_TX_ENABLE_Pin GPIO_PIN_6
85
#define SX1262_TX_ENABLE_GPIO_Port GPIOF
86
#define SX1262_RX_ENABLE_Pin GPIO_PIN_7
87
#define SX1262_RX_ENABLE_GPIO_Port GPIOF
88
#define MCO_Pin GPIO_PIN_0
89
#define MCO_GPIO_Port GPIOH
90
#define USB_PowerSwitchOn_Pin GPIO_PIN_6
91
#define USB_PowerSwitchOn_GPIO_Port GPIOG
92
#define USB_OverCurrent_Pin GPIO_PIN_7
93
#define USB_OverCurrent_GPIO_Port GPIOG
94
#define SX1262_CS_Pin GPIO_PIN_9
95
#define SX1262_CS_GPIO_Port GPIOC
96
#define DIO1_LORA_Pin GPIO_PIN_10
97
#define DIO1_LORA_GPIO_Port GPIOC
98
#define DIO1_LORA_EXTI_IRQn EXTI15_10_IRQn
99
#define SX1262_NRESET_Pin GPIO_PIN_11
100
#define SX1262_NRESET_GPIO_Port GPIOC
101
#define SX1262_BUSY_Pin GPIO_PIN_12
102
#define SX1262_BUSY_GPIO_Port GPIOC
103
104
typedef
enum
{
105
SX_ROLE_RX
= 0,
106
SX_ROLE_TX
107
}
SX1262_ROLE
;
108
109
#define FRAM_BASE_ADDR 0x0100U
110
#define FRAM_INIT_BYTES 64U
111
112
void
_Error_Handler
(
const
char
*,
int
);
113
114
#define Error_Handler() _Error_Handler((const char *)__FILE__, __LINE__)
115
#define REDIRECT_PRINTF
116
117
/* USER CODE END Private defines */
118
119
#ifdef __cplusplus
120
}
121
#endif
122
123
#endif
/* __MAIN_H */
SX1262_ROLE
SX1262_ROLE
Definition
main.h:104
SX_ROLE_TX
@ SX_ROLE_TX
Definition
main.h:106
SX_ROLE_RX
@ SX_ROLE_RX
Definition
main.h:105
_Error_Handler
void _Error_Handler(const char *, int)
This function is executed in case of error occurrence.
Definition
main.c:662
Core
Inc
main.h
Generated by
1.10.0