Files
STM32F4-Base/Inc/main.h
2026-07-17 15:16:29 +08:00

106 lines
3.0 KiB
C

/* 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 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 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 ST_TX0_Pin GPIO_PIN_9
#define ST_TX0_GPIO_Port GPIOA
#define ST_RX0_Pin GPIO_PIN_10
#define ST_RX0_GPIO_Port GPIOA
#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 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 */