/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.h * @brief : Header for main.c file. * This file contains the common defines of the application. ****************************************************************************** * @attention * * Copyright (c) 2022 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __MAIN_H #define __MAIN_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32g4xx_hal.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Exported types ------------------------------------------------------------*/ /* USER CODE BEGIN ET */ typedef struct { uint8_t errorcode; uint8_t errorarg[8]; } AMSErrorHandle; /* USER CODE END ET */ /* Exported constants --------------------------------------------------------*/ /* USER CODE BEGIN EC */ /* USER CODE END EC */ /* Exported macro ------------------------------------------------------------*/ /* USER CODE BEGIN EM */ /* USER CODE END EM */ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim); /* Exported functions prototypes ---------------------------------------------*/ void Error_Handler(void); /* USER CODE BEGIN EFP */ void AMS_Error_Handler(AMSErrorHandle*); /* USER CODE END EFP */ /* Private defines -----------------------------------------------------------*/ #define HIGH_SIDE_OPEN_Pin GPIO_PIN_3 #define HIGH_SIDE_OPEN_GPIO_Port GPIOA #define NEG_AIR_OPEN_Pin GPIO_PIN_4 #define NEG_AIR_OPEN_GPIO_Port GPIOA #define HV_INACTIVE_Pin GPIO_PIN_5 #define HV_INACTIVE_GPIO_Port GPIOA #define NEG_SIDE_ERR_Pin GPIO_PIN_6 #define NEG_SIDE_ERR_GPIO_Port GPIOA #define POS_SIDE_ERR_Pin GPIO_PIN_7 #define POS_SIDE_ERR_GPIO_Port GPIOA #define VOLTAGE_ERR_Pin GPIO_PIN_0 #define VOLTAGE_ERR_GPIO_Port GPIOB #define FAN_PWM_Pin GPIO_PIN_1 #define FAN_PWM_GPIO_Port GPIOB #define AMS_ERR_Pin GPIO_PIN_2 #define AMS_ERR_GPIO_Port GPIOB #define BOOT0_FF_CLK_Pin GPIO_PIN_11 #define BOOT0_FF_CLK_GPIO_Port GPIOB #define BOOT0_FF_DATA_Pin GPIO_PIN_12 #define BOOT0_FF_DATA_GPIO_Port GPIOB #define SLAVES_ENABLE_Pin GPIO_PIN_13 #define SLAVES_ENABLE_GPIO_Port GPIOB #define STATUS_LED_Pin GPIO_PIN_10 #define STATUS_LED_GPIO_Port GPIOA #define NEG_AIR_CTRL_Pin GPIO_PIN_15 #define NEG_AIR_CTRL_GPIO_Port GPIOA #define PRECHARGE_CTRL_Pin GPIO_PIN_4 #define PRECHARGE_CTRL_GPIO_Port GPIOB #define POS_AIR_CTRL_Pin GPIO_PIN_5 #define POS_AIR_CTRL_GPIO_Port GPIOB /* USER CODE BEGIN Private defines */ /* USER CODE END Private defines */ #ifdef __cplusplus } #endif #endif /* __MAIN_H */