git.droids-corp.org
/
protos
/
imu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b33a589
)
i2cm: fix ACK reception in i2cm_send_byte
author
Olivier Matz
<zer0@droids-corp.org>
Thu, 26 Jun 2014 18:33:53 +0000
(20:33 +0200)
committer
Olivier Matz
<zer0@droids-corp.org>
Thu, 26 Jun 2014 18:33:53 +0000
(20:33 +0200)
i2cm_sw.c
patch
|
blob
|
history
diff --git
a/i2cm_sw.c
b/i2cm_sw.c
index
8c8e238
..
0b17452
100644
(file)
--- a/
i2cm_sw.c
+++ b/
i2cm_sw.c
@@
-160,8
+160,8
@@
uint8_t i2cm_send_byte(uint8_t byte)
I2CM_DELAY();
while ( bit_is_clear(PIN(I2CM_SCL_PORT), I2CM_SCL_BIT) );// slave handshake
I2CM_DELAY();
while ( bit_is_clear(PIN(I2CM_SCL_PORT), I2CM_SCL_BIT) );// slave handshake
- // receive ACK
- if (bit_is_set(
I2CM_SDA_PORT
, I2CM_SDA_BIT))
+ //
we should
receive ACK
+ if (bit_is_set(
PIN(I2CM_SDA_PORT)
, I2CM_SDA_BIT))
err = I2CM_SENT_NO_ACK;
// clock low
err = I2CM_SENT_NO_ACK;
// clock low