NNP STM Generic Remote Module
git-main
Loading...
Searching...
No Matches
main.h
Go to the documentation of this file.
1
/* USER CODE BEGIN Header */
19
/* USER CODE END Header */
20
21
/* Define to prevent recursive inclusion -------------------------------------*/
22
#ifndef __MAIN_H
23
#define __MAIN_H
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
/* Includes ------------------------------------------------------------------*/
30
#include "stm32l4xx_hal.h"
31
32
/* Private includes ----------------------------------------------------------*/
33
/* USER CODE BEGIN Includes */
34
#include "
data.h
"
35
#include "
can.h
"
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
60
61
62
/* USER CODE END EFP */
63
64
/* Private defines -----------------------------------------------------------*/
65
#define I2C2_INT_Pin GPIO_PIN_12
66
#define I2C2_INT_GPIO_Port GPIOB
67
68
/* USER CODE BEGIN Private defines */
69
70
#define TIMEOUT_ms(n) ((n))
71
#define TIMEOUT_sec(n) (TIMEOUT_ms((n) * 1000L) - 1)
72
#define START_DELAY_MS 4UL
//to be multiplied by nodeID on startup
73
74
extern
uint8_t RxData[8];
75
extern
uint8_t TxData[8];
76
extern
CAN_TxHeaderTypeDef TxHeader;
77
extern
uint32_t TxMailbox;
78
extern
CAN_RxHeaderTypeDef RxHeader;
79
80
extern
ADC_HandleTypeDef hadc1;
81
extern
DMA_HandleTypeDef hdma_adc1;
82
extern
CAN_HandleTypeDef hcan1;
83
extern
I2C_HandleTypeDef hi2c2;
84
extern
TIM_HandleTypeDef htim2;
85
86
extern
uint8_t ADCres[4];
87
88
/* USER CODE END Private defines */
89
90
#ifdef __cplusplus
91
}
92
#endif
93
94
#endif
/* __MAIN_H */
can.h
data.h
Error_Handler
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition
main.c:673
Core
Inc
main.h
Generated by
1.12.0