Prusa MINI Firmware overview
Main Page
Modules
Classes
Files
File List
File Members
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
** This notice applies to any and all portions of this file
9
* that are not between comment pairs USER CODE BEGIN and
10
* USER CODE END. Other portions of this file, whether
11
* inserted by the user or by software development tools
12
* are owned by their respective copyright owners.
13
*
14
* COPYRIGHT(c) 2019 STMicroelectronics
15
*
16
* Redistribution and use in source and binary forms, with or without modification,
17
* are permitted provided that the following conditions are met:
18
* 1. Redistributions of source code must retain the above copyright notice,
19
* this list of conditions and the following disclaimer.
20
* 2. Redistributions in binary form must reproduce the above copyright notice,
21
* this list of conditions and the following disclaimer in the documentation
22
* and/or other materials provided with the distribution.
23
* 3. Neither the name of STMicroelectronics nor the names of its contributors
24
* may be used to endorse or promote products derived from this software
25
* without specific prior written permission.
26
*
27
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
*
38
******************************************************************************
39
*/
40
/* USER CODE END Header */
41
42
/* Define to prevent recursive inclusion -------------------------------------*/
43
#ifndef __MAIN_H
44
#define __MAIN_H
45
46
#ifdef __cplusplus
47
extern
"C"
{
48
#endif
49
50
/* Includes ------------------------------------------------------------------*/
51
#include "
stm32f4xx_hal.h
"
52
53
/* Private includes ----------------------------------------------------------*/
54
/* USER CODE BEGIN Includes */
55
#include "../src/common/uartrxbuff.h"
56
57
/* USER CODE END Includes */
58
59
/* Exported types ------------------------------------------------------------*/
60
/* USER CODE BEGIN ET */
61
62
/* USER CODE END ET */
63
64
/* Exported constants --------------------------------------------------------*/
65
/* USER CODE BEGIN EC */
66
extern
uartrxbuff_t
uart1rxbuff
;
67
68
/* USER CODE END EC */
69
70
/* Exported macro ------------------------------------------------------------*/
71
/* USER CODE BEGIN EM */
72
73
/* USER CODE END EM */
74
75
void
HAL_TIM_MspPostInit
(
TIM_HandleTypeDef
*htim);
76
77
/* Exported functions prototypes ---------------------------------------------*/
78
void
Error_Handler
(
void
);
79
80
/* USER CODE BEGIN EFP */
81
82
/* USER CODE END EFP */
83
84
/* Private defines -----------------------------------------------------------*/
85
#define X_DIAG_Pin GPIO_PIN_2
86
#define X_DIAG_GPIO_Port GPIOE
87
#define Z_DIAG_Pin GPIO_PIN_3
88
#define Z_DIAG_GPIO_Port GPIOE
89
#define USB_OVERC_Pin GPIO_PIN_4
90
#define USB_OVERC_GPIO_Port GPIOE
91
#define USB_EN_Pin GPIO_PIN_5
92
#define USB_EN_GPIO_Port GPIOE
93
#define ESP_GPIO0_Pin GPIO_PIN_6
94
#define ESP_GPIO0_GPIO_Port GPIOE
95
#define ESP_RST_Pin GPIO_PIN_13
96
#define ESP_RST_GPIO_Port GPIOC
97
#define THERM_0_Pin GPIO_PIN_0
98
#define THERM_0_GPIO_Port GPIOC
99
#define BUZZER_Pin GPIO_PIN_0
100
#define BUZZER_GPIO_Port GPIOA
101
#define HW_IDENTIFY_Pin GPIO_PIN_3
102
#define HW_IDENTIFY_GPIO_Port GPIOA
103
#define THERM_1_Pin GPIO_PIN_4
104
#define THERM_1_GPIO_Port GPIOA
105
#define THERM_2_Pin GPIO_PIN_5
106
#define THERM_2_GPIO_Port GPIOA
107
#define THERM_PINDA_Pin GPIO_PIN_6
108
#define THERM_PINDA_GPIO_Port GPIOA
109
#define BED_HEAT_Pin GPIO_PIN_0
110
#define BED_HEAT_GPIO_Port GPIOB
111
#define HEAT0_Pin GPIO_PIN_1
112
#define HEAT0_GPIO_Port GPIOB
113
#define BED_MON_Pin GPIO_PIN_7
114
#define BED_MON_GPIO_Port GPIOE
115
#define FAN1_Pin GPIO_PIN_9
116
#define FAN1_GPIO_Port GPIOE
117
#define FAN0_TACH_Pin GPIO_PIN_10
118
#define FAN0_TACH_GPIO_Port GPIOE
119
#define FAN0_TACH_EXTI_IRQn EXTI15_10_IRQn
120
#define FAN0_Pin GPIO_PIN_11
121
#define FAN0_GPIO_Port GPIOE
122
#define LCD_SW1_Pin GPIO_PIN_12
123
#define LCD_SW1_GPIO_Port GPIOE
124
#define LCD_SW3_Pin GPIO_PIN_13
125
#define LCD_SW3_GPIO_Port GPIOE
126
#define FAN1_TACH_Pin GPIO_PIN_14
127
#define FAN1_TACH_GPIO_Port GPIOE
128
#define FAN1_TACH_EXTI_IRQn EXTI15_10_IRQn
129
#define LCD_SW2_Pin GPIO_PIN_15
130
#define LCD_SW2_GPIO_Port GPIOE
131
#define USB_HS_N_Pin GPIO_PIN_14
132
#define USB_HS_N_GPIO_Port GPIOB
133
#define USB_HS_P_Pin GPIO_PIN_15
134
#define USB_HS_P_GPIO_Port GPIOB
135
#define E_DIR_Pin GPIO_PIN_8
136
#define E_DIR_GPIO_Port GPIOD
137
#define E_STEP_Pin GPIO_PIN_9
138
#define E_STEP_GPIO_Port GPIOD
139
#define E_ENA_Pin GPIO_PIN_10
140
#define E_ENA_GPIO_Port GPIOD
141
#define LCD_RS_Pin GPIO_PIN_11
142
#define LCD_RS_GPIO_Port GPIOD
143
#define Y_DIR_Pin GPIO_PIN_12
144
#define Y_DIR_GPIO_Port GPIOD
145
#define Y_STEP_Pin GPIO_PIN_13
146
#define Y_STEP_GPIO_Port GPIOD
147
#define Y_ENA_Pin GPIO_PIN_14
148
#define Y_ENA_GPIO_Port GPIOD
149
#define Z_DIR_Pin GPIO_PIN_15
150
#define Z_DIR_GPIO_Port GPIOD
151
#define ESP_TX_Pin GPIO_PIN_6
152
#define ESP_TX_GPIO_Port GPIOC
153
#define ESP_RX_Pin GPIO_PIN_7
154
#define ESP_RX_GPIO_Port GPIOC
155
#define LCD_RST_Pin GPIO_PIN_8
156
#define LCD_RST_GPIO_Port GPIOC
157
#define LCD_CS_Pin GPIO_PIN_9
158
#define LCD_CS_GPIO_Port GPIOC
159
#define Z_MIN_Pin GPIO_PIN_8
160
#define Z_MIN_GPIO_Port GPIOA
161
#define USB_FS_N_Pin GPIO_PIN_11
162
#define USB_FS_N_GPIO_Port GPIOA
163
#define USB_FS_P_Pin GPIO_PIN_12
164
#define USB_FS_P_GPIO_Port GPIOA
165
#define SWDIO_Pin GPIO_PIN_13
166
#define SWDIO_GPIO_Port GPIOA
167
#define SWCLK_Pin GPIO_PIN_14
168
#define SWCLK_GPIO_Port GPIOA
169
#define E_DIAG_Pin GPIO_PIN_15
170
#define E_DIAG_GPIO_Port GPIOA
171
#define FLASH_SCK_Pin GPIO_PIN_10
172
#define FLASH_SCK_GPIO_Port GPIOC
173
#define FLASH_MISO_Pin GPIO_PIN_11
174
#define FLASH_MISO_GPIO_Port GPIOC
175
#define FLASH_MOSI_Pin GPIO_PIN_12
176
#define FLASH_MOSI_GPIO_Port GPIOC
177
#define X_DIR_Pin GPIO_PIN_0
178
#define X_DIR_GPIO_Port GPIOD
179
#define X_STEP_Pin GPIO_PIN_1
180
#define X_STEP_GPIO_Port GPIOD
181
#define Z_ENA_Pin GPIO_PIN_2
182
#define Z_ENA_GPIO_Port GPIOD
183
#define X_ENA_Pin GPIO_PIN_3
184
#define X_ENA_GPIO_Port GPIOD
185
#define Z_STEP_Pin GPIO_PIN_4
186
#define Z_STEP_GPIO_Port GPIOD
187
#define FLASH_CSN_Pin GPIO_PIN_7
188
#define FLASH_CSN_GPIO_Port GPIOD
189
#define FIL_SENSOR_Pin GPIO_PIN_4
190
#define FIL_SENSOR_GPIO_Port GPIOB
191
#define WP2_Pin GPIO_PIN_5
192
#define WP2_GPIO_Port GPIOB
193
#define TX1_Pin GPIO_PIN_6
194
#define TX1_GPIO_Port GPIOB
195
#define RX1_Pin GPIO_PIN_7
196
#define RX1_GPIO_Port GPIOB
197
#define WP1_Pin GPIO_PIN_0
198
#define WP1_GPIO_Port GPIOE
199
#define Z_DIAGE1_Pin GPIO_PIN_1
200
#define Z_DIAGE1_GPIO_Port GPIOE
201
/* USER CODE BEGIN Private defines */
202
203
/* USER CODE END Private defines */
204
205
#ifdef __cplusplus
206
}
207
#endif
208
209
#endif
/* __MAIN_H */
210
211
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_TIM_MspPostInit
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim)
Definition:
stm32f4xx_hal_msp.c:430
uart1rxbuff
uartrxbuff_t uart1rxbuff
Definition:
main.c:144
Error_Handler
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition:
main.c:1057
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
TIM_HandleTypeDef
TIM Time Base Handle Structure definition.
Definition:
stm32f4xx_hal_tim.h:287
_uartrxbuff_t
Definition:
uartrxbuff.h:16
Prusa-Firmware-Buddy-Private1
include
main.h
Generated by
1.8.16