Skip to content

Commit f199e87

Browse files
committed
add ARRAY_SIZE
which is missing when building with debug mode
1 parent c5089d7 commit f199e87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ports/nrf/nrfx_glue.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ void __assert_func(const char *file, int line, const char *func, const char *exp
8080
*/
8181
#define NRFX_STATIC_ASSERT(expression)
8282

83+
84+
#ifndef ARRAY_SIZE
85+
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
86+
#endif
87+
8388
//------------------------------------------------------------------------------
8489

8590
#ifdef SOFTDEVICE_PRESENT

0 commit comments

Comments
 (0)