hal_assert.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*******************************************************************************
  2. * (c) Copyright 2008-2013 Microsemi SoC Products Group. All rights reserved.
  3. *
  4. * SVN $Revision: 7375 $
  5. * SVN $Date: 2015-05-01 19:27:40 +0530 (Fri, 01 May 2015) $
  6. */
  7. #ifndef HAL_ASSERT_HEADER
  8. #define HAL_ASSERT_HEADER
  9. #ifdef MSCC_NO_RELATIVE_PATHS
  10. #include "mss_assert.h"
  11. #else
  12. #include "../CMSIS/mss_assert.h"
  13. #endif
  14. #if defined(NDEBUG)
  15. /***************************************************************************//**
  16. * HAL_ASSERT() is defined out when the NDEBUG symbol is used.
  17. ******************************************************************************/
  18. #define HAL_ASSERT(CHECK)
  19. #else
  20. /***************************************************************************//**
  21. * Default behaviour for HAL_ASSERT() macro:
  22. *------------------------------------------------------------------------------
  23. * Using the HAL_ASSERT() macro is the same as directly using the SmartFusion2
  24. * CMSIS ASSERT() macro. The behaviour is toolchain specific and project
  25. * setting specific.
  26. ******************************************************************************/
  27. #define HAL_ASSERT(CHECK) ASSERT(CHECK);
  28. #endif /* NDEBUG */
  29. #endif /* HAL_ASSERT_HEADER */