Make sure that the NVM bus/controller busy waits in the AVRISP MKII clone project...
[pub/USBasp.git] / LUFA / Drivers / Board / Temperature.c
index 17a3497..ea12bf7 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -45,7 +45,7 @@ static const uint16_t PROGMEM Temperature_Lookup[] = {
 \r
 int8_t Temperature_GetTemperature(void)\r
 {\r
 \r
 int8_t Temperature_GetTemperature(void)\r
 {\r
-       uint16_t Temp_ADC = ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | TEMP_ADC_CHANNEL);\r
+       uint16_t Temp_ADC = ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | TEMP_ADC_CHANNEL_MASK);\r
 \r
        if (Temp_ADC > pgm_read_word(&Temperature_Lookup[0]))\r
          return TEMP_MIN_TEMP;\r
 \r
        if (Temp_ADC > pgm_read_word(&Temperature_Lookup[0]))\r
          return TEMP_MIN_TEMP;\r