summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-11-26 21:35:00 +1100
committerDamien George <damien.p.george@gmail.com>2019-11-26 21:35:00 +1100
commit797c2e8fc23ceeb9d6ce5079e2f82ee7b3431bee (patch)
treefa4659045567c199aaed8c5121026393973166b2
parent4318a6d755b8365e4dfd4842c994003176cf6b70 (diff)
stm32/storage: Make start/len args of pyb.Flash keyword only.
To allow the future possibility of initial positional args, like flash id.
-rw-r--r--ports/stm32/storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/storage.c b/ports/stm32/storage.c
index aecef8acc..ebb62e44c 100644
--- a/ports/stm32/storage.c
+++ b/ports/stm32/storage.c
@@ -279,8 +279,8 @@ STATIC mp_obj_t pyb_flash_make_new(const mp_obj_type_t *type, size_t n_args, siz
// Parse arguments
enum { ARG_start, ARG_len };
static const mp_arg_t allowed_args[] = {
- { MP_QSTR_start, MP_ARG_INT, {.u_int = -1} },
- { MP_QSTR_len, MP_ARG_INT, {.u_int = -1} },
+ { MP_QSTR_start, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = -1} },
+ { MP_QSTR_len, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = -1} },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);