diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-12-26 14:25:34 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-12-26 14:25:34 +0000 |
commit | 2073b96d82433607bd287e3b6529fd0d3cc428cd (patch) | |
tree | 680767a0fba855e26799e392a59d4b0b6d8be4df /LUFA/Drivers/Board/Temperature.c | |
parent | 39ac72f2d12a9c62b2e876de4eee6c34a864ff74 (diff) | |
download | lufa-2073b96d82433607bd287e3b6529fd0d3cc428cd.tar.gz lufa-2073b96d82433607bd287e3b6529fd0d3cc428cd.tar.bz2 lufa-2073b96d82433607bd287e3b6529fd0d3cc428cd.zip |
Added basic driver example use code to the library documentation.
Made the USARTStream global public and documented in the SerialStream module, allowing for the serial USART stream to be accessed via its handle rather than via the implicit stdout and stdin streams.
Diffstat (limited to 'LUFA/Drivers/Board/Temperature.c')
-rw-r--r-- | LUFA/Drivers/Board/Temperature.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/Board/Temperature.c b/LUFA/Drivers/Board/Temperature.c index 67d105491..3c8028143 100644 --- a/LUFA/Drivers/Board/Temperature.c +++ b/LUFA/Drivers/Board/Temperature.c @@ -50,10 +50,10 @@ int8_t Temperature_GetTemperature(void) if (Temp_ADC > pgm_read_word(&Temperature_Lookup[0])) return TEMP_MIN_TEMP; - for (uint16_t Index = 0; Index < TEMP_TABLE_SIZE; Index++) + for (uint16_t Index = 0; Index < (sizeof(Temperature_Lookup) / sizeof(Temperature_Lookup[0])); Index++) { if (Temp_ADC > pgm_read_word(&Temperature_Lookup[Index])) - return (Index + TEMP_TABLE_OFFSET); + return (Index + TEMP_TABLE_OFFSET_DEGREES); } return TEMP_MAX_TEMP; |