/* 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) 2025 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 CP2_OUT_Pin GPIO_PIN_2
#define CP2_OUT_GPIO_Port GPIOE
#define USER_OUT1_Pin GPIO_PIN_13
#define USER_OUT1_GPIO_Port GPIOC
#define USER_OUT2_Pin GPIO_PIN_14
#define USER_OUT2_GPIO_Port GPIOC
#define USER_OUT3_Pin GPIO_PIN_15
#define USER_OUT3_GPIO_Port GPIOC
#define SPI2_CLK_Pin GPIO_PIN_9
#define SPI2_CLK_GPIO_Port GPIOF
#define SPI2_SS2_Pin GPIO_PIN_10
#define SPI2_SS2_GPIO_Port GPIOF
#define ADC_TEMP6_Pin GPIO_PIN_0
#define ADC_TEMP6_GPIO_Port GPIOC
#define ENERGY_METER_TX_Pin GPIO_PIN_1
#define ENERGY_METER_TX_GPIO_Port GPIOC
#define USER_OUT4_Pin GPIO_PIN_2
#define USER_OUT4_GPIO_Port GPIOC
#define USER_OUT5_Pin GPIO_PIN_3
#define USER_OUT5_GPIO_Port GPIOC
#define ADC_TEMP1_Pin GPIO_PIN_0
#define ADC_TEMP1_GPIO_Port GPIOA
#define ADC_TEMP2_Pin GPIO_PIN_1
#define ADC_TEMP2_GPIO_Port GPIOA
#define ADC_TEMP3_Pin GPIO_PIN_2
#define ADC_TEMP3_GPIO_Port GPIOA
#define ADC_TEMP4_Pin GPIO_PIN_3
#define ADC_TEMP4_GPIO_Port GPIOA
#define SPI1_SS_Pin GPIO_PIN_4
#define SPI1_SS_GPIO_Port GPIOA
#define SPI1_CLK_Pin GPIO_PIN_5
#define SPI1_CLK_GPIO_Port GPIOA
#define CP1_FEEDBACK_Pin GPIO_PIN_6
#define CP1_FEEDBACK_GPIO_Port GPIOA
#define SPI1_MOSI_Pin GPIO_PIN_7
#define SPI1_MOSI_GPIO_Port GPIOA
#define IMD_TX_Pin GPIO_PIN_4
#define IMD_TX_GPIO_Port GPIOC
#define IMD_RX_Pin GPIO_PIN_5
#define IMD_RX_GPIO_Port GPIOC
#define CP2_FEEDBACK_Pin GPIO_PIN_1
#define CP2_FEEDBACK_GPIO_Port GPIOB
#define FAN_CONTROL_Pin GPIO_PIN_2
#define FAN_CONTROL_GPIO_Port GPIOB
#define RED1_Pin GPIO_PIN_9
#define RED1_GPIO_Port GPIOE
#define GREEN1_Pin GPIO_PIN_11
#define GREEN1_GPIO_Port GPIOE
#define BLUE1_Pin GPIO_PIN_13
#define BLUE1_GPIO_Port GPIOE
#define ENERGY_METER_RX_Pin GPIO_PIN_10
#define ENERGY_METER_RX_GPIO_Port GPIOB
#define CAN2_RX_Pin GPIO_PIN_12
#define CAN2_RX_GPIO_Port GPIOB
#define CAN2_TX_Pin GPIO_PIN_13
#define CAN2_TX_GPIO_Port GPIOB
#define ADC_TEMP5_Pin GPIO_PIN_14
#define ADC_TEMP5_GPIO_Port GPIOB
#define SPI2_MOSI_Pin GPIO_PIN_15
#define SPI2_MOSI_GPIO_Port GPIOB
#define SPI1_INT_Pin GPIO_PIN_8
#define SPI1_INT_GPIO_Port GPIOD
#define SPI2_INT_Pin GPIO_PIN_9
#define SPI2_INT_GPIO_Port GPIOD
#define SPI1_RST_Pin GPIO_PIN_10
#define SPI1_RST_GPIO_Port GPIOD
#define SPI2_RST_Pin GPIO_PIN_11
#define SPI2_RST_GPIO_Port GPIOD
#define RED2_Pin GPIO_PIN_12
#define RED2_GPIO_Port GPIOD
#define GREEN2_Pin GPIO_PIN_13
#define GREEN2_GPIO_Port GPIOD
#define BLUE2_Pin GPIO_PIN_14
#define BLUE2_GPIO_Port GPIOD
#define SPI2_SS1_Pin GPIO_PIN_15
#define SPI2_SS1_GPIO_Port GPIOD
#define USER_OUT6_Pin GPIO_PIN_6
#define USER_OUT6_GPIO_Port GPIOC
#define USER_OUT7_Pin GPIO_PIN_7
#define USER_OUT7_GPIO_Port GPIOC
#define CAN3_RX_Pin GPIO_PIN_8
#define CAN3_RX_GPIO_Port GPIOA
#define SPI2_MISO_Pin GPIO_PIN_10
#define SPI2_MISO_GPIO_Port GPIOA
#define CAN1_RX_Pin GPIO_PIN_11
#define CAN1_RX_GPIO_Port GPIOA
#define CAN1_TX_Pin GPIO_PIN_12
#define CAN1_TX_GPIO_Port GPIOA
#define CAN3_TX_Pin GPIO_PIN_15
#define CAN3_TX_GPIO_Port GPIOA
#define USER_IN1_Pin GPIO_PIN_10
#define USER_IN1_GPIO_Port GPIOC
#define USER_IN2_Pin GPIO_PIN_11
#define USER_IN2_GPIO_Port GPIOC
#define USER_IN3_Pin GPIO_PIN_12
#define USER_IN3_GPIO_Port GPIOC
#define USER_IN4_Pin GPIO_PIN_0
#define USER_IN4_GPIO_Port GPIOD
#define USER_IN5_Pin GPIO_PIN_1
#define USER_IN5_GPIO_Port GPIOD
#define USER_IN6_Pin GPIO_PIN_2
#define USER_IN6_GPIO_Port GPIOD
#define CP1_OUT_Pin GPIO_PIN_3
#define CP1_OUT_GPIO_Port GPIOD
#define USER_IN7_Pin GPIO_PIN_4
#define USER_IN7_GPIO_Port GPIOD
#define USER_IN8_Pin GPIO_PIN_5
#define USER_IN8_GPIO_Port GPIOD
#define USER_IN9_Pin GPIO_PIN_6
#define USER_IN9_GPIO_Port GPIOD
#define USER_IN10_Pin GPIO_PIN_7
#define USER_IN10_GPIO_Port GPIOD
#define USER_IN11_Pin GPIO_PIN_3
#define USER_IN11_GPIO_Port GPIOB
#define SPI1_MISO_Pin GPIO_PIN_4
#define SPI1_MISO_GPIO_Port GPIOB
#define RCD_FEEDBACK_Pin GPIO_PIN_1
#define RCD_FEEDBACK_GPIO_Port GPIOE

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
