From 32475ce98c2eaa13240fa24e713ce3d5df60afd9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 7 Mar 2021 12:51:47 -0600 Subject: Automatically count EXTERNAL_FLASH_DEVICES (mk2) Instead of counting words in make, which is slightly awful, notice that possible_devices is local to external_flash.c, so we can declare the array with an automatic bound, and then get the count as the element-count (MP_ARRAY_SIZE) of the array. Since EXTERNAL_FLASH_DEVICE_COUNT is no longer a global macro, switch a few sites to using EXTERNAL_FLASH_DEVICES in `#if` checks instead. --- supervisor/flash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'supervisor/flash.h') diff --git a/supervisor/flash.h b/supervisor/flash.h index cd69cbfa9..289c76c2d 100644 --- a/supervisor/flash.h +++ b/supervisor/flash.h @@ -31,7 +31,7 @@ #include "py/mpconfig.h" -#ifdef EXTERNAL_FLASH_DEVICE_COUNT +#ifdef EXTERNAL_FLASH_DEVICES #include "supervisor/shared/external_flash/external_flash.h" #else #include "supervisor/shared/internal_flash.h" -- cgit v1.2.3