misc: move ARRAY_SIZE macro into general.h

This commit is contained in:
Mikaela Szekely 2022-08-18 23:49:32 -06:00 committed by Rachel Mant
parent c136b919cd
commit d16b0f8b47
3 changed files with 2 additions and 4 deletions

View File

@ -42,6 +42,8 @@
#include "platform.h"
#include "platform_support.h"
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
extern uint32_t delay_cnt;
enum BMP_DEBUG {

View File

@ -36,8 +36,6 @@
#include <assert.h>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
static const char cortexa_driver_str[] = "ARM Cortex-A";
static bool cortexa_attach(target *t);

View File

@ -63,8 +63,6 @@
#include <fcntl.h>
#endif
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
static const char cortexm_driver_str[] = "ARM Cortex-M";
static bool cortexm_vector_catch(target *t, int argc, char *argv[]);