diff --git a/ports/stm/boards/thunderpack/mpconfigboard.h b/ports/stm/boards/thunderpack/mpconfigboard.h index 270600b3c8..0b3c55819a 100644 --- a/ports/stm/boards/thunderpack/mpconfigboard.h +++ b/ports/stm/boards/thunderpack/mpconfigboard.h @@ -33,7 +33,7 @@ // Putting the entire flash sector in the NVM byte array buffer // would take up too much RAM. This limits how much of the sector we use. -#define NVM_BYTEARRAY_BUFFER_LEN 512 +#define NVM_BYTEARRAY_BUFFER_SIZE 512 // Flash config #define FLASH_SIZE (0x80000) diff --git a/ports/stm/common-hal/microcontroller/__init__.c b/ports/stm/common-hal/microcontroller/__init__.c index b69407eff7..d407ecfe50 100644 --- a/ports/stm/common-hal/microcontroller/__init__.c +++ b/ports/stm/common-hal/microcontroller/__init__.c @@ -116,7 +116,7 @@ const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = { .base = { .type = &nvm_bytearray_type, }, - .len = NVM_BYTEARRAY_BUFFER_LEN, + .len = NVM_BYTEARRAY_BUFFER_SIZE, .start_address = (uint8_t*) (CIRCUITPY_INTERNAL_NVM_START_ADDR) }; #endif diff --git a/ports/stm/common-hal/nvm/ByteArray.h b/ports/stm/common-hal/nvm/ByteArray.h index 0d7ecf6ab7..b6ea36de3f 100644 --- a/ports/stm/common-hal/nvm/ByteArray.h +++ b/ports/stm/common-hal/nvm/ByteArray.h @@ -32,8 +32,8 @@ // STM flash is saved in sectors (not pages), at a minimum size of 16k. // To limit the RAM usage during writing, we want to set a smaller // maximum value. -#ifndef NVM_BYTEARRAY_BUFFER_LEN -#define NVM_BYTEARRAY_BUFFER_LEN 512 +#ifndef NVM_BYTEARRAY_BUFFER_SIZE +#define NVM_BYTEARRAY_BUFFER_SIZE 512 #endif typedef struct {