123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- /* 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) 2025 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 */
- #include <string.h> // memset
- #include <stdio.h> // printf
- #include <stdbool.h> // bool
- #include <stdlib.h> // abs
- #include <stdint.h> // uint8_t
- #include "Printf.h"
- #include "led.h"
- #include "Modbussimple.h"
- #include "uType.h"
- #include "Callback.h"
- #include "FLASH.h"
- #include "tiny_md5.h"
- #include "iap_upgrade.h"
-
- //#include "lt_fdc2214_iic.h"
- #include "lt_fdc2214.h"
- #include "Tlt_fdc2214.h"
- //#include "ADS1256.h" // 硬件SPI
- //#include "ADS1256_soft.h"
- #include "ADS1256tb.h"
- #include "filter.h"
- #include "ntc_temperature.h"
- #include "calib_piecewise_linear.h"
- #include "kv_flash.h"
- #include "task_monitor.h"
- /* USER CODE END Includes */
- /* Exported types ------------------------------------------------------------*/
- /* USER CODE BEGIN ET */
- void Restart_UART2_DMA(void);
- void Restart_UART1_DMA(void);
- /* 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 ADS_DRDY_Pin GPIO_PIN_0
- #define ADS_DRDY_GPIO_Port GPIOA
- #define SPI_CS_Pin GPIO_PIN_4
- #define SPI_CS_GPIO_Port GPIOA
- #define ADS_RST_Pin GPIO_PIN_0
- #define ADS_RST_GPIO_Port GPIOB
- #define ADS_PDMN_Pin GPIO_PIN_1
- #define ADS_PDMN_GPIO_Port GPIOB
- #define FDC_SLEEP1_Pin GPIO_PIN_2
- #define FDC_SLEEP1_GPIO_Port GPIOB
- #define IIC_SCL_Pin GPIO_PIN_10
- #define IIC_SCL_GPIO_Port GPIOB
- #define IIC_SDA_Pin GPIO_PIN_11
- #define IIC_SDA_GPIO_Port GPIOB
- #define LED_R_Pin GPIO_PIN_12
- #define LED_R_GPIO_Port GPIOB
- #define LED_G_Pin GPIO_PIN_13
- #define LED_G_GPIO_Port GPIOB
- #define RS485_RD_Pin GPIO_PIN_11
- #define RS485_RD_GPIO_Port GPIOA
- #define BootLED_Pin GPIO_PIN_15
- #define BootLED_GPIO_Port GPIOA
- #define FDC_SLEEP2_Pin GPIO_PIN_5
- #define FDC_SLEEP2_GPIO_Port GPIOB
- #define IIC_SCL2_Pin GPIO_PIN_6
- #define IIC_SCL2_GPIO_Port GPIOB
- #define IIC_SDA2_Pin GPIO_PIN_7
- #define IIC_SDA2_GPIO_Port GPIOB
- /* USER CODE BEGIN Private defines */
- /* USER CODE END Private defines */
- #ifdef __cplusplus
- }
- #endif
- #endif /* __MAIN_H */
|