micropython/ports
David (Pololu) bf3eb9dc39 rp2/machine_i2c: Add timeout parameter for machine.I2C().
This commit adds support for the `timeout` keyword argument to machine.I2C
on the rp2 port, following how it's done on other ports.

The main motivation here is avoid the interpreter crashing due to infinite
loops when SDA is stuck low, which is quite common if the board gets reset
while reading from an I2C device.

A default timeout of 50ms is chosen because it's consistent with:
- Commit a707fe50b0 which used a timeout of
  50,000us for zero-length writes on the rp2 port.
- The machine.SoftI2C class which uses 50,000us as the default timeout.
- The stm32 port's hardware I2C, which uses 50,000us for
  I2C_POLL_DEFAULT_TIMEOUT_US.

This commit also fixes the default timeout on the esp32 port to be
consistent with the above, and updates the documentation for machine.I2C to
document this keyword argument.
2023-04-21 18:03:33 +10:00
..
bare-arm
cc3200
embed
esp32 rp2/machine_i2c: Add timeout parameter for machine.I2C(). 2023-04-21 18:03:33 +10:00
esp8266 shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
mimxrt mimxrt: Fix the build for boards without ROM API. 2023-04-12 17:01:25 +02:00
minimal shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
nrf shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
pic16bit ports: Implement simple write polling for stdout. 2023-03-23 13:51:17 +11:00
powerpc shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
qemu-arm
renesas-ra shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
rp2 rp2/machine_i2c: Add timeout parameter for machine.I2C(). 2023-04-21 18:03:33 +10:00
samd shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
stm32 shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
teensy shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. 2023-04-05 10:38:50 +10:00
unix
webassembly
windows
zephyr