From 871800282484472662b4a5f4e2ad93af7c36e274 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 4 Oct 2013 12:12:29 +0200 Subject: derease bus clock speed to ~10kHz --- commandline/i2c-util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commandline/i2c-util.c b/commandline/i2c-util.c index 44ea4d3..a060a03 100644 --- a/commandline/i2c-util.c +++ b/commandline/i2c-util.c @@ -251,9 +251,9 @@ unsigned char i2c_tx_byte(unsigned char byte) else { set_sda(0); } - usleep(10); + usleep(100); set_scl(1); - usleep(10); + usleep(100); if (i < 0) { if (get_status() & (1 << BIT_SDA)) ack = 0; @@ -261,7 +261,7 @@ unsigned char i2c_tx_byte(unsigned char byte) ack = 1; } set_scl(0); - usleep(10); + usleep(100); } return ack; @@ -277,13 +277,13 @@ unsigned char i2c_rx_byte(unsigned char send_ack) if (( i < 0) && send_ack) set_sda(0); set_scl(1); - usleep(10); + usleep(100); if ((i >= 0) && ( get_status() & (1 << BIT_SDA))) ret |= (1 << i); if (( i < 0) && send_ack) set_sda(1); set_scl(0); - usleep(10); + usleep(100); } return ret; -- cgit v1.2.3