AVR I2C: bug fix

Fix provided by both Jason Short and lucafedechen independently
This commit is contained in:
Randy Mackay 2013-06-28 07:09:05 -10:00
parent e0dcd680f7
commit b16ce5e523

View File

@ -150,10 +150,6 @@ uint8_t AVRI2CDriver::read(uint8_t addr, uint8_t len, uint8_t* data){
stat = 0;
stat = _start();
if(stat) goto error;
stat = _sendAddress(SLA_W(addr));
if(stat) goto error;
stat = _start();
if(stat) goto error;
stat = _sendAddress(SLA_R(addr));
if(stat) goto error;
for(uint8_t i = 0; i < len ; i++) {