summaryrefslogtreecommitdiffstatshomepage
path: root/py/parse.c
diff options
context:
space:
mode:
authorRadomir Dopieralski <openstack@sheep.art.pl>2016-09-15 01:08:03 +0200
committerDamien George <damien.p.george@gmail.com>2016-09-22 14:10:02 +1000
commitec078af985a9a1d47023861794358f52c51de434 (patch)
treeb1bdcfbaf6470062f8c845de98c0a9a8bfa11152 /py/parse.c
parent1f69b16d3f28780349abefb59438789737ecce8a (diff)
downloadmicropython-ec078af985a9a1d47023861794358f52c51de434.tar.gz
micropython-ec078af985a9a1d47023861794358f52c51de434.zip
extmod/machine_i2c: Add clock stretching support.
When the clock is too fast for the i2c slave, it can temporarily hold down the scl line to signal to the master that it needs to wait. The master should check the scl line when it is releasing it after transmitting data, and wait for it to be released. This change has been tested with a logic analyzer and an i2c slace implemented on an atmega328p using its twi peripheral, clocked at 8Mhz. Without the change, the i2c communication works up to aboy 150kHz frequency, and above that results in the slave stuck in an unresponsive state. With this change, communication has been tested to work up to 400kHz.
Diffstat (limited to 'py/parse.c')
0 files changed, 0 insertions, 0 deletions