aboutsummaryrefslogtreecommitdiff
path: root/LUFA
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-02-25 02:47:42 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-02-25 02:47:42 +0000
commit929e4632cd76e0662971b0f001cb96c51dc30e4b (patch)
tree1f0951ac99aae1c85b1ac532a255c82da0d0fe95 /LUFA
parentde36d73a1848cd3d7ffb57f109ff4895fa000021 (diff)
Fix TWI driver not aborting when faced with no response after attempting to address a device on the bus.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1158 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/Drivers/Peripheral/TWI.c4
-rw-r--r--LUFA/ManPages/ChangeLog.txt1
2 files changed, 3 insertions, 2 deletions
diff --git a/LUFA/Drivers/Peripheral/TWI.c b/LUFA/Drivers/Peripheral/TWI.c
index eb513c45..79866799 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 155afa09..0ef0fbc9 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
*