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
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
ee0058d1
Commit
ee0058d1
authored
9 years ago
by
danicampora
Browse files
Options
Downloads
Patches
Plain Diff
docs: Remove remaining references to 'af', which is now 'alt'.
parent
1f2daf43
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/library/machine.Timer.rst
+1
-1
1 addition, 1 deletion
docs/library/machine.Timer.rst
docs/wipy/quickref.rst
+3
-3
3 additions, 3 deletions
docs/wipy/quickref.rst
with
4 additions
and
4 deletions
docs/library/machine.Timer.rst
+
1
−
1
View file @
ee0058d1
...
...
@@ -31,7 +31,7 @@ class Timer -- control internal timers
tim = Timer(1, mode=Timer.PERIODIC)
tim_a = tim.channel(Timer.A, freq=1000)
led = Pin('GPIO2',
af=0,
mode=Pin.OUT)
led = Pin('GPIO2', mode=Pin.OUT)
def tick(timer): # we will receive the timer object when being called
print(timer.time()) # show current timer's time value (is microseconds)
...
...
This diff is collapsed.
Click to expand it.
docs/wipy/quickref.rst
+
3
−
3
View file @
ee0058d1
...
...
@@ -30,7 +30,7 @@ See :ref:`machine.Pin <machine.Pin>`. ::
from machine import Pin
# initialize GP2 in gpio mode (a
f
=0) and make it an output
# initialize GP2 in gpio mode (a
lt
=0) and make it an output
p_out = Pin('GP2', mode=Pin.OUT)
p_out.value(1)
p_out.value(0)
...
...
@@ -54,7 +54,7 @@ See :ref:`machine.Timer <machine.Timer>` and :ref:`machine.Pin <machine.Pin>`. :
tim_a.time() # get the value in microseconds
tim_a.freq(1) # 1 Hz
p_out = Pin('GP2',
af=0,
mode=Pin.OUT)
p_out = Pin('GP2', mode=Pin.OUT)
tim_a.irq(handler=lambda t: p_out.toggle())
PWM (pulse width modulation)
...
...
@@ -66,7 +66,7 @@ See :ref:`machine.Pin <machine.Pin>` and :ref:`machine.Timer <machine.Timer>`. :
from machine import Pin
# assign GP25 to alternate function 9 (PWM)
p_out = Pin('GP25', mode=Pin.AF, a
f
=9)
p_out = Pin('GP25', mode=Pin.AF, a
lt
=9)
# timer 2 in PWM mode and width must be 16 buts
tim = Timer(2, mode=Timer.PWM, width=16)
...
...
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