nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches
nrf_error.h
1/*
2 * Copyright (c) 2025 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7 /* NOTE!
8 * This file is only used if the SoftDevice is not enabled.
9 * When SoftDevice is enabled, the nrf_error.h is included from SoftDevice.
10 * See the components/softdevice folder.
11 */
12#ifdef CONFIG_SOFTDEVICE
13#include_next <nrf_error.h>
14#endif
15
23/* Header guard */
24#ifndef NRF_ERROR_H__
25#define NRF_ERROR_H__
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35 #define NRF_ERROR_BASE_NUM (0x0)
37#define NRF_ERROR_SDM_BASE_NUM (0x1000)
39#define NRF_ERROR_SOC_BASE_NUM (0x2000)
41#define NRF_ERROR_STK_BASE_NUM (0x3000)
45#define NRF_SUCCESS (NRF_ERROR_BASE_NUM + 0)
47#define NRF_ERROR_SVC_HANDLER_MISSING (NRF_ERROR_BASE_NUM + 1)
49#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED (NRF_ERROR_BASE_NUM + 2)
51#define NRF_ERROR_INTERNAL (NRF_ERROR_BASE_NUM + 3)
53#define NRF_ERROR_NO_MEM (NRF_ERROR_BASE_NUM + 4)
55#define NRF_ERROR_NOT_FOUND (NRF_ERROR_BASE_NUM + 5)
57#define NRF_ERROR_NOT_SUPPORTED (NRF_ERROR_BASE_NUM + 6)
59#define NRF_ERROR_INVALID_PARAM (NRF_ERROR_BASE_NUM + 7)
61#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8)
63#define NRF_ERROR_INVALID_LENGTH (NRF_ERROR_BASE_NUM + 9)
65#define NRF_ERROR_INVALID_FLAGS (NRF_ERROR_BASE_NUM + 10)
67#define NRF_ERROR_INVALID_DATA (NRF_ERROR_BASE_NUM + 11)
69#define NRF_ERROR_DATA_SIZE (NRF_ERROR_BASE_NUM + 12)
71#define NRF_ERROR_TIMEOUT (NRF_ERROR_BASE_NUM + 13)
73#define NRF_ERROR_NULL (NRF_ERROR_BASE_NUM + 14)
75#define NRF_ERROR_FORBIDDEN (NRF_ERROR_BASE_NUM + 15)
77#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16)
79#define NRF_ERROR_BUSY (NRF_ERROR_BASE_NUM + 17)
81#define NRF_ERROR_CONN_COUNT (NRF_ERROR_BASE_NUM + 18)
83#define NRF_ERROR_RESOURCES (NRF_ERROR_BASE_NUM + 19)
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* NRF_ERROR_H__ */
90