/* 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 "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 */

/* 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 USART_MODBUS_MASTER_RX_Pin GPIO_PIN_2
#define USART_MODBUS_MASTER_RX_GPIO_Port GPIOE
#define USART_MODBUS_MASTER_TX_Pin GPIO_PIN_3
#define USART_MODBUS_MASTER_TX_GPIO_Port GPIOE
#define TX1_LED_Pin GPIO_PIN_6
#define TX1_LED_GPIO_Port GPIOE
#define EEPROM_I2C_SDA_Pin GPIO_PIN_0
#define EEPROM_I2C_SDA_GPIO_Port GPIOF
#define EEPROM_I2C_SCL_Pin GPIO_PIN_1
#define EEPROM_I2C_SCL_GPIO_Port GPIOF
#define U_BAT_Pin GPIO_PIN_0
#define U_BAT_GPIO_Port GPIOC
#define DAC_U_LIMIT_Pin GPIO_PIN_5
#define DAC_U_LIMIT_GPIO_Port GPIOA
#define POWER_4V_EN_Pin GPIO_PIN_15
#define POWER_4V_EN_GPIO_Port GPIOF
#define POWER_5V_EN_Pin GPIO_PIN_0
#define POWER_5V_EN_GPIO_Port GPIOG
#define POWER_10V_EN_Pin GPIO_PIN_1
#define POWER_10V_EN_GPIO_Port GPIOG
#define POWER_15V_EN_Pin GPIO_PIN_7
#define POWER_15V_EN_GPIO_Port GPIOE
#define CHARGE_PWM_L_Pin GPIO_PIN_8
#define CHARGE_PWM_L_GPIO_Port GPIOE
#define CHARGE_PWM_H_Pin GPIO_PIN_9
#define CHARGE_PWM_H_GPIO_Port GPIOE
#define DISPLAY_SPI_CS_Pin GPIO_PIN_11
#define DISPLAY_SPI_CS_GPIO_Port GPIOE
#define DISPLAY_SPI_SCK_Pin GPIO_PIN_12
#define DISPLAY_SPI_SCK_GPIO_Port GPIOE
#define DISPLAY_BACKLIGHT_PWM_Pin GPIO_PIN_13
#define DISPLAY_BACKLIGHT_PWM_GPIO_Port GPIOE
#define DISPLAY_SPI_MOSI_Pin GPIO_PIN_14
#define DISPLAY_SPI_MOSI_GPIO_Port GPIOE
#define RST_DISPLAY_Pin GPIO_PIN_15
#define RST_DISPLAY_GPIO_Port GPIOE
#define ETH_SPI_SCK_Pin GPIO_PIN_10
#define ETH_SPI_SCK_GPIO_Port GPIOB
#define ETH_SPI_MISO_Pin GPIO_PIN_14
#define ETH_SPI_MISO_GPIO_Port GPIOB
#define ETH_SPI_MOSI_Pin GPIO_PIN_15
#define ETH_SPI_MOSI_GPIO_Port GPIOB
#define GSM_PWR_Pin GPIO_PIN_10
#define GSM_PWR_GPIO_Port GPIOD
#define GSM_STATUS_Pin GPIO_PIN_13
#define GSM_STATUS_GPIO_Port GPIOD
#define FAN_TACHO_Pin GPIO_PIN_6
#define FAN_TACHO_GPIO_Port GPIOC
#define FAN_PWM_Pin GPIO_PIN_7
#define FAN_PWM_GPIO_Port GPIOC
#define SD_DETECT_Pin GPIO_PIN_8
#define SD_DETECT_GPIO_Port GPIOA
#define ONEWIRE_TEMP_BUS_Pin GPIO_PIN_15
#define ONEWIRE_TEMP_BUS_GPIO_Port GPIOA
#define ETH_SPI_PWR_Pin GPIO_PIN_3
#define ETH_SPI_PWR_GPIO_Port GPIOD
#define USART_MODBUS_SLAVE_DE_Pin GPIO_PIN_4
#define USART_MODBUS_SLAVE_DE_GPIO_Port GPIOD
#define USART_MODBUS_SLAVE_TX_Pin GPIO_PIN_5
#define USART_MODBUS_SLAVE_TX_GPIO_Port GPIOD
#define USART_MODBUS_SLAVE_RX_Pin GPIO_PIN_6
#define USART_MODBUS_SLAVE_RX_GPIO_Port GPIOD
#define OUTPUT_ON_LED_Pin GPIO_PIN_7
#define OUTPUT_ON_LED_GPIO_Port GPIOD
#define ERROR_LED_Pin GPIO_PIN_9
#define ERROR_LED_GPIO_Port GPIOG
#define CHARGE_LED_Pin GPIO_PIN_10
#define CHARGE_LED_GPIO_Port GPIOG
#define RX2_LED_Pin GPIO_PIN_11
#define RX2_LED_GPIO_Port GPIOG
#define RX1_LED_Pin GPIO_PIN_12
#define RX1_LED_GPIO_Port GPIOG
#define TX2_LED_Pin GPIO_PIN_13
#define TX2_LED_GPIO_Port GPIOG
#define USART_MODBUS_MASTER_DE_Pin GPIO_PIN_14
#define USART_MODBUS_MASTER_DE_GPIO_Port GPIOG
#define BUZZER_Pin GPIO_PIN_15
#define BUZZER_GPIO_Port GPIOG
#define ETH_SPI_NSS_Pin GPIO_PIN_4
#define ETH_SPI_NSS_GPIO_Port GPIOB
#define BME_I2C_SCL_Pin GPIO_PIN_6
#define BME_I2C_SCL_GPIO_Port GPIOB
#define BME_I2C_SDA_Pin GPIO_PIN_7
#define BME_I2C_SDA_GPIO_Port GPIOB
#define ETH_SPI_INT_Pin GPIO_PIN_8
#define ETH_SPI_INT_GPIO_Port GPIOB
#define ETH_SPI_INT_EXTI_IRQn EXTI9_5_IRQn
#define ETH_SPI_RST_Pin GPIO_PIN_9
#define ETH_SPI_RST_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
