diff options
| author | Jeff Epler <jepler@gmail.com> | 2021-03-07 12:51:47 -0600 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2021-03-07 12:51:47 -0600 |
| commit | 32475ce98c2eaa13240fa24e713ce3d5df60afd9 (patch) | |
| tree | f0404e025c4cfeb8689057eea9a5d26c1a6a1d0e /supervisor/flash_root_pointers.h | |
| parent | f1ada8e8800a6ac64ebf611ba292b0eb93345c8e (diff) | |
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.
Diffstat (limited to 'supervisor/flash_root_pointers.h')
| -rw-r--r-- | supervisor/flash_root_pointers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/supervisor/flash_root_pointers.h b/supervisor/flash_root_pointers.h index 634ae58d3..a426b9c4e 100644 --- a/supervisor/flash_root_pointers.h +++ b/supervisor/flash_root_pointers.h @@ -26,7 +26,7 @@ #ifndef MICROPY_INCLUDED_SUPERVISOR_FLASH_ROOT_POINTERS_H #define MICROPY_INCLUDED_SUPERVISOR_FLASH_ROOT_POINTERS_H -#ifdef EXTERNAL_FLASH_DEVICE_COUNT +#ifdef EXTERNAL_FLASH_DEVICES #include "supervisor/shared/external_flash/external_flash_root_pointers.h" #else #include "supervisor/internal_flash_root_pointers.h" |
