mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-31 00:32:52 +00:00
btstack_defines: add ARRAYSIZE macro
This commit is contained in:
parent
bdbfbe1cea
commit
e84248e591
@ -52,6 +52,12 @@
|
||||
#define UNUSED(x) (void)(x)
|
||||
#endif
|
||||
|
||||
|
||||
// Get the number of entries in an array ('x' must NOT be a pointer!)
|
||||
#ifndef ARRAYSIZE
|
||||
#define ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
// TYPES
|
||||
|
||||
// packet handler
|
||||
|
Loading…
x
Reference in New Issue
Block a user