AP_Common: add helper macro ARRAY_SIZE

This commit is contained in:
Lucas De Marchi 2015-07-02 12:11:32 -03:00 committed by Andrew Tridgell
parent f1ee129423
commit 82314ee4a3
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@
#define LOWBYTE(i) ((uint8_t)(i))
#define HIGHBYTE(i) ((uint8_t)(((uint16_t)(i))>>8))
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
// @}