aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-02-25 02:47:42 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-02-25 02:47:42 +0000
commit634abab38ac6a9ebdae67b2da5d100874b6c4f73 (patch)
tree1f0951ac99aae1c85b1ac532a255c82da0d0fe95 /LUFA/Drivers
parentc0c982df7af34ea0375eda774185f3825c261522 (diff)
downloadlufa-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/Drivers')
-rw-r--r--LUFA/Drivers/Peripheral/TWI.c4
1 files changed, 2 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;
}
}
}