Skip to content

Commit 3d91b1f

Browse files
committed
esp8266: Return CPU frequency in Hz.
1 parent 82d08dc commit 3d91b1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

esp8266/modpyb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_info_obj, 0, 1, pyb_info);
8181
STATIC mp_obj_t pyb_freq(mp_uint_t n_args, const mp_obj_t *args) {
8282
if (n_args == 0) {
8383
// get
84-
return mp_obj_new_int(mp_hal_get_cpu_freq());
84+
return mp_obj_new_int(mp_hal_get_cpu_freq() * 1000000);
8585
} else {
8686
// set
8787
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "can't change freq"));

0 commit comments

Comments
 (0)