/* 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) 2026 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 "stm32f4xx_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 CH395_INT_Pin GPIO_PIN_5
#define CH395_INT_GPIO_Port GPIOE
#define LED1_Pin GPIO_PIN_4
#define LED1_GPIO_Port GPIOC
#define LED2_Pin GPIO_PIN_5
#define LED2_GPIO_Port GPIOC
#define LED3_Pin GPIO_PIN_1
#define LED3_GPIO_Port GPIOB
#define LED4_Pin GPIO_PIN_2
#define LED4_GPIO_Port GPIOB
#define LED5_Pin GPIO_PIN_11
#define LED5_GPIO_Port GPIOF
#define LED6_Pin GPIO_PIN_12
#define LED6_GPIO_Port GPIOF
#define TP_OS0_Pin GPIO_PIN_13
#define TP_OS0_GPIO_Port GPIOF
#define TP_OS1_Pin GPIO_PIN_14
#define TP_OS1_GPIO_Port GPIOF
#define TP_OS2_Pin GPIO_PIN_15
#define TP_OS2_GPIO_Port GPIOF
#define DB0_Pin GPIO_PIN_0
#define DB0_GPIO_Port GPIOG
#define DB1_Pin GPIO_PIN_1
#define DB1_GPIO_Port GPIOG
#define ST_TX2_Pin GPIO_PIN_10
#define ST_TX2_GPIO_Port GPIOB
#define ST_RX2_Pin GPIO_PIN_11
#define ST_RX2_GPIO_Port GPIOB
#define CH395_SCS_Pin GPIO_PIN_12
#define CH395_SCS_GPIO_Port GPIOB
#define CH395F_SCK_Pin GPIO_PIN_13
#define CH395F_SCK_GPIO_Port GPIOB
#define CH395F_SDO_Pin GPIO_PIN_14
#define CH395F_SDO_GPIO_Port GPIOB
#define CH395F_SDOB15_Pin GPIO_PIN_15
#define CH395F_SDOB15_GPIO_Port GPIOB
#define DB2_Pin GPIO_PIN_2
#define DB2_GPIO_Port GPIOG
#define DB3_Pin GPIO_PIN_3
#define DB3_GPIO_Port GPIOG
#define DB4_Pin GPIO_PIN_4
#define DB4_GPIO_Port GPIOG
#define DB5_Pin GPIO_PIN_5
#define DB5_GPIO_Port GPIOG
#define DB6_Pin GPIO_PIN_6
#define DB6_GPIO_Port GPIOG
#define DB7_Pin GPIO_PIN_7
#define DB7_GPIO_Port GPIOG
#define DB8_Pin GPIO_PIN_8
#define DB8_GPIO_Port GPIOG
#define ST_TX3_Pin GPIO_PIN_10
#define ST_TX3_GPIO_Port GPIOC
#define ST_RX3_Pin GPIO_PIN_11
#define ST_RX3_GPIO_Port GPIOC
#define ST_TX4_Pin GPIO_PIN_12
#define ST_TX4_GPIO_Port GPIOC
#define ST_DIR4_Pin GPIO_PIN_0
#define ST_DIR4_GPIO_Port GPIOD
#define TP_FRSTDATA_Pin GPIO_PIN_1
#define TP_FRSTDATA_GPIO_Port GPIOD
#define ST_RX4_Pin GPIO_PIN_2
#define ST_RX4_GPIO_Port GPIOD
#define TP_RD_Pin GPIO_PIN_3
#define TP_RD_GPIO_Port GPIOD
#define TP_CONVST_Pin GPIO_PIN_4
#define TP_CONVST_GPIO_Port GPIOD
#define ST_TX1_Pin GPIO_PIN_5
#define ST_TX1_GPIO_Port GPIOD
#define ST_RX1_Pin GPIO_PIN_6
#define ST_RX1_GPIO_Port GPIOD
#define TP_BUSY_Pin GPIO_PIN_7
#define TP_BUSY_GPIO_Port GPIOD
#define TP_BUSY_EXTI_IRQn EXTI9_5_IRQn
#define DB9_Pin GPIO_PIN_9
#define DB9_GPIO_Port GPIOG
#define DB10_Pin GPIO_PIN_10
#define DB10_GPIO_Port GPIOG
#define DB11_Pin GPIO_PIN_11
#define DB11_GPIO_Port GPIOG
#define DB12_Pin GPIO_PIN_12
#define DB12_GPIO_Port GPIOG
#define DB13_Pin GPIO_PIN_13
#define DB13_GPIO_Port GPIOG
#define DB14_Pin GPIO_PIN_14
#define DB14_GPIO_Port GPIOG
#define DB15_Pin GPIO_PIN_15
#define DB15_GPIO_Port GPIOG
#define GD_SCLK_Pin GPIO_PIN_3
#define GD_SCLK_GPIO_Port GPIOB
#define GD_SO_Pin GPIO_PIN_4
#define GD_SO_GPIO_Port GPIOB
#define GD_SI_Pin GPIO_PIN_5
#define GD_SI_GPIO_Port GPIOB
#define SD_SCL_Pin GPIO_PIN_6
#define SD_SCL_GPIO_Port GPIOB
#define SD_SDA_Pin GPIO_PIN_7
#define SD_SDA_GPIO_Port GPIOB
#define GD_WP_Pin GPIO_PIN_8
#define GD_WP_GPIO_Port GPIOB
#define GD_CS_Pin GPIO_PIN_0
#define GD_CS_GPIO_Port GPIOE
#define GD_HOLD_Pin GPIO_PIN_1
#define GD_HOLD_GPIO_Port GPIOE

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
