Convert over internal pseudo-function macros to true inline functions for added type-safety and compile-checking.
This commit is contained in:
parent
2461ae508c
commit
9b0e4b8356
21 changed files with 1689 additions and 1055 deletions
|
|
@ -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: */
|
||||
/** 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) 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue