Projet voilier 4IRA1 Arnaud Vergnet Marino Benassai Bastien Picco Yohan Simard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stm32_assert.h 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /**
  2. ******************************************************************************
  3. * @file stm32_assert.h
  4. * @author MCD Application Team
  5. * @brief STM32 assert template file.
  6. * This file should be copied to the application folder and renamed
  7. * to stm32_assert.h.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
  12. * All rights reserved.</center></h2>
  13. *
  14. * This software component is licensed by ST under BSD 3-Clause license,
  15. * the "License"; You may not use this file except in compliance with the
  16. * License. You may obtain a copy of the License at:
  17. * opensource.org/licenses/BSD-3-Clause
  18. *
  19. ******************************************************************************
  20. */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __STM32_ASSERT_H
  23. #define __STM32_ASSERT_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Exported types ------------------------------------------------------------*/
  28. /* Exported constants --------------------------------------------------------*/
  29. /* Includes ------------------------------------------------------------------*/
  30. /* Exported macro ------------------------------------------------------------*/
  31. #ifdef USE_FULL_ASSERT
  32. /**
  33. * @brief The assert_param macro is used for function's parameters check.
  34. * @param expr: If expr is false, it calls assert_failed function
  35. * which reports the name of the source file and the source
  36. * line number of the call that failed.
  37. * If expr is true, it returns no value.
  38. * @retval None
  39. */
  40. #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
  41. /* Exported functions ------------------------------------------------------- */
  42. void assert_failed(uint8_t* file, uint32_t line);
  43. #else
  44. #define assert_param(expr) ((void)0U)
  45. #endif /* USE_FULL_ASSERT */
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif /* __STM32_ASSERT_H */
  50. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/