diff options
author | Damien George <damien.p.george@gmail.com> | 2016-11-11 17:36:19 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-11-11 17:36:19 +1100 |
commit | c4e58eaa9820f5e63d9d94cec5ffb403c1dffbe7 (patch) | |
tree | 0c3c25d35d9f959bf5b2b160924f264d6a46d5db /tests/pyb/i2c_error.py | |
parent | e6da6a720fb2bb48c6885e5f28f5f917690080fd (diff) | |
download | micropython-c4e58eaa9820f5e63d9d94cec5ffb403c1dffbe7.tar.gz micropython-c4e58eaa9820f5e63d9d94cec5ffb403c1dffbe7.zip |
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 'tests/pyb/i2c_error.py')
-rw-r--r-- | tests/pyb/i2c_error.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/pyb/i2c_error.py b/tests/pyb/i2c_error.py index d6c0debe29..3201d6367d 100644 --- a/tests/pyb/i2c_error.py +++ b/tests/pyb/i2c_error.py @@ -7,7 +7,7 @@ from pyb import I2C pyb.Accel() # get I2C bus -i2c = I2C(1, I2C.MASTER) +i2c = I2C(1, I2C.MASTER, dma=True) # test polling mem_read pyb.disable_irq() |