forked from achamaikin/CCSModuleSW30Web
board rev2 support, added heater support
This commit is contained in:
+119
-115
@@ -1,115 +1,119 @@
|
||||
/* USER CODE BEGIN Header */
|
||||
|
||||
/* USER CODE END Header */
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __MAIN_H
|
||||
#define __MAIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx_hal.h"
|
||||
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include <stdio.h>
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN ET */
|
||||
|
||||
/* USER CODE END ET */
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* USER CODE BEGIN EC */
|
||||
#define FW_VERSION_MAJOR 1
|
||||
#define FW_VERSION_MINOR 0
|
||||
#define FW_VERSION_PATCH 17
|
||||
/* USER CODE END EC */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN EM */
|
||||
|
||||
/* USER CODE END EM */
|
||||
|
||||
/* Exported functions prototypes ---------------------------------------------*/
|
||||
void Error_Handler(void);
|
||||
|
||||
/* USER CODE BEGIN EFP */
|
||||
uint8_t ED_TraceWarning(uint8_t flag, uint8_t id);
|
||||
void ED_Delay(uint32_t Delay);
|
||||
|
||||
/* USER CODE END EFP */
|
||||
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define DBG1_Pin GPIO_PIN_2
|
||||
#define DBG1_GPIO_Port GPIOC
|
||||
#define RELAY_CP_Pin GPIO_PIN_3
|
||||
#define RELAY_CP_GPIO_Port GPIOC
|
||||
#define IN_SW0_Pin GPIO_PIN_1
|
||||
#define IN_SW0_GPIO_Port GPIOA
|
||||
#define IN_SW1_Pin GPIO_PIN_2
|
||||
#define IN_SW1_GPIO_Port GPIOA
|
||||
#define CP_ADC_Pin GPIO_PIN_4
|
||||
#define CP_ADC_GPIO_Port GPIOA
|
||||
#define DBG2_Pin GPIO_PIN_5
|
||||
#define DBG2_GPIO_Port GPIOA
|
||||
#define DBG3_Pin GPIO_PIN_6
|
||||
#define DBG3_GPIO_Port GPIOA
|
||||
#define CP_PWM_Pin GPIO_PIN_7
|
||||
#define CP_PWM_GPIO_Port GPIOA
|
||||
#define LOCK_A_Pin GPIO_PIN_4
|
||||
#define LOCK_A_GPIO_Port GPIOC
|
||||
#define LOCK_B_Pin GPIO_PIN_5
|
||||
#define LOCK_B_GPIO_Port GPIOC
|
||||
#define ADC_NTC1_Pin GPIO_PIN_0
|
||||
#define ADC_NTC1_GPIO_Port GPIOB
|
||||
#define ADC_NTC2_Pin GPIO_PIN_1
|
||||
#define ADC_NTC2_GPIO_Port GPIOB
|
||||
#define IN0_Pin GPIO_PIN_7
|
||||
#define IN0_GPIO_Port GPIOE
|
||||
#define RELAY1_Pin GPIO_PIN_8
|
||||
#define RELAY1_GPIO_Port GPIOE
|
||||
#define RELAY2_Pin GPIO_PIN_9
|
||||
#define RELAY2_GPIO_Port GPIOE
|
||||
#define RELAY3_Pin GPIO_PIN_10
|
||||
#define RELAY3_GPIO_Port GPIOE
|
||||
#define RELAY4_Pin GPIO_PIN_11
|
||||
#define RELAY4_GPIO_Port GPIOE
|
||||
#define RELAY5_Pin GPIO_PIN_12
|
||||
#define RELAY5_GPIO_Port GPIOE
|
||||
#define AC_OK_Pin GPIO_PIN_14
|
||||
#define AC_OK_GPIO_Port GPIOE
|
||||
#define DBG5_Pin GPIO_PIN_10
|
||||
#define DBG5_GPIO_Port GPIOB
|
||||
#define DBG4_Pin GPIO_PIN_11
|
||||
#define DBG4_GPIO_Port GPIOB
|
||||
#define RELAY_CC_Pin GPIO_PIN_15
|
||||
#define RELAY_CC_GPIO_Port GPIOA
|
||||
#define RELAY_DC_Pin GPIO_PIN_3
|
||||
#define RELAY_DC_GPIO_Port GPIOD
|
||||
#define USART2_DIR_Pin GPIO_PIN_4
|
||||
#define USART2_DIR_GPIO_Port GPIOD
|
||||
#define IN_ESTOP_Pin GPIO_PIN_7
|
||||
#define IN_ESTOP_GPIO_Port GPIOD
|
||||
#define IN_FB2_Pin GPIO_PIN_3
|
||||
#define IN_FB2_GPIO_Port GPIOB
|
||||
#define IN_FB1_Pin GPIO_PIN_4
|
||||
#define IN_FB1_GPIO_Port GPIOB
|
||||
#define EE_WP_Pin GPIO_PIN_7
|
||||
#define EE_WP_GPIO_Port GPIOB
|
||||
#define ISO_IN_Pin GPIO_PIN_1
|
||||
#define ISO_IN_GPIO_Port GPIOE
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MAIN_H */
|
||||
/* USER CODE BEGIN Header */
|
||||
|
||||
/* USER CODE END Header */
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __MAIN_H
|
||||
#define __MAIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx_hal.h"
|
||||
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include <stdio.h>
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN ET */
|
||||
|
||||
/* USER CODE END ET */
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* USER CODE BEGIN EC */
|
||||
#define FW_VERSION_MAJOR 1
|
||||
#define FW_VERSION_MINOR 0
|
||||
#define FW_VERSION_PATCH 17
|
||||
/* USER CODE END EC */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN EM */
|
||||
|
||||
/* USER CODE END EM */
|
||||
|
||||
/* Exported functions prototypes ---------------------------------------------*/
|
||||
void Error_Handler(void);
|
||||
|
||||
/* USER CODE BEGIN EFP */
|
||||
uint8_t ED_TraceWarning(uint8_t flag, uint8_t id);
|
||||
void ED_Delay(uint32_t Delay);
|
||||
|
||||
/* USER CODE END EFP */
|
||||
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define DBG1_Pin GPIO_PIN_2
|
||||
#define DBG1_GPIO_Port GPIOC
|
||||
#define RELAY_CP_Pin GPIO_PIN_3
|
||||
#define RELAY_CP_GPIO_Port GPIOC
|
||||
#define IN_SW0_Pin GPIO_PIN_1
|
||||
#define IN_SW0_GPIO_Port GPIOA
|
||||
#define IN_SW1_Pin GPIO_PIN_2
|
||||
#define IN_SW1_GPIO_Port GPIOA
|
||||
#define CP_ADC_Pin GPIO_PIN_4
|
||||
#define CP_ADC_GPIO_Port GPIOA
|
||||
#define DBG2_Pin GPIO_PIN_5
|
||||
#define DBG2_GPIO_Port GPIOA
|
||||
#define DBG3_Pin GPIO_PIN_6
|
||||
#define DBG3_GPIO_Port GPIOA
|
||||
#define CP_PWM_Pin GPIO_PIN_7
|
||||
#define CP_PWM_GPIO_Port GPIOA
|
||||
#define LOCK_A_Pin GPIO_PIN_4
|
||||
#define LOCK_A_GPIO_Port GPIOC
|
||||
#define LOCK_B_Pin GPIO_PIN_5
|
||||
#define LOCK_B_GPIO_Port GPIOC
|
||||
#define ADC_NTC1_Pin GPIO_PIN_0
|
||||
#define ADC_NTC1_GPIO_Port GPIOB
|
||||
#define ADC_NTC2_Pin GPIO_PIN_1
|
||||
#define ADC_NTC2_GPIO_Port GPIOB
|
||||
#define IN0_Pin GPIO_PIN_7
|
||||
#define IN0_GPIO_Port GPIOE
|
||||
#define RELAY1_Pin GPIO_PIN_8
|
||||
#define RELAY1_GPIO_Port GPIOE
|
||||
#define RELAY2_Pin GPIO_PIN_9
|
||||
#define RELAY2_GPIO_Port GPIOE
|
||||
#define RELAY3_Pin GPIO_PIN_10
|
||||
#define RELAY3_GPIO_Port GPIOE
|
||||
#define RELAY4_Pin GPIO_PIN_11
|
||||
#define RELAY4_GPIO_Port GPIOE
|
||||
#define RELAY5_Pin GPIO_PIN_12
|
||||
#define RELAY5_GPIO_Port GPIOE
|
||||
#define AC_OK_Pin GPIO_PIN_14
|
||||
#define AC_OK_GPIO_Port GPIOE
|
||||
#define DBG5_Pin GPIO_PIN_10
|
||||
#define DBG5_GPIO_Port GPIOB
|
||||
#define DBG4_Pin GPIO_PIN_11
|
||||
#define DBG4_GPIO_Port GPIOB
|
||||
#define LED_DATA_Pin GPIO_PIN_9
|
||||
#define LED_DATA_GPIO_Port GPIOC
|
||||
#define RELAY_CC_Pin GPIO_PIN_15
|
||||
#define RELAY_CC_GPIO_Port GPIOA
|
||||
#define HEATER_Pin GPIO_PIN_12
|
||||
#define HEATER_GPIO_Port GPIOC
|
||||
#define RELAY_DC_Pin GPIO_PIN_3
|
||||
#define RELAY_DC_GPIO_Port GPIOD
|
||||
#define USART2_DIR_Pin GPIO_PIN_4
|
||||
#define USART2_DIR_GPIO_Port GPIOD
|
||||
#define IN_ESTOP_Pin GPIO_PIN_7
|
||||
#define IN_ESTOP_GPIO_Port GPIOD
|
||||
#define IN_FB2_Pin GPIO_PIN_3
|
||||
#define IN_FB2_GPIO_Port GPIOB
|
||||
#define IN_FB1_Pin GPIO_PIN_4
|
||||
#define IN_FB1_GPIO_Port GPIOB
|
||||
#define EE_WP_Pin GPIO_PIN_7
|
||||
#define EE_WP_GPIO_Port GPIOB
|
||||
#define ISO_IN_Pin GPIO_PIN_1
|
||||
#define ISO_IN_GPIO_Port GPIOE
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MAIN_H */
|
||||
|
||||
Reference in New Issue
Block a user