diff options
author | Damien George <damien@micropython.org> | 2022-06-01 11:57:20 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-06-01 13:20:27 +1000 |
commit | 4a1ae99ac384878ffaddb30e9f8139f7b07aabae (patch) | |
tree | 312231505744309b0e0f97dd437bfcd0b6a2f460 /py | |
parent | ea9a904b7250ece017144c0d25a1569714a792b6 (diff) |
extmod/machine_i2c: Add optional support for write-then-read transfers.
This option is useful for ports where it's more efficient to do a full I2C
transfer in one go.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 00890942b..ea03ad140 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1585,6 +1585,11 @@ typedef double mp_float_t; #define MICROPY_PY_MACHINE_I2C (0) #endif +// Whether the low-level I2C transfer function supports a separate write as the first transfer +#ifndef MICROPY_PY_MACHINE_I2C_TRANSFER_WRITE1 +#define MICROPY_PY_MACHINE_I2C_TRANSFER_WRITE1 (0) +#endif + // Whether to provide the "machine.SoftI2C" class #ifndef MICROPY_PY_MACHINE_SOFTI2C #define MICROPY_PY_MACHINE_SOFTI2C (0) |