Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
wpt_error_handler.c
Go to the documentation of this file.
1 /* Copyright (c) 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 
16 #include <stdbool.h>
17 #include <stdint.h>
18 
19 #include "app_print.h"
20 #include "app_error.h"
21 
28 {
29  while(true)
30  ;
31 }
32 
50 void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
51 {
52  print_string("\n\rError! ");
53  print_hex(id,4);
54 
55  while(true)
56  ;
57 }
58 
71 void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name)
72 {
73  app_error_handler(0xDEADBEEF, line_num, p_file_name);
74 }
75 
void HardFault_Handler()
Hard Fault handler.
void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t *p_file_name)
Error handler function, which is called when an error has occurred.
Definition: main.c:180
void print_hex(uint32_t number, uint8_t byte_size)
Converts hex number into char and send it through UART TX.
Definition: app_print.c:42
void assert_nrf_callback(uint16_t line_num, const uint8_t *p_file_name)
Assert macro callback function.
void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
Callback function for asserts in the SoftDevice.
void print_string(char *char_array)
Decomposes char array and send chars through UART TX.
Definition: app_print.c:25