ams-master-23/Core/Inc/main.h

109 lines
3.4 KiB
C

/* 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) 2023 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 "stm32h7xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
extern int sdc_closed;
extern int sdc_closed_nodelay;
/* 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 */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define STATUS_LED_R_Pin GPIO_PIN_0
#define STATUS_LED_R_GPIO_Port GPIOC
#define STATUS_LED_G_Pin GPIO_PIN_1
#define STATUS_LED_G_GPIO_Port GPIOC
#define STATUS_LED_B_Pin GPIO_PIN_2
#define STATUS_LED_B_GPIO_Port GPIOC
#define TS_ERROR_Pin GPIO_PIN_0
#define TS_ERROR_GPIO_Port GPIOA
#define HV_ACTIVE_Pin GPIO_PIN_1
#define HV_ACTIVE_GPIO_Port GPIOA
#define IMD_M_Pin GPIO_PIN_2
#define IMD_M_GPIO_Port GPIOA
#define IMD_OK_Pin GPIO_PIN_3
#define IMD_OK_GPIO_Port GPIOA
#define NEG_AIR_CLOSED_Pin GPIO_PIN_6
#define NEG_AIR_CLOSED_GPIO_Port GPIOA
#define POS_AIR_CLOSED_Pin GPIO_PIN_7
#define POS_AIR_CLOSED_GPIO_Port GPIOA
#define PRECHARGE_CLOSED_Pin GPIO_PIN_0
#define PRECHARGE_CLOSED_GPIO_Port GPIOB
#define SDC_VOLTAGE_Pin GPIO_PIN_1
#define SDC_VOLTAGE_GPIO_Port GPIOB
#define SLAVE_POWER_1_Pin GPIO_PIN_2
#define SLAVE_POWER_1_GPIO_Port GPIOB
#define SLAVE_POWER_DSEL_Pin GPIO_PIN_10
#define SLAVE_POWER_DSEL_GPIO_Port GPIOB
#define SLAVE_POWER_DEN_Pin GPIO_PIN_12
#define SLAVE_POWER_DEN_GPIO_Port GPIOB
#define SLAVE_POWER_0_Pin GPIO_PIN_13
#define SLAVE_POWER_0_GPIO_Port GPIOB
#define POS_AIR_CTRL_Pin GPIO_PIN_6
#define POS_AIR_CTRL_GPIO_Port GPIOC
#define NEG_AIR_CTRL_Pin GPIO_PIN_7
#define NEG_AIR_CTRL_GPIO_Port GPIOC
#define PRECHARGE_CTRL_Pin GPIO_PIN_8
#define PRECHARGE_CTRL_GPIO_Port GPIOA
#define AMS_NERROR_Pin GPIO_PIN_8
#define AMS_NERROR_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */