Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
9a38b7af
Commit
9a38b7af
authored
8 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
cc3200/modmachine: Return frequency value directly, like other ports.
parent
4333b2fb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cc3200/mods/modmachine.c
+1
-4
1 addition, 4 deletions
cc3200/mods/modmachine.c
docs/library/machine.rst
+1
-10
1 addition, 10 deletions
docs/library/machine.rst
with
2 additions
and
14 deletions
cc3200/mods/modmachine.c
+
1
−
4
View file @
9a38b7af
...
@@ -111,10 +111,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_info_obj, 0, 1, machine_info)
...
@@ -111,10 +111,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_info_obj, 0, 1, machine_info)
#endif
#endif
STATIC
mp_obj_t
machine_freq
(
void
)
{
STATIC
mp_obj_t
machine_freq
(
void
)
{
mp_obj_t
tuple
[
1
]
=
{
return
mp_obj_new_int
(
HAL_FCPU_HZ
);
mp_obj_new_int
(
HAL_FCPU_HZ
),
};
return
mp_obj_new_tuple
(
1
,
tuple
);
}
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
machine_freq_obj
,
machine_freq
);
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
machine_freq_obj
,
machine_freq
);
...
...
This diff is collapsed.
Click to expand it.
docs/library/machine.rst
+
1
−
10
View file @
9a38b7af
...
@@ -52,17 +52,8 @@ Power related functions
...
@@ -52,17 +52,8 @@ Power related functions
.. function:: freq()
.. function:: freq()
.. only:: not port_wipy
Returns CPU frequency in hertz.
Returns CPU frequency in hertz.
.. only:: port_wipy
Returns a tuple of clock frequencies: ``(sysclk,)``
These correspond to:
- sysclk: frequency of the CPU
.. function:: idle()
.. function:: idle()
Gates the clock to the CPU, useful to reduce power consumption at any time during
Gates the clock to the CPU, useful to reduce power consumption at any time during
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment