From 4b6077b3febca751eeace038b69074f262f1b221 Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Wed, 9 Mar 2016 11:02:38 +0000
Subject: [PATCH] docs/esp8266: Minor tweaks to quickref, Timer and I2C
 classes.

---
 docs/esp8266/quickref.rst | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst
index 40b8c52e5..105612297 100644
--- a/docs/esp8266/quickref.rst
+++ b/docs/esp8266/quickref.rst
@@ -86,8 +86,10 @@ Use the ``machine.Timer`` class::
     from machine import Timer
 
     tim = Timer(0)
-    tim.init(period=10, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
-    tim.init(period=1, mode=Timer.PERIODIC, callback=lambda t:print(2))
+    tim.init(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
+    tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2))
+
+The period is in milliseconds.
 
 Pins and GPIO
 -------------
@@ -178,7 +180,7 @@ The I2C driver is implemented in software and works on all pins::
     from machine import Pin, I2C
 
     # construct an I2C bus
-    i2c = I2C(frequency=100000, scl=Pin(5), sda=Pin(4))
+    i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000)
 
     i2c.writeto(0x3a, '12') # write '12' to slave device with address 0x3a
 
-- 
GitLab