152 lines
4.6 KiB
C
152 lines
4.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) 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 */
|
|
#include "stdio.h"
|
|
#include <string.h>
|
|
/* 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 DAC7_CS_Pin GPIO_PIN_2
|
|
#define DAC7_CS_GPIO_Port GPIOE
|
|
#define DAC8_CS_Pin GPIO_PIN_3
|
|
#define DAC8_CS_GPIO_Port GPIOE
|
|
#define DAC9_CS_Pin GPIO_PIN_4
|
|
#define DAC9_CS_GPIO_Port GPIOE
|
|
#define PE5_LED_Pin GPIO_PIN_5
|
|
#define PE5_LED_GPIO_Port GPIOE
|
|
#define HART11_RTS_Pin GPIO_PIN_6
|
|
#define HART11_RTS_GPIO_Port GPIOF
|
|
#define HART10_RTS_Pin GPIO_PIN_8
|
|
#define HART10_RTS_GPIO_Port GPIOF
|
|
#define HART_CLK_Pin GPIO_PIN_3
|
|
#define HART_CLK_GPIO_Port GPIOA
|
|
#define HART_ALL_RST_Pin GPIO_PIN_4
|
|
#define HART_ALL_RST_GPIO_Port GPIOA
|
|
#define HART9_RTS_Pin GPIO_PIN_0
|
|
#define HART9_RTS_GPIO_Port GPIOB
|
|
#define CH438_2_INT_Pin GPIO_PIN_13
|
|
#define CH438_2_INT_GPIO_Port GPIOF
|
|
#define CH438_2_INT_EXTI_IRQn EXTI15_10_IRQn
|
|
#define CH438_AMOD_Pin GPIO_PIN_14
|
|
#define CH438_AMOD_GPIO_Port GPIOF
|
|
#define HART8_RTS_Pin GPIO_PIN_0
|
|
#define HART8_RTS_GPIO_Port GPIOG
|
|
#define HART7_RTS_Pin GPIO_PIN_11
|
|
#define HART7_RTS_GPIO_Port GPIOE
|
|
#define HART6_RTS_Pin GPIO_PIN_13
|
|
#define HART6_RTS_GPIO_Port GPIOE
|
|
#define HART5_RTS_Pin GPIO_PIN_8
|
|
#define HART5_RTS_GPIO_Port GPIOD
|
|
#define HART4_RTS_Pin GPIO_PIN_10
|
|
#define HART4_RTS_GPIO_Port GPIOD
|
|
#define HART3_RTS_Pin GPIO_PIN_12
|
|
#define HART3_RTS_GPIO_Port GPIOD
|
|
#define HART2_RTS_Pin GPIO_PIN_2
|
|
#define HART2_RTS_GPIO_Port GPIOG
|
|
#define HART1_RTS_Pin GPIO_PIN_4
|
|
#define HART1_RTS_GPIO_Port GPIOG
|
|
#define HART16_RTS_Pin GPIO_PIN_6
|
|
#define HART16_RTS_GPIO_Port GPIOG
|
|
#define HART15_RTS_Pin GPIO_PIN_9
|
|
#define HART15_RTS_GPIO_Port GPIOA
|
|
#define HART14_RTS_Pin GPIO_PIN_11
|
|
#define HART14_RTS_GPIO_Port GPIOA
|
|
#define HART12_RTS_Pin GPIO_PIN_15
|
|
#define HART12_RTS_GPIO_Port GPIOA
|
|
#define HART13_RTS_Pin GPIO_PIN_11
|
|
#define HART13_RTS_GPIO_Port GPIOC
|
|
#define CH438_1_INT_Pin GPIO_PIN_2
|
|
#define CH438_1_INT_GPIO_Port GPIOD
|
|
#define CH438_1_INT_EXTI_IRQn EXTI2_IRQn
|
|
#define CH438_RST_Pin GPIO_PIN_3
|
|
#define CH438_RST_GPIO_Port GPIOD
|
|
#define DAC10_CS_Pin GPIO_PIN_6
|
|
#define DAC10_CS_GPIO_Port GPIOD
|
|
#define DAC11_CS_Pin GPIO_PIN_10
|
|
#define DAC11_CS_GPIO_Port GPIOG
|
|
#define DAC12_CS_Pin GPIO_PIN_11
|
|
#define DAC12_CS_GPIO_Port GPIOG
|
|
#define DAC13_CS_Pin GPIO_PIN_12
|
|
#define DAC13_CS_GPIO_Port GPIOG
|
|
#define DAC14_CS_Pin GPIO_PIN_13
|
|
#define DAC14_CS_GPIO_Port GPIOG
|
|
#define DAC15_CS_Pin GPIO_PIN_14
|
|
#define DAC15_CS_GPIO_Port GPIOG
|
|
#define DAC16_CS_Pin GPIO_PIN_15
|
|
#define DAC16_CS_GPIO_Port GPIOG
|
|
#define DAC1_CS_Pin GPIO_PIN_6
|
|
#define DAC1_CS_GPIO_Port GPIOB
|
|
#define DAC2_CS_Pin GPIO_PIN_7
|
|
#define DAC2_CS_GPIO_Port GPIOB
|
|
#define DAC3_CS_Pin GPIO_PIN_8
|
|
#define DAC3_CS_GPIO_Port GPIOB
|
|
#define DAC4_CS_Pin GPIO_PIN_9
|
|
#define DAC4_CS_GPIO_Port GPIOB
|
|
#define DAC5_CS_Pin GPIO_PIN_0
|
|
#define DAC5_CS_GPIO_Port GPIOE
|
|
#define DAC6_CS_Pin GPIO_PIN_1
|
|
#define DAC6_CS_GPIO_Port GPIOE
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
#define TRUE 0
|
|
#define FAIL -1
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|