Skip to content

Commit b47efd7

Browse files
committed
Bug fix I2C read
1 parent 2099a94 commit b47efd7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/i2c.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ I2C_Read(uint8_t* data, i2c_ack_et ack)
106106
}
107107

108108
while ( BIT_IsClear(TWCR, TWINT) );
109-
109+
110+
*data = TWDR;
111+
110112
#if (I2C_STATUS_RETURN == ENABLE)
111113
switch (TW_STATUS)
112114
{

0 commit comments

Comments
 (0)