From d16b0f8b473641577b465a1726a9ad1ab049037b Mon Sep 17 00:00:00 2001 From: Mikaela Szekely Date: Thu, 18 Aug 2022 23:49:32 -0600 Subject: [PATCH] misc: move ARRAY_SIZE macro into general.h --- src/include/general.h | 2 ++ src/target/cortexa.c | 2 -- src/target/cortexm.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/include/general.h b/src/include/general.h index b9867e8..c88b69f 100644 --- a/src/include/general.h +++ b/src/include/general.h @@ -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 { diff --git a/src/target/cortexa.c b/src/target/cortexa.c index dbd07f3..fa231a6 100644 --- a/src/target/cortexa.c +++ b/src/target/cortexa.c @@ -36,8 +36,6 @@ #include -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) - static const char cortexa_driver_str[] = "ARM Cortex-A"; static bool cortexa_attach(target *t); diff --git a/src/target/cortexm.c b/src/target/cortexm.c index fff6a45..fda1699 100644 --- a/src/target/cortexm.c +++ b/src/target/cortexm.c @@ -63,8 +63,6 @@ #include #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[]);