166 lines
4.1 KiB
C
166 lines
4.1 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) 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 "stm32f1xx_hal.h"
|
|
|
|
/* Private includes ----------------------------------------------------------*/
|
|
/* USER CODE BEGIN Includes */
|
|
|
|
/* USER CODE END Includes */
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
/* USER CODE BEGIN ET */
|
|
typedef enum{
|
|
omchiuso,
|
|
omM1fw1,
|
|
omM1fw2,
|
|
omM1bw1,
|
|
omM1bw2,
|
|
omM2fw1,
|
|
omM2fw2,
|
|
omM2bw1,
|
|
omM2bw2,
|
|
omM3fw1,
|
|
omM3fw2,
|
|
omM3bw1,
|
|
omM3bw2,
|
|
omM4fw1,
|
|
omM4fw2,
|
|
omM4bw1,
|
|
omM4bw2,
|
|
omStopMan,
|
|
omapertura0,
|
|
omstopapertura,
|
|
omstoprestartchiusura,
|
|
omstoprestartapertura,
|
|
omaperto,
|
|
omchiusura1,
|
|
omemergenza1,
|
|
omstopchiusura,
|
|
}omCiclo_st;
|
|
/* USER CODE END ET */
|
|
|
|
/* Exported constants --------------------------------------------------------*/
|
|
/* USER CODE BEGIN EC */
|
|
|
|
/* USER CODE END EC */
|
|
|
|
/* Exported macro ------------------------------------------------------------*/
|
|
/* USER CODE BEGIN EM */
|
|
|
|
/* USER CODE END EM */
|
|
|
|
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
|
|
|
/* Exported functions prototypes ---------------------------------------------*/
|
|
void Error_Handler(void);
|
|
|
|
/* USER CODE BEGIN EFP */
|
|
|
|
/* USER CODE END EFP */
|
|
|
|
/* Private defines -----------------------------------------------------------*/
|
|
#define LED2_Pin GPIO_PIN_13
|
|
#define LED2_GPIO_Port GPIOC
|
|
#define P1_Pin GPIO_PIN_14
|
|
#define P1_GPIO_Port GPIOC
|
|
#define P2_Pin GPIO_PIN_15
|
|
#define P2_GPIO_Port GPIOC
|
|
#define IN1_Pin GPIO_PIN_0
|
|
#define IN1_GPIO_Port GPIOA
|
|
#define IN2_Pin GPIO_PIN_1
|
|
#define IN2_GPIO_Port GPIOA
|
|
#define IN3_Pin GPIO_PIN_2
|
|
#define IN3_GPIO_Port GPIOA
|
|
#define IN4_Pin GPIO_PIN_3
|
|
#define IN4_GPIO_Port GPIOA
|
|
#define AIN1_Pin GPIO_PIN_4
|
|
#define AIN1_GPIO_Port GPIOA
|
|
#define AIN2_Pin GPIO_PIN_5
|
|
#define AIN2_GPIO_Port GPIOA
|
|
#define AIN3_Pin GPIO_PIN_6
|
|
#define AIN3_GPIO_Port GPIOA
|
|
#define AIN4_Pin GPIO_PIN_7
|
|
#define AIN4_GPIO_Port GPIOA
|
|
#define ANEM_Pin GPIO_PIN_0
|
|
#define ANEM_GPIO_Port GPIOB
|
|
#define INH1_Pin GPIO_PIN_1
|
|
#define INH1_GPIO_Port GPIOB
|
|
#define INH2_Pin GPIO_PIN_2
|
|
#define INH2_GPIO_Port GPIOB
|
|
#define INH3_Pin GPIO_PIN_10
|
|
#define INH3_GPIO_Port GPIOB
|
|
#define INH4_Pin GPIO_PIN_11
|
|
#define INH4_GPIO_Port GPIOB
|
|
#define CH1_Pin GPIO_PIN_12
|
|
#define CH1_GPIO_Port GPIOB
|
|
#define CH2_Pin GPIO_PIN_13
|
|
#define CH2_GPIO_Port GPIOB
|
|
#define CH3_Pin GPIO_PIN_14
|
|
#define CH3_GPIO_Port GPIOB
|
|
#define CH4_Pin GPIO_PIN_15
|
|
#define CH4_GPIO_Port GPIOB
|
|
#define BUZ_Pin GPIO_PIN_8
|
|
#define BUZ_GPIO_Port GPIOA
|
|
#define SWIO_Pin GPIO_PIN_13
|
|
#define SWIO_GPIO_Port GPIOA
|
|
#define SWCLK_Pin GPIO_PIN_14
|
|
#define SWCLK_GPIO_Port GPIOA
|
|
#define LED1_Pin GPIO_PIN_15
|
|
#define LED1_GPIO_Port GPIOA
|
|
#define EXP1_Pin GPIO_PIN_3
|
|
#define EXP1_GPIO_Port GPIOB
|
|
#define EXP2_Pin GPIO_PIN_4
|
|
#define EXP2_GPIO_Port GPIOB
|
|
#define EXP3_Pin GPIO_PIN_5
|
|
#define EXP3_GPIO_Port GPIOB
|
|
#define IN5_Pin GPIO_PIN_6
|
|
#define IN5_GPIO_Port GPIOB
|
|
#define IN6_Pin GPIO_PIN_7
|
|
#define IN6_GPIO_Port GPIOB
|
|
#define IN7_Pin GPIO_PIN_8
|
|
#define IN7_GPIO_Port GPIOB
|
|
#define IN8_Pin GPIO_PIN_9
|
|
#define IN8_GPIO_Port GPIOB
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
#define INP1 1
|
|
#define INP2 2
|
|
#define INCH1 4
|
|
#define INCH2 8
|
|
#define INCH3 16
|
|
#define INCH4 32
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|