Commit Graph

4 Commits

Author SHA1 Message Date
Damien George a707fe50b0 rp2/machine_i2c: Use soft I2C only for len=0, and increase timeout.
The RP2040 I2C hardware can do writes of length 1 and 2, just not of length
0.  So only use software I2C for writes of length 0, to improve
performance.

Also increase the software I2C timeout for zero-length writes to
accommodate the behaviour of a wider range of I2C devices.

Fixes issue #8167.

Signed-off-by: Damien George <damien@micropython.org>
2022-01-21 15:10:29 +11:00
Damien George 7b0a42374e rp2/machine_i2c: Provide more specific error codes from I2C transfer.
Signed-off-by: Damien George <damien@micropython.org>
2022-01-20 16:43:55 +11:00
Mike Causer 79da7757cc rp2/machine_i2c: Allow boards to configure I2C pins using new macros. 2021-07-19 23:16:11 +10:00
Damien George 469345e728 rp2: Add new port to Raspberry Pi RP2 microcontroller.
This commit adds a new port "rp2" which targets the new Raspberry Pi RP2040
microcontroller.

The build system uses pure cmake (with a small Makefile wrapper for
convenience).  The USB driver is TinyUSB, and there is a machine module
with most of the standard classes implemented.  Some examples are provided
in the examples/rp2/ directory.

Work done in collaboration with Graham Sanderson.

Signed-off-by: Damien George <damien@micropython.org>
2021-01-30 00:42:29 +11:00