Browse Source

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

pull/2285/merge
Paul Sokolovsky 8 years ago
parent
commit
9a38b7afe0
  1. 5
      cc3200/mods/modmachine.c
  2. 11
      docs/library/machine.rst

5
cc3200/mods/modmachine.c

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

11
docs/library/machine.rst

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

Loading…
Cancel
Save