stm32_assert.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. ******************************************************************************
  3. * @file stm32_assert.h
  4. * @brief STM32 assert file.
  5. ******************************************************************************
  6. * @attention
  7. *
  8. * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
  9. * All rights reserved.</center></h2>
  10. *
  11. * This software component is licensed by ST under BSD 3-Clause license,
  12. * the "License"; You may not use this file except in compliance with the
  13. * License. You may obtain a copy of the License at:
  14. * opensource.org/licenses/BSD-3-Clause
  15. *
  16. ******************************************************************************
  17. */
  18. /* Define to prevent recursive inclusion -------------------------------------*/
  19. #ifndef __STM32_ASSERT_H
  20. #define __STM32_ASSERT_H
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #ifdef USE_FULL_ASSERT
  25. #define assert_param(expr) ((expr) ? (void)0U : assert_failed())
  26. void assert_failed();
  27. #else
  28. #define assert_param(expr) ((void)0U)
  29. #endif /* USE_FULL_ASSERT */
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif /* __STM32_ASSERT_H */
  34. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/