/* 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) 2024 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 "stm32f1xx_hal.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Exported types ------------------------------------------------------------*/ /* USER CODE BEGIN ET */ extern volatile uint8_t hostRxLen; extern volatile uint8_t hostRxEnd; extern volatile uint8_t motorRxLen; extern volatile uint8_t motorRxEnd; /* USER CODE END ET */ /* Exported constants --------------------------------------------------------*/ /* USER CODE BEGIN EC */ #define HOST_BUFFER_SIZE 64 #define MOTOR_BUFFER_SIZE 64 /* USER CODE END EC */ /* Exported macro ------------------------------------------------------------*/ /* USER CODE BEGIN EM */ /* USER CODE END EM */ /* Exported functions prototypes ---------------------------------------------*/ void Error_Handler(void); void transDataToMotorValve(uint8_t *data, uint16_t len); /* USER CODE BEGIN EFP */ /* USER CODE END EFP */ /* Private defines -----------------------------------------------------------*/ #define DIR2_Pin GPIO_PIN_1 #define DIR2_GPIO_Port GPIOA #define DIR1_Pin GPIO_PIN_2 #define DIR1_GPIO_Port GPIOB #define LED_Pin GPIO_PIN_15 #define LED_GPIO_Port GPIOE #define HOST_485EN_Pin GPIO_PIN_12 #define HOST_485EN_GPIO_Port GPIOB #define NET_INT_Pin GPIO_PIN_8 #define NET_INT_GPIO_Port GPIOD #define NET_RST_Pin GPIO_PIN_9 #define NET_RST_GPIO_Port GPIOD #define NET_CS_Pin GPIO_PIN_10 #define NET_CS_GPIO_Port GPIOD /* USER CODE BEGIN Private defines */ /* USER CODE END Private defines */ #ifdef __cplusplus } #endif #endif /* __MAIN_H */