diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-25 02:47:42 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-25 02:47:42 +0000 |
commit | 634abab38ac6a9ebdae67b2da5d100874b6c4f73 (patch) | |
tree | 1f0951ac99aae1c85b1ac532a255c82da0d0fe95 /LUFA | |
parent | c0c982df7af34ea0375eda774185f3825c261522 (diff) | |
download | lufa-634abab38ac6a9ebdae67b2da5d100874b6c4f73.tar.gz lufa-634abab38ac6a9ebdae67b2da5d100874b6c4f73.tar.bz2 lufa-634abab38ac6a9ebdae67b2da5d100874b6c4f73.zip |
Fix TWI driver not aborting when faced with no response after attempting to address a device on the bus.
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/Peripheral/TWI.c | 4 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/LUFA/Drivers/Peripheral/TWI.c b/LUFA/Drivers/Peripheral/TWI.c index eb513c454..798667997 100644 --- a/LUFA/Drivers/Peripheral/TWI.c +++ b/LUFA/Drivers/Peripheral/TWI.c @@ -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;
}
}
}
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 155afa099..0ef0fbc95 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -20,6 +20,7 @@ * <b>Fixed:</b>
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
* - Fixed TWI_StartTransmission() corrupting the contents of the GPIOR0 register
+ * - Fix TWI driver not aborting when faced with no response after attempting to address a device on the bus
*
* \section Sec_ChangeLog100219 Version 100219
*
|