You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
3.7 KiB
C

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/* 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 */
/* 系统åˆ<C3A5>å§åŒæ ‡å¿?. */
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 POWER_GPS_Pin GPIO_PIN_2
#define POWER_GPS_GPIO_Port GPIOE
#define POWER_3V3_Pin GPIO_PIN_3
#define POWER_3V3_GPIO_Port GPIOE
#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 CH1_FREQ_Pin GPIO_PIN_1
#define CH1_FREQ_GPIO_Port GPIOG
#define POWER_DAU_Pin GPIO_PIN_11
#define POWER_DAU_GPIO_Port GPIOE
#define BAT_CHARGE_Pin GPIO_PIN_14
#define BAT_CHARGE_GPIO_Port GPIOD
#define BAT_CLK_Pin GPIO_PIN_15
#define BAT_CLK_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 RS485_B_DE_Pin GPIO_PIN_3
#define RS485_B_DE_GPIO_Port GPIOD
#define GPS_RST_Pin GPIO_PIN_4
#define GPS_RST_GPIO_Port GPIOD
#define POWER_RS485_CHECK_Pin GPIO_PIN_7
#define POWER_RS485_CHECK_GPIO_Port GPIOD
#define POWER_RS485_Pin GPIO_PIN_9
#define POWER_RS485_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_4G_Pin GPIO_PIN_0
#define POWER_4G_GPIO_Port GPIOE
#define POWER_12V_Pin GPIO_PIN_1
#define POWER_12V_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 */