99 lines
2.9 KiB
C
99 lines
2.9 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 "stm32g4xx_hal.h"
|
|
|
|
/* Private includes ----------------------------------------------------------*/
|
|
/* USER CODE BEGIN Includes */
|
|
#include "LowPass_Filter.h"
|
|
/* USER CODE END Includes */
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
/* USER CODE BEGIN ET */
|
|
#define _2_SQRT3 1.15470053838f
|
|
#define _SQRT3 1.73205080757f
|
|
#define _1_SQRT3 0.57735026919f
|
|
#define _SQRT3_2 0.86602540378f
|
|
#define _SQRT2 1.41421356237f
|
|
#define _120_D2R 2.09439510239f
|
|
#define PI 3.14159265359f
|
|
#define _PI 3.14159265359f
|
|
#define _PI_2 1.57079632679f
|
|
#define _PI_3 1.0471975512f
|
|
#define _2PI 6.28318530718f
|
|
#define _3PI_2 4.71238898038f
|
|
#define _PI_6 0.52359877559f
|
|
/* 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 B1_Pin GPIO_PIN_13
|
|
#define B1_GPIO_Port GPIOC
|
|
#define B1_EXTI_IRQn EXTI15_10_IRQn
|
|
#define LPUART1_TX_Pin GPIO_PIN_2
|
|
#define LPUART1_TX_GPIO_Port GPIOA
|
|
#define LPUART1_RX_Pin GPIO_PIN_3
|
|
#define LPUART1_RX_GPIO_Port GPIOA
|
|
#define VBUS_Pin GPIO_PIN_1
|
|
#define VBUS_GPIO_Port GPIOB
|
|
#define M2_EN_Pin GPIO_PIN_9
|
|
#define M2_EN_GPIO_Port GPIOC
|
|
#define M1_EN_Pin GPIO_PIN_10
|
|
#define M1_EN_GPIO_Port GPIOA
|
|
#define T_SWDIO_Pin GPIO_PIN_13
|
|
#define T_SWDIO_GPIO_Port GPIOA
|
|
#define T_SWCLK_Pin GPIO_PIN_14
|
|
#define T_SWCLK_GPIO_Port GPIOA
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|