main.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : main.h
  5. * @brief : Header for main.c file.
  6. * This file contains the common defines of the application.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2024 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __MAIN_H
  22. #define __MAIN_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "stm32f1xx_hal.h"
  28. /* Private includes ----------------------------------------------------------*/
  29. /* USER CODE BEGIN Includes */
  30. #include <stdio.h>
  31. #define ENABLE_DEBUG 1
  32. #if ENABLE_DEBUG > 0
  33. #define DEBUG_PRINTF(...) printf("DEBUG: " __VA_ARGS__)
  34. #else
  35. #define DEBUG_PRINTF(...) do {} while (0)
  36. #endif
  37. /* USER CODE END Includes */
  38. /* Exported types ------------------------------------------------------------*/
  39. /* USER CODE BEGIN ET */
  40. /* USER CODE END ET */
  41. /* Exported constants --------------------------------------------------------*/
  42. /* USER CODE BEGIN EC */
  43. /* USER CODE END EC */
  44. /* Exported macro ------------------------------------------------------------*/
  45. /* USER CODE BEGIN EM */
  46. /* USER CODE END EM */
  47. /* Exported functions prototypes ---------------------------------------------*/
  48. void Error_Handler(void);
  49. /* USER CODE BEGIN EFP */
  50. /* USER CODE END EFP */
  51. /* Private defines -----------------------------------------------------------*/
  52. /* USER CODE BEGIN Private defines */
  53. /* USER CODE END Private defines */
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif /* __MAIN_H */