Skip to content

Commit ee0058d

Browse files
author
danicampora
committed
docs: Remove remaining references to 'af', which is now 'alt'.
1 parent 1f2daf4 commit ee0058d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/library/machine.Timer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Timer -- control internal timers
3131
tim = Timer(1, mode=Timer.PERIODIC)
3232
tim_a = tim.channel(Timer.A, freq=1000)
3333

34-
led = Pin('GPIO2', af=0, mode=Pin.OUT)
34+
led = Pin('GPIO2', mode=Pin.OUT)
3535

3636
def tick(timer): # we will receive the timer object when being called
3737
print(timer.time()) # show current timer's time value (is microseconds)

docs/wipy/quickref.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ See :ref:`machine.Pin <machine.Pin>`. ::
3030

3131
from machine import Pin
3232

33-
# initialize GP2 in gpio mode (af=0) and make it an output
33+
# initialize GP2 in gpio mode (alt=0) and make it an output
3434
p_out = Pin('GP2', mode=Pin.OUT)
3535
p_out.value(1)
3636
p_out.value(0)
@@ -54,7 +54,7 @@ See :ref:`machine.Timer <machine.Timer>` and :ref:`machine.Pin <machine.Pin>`. :
5454
tim_a.time() # get the value in microseconds
5555
tim_a.freq(1) # 1 Hz
5656
57-
p_out = Pin('GP2', af=0, mode=Pin.OUT)
57+
p_out = Pin('GP2', mode=Pin.OUT)
5858
tim_a.irq(handler=lambda t: p_out.toggle())
5959

6060
PWM (pulse width modulation)
@@ -66,7 +66,7 @@ See :ref:`machine.Pin <machine.Pin>` and :ref:`machine.Timer <machine.Timer>`. :
6666
from machine import Pin
6767

6868
# assign GP25 to alternate function 9 (PWM)
69-
p_out = Pin('GP25', mode=Pin.AF, af=9)
69+
p_out = Pin('GP25', mode=Pin.AF, alt=9)
7070

7171
# timer 2 in PWM mode and width must be 16 buts
7272
tim = Timer(2, mode=Timer.PWM, width=16)

0 commit comments

Comments
 (0)