osassert.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* ----> DO NOT REMOVE THE FOLLOWING NOTICE <----
  2. Copyright (c) 2014-2017 Datalight, Inc.
  3. All Rights Reserved Worldwide.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; use version 2 of the License.
  7. This program is distributed in the hope that it will be useful,
  8. but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty
  9. of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License along
  12. with this program; if not, write to the Free Software Foundation, Inc.,
  13. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  14. */
  15. /* Businesses and individuals that for commercial or other reasons cannot
  16. comply with the terms of the GPLv2 license may obtain a commercial license
  17. before incorporating Reliance Edge into proprietary software for
  18. distribution in any form. Visit http://www.datalight.com/reliance-edge for
  19. more information.
  20. */
  21. /** @file
  22. @brief Implements assertion handling.
  23. */
  24. #include "hal.h"
  25. #if (HAL_USE_SDMMC == TRUE)
  26. #include "sama_sdmmc_lld.h"
  27. #if SDMMC_USE_RELEDGE_LIB == 1
  28. #include <redfs.h>
  29. #if REDCONF_ASSERTS == 1
  30. #include <redosdeviations.h>
  31. /** @brief Invoke the native assertion handler.
  32. @param pszFileName Null-terminated string containing the name of the file
  33. where the assertion fired.
  34. @param ulLineNum Line number in @p pszFileName where the assertion
  35. fired.
  36. */
  37. void RedOsAssertFail(
  38. const char *pszFileName,
  39. uint32_t ulLineNum)
  40. {
  41. #if REDCONF_OUTPUT == 1
  42. IGNORE_ERRORS(PRINT_ASSERT(pszFileName, ulLineNum));
  43. #endif
  44. while(true)
  45. {
  46. }
  47. }
  48. #endif
  49. #endif
  50. #endif