Appiko
app_error.h
1 
29 #ifndef CODEBASE_SD_ASSIST_APP_ERROR_H_
30 #define CODEBASE_SD_ASSIST_APP_ERROR_H_
31 
32 #include <stdint.h>
33 #include <stdbool.h>
34 
35 #ifndef SOFTDEVICE_PRESENT
36 #error "App Error check is meant to be used with a SoftDevice"
37 #endif
38 
39 #include "nrf_error.h"
40 
48 void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name);
49 
55 #define APP_ERROR_CHECK(ERR_CODE) \
56 do \
57 { \
58  const uint32_t LOCAL_ERR_CODE = (ERR_CODE); \
59  if (LOCAL_ERR_CODE != NRF_SUCCESS) \
60  { \
61  app_error_handler((ERR_CODE), __LINE__, (uint8_t*) __FILE__); \
62  } \
63 } while (0)
64 
73 void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info);
74 
75 #endif /* CODEBASE_SD_ASSIST_APP_ERROR_H_ */
76 
void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
Callback to be invoked in case of fault i.e. unrecoverable errors occurring within the application or...
Definition: app_error.c:55
void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t *p_file_name)
Function called when an error occurs. If DEBUG flag is present the error information is printed on lo...
Definition: app_error.c:50