Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches
nrf_nn_platform_debug.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
14#ifndef _NRF_NN_DEBUG_H_
15#define _NRF_NN_DEBUG_H_
16
18
26#ifdef NRF_NN_ENABLE_RUNTIME_CHECKS
27#define NRF_NN_RETURN_IF(is_true, ret_val) RETURN_IF(is_true, ret_val)
28#else
29#define NRF_NN_RETURN_IF(is_true, ret_val) ;
30#endif // NRF_NN_ENABLE_RUNTIME_CHECKS
31
36#ifndef NRF_NN_LOG_ENABLE
37#define NRF_NN_LOG_ENABLE 0
38#endif
39
40#if NRF_NN_LOG_ENABLE == 1
41#include <stdio.h>
42#define NRF_NN_LOG(...) printf(__VA_ARGS__)
43#else
44#define NRF_NN_LOG(...)
45#endif // NRF_NN_LOG_ENABLE
46
51#ifndef NRF_NN_ASSERT_ENABLE
52#define NRF_NN_ASSERT_ENABLE 0
53#endif
54
55#if NRF_NN_ASSERT_ENABLE == 1
56#include <assert.h>
57#define nrf_nn_assert(x) assert(x)
58#else
59#define nrf_nn_assert(x) ;
60#endif // NRF_NN_ASSERT_ENABLE
61
62#endif /* _NRF_NN_DEBUG_H_ */
63