Fix improper indenting of the internal board driver dispatch headers.

Slight improvements to the ADC peripheral driver example in the manual.
pull/1469/head
Dean Camera 14 years ago
parent bfa22eca26
commit 87b57522b2

@ -135,21 +135,21 @@
#include "Board/Buttons.h" #include "Board/Buttons.h"
#endif #endif
/* Pseudo-Functions for Doxygen: */ /* Pseudo-Functions for Doxygen: */
#if defined(__DOXYGEN__) #if defined(__DOXYGEN__)
/** Initializes the BUTTONS driver, so that the current button position can be read. This sets the appropriate /** Initializes the BUTTONS driver, so that the current button position can be read. This sets the appropriate
* I/O pins to an inputs with pull-ups enabled. * I/O pins to an inputs with pull-ups enabled.
* *
* This must be called before any Button driver functions are used. * This must be called before any Button driver functions are used.
*/ */
static inline void Buttons_Init(void); static inline void Buttons_Init(void);
/** Returns a mask indicating which board buttons are currently pressed. /** Returns a mask indicating which board buttons are currently pressed.
* *
* \return Mask indicating which board buttons are currently pressed. * \return Mask indicating which board buttons are currently pressed.
*/ */
static inline uint_reg_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; static inline uint_reg_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
#endif #endif
#endif #endif

@ -119,21 +119,21 @@
#include "Board/Joystick.h" #include "Board/Joystick.h"
#endif #endif
/* Pseudo-Functions for Doxygen: */ /* Pseudo-Functions for Doxygen: */
#if defined(__DOXYGEN__) #if defined(__DOXYGEN__)
/** Initializes the joystick driver so that the joystick position can be read. This sets the appropriate /** Initializes the joystick driver so that the joystick position can be read. This sets the appropriate
* I/O pins to inputs with their pull-ups enabled. * I/O pins to inputs with their pull-ups enabled.
*/ */
static inline void Joystick_Init(void); static inline void Joystick_Init(void);
/** Returns the current status of the joystick, as a mask indicating the direction the joystick is /** Returns the current status of the joystick, as a mask indicating the direction the joystick is
* currently facing in (multiple bits can be set). * currently facing in (multiple bits can be set).
* *
* \return Mask indicating the joystick direction - see corresponding board specific Joystick.h file * \return Mask indicating the joystick direction - see corresponding board specific Joystick.h file
* for direction masks. * for direction masks.
*/ */
static inline uint_reg_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; static inline uint_reg_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
#endif #endif
#endif #endif

@ -105,91 +105,92 @@
#define __INCLUDE_FROM_LEDS_H #define __INCLUDE_FROM_LEDS_H
/* Includes: */ /* Includes: */
#include "../../Common/Common.h" #include "../../Common/Common.h"
#if (BOARD == BOARD_NONE) #if (BOARD == BOARD_NONE)
static inline void LEDs_Init(void) {}; static inline void LEDs_Init(void) {};
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) {}; static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) {};
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) {}; static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) {};
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) {}; static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) {};
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) {}; static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) {};
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) {}; static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) {};
static inline uint8_t LEDs_GetLEDs(void) { return 0; } static inline uint8_t LEDs_GetLEDs(void) { return 0; }
#elif (BOARD == BOARD_USBKEY) #elif (BOARD == BOARD_USBKEY)
#include "AVR8/USBKEY/LEDs.h" #include "AVR8/USBKEY/LEDs.h"
#elif (BOARD == BOARD_STK525) #elif (BOARD == BOARD_STK525)
#include "AVR8/STK525/LEDs.h" #include "AVR8/STK525/LEDs.h"
#elif (BOARD == BOARD_STK526) #elif (BOARD == BOARD_STK526)
#include "AVR8/STK526/LEDs.h" #include "AVR8/STK526/LEDs.h"
#elif (BOARD == BOARD_RZUSBSTICK) #elif (BOARD == BOARD_RZUSBSTICK)
#include "AVR8/RZUSBSTICK/LEDs.h" #include "AVR8/RZUSBSTICK/LEDs.h"
#elif (BOARD == BOARD_ATAVRUSBRF01) #elif (BOARD == BOARD_ATAVRUSBRF01)
#include "AVR8/ATAVRUSBRF01/LEDs.h" #include "AVR8/ATAVRUSBRF01/LEDs.h"
#elif ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)) #elif ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
#include "AVR8/XPLAIN/LEDs.h" #include "AVR8/XPLAIN/LEDs.h"
#elif (BOARD == BOARD_BUMBLEB) #elif (BOARD == BOARD_BUMBLEB)
#include "AVR8/BUMBLEB/LEDs.h" #include "AVR8/BUMBLEB/LEDs.h"
#elif (BOARD == BOARD_EVK527) #elif (BOARD == BOARD_EVK527)
#include "AVR8/EVK527/LEDs.h" #include "AVR8/EVK527/LEDs.h"
#elif (BOARD == BOARD_TEENSY) #elif (BOARD == BOARD_TEENSY)
#include "AVR8/TEENSY/LEDs.h" #include "AVR8/TEENSY/LEDs.h"
#elif (BOARD == BOARD_USBTINYMKII) #elif (BOARD == BOARD_USBTINYMKII)
#include "AVR8/USBTINYMKII/LEDs.h" #include "AVR8/USBTINYMKII/LEDs.h"
#elif (BOARD == BOARD_BENITO) #elif (BOARD == BOARD_BENITO)
#include "AVR8/BENITO/LEDs.h" #include "AVR8/BENITO/LEDs.h"
#elif (BOARD == BOARD_JMDBU2) #elif (BOARD == BOARD_JMDBU2)
#include "AVR8/JMDBU2/LEDs.h" #include "AVR8/JMDBU2/LEDs.h"
#elif (BOARD == BOARD_OLIMEX162) #elif (BOARD == BOARD_OLIMEX162)
#include "AVR8/OLIMEX162/LEDs.h" #include "AVR8/OLIMEX162/LEDs.h"
#elif (BOARD == BOARD_USBFOO) #elif (BOARD == BOARD_USBFOO)
#include "AVR8/USBFOO/LEDs.h" #include "AVR8/USBFOO/LEDs.h"
#elif (BOARD == BOARD_UDIP) #elif (BOARD == BOARD_UDIP)
#include "AVR8/UDIP/LEDs.h" #include "AVR8/UDIP/LEDs.h"
#elif (BOARD == BOARD_BUI) #elif (BOARD == BOARD_BUI)
#include "AVR8/BUI/LEDs.h" #include "AVR8/BUI/LEDs.h"
#elif (BOARD == BOARD_UNO) #elif (BOARD == BOARD_UNO)
#include "AVR8/UNO/LEDs.h" #include "AVR8/UNO/LEDs.h"
#elif (BOARD == BOARD_CULV3) #elif (BOARD == BOARD_CULV3)
#include "AVR8/CULV3/LEDs.h" #include "AVR8/CULV3/LEDs.h"
#elif (BOARD == BOARD_BLACKCAT) #elif (BOARD == BOARD_BLACKCAT)
#include "AVR8/BLACKCAT/LEDs.h" #include "AVR8/BLACKCAT/LEDs.h"
#elif (BOARD == BOARD_MAXIMUS) #elif (BOARD == BOARD_MAXIMUS)
#include "AVR8/MAXIMUS/LEDs.h" #include "AVR8/MAXIMUS/LEDs.h"
#elif (BOARD == BOARD_MINIMUS) #elif (BOARD == BOARD_MINIMUS)
#include "AVR8/MINIMUS/LEDs.h" #include "AVR8/MINIMUS/LEDs.h"
#elif (BOARD == BOARD_ADAFRUITU4) #elif (BOARD == BOARD_ADAFRUITU4)
#include "AVR8/ADAFRUITU4/LEDs.h" #include "AVR8/ADAFRUITU4/LEDs.h"
#elif (BOARD == BOARD_MICROSIN162) #elif (BOARD == BOARD_MICROSIN162)
#include "AVR8/MICROSIN162/LEDs.h" #include "AVR8/MICROSIN162/LEDs.h"
#elif (BOARD == BOARD_SPARKFUN8U2) #elif (BOARD == BOARD_SPARKFUN8U2)
#include "AVR8/SPARKFUN8U2/LEDs.h" #include "AVR8/SPARKFUN8U2/LEDs.h"
#elif (BOARD == BOARD_EVK1101) #elif (BOARD == BOARD_EVK1101)
#include "UC3/EVK1101/LEDs.h" #include "UC3/EVK1101/LEDs.h"
#elif (BOARD == BOARD_TUL) #elif (BOARD == BOARD_TUL)
#include "AVR8/TUL/LEDs.h" #include "AVR8/TUL/LEDs.h"
#elif (BOARD == BOARD_EVK1100) #elif (BOARD == BOARD_EVK1100)
#include "UC3/EVK1100/LEDs.h" #include "UC3/EVK1100/LEDs.h"
#elif (BOARD == BOARD_EVK1104) #elif (BOARD == BOARD_EVK1104)
#include "UC3/EVK1104/LEDs.h" #include "UC3/EVK1104/LEDs.h"
#else #else
#include "Board/LEDs.h" #include "Board/LEDs.h"
#endif #endif
#if !defined(LEDS_LED1) /* Preprocessor Checks: */
#define LEDS_LED1 0 #if !defined(LEDS_LED1)
#endif #define LEDS_LED1 0
#endif
#if !defined(LEDS_LED2)
#define LEDS_LED2 0 #if !defined(LEDS_LED2)
#endif #define LEDS_LED2 0
#endif
#if !defined(LEDS_LED3)
#define LEDS_LED3 0 #if !defined(LEDS_LED3)
#endif #define LEDS_LED3 0
#endif
#if !defined(LEDS_LED4)
#define LEDS_LED4 0 #if !defined(LEDS_LED4)
#endif #define LEDS_LED4 0
#endif
/* Pseudo-Functions for Doxygen: */ /* Pseudo-Functions for Doxygen: */
#if defined(__DOXYGEN__) #if defined(__DOXYGEN__)

@ -65,8 +65,11 @@
* *
* // Start reading ADC channel 1 in free running (continuous conversion) mode * // Start reading ADC channel 1 in free running (continuous conversion) mode
* ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_CHANNEL1); * ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_CHANNEL1);
* while (!(ADC_IsReadingComplete())) {}; * for (;;)
* printf("Conversion Result: %d\r\n", ADC_GetResult()); * {
* while (!(ADC_IsReadingComplete())) {};
* printf("Conversion Result: %d\r\n", ADC_GetResult());
* }
* \endcode * \endcode
* *
* @{ * @{

Loading…
Cancel
Save