aboutsummaryrefslogtreecommitdiff
path: root/Projects/TempDataLogger
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-02-26 15:57:06 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-02-26 15:57:06 +0000
commitde62ca1a20284dab7e6912b4f036d851bb798693 (patch)
tree48407fadd460b0717e8715672f83253830d7066e /Projects/TempDataLogger
parent6044b40118b03be255ad7aeb4484f93c835fcb88 (diff)
Added TWI baud rate prescaler and bit length parameters to the TWI_Init() function (thanks to Thomas Herlinghaus).
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1683 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/TempDataLogger')
-rw-r--r--Projects/TempDataLogger/TempDataLogger.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c
index ecea2fb1..cd511f4f 100644
--- a/Projects/TempDataLogger/TempDataLogger.c
+++ b/Projects/TempDataLogger/TempDataLogger.c
@@ -151,10 +151,6 @@ int main(void)
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
- /* Discard the first sample from the temperature sensor, as it is generally incorrect */
- volatile uint8_t Dummy = Temperature_GetTemperature();
- (void)Dummy;
-
for (;;)
{
MS_Device_USBTask(&Disk_MS_Interface);
@@ -204,7 +200,7 @@ void SetupHardware(void)
Temperature_Init();
Dataflash_Init();
USB_Init();
- TWI_Init();
+ TWI_Init(TWI_BIT_PRESCALE_4, (F_CPU / 4 / 50000) / 2);
/* 500ms logging interval timer configuration */
OCR1A = (((F_CPU / 1024) / 2) - 1);