diff options
| author | Dan Halbert <halbert@halwitz.org> | 2021-03-11 12:27:29 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2021-03-11 12:27:29 -0500 |
| commit | de88fa37fb16c49eef2146b43322d2937eaaf290 (patch) | |
| tree | 3aff5e6887b384d7b4ccf4343f6ca3c7ebd86f2a /supervisor | |
| parent | 061d5910cb6e6eecda70a7a7a5320a414e8b3b9e (diff) | |
| parent | 15e97f12a1be8b2aa625b59d127b6d1db530a18b (diff) | |
Merge remote-tracking branch 'adafruit/main' into esp32s2-i2c-bug
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/flash.h | 2 | ||||
| -rw-r--r-- | supervisor/flash_root_pointers.h | 2 | ||||
| -rw-r--r-- | supervisor/shared/external_flash/external_flash.c | 3 | ||||
| -rw-r--r-- | supervisor/supervisor.mk | 1 |
4 files changed, 4 insertions, 4 deletions
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" 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" diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c index e2d767235..23727e7e7 100644 --- a/supervisor/shared/external_flash/external_flash.c +++ b/supervisor/shared/external_flash/external_flash.c @@ -45,7 +45,8 @@ // The currently cached sector in the cache, ram or flash based. static uint32_t current_sector; -const external_flash_device possible_devices[EXTERNAL_FLASH_DEVICE_COUNT] = {EXTERNAL_FLASH_DEVICES}; +STATIC const external_flash_device possible_devices[] = {EXTERNAL_FLASH_DEVICES}; +#define EXTERNAL_FLASH_DEVICE_COUNT MP_ARRAY_SIZE(possible_devices) static const external_flash_device* flash_device = NULL; diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 374b7a72b..083e7fb35 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -34,7 +34,6 @@ endif # But that might not be true in the future.) ifdef EXTERNAL_FLASH_DEVICES CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ - -DEXTERNAL_FLASH_DEVICE_COUNT=$(EXTERNAL_FLASH_DEVICE_COUNT) SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c ifeq ($(SPI_FLASH_FILESYSTEM),1) |
