/* 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 "stm32f3xx_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;
/* 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 HV_MISMATCH_ERR_Pin GPIO_PIN_0
#define HV_MISMATCH_ERR_GPIO_Port GPIOA
#define RELAY_MISMATCH_ERR_Pin GPIO_PIN_1
#define RELAY_MISMATCH_ERR_GPIO_Port GPIOA
#define RELAY_CONNECTION_ERR_Pin GPIO_PIN_4
#define RELAY_CONNECTION_ERR_GPIO_Port GPIOA
#define HV_ACTIVE_Pin GPIO_PIN_5
#define HV_ACTIVE_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_CURRENT_SENSE_Pin GPIO_PIN_2
#define SLAVE_CURRENT_SENSE_GPIO_Port GPIOB
#define SLAVE_POWER_1_Pin GPIO_PIN_10
#define SLAVE_POWER_1_GPIO_Port GPIOB
#define SLAVE_POWER_DSEL_Pin GPIO_PIN_11
#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_14
#define POS_AIR_CTRL_GPIO_Port GPIOB
#define NEG_AIR_CTRL_Pin GPIO_PIN_15
#define NEG_AIR_CTRL_GPIO_Port GPIOB
#define PRECHARGE_CTRL_Pin GPIO_PIN_8
#define PRECHARGE_CTRL_GPIO_Port GPIOA
#define STATUS1_Pin GPIO_PIN_4
#define STATUS1_GPIO_Port GPIOB
#define STATUS2_Pin GPIO_PIN_5
#define STATUS2_GPIO_Port GPIOB
#define STATUS3_Pin GPIO_PIN_6
#define STATUS3_GPIO_Port GPIOB
#define STATUS4_Pin GPIO_PIN_7
#define STATUS4_GPIO_Port GPIOB
#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 */