Rev 43 | Rev 48 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
38 | mjames | 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>© Copyright (c) 2021 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 "stm32f1xx_hal.h" |
||
32 | |||
33 | /* Private includes ----------------------------------------------------------*/ |
||
34 | /* USER CODE BEGIN Includes */ |
||
35 | #include "main_export.h" |
||
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 | |||
42 | mjames | 46 | #define TX_USART_BUFF_SIZ 512 |
47 | |||
48 | #define RX_USART_BUFF_SIZ 512 |
||
49 | |||
50 | #define NUM_SPI_TEMP_SENS 4 |
||
51 | |||
52 | |||
38 | mjames | 53 | /* USER CODE END EC */ |
54 | |||
55 | /* Exported macro ------------------------------------------------------------*/ |
||
56 | /* USER CODE BEGIN EM */ |
||
57 | |||
58 | /* USER CODE END EM */ |
||
59 | |||
60 | /* Exported functions prototypes ---------------------------------------------*/ |
||
61 | void Error_Handler(void); |
||
62 | |||
63 | /* USER CODE BEGIN EFP */ |
||
42 | mjames | 64 | // reset temperature SPI system |
65 | extern void resetTempCS(void); |
||
66 | // step onto next temperature SPI value |
||
67 | extern void nextTempCS(void); |
||
38 | mjames | 68 | |
69 | /* USER CODE END EFP */ |
||
70 | |||
71 | /* Private defines -----------------------------------------------------------*/ |
||
72 | #define LED_Blink_Pin GPIO_PIN_13 |
||
73 | #define LED_Blink_GPIO_Port GPIOC |
||
74 | #define V_Batt1_Pin GPIO_PIN_0 |
||
75 | #define V_Batt1_GPIO_Port GPIOA |
||
76 | #define V_Batt2_Pin GPIO_PIN_1 |
||
77 | #define V_Batt2_GPIO_Port GPIOA |
||
40 | mjames | 78 | #define V_Map_Pin GPIO_PIN_2 |
79 | #define V_Map_GPIO_Port GPIOA |
||
80 | #define V_Oil_Pin GPIO_PIN_3 |
||
38 | mjames | 81 | #define V_Oil_GPIO_Port GPIOA |
82 | #define V_Oil_Temp_Pin GPIO_PIN_4 |
||
83 | #define V_Oil_Temp_GPIO_Port GPIOA |
||
84 | #define SPI1_SCK_Pin GPIO_PIN_5 |
||
85 | #define SPI1_SCK_GPIO_Port GPIOA |
||
86 | #define SPI1_MISO_Pin GPIO_PIN_6 |
||
87 | #define SPI1_MISO_GPIO_Port GPIOA |
||
88 | #define SPI1_MOSI_Pin GPIO_PIN_7 |
||
89 | #define SPI1_MOSI_GPIO_Port GPIOA |
||
43 | mjames | 90 | #define SPI_CS_Clk_Pin GPIO_PIN_0 |
91 | #define SPI_CS_Clk_GPIO_Port GPIOB |
||
92 | #define SPI_CS_D_Pin GPIO_PIN_1 |
||
42 | mjames | 93 | #define SPI_CS_D_GPIO_Port GPIOB |
38 | mjames | 94 | #define Uart1_TX_Pin GPIO_PIN_9 |
95 | #define Uart1_TX_GPIO_Port GPIOA |
||
96 | #define Uart1_RX_Pin GPIO_PIN_10 |
||
97 | #define Uart1_RX_GPIO_Port GPIOA |
||
98 | #define CB_Pulse_Pin GPIO_PIN_15 |
||
99 | #define CB_Pulse_GPIO_Port GPIOA |
||
100 | #define STARTER_ON_Pin GPIO_PIN_3 |
||
101 | #define STARTER_ON_GPIO_Port GPIOB |
||
102 | #define ENA_AUX_5V_Pin GPIO_PIN_7 |
||
103 | #define ENA_AUX_5V_GPIO_Port GPIOB |
||
104 | /* USER CODE BEGIN Private defines */ |
||
105 | |||
106 | /* USER CODE END Private defines */ |
||
107 | |||
108 | #ifdef __cplusplus |
||
109 | } |
||
110 | #endif |
||
111 | |||
112 | #endif /* __MAIN_H */ |