Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
3d91b1f6
Commit
3d91b1f6
authored
May 05, 2015
by
Damien George
Browse files
esp8266: Return CPU frequency in Hz.
parent
82d08dcc
Changes
1
Show whitespace changes
Inline
Side-by-side
esp8266/modpyb.c
View file @
3d91b1f6
...
...
@@ -81,7 +81,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_info_obj, 0, 1, pyb_info);
STATIC
mp_obj_t
pyb_freq
(
mp_uint_t
n_args
,
const
mp_obj_t
*
args
)
{
if
(
n_args
==
0
)
{
// get
return
mp_obj_new_int
(
mp_hal_get_cpu_freq
());
return
mp_obj_new_int
(
mp_hal_get_cpu_freq
()
*
1000000
);
}
else
{
// set
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_ValueError
,
"can't change freq"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment