204 lines
6.6 KiB
C
204 lines
6.6 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 "stm32f4xx_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 FAN_EN_Pin GPIO_PIN_4
|
|
#define FAN_EN_GPIO_Port GPIOE
|
|
#define BEEPER_EN_Pin GPIO_PIN_5
|
|
#define BEEPER_EN_GPIO_Port GPIOE
|
|
#define NAMUR_FRQ_Pin GPIO_PIN_6
|
|
#define NAMUR_FRQ_GPIO_Port GPIOE
|
|
#define PF2_LED_Pin GPIO_PIN_2
|
|
#define PF2_LED_GPIO_Port GPIOF
|
|
#define ADC3_IN9_B10_Pin GPIO_PIN_3
|
|
#define ADC3_IN9_B10_GPIO_Port GPIOF
|
|
#define ADC3_IN14_B9_Pin GPIO_PIN_4
|
|
#define ADC3_IN14_B9_GPIO_Port GPIOF
|
|
#define ADC3_IN5_B8_Pin GPIO_PIN_5
|
|
#define ADC3_IN5_B8_GPIO_Port GPIOF
|
|
#define ADC3_IN4_B7_Pin GPIO_PIN_6
|
|
#define ADC3_IN4_B7_GPIO_Port GPIOF
|
|
#define ADC3_IN5_B6_Pin GPIO_PIN_7
|
|
#define ADC3_IN5_B6_GPIO_Port GPIOF
|
|
#define ADC3_IN6_B5_Pin GPIO_PIN_8
|
|
#define ADC3_IN6_B5_GPIO_Port GPIOF
|
|
#define ADC3_IN7_B4_Pin GPIO_PIN_9
|
|
#define ADC3_IN7_B4_GPIO_Port GPIOF
|
|
#define ADC3_IN8_B3_Pin GPIO_PIN_10
|
|
#define ADC3_IN8_B3_GPIO_Port GPIOF
|
|
#define ADC1_IN10_B2_Pin GPIO_PIN_0
|
|
#define ADC1_IN10_B2_GPIO_Port GPIOC
|
|
#define ADC1_IN11_B1_Pin GPIO_PIN_1
|
|
#define ADC1_IN11_B1_GPIO_Port GPIOC
|
|
#define ADC1_IN12_A10_Pin GPIO_PIN_2
|
|
#define ADC1_IN12_A10_GPIO_Port GPIOC
|
|
#define ADC1_IN13_A9_Pin GPIO_PIN_3
|
|
#define ADC1_IN13_A9_GPIO_Port GPIOC
|
|
#define ADC1_IN0_A8_Pin GPIO_PIN_0
|
|
#define ADC1_IN0_A8_GPIO_Port GPIOA
|
|
#define ADC1_IN1_A7_Pin GPIO_PIN_1
|
|
#define ADC1_IN1_A7_GPIO_Port GPIOA
|
|
#define ADC1_IN2_A6_Pin GPIO_PIN_2
|
|
#define ADC1_IN2_A6_GPIO_Port GPIOA
|
|
#define ADC1_IN3_A5_Pin GPIO_PIN_3
|
|
#define ADC1_IN3_A5_GPIO_Port GPIOA
|
|
#define VOUT_A_DAC1_Pin GPIO_PIN_4
|
|
#define VOUT_A_DAC1_GPIO_Port GPIOA
|
|
#define VOUT_B_DAC2_Pin GPIO_PIN_5
|
|
#define VOUT_B_DAC2_GPIO_Port GPIOA
|
|
#define ADC1_IN6_A4_Pin GPIO_PIN_6
|
|
#define ADC1_IN6_A4_GPIO_Port GPIOA
|
|
#define ADC1_IN7_A3_Pin GPIO_PIN_7
|
|
#define ADC1_IN7_A3_GPIO_Port GPIOA
|
|
#define ADC1_IN14_A2_Pin GPIO_PIN_4
|
|
#define ADC1_IN14_A2_GPIO_Port GPIOC
|
|
#define ADC1_IN15_A1_Pin GPIO_PIN_5
|
|
#define ADC1_IN15_A1_GPIO_Port GPIOC
|
|
#define ADC2_VOUTM_A_Pin GPIO_PIN_0
|
|
#define ADC2_VOUTM_A_GPIO_Port GPIOB
|
|
#define ADC2_VOUTM_B_Pin GPIO_PIN_1
|
|
#define ADC2_VOUTM_B_GPIO_Port GPIOB
|
|
#define NAMUR_OC_B_Pin GPIO_PIN_11
|
|
#define NAMUR_OC_B_GPIO_Port GPIOF
|
|
#define NAMUR_OC_A_Pin GPIO_PIN_12
|
|
#define NAMUR_OC_A_GPIO_Port GPIOF
|
|
#define NAMUR_OUTB_EN_Pin GPIO_PIN_13
|
|
#define NAMUR_OUTB_EN_GPIO_Port GPIOF
|
|
#define NAMUR_OUTA_EN_Pin GPIO_PIN_14
|
|
#define NAMUR_OUTA_EN_GPIO_Port GPIOF
|
|
#define USART3_TX_Pin GPIO_PIN_10
|
|
#define USART3_TX_GPIO_Port GPIOB
|
|
#define USART3_RX_Pin GPIO_PIN_11
|
|
#define USART3_RX_GPIO_Port GPIOB
|
|
#define MOTOR_SPI_CS_A_Pin GPIO_PIN_12
|
|
#define MOTOR_SPI_CS_A_GPIO_Port GPIOB
|
|
#define MOTOR_SPI2_SCK_Pin GPIO_PIN_13
|
|
#define MOTOR_SPI2_SCK_GPIO_Port GPIOB
|
|
#define MOTOR_SPI2_MISO_Pin GPIO_PIN_14
|
|
#define MOTOR_SPI2_MISO_GPIO_Port GPIOB
|
|
#define MOTOR_SPI2_MOSI_Pin GPIO_PIN_15
|
|
#define MOTOR_SPI2_MOSI_GPIO_Port GPIOB
|
|
#define MOTOR_A_ERR_Pin GPIO_PIN_8
|
|
#define MOTOR_A_ERR_GPIO_Port GPIOD
|
|
#define MOTOR_NRST_Pin GPIO_PIN_9
|
|
#define MOTOR_NRST_GPIO_Port GPIOD
|
|
#define MOTOR_B_ERR_Pin GPIO_PIN_10
|
|
#define MOTOR_B_ERR_GPIO_Port GPIOD
|
|
#define MOTOR_SPI_CS_B_Pin GPIO_PIN_11
|
|
#define MOTOR_SPI_CS_B_GPIO_Port GPIOD
|
|
#define MOTOR_A_DIR_Pin GPIO_PIN_12
|
|
#define MOTOR_A_DIR_GPIO_Port GPIOD
|
|
#define MOTOR_A_EN_Pin GPIO_PIN_13
|
|
#define MOTOR_A_EN_GPIO_Port GPIOD
|
|
#define MOTOR_A_PUL_Pin GPIO_PIN_14
|
|
#define MOTOR_A_PUL_GPIO_Port GPIOD
|
|
#define MOTOR_B_PUL_Pin GPIO_PIN_15
|
|
#define MOTOR_B_PUL_GPIO_Port GPIOD
|
|
#define MOTOR_B_EN_Pin GPIO_PIN_2
|
|
#define MOTOR_B_EN_GPIO_Port GPIOG
|
|
#define MOTOR_B_DIR_Pin GPIO_PIN_3
|
|
#define MOTOR_B_DIR_GPIO_Port GPIOG
|
|
#define ENCODER_A_CH1_Pin GPIO_PIN_6
|
|
#define ENCODER_A_CH1_GPIO_Port GPIOC
|
|
#define ENCODER_A_CH2_Pin GPIO_PIN_7
|
|
#define ENCODER_A_CH2_GPIO_Port GPIOC
|
|
#define RSVD_LIMIT_A_Pin GPIO_PIN_8
|
|
#define RSVD_LIMIT_A_GPIO_Port GPIOC
|
|
#define ENCODER_B_CH1_Pin GPIO_PIN_8
|
|
#define ENCODER_B_CH1_GPIO_Port GPIOA
|
|
#define ENCODER_B_CH2_Pin GPIO_PIN_9
|
|
#define ENCODER_B_CH2_GPIO_Port GPIOA
|
|
#define RSVD_LIMIT_B_Pin GPIO_PIN_10
|
|
#define RSVD_LIMIT_B_GPIO_Port GPIOA
|
|
#define LVDT_A_TXD_Pin GPIO_PIN_10
|
|
#define LVDT_A_TXD_GPIO_Port GPIOC
|
|
#define LVDT_A_RXD_Pin GPIO_PIN_11
|
|
#define LVDT_A_RXD_GPIO_Port GPIOC
|
|
#define TEMP_A_TXD_Pin GPIO_PIN_12
|
|
#define TEMP_A_TXD_GPIO_Port GPIOC
|
|
#define TEMP_A_RXD_Pin GPIO_PIN_2
|
|
#define TEMP_A_RXD_GPIO_Port GPIOD
|
|
#define LVDT_B_TXD_Pin GPIO_PIN_5
|
|
#define LVDT_B_TXD_GPIO_Port GPIOD
|
|
#define LVDT_B_RXD_Pin GPIO_PIN_6
|
|
#define LVDT_B_RXD_GPIO_Port GPIOD
|
|
#define TEMP_B_RXD_Pin GPIO_PIN_9
|
|
#define TEMP_B_RXD_GPIO_Port GPIOG
|
|
#define TEMP_B_TXD_Pin GPIO_PIN_14
|
|
#define TEMP_B_TXD_GPIO_Port GPIOG
|
|
#define RESULT_B_LAT_Pin GPIO_PIN_15
|
|
#define RESULT_B_LAT_GPIO_Port GPIOG
|
|
#define RESULT_A_LAT_Pin GPIO_PIN_4
|
|
#define RESULT_A_LAT_GPIO_Port GPIOB
|
|
#define FREQ_OPTO_Pin GPIO_PIN_8
|
|
#define FREQ_OPTO_GPIO_Port GPIOB
|
|
#define BLDC_PWM_Pin GPIO_PIN_9
|
|
#define BLDC_PWM_GPIO_Port GPIOB
|
|
#define SEAL_IN_Pin GPIO_PIN_0
|
|
#define SEAL_IN_GPIO_Port GPIOE
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|