diff options
author | juhasch <juergen.hasch@elbonia.de> | 2016-08-22 20:59:31 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-09-18 21:38:29 +0300 |
commit | a2391b5a74ff771e2bfc7529aed2f7717309c448 (patch) | |
tree | 7cd68097a93286e80e152e29826776aa28961719 | |
parent | 5bf1b4e9d9d563887d10c5ee9dceef9567679819 (diff) | |
download | micropython-a2391b5a74ff771e2bfc7529aed2f7717309c448.tar.gz micropython-a2391b5a74ff771e2bfc7529aed2f7717309c448.zip |
Small WiPy doc fixes
-rw-r--r-- | docs/wipy/quickref.rst | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/wipy/quickref.rst b/docs/wipy/quickref.rst index 3ce7e01325..ac7eec1328 100644 --- a/docs/wipy/quickref.rst +++ b/docs/wipy/quickref.rst @@ -51,11 +51,10 @@ See :ref:`machine.Timer <machine.Timer>` and :ref:`machine.Pin <machine.Pin>`. : tim = Timer(0, mode=Timer.PERIODIC) tim_a = tim.channel(Timer.A, freq=1000) - tim_a.time() # get the value in microseconds tim_a.freq(5) # 5 Hz p_out = Pin('GP2', mode=Pin.OUT) - tim_a.irq(handler=lambda t: p_out.toggle()) + tim_a.irq(trigger=Timer.TIMEOUT, handler=lambda t: p_out.toggle()) PWM (pulse width modulation) ---------------------------- @@ -135,10 +134,9 @@ Real time clock (RTC) See :ref:`machine.RTC <machine.RTC>` :: - import machine from machine import RTC - rtc = machine.RTC() # init with default time and date + rtc = RTC() # init with default time and date rtc = RTC(datetime=(2015, 8, 29, 9, 0, 0, 0, None)) # init with a specific time and date print(rtc.now()) |