diff options
author | Damien George <damien.p.george@gmail.com> | 2016-12-30 15:25:48 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-12-30 15:25:48 +1100 |
commit | d377c837946dc7476918dcda1580467396e5a153 (patch) | |
tree | 61ba483e4c2656439444e23adbcf6504d7acae35 /docs/library/machine.I2C.rst | |
parent | 71ff0b549d179acb210b4a2cc44ba726f61eede4 (diff) | |
download | micropython-d377c837946dc7476918dcda1580467396e5a153.tar.gz micropython-d377c837946dc7476918dcda1580467396e5a153.zip |
docs/library/machine.I2C: Fix I2C constructor docs to match impl.
Diffstat (limited to 'docs/library/machine.I2C.rst')
-rw-r--r-- | docs/library/machine.I2C.rst | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/docs/library/machine.I2C.rst b/docs/library/machine.I2C.rst index 3456b240e1..cdeb246ebb 100644 --- a/docs/library/machine.I2C.rst +++ b/docs/library/machine.I2C.rst @@ -49,12 +49,23 @@ Constructors Construct an I2C object on the given bus. `bus` can only be 0. If the bus is not given, the default one will be selected (0). -.. only:: port_esp8266 - - .. class:: I2C(scl, sda, \*, freq=400000) - - Construct and return a new I2C object. - See the init method below for a description of the arguments. +.. only:: not port_wipy + + .. class:: I2C(id=-1, \*, scl, sda, freq=400000) + + Construct and return a new I2C object using the following parameters: + + - `id` identifies the particular I2C peripheral. The default + value of -1 selects a software implementation of I2C which can + work (in most cases) with arbitrary pins for SCL and SDA. + If `id` is -1 then `scl` and `sda` must be specified. Other + allowed values for `id` depend on the particular port/board, + and specifying `scl` and `sda` may or may not be required or + allowed in this case. + - `scl` should be a pin object specifying the pin to use for SCL. + - `sda` should be a pin object specifying the pin to use for SDA. + - `freq` should be an integer which sets the maximum frequency + for SCL. General Methods --------------- |