/* 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 "stm32l4xx_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 */
/* 绯荤粺鍒濆鍖栨爣蹇?. */
typedef enum
{
    SYS_INIT_GPIO = 0,
    SYS_INIT_USART,
    SYS_INIT_OS,
    SYS_INIT_ADJ,
    SYS_INIT_RESET,
    SYS_INIT_SHUTDOWN,
    SYS_INIT_ADC,
    SYS_INIT_WARE
} SYS_INIT_E;
/* 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 WDG_Pin GPIO_PIN_0
#define WDG_GPIO_Port GPIOF
#define DAU_50HZ_Pin GPIO_PIN_8
#define DAU_50HZ_GPIO_Port GPIOF
#define DAU_RST_Pin GPIO_PIN_9
#define DAU_RST_GPIO_Port GPIOF
#define DAU_CS_Pin GPIO_PIN_4
#define DAU_CS_GPIO_Port GPIOA
#define POWER_EN_DAU_Pin GPIO_PIN_2
#define POWER_EN_DAU_GPIO_Port GPIOB
#define RS485_DBG_EN_Pin GPIO_PIN_12
#define RS485_DBG_EN_GPIO_Port GPIOF
#define ADC_CS_Pin GPIO_PIN_12
#define ADC_CS_GPIO_Port GPIOB
#define ADC_RST_Pin GPIO_PIN_8
#define ADC_RST_GPIO_Port GPIOD
#define ADC_CONVST_Pin GPIO_PIN_9
#define ADC_CONVST_GPIO_Port GPIOD
#define ADC_OS2_Pin GPIO_PIN_11
#define ADC_OS2_GPIO_Port GPIOD
#define ADC_OS1_Pin GPIO_PIN_12
#define ADC_OS1_GPIO_Port GPIOD
#define ADC_OS0_Pin GPIO_PIN_13
#define ADC_OS0_GPIO_Port GPIOD
#define BAT_CLK_Pin GPIO_PIN_14
#define BAT_CLK_GPIO_Port GPIOD
#define BAT_CHARGE_Pin GPIO_PIN_15
#define BAT_CHARGE_GPIO_Port GPIOD
#define RS485_A_DE_Pin GPIO_PIN_2
#define RS485_A_DE_GPIO_Port GPIOG
#define BAT_CHECK_Pin GPIO_PIN_3
#define BAT_CHECK_GPIO_Port GPIOG
#define LED_RUN_Pin GPIO_PIN_4
#define LED_RUN_GPIO_Port GPIOG
#define POWER_EN_ADC_Pin GPIO_PIN_1
#define POWER_EN_ADC_GPIO_Port GPIOD
#define RS485_B_DE_Pin GPIO_PIN_3
#define RS485_B_DE_GPIO_Port GPIOD
#define POWER_EN_4G_Pin GPIO_PIN_5
#define POWER_EN_4G_GPIO_Port GPIOD
#define SEN_PWR_CHECK_Pin GPIO_PIN_7
#define SEN_PWR_CHECK_GPIO_Port GPIOD
#define SENSOR_EN_Pin GPIO_PIN_9
#define SENSOR_EN_GPIO_Port GPIOG
#define G4G_RST_Pin GPIO_PIN_10
#define G4G_RST_GPIO_Port GPIOG
#define SPI_FLASH_WP_Pin GPIO_PIN_13
#define SPI_FLASH_WP_GPIO_Port GPIOG
#define SPI_FLASH_CS_Pin GPIO_PIN_14
#define SPI_FLASH_CS_GPIO_Port GPIOG
#define POWER_EN_5V_Pin GPIO_PIN_0
#define POWER_EN_5V_GPIO_Port GPIOE
#define POWER_EN_3V3_Pin GPIO_PIN_1
#define POWER_EN_3V3_GPIO_Port GPIOE
/* USER CODE BEGIN Private defines */
extern uint8_t system_init_flag;
/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
