stm32_assert.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. * Copyright (c) 2019 STMicroelectronics.
  12. * All rights reserved.
  13. *
  14. * This software is licensed under terms that can be found in the LICENSE file
  15. * in the root directory of this software component.
  16. * If no LICENSE file comes with this software, it is provided AS-IS.
  17. *
  18. ******************************************************************************
  19. */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef STM32_ASSERT_H
  22. #define STM32_ASSERT_H
  23. #include <core/check.h>
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Exported types ------------------------------------------------------------*/
  28. /* Exported constants --------------------------------------------------------*/
  29. /* Includes ------------------------------------------------------------------*/
  30. /* Exported macro ------------------------------------------------------------*/
  31. /* We're confident in the parameters we pass to LL functions, so we can skip asserts
  32. * since they introduce significant bloat to debug builds */
  33. #ifdef FURI_LL_DEBUG
  34. #define assert_param furi_assert
  35. #else
  36. #define assert_param(__e) \
  37. do { \
  38. ((void)(__e)); \
  39. } while(0)
  40. #endif
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif /* STM32_ASSERT_H */