nrf_assert.c 865 B

12345678910111213141516171819202122232425262728
  1. /* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved.
  2. *
  3. * The information contained herein is property of Nordic Semiconductor ASA.
  4. * Terms and conditions of usage are described in detail in NORDIC
  5. * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
  6. *
  7. * Licensees are granted free, non-transferable use of the information. NO
  8. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
  9. * the file.
  10. *
  11. */
  12. #include "nrf_assert.h"
  13. #include "app_error.h"
  14. #include "nordic_common.h"
  15. #if defined(DEBUG_NRF)
  16. void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name)
  17. {
  18. assert_info_t assert_info =
  19. {
  20. .line_num = line_num,
  21. .p_file_name = file_name,
  22. };
  23. app_error_fault_handler(NRF_FAULT_ID_SDK_ASSERT, 0, (uint32_t)(&assert_info));
  24. UNUSED_VARIABLE(assert_info);
  25. }
  26. #endif /* DEBUG_NRF */