| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
Latest versions of Sphinx (at least 3.1.0) do not need the `*` escaped and
will render the `\` in the output if it is there, so remove it.
Fixes issue #6209.
|
|
Addresses issue #5196.
|
|
This allows to efficiently send to an I2C slave data that is made up of
more than one buffer. Instead of needing to allocate temporary memory to
combine buffers together this new method allows to pass in a tuple or list
of buffers. The name is based on the POSIX function writev() which has
similar intentions and signature.
The reasons for taking this approach (compared to having an interface with
separate start/write/stop methods) are:
- It's a backwards compatible extension.
- It's convenient for the user.
- It's efficient because there is only one Python call, then the C code can
do everything in one go.
- It's efficient on the I2C bus because the implementation can do
everything in one go without pauses between blocks of bytes.
- It should be possible to implement this extension in all ports, for
hardware and software I2C.
Further discussion is found in issue #3482, PR #4020 and PR #4763.
|
|
|
|
|
|
cc3200 has been updated to conform to the API and now returns None.
|
|
|
|
The cc3200 port is now similar enough to the standard machine.I2C API so
that all conditionals can be removed.
|
|
Since eaef6b5324fa2ff425802d4abeea45aa945bfc14 writes are used instead of
reads.
|
|
|
|
|
|
The memory read/write I2C functions now take an optional keyword-only
parameter that specifies the number of bits in the memory address.
Only mem-addrs that are a multiple of 8-bits are supported (otherwise
the behaviour is undefined).
Due to the integer type used for the address, for values larger than 32
bits, only 32 bits of address will be sent, and the rest will be padded
with 0s. Right now no exception is raised when that happens. For values
smaller than 8, no address is sent. Also no exception then.
Tested with a VL6180 sensor, which has 16-bit register addresses.
Due to code refactoring, this patch reduces stmhal and esp8266 builds
by about 50 bytes.
|
|
With currentmodule:: set properly, none are needed. Extra "machine." prefix
produces wrong indexing data.
|
|
Class designator will be used as is in indexes, so must match actual class
name.
|
|
Makes sure that classes described in these separate files are properly
designated as belonging to "machine" module in indexes.
|
|
This machine.I2C documentation is now closer to a more port-neutral
description, although there are still differences between WiPy and
ESP8266.
|
|
A standard I2C address is 7 bits but addresses 0b0000xxx and 0b1111xxx
are reserved. The scan() method is changed to reflect this, along with
the docs.
|
|
|