/* 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 "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
extern uint8_t ArrFlag; /* 加速度Flag */
extern float Acc;         /* 加速度 */
extern uint8_t PulseNum;  /* 脉冲段计数 */
extern int32_t AllPulseCNT;
extern int32_t BaseCNT;
extern int32_t CNT_Only[10];

extern uint8_t EndFlag;
extern uint8_t FullFlag;
/* 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 Y15_Pin GPIO_PIN_6
#define Y15_GPIO_Port GPIOH
#define Y14_Pin GPIO_PIN_7
#define Y14_GPIO_Port GPIOH
#define Y13_Pin GPIO_PIN_8
#define Y13_GPIO_Port GPIOH
#define Y12_Pin GPIO_PIN_9
#define Y12_GPIO_Port GPIOH
#define X5_Pin GPIO_PIN_12
#define X5_GPIO_Port GPIOG
#define X4_Pin GPIO_PIN_5
#define X4_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
