|
|
|
/* 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) 2022 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 "stm32f7xx_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 LCD_B0_Pin GPIO_PIN_4
|
|
|
|
#define LCD_B0_GPIO_Port GPIOE
|
|
|
|
#define OTG_HS_OverCurrent_Pin GPIO_PIN_3
|
|
|
|
#define OTG_HS_OverCurrent_GPIO_Port GPIOE
|
|
|
|
#define QSPI_D2_Pin GPIO_PIN_2
|
|
|
|
#define QSPI_D2_GPIO_Port GPIOE
|
|
|
|
#define RMII_TXD1_Pin GPIO_PIN_14
|
|
|
|
#define RMII_TXD1_GPIO_Port GPIOG
|
|
|
|
#define FMC_NBL1_Pin GPIO_PIN_1
|
|
|
|
#define FMC_NBL1_GPIO_Port GPIOE
|
|
|
|
#define FMC_NBL0_Pin GPIO_PIN_0
|
|
|
|
#define FMC_NBL0_GPIO_Port GPIOE
|
|
|
|
#define ARDUINO_SCL_D15_Pin GPIO_PIN_8
|
|
|
|
#define ARDUINO_SCL_D15_GPIO_Port GPIOB
|
|
|
|
#define ARDUINO_PWM_D3_Pin GPIO_PIN_4
|
|
|
|
#define ARDUINO_PWM_D3_GPIO_Port GPIOB
|
|
|
|
#define SWO_Pin GPIO_PIN_3
|
|
|
|
#define SWO_GPIO_Port GPIOB
|
|
|
|
#define SDMMC_CK_Pin GPIO_PIN_12
|
|
|
|
#define SDMMC_CK_GPIO_Port GPIOC
|
|
|
|
#define ARDUINO_PWM_D9_Pin GPIO_PIN_15
|
|
|
|
#define ARDUINO_PWM_D9_GPIO_Port GPIOA
|
|
|
|
#define SWCLK_Pin GPIO_PIN_14
|
|
|
|
#define SWCLK_GPIO_Port GPIOA
|
|
|
|
#define SWDIO_Pin GPIO_PIN_13
|
|
|
|
#define SWDIO_GPIO_Port GPIOA
|
|
|
|
#define RMII_TXD0_Pin GPIO_PIN_13
|
|
|
|
#define RMII_TXD0_GPIO_Port GPIOG
|
|
|
|
#define ARDUINO_SDA_D14_Pin GPIO_PIN_9
|
|
|
|
#define ARDUINO_SDA_D14_GPIO_Port GPIOB
|
|
|
|
#define QSPI_NCS_Pin GPIO_PIN_6
|
|
|
|
#define QSPI_NCS_GPIO_Port GPIOB
|
|
|
|
#define FMC_SDNCAS_Pin GPIO_PIN_15
|
|
|
|
#define FMC_SDNCAS_GPIO_Port GPIOG
|
|
|
|
#define RMII_TX_EN_Pin GPIO_PIN_11
|
|
|
|
#define RMII_TX_EN_GPIO_Port GPIOG
|
|
|
|
#define LCD_B1_Pin GPIO_PIN_13
|
|
|
|
#define LCD_B1_GPIO_Port GPIOJ
|
|
|
|
#define OTG_FS_VBUS_Pin GPIO_PIN_12
|
|
|
|
#define OTG_FS_VBUS_GPIO_Port GPIOJ
|
|
|
|
#define Audio_INT_Pin GPIO_PIN_6
|
|
|
|
#define Audio_INT_GPIO_Port GPIOD
|
|
|
|
#define FMC_D2_Pin GPIO_PIN_0
|
|
|
|
#define FMC_D2_GPIO_Port GPIOD
|
|
|
|
#define SDMMC_D3_Pin GPIO_PIN_11
|
|
|
|
#define SDMMC_D3_GPIO_Port GPIOC
|
|
|
|
#define SDMMC_D2_Pin GPIO_PIN_10
|
|
|
|
#define SDMMC_D2_GPIO_Port GPIOC
|
|
|
|
#define OTG_FS_P_Pin GPIO_PIN_12
|
|
|
|
#define OTG_FS_P_GPIO_Port GPIOA
|
|
|
|
#define LCD_DE_Pin GPIO_PIN_7
|
|
|
|
#define LCD_DE_GPIO_Port GPIOK
|
|
|
|
#define LCD_B7_Pin GPIO_PIN_6
|
|
|
|
#define LCD_B7_GPIO_Port GPIOK
|
|
|
|
#define LCD_B6_Pin GPIO_PIN_5
|
|
|
|
#define LCD_B6_GPIO_Port GPIOK
|
|
|
|
#define LCD_B4_Pin GPIO_PIN_12
|
|
|
|
#define LCD_B4_GPIO_Port GPIOG
|
|
|
|
#define LCD_B2_Pin GPIO_PIN_14
|
|
|
|
#define LCD_B2_GPIO_Port GPIOJ
|
|
|
|
#define OTG_FS_PowerSwitchOn_Pin GPIO_PIN_5
|
|
|
|
#define OTG_FS_PowerSwitchOn_GPIO_Port GPIOD
|
|
|
|
#define FMC_D3_Pin GPIO_PIN_1
|
|
|
|
#define FMC_D3_GPIO_Port GPIOD
|
|
|
|
#define ARDUINO_D7_Pin GPIO_PIN_3
|
|
|
|
#define ARDUINO_D7_GPIO_Port GPIOI
|
|
|
|
#define ARDUINO_D8_Pin GPIO_PIN_2
|
|
|
|
#define ARDUINO_D8_GPIO_Port GPIOI
|
|
|
|
#define OTG_FS_N_Pin GPIO_PIN_11
|
|
|
|
#define OTG_FS_N_GPIO_Port GPIOA
|
|
|
|
#define SD_CARD_N_Pin GPIO_PIN_13
|
|
|
|
#define SD_CARD_N_GPIO_Port GPIOC
|
|
|
|
#define FMC_A0_Pin GPIO_PIN_0
|
|
|
|
#define FMC_A0_GPIO_Port GPIOF
|
|
|
|
#define LCD_HSYNC_Pin GPIO_PIN_10
|
|
|
|
#define LCD_HSYNC_GPIO_Port GPIOI
|
|
|
|
#define LCD_B5_Pin GPIO_PIN_4
|
|
|
|
#define LCD_B5_GPIO_Port GPIOK
|
|
|
|
#define LCD_BL_CTRL_Pin GPIO_PIN_3
|
|
|
|
#define LCD_BL_CTRL_GPIO_Port GPIOK
|
|
|
|
#define LCD_B3_Pin GPIO_PIN_15
|
|
|
|
#define LCD_B3_GPIO_Port GPIOJ
|
|
|
|
#define OTG_FS_OverCurrent_Pin GPIO_PIN_4
|
|
|
|
#define OTG_FS_OverCurrent_GPIO_Port GPIOD
|
|
|
|
#define SDMMC_CMD_Pin GPIO_PIN_2
|
|
|
|
#define SDMMC_CMD_GPIO_Port GPIOD
|
|
|
|
#define TP3_Pin GPIO_PIN_15
|
|
|
|
#define TP3_GPIO_Port GPIOH
|
|
|
|
#define ARDUINO_SCK_D13_Pin GPIO_PIN_1
|
|
|
|
#define ARDUINO_SCK_D13_GPIO_Port GPIOI
|
|
|
|
#define RCC_OSC32_IN_Pin GPIO_PIN_14
|
|
|
|
#define RCC_OSC32_IN_GPIO_Port GPIOC
|
|
|
|
#define FMC_A1_Pin GPIO_PIN_1
|
|
|
|
#define FMC_A1_GPIO_Port GPIOF
|
|
|
|
#define LCD_DISP_Pin GPIO_PIN_12
|
|
|
|
#define LCD_DISP_GPIO_Port GPIOI
|
|
|
|
#define LCD_VSYNC_Pin GPIO_PIN_9
|
|
|
|
#define LCD_VSYNC_GPIO_Port GPIOI
|
|
|
|
#define DCMI_PWR_EN_Pin GPIO_PIN_13
|
|
|
|
#define DCMI_PWR_EN_GPIO_Port GPIOH
|
|
|
|
#define ARDUINO_PWM_CS_D5_Pin GPIO_PIN_0
|
|
|
|
#define ARDUINO_PWM_CS_D5_GPIO_Port GPIOI
|
|
|
|
#define RCC_OSC32_OUT_Pin GPIO_PIN_15
|
|
|
|
#define RCC_OSC32_OUT_GPIO_Port GPIOC
|
|
|
|
#define LCD_G6_Pin GPIO_PIN_1
|
|
|
|
#define LCD_G6_GPIO_Port GPIOK
|
|
|
|
#define LCD_G7_Pin GPIO_PIN_2
|
|
|
|
#define LCD_G7_GPIO_Port GPIOK
|
|
|
|
#define ARDUINO_PWM_D10_Pin GPIO_PIN_8
|
|
|
|
#define ARDUINO_PWM_D10_GPIO_Port GPIOA
|
|
|
|
#define OSC_25M_Pin GPIO_PIN_0
|
|
|
|
#define OSC_25M_GPIO_Port GPIOH
|
|
|
|
#define FMC_A2_Pin GPIO_PIN_2
|
|
|
|
#define FMC_A2_GPIO_Port GPIOF
|
|
|
|
#define LCD_INT_Pin GPIO_PIN_13
|
|
|
|
#define LCD_INT_GPIO_Port GPIOI
|
|
|
|
#define LCD_R0_Pin GPIO_PIN_15
|
|
|
|
#define LCD_R0_GPIO_Port GPIOI
|
|
|
|
#define LCD_G4_Pin GPIO_PIN_11
|
|
|
|
#define LCD_G4_GPIO_Port GPIOJ
|
|
|
|
#define LCD_G5_Pin GPIO_PIN_0
|
|
|
|
#define LCD_G5_GPIO_Port GPIOK
|
|
|
|
#define ARDUINO_RX_D0_Pin GPIO_PIN_7
|
|
|
|
#define ARDUINO_RX_D0_GPIO_Port GPIOC
|
|
|
|
#define FMC_A3_Pin GPIO_PIN_3
|
|
|
|
#define FMC_A3_GPIO_Port GPIOF
|
|
|
|
#define LCD_CLK_Pin GPIO_PIN_14
|
|
|
|
#define LCD_CLK_GPIO_Port GPIOI
|
|
|
|
#define LCD_G1_Pin GPIO_PIN_8
|
|
|
|
#define LCD_G1_GPIO_Port GPIOJ
|
|
|
|
#define LCD_G3_Pin GPIO_PIN_10
|
|
|
|
#define LCD_G3_GPIO_Port GPIOJ
|
|
|
|
#define FMC_SDCLK_Pin GPIO_PIN_8
|
|
|
|
#define FMC_SDCLK_GPIO_Port GPIOG
|
|
|
|
#define ARDUINO_TX_D1_Pin GPIO_PIN_6
|
|
|
|
#define ARDUINO_TX_D1_GPIO_Port GPIOC
|
|
|
|
#define FMC_A4_Pin GPIO_PIN_4
|
|
|
|
#define FMC_A4_GPIO_Port GPIOF
|
|
|
|
#define FMC_SDNE0_Pin GPIO_PIN_3
|
|
|
|
#define FMC_SDNE0_GPIO_Port GPIOH
|
|
|
|
#define LCD_G0_Pin GPIO_PIN_7
|
|
|
|
#define LCD_G0_GPIO_Port GPIOJ
|
|
|
|
#define LCD_G2_Pin GPIO_PIN_9
|
|
|
|
#define LCD_G2_GPIO_Port GPIOJ
|
|
|
|
#define ARDUINO_D4_Pin GPIO_PIN_7
|
|
|
|
#define ARDUINO_D4_GPIO_Port GPIOG
|
|
|
|
#define ARDUINO_D2_Pin GPIO_PIN_6
|
|
|
|
#define ARDUINO_D2_GPIO_Port GPIOG
|
|
|
|
#define ARDUINO_A4_Pin GPIO_PIN_7
|
|
|
|
#define ARDUINO_A4_GPIO_Port GPIOF
|
|
|
|
#define ARDUINO_A5_Pin GPIO_PIN_6
|
|
|
|
#define ARDUINO_A5_GPIO_Port GPIOF
|
|
|
|
#define FMC_A5_Pin GPIO_PIN_5
|
|
|
|
#define FMC_A5_GPIO_Port GPIOF
|
|
|
|
#define NC2_Pin GPIO_PIN_2
|
|
|
|
#define NC2_GPIO_Port GPIOH
|
|
|
|
#define LCD_R7_Pin GPIO_PIN_6
|
|
|
|
#define LCD_R7_GPIO_Port GPIOJ
|
|
|
|
#define FMC_D1_Pin GPIO_PIN_15
|
|
|
|
#define FMC_D1_GPIO_Port GPIOD
|
|
|
|
#define FMC_D15_Pin GPIO_PIN_10
|
|
|
|
#define FMC_D15_GPIO_Port GPIOD
|
|
|
|
#define ARDUINO_A1_Pin GPIO_PIN_10
|
|
|
|
#define ARDUINO_A1_GPIO_Port GPIOF
|
|
|
|
#define ARDUINO_A2_Pin GPIO_PIN_9
|
|
|
|
#define ARDUINO_A2_GPIO_Port GPIOF
|
|
|
|
#define ARDUINO_A3_Pin GPIO_PIN_8
|
|
|
|
#define ARDUINO_A3_GPIO_Port GPIOF
|
|
|
|
#define FMC_SDCKE0_Pin GPIO_PIN_3
|
|
|
|
#define FMC_SDCKE0_GPIO_Port GPIOC
|
|
|
|
#define FMC_D0_Pin GPIO_PIN_14
|
|
|
|
#define FMC_D0_GPIO_Port GPIOD
|
|
|
|
#define FMC_D14_Pin GPIO_PIN_9
|
|
|
|
#define FMC_D14_GPIO_Port GPIOD
|
|
|
|
#define FMC_D13_Pin GPIO_PIN_8
|
|
|
|
#define FMC_D13_GPIO_Port GPIOD
|
|
|
|
#define RMII_MDC_Pin GPIO_PIN_1
|
|
|
|
#define RMII_MDC_GPIO_Port GPIOC
|
|
|
|
#define FMC_A6_Pin GPIO_PIN_12
|
|
|
|
#define FMC_A6_GPIO_Port GPIOF
|
|
|
|
#define FMC_A11_Pin GPIO_PIN_1
|
|
|
|
#define FMC_A11_GPIO_Port GPIOG
|
|
|
|
#define FMC_A9_Pin GPIO_PIN_15
|
|
|
|
#define FMC_A9_GPIO_Port GPIOF
|
|
|
|
#define LCD_R5_Pin GPIO_PIN_4
|
|
|
|
#define LCD_R5_GPIO_Port GPIOJ
|
|
|
|
#define QSPI_D1_Pin GPIO_PIN_12
|
|
|
|
#define QSPI_D1_GPIO_Port GPIOD
|
|
|
|
#define QSPI_D3_Pin GPIO_PIN_13
|
|
|
|
#define QSPI_D3_GPIO_Port GPIOD
|
|
|
|
#define EXT_RST_Pin GPIO_PIN_3
|
|
|
|
#define EXT_RST_GPIO_Port GPIOG
|
|
|
|
#define RMII_RXER_Pin GPIO_PIN_2
|
|
|
|
#define RMII_RXER_GPIO_Port GPIOG
|
|
|
|
#define LCD_R6_Pin GPIO_PIN_5
|
|
|
|
#define LCD_R6_GPIO_Port GPIOJ
|
|
|
|
#define RMII_REF_CLK_Pin GPIO_PIN_1
|
|
|
|
#define RMII_REF_CLK_GPIO_Port GPIOA
|
|
|
|
#define ARDUINO_A0_Pin GPIO_PIN_0
|
|
|
|
#define ARDUINO_A0_GPIO_Port GPIOA
|
|
|
|
#define RMII_RXD0_Pin GPIO_PIN_4
|
|
|
|
#define RMII_RXD0_GPIO_Port GPIOC
|
|
|
|
#define FMC_A7_Pin GPIO_PIN_13
|
|
|
|
#define FMC_A7_GPIO_Port GPIOF
|
|
|
|
#define FMC_A10_Pin GPIO_PIN_0
|
|
|
|
#define FMC_A10_GPIO_Port GPIOG
|
|
|
|
#define LCD_R4_Pin GPIO_PIN_3
|
|
|
|
#define LCD_R4_GPIO_Port GPIOJ
|
|
|
|
#define FMC_D5_Pin GPIO_PIN_8
|
|
|
|
#define FMC_D5_GPIO_Port GPIOE
|
|
|
|
#define QSPI_D0_Pin GPIO_PIN_11
|
|
|
|
#define QSPI_D0_GPIO_Port GPIOD
|
|
|
|
#define FMC_BA1_Pin GPIO_PIN_5
|
|
|
|
#define FMC_BA1_GPIO_Port GPIOG
|
|
|
|
#define FMC_BA0_Pin GPIO_PIN_4
|
|
|
|
#define FMC_BA0_GPIO_Port GPIOG
|
|
|
|
#define LCD_SCL_Pin_Pin GPIO_PIN_7
|
|
|
|
#define LCD_SCL_Pin_GPIO_Port GPIOH
|
|
|
|
#define RMII_MDIO_Pin GPIO_PIN_2
|
|
|
|
#define RMII_MDIO_GPIO_Port GPIOA
|
|
|
|
#define RMII_RXD1_Pin GPIO_PIN_5
|
|
|
|
#define RMII_RXD1_GPIO_Port GPIOC
|
|
|
|
#define FMC_A8_Pin GPIO_PIN_14
|
|
|
|
#define FMC_A8_GPIO_Port GPIOF
|
|
|
|
#define LCD_R3_Pin GPIO_PIN_2
|
|
|
|
#define LCD_R3_GPIO_Port GPIOJ
|
|
|
|
#define FMC_SDNRAS_Pin GPIO_PIN_11
|
|
|
|
#define FMC_SDNRAS_GPIO_Port GPIOF
|
|
|
|
#define FMC_D6_Pin GPIO_PIN_9
|
|
|
|
#define FMC_D6_GPIO_Port GPIOE
|
|
|
|
#define FMC_D8_Pin GPIO_PIN_11
|
|
|
|
#define FMC_D8_GPIO_Port GPIOE
|
|
|
|
#define FMC_D11_Pin GPIO_PIN_14
|
|
|
|
#define FMC_D11_GPIO_Port GPIOE
|
|
|
|
#define ARDUINO_PWM_D6_Pin GPIO_PIN_6
|
|
|
|
#define ARDUINO_PWM_D6_GPIO_Port GPIOH
|
|
|
|
#define LCD_SDA_Pin_Pin GPIO_PIN_8
|
|
|
|
#define LCD_SDA_Pin_GPIO_Port GPIOH
|
|
|
|
#define RMII_CRS_DV_Pin GPIO_PIN_7
|
|
|
|
#define RMII_CRS_DV_GPIO_Port GPIOA
|
|
|
|
#define LCD_R1_Pin GPIO_PIN_0
|
|
|
|
#define LCD_R1_GPIO_Port GPIOJ
|
|
|
|
#define LCD_R2_Pin GPIO_PIN_1
|
|
|
|
#define LCD_R2_GPIO_Port GPIOJ
|
|
|
|
#define FMC_D4_Pin GPIO_PIN_7
|
|
|
|
#define FMC_D4_GPIO_Port GPIOE
|
|
|
|
#define FMC_D7_Pin GPIO_PIN_10
|
|
|
|
#define FMC_D7_GPIO_Port GPIOE
|
|
|
|
#define FMC_D9_Pin GPIO_PIN_12
|
|
|
|
#define FMC_D9_GPIO_Port GPIOE
|
|
|
|
#define FMC_D12_Pin GPIO_PIN_15
|
|
|
|
#define FMC_D12_GPIO_Port GPIOE
|
|
|
|
#define FMC_D10_Pin GPIO_PIN_13
|
|
|
|
#define FMC_D10_GPIO_Port GPIOE
|
|
|
|
#define ARDUINO_MISO_D12_Pin GPIO_PIN_14
|
|
|
|
#define ARDUINO_MISO_D12_GPIO_Port GPIOB
|
|
|
|
#define ARDUINO_MOSI_PWM_D11_Pin GPIO_PIN_15
|
|
|
|
#define ARDUINO_MOSI_PWM_D11_GPIO_Port GPIOB
|
|
|
|
#define USER_BTN_Pin GPIO_PIN_11
|
|
|
|
#define USER_BTN_GPIO_Port GPIOI
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
|
|
|
|
|
|
/* USER CODE END Private defines */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __MAIN_H */
|