/* 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) 2024 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 */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* 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 DSG_PROT_Pin GPIO_PIN_13
#define DSG_PROT_GPIO_Port GPIOC
#define DSG_PROT_EXTI_IRQn EXTI15_10_IRQn
#define EXCHG_CURR_Pin GPIO_PIN_0
#define EXCHG_CURR_GPIO_Port GPIOC
#define WORK_VOLT_Pin GPIO_PIN_1
#define WORK_VOLT_GPIO_Port GPIOC
#define DSG_CURR_Pin GPIO_PIN_2
#define DSG_CURR_GPIO_Port GPIOC
#define SYS_VOLT_IN_Pin GPIO_PIN_0
#define SYS_VOLT_IN_GPIO_Port GPIOA
#define GW485_RDE_Pin GPIO_PIN_1
#define GW485_RDE_GPIO_Port GPIOA
#define GW485_TX_Pin GPIO_PIN_2
#define GW485_TX_GPIO_Port GPIOA
#define GW485_RX_Pin GPIO_PIN_3
#define GW485_RX_GPIO_Port GPIOA
#define FLASH_CS_Pin GPIO_PIN_4
#define FLASH_CS_GPIO_Port GPIOA
#define FLASH_SCK_Pin GPIO_PIN_5
#define FLASH_SCK_GPIO_Port GPIOA
#define FLASH_MISO_Pin GPIO_PIN_6
#define FLASH_MISO_GPIO_Port GPIOA
#define FLASH_MOSI_Pin GPIO_PIN_7
#define FLASH_MOSI_GPIO_Port GPIOA
#define PV_VOLT_IN_Pin GPIO_PIN_0
#define PV_VOLT_IN_GPIO_Port GPIOB
#define WDI_INPUT_Pin GPIO_PIN_1
#define WDI_INPUT_GPIO_Port GPIOB
#define BAT485_TX_Pin GPIO_PIN_10
#define BAT485_TX_GPIO_Port GPIOB
#define BAT485_RX_Pin GPIO_PIN_11
#define BAT485_RX_GPIO_Port GPIOB
#define CHG_CURR_Pin GPIO_PIN_12
#define CHG_CURR_GPIO_Port GPIOB
#define BAT_485_RDE_Pin GPIO_PIN_14
#define BAT_485_RDE_GPIO_Port GPIOB
#define MOSFET_Temper_Pin GPIO_PIN_15
#define MOSFET_Temper_GPIO_Port GPIOB
#define CHG_CONH_Pin GPIO_PIN_9
#define CHG_CONH_GPIO_Port GPIOC
#define EN_PWMOUT_Pin GPIO_PIN_10
#define EN_PWMOUT_GPIO_Port GPIOA
#define FFMOS_CON_Pin GPIO_PIN_11
#define FFMOS_CON_GPIO_Port GPIOA
#define WORK_VOLT_INT_Pin GPIO_PIN_12
#define WORK_VOLT_INT_GPIO_Port GPIOA
#define WORK_VOLT_INT_EXTI_IRQn EXTI15_10_IRQn
#define DEBUG_TX_Pin GPIO_PIN_10
#define DEBUG_TX_GPIO_Port GPIOC
#define DEBUG_RX_Pin GPIO_PIN_11
#define DEBUG_RX_GPIO_Port GPIOC
#define EXCHG_PROT_Pin GPIO_PIN_5
#define EXCHG_PROT_GPIO_Port GPIOB
#define EXCHG_PROT_EXTI_IRQn EXTI9_5_IRQn
#define RUN_LED_Pin GPIO_PIN_6
#define RUN_LED_GPIO_Port GPIOB
#define POW_FF_CON_Pin GPIO_PIN_7
#define POW_FF_CON_GPIO_Port GPIOB
#define POW_OUT_CON_Pin GPIO_PIN_9
#define POW_OUT_CON_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
