Appiko
nrf_assert.c
1 
19 #include "nrf_assert.h"
20 
21 #ifdef DEBUG
22 
23 #include "log.h"
24 #include <stdnoreturn.h>
25 
26 noreturn void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name)
27 {
28  log_printf("Assertion at line %d in file %s.\n", line_num,
29  file_name);
30  while (1)
31  {
32  }
33 }
34 
35 #else
36 
37 void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name)
38 {
39 
40 }
41 
42 #endif /* DEBUG flag as compiler flag */
void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name)
Function called for handling runtime assertions. It prints the assertion log and stays in an infinite...
Definition: nrf_assert.c:37