summaryrefslogtreecommitdiff
path: root/commandline
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-10-04 12:12:29 +0200
committerDaniel Friesel <derf@finalrewind.org>2013-10-04 12:12:29 +0200
commit871800282484472662b4a5f4e2ad93af7c36e274 (patch)
treed89466836a6d7ea9ebb083d8fc9c1ff6165a6306 /commandline
parent52da7aebb9bb2929ecdc9838ab54f6bb76e949bb (diff)
derease bus clock speed to ~10kHz
Diffstat (limited to 'commandline')
-rw-r--r--commandline/i2c-util.c10
1 files 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;