Appiko
Macros | Functions
Application error handler

Handler which prints SoftDevice application error info over the configured logging channel when DEBUG flag is present. More...

Macros

#define APP_ERROR_CHECK(ERR_CODE)
 Macro calls error handler if the provided error code is not NRF_SUCCESS. The behavior of this call depends on whether DEBUG flag is present. More...
 

Functions

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 log_printf, otherwise nothing is done. More...
 
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 SoftDevice. The only way to recover is through a reset. More...
 

Detailed Description

Macro Definition Documentation

◆ APP_ERROR_CHECK

#define APP_ERROR_CHECK (   ERR_CODE)
Value:
do \
{ \
const uint32_t LOCAL_ERR_CODE = (ERR_CODE); \
if (LOCAL_ERR_CODE != NRF_SUCCESS) \
{ \
app_error_handler((ERR_CODE), __LINE__, (uint8_t*) __FILE__); \
} \
} while (0)
Parameters
[in]ERR_CODEError code supplied to the error handler.

Definition at line 55 of file app_error.h.

Function Documentation

◆ app_error_fault_handler()

void app_error_fault_handler ( uint32_t  id,
uint32_t  pc,
uint32_t  info 
)
Parameters
idFault identifier
pcThe program counter of the instruction that triggered the fault.
infoOptional additional information regarding the fault.

Definition at line 55 of file app_error.c.

Referenced by ble_stack_init(), sensebe_ble_stack_init(), and sensepi_ble_stack_init().

◆ app_error_handler()

void app_error_handler ( uint32_t  error_code,
uint32_t  line_num,
const uint8_t *  p_file_name 
)
Parameters
[in]error_codeError code supplied to the handler.
[in]line_numLine number where the handler is called.
[in]p_file_namePointer to the file name.

app_error.c Application error handler Copyright (C) 2019 Appiko

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Definition at line 50 of file app_error.c.