X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/deed746d3716d59153e04860c646bfb7b82ca820..3a03da970558de9211fc1a43b12bf69e38854d09:/LUFA/Drivers/Board/Temperature.h diff --git a/LUFA/Drivers/Board/Temperature.h b/LUFA/Drivers/Board/Temperature.h index 98bd23498..40d8e9890 100644 --- a/LUFA/Drivers/Board/Temperature.h +++ b/LUFA/Drivers/Board/Temperature.h @@ -31,7 +31,7 @@ /** \file * \brief Master include file for the board temperature sensor driver. * - * Master include file for the board temperature sensor driver, for the USB boards which contain a temperature sensor. + * Master include file for the board temperature sensor driver, for the USB boards which contain a temperature sensor. */ /** \ingroup Group_BoardDrivers @@ -39,7 +39,7 @@ * * \section Sec_Dependencies Module Source Dependencies * The following files must be built with any user project that uses this module: - * - LUFA/Drivers/Board/Temperature.c + * - LUFA/Drivers/Board/Temperature.c (Makefile source module name: LUFA_SRC_TEMPERATURE) * * \section Module Description * Temperature sensor driver. This provides an easy to use interface for the hardware temperature sensor located @@ -86,18 +86,18 @@ /** Maximum returnable temperature from the \ref Temperature_GetTemperature() function. */ #define TEMP_MAX_TEMP ((TEMP_TABLE_SIZE - 1) + TEMP_TABLE_OFFSET) - /* Pseudo-Function Macros: */ - #if defined(__DOXYGEN__) - /** Initializes the temperature sensor driver, including setting up the appropriate ADC channel. - * This must be called before any other temperature sensor routines. - * - * \pre The ADC itself (not the ADC channel) must be configured separately before calling the - * temperature sensor functions. - */ - static inline void Temperature_Init(void); - #else - #define Temperature_Init() ADC_SetupChannel(TEMP_ADC_CHANNEL); - #endif + /* Inline Functions: */ + /** Initialises the temperature sensor driver, including setting up the appropriate ADC channel. + * This must be called before any other temperature sensor routines. + * + * \pre The ADC itself (not the ADC channel) must be configured separately before calling the + * temperature sensor functions. + */ + static inline void Temperature_Init(void) ATTR_ALWAYS_INLINE; + static inline void Temperature_Init(void) + { + ADC_SetupChannel(TEMP_ADC_CHANNEL); + } /* Function Prototypes: */ /** Performs a complete ADC on the temperature sensor channel, and converts the result into a