Smart Remote 3 nRF52 v1.2
Copy URL
Source
Common
nrf_assert.h
1
/*$$$LICENCE_NORDIC_STANDARD<2006>$$$*/
6
#ifndef NRF_ASSERT_H_
7
#define NRF_ASSERT_H_
8
9
#include <stdint.h>
10
#include "nrf.h"
11
#include "app_error.h"
12
13
#include "sr3_config.h"
14
15
#ifdef __cplusplus
16
extern
"C"
{
17
#endif
18
39
//lint -save -esym(14, assert_nrf_callback)
40
void
assert_nrf_callback(uint16_t line_num,
const
uint8_t *file_name);
41
//lint -restore
42
43
#if CONFIG_DEBUG_ENABLED
44
45
/*lint -emacro(506, ASSERT) */
/* Suppress "Constant value Boolean */
46
/*lint -emacro(774, ASSERT) */
/* Suppress "Boolean within 'if' always evaluates to True" */
\
47
52
#define ASSERT(expr) \
53
if (expr) \
54
{ \
55
} \
56
else \
57
{ \
58
assert_nrf_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \
59
}
60
#else
/* !CONFIG_DEBUG_ENABLED */
61
#define ASSERT(expr)
62
#endif
/* CONFIG_DEBUG_ENABLED */
63
64
#ifdef __cplusplus
65
}
66
#endif
67
68
#endif
/* NRF_ASSERT_H_ */