Fix TWI driver not aborting when faced with no response after attempting to address a device on the bus.

This commit is contained in:
Dean Camera 2010-02-25 02:47:42 +00:00
parent c0c982df7a
commit 634abab38a
2 changed files with 3 additions and 2 deletions

View file

@ -66,8 +66,8 @@ bool TWI_StartTransmission(uint8_t SlaveAddress, uint8_t TimeoutMS)
case TW_MR_SLA_ACK:
return true;
default:
TWI_StopTransmission();
break;
TWCR = ((1 << TWINT) | (1 << TWSTO) | (1 << TWEN));
return false;
}
}
}