summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2024-07-06 09:18:22 +0200
committerDamien George <damien@micropython.org>2024-07-11 23:38:07 +1000
commit2be45dd682f0ce01e4a1061375e96ce2c501a187 (patch)
treeedcd31a5a52f46093171f3cb5c0d3e2926addbe9 /extmod
parent358e501e75c028133cff1045d2062ae31206a22c (diff)
extmod/modmachine: Allow more than one argument to machine.freq().
The limit is set by a `MICROPY_PY_MACHINE_FREQ_NUM_ARGS_MAX` define, which defaults to 1 and is set for stm32 to 4. For stm32 this fixes a regression introduced in commit e1ec6af654b1c5c4a973b6c6b029ee68bb92eb89 where the maximum number of arguments was changed from 4 to 1. Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'extmod')
-rw-r--r--extmod/modmachine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modmachine.c b/extmod/modmachine.c
index 2a7e315bb..2fe72817b 100644
--- a/extmod/modmachine.c
+++ b/extmod/modmachine.c
@@ -109,7 +109,7 @@ static mp_obj_t machine_freq(size_t n_args, const mp_obj_t *args) {
return mp_const_none;
}
}
-MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_freq_obj, 0, 1, machine_freq);
+MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_freq_obj, 0, MICROPY_PY_MACHINE_FREQ_NUM_ARGS_MAX, machine_freq);
static mp_obj_t machine_lightsleep(size_t n_args, const mp_obj_t *args) {
mp_machine_lightsleep(n_args, args);