/** ****************************************************************************** * @file main.h * @author MCD Application Team * @brief Header for main.c file. * This file contains the common defines of the application. ****************************************************************************** * @attention * * Copyright (c) 2023 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. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __MAIN_H #define __MAIN_H /* Includes ------------------------------------------------------------------*/ #include "stm32mp2xx_hal.h" /* USER CODE BEGIN Includes */ #include "stm32mp257f_eval.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 DEFAULT_IRQ_PRIO 1U /* ########################## Assert Selection ############################## */ /** * @brief Uncomment the line below to expanse the "assert_param" macro in the * HAL drivers code */ /* #define USE_FULL_ASSERT 1U */ /* USER CODE BEGIN Private defines */ /* Initialize TIMx peripheral as follows: + Prescaler = (SystemCoreClock / 16000000) - 1 + Period = (666 - 1) + ClockDivision = 0 + Counter direction = Up */ #define PERIOD_VALUE (uint32_t)(666 - 1) /* Period Value */ #define PULSE1_VALUE (uint32_t)(PERIOD_VALUE/2) /* Capture Compare 1 Value */ #define PULSE2_VALUE (uint32_t)(PERIOD_VALUE*37.5/100) /* Capture Compare 2 Value */ #define PULSE3_VALUE (uint32_t)(PERIOD_VALUE/4) /* Capture Compare 3 Value */ #define PULSE4_VALUE (uint32_t)(PERIOD_VALUE*12.5/100) /* Capture Compare 4 Value */ /* USER CODE END Private defines */ #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* __MAIN_H */