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

pull/2285/merge
Paul Sokolovsky 2017-04-05 11:58:17 +03:00
rodzic 4333b2fb53
commit 9a38b7afe0
2 zmienionych plików z 2 dodań i 14 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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()