diff options
author | danicampora <daniel@wipy.io> | 2015-10-21 11:06:26 +0200 |
---|---|---|
committer | danicampora <daniel@wipy.io> | 2015-10-21 15:30:57 +0200 |
commit | ee0058d17474bd9b01b09ec90d70c557c81b6d1a (patch) | |
tree | 185fdbb17a6b213dbe262f79c0e9b481b1fdf824 /docs/wipy | |
parent | 1f2daf430410c7c8a05026ccab4b047bb928fbdc (diff) |
docs: Remove remaining references to 'af', which is now 'alt'.
Diffstat (limited to 'docs/wipy')
-rw-r--r-- | docs/wipy/quickref.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/wipy/quickref.rst b/docs/wipy/quickref.rst index e473017e8..aa679542e 100644 --- a/docs/wipy/quickref.rst +++ b/docs/wipy/quickref.rst @@ -30,7 +30,7 @@ See :ref:`machine.Pin <machine.Pin>`. :: from machine import Pin - # initialize GP2 in gpio mode (af=0) and make it an output + # initialize GP2 in gpio mode (alt=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, af=9) + p_out = Pin('GP25', mode=Pin.AF, alt=9) # timer 2 in PWM mode and width must be 16 buts tim = Timer(2, mode=Timer.PWM, width=16) |