mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
all: Use MP_ERROR_TEXT for all error messages.
This commit is contained in:
committed by
Damien George
parent
85858e72df
commit
def76fe4d9
@@ -64,7 +64,7 @@ STATIC mp_obj_t machine_freq(size_t n_args, const mp_obj_t *args) {
|
||||
// set
|
||||
mp_int_t freq = mp_obj_get_int(args[0]) / 1000000;
|
||||
if (freq != 80 && freq != 160) {
|
||||
mp_raise_ValueError("frequency can only be either 80Mhz or 160MHz");
|
||||
mp_raise_ValueError(MP_ERROR_TEXT("frequency can only be either 80Mhz or 160MHz"));
|
||||
}
|
||||
system_update_cpu_freq(freq);
|
||||
return mp_const_none;
|
||||
|
||||
Reference in New Issue
Block a user