116 lines
3.3 KiB
C
116 lines
3.3 KiB
C
/* 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 */
|
|
|
|
/* 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 RS485_EN1_Pin GPIO_PIN_1
|
|
#define RS485_EN1_GPIO_Port GPIOA
|
|
#define RS485_TXD1_Pin GPIO_PIN_2
|
|
#define RS485_TXD1_GPIO_Port GPIOA
|
|
#define RS485_RXD1_Pin GPIO_PIN_3
|
|
#define RS485_RXD1_GPIO_Port GPIOA
|
|
#define CS1_Pin GPIO_PIN_4
|
|
#define CS1_GPIO_Port GPIOA
|
|
#define SPI_DRDY_Pin GPIO_PIN_4
|
|
#define SPI_DRDY_GPIO_Port GPIOC
|
|
#define OCIN1_Pin GPIO_PIN_5
|
|
#define OCIN1_GPIO_Port GPIOC
|
|
#define OCIN2_Pin GPIO_PIN_0
|
|
#define OCIN2_GPIO_Port GPIOB
|
|
#define OCIN3_Pin GPIO_PIN_1
|
|
#define OCIN3_GPIO_Port GPIOB
|
|
#define TXD3_Pin GPIO_PIN_10
|
|
#define TXD3_GPIO_Port GPIOB
|
|
#define RXD3_Pin GPIO_PIN_11
|
|
#define RXD3_GPIO_Port GPIOB
|
|
#define CS2_Pin GPIO_PIN_7
|
|
#define CS2_GPIO_Port GPIOC
|
|
#define STOP1_Pin GPIO_PIN_8
|
|
#define STOP1_GPIO_Port GPIOC
|
|
#define STOP2_Pin GPIO_PIN_9
|
|
#define STOP2_GPIO_Port GPIOC
|
|
#define LED_ERR_Pin GPIO_PIN_11
|
|
#define LED_ERR_GPIO_Port GPIOA
|
|
#define LED_NOR_Pin GPIO_PIN_12
|
|
#define LED_NOR_GPIO_Port GPIOA
|
|
#define KEY3_Pin GPIO_PIN_15
|
|
#define KEY3_GPIO_Port GPIOA
|
|
#define TEMP_TX_Pin GPIO_PIN_10
|
|
#define TEMP_TX_GPIO_Port GPIOC
|
|
#define TEMP_RX_Pin GPIO_PIN_11
|
|
#define TEMP_RX_GPIO_Port GPIOC
|
|
#define KEY2_Pin GPIO_PIN_12
|
|
#define KEY2_GPIO_Port GPIOC
|
|
#define KEY1_Pin GPIO_PIN_2
|
|
#define KEY1_GPIO_Port GPIOD
|
|
#define M_EN_A_Pin GPIO_PIN_3
|
|
#define M_EN_A_GPIO_Port GPIOB
|
|
#define M_DIR_A_Pin GPIO_PIN_4
|
|
#define M_DIR_A_GPIO_Port GPIOB
|
|
#define M_PUL_A_Pin GPIO_PIN_5
|
|
#define M_PUL_A_GPIO_Port GPIOB
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|