summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-11-11 17:36:19 +1100
committerDamien George <damien.p.george@gmail.com>2016-11-11 17:36:19 +1100
commitc4e58eaa9820f5e63d9d94cec5ffb403c1dffbe7 (patch)
tree0c3c25d35d9f959bf5b2b160924f264d6a46d5db /docs/library
parente6da6a720fb2bb48c6885e5f28f5f917690080fd (diff)
stmhal/i2c: Add option to I2C to enable/disable use of DMA transfers.
New keyword option in constructor and init() method is "dma=<bool>". DMA is now disabled by default for I2C transfers because it currently does not handle I2C bus errors very well (eg if slave device doesn't ACK or NACK correctly during a transfer).
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/pyb.I2C.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/library/pyb.I2C.rst b/docs/library/pyb.I2C.rst
index 67131feec..740031890 100644
--- a/docs/library/pyb.I2C.rst
+++ b/docs/library/pyb.I2C.rst
@@ -92,7 +92,7 @@ Methods
.. only:: port_pyboard
- .. method:: I2C.init(mode, \*, addr=0x12, baudrate=400000, gencall=False)
+ .. method:: I2C.init(mode, \*, addr=0x12, baudrate=400000, gencall=False, dma=False)
Initialise the I2C bus with the given parameters:
@@ -100,6 +100,9 @@ Methods
- ``addr`` is the 7-bit address (only sensible for a slave)
- ``baudrate`` is the SCL clock rate (only sensible for a master)
- ``gencall`` is whether to support general call mode
+ - ``dma`` is whether to allow the use of DMA for the I2C transfers (note
+ that DMA transfers have more precise timing but currently do not handle bus
+ errors properly)
.. method:: I2C.is_ready(addr)