summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/alif/alif_flash.c8
-rw-r--r--ports/alif/msc_disk.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/ports/alif/alif_flash.c b/ports/alif/alif_flash.c
index f2ea5ac85..de7b37804 100644
--- a/ports/alif/alif_flash.c
+++ b/ports/alif/alif_flash.c
@@ -37,10 +37,10 @@ typedef struct _alif_flash_obj_t {
uint32_t flash_size;
} alif_flash_obj_t;
-static alif_flash_obj_t alif_flash_obj = {
+static const alif_flash_obj_t alif_flash_fs_obj = {
.base = { &alif_flash_type },
.flash_base_addr = MICROPY_HW_FLASH_STORAGE_BASE_ADDR,
- .flash_size = MICROPY_HW_FLASH_STORAGE_BYTES,
+ .flash_size = MICROPY_HW_FLASH_STORAGE_FS_BYTES,
};
static mp_obj_t alif_flash_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
@@ -54,8 +54,8 @@ static mp_obj_t alif_flash_make_new(const mp_obj_type_t *type, size_t n_args, si
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
if (args[ARG_start].u_int == -1 && args[ARG_len].u_int == -1) {
- // Default singleton object that accesses entire flash
- return MP_OBJ_FROM_PTR(&alif_flash_obj);
+ // Default singleton object that accesses writable-filesystem flash
+ return MP_OBJ_FROM_PTR(&alif_flash_fs_obj);
}
alif_flash_obj_t *self = mp_obj_malloc(alif_flash_obj_t, &alif_flash_type);
diff --git a/ports/alif/msc_disk.c b/ports/alif/msc_disk.c
index a01494d20..0b8dddded 100644
--- a/ports/alif/msc_disk.c
+++ b/ports/alif/msc_disk.c
@@ -37,7 +37,7 @@
#endif
#define BLOCK_SIZE (MICROPY_HW_FLASH_BLOCK_SIZE_BYTES)
-#define BLOCK_COUNT (MICROPY_HW_FLASH_STORAGE_BYTES / BLOCK_SIZE)
+#define BLOCK_COUNT (MICROPY_HW_FLASH_STORAGE_FS_BYTES / BLOCK_SIZE)
#define FLASH_BASE_ADDR (MICROPY_HW_FLASH_STORAGE_BASE_ADDR)
static bool ejected = false;