Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
d377c837
Commit
d377c837
authored
Dec 30, 2016
by
Damien George
Browse files
docs/library/machine.I2C: Fix I2C constructor docs to match impl.
parent
71ff0b54
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/library/machine.I2C.rst
View file @
d377c837
...
@@ -49,12 +49,23 @@ Constructors
...
@@ -49,12 +49,23 @@ Constructors
Construct an I2C object on the given bus. `bus` can only be 0.
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).
If the bus is not given, the default one will be selected (0).
.. only:: port_esp8266
.. only:: not port_wipy
.. class:: I2C(scl, sda, \*, freq=400000)
.. class:: I2C(id=-1, \*, scl, sda, freq=400000)
Construct and return a new I2C object.
Construct and return a new I2C object using the following parameters:
See the init method below for a description of the arguments.
- `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
General Methods
---------------
---------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment