app_error_weak.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Copyright (c) 2016 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. #ifndef APP_ERROR_WEAK_H__
  13. #define APP_ERROR_WEAK_H__
  14. /** @file
  15. *
  16. * @defgroup app_error Common application error handler
  17. * @{
  18. * @ingroup app_common
  19. *
  20. * @brief Common application error handler.
  21. */
  22. /**@brief Callback function for asserts in the SoftDevice.
  23. *
  24. * @details A pointer to this function will be passed to the SoftDevice. This function will be
  25. * called by the SoftDevice if certain unrecoverable errors occur within the
  26. * application or SoftDevice.
  27. *
  28. * See @ref nrf_fault_handler_t for more details.
  29. *
  30. * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS.
  31. * @param[in] pc The program counter of the instruction that triggered the fault, or 0 if
  32. * unavailable.
  33. * @param[in] info Optional additional information regarding the fault. Refer to each fault
  34. * identifier for details.
  35. *
  36. * @remarks Function is implemented as weak so that it can be overwritten by custom application
  37. * error handler when needed.
  38. */
  39. #ifdef __CC_ARM
  40. void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info);
  41. #else
  42. __WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info);
  43. #endif
  44. /** @} */
  45. #endif // APP_ERROR_WEAK_H__