8000 Small WiPy doc fixes · sparkfun/circuitpython@a2391b5 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2391b5

Browse files
juhaschpfalcon
juhasch
authored andcommitted
Small WiPy doc fixes
1 parent 5bf1b4e commit a2391b5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/wipy/quickref.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ See :ref:`machine.Timer <machine.Timer>` and :ref:`machine.Pin <machine.Pin>`. :
5151

5252
tim = Timer(0, mode=Timer.PERIODIC)
5353
tim_a = tim.channel(Timer.A, freq=1000)
54-
tim_a.time() # get the value in microseconds
5554
tim_a.freq(5) # 5 Hz
5655
5756
p_out = Pin('GP2', mode=Pin.OUT)
58-
tim_a.irq(handler=lambda t: p_out.toggle())
57+
tim_a.irq(trigger=Timer.TIMEOUT, handler=lambda t: p_out.toggle())
5958

6059
PWM (pulse width modulation)
6160
----------------------------
@@ -135,10 +134,9 @@ Real time clock (RTC)
135134

136135
See :ref:`machine.RTC <machine.RTC>` ::
137136

138-
import machine
139137
from machine import RTC
140138

141-
rtc = machine.RTC() # init with default time and date
139+
rtc = RTC() # init with default time and date
142140
rtc = RTC(datetime=(2015, 8, 29, 9, 0, 0, 0, None)) # init with a specific time and date
143141
print(rtc.now())
144142

0 commit comments

Comments
 (0)
0