mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-31 09:32:57 +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)
|
#define UNUSED(x) (void)(x)
|
||||||
#endif
|
#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
|
// TYPES
|
||||||
|
|
||||||
// packet handler
|
// packet handler
|
||||||
|
Loading…
x
Reference in New Issue
Block a user