cc3200/modmachine: Return frequency value directly, like other ports.

This commit is contained in:
Paul Sokolovsky 2017-04-05 11:58:17 +03:00
parent 4333b2fb53
commit 9a38b7afe0
2 changed files with 2 additions and 14 deletions

View File

@ -111,10 +111,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_info_obj, 0, 1, machine_info)
#endif
STATIC mp_obj_t machine_freq(void) {
mp_obj_t tuple[1] = {
mp_obj_new_int(HAL_FCPU_HZ),
};
return mp_obj_new_tuple(1, tuple);
return mp_obj_new_int(HAL_FCPU_HZ);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_freq_obj, machine_freq);

View File

@ -52,16 +52,7 @@ Power related functions
.. function:: freq()
.. only:: not port_wipy
Returns CPU frequency in hertz.
.. only:: port_wipy
Returns a tuple of clock frequencies: ``(sysclk,)``
These correspond to:
- sysclk: frequency of the CPU
Returns CPU frequency in hertz.
.. function:: idle()