aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/CodeTemplates/makefile_template4
-rw-r--r--LUFA/Common/Architectures.h74
-rw-r--r--LUFA/Common/Attributes.h8
-rw-r--r--LUFA/Common/BoardTypes.h8
-rw-r--r--LUFA/Common/Common.h130
-rw-r--r--LUFA/Drivers/Board/ADAFRUITU4/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/BENITO/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/BENITO/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/BLACKCAT/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/BUI/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/BUMBLEB/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/BUMBLEB/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/BUMBLEB/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/Buttons.h6
-rw-r--r--LUFA/Drivers/Board/CULV3/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/CULV3/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/Dataflash.h8
-rw-r--r--LUFA/Drivers/Board/EVK527/AT45DB321C.h2
-rw-r--r--LUFA/Drivers/Board/EVK527/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/EVK527/Dataflash.h2
-rw-r--r--LUFA/Drivers/Board/EVK527/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/EVK527/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/JMDBU2/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/JMDBU2/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/Joystick.h6
-rw-r--r--LUFA/Drivers/Board/LEDs.h4
-rw-r--r--LUFA/Drivers/Board/MAXIMUS/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/MICROSIN162/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/MICROSIN162/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/MINIMUS/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/MINIMUS/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/OLIMEX162/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/OLIMEX162/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/RZUSBSTICK/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/SPARKFUN8U2/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/STK525/AT45DB321C.h2
-rw-r--r--LUFA/Drivers/Board/STK525/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/STK525/Dataflash.h2
-rw-r--r--LUFA/Drivers/Board/STK525/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/STK525/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/STK526/AT45DB642D.h2
-rw-r--r--LUFA/Drivers/Board/STK526/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/STK526/Dataflash.h2
-rw-r--r--LUFA/Drivers/Board/STK526/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/STK526/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/TEENSY/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/Temperature.h6
-rw-r--r--LUFA/Drivers/Board/UDIP/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/UDIP/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/UNO/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/USBFOO/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/USBFOO/LEDS.h2
-rw-r--r--LUFA/Drivers/Board/USBKEY/AT45DB642D.h2
-rw-r--r--LUFA/Drivers/Board/USBKEY/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/USBKEY/Dataflash.h2
-rw-r--r--LUFA/Drivers/Board/USBKEY/Joystick.h2
-rw-r--r--LUFA/Drivers/Board/USBKEY/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/USBTINYMKII/Buttons.h2
-rw-r--r--LUFA/Drivers/Board/USBTINYMKII/LEDs.h2
-rw-r--r--LUFA/Drivers/Board/XPLAIN/AT45DB642D.h2
-rw-r--r--LUFA/Drivers/Board/XPLAIN/Dataflash.h2
-rw-r--r--LUFA/Drivers/Board/XPLAIN/LEDs.h2
-rw-r--r--LUFA/Drivers/Misc/RingBuffer.h2
-rw-r--r--LUFA/Drivers/Misc/TerminalCodes.h2
-rw-r--r--LUFA/Drivers/Peripheral/ADC.h29
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/ADC.h (renamed from LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h)19
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/SPI.h239
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/Serial.c (renamed from LUFA/Drivers/Peripheral/Serial.c)1
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/Serial.h251
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/TWI.c (renamed from LUFA/Drivers/Peripheral/TWI.c)1
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/TWI.h (renamed from LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h)25
-rw-r--r--LUFA/Drivers/Peripheral/SPI.h197
-rw-r--r--LUFA/Drivers/Peripheral/Serial.h216
-rw-r--r--LUFA/Drivers/Peripheral/TWI.h34
-rw-r--r--LUFA/Drivers/USB/Class/Audio.h2
-rw-r--r--LUFA/Drivers/USB/Class/CDC.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/Audio.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/CDC.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/HID.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/HIDParser.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/HIDReportData.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/MIDI.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/MassStorage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/Printer.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/RNDIS.h2
-rw-r--r--LUFA/Drivers/USB/Class/Common/StillImage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDC.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/HID.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/MIDI.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/MassStorage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDIS.h2
-rw-r--r--LUFA/Drivers/USB/Class/HID.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDC.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/HID.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/MIDI.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/MassStorage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/RNDIS.h2
-rw-r--r--LUFA/Drivers/USB/Class/Host/StillImage.h2
-rw-r--r--LUFA/Drivers/USB/Class/MIDI.h2
-rw-r--r--LUFA/Drivers/USB/Class/MassStorage.h2
-rw-r--r--LUFA/Drivers/USB/Class/Printer.h2
-rw-r--r--LUFA/Drivers/USB/Class/RNDIS.h2
-rw-r--r--LUFA/Drivers/USB/Class/StillImage.h2
-rw-r--r--LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h2
-rw-r--r--LUFA/Drivers/USB/HighLevel/EndpointStream.h2
-rw-r--r--LUFA/Drivers/USB/HighLevel/Events.h2
-rw-r--r--LUFA/Drivers/USB/HighLevel/PipeStream.h2
-rw-r--r--LUFA/Drivers/USB/HighLevel/StdDescriptors.h2
-rw-r--r--LUFA/Drivers/USB/HighLevel/StdRequestType.h2
-rw-r--r--LUFA/Drivers/USB/HighLevel/USBMode.h2
-rw-r--r--LUFA/Drivers/USB/LowLevel/Device.h2
-rw-r--r--LUFA/Drivers/USB/LowLevel/Endpoint.h8
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.h2
-rw-r--r--LUFA/Drivers/USB/LowLevel/OTG.h2
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.h10
-rw-r--r--LUFA/Drivers/USB/LowLevel/USBController.h2
-rw-r--r--LUFA/Drivers/USB/USB.h4
-rw-r--r--LUFA/ManPages/ChangeLog.txt1
-rw-r--r--LUFA/ManPages/DirectorySummaries.txt9
-rw-r--r--LUFA/Scheduler/Scheduler.c6
-rw-r--r--LUFA/Scheduler/Scheduler.h34
-rw-r--r--LUFA/makefile9
126 files changed, 904 insertions, 639 deletions
diff --git a/LUFA/CodeTemplates/makefile_template b/LUFA/CodeTemplates/makefile_template
index 33b47e0bb..adf5e54dd 100644
--- a/LUFA/CodeTemplates/makefile_template
+++ b/LUFA/CodeTemplates/makefile_template
@@ -63,6 +63,10 @@
MCU = ### INSERT NAME OF MICROCONTROLLER MODEL HERE ###
+# Target architecture (see library "Board Types" documentation).
+ARCH = ## INSERT NAME OF ARCHITECTURE HERE ##
+
+
# Target board (see library "Board Types" documentation, NONE for projects not requiring
# LUFA board drivers). If USER is selected, put custom board drivers in a directory called
# "Board" inside the application directory.
diff --git a/LUFA/Common/Architectures.h b/LUFA/Common/Architectures.h
new file mode 100644
index 000000000..8bf9c7cac
--- /dev/null
+++ b/LUFA/Common/Architectures.h
@@ -0,0 +1,74 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ Permission to use, copy, modify, distribute, and sell this
+ software and its documentation for any purpose is hereby granted
+ without fee, provided that the above copyright notice appear in
+ all copies and that both that the copyright notice and this
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief Supported architecture defines.
+ *
+ * This file contains constants which can be passed to the compiler (via setting the macro ARCH) in the
+ * user project makefile using the -D option to configure the library drivers.
+ *
+ * \note Do not include this file directly, rather include the Common.h header file instead to gain this file's
+ * functionality.
+ */
+
+/** \ingroup Group_Common
+ * \defgroup Group_Architectures Hardware Architectures
+ *
+ * Macros for indicating the chosen hardware architecture to the library. These macros should be used when
+ * defining the ARCH token to the chosen hardware via the -D switch in the project makefile.
+ *
+ * @{
+ */
+
+#ifndef __LUFA_ARCHITECTURES_H__
+#define __LUFA_ARCHITECTURES_H__
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_COMMON_H)
+ #error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Selects the Atmel 8-bit AVR (AT90USB* and ATMEGA*U* chips) architecture. */
+ #define ARCH_AVR8 1
+
+ #if !defined(__DOXYGEN__)
+ #define ARCH_ ARCH_AVR8
+
+ #if !defined(ARCH)
+ #define ARCH ARCH_AVR8
+ #endif
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Common/Attributes.h b/LUFA/Common/Attributes.h
index 67a3166b2..ff4058cf1 100644
--- a/LUFA/Common/Attributes.h
+++ b/LUFA/Common/Attributes.h
@@ -44,7 +44,7 @@
*/
/** \ingroup Group_Common
- * @defgroup Group_GCCAttr Function/Variable Attributes
+ * \defgroup Group_GCCAttr Function/Variable Attributes
*
* Macros for easy access GCC function and variable attributes, which can be applied to function prototypes or
* variable attributes.
@@ -52,11 +52,11 @@
* @{
*/
-#ifndef __FUNCATTR_H__
-#define __FUNCATTR_H__
+#ifndef __LUFA_FUNCATTR_H__
+#define __LUFA_FUNCATTR_H__
/* Preprocessor Checks: */
- #if !defined(__COMMON_H__)
+ #if !defined(__INCLUDE_FROM_COMMON_H)
#error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
#endif
diff --git a/LUFA/Common/BoardTypes.h b/LUFA/Common/BoardTypes.h
index 264908fe2..7d9162262 100644
--- a/LUFA/Common/BoardTypes.h
+++ b/LUFA/Common/BoardTypes.h
@@ -39,7 +39,7 @@
*/
/** \ingroup Group_Common
- * @defgroup Group_BoardTypes Board Types
+ * \defgroup Group_BoardTypes Board Types
*
* Macros for indicating the chosen physical board hardware to the library. These macros should be used when
* defining the BOARD token to the chosen hardware via the -D switch in the project makefile.
@@ -47,11 +47,11 @@
* @{
*/
-#ifndef __BOARDTYPES_H__
-#define __BOARDTYPES_H__
+#ifndef __LUFA_BOARDTYPES_H__
+#define __LUFA_BOARDTYPES_H__
/* Preprocessor Checks: */
- #if !defined(__COMMON_H__)
+ #if !defined(__INCLUDE_FROM_COMMON_H)
#error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
#endif
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h
index c1aa27a5f..3afb60d00 100644
--- a/LUFA/Common/Common.h
+++ b/LUFA/Common/Common.h
@@ -35,7 +35,7 @@
* also includes other common code headers.
*/
-/** @defgroup Group_Common Common Utility Headers - LUFA/Drivers/Common/Common.h
+/** \defgroup Group_Common Common Utility Headers - LUFA/Drivers/Common/Common.h
*
* Common utility headers containing macros, functions, enums and types which are common to all
* aspects of the library.
@@ -43,25 +43,41 @@
* @{
*/
-/** @defgroup Group_Debugging Debugging Macros
+/** \defgroup Group_Debugging Debugging Macros
*
* Macros for debugging use.
*/
-/** @defgroup Group_BitManip Endian and Bit Macros
+/** \defgroup Group_BitManip Endian and Bit Macros
*
* Functions for swapping endianness and reversing bit orders.
*/
-#ifndef __COMMON_H__
-#define __COMMON_H__
+#ifndef __LUFA_COMMON_H__
+#define __LUFA_COMMON_H__
+ /* Macros: */
+ #if !defined(__DOXYGEN__)
+ #define __INCLUDE_FROM_COMMON_H
+ #endif
+
/* Includes: */
#include <stdint.h>
#include <stdbool.h>
+ #include "Architectures.h"
#include "Attributes.h"
#include "BoardTypes.h"
+
+ /* Architecture specific utility includes: */
+ #if (ARCH == ARCH_AVR8)
+ #include <avr/io.h>
+ #include <avr/interrupt.h>
+ #include <avr/pgmspace.h>
+ #include <avr/eeprom.h>
+ #include <util/atomic.h>
+ #include <util/delay.h>
+ #endif
/* Public Interface - May be used in end-application: */
/* Macros: */
@@ -89,7 +105,9 @@
*
* \return The larger of the two input parameters
*/
- #define MAX(x, y) ((x > y) ? x : y)
+ #if !defined(MAX) || defined(__DOXYGEN__)
+ #define MAX(x, y) ((x > y) ? x : y)
+ #endif
/** Convenience macro to determine the smaller of two values.
*
@@ -101,44 +119,61 @@
*
* \return The smaller of the two input parameters
*/
- #define MIN(x, y) ((x < y) ? x : y)
-
- /** Defines a volatile \c NOP statement which cannot be optimized out by the compiler, and thus can always
- * be set as a breakpoint in the resulting code. Useful for debugging purposes, where the optimiser
- * removes/reorders code to the point where break points cannot reliably be set.
- *
- * \ingroup Group_Debugging
- */
- #define JTAG_DEBUG_POINT() __asm__ __volatile__ ("NOP" ::)
+ #if !defined(MIN) || defined(__DOXYGEN__)
+ #define MIN(x, y) ((x < y) ? x : y)
+ #endif
- /** Defines an explicit JTAG break point in the resulting binary via the assembly \c BREAK statement. When
- * a JTAG is used, this causes the program execution to halt when reached until manually resumed.
- *
- * \ingroup Group_Debugging
- */
- #define JTAG_DEBUG_BREAK() __asm__ __volatile__ ("BREAK" ::)
+ #if (ARCH == ARCH_AVR8)
+ /** Defines a volatile \c NOP statement which cannot be optimized out by the compiler, and thus can always
+ * be set as a breakpoint in the resulting code. Useful for debugging purposes, where the optimiser
+ * removes/reorders code to the point where break points cannot reliably be set.
+ *
+ * \ingroup Group_Debugging
+ */
+ #define JTAG_DEBUG_POINT() __asm__ __volatile__ ("NOP" ::)
- /** Macro for testing condition "x" and breaking via \ref JTAG_DEBUG_BREAK() if the condition is false.
- *
- * \param[in] Condition Condition that will be evaluated,
- *
- * \ingroup Group_Debugging
- */
- #define JTAG_DEBUG_ASSERT(Condition) MACROS{ if (!(Condition)) { JTAG_DEBUG_BREAK(); } }MACROE
+ /** Defines an explicit JTAG break point in the resulting binary via the assembly \c BREAK statement. When
+ * a JTAG is used, this causes the program execution to halt when reached until manually resumed.
+ *
+ * \ingroup Group_Debugging
+ */
+ #define JTAG_DEBUG_BREAK() __asm__ __volatile__ ("BREAK" ::)
+
+ #if !defined(pgm_read_ptr) || defined(__DOXYGEN__)
+ /** Reads a pointer out of PROGMEM space. This is currently a wrapper for the avr-libc \c pgm_read_ptr()
+ * macro with a \c void* cast, so that its value can be assigned directly to a pointer variable or used
+ * in pointer arithmetic without further casting in C. In a future avr-libc distribution this will be
+ * part of the standard API and will be implemented in a more formal manner.
+ *
+ * \param[in] Addr Address of the pointer to read.
+ *
+ * \return Pointer retrieved from PROGMEM space.
+ */
+ #define pgm_read_ptr(Addr) (void*)pgm_read_word(Addr)
+ #endif
+
+ /** Macro for testing condition "x" and breaking via \ref JTAG_DEBUG_BREAK() if the condition is false.
+ *
+ * \param[in] Condition Condition that will be evaluated,
+ *
+ * \ingroup Group_Debugging
+ */
+ #define JTAG_DEBUG_ASSERT(Condition) MACROS{ if (!(Condition)) { JTAG_DEBUG_BREAK(); } }MACROE
- /** Macro for testing condition "x" and writing debug data to the stdout stream if \c false. The stdout stream
- * must be pre-initialized before this macro is run and linked to an output device, such as the AVR's USART
- * peripheral.
- *
- * The output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion {Condition} failed."
- *
- * \param[in] Condition Condition that will be evaluated,
- *
- * \ingroup Group_Debugging
- */
- #define STDOUT_ASSERT(Condition) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \
- "Assertion \"%s\" failed.\r\n"), \
- __FILE__, __func__, __LINE__, #Condition); } }MACROE
+ /** Macro for testing condition "x" and writing debug data to the stdout stream if \c false. The stdout stream
+ * must be pre-initialized before this macro is run and linked to an output device, such as the AVR's USART
+ * peripheral.
+ *
+ * The output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion {Condition} failed."
+ *
+ * \param[in] Condition Condition that will be evaluated,
+ *
+ * \ingroup Group_Debugging
+ */
+ #define STDOUT_ASSERT(Condition) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \
+ "Assertion \"%s\" failed.\r\n"), \
+ __FILE__, __func__, __LINE__, #Condition); } }MACROE
+ #endif
/** Forces GCC to use pointer indirection (via the AVR's pointer register pairs) when accessing the given
* struct pointer. In some cases GCC will emit non-optimal assembly code when accessing a structure through
@@ -150,19 +185,6 @@
*/
#define GCC_FORCE_POINTER_ACCESS(StructPtr) __asm__ __volatile__("" : "=b" (StructPtr) : "0" (StructPtr))
- #if !defined(pgm_read_ptr) || defined(__DOXYGEN__)
- /** Reads a pointer out of PROGMEM space. This is currently a wrapper for the avr-libc \c pgm_read_ptr()
- * macro with a \c void* cast, so that its value can be assigned directly to a pointer variable or used
- * in pointer arithmetic without further casting in C. In a future avr-libc distribution this will be
- * part of the standard API and will be implemented in a more formal manner.
- *
- * \param[in] Addr Address of the pointer to read.
- *
- * \return Pointer retrieved from PROGMEM space.
- */
- #define pgm_read_ptr(Addr) (void*)pgm_read_word(Addr)
- #endif
-
/** Swaps the byte ordering of a 16-bit value at compile time. Do not use this macro for swapping byte orderings
* of dynamic values computed at runtime, use \ref SwapEndian_16() instead. The result of this macro can be used
* inside struct or other variable initializers outside of a function, something that is not possible with the
diff --git a/LUFA/Drivers/Board/ADAFRUITU4/LEDs.h b/LUFA/Drivers/Board/ADAFRUITU4/LEDs.h
index 4d38817d8..3f6a6cca4 100644
--- a/LUFA/Drivers/Board/ADAFRUITU4/LEDs.h
+++ b/LUFA/Drivers/Board/ADAFRUITU4/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_ADAFRUITU4 ADAFRUITU4
+ * \defgroup Group_LEDs_ADAFRUITU4 ADAFRUITU4
*
* Board specific LED driver header for the Adafruit U4 Breakout board (http://ladyada.net/products/atmega32u4breakout).
*
diff --git a/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h b/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h
index 28ea05792..568c0cb7d 100644
--- a/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h
+++ b/LUFA/Drivers/Board/ATAVRUSBRF01/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_ATAVRUSBRF01 ATAVRUSBRF01
+ * \defgroup Group_Buttons_ATAVRUSBRF01 ATAVRUSBRF01
*
* Board specific Buttons driver header for the Atmel ATAVRUSBRF01.
*
diff --git a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h
index d6dde92da..044042f09 100644
--- a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h
+++ b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_ATAVRUSBRF01 ATAVRUSBRF01
+ * \defgroup Group_LEDs_ATAVRUSBRF01 ATAVRUSBRF01
*
* Board specific LED driver header for the Atmel ATAVRUSBRF01.
*
diff --git a/LUFA/Drivers/Board/BENITO/Buttons.h b/LUFA/Drivers/Board/BENITO/Buttons.h
index cf2a477ca..4e3d08820 100644
--- a/LUFA/Drivers/Board/BENITO/Buttons.h
+++ b/LUFA/Drivers/Board/BENITO/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_BENITO BENITO
+ * \defgroup Group_Buttons_BENITO BENITO
*
* Board specific Buttons driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
diff --git a/LUFA/Drivers/Board/BENITO/LEDs.h b/LUFA/Drivers/Board/BENITO/LEDs.h
index 855ca01a3..51593ec9e 100644
--- a/LUFA/Drivers/Board/BENITO/LEDs.h
+++ b/LUFA/Drivers/Board/BENITO/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_BENITO BENITO
+ * \defgroup Group_LEDs_BENITO BENITO
*
* Board specific LED driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
diff --git a/LUFA/Drivers/Board/BLACKCAT/LEDs.h b/LUFA/Drivers/Board/BLACKCAT/LEDs.h
index 40c847333..e5c250cc4 100644
--- a/LUFA/Drivers/Board/BLACKCAT/LEDs.h
+++ b/LUFA/Drivers/Board/BLACKCAT/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_BLACKCAT BLACKCAT
+ * \defgroup Group_LEDs_BLACKCAT BLACKCAT
*
* Board specific LED driver header for the TCNISO Blackcat USB JTAG (http://www.embeddedcomputers.net/products/BlackcatUSB/.
*
diff --git a/LUFA/Drivers/Board/BUI/LEDs.h b/LUFA/Drivers/Board/BUI/LEDs.h
index 6c2a36132..fa1a8b0c4 100644
--- a/LUFA/Drivers/Board/BUI/LEDs.h
+++ b/LUFA/Drivers/Board/BUI/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_BUI BUI
+ * \defgroup Group_LEDs_BUI BUI
*
* Board specific LED driver header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI).
*
diff --git a/LUFA/Drivers/Board/BUMBLEB/Buttons.h b/LUFA/Drivers/Board/BUMBLEB/Buttons.h
index 8b54f113b..015ecf6d5 100644
--- a/LUFA/Drivers/Board/BUMBLEB/Buttons.h
+++ b/LUFA/Drivers/Board/BUMBLEB/Buttons.h
@@ -41,7 +41,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_BUMBLEB BUMBLEB
+ * \defgroup Group_Buttons_BUMBLEB BUMBLEB
*
* Board specific buttons driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB
* third-party board does not include any on-board peripherals, but does have an officially recommended external peripheral
diff --git a/LUFA/Drivers/Board/BUMBLEB/Joystick.h b/LUFA/Drivers/Board/BUMBLEB/Joystick.h
index 4516bdb61..336863c38 100644
--- a/LUFA/Drivers/Board/BUMBLEB/Joystick.h
+++ b/LUFA/Drivers/Board/BUMBLEB/Joystick.h
@@ -41,7 +41,7 @@
*/
/** \ingroup Group_Joystick
- * @defgroup Group_Joystick_BUMBLEB BUMBLEB
+ * \defgroup Group_Joystick_BUMBLEB BUMBLEB
*
* Board specific joystick driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB
* third-party board does not include any on-board peripherals, but does have an officially recommended external peripheral
diff --git a/LUFA/Drivers/Board/BUMBLEB/LEDs.h b/LUFA/Drivers/Board/BUMBLEB/LEDs.h
index b985340d0..349ef38c6 100644
--- a/LUFA/Drivers/Board/BUMBLEB/LEDs.h
+++ b/LUFA/Drivers/Board/BUMBLEB/LEDs.h
@@ -41,7 +41,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_BUMBLEB BUMBLEB
+ * \defgroup Group_LEDs_BUMBLEB BUMBLEB
*
* Board specific LED driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB
* third-party board does not include any on-board peripherals, but does have an officially recommended external
diff --git a/LUFA/Drivers/Board/Buttons.h b/LUFA/Drivers/Board/Buttons.h
index 1e31059d4..686fe5ad9 100644
--- a/LUFA/Drivers/Board/Buttons.h
+++ b/LUFA/Drivers/Board/Buttons.h
@@ -44,7 +44,7 @@
*/
/** \ingroup Group_BoardDrivers
- * @defgroup Group_Buttons Buttons Driver - LUFA/Drivers/Board/Buttons.h
+ * \defgroup Group_Buttons Buttons Driver - LUFA/Drivers/Board/Buttons.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -125,10 +125,8 @@
#include "MINIMUS/Buttons.h"
#elif (BOARD == BOARD_MICROSIN162)
#include "MICROSIN162/Buttons.h"
- #elif (BOARD == BOARD_USER)
- #include "Board/Buttons.h"
#else
- #error The selected board does not contain any GPIO buttons.
+ #include "Board/Buttons.h"
#endif
/* Pseudo-Functions for Doxygen: */
diff --git a/LUFA/Drivers/Board/CULV3/Buttons.h b/LUFA/Drivers/Board/CULV3/Buttons.h
index 5ed6817d1..fd98c775f 100644
--- a/LUFA/Drivers/Board/CULV3/Buttons.h
+++ b/LUFA/Drivers/Board/CULV3/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_CULV3 CULV3
+ * \defgroup Group_LEDs_CULV3 CULV3
*
* Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
*
diff --git a/LUFA/Drivers/Board/CULV3/LEDs.h b/LUFA/Drivers/Board/CULV3/LEDs.h
index 3a2469d5c..c9d20b692 100644
--- a/LUFA/Drivers/Board/CULV3/LEDs.h
+++ b/LUFA/Drivers/Board/CULV3/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_CULV3 CULV3
+ * \defgroup Group_LEDs_CULV3 CULV3
*
* Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
*
diff --git a/LUFA/Drivers/Board/Dataflash.h b/LUFA/Drivers/Board/Dataflash.h
index 852d81977..06c1e62ac 100644
--- a/LUFA/Drivers/Board/Dataflash.h
+++ b/LUFA/Drivers/Board/Dataflash.h
@@ -44,7 +44,7 @@
*/
/** \ingroup Group_BoardDrivers
- * @defgroup Group_Dataflash Dataflash Driver - LUFA/Drivers/Board/Dataflash.h
+ * \defgroup Group_Dataflash Dataflash Driver - LUFA/Drivers/Board/Dataflash.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -123,8 +123,8 @@
#endif
/* Includes: */
- #include "../Peripheral/SPI.h"
#include "../../Common/Common.h"
+ #include "../Peripheral/SPI.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -247,10 +247,8 @@
#include "XPLAIN/Dataflash.h"
#elif (BOARD == BOARD_EVK527)
#include "EVK527/Dataflash.h"
- #elif (BOARD == BOARD_USER)
- #include "Board/Dataflash.h"
#else
- #error The selected board does not contain a dataflash IC.
+ #include "Board/Dataflash.h"
#endif
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/Board/EVK527/AT45DB321C.h b/LUFA/Drivers/Board/EVK527/AT45DB321C.h
index c0d3589a5..8d36ae3f4 100644
--- a/LUFA/Drivers/Board/EVK527/AT45DB321C.h
+++ b/LUFA/Drivers/Board/EVK527/AT45DB321C.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash_EVK527
- * @defgroup Group_Dataflash_EVK527_AT45DB321C AT45DB321C
+ * \defgroup Group_Dataflash_EVK527_AT45DB321C AT45DB321C
*
* Board specific Dataflash commands header for the AT45DB321C as mounted on the Atmel EVK527.
*
diff --git a/LUFA/Drivers/Board/EVK527/Buttons.h b/LUFA/Drivers/Board/EVK527/Buttons.h
index eff2f5179..f9b3da12e 100644
--- a/LUFA/Drivers/Board/EVK527/Buttons.h
+++ b/LUFA/Drivers/Board/EVK527/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_EVK527 EVK527
+ * \defgroup Group_Buttons_EVK527 EVK527
*
* Board specific Buttons driver header for the Atmel EVK527.
*
diff --git a/LUFA/Drivers/Board/EVK527/Dataflash.h b/LUFA/Drivers/Board/EVK527/Dataflash.h
index fdf49c1e8..e9629e06d 100644
--- a/LUFA/Drivers/Board/EVK527/Dataflash.h
+++ b/LUFA/Drivers/Board/EVK527/Dataflash.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash
- * @defgroup Group_Dataflash_EVK527 EVK527
+ * \defgroup Group_Dataflash_EVK527 EVK527
*
* Board specific Dataflash driver header for the Atmel EVK527.
*
diff --git a/LUFA/Drivers/Board/EVK527/Joystick.h b/LUFA/Drivers/Board/EVK527/Joystick.h
index ec08b7a8b..c0255f459 100644
--- a/LUFA/Drivers/Board/EVK527/Joystick.h
+++ b/LUFA/Drivers/Board/EVK527/Joystick.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Joystick
- * @defgroup Group_Joystick_EVK527 EVK527
+ * \defgroup Group_Joystick_EVK527 EVK527
*
* Board specific joystick driver header for the Atmel EVK527.
*
diff --git a/LUFA/Drivers/Board/EVK527/LEDs.h b/LUFA/Drivers/Board/EVK527/LEDs.h
index f5c78fdd7..5f4670fa7 100644
--- a/LUFA/Drivers/Board/EVK527/LEDs.h
+++ b/LUFA/Drivers/Board/EVK527/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_EVK527 EVK527
+ * \defgroup Group_LEDs_EVK527 EVK527
*
* Board specific LED driver header for the Atmel EVK527.
*
diff --git a/LUFA/Drivers/Board/JMDBU2/Buttons.h b/LUFA/Drivers/Board/JMDBU2/Buttons.h
index 958664cae..b5272ae75 100644
--- a/LUFA/Drivers/Board/JMDBU2/Buttons.h
+++ b/LUFA/Drivers/Board/JMDBU2/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_JMDBU2 JMDBU2
+ * \defgroup Group_Buttons_JMDBU2 JMDBU2
*
* Board specific Buttons driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
diff --git a/LUFA/Drivers/Board/JMDBU2/LEDs.h b/LUFA/Drivers/Board/JMDBU2/LEDs.h
index 4c62a45f2..a15e9f35c 100644
--- a/LUFA/Drivers/Board/JMDBU2/LEDs.h
+++ b/LUFA/Drivers/Board/JMDBU2/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_JMDBU2 JMDBU2
+ * \defgroup Group_LEDs_JMDBU2 JMDBU2
*
* Board specific LED driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
diff --git a/LUFA/Drivers/Board/Joystick.h b/LUFA/Drivers/Board/Joystick.h
index f2298e9bd..a9448ffb7 100644
--- a/LUFA/Drivers/Board/Joystick.h
+++ b/LUFA/Drivers/Board/Joystick.h
@@ -44,7 +44,7 @@
*/
/** \ingroup Group_BoardDrivers
- * @defgroup Group_Joystick Joystick Driver - LUFA/Drivers/Board/Joystick.h
+ * \defgroup Group_Joystick Joystick Driver - LUFA/Drivers/Board/Joystick.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -113,10 +113,8 @@
#include "BUMBLEB/Joystick.h"
#elif (BOARD == BOARD_EVK527)
#include "EVK527/Joystick.h"
- #elif (BOARD == BOARD_USER)
- #include "Board/Joystick.h"
#else
- #error The selected board does not contain a joystick.
+ #include "Board/Joystick.h"
#endif
/* Pseudo-Functions for Doxygen: */
diff --git a/LUFA/Drivers/Board/LEDs.h b/LUFA/Drivers/Board/LEDs.h
index 58cdffe51..9ef2ea195 100644
--- a/LUFA/Drivers/Board/LEDs.h
+++ b/LUFA/Drivers/Board/LEDs.h
@@ -44,7 +44,7 @@
*/
/** \ingroup Group_BoardDrivers
- * @defgroup Group_LEDs LEDs Driver - LUFA/Drivers/Board/LEDs.h
+ * \defgroup Group_LEDs LEDs Driver - LUFA/Drivers/Board/LEDs.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -165,7 +165,7 @@
#include "MICROSIN162/LEDs.h"
#elif (BOARD == BOARD_SPARKFUN8U2)
#include "SPARKFUN8U2/LEDs.h"
- #elif (BOARD == BOARD_USER)
+ #else
#include "Board/LEDs.h"
#endif
diff --git a/LUFA/Drivers/Board/MAXIMUS/LEDs.h b/LUFA/Drivers/Board/MAXIMUS/LEDs.h
index b6ec75089..c3ead686b 100644
--- a/LUFA/Drivers/Board/MAXIMUS/LEDs.h
+++ b/LUFA/Drivers/Board/MAXIMUS/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_MAXIMUS MAXIMUS
+ * \defgroup Group_LEDs_MAXIMUS MAXIMUS
*
* Board specific LED driver header for the Maximus (http://www.avrusb.com/).
*
diff --git a/LUFA/Drivers/Board/MICROSIN162/Buttons.h b/LUFA/Drivers/Board/MICROSIN162/Buttons.h
index a8cff7e6b..a4d1637e5 100644
--- a/LUFA/Drivers/Board/MICROSIN162/Buttons.h
+++ b/LUFA/Drivers/Board/MICROSIN162/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_MICROSIN162 MICROSIN162
+ * \defgroup Group_Buttons_MICROSIN162 MICROSIN162
*
* Board specific Buttons driver header for the Microsin AVR-USB162 board (http://microsin.ru/content/view/685/44/).
*
diff --git a/LUFA/Drivers/Board/MICROSIN162/LEDs.h b/LUFA/Drivers/Board/MICROSIN162/LEDs.h
index f988d7cce..8926e33fc 100644
--- a/LUFA/Drivers/Board/MICROSIN162/LEDs.h
+++ b/LUFA/Drivers/Board/MICROSIN162/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_MICROSIN162 MICROSIN162
+ * \defgroup Group_LEDs_MICROSIN162 MICROSIN162
*
* Board specific LED driver header for the Microsin AVR-USB162 board (http://microsin.ru/content/view/685/44/).
*
diff --git a/LUFA/Drivers/Board/MINIMUS/Buttons.h b/LUFA/Drivers/Board/MINIMUS/Buttons.h
index f421f73ff..9b3016fa3 100644
--- a/LUFA/Drivers/Board/MINIMUS/Buttons.h
+++ b/LUFA/Drivers/Board/MINIMUS/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_MINIMUS MINIMUS
+ * \defgroup Group_Buttons_MINIMUS MINIMUS
*
* Board specific Buttons driver header for the MINIMUS.
*
diff --git a/LUFA/Drivers/Board/MINIMUS/LEDs.h b/LUFA/Drivers/Board/MINIMUS/LEDs.h
index 83338576a..524e62853 100644
--- a/LUFA/Drivers/Board/MINIMUS/LEDs.h
+++ b/LUFA/Drivers/Board/MINIMUS/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_MINIMUS MINIMUS
+ * \defgroup Group_LEDs_MINIMUS MINIMUS
*
* Board specific LED driver header for the Minimus USB (http://www.minimususb.com/).
*
diff --git a/LUFA/Drivers/Board/OLIMEX162/Buttons.h b/LUFA/Drivers/Board/OLIMEX162/Buttons.h
index 322eaa37b..e52dadf14 100644
--- a/LUFA/Drivers/Board/OLIMEX162/Buttons.h
+++ b/LUFA/Drivers/Board/OLIMEX162/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_OLIMEX162 OLIMEX162
+ * \defgroup Group_Buttons_OLIMEX162 OLIMEX162
*
* Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board (http://www.olimex.com/dev/avr-usb-162.html).
*
diff --git a/LUFA/Drivers/Board/OLIMEX162/LEDs.h b/LUFA/Drivers/Board/OLIMEX162/LEDs.h
index 5605096f7..d13418a3c 100644
--- a/LUFA/Drivers/Board/OLIMEX162/LEDs.h
+++ b/LUFA/Drivers/Board/OLIMEX162/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_OLIMEX162 OLIMEX162
+ * \defgroup Group_LEDs_OLIMEX162 OLIMEX162
*
* Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
*
diff --git a/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h b/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h
index 4012e5b68..adaa9cd9a 100644
--- a/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h
+++ b/LUFA/Drivers/Board/RZUSBSTICK/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_RZUSBSTICK RZUSBSTICK
+ * \defgroup Group_LEDs_RZUSBSTICK RZUSBSTICK
*
* Board specific LED driver header for the Atmel RZUSBSTICK.
*
diff --git a/LUFA/Drivers/Board/SPARKFUN8U2/LEDs.h b/LUFA/Drivers/Board/SPARKFUN8U2/LEDs.h
index e3682c760..2a3961edb 100644
--- a/LUFA/Drivers/Board/SPARKFUN8U2/LEDs.h
+++ b/LUFA/Drivers/Board/SPARKFUN8U2/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_SPARKFUN8U2 SPARKFUN8U2
+ * \defgroup Group_LEDs_SPARKFUN8U2 SPARKFUN8U2
*
* Board specific LED driver header for the Sparkfun ATMEGA8U2 breakout board (http://www.sparkfun.com/products/10277).
*
diff --git a/LUFA/Drivers/Board/STK525/AT45DB321C.h b/LUFA/Drivers/Board/STK525/AT45DB321C.h
index ea5c8d254..074fc37df 100644
--- a/LUFA/Drivers/Board/STK525/AT45DB321C.h
+++ b/LUFA/Drivers/Board/STK525/AT45DB321C.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash_STK525
- * @defgroup Group_Dataflash_STK525_AT45DB321C AT45DB321C
+ * \defgroup Group_Dataflash_STK525_AT45DB321C AT45DB321C
*
* Board specific Dataflash commands header for the AT45DB321C as mounted on the Atmel STK525.
*
diff --git a/LUFA/Drivers/Board/STK525/Buttons.h b/LUFA/Drivers/Board/STK525/Buttons.h
index dd9caee39..f18c2a1a8 100644
--- a/LUFA/Drivers/Board/STK525/Buttons.h
+++ b/LUFA/Drivers/Board/STK525/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_STK525 STK525
+ * \defgroup Group_Buttons_STK525 STK525
*
* Board specific Buttons driver header for the Atmel STK525.
*
diff --git a/LUFA/Drivers/Board/STK525/Dataflash.h b/LUFA/Drivers/Board/STK525/Dataflash.h
index 54cdcbde8..ec3246c5e 100644
--- a/LUFA/Drivers/Board/STK525/Dataflash.h
+++ b/LUFA/Drivers/Board/STK525/Dataflash.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash
- * @defgroup Group_Dataflash_STK525 STK525
+ * \defgroup Group_Dataflash_STK525 STK525
*
* Board specific Dataflash driver header for the Atmel STK525.
*
diff --git a/LUFA/Drivers/Board/STK525/Joystick.h b/LUFA/Drivers/Board/STK525/Joystick.h
index d42fd0493..2baedb0b9 100644
--- a/LUFA/Drivers/Board/STK525/Joystick.h
+++ b/LUFA/Drivers/Board/STK525/Joystick.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Joystick
- * @defgroup Group_Joystick_STK525 STK525
+ * \defgroup Group_Joystick_STK525 STK525
*
* Board specific joystick driver header for the Atmel STK525.
*
diff --git a/LUFA/Drivers/Board/STK525/LEDs.h b/LUFA/Drivers/Board/STK525/LEDs.h
index 3aa62100b..cacd3195f 100644
--- a/LUFA/Drivers/Board/STK525/LEDs.h
+++ b/LUFA/Drivers/Board/STK525/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_STK525 STK525
+ * \defgroup Group_LEDs_STK525 STK525
*
* Board specific LED driver header for the Atmel STK525.
*
diff --git a/LUFA/Drivers/Board/STK526/AT45DB642D.h b/LUFA/Drivers/Board/STK526/AT45DB642D.h
index 589613c05..10344d4e9 100644
--- a/LUFA/Drivers/Board/STK526/AT45DB642D.h
+++ b/LUFA/Drivers/Board/STK526/AT45DB642D.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash_STK526
- * @defgroup Group_Dataflash_STK526_AT45DB642D AT45DB642D
+ * \defgroup Group_Dataflash_STK526_AT45DB642D AT45DB642D
*
* Board specific Dataflash commands header for the AT45DB642D as mounted on the Atmel STK526.
*
diff --git a/LUFA/Drivers/Board/STK526/Buttons.h b/LUFA/Drivers/Board/STK526/Buttons.h
index 274869a75..afbb3fab5 100644
--- a/LUFA/Drivers/Board/STK526/Buttons.h
+++ b/LUFA/Drivers/Board/STK526/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_STK526 STK526
+ * \defgroup Group_Buttons_STK526 STK526
*
* Board specific Buttons driver header for the Atmel STK526.
*
diff --git a/LUFA/Drivers/Board/STK526/Dataflash.h b/LUFA/Drivers/Board/STK526/Dataflash.h
index f51073511..b0ceecd64 100644
--- a/LUFA/Drivers/Board/STK526/Dataflash.h
+++ b/LUFA/Drivers/Board/STK526/Dataflash.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash
- * @defgroup Group_Dataflash_STK526 STK526
+ * \defgroup Group_Dataflash_STK526 STK526
*
* Board specific Dataflash driver header for the Atmel STK525.
*
diff --git a/LUFA/Drivers/Board/STK526/Joystick.h b/LUFA/Drivers/Board/STK526/Joystick.h
index 7605a8f20..6d54545e8 100644
--- a/LUFA/Drivers/Board/STK526/Joystick.h
+++ b/LUFA/Drivers/Board/STK526/Joystick.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Joystick
- * @defgroup Group_Joystick_STK526 STK526
+ * \defgroup Group_Joystick_STK526 STK526
*
* Board specific joystick driver header for the Atmel STK526.
*
diff --git a/LUFA/Drivers/Board/STK526/LEDs.h b/LUFA/Drivers/Board/STK526/LEDs.h
index e4b0fca84..3ec9bd394 100644
--- a/LUFA/Drivers/Board/STK526/LEDs.h
+++ b/LUFA/Drivers/Board/STK526/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_STK526 STK526
+ * \defgroup Group_LEDs_STK526 STK526
*
* Board specific LED driver header for the Atmel STK526.
*
diff --git a/LUFA/Drivers/Board/TEENSY/LEDs.h b/LUFA/Drivers/Board/TEENSY/LEDs.h
index 93b56ef52..551cdc2c6 100644
--- a/LUFA/Drivers/Board/TEENSY/LEDs.h
+++ b/LUFA/Drivers/Board/TEENSY/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_TEENSY TEENSY
+ * \defgroup Group_LEDs_TEENSY TEENSY
*
* Board specific LED driver header for the PJRC Teensy boards (http://www.pjrc.com/teensy/index.html).
*
diff --git a/LUFA/Drivers/Board/Temperature.h b/LUFA/Drivers/Board/Temperature.h
index a87327571..f7a2b6d87 100644
--- a/LUFA/Drivers/Board/Temperature.h
+++ b/LUFA/Drivers/Board/Temperature.h
@@ -35,7 +35,7 @@
*/
/** \ingroup Group_BoardDrivers
- * @defgroup Group_Temperature Temperature Sensor Driver - LUFA/Drivers/Board/Temperature.h
+ * \defgroup Group_Temperature Temperature Sensor Driver - LUFA/Drivers/Board/Temperature.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -67,8 +67,6 @@
#define __TEMPERATURE_H__
/* Includes: */
- #include <avr/pgmspace.h>
-
#include "../../Common/Common.h"
#include "../Peripheral/ADC.h"
@@ -77,7 +75,7 @@
#elif ((BOARD != BOARD_USBKEY) && (BOARD != BOARD_STK525) && \
(BOARD != BOARD_STK526) && (BOARD != BOARD_USER) && \
(BOARD != BOARD_EVK527))
- #error The selected board does not contain a temperature sensor.
+ #error The selected board does not contain a compatible temperature sensor.
#endif
/* Enable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/Board/UDIP/Buttons.h b/LUFA/Drivers/Board/UDIP/Buttons.h
index 782235e6c..6a232bd1b 100644
--- a/LUFA/Drivers/Board/UDIP/Buttons.h
+++ b/LUFA/Drivers/Board/UDIP/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_UDIP UDIP
+ * \defgroup Group_Buttons_UDIP UDIP
*
* Board specific Buttons driver header for the Linnix UDIP (http://linnix.com/udip/).
*
diff --git a/LUFA/Drivers/Board/UDIP/LEDs.h b/LUFA/Drivers/Board/UDIP/LEDs.h
index 0001940a6..6f0e56971 100644
--- a/LUFA/Drivers/Board/UDIP/LEDs.h
+++ b/LUFA/Drivers/Board/UDIP/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_UDIP UDIP
+ * \defgroup Group_LEDs_UDIP UDIP
*
* Board specific LED driver header for the Linnix UDIP (http://linnix.com/udip/).
*
diff --git a/LUFA/Drivers/Board/UNO/LEDs.h b/LUFA/Drivers/Board/UNO/LEDs.h
index f21abfc4b..0b5413d90 100644
--- a/LUFA/Drivers/Board/UNO/LEDs.h
+++ b/LUFA/Drivers/Board/UNO/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_UNO UNO
+ * \defgroup Group_LEDs_UNO UNO
*
* Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
*
diff --git a/LUFA/Drivers/Board/USBFOO/Buttons.h b/LUFA/Drivers/Board/USBFOO/Buttons.h
index 87fdd7b88..8f79a92e9 100644
--- a/LUFA/Drivers/Board/USBFOO/Buttons.h
+++ b/LUFA/Drivers/Board/USBFOO/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_USBFOO USBFOO
+ * \defgroup Group_Buttons_USBFOO USBFOO
*
* Board specific Buttons driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
*
diff --git a/LUFA/Drivers/Board/USBFOO/LEDS.h b/LUFA/Drivers/Board/USBFOO/LEDS.h
index 585bcef31..07346e498 100644
--- a/LUFA/Drivers/Board/USBFOO/LEDS.h
+++ b/LUFA/Drivers/Board/USBFOO/LEDS.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_USBFOO USBFOO
+ * \defgroup Group_LEDs_USBFOO USBFOO
*
* Board specific LED driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
*
diff --git a/LUFA/Drivers/Board/USBKEY/AT45DB642D.h b/LUFA/Drivers/Board/USBKEY/AT45DB642D.h
index e60365480..f09a7b533 100644
--- a/LUFA/Drivers/Board/USBKEY/AT45DB642D.h
+++ b/LUFA/Drivers/Board/USBKEY/AT45DB642D.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash_USBKEY
- * @defgroup Group_Dataflash_USBKEY_AT45DB642D AT45DB642D
+ * \defgroup Group_Dataflash_USBKEY_AT45DB642D AT45DB642D
*
* Board specific Dataflash commands header for the AT45DB642D as mounted on the Atmel USBKEY.
*
diff --git a/LUFA/Drivers/Board/USBKEY/Buttons.h b/LUFA/Drivers/Board/USBKEY/Buttons.h
index d9dfd6281..2018cb0c3 100644
--- a/LUFA/Drivers/Board/USBKEY/Buttons.h
+++ b/LUFA/Drivers/Board/USBKEY/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_USBKEY USBKEY
+ * \defgroup Group_Buttons_USBKEY USBKEY
*
* Board specific Buttons driver header for the Atmel USBKEY.
*
diff --git a/LUFA/Drivers/Board/USBKEY/Dataflash.h b/LUFA/Drivers/Board/USBKEY/Dataflash.h
index 69ac90d8c..892cfcfe3 100644
--- a/LUFA/Drivers/Board/USBKEY/Dataflash.h
+++ b/LUFA/Drivers/Board/USBKEY/Dataflash.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash
- * @defgroup Group_Dataflash_USBKEY USBKEY
+ * \defgroup Group_Dataflash_USBKEY USBKEY
*
* Board specific Dataflash driver header for the Atmel USBKEY board.
*
diff --git a/LUFA/Drivers/Board/USBKEY/Joystick.h b/LUFA/Drivers/Board/USBKEY/Joystick.h
index 8c47db965..90cbf7f69 100644
--- a/LUFA/Drivers/Board/USBKEY/Joystick.h
+++ b/LUFA/Drivers/Board/USBKEY/Joystick.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Joystick
- * @defgroup Group_Joystick_USBKEY USBKEY
+ * \defgroup Group_Joystick_USBKEY USBKEY
*
* Board specific joystick driver header for the Atmel USBKEY.
*
diff --git a/LUFA/Drivers/Board/USBKEY/LEDs.h b/LUFA/Drivers/Board/USBKEY/LEDs.h
index 588511bf1..31722319e 100644
--- a/LUFA/Drivers/Board/USBKEY/LEDs.h
+++ b/LUFA/Drivers/Board/USBKEY/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_USBKEY USBKEY
+ * \defgroup Group_LEDs_USBKEY USBKEY
*
* Board specific LED driver header for the Atmel USBKEY.
*
diff --git a/LUFA/Drivers/Board/USBTINYMKII/Buttons.h b/LUFA/Drivers/Board/USBTINYMKII/Buttons.h
index dc2e9a256..b5493ab2d 100644
--- a/LUFA/Drivers/Board/USBTINYMKII/Buttons.h
+++ b/LUFA/Drivers/Board/USBTINYMKII/Buttons.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Buttons
- * @defgroup Group_Buttons_USBTINYMKII USBTINYMKII
+ * \defgroup Group_Buttons_USBTINYMKII USBTINYMKII
*
* Board specific Buttons driver header for Tom's USBTINY MKII (http://tom-itx.dyndns.org:81/~webpage/).
*
diff --git a/LUFA/Drivers/Board/USBTINYMKII/LEDs.h b/LUFA/Drivers/Board/USBTINYMKII/LEDs.h
index c836bd0ff..65f1117e2 100644
--- a/LUFA/Drivers/Board/USBTINYMKII/LEDs.h
+++ b/LUFA/Drivers/Board/USBTINYMKII/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_USBTINYMKII USBTINYMKII
+ * \defgroup Group_LEDs_USBTINYMKII USBTINYMKII
*
* Board specific LED driver header for Tom's USBTINY MKII (http://tom-itx.dyndns.org:81/~webpage/).
*
diff --git a/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h b/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h
index 7aa115794..0fbb380a2 100644
--- a/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h
+++ b/LUFA/Drivers/Board/XPLAIN/AT45DB642D.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash_XPLAIN
- * @defgroup Group_Dataflash_XPLAIN_AT45DB642D AT45DB642D
+ * \defgroup Group_Dataflash_XPLAIN_AT45DB642D AT45DB642D
*
* Board specific Dataflash commands header for the AT45DB642D as mounted on the Atmel XPLAIN.
*
diff --git a/LUFA/Drivers/Board/XPLAIN/Dataflash.h b/LUFA/Drivers/Board/XPLAIN/Dataflash.h
index 6ea43fd32..065145280 100644
--- a/LUFA/Drivers/Board/XPLAIN/Dataflash.h
+++ b/LUFA/Drivers/Board/XPLAIN/Dataflash.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_Dataflash
- * @defgroup Group_Dataflash_XPLAIN XPLAIN
+ * \defgroup Group_Dataflash_XPLAIN XPLAIN
*
* Board specific Dataflash driver header for the Atmel XPLAIN.
*
diff --git a/LUFA/Drivers/Board/XPLAIN/LEDs.h b/LUFA/Drivers/Board/XPLAIN/LEDs.h
index 4be19ef6f..953c77e1a 100644
--- a/LUFA/Drivers/Board/XPLAIN/LEDs.h
+++ b/LUFA/Drivers/Board/XPLAIN/LEDs.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_LEDs
- * @defgroup Group_LEDs_XPLAIN XPLAIN
+ * \defgroup Group_LEDs_XPLAIN XPLAIN
*
* Board specific LED driver header for the Atmel XPLAIN.
*
diff --git a/LUFA/Drivers/Misc/RingBuffer.h b/LUFA/Drivers/Misc/RingBuffer.h
index dd34e99ca..8ca5d2a0a 100644
--- a/LUFA/Drivers/Misc/RingBuffer.h
+++ b/LUFA/Drivers/Misc/RingBuffer.h
@@ -41,7 +41,7 @@
*/
/** \ingroup Group_MiscDrivers
- * @defgroup Group_RingBuff Generic Byte Ring Buffer - LUFA/Drivers/Misc/RingBuffer.h
+ * \defgroup Group_RingBuff Generic Byte Ring Buffer - LUFA/Drivers/Misc/RingBuffer.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/Misc/TerminalCodes.h b/LUFA/Drivers/Misc/TerminalCodes.h
index 6b9d3fbb8..2ab005811 100644
--- a/LUFA/Drivers/Misc/TerminalCodes.h
+++ b/LUFA/Drivers/Misc/TerminalCodes.h
@@ -36,7 +36,7 @@
*/
/** \ingroup Group_MiscDrivers
- * @defgroup Group_Terminal ANSI Terminal Escape Codes - LUFA/Drivers/Misc/TerminalCodes.h
+ * \defgroup Group_Terminal ANSI Terminal Escape Codes - LUFA/Drivers/Misc/TerminalCodes.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/Peripheral/ADC.h b/LUFA/Drivers/Peripheral/ADC.h
index ec58e52da..29e32a83c 100644
--- a/LUFA/Drivers/Peripheral/ADC.h
+++ b/LUFA/Drivers/Peripheral/ADC.h
@@ -31,22 +31,23 @@
/** \file
* \brief Master include file for the ADC peripheral driver.
*
- * This file is the master dispatch header file for the device-specific ADC driver, for AVRs containing an ADC.
+ * This file is the master dispatch header file for the device-specific ADC driver, for microcontrollers
+ * containing an ADC.
*
* User code should include this file, which will in turn include the correct ADC driver header file for the
- * currently selected AVR model.
+ * currently selected architecture and microcontroller model.
*/
/** \ingroup Group_PeripheralDrivers
- * @defgroup Group_ADC ADC Driver - LUFA/Drivers/Peripheral/ADC.h
+ * \defgroup Group_ADC ADC Driver - LUFA/Drivers/Peripheral/ADC.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
* - None
*
* \section Sec_ModDescription Module Description
- * Hardware ADC driver. This module provides an easy to use driver for the hardware
- * ADC present on many AVR models, for the conversion of analogue signals into the
+ * Hardware ADC driver. This module provides an easy to use driver for the hardware ADC
+ * present on many microcontrollers, for the conversion of analogue signals into the
* digital domain.
*
* \note The exact API for this driver may vary depending on the target used - see
@@ -57,18 +58,18 @@
#define __ADC_H__
/* Macros: */
- #if !defined(__DOXYGEN__)
- #define __INCLUDE_FROM_ADC_H
- #endif
+ #if !defined(__DOXYGEN__)
+ #define __INCLUDE_FROM_ADC_H
+ #endif
+
+ /* Includes: */
+ #include "../../Common/Common.h"
/* Includes: */
- #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
- defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
- defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
- defined(__AVR_ATmega32U6__))
- #include "AVRU4U6U7/ADC.h"
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/ADC.h"
#else
- #error "ADC is not available for the currently selected AVR model."
+ #error The ADC peripheral driver is not currently available for your selected architecture.
#endif
#endif
diff --git a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h b/LUFA/Drivers/Peripheral/AVR8/ADC.h
index ddeb53aa3..99f70d14b 100644
--- a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h
+++ b/LUFA/Drivers/Peripheral/AVR8/ADC.h
@@ -29,7 +29,7 @@
*/
/** \file
- * \brief ADC peripheral driver for the U7, U6 and U4 USB AVRs.
+ * \brief ADC Peripheral Driver (AVR8)
*
* On-chip Analogue-to-Digital converter (ADC) driver for supported U4, U6 and U7 model AVRs that contain an ADC
* peripheral internally.
@@ -39,8 +39,9 @@
*/
/** \ingroup Group_ADC
- * @defgroup Group_ADC_AVRU4U6U7 Series U4, U6 and U7 Model ADC Driver
+ * \defgroup Group_ADC_AVR8 ADC Peripheral Driver (AVR8)
*
+ * \section Sec_ModDescription Module Description
* On-chip Analogue-to-Digital converter (ADC) driver for supported U4, U6 and U7 model AVRs that contain an ADC
* peripheral internally.
*
@@ -71,15 +72,12 @@
* @{
*/
-#ifndef __ADC_AVRU4U6U7_H__
-#define __ADC_AVRU4U6U7_H__
+#ifndef __ADC_AVR8_H__
+#define __ADC_AVR8_H__
/* Includes: */
#include "../../../Common/Common.h"
- #include <avr/io.h>
- #include <stdbool.h>
-
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
@@ -90,6 +88,13 @@
#error Do not include this file directly. Include LUFA/Drivers/Peripheral/ADC.h instead.
#endif
+ #if !(defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
+ defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
+ defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
+ defined(__AVR_ATmega32U6__))
+ #error The ADC peripheral driver is not currently available for your selected microcontroller model.
+ #endif
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
diff --git a/LUFA/Drivers/Peripheral/AVR8/SPI.h b/LUFA/Drivers/Peripheral/AVR8/SPI.h
new file mode 100644
index 000000000..d800fca1a
--- /dev/null
+++ b/LUFA/Drivers/Peripheral/AVR8/SPI.h
@@ -0,0 +1,239 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ Permission to use, copy, modify, distribute, and sell this
+ software and its documentation for any purpose is hereby granted
+ without fee, provided that the above copyright notice appear in
+ all copies and that both that the copyright notice and this
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief SPI Peripheral Driver (AVR8)
+ *
+ * On-chip SPI driver for the 8-bit AVR microcontrollers.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the SPI driver
+ * dispatch header located in LUFA/Drivers/Peripheral/SPI.h.
+ */
+
+/** \ingroup Group_SPI
+ * \defgroup Group_SPI_AVR8 SPI Peripheral Driver (AVR8)
+ *
+ * \section Sec_ModDescription Module Description
+ * Driver for the hardware SPI port available on most 8-bit AVR microcontroller models. This
+ * module provides an easy to use driver for the setup and transfer of data over the
+ * AVR's SPI port.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the SPI driver
+ * dispatch header located in LUFA/Drivers/Peripheral/SPI.h.
+ *
+ * \section Sec_ExampleUsage Example Usage
+ * The following snippet is an example of how this module may be used within a typical
+ * application.
+ *
+ * \code
+ * // Initialise the SPI driver before first use
+ * SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING |
+ * SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
+ *
+ * // Send several bytes, ignoring the returned data
+ * SPI_SendByte(0x01);
+ * SPI_SendByte(0x02);
+ * SPI_SendByte(0x03);
+ *
+ * // Receive several bytes, sending a dummy 0x00 byte each time
+ * uint8_t Byte1 = SPI_ReceiveByte();
+ * uint8_t Byte2 = SPI_ReceiveByte();
+ * uint8_t Byte3 = SPI_ReceiveByte();
+ *
+ * // Send a byte, and store the received byte from the same transaction
+ * uint8_t ResponseByte = SPI_TransferByte(0xDC);
+ * \endcode
+ *
+ * @{
+ */
+
+#ifndef __SPI_AVR8_H__
+#define __SPI_AVR8_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_SPI_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Peripheral/SPI.h instead.
+ #endif
+
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
+ /* Macros: */
+ #define SPI_USE_DOUBLESPEED (1 << SPE)
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** \name SPI Prescaler Configuration Masks */
+ //@{
+ /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 2. */
+ #define SPI_SPEED_FCPU_DIV_2 SPI_USE_DOUBLESPEED
+
+ /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 4. */
+ #define SPI_SPEED_FCPU_DIV_4 0
+
+ /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 8. */
+ #define SPI_SPEED_FCPU_DIV_8 (SPI_USE_DOUBLESPEED | (1 << SPR0))
+
+ /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 16. */
+ #define SPI_SPEED_FCPU_DIV_16 (1 << SPR0)
+
+ /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 32. */
+ #define SPI_SPEED_FCPU_DIV_32 (SPI_USE_DOUBLESPEED | (1 << SPR1))
+
+ /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 64. */
+ #define SPI_SPEED_FCPU_DIV_64 (SPI_USE_DOUBLESPEED | (1 << SPR1) | (1 << SPR0))
+
+ /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 128. */
+ #define SPI_SPEED_FCPU_DIV_128 ((1 << SPR1) | (1 << SPR0))
+ //@}
+
+ /** \name SPI SCK Polarity Configuration Masks */
+ //@{
+ /** SPI clock polarity mask for \c SPI_Init(). Indicates that the SCK should lead on the rising edge. */
+ #define SPI_SCK_LEAD_RISING (0 << CPOL)
+
+ /** SPI clock polarity mask for \c SPI_Init(). Indicates that the SCK should lead on the falling edge. */
+ #define SPI_SCK_LEAD_FALLING (1 << CPOL)
+ //@}
+
+ /** \name SPI Sample Edge Configuration Masks */
+ //@{
+ /** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should sampled on the leading edge. */
+ #define SPI_SAMPLE_LEADING (0 << CPHA)
+
+ /** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should be sampled on the trailing edge. */
+ #define SPI_SAMPLE_TRAILING (1 << CPHA)
+ //@}
+
+ /** \name SPI Data Ordering Configuration Masks */
+ //@{
+ /** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
+ #define SPI_ORDER_MSB_FIRST (0 << DORD)
+
+ /** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
+ #define SPI_ORDER_LSB_FIRST (1 << DORD)
+ //@}
+
+ /** \name SPI Mode Configuration Masks */
+ //@{
+ /** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into slave mode. */
+ #define SPI_MODE_SLAVE (0 << MSTR)
+
+ /** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into master mode. */
+ #define SPI_MODE_MASTER (1 << MSTR)
+ //@}
+
+ /* Inline Functions: */
+ /** Initialises the SPI subsystem, ready for transfers. Must be called before calling any other
+ * SPI routines.
+ *
+ * \param[in] SPIOptions SPI Options, a mask consisting of one of each of the \c SPI_SPEED_*,
+ * \c SPI_SCK_*, \c SPI_SAMPLE_*, \c SPI_ORDER_* and \c SPI_MODE_* masks.
+ */
+ static inline void SPI_Init(const uint8_t SPIOptions)
+ {
+ DDRB |= ((1 << 1) | (1 << 2));
+ DDRB &= ~((1 << 0) | (1 << 3));
+ PORTB |= ((1 << 0) | (1 << 3));
+
+ SPCR = ((1 << SPE) | SPIOptions);
+
+ if (SPIOptions & SPI_USE_DOUBLESPEED)
+ SPSR |= (1 << SPI2X);
+ else
+ SPSR &= ~(1 << SPI2X);
+ }
+
+ /** Turns off the SPI driver, disabling and returning used hardware to their default configuration. */
+ static inline void SPI_Disable(void)
+ {
+ DDRB &= ~((1 << 1) | (1 << 2));
+ PORTB &= ~((1 << 0) | (1 << 3));
+
+ SPCR = 0;
+ SPSR = 0;
+ }
+
+ /** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
+ *
+ * \param[in] Byte Byte to send through the SPI interface.
+ *
+ * \return Response byte from the attached SPI device.
+ */
+ static inline uint8_t SPI_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
+ static inline uint8_t SPI_TransferByte(const uint8_t Byte)
+ {
+ SPDR = Byte;
+ while (!(SPSR & (1 << SPIF)));
+ return SPDR;
+ }
+
+ /** Sends a byte through the SPI interface, blocking until the transfer is complete. The response
+ * byte sent to from the attached SPI device is ignored.
+ *
+ * \param[in] Byte Byte to send through the SPI interface.
+ */
+ static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
+ static inline void SPI_SendByte(const uint8_t Byte)
+ {
+ SPDR = Byte;
+ while (!(SPSR & (1 << SPIF)));
+ }
+
+ /** Sends a dummy byte through the SPI interface, blocking until the transfer is complete. The response
+ * byte from the attached SPI device is returned.
+ *
+ * \return The response byte from the attached SPI device.
+ */
+ static inline uint8_t SPI_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t SPI_ReceiveByte(void)
+ {
+ SPDR = 0x00;
+ while (!(SPSR & (1 << SPIF)));
+ return SPDR;
+ }
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/Peripheral/Serial.c b/LUFA/Drivers/Peripheral/AVR8/Serial.c
index 99af2000c..3a8312d85 100644
--- a/LUFA/Drivers/Peripheral/Serial.c
+++ b/LUFA/Drivers/Peripheral/AVR8/Serial.c
@@ -28,6 +28,7 @@
this software.
*/
+#define __INCLUDE_FROM_SERIAL_C
#include "Serial.h"
FILE USARTSerialStream;
diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial.h b/LUFA/Drivers/Peripheral/AVR8/Serial.h
new file mode 100644
index 000000000..bb9ba856e
--- /dev/null
+++ b/LUFA/Drivers/Peripheral/AVR8/Serial.h
@@ -0,0 +1,251 @@
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ Permission to use, copy, modify, distribute, and sell this
+ software and its documentation for any purpose is hereby granted
+ without fee, provided that the above copyright notice appear in
+ all copies and that both that the copyright notice and this
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ * \brief Serial USART Peripheral Driver (AVR8)
+ *
+ * On-chip serial USART driver for the 8-bit AVR microcontrollers.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the USART driver
+ * dispatch header located in LUFA/Drivers/Peripheral/Serial.h.
+ */
+
+/** \ingroup Group_Serial
+ * \defgroup Group_Serial_AVR8 Serial USART Peripheral Driver (AVR8)
+ *
+ * \section Sec_ModDescription Module Description
+ * On-chip serial USART driver for the 8-bit AVR microcontrollers.
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the ADC driver
+ * dispatch header located in LUFA/Drivers/Peripheral/Serial.h.
+ *
+ * \section Sec_ExampleUsage Example Usage
+ * The following snippet is an example of how this module may be used within a typical
+ * application.
+ *
+ * \code
+ * // Initialise the serial USART driver before first use, with 9600 baud (and no double-speed mode)
+ * Serial_Init(9600, false);
+ *
+ * // Send a string through the USART
+ * Serial_TxString("Test String\r\n");
+ *
+ * // Receive a byte through the USART
+ * uint8_t DataByte = Serial_RxByte();
+ * \endcode
+ *
+ * @{
+ */
+
+#ifndef __SERIAL_AVR8_H__
+#define __SERIAL_AVR8_H__
+
+ /* Includes: */
+ #include "../../../Common/Common.h"
+ #include "../../Misc/TerminalCodes.h"
+
+ #include <stdio.h>
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_SERIAL_H) && !defined(__INCLUDE_FROM_SERIAL_C)
+ #error Do not include this file directly. Include LUFA/Drivers/Peripheral/Serial.h instead.
+ #endif
+
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
+ /* External Variables: */
+ extern FILE USARTSerialStream;
+
+ /* Function Prototypes: */
+ int Serial_putchar(char DataByte,
+ FILE *Stream);
+ int Serial_getchar(FILE *Stream);
+ int Serial_getchar_Blocking(FILE *Stream);
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
+ * not set.
+ */
+ #define SERIAL_UBBRVAL(baud) ((((F_CPU / 16) + (baud / 2)) / (baud)) - 1)
+
+ /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
+ * set.
+ */
+ #define SERIAL_2X_UBBRVAL(baud) ((((F_CPU / 8) + (baud / 2)) / (baud)) - 1)
+
+ /* Function Prototypes: */
+ /** Transmits a given string located in program space (FLASH) through the USART.
+ *
+ * \param[in] FlashStringPtr Pointer to a string located in program space.
+ */
+ void Serial_SendString_P(const char* FlashStringPtr) ATTR_NON_NULL_PTR_ARG(1);
+
+ /** Transmits a given string located in SRAM memory through the USART.
+ *
+ * \param[in] StringPtr Pointer to a string located in SRAM space.
+ */
+ void Serial_SendString(const char* StringPtr) ATTR_NON_NULL_PTR_ARG(1);
+
+ /** Transmits a given buffer located in SRAM memory through the USART.
+ *
+ * \param[in] Buffer Pointer to a buffer containing the data to send.
+ * \param[in] Length Length of the data to send, in bytes.
+ */
+ void Serial_SendData(const uint8_t* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+
+ /* Inline Functions: */
+ /** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to
+ * standard 8-bit, no parity, 1 stop bit settings suitable for most applications.
+ *
+ * \param[in] BaudRate Serial baud rate, in bits per second.
+ * \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate.
+ */
+ static inline void Serial_Init(const uint32_t BaudRate,
+ const bool DoubleSpeed)
+ {
+ UBRR1 = (DoubleSpeed ? SERIAL_2X_UBBRVAL(BaudRate) : SERIAL_UBBRVAL(BaudRate));
+
+ UCSR1C = ((1 << UCSZ11) | (1 << UCSZ10));
+ UCSR1A = (DoubleSpeed ? (1 << U2X1) : 0);
+ UCSR1B = ((1 << TXEN1) | (1 << RXEN1));
+
+ DDRD |= (1 << 3);
+ PORTD |= (1 << 2);
+ }
+
+ /** Turns off the USART driver, disabling and returning used hardware to their default configuration. */
+ static inline void Serial_Disable(void)
+ {
+ UCSR1B = 0;
+ UCSR1A = 0;
+ UCSR1C = 0;
+
+ UBRR1 = 0;
+
+ DDRD &= ~(1 << 3);
+ PORTD &= ~(1 << 2);
+ }
+
+ /** Creates a standard character stream from the USART so that it can be used with all the regular functions
+ * in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
+ * stream is bidirectional and can be used for both input and output functions.
+ *
+ * Reading data from this stream is non-blocking, i.e. in most instances, complete strings cannot be read in by a single
+ * fetch, as the endpoint will not be ready at some point in the transmission, aborting the transfer. However, this may
+ * be used when the read data is processed byte-per-bye (via \c getc()) or when the user application will implement its own
+ * line buffering.
+ *
+ * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed, if \c NULL stdio
+ * and stdin will be configured to use the USART.
+ *
+ * \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
+ */
+ static inline void Serial_CreateStream(FILE* Stream)
+ {
+ if (!(Stream))
+ {
+ Stream = &USARTSerialStream;
+ stdin = Stream;
+ stdout = Stream;
+ }
+
+ *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar, _FDEV_SETUP_RW);
+ }
+
+ /** Identical to \ref Serial_CreateStream(), except that reads are blocking until the calling stream function terminates
+ * the transfer.
+ *
+ * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed, if \c NULL stdio
+ * and stdin will be configured to use the USART.
+ *
+ * \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
+ */
+ static inline void Serial_CreateBlockingStream(FILE* Stream)
+ {
+ if (!(Stream))
+ {
+ Stream = &USARTSerialStream;
+ stdin = Stream;
+ stdout = Stream;
+ }
+
+ *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar_Blocking, _FDEV_SETUP_RW);
+ }
+
+ /** Indicates whether a character has been received through the USART.
+ *
+ * \return Boolean \c true if a character has been received, \c false otherwise.
+ */
+ static inline bool Serial_IsCharReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline bool Serial_IsCharReceived(void)
+ {
+ return ((UCSR1A & (1 << RXC1)) ? true : false);
+ }
+
+ /** Transmits a given byte through the USART.
+ *
+ * \param[in] DataByte Byte to transmit through the USART.
+ */
+ static inline void Serial_SendByte(const char DataByte) ATTR_ALWAYS_INLINE;
+ static inline void Serial_SendByte(const char DataByte)
+ {
+ while (!(UCSR1A & (1 << UDRE1)));
+ UDR1 = DataByte;
+ }
+
+ /** Receives the next byte from the USART.
+ *
+ * \return Next byte received from the USART, or a negative value if no byte has been received.
+ */
+ static inline int16_t Serial_ReceiveByte(void) ATTR_ALWAYS_INLINE;
+ static inline int16_t Serial_ReceiveByte(void)
+ {
+ if (!(Serial_IsCharReceived()))
+ return -1;
+
+ return UDR1;
+ }
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
+/** @} */
+
diff --git a/LUFA/Drivers/Peripheral/TWI.c b/LUFA/Drivers/Peripheral/AVR8/TWI.c
index 2f4e4ed42..b5f258dd3 100644
--- a/LUFA/Drivers/Peripheral/TWI.c
+++ b/LUFA/Drivers/Peripheral/AVR8/TWI.c
@@ -5,6 +5,7 @@
www.lufa-lib.org
*/
+#define __INCLUDE_FROM_TWI_C
#include "TWI.h"
uint8_t TWI_StartTransmission(const uint8_t SlaveAddress,
diff --git a/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h b/LUFA/Drivers/Peripheral/AVR8/TWI.h
index c8293f5ac..e03423385 100644
--- a/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h
+++ b/LUFA/Drivers/Peripheral/AVR8/TWI.h
@@ -29,18 +29,19 @@
*/
/** \file
- * \brief TWI peripheral driver for the U7, U6 and U4 USB AVRs.
+ * \brief TWI Peripheral Driver (AVR8)
*
- * Master mode TWI driver for the AT90USB1287, AT90USB1286, AT90USB647, AT90USB646, ATMEGA16U4 and ATMEGA32U4 AVRs.
+ * On-chip TWI driver for the 8-bit AVR microcontrollers.
*
* \note This file should not be included directly. It is automatically included as needed by the TWI driver
* dispatch header located in LUFA/Drivers/Peripheral/TWI.h.
*/
/** \ingroup Group_TWI
- * @defgroup Group_TWI_AVRU4U6U7 Series U4, U6 and U7 Model TWI Driver
+ * \defgroup Group_TWI_AVR8 TWI Peripheral Driver (AVR8)
*
- * Master mode TWI driver for the AT90USB1287, AT90USB1286, AT90USB647, AT90USB646, ATMEGA16U4 and ATMEGA32U4 AVRs.
+ * \section Sec_ModDescription Module Description
+ * Master mode TWI driver for the 8-bit AVR microcontrollers which contain a hardware TWI module.
*
* \note This file should not be included directly. It is automatically included as needed by the TWI driver
* dispatch header located in LUFA/Drivers/Peripheral/TWI.h.
@@ -111,17 +112,14 @@
* @{
*/
-#ifndef __TWI_AVRU4U6U7_H__
-#define __TWI_AVRU4U6U7_H__
+#ifndef __TWI_AVR8_H__
+#define __TWI_AVR8_H__
/* Includes: */
#include "../../../Common/Common.h"
- #include <avr/io.h>
- #include <stdbool.h>
#include <stdio.h>
#include <util/twi.h>
- #include <util/delay.h>
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
@@ -129,10 +127,17 @@
#endif
/* Preprocessor Checks: */
- #if !defined(__INCLUDE_FROM_TWI_H)
+ #if !defined(__INCLUDE_FROM_TWI_H) && !defined(__INCLUDE_FROM_TWI_C)
#error Do not include this file directly. Include LUFA/Drivers/Peripheral/TWI.h instead.
#endif
+ #if !(defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
+ defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
+ defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
+ defined(__AVR_ATmega32U6__))
+ #error The TWI peripheral driver is not currently available for your selected microcontroller model.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** TWI slave device address mask for a read session. Mask with a slave device base address to obtain
diff --git a/LUFA/Drivers/Peripheral/SPI.h b/LUFA/Drivers/Peripheral/SPI.h
index 0b8b17e1d..9b967e0cd 100644
--- a/LUFA/Drivers/Peripheral/SPI.h
+++ b/LUFA/Drivers/Peripheral/SPI.h
@@ -31,201 +31,44 @@
/** \file
* \brief Master include file for the SPI peripheral driver.
*
- * Hardware SPI subsystem driver for the supported USB AVRs models.
+ * This file is the master dispatch header file for the device-specific SPI driver, for microcontrollers
+ * containing a hardware SPI.
+ *
+ * User code should include this file, which will in turn include the correct SPI driver header file for the
+ * currently selected architecture and microcontroller model.
*/
/** \ingroup Group_PeripheralDrivers
- * @defgroup Group_SPI SPI Driver - LUFA/Drivers/Peripheral/SPI.h
+ * \defgroup Group_SPI SPI Driver - LUFA/Drivers/Peripheral/SPI.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
* - None
*
* \section Sec_ModDescription Module Description
- * Driver for the hardware SPI port available on most AVR models. This module provides
- * an easy to use driver for the setup of and transfer of data over the AVR's SPI port.
- *
- * \section Sec_ExampleUsage Example Usage
- * The following snippet is an example of how this module may be used within a typical
- * application.
- *
- * \code
- * // Initialise the SPI driver before first use
- * SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING |
- * SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
- *
- * // Send several bytes, ignoring the returned data
- * SPI_SendByte(0x01);
- * SPI_SendByte(0x02);
- * SPI_SendByte(0x03);
+ * Hardware SPI driver. This module provides an easy to use driver for the setup and transfer of data over
+ * the selected architecture and microcontroller model's SPI port.
*
- * // Receive several bytes, sending a dummy 0x00 byte each time
- * uint8_t Byte1 = SPI_ReceiveByte();
- * uint8_t Byte2 = SPI_ReceiveByte();
- * uint8_t Byte3 = SPI_ReceiveByte();
- *
- * // Send a byte, and store the received byte from the same transaction
- * uint8_t ResponseByte = SPI_TransferByte(0xDC);
- * \endcode
- *
- * @{
+ * \note The exact API for this driver may vary depending on the target used - see
+ * individual target module documentation for the API specific to your target processor.
*/
#ifndef __SPI_H__
#define __SPI_H__
- /* Includes: */
- #include <stdbool.h>
-
- /* Enable C linkage for C++ Compilers: */
- #if defined(__cplusplus)
- extern "C" {
+ /* Macros: */
+ #if !defined(__DOXYGEN__)
+ #define __INCLUDE_FROM_SPI_H
#endif
- /* Private Interface - For use in library only: */
- #if !defined(__DOXYGEN__)
- /* Macros: */
- #define SPI_USE_DOUBLESPEED (1 << SPE)
- #endif
-
- /* Public Interface - May be used in end-application: */
- /* Macros: */
- /** \name SPI Prescaler Configuration Masks */
- //@{
- /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 2. */
- #define SPI_SPEED_FCPU_DIV_2 SPI_USE_DOUBLESPEED
-
- /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 4. */
- #define SPI_SPEED_FCPU_DIV_4 0
-
- /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 8. */
- #define SPI_SPEED_FCPU_DIV_8 (SPI_USE_DOUBLESPEED | (1 << SPR0))
-
- /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 16. */
- #define SPI_SPEED_FCPU_DIV_16 (1 << SPR0)
-
- /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 32. */
- #define SPI_SPEED_FCPU_DIV_32 (SPI_USE_DOUBLESPEED | (1 << SPR1))
-
- /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 64. */
- #define SPI_SPEED_FCPU_DIV_64 (SPI_USE_DOUBLESPEED | (1 << SPR1) | (1 << SPR0))
-
- /** SPI prescaler mask for \c SPI_Init(). Divides the system clock by a factor of 128. */
- #define SPI_SPEED_FCPU_DIV_128 ((1 << SPR1) | (1 << SPR0))
- //@}
-
- /** \name SPI SCK Polarity Configuration Masks */
- //@{
- /** SPI clock polarity mask for \c SPI_Init(). Indicates that the SCK should lead on the rising edge. */
- #define SPI_SCK_LEAD_RISING (0 << CPOL)
-
- /** SPI clock polarity mask for \c SPI_Init(). Indicates that the SCK should lead on the falling edge. */
- #define SPI_SCK_LEAD_FALLING (1 << CPOL)
- //@}
-
- /** \name SPI Sample Edge Configuration Masks */
- //@{
- /** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should sampled on the leading edge. */
- #define SPI_SAMPLE_LEADING (0 << CPHA)
-
- /** SPI data sample mode mask for \c SPI_Init(). Indicates that the data should be sampled on the trailing edge. */
- #define SPI_SAMPLE_TRAILING (1 << CPHA)
- //@}
-
- /** \name SPI Data Ordering Configuration Masks */
- //@{
- /** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
- #define SPI_ORDER_MSB_FIRST (0 << DORD)
-
- /** SPI data order mask for \c SPI_Init(). Indicates that data should be shifted out MSB first. */
- #define SPI_ORDER_LSB_FIRST (1 << DORD)
- //@}
-
- /** \name SPI Mode Configuration Masks */
- //@{
- /** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into slave mode. */
- #define SPI_MODE_SLAVE (0 << MSTR)
-
- /** SPI mode mask for \c SPI_Init(). Indicates that the SPI interface should be initialized into master mode. */
- #define SPI_MODE_MASTER (1 << MSTR)
- //@}
-
- /* Inline Functions: */
- /** Initialises the SPI subsystem, ready for transfers. Must be called before calling any other
- * SPI routines.
- *
- * \param[in] SPIOptions SPI Options, a mask consisting of one of each of the \c SPI_SPEED_*,
- * \c SPI_SCK_*, \c SPI_SAMPLE_*, \c SPI_ORDER_* and \c SPI_MODE_* masks.
- */
- static inline void SPI_Init(const uint8_t SPIOptions)
- {
- DDRB |= ((1 << 1) | (1 << 2));
- DDRB &= ~((1 << 0) | (1 << 3));
- PORTB |= ((1 << 0) | (1 << 3));
-
- SPCR = ((1 << SPE) | SPIOptions);
-
- if (SPIOptions & SPI_USE_DOUBLESPEED)
- SPSR |= (1 << SPI2X);
- else
- SPSR &= ~(1 << SPI2X);
- }
-
- /** Turns off the SPI driver, disabling and returning used hardware to their default configuration. */
- static inline void SPI_Disable(void)
- {
- DDRB &= ~((1 << 1) | (1 << 2));
- PORTB &= ~((1 << 0) | (1 << 3));
-
- SPCR = 0;
- SPSR = 0;
- }
-
- /** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.
- *
- * \param[in] Byte Byte to send through the SPI interface.
- *
- * \return Response byte from the attached SPI device.
- */
- static inline uint8_t SPI_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
- static inline uint8_t SPI_TransferByte(const uint8_t Byte)
- {
- SPDR = Byte;
- while (!(SPSR & (1 << SPIF)));
- return SPDR;
- }
-
- /** Sends a byte through the SPI interface, blocking until the transfer is complete. The response
- * byte sent to from the attached SPI device is ignored.
- *
- * \param[in] Byte Byte to send through the SPI interface.
- */
- static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
- static inline void SPI_SendByte(const uint8_t Byte)
- {
- SPDR = Byte;
- while (!(SPSR & (1 << SPIF)));
- }
-
- /** Sends a dummy byte through the SPI interface, blocking until the transfer is complete. The response
- * byte from the attached SPI device is returned.
- *
- * \return The response byte from the attached SPI device.
- */
- static inline uint8_t SPI_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
- static inline uint8_t SPI_ReceiveByte(void)
- {
- SPDR = 0x00;
- while (!(SPSR & (1 << SPIF)));
- return SPDR;
- }
+ /* Includes: */
+ #include "../../Common/Common.h"
- /* Disable C linkage for C++ Compilers: */
- #if defined(__cplusplus)
- }
+ /* Includes: */
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/SPI.h"
+ #else
+ #error The SPI peripheral driver is not currently available for your selected architecture.
#endif
#endif
-
-/** @} */
-
diff --git a/LUFA/Drivers/Peripheral/Serial.h b/LUFA/Drivers/Peripheral/Serial.h
index e7c2fa065..0c6cd86bf 100644
--- a/LUFA/Drivers/Peripheral/Serial.h
+++ b/LUFA/Drivers/Peripheral/Serial.h
@@ -31,218 +31,44 @@
/** \file
* \brief Master include file for the USART peripheral driver.
*
- * Driver for the USART subsystem on supported USB AVRs.
+ * This file is the master dispatch header file for the device-specific USART driver, for microcontrollers
+ * containing a hardware USART.
+ *
+ * User code should include this file, which will in turn include the correct ADC driver header file for the
+ * currently selected architecture and microcontroller model.
*/
/** \ingroup Group_PeripheralDrivers
- * @defgroup Group_Serial Serial USART Driver - LUFA/Drivers/Peripheral/Serial.h
+ * \defgroup Group_Serial Serial USART Driver - LUFA/Drivers/Peripheral/Serial.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
- * - LUFA/Drivers/Peripheral/Serial.c <i>(Makefile source module name: LUFA_SRC_SERIAL)</i>
+ * - LUFA/Drivers/Peripheral/$(ARCH)/Serial.c <i>(Makefile source module name: LUFA_SRC_SERIAL)</i>
*
* \section Sec_ModDescription Module Description
- * Hardware serial USART driver. This module provides an easy to use driver for
- * the setup of and transfer of data over the AVR's USART port.
- *
- * \section Sec_ExampleUsage Example Usage
- * The following snippet is an example of how this module may be used within a typical
- * application.
- *
- * \code
- * // Initialise the serial USART driver before first use, with 9600 baud (and no double-speed mode)
- * Serial_Init(9600, false);
- *
- * // Send a string through the USART
- * Serial_TxString("Test String\r\n");
+ * Hardware serial USART driver. This module provides an easy to use driver for the setup and transfer
+ * of data over the selected architecture and microcontroller model's USART port.
*
- * // Receive a byte through the USART
- * uint8_t DataByte = Serial_RxByte();
- * \endcode
- *
- * @{
+ * \note The exact API for this driver may vary depending on the target used - see
+ * individual target module documentation for the API specific to your target processor.
*/
#ifndef __SERIAL_H__
#define __SERIAL_H__
- /* Includes: */
- #include <avr/io.h>
- #include <avr/pgmspace.h>
- #include <stdbool.h>
- #include <stdio.h>
-
- #include "../../Common/Common.h"
- #include "../Misc/TerminalCodes.h"
-
- /* Enable C linkage for C++ Compilers: */
- #if defined(__cplusplus)
- extern "C" {
+ /* Macros: */
+ #if !defined(__DOXYGEN__)
+ #define __INCLUDE_FROM_SERIAL_H
#endif
- /* Private Interface - For use in library only: */
- #if !defined(__DOXYGEN__)
- /* External Variables: */
- extern FILE USARTSerialStream;
-
- /* Function Prototypes: */
- int Serial_putchar(char DataByte,
- FILE *Stream);
- int Serial_getchar(FILE *Stream);
- int Serial_getchar_Blocking(FILE *Stream);
- #endif
-
- /* Public Interface - May be used in end-application: */
- /* Macros: */
- /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
- * not set.
- */
- #define SERIAL_UBBRVAL(baud) ((((F_CPU / 16) + (baud / 2)) / (baud)) - 1)
-
- /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
- * set.
- */
- #define SERIAL_2X_UBBRVAL(baud) ((((F_CPU / 8) + (baud / 2)) / (baud)) - 1)
-
- /* Function Prototypes: */
- /** Transmits a given string located in program space (FLASH) through the USART.
- *
- * \param[in] FlashStringPtr Pointer to a string located in program space.
- */
- void Serial_SendString_P(const char* FlashStringPtr) ATTR_NON_NULL_PTR_ARG(1);
-
- /** Transmits a given string located in SRAM memory through the USART.
- *
- * \param[in] StringPtr Pointer to a string located in SRAM space.
- */
- void Serial_SendString(const char* StringPtr) ATTR_NON_NULL_PTR_ARG(1);
-
- /** Transmits a given buffer located in SRAM memory through the USART.
- *
- * \param[in] Buffer Pointer to a buffer containing the data to send.
- * \param[in] Length Length of the data to send, in bytes.
- */
- void Serial_SendData(const uint8_t* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
-
- /* Inline Functions: */
- /** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to
- * standard 8-bit, no parity, 1 stop bit settings suitable for most applications.
- *
- * \param[in] BaudRate Serial baud rate, in bits per second.
- * \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate.
- */
- static inline void Serial_Init(const uint32_t BaudRate,
- const bool DoubleSpeed)
- {
- UBRR1 = (DoubleSpeed ? SERIAL_2X_UBBRVAL(BaudRate) : SERIAL_UBBRVAL(BaudRate));
-
- UCSR1C = ((1 << UCSZ11) | (1 << UCSZ10));
- UCSR1A = (DoubleSpeed ? (1 << U2X1) : 0);
- UCSR1B = ((1 << TXEN1) | (1 << RXEN1));
-
- DDRD |= (1 << 3);
- PORTD |= (1 << 2);
- }
-
- /** Turns off the USART driver, disabling and returning used hardware to their default configuration. */
- static inline void Serial_Disable(void)
- {
- UCSR1B = 0;
- UCSR1A = 0;
- UCSR1C = 0;
-
- UBRR1 = 0;
-
- DDRD &= ~(1 << 3);
- PORTD &= ~(1 << 2);
- }
-
- /** Creates a standard character stream from the USART so that it can be used with all the regular functions
- * in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
- * stream is bidirectional and can be used for both input and output functions.
- *
- * Reading data from this stream is non-blocking, i.e. in most instances, complete strings cannot be read in by a single
- * fetch, as the endpoint will not be ready at some point in the transmission, aborting the transfer. However, this may
- * be used when the read data is processed byte-per-bye (via \c getc()) or when the user application will implement its own
- * line buffering.
- *
- * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed, if \c NULL stdio
- * and stdin will be configured to use the USART.
- *
- * \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
- */
- static inline void Serial_CreateStream(FILE* Stream)
- {
- if (!(Stream))
- {
- Stream = &USARTSerialStream;
- stdin = Stream;
- stdout = Stream;
- }
-
- *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar, _FDEV_SETUP_RW);
- }
-
- /** Identical to \ref Serial_CreateStream(), except that reads are blocking until the calling stream function terminates
- * the transfer.
- *
- * \param[in,out] Stream Pointer to a FILE structure where the created stream should be placed, if \c NULL stdio
- * and stdin will be configured to use the USART.
- *
- * \pre The USART must first be configured via a call to \ref Serial_Init() before the stream is used.
- */
- static inline void Serial_CreateBlockingStream(FILE* Stream)
- {
- if (!(Stream))
- {
- Stream = &USARTSerialStream;
- stdin = Stream;
- stdout = Stream;
- }
-
- *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar_Blocking, _FDEV_SETUP_RW);
- }
-
- /** Indicates whether a character has been received through the USART.
- *
- * \return Boolean \c true if a character has been received, \c false otherwise.
- */
- static inline bool Serial_IsCharReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline bool Serial_IsCharReceived(void)
- {
- return ((UCSR1A & (1 << RXC1)) ? true : false);
- }
-
- /** Transmits a given byte through the USART.
- *
- * \param[in] DataByte Byte to transmit through the USART.
- */
- static inline void Serial_SendByte(const char DataByte) ATTR_ALWAYS_INLINE;
- static inline void Serial_SendByte(const char DataByte)
- {
- while (!(UCSR1A & (1 << UDRE1)));
- UDR1 = DataByte;
- }
-
- /** Receives the next byte from the USART.
- *
- * \return Next byte received from the USART, or a negative value if no byte has been received.
- */
- static inline int16_t Serial_ReceiveByte(void) ATTR_ALWAYS_INLINE;
- static inline int16_t Serial_ReceiveByte(void)
- {
- if (!(Serial_IsCharReceived()))
- return -1;
-
- return UDR1;
- }
+ /* Includes: */
+ #include "../../Common/Common.h"
- /* Disable C linkage for C++ Compilers: */
- #if defined(__cplusplus)
- }
+ /* Includes: */
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/Serial.h"
+ #else
+ #error The Serial peripheral driver is not currently available for your selected architecture.
#endif
#endif
-
-/** @} */
-
diff --git a/LUFA/Drivers/Peripheral/TWI.h b/LUFA/Drivers/Peripheral/TWI.h
index 6e68bde0e..e7eb850e3 100644
--- a/LUFA/Drivers/Peripheral/TWI.h
+++ b/LUFA/Drivers/Peripheral/TWI.h
@@ -31,23 +31,23 @@
/** \file
* \brief Master include file for the TWI peripheral driver.
*
- * This file is the master dispatch header file for the device-specific ADC driver, for AVRs containing an ADC.
+ * This file is the master dispatch header file for the device-specific SPI driver, for microcontrollers
+ * containing a hardware TWI.
*
- * User code should include this file, which will in turn include the correct ADC driver header file for the
- * currently selected AVR model.
+ * User code should include this file, which will in turn include the correct TWI driver header file for the
+ * currently selected architecture and microcontroller model.
*/
/** \ingroup Group_PeripheralDrivers
- * @defgroup Group_TWI TWI Driver - LUFA/Drivers/Peripheral/TWI.h
+ * \defgroup Group_TWI TWI Driver - LUFA/Drivers/Peripheral/TWI.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
- * - LUFA/Drivers/Peripheral/TWI.c <i>(Makefile source module name: LUFA_SRC_TWI)</i>
- *
+ * - LUFA/Drivers/Peripheral/$(ARCH)TWI.c <i>(Makefile source module name: LUFA_SRC_TWI)</i>
*
* \section Sec_ModDescription Module Description
- * Master Mode Hardware TWI driver. This module provides an easy to use driver for the hardware
- * TWI present on many AVR models, for the transmission and reception of data on a TWI bus.
+ * Hardware TWI driver. This module provides an easy to use driver for the setup and transfer of data over
+ * the selected architecture and microcontroller model's TWI bus port.
*
* \note The exact API for this driver may vary depending on the target used - see
* individual target module documentation for the API specific to your target processor.
@@ -57,18 +57,18 @@
#define __TWI_H__
/* Macros: */
- #if !defined(__DOXYGEN__)
- #define __INCLUDE_FROM_TWI_H
- #endif
+ #if !defined(__DOXYGEN__)
+ #define __INCLUDE_FROM_TWI_H
+ #endif
+
+ /* Includes: */
+ #include "../../Common/Common.h"
/* Includes: */
- #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
- defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
- defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
- defined(__AVR_ATmega32U6__))
- #include "AVRU4U6U7/TWI.h"
+ #if (ARCH == ARCH_AVR8)
+ #include "AVR8/TWI.h"
#else
- #error "TWI is not available for the currently selected AVR model."
+ #error The TWI peripheral driver is not currently available for your selected architecture.
#endif
#endif
diff --git a/LUFA/Drivers/USB/Class/Audio.h b/LUFA/Drivers/USB/Class/Audio.h
index 8fc70fe5b..9a13eb128 100644
--- a/LUFA/Drivers/USB/Class/Audio.h
+++ b/LUFA/Drivers/USB/Class/Audio.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassAudio Audio Class Driver
+ * \defgroup Group_USBClassAudio Audio Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/CDC.h b/LUFA/Drivers/USB/Class/CDC.h
index 7b302fa2c..a5dc37370 100644
--- a/LUFA/Drivers/USB/Class/CDC.h
+++ b/LUFA/Drivers/USB/Class/CDC.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassCDC CDC-ACM (Virtual Serial) Class Driver
+ * \defgroup Group_USBClassCDC CDC-ACM (Virtual Serial) Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Common/Audio.h b/LUFA/Drivers/USB/Class/Common/Audio.h
index 70a8016c1..8ddb52da0 100644
--- a/LUFA/Drivers/USB/Class/Common/Audio.h
+++ b/LUFA/Drivers/USB/Class/Common/Audio.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassAudio
- * @defgroup Group_USBClassAudioCommon Common Class Definitions
+ * \defgroup Group_USBClassAudioCommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h
index 52107d6a8..c63c0b537 100644
--- a/LUFA/Drivers/USB/Class/Common/CDC.h
+++ b/LUFA/Drivers/USB/Class/Common/CDC.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassCDC
- * @defgroup Group_USBClassCDCCommon Common Class Definitions
+ * \defgroup Group_USBClassCDCCommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h
index 485b9dbb0..fd35905e6 100644
--- a/LUFA/Drivers/USB/Class/Common/HID.h
+++ b/LUFA/Drivers/USB/Class/Common/HID.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassHID
- * @defgroup Group_USBClassHIDCommon Common Class Definitions
+ * \defgroup Group_USBClassHIDCommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.h b/LUFA/Drivers/USB/Class/Common/HIDParser.h
index c1689fad8..cd32093ca 100644
--- a/LUFA/Drivers/USB/Class/Common/HIDParser.h
+++ b/LUFA/Drivers/USB/Class/Common/HIDParser.h
@@ -37,7 +37,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_HIDParser HID Report Parser
+ * \defgroup Group_HIDParser HID Report Parser
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Common/HIDReportData.h b/LUFA/Drivers/USB/Class/Common/HIDReportData.h
index d9de5df62..952f39332 100644
--- a/LUFA/Drivers/USB/Class/Common/HIDReportData.h
+++ b/LUFA/Drivers/USB/Class/Common/HIDReportData.h
@@ -36,7 +36,7 @@
*/
/** \ingroup Group_HIDParser
- * @defgroup Group_HIDReportItemConst HID Report Descriptor Item Constants
+ * \defgroup Group_HIDReportItemConst HID Report Descriptor Item Constants
*
* General HID constant definitions for HID Report Descriptor elements.
*
diff --git a/LUFA/Drivers/USB/Class/Common/MIDI.h b/LUFA/Drivers/USB/Class/Common/MIDI.h
index 3aea6376e..8d56f1eba 100644
--- a/LUFA/Drivers/USB/Class/Common/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Common/MIDI.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassMIDI
- * @defgroup Group_USBClassMIDICommon Common Class Definitions
+ * \defgroup Group_USBClassMIDICommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h
index 761141b63..f4274cab8 100644
--- a/LUFA/Drivers/USB/Class/Common/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassMS
- * @defgroup Group_USBClassMSCommon Common Class Definitions
+ * \defgroup Group_USBClassMSCommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Common/Printer.h b/LUFA/Drivers/USB/Class/Common/Printer.h
index 7fbdf8534..23bc6a461 100644
--- a/LUFA/Drivers/USB/Class/Common/Printer.h
+++ b/LUFA/Drivers/USB/Class/Common/Printer.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassPrinter
- * @defgroup Group_USBClassPrinterCommon Common Class Definitions
+ * \defgroup Group_USBClassPrinterCommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h
index edcf9e7bf..6b67b97d1 100644
--- a/LUFA/Drivers/USB/Class/Common/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassRNDIS
- * @defgroup Group_USBClassRNDISCommon Common Class Definitions
+ * \defgroup Group_USBClassRNDISCommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Common/StillImage.h b/LUFA/Drivers/USB/Class/Common/StillImage.h
index 132e2aa93..06299bf77 100644
--- a/LUFA/Drivers/USB/Class/Common/StillImage.h
+++ b/LUFA/Drivers/USB/Class/Common/StillImage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassSI
- * @defgroup Group_USBClassSICommon Common Class Definitions
+ * \defgroup Group_USBClassSICommon Common Class Definitions
*
* \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h
index c674b6d94..d82beabc6 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.h
+++ b/LUFA/Drivers/USB/Class/Device/Audio.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassAudio
- * @defgroup Group_USBClassAudioDevice Audio Class Device Mode Driver
+ * \defgroup Group_USBClassAudioDevice Audio Class Device Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h
index 4a7dc6725..bf388819f 100644
--- a/LUFA/Drivers/USB/Class/Device/CDC.h
+++ b/LUFA/Drivers/USB/Class/Device/CDC.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassCDC
- * @defgroup Group_USBClassCDCDevice CDC Class Device Mode Driver
+ * \defgroup Group_USBClassCDCDevice CDC Class Device Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h
index 631b191b5..545baddf3 100644
--- a/LUFA/Drivers/USB/Class/Device/HID.h
+++ b/LUFA/Drivers/USB/Class/Device/HID.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassHID
- * @defgroup Group_USBClassHIDDevice HID Class Device Mode Driver
+ * \defgroup Group_USBClassHIDDevice HID Class Device Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h
index 3ea45d127..4016d8a9a 100644
--- a/LUFA/Drivers/USB/Class/Device/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Device/MIDI.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassMIDI
- * @defgroup Group_USBClassMIDIDevice MIDI Class Device Mode Driver
+ * \defgroup Group_USBClassMIDIDevice MIDI Class Device Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.h b/LUFA/Drivers/USB/Class/Device/MassStorage.h
index 6ca0a7633..aceeb6261 100644
--- a/LUFA/Drivers/USB/Class/Device/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Device/MassStorage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassMS
- * @defgroup Group_USBClassMSDevice Mass Storage Class Device Mode Driver
+ * \defgroup Group_USBClassMSDevice Mass Storage Class Device Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.h b/LUFA/Drivers/USB/Class/Device/RNDIS.h
index 40d15ef23..cdc6fbad0 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Device/RNDIS.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassRNDIS
- * @defgroup Group_USBClassRNDISDevice RNDIS Class Device Mode Driver
+ * \defgroup Group_USBClassRNDISDevice RNDIS Class Device Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/HID.h b/LUFA/Drivers/USB/Class/HID.h
index 39cef953b..4eafa752a 100644
--- a/LUFA/Drivers/USB/Class/HID.h
+++ b/LUFA/Drivers/USB/Class/HID.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassHID HID Class Driver
+ * \defgroup Group_USBClassHID HID Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.h b/LUFA/Drivers/USB/Class/Host/CDC.h
index 5f59e0c3a..bba94fe81 100644
--- a/LUFA/Drivers/USB/Class/Host/CDC.h
+++ b/LUFA/Drivers/USB/Class/Host/CDC.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassCDC
- * @defgroup Group_USBClassCDCHost CDC Class Host Mode Driver
+ * \defgroup Group_USBClassCDCHost CDC Class Host Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h
index 9057845f7..bd67f8f18 100644
--- a/LUFA/Drivers/USB/Class/Host/HID.h
+++ b/LUFA/Drivers/USB/Class/Host/HID.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassHID
- * @defgroup Group_USBClassHIDHost HID Class Host Mode Driver
+ * \defgroup Group_USBClassHIDHost HID Class Host Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.h b/LUFA/Drivers/USB/Class/Host/MIDI.h
index 13a1e77ce..fc31d401d 100644
--- a/LUFA/Drivers/USB/Class/Host/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Host/MIDI.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassMIDI
- * @defgroup Group_USBClassMIDIHost MIDI Class Host Mode Driver
+ * \defgroup Group_USBClassMIDIHost MIDI Class Host Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h
index 93034c3bc..cd2ea4531 100644
--- a/LUFA/Drivers/USB/Class/Host/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassMS
- * @defgroup Group_USBClassMassStorageHost Mass Storage Class Host Mode Driver
+ * \defgroup Group_USBClassMassStorageHost Mass Storage Class Host Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h
index 91c13195b..096cc592c 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.h
+++ b/LUFA/Drivers/USB/Class/Host/Printer.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassPrinter
- * @defgroup Group_USBClassPrinterHost Printer Class Host Mode Driver
+ * \defgroup Group_USBClassPrinterHost Printer Class Host Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.h b/LUFA/Drivers/USB/Class/Host/RNDIS.h
index 71ae317e9..68aa347ec 100644
--- a/LUFA/Drivers/USB/Class/Host/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Host/RNDIS.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassRNDIS
- * @defgroup Group_USBClassRNDISHost RNDIS Class Host Mode Driver
+ * \defgroup Group_USBClassRNDISHost RNDIS Class Host Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h
index 24deb5a7f..51dc1e99d 100644
--- a/LUFA/Drivers/USB/Class/Host/StillImage.h
+++ b/LUFA/Drivers/USB/Class/Host/StillImage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassSI
- * @defgroup Group_USBClassStillImageHost Still Image Class Host Mode Driver
+ * \defgroup Group_USBClassStillImageHost Still Image Class Host Mode Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/MIDI.h b/LUFA/Drivers/USB/Class/MIDI.h
index 5b291896f..431df22f0 100644
--- a/LUFA/Drivers/USB/Class/MIDI.h
+++ b/LUFA/Drivers/USB/Class/MIDI.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassMIDI MIDI Class Driver
+ * \defgroup Group_USBClassMIDI MIDI Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/MassStorage.h b/LUFA/Drivers/USB/Class/MassStorage.h
index 7dd96c96e..8267c1696 100644
--- a/LUFA/Drivers/USB/Class/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/MassStorage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassMS Mass Storage Class Driver
+ * \defgroup Group_USBClassMS Mass Storage Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/Printer.h b/LUFA/Drivers/USB/Class/Printer.h
index e53fc717d..e624128b4 100644
--- a/LUFA/Drivers/USB/Class/Printer.h
+++ b/LUFA/Drivers/USB/Class/Printer.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassPrinter Printer Class Driver
+ * \defgroup Group_USBClassPrinter Printer Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/RNDIS.h b/LUFA/Drivers/USB/Class/RNDIS.h
index ebcadfdf2..5725bea62 100644
--- a/LUFA/Drivers/USB/Class/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/RNDIS.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassRNDIS RNDIS (Networking) Class Driver
+ * \defgroup Group_USBClassRNDIS RNDIS (Networking) Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/Class/StillImage.h b/LUFA/Drivers/USB/Class/StillImage.h
index 35936a60a..dadb98de5 100644
--- a/LUFA/Drivers/USB/Class/StillImage.h
+++ b/LUFA/Drivers/USB/Class/StillImage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassSI Still Image Class Driver
+ * \defgroup Group_USBClassSI Still Image Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
index 3ef95a406..d51eb3d93 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
+++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
@@ -40,7 +40,7 @@
*/
/** \ingroup Group_Descriptors
- * @defgroup Group_ConfigDescriptorParser Configuration Descriptor Parser
+ * \defgroup Group_ConfigDescriptorParser Configuration Descriptor Parser
*
* Functions, macros, variables, enums and types related to the parsing of Configuration Descriptors.
*
diff --git a/LUFA/Drivers/USB/HighLevel/EndpointStream.h b/LUFA/Drivers/USB/HighLevel/EndpointStream.h
index a6e7200e3..726378bfb 100644
--- a/LUFA/Drivers/USB/HighLevel/EndpointStream.h
+++ b/LUFA/Drivers/USB/HighLevel/EndpointStream.h
@@ -39,7 +39,7 @@
*/
/** \ingroup Group_EndpointRW
- * @defgroup Group_EndpointStreamRW Read/Write of Multi-Byte Streams
+ * \defgroup Group_EndpointStreamRW Read/Write of Multi-Byte Streams
*
* Functions, macros, variables, enums and types related to data reading and writing of data streams from
* and to endpoints.
diff --git a/LUFA/Drivers/USB/HighLevel/Events.h b/LUFA/Drivers/USB/HighLevel/Events.h
index 53e31f6c1..368774bdd 100644
--- a/LUFA/Drivers/USB/HighLevel/Events.h
+++ b/LUFA/Drivers/USB/HighLevel/Events.h
@@ -48,7 +48,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_Events USB Events
+ * \defgroup Group_Events USB Events
*
* This module contains macros and functions relating to the management of library events, which are small
* pieces of code similar to ISRs which are run when a given condition is met. Each event can be fired from
diff --git a/LUFA/Drivers/USB/HighLevel/PipeStream.h b/LUFA/Drivers/USB/HighLevel/PipeStream.h
index b2d392af0..38ab09f0b 100644
--- a/LUFA/Drivers/USB/HighLevel/PipeStream.h
+++ b/LUFA/Drivers/USB/HighLevel/PipeStream.h
@@ -39,7 +39,7 @@
*/
/** \ingroup Group_PipeRW
- * @defgroup Group_PipeStreamRW Read/Write of Multi-Byte Streams
+ * \defgroup Group_PipeStreamRW Read/Write of Multi-Byte Streams
*
* Functions, macros, variables, enums and types related to data reading and writing of data streams from
* and to pipes.
diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
index a6c523183..7b8f4d7dc 100644
--- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
+++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_Descriptors USB Descriptors
+ * \defgroup Group_Descriptors USB Descriptors
*
* Standard USB device descriptor defines and retrieval routines, for USB devices. This module contains
* structures and macros for the easy creation of standard USB descriptors in USB device projects.
diff --git a/LUFA/Drivers/USB/HighLevel/StdRequestType.h b/LUFA/Drivers/USB/HighLevel/StdRequestType.h
index f8e951eb1..c62aa502d 100644
--- a/LUFA/Drivers/USB/HighLevel/StdRequestType.h
+++ b/LUFA/Drivers/USB/HighLevel/StdRequestType.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_StdRequest Standard USB Requests
+ * \defgroup Group_StdRequest Standard USB Requests
*
* This module contains definitions for the various control request parameters, so that the request
* details (such as data direction, request recipient, etc.) can be extracted via masking.
diff --git a/LUFA/Drivers/USB/HighLevel/USBMode.h b/LUFA/Drivers/USB/HighLevel/USBMode.h
index 91b2697f7..58f9927dc 100644
--- a/LUFA/Drivers/USB/HighLevel/USBMode.h
+++ b/LUFA/Drivers/USB/HighLevel/USBMode.h
@@ -40,7 +40,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_USBMode USB Mode Tokens
+ * \defgroup Group_USBMode USB Mode Tokens
*
* After the inclusion of the master USB driver header, one or more of the following
* tokens may be defined, to allow the user code to conditionally enable or disable
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h
index 55f4346a1..ae3df4111 100644
--- a/LUFA/Drivers/USB/LowLevel/Device.h
+++ b/LUFA/Drivers/USB/LowLevel/Device.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_Device Device Management
+ * \defgroup Group_Device Device Management
*
* USB Device mode related macros and enums. This module contains macros and enums which are used when
* the USB controller is initialized in device mode.
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h
index 9ce1380b4..455577c5a 100644
--- a/LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h
@@ -39,26 +39,26 @@
*/
/** \ingroup Group_EndpointManagement
- * @defgroup Group_EndpointRW Endpoint Data Reading and Writing
+ * \defgroup Group_EndpointRW Endpoint Data Reading and Writing
*
* Functions, macros, variables, enums and types related to data reading and writing from and to endpoints.
*/
/** \ingroup Group_EndpointRW
- * @defgroup Group_EndpointPrimitiveRW Read/Write of Primitive Data Types
+ * \defgroup Group_EndpointPrimitiveRW Read/Write of Primitive Data Types
*
* Functions, macros, variables, enums and types related to data reading and writing of primitive data types
* from and to endpoints.
*/
/** \ingroup Group_EndpointManagement
- * @defgroup Group_EndpointPacketManagement Endpoint Packet Management
+ * \defgroup Group_EndpointPacketManagement Endpoint Packet Management
*
* Functions, macros, variables, enums and types related to packet management of endpoints.
*/
/** \ingroup Group_USB
- * @defgroup Group_EndpointManagement Endpoint Management
+ * \defgroup Group_EndpointManagement Endpoint Management
*
* Functions, macros and enums related to endpoint management when in USB Device mode. This
* module contains the endpoint management macros, as well as endpoint interrupt and data
diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h
index 92a4cb9c5..651daf28b 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.h
+++ b/LUFA/Drivers/USB/LowLevel/Host.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_Host Host Management
+ * \defgroup Group_Host Host Management
*
* USB Host mode related macros and enums. This module contains macros and enums which are used when
* the USB controller is initialized in host mode.
diff --git a/LUFA/Drivers/USB/LowLevel/OTG.h b/LUFA/Drivers/USB/LowLevel/OTG.h
index 5e096ca7a..2cb751dad 100644
--- a/LUFA/Drivers/USB/LowLevel/OTG.h
+++ b/LUFA/Drivers/USB/LowLevel/OTG.h
@@ -39,7 +39,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_OTG USB On The Go (OTG) Management
+ * \defgroup Group_OTG USB On The Go (OTG) Management
*
* This module contains macros for embedded USB hosts with dual role On The Go capabilities, for managing role
* exchange. OTG is a way for two USB dual role devices to talk to one another directly without fixed device/host
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h
index 75cdf7a7d..34a64a7c5 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.h
@@ -39,26 +39,26 @@
*/
/** \ingroup Group_PipeManagement
- * @defgroup Group_PipeRW Pipe Data Reading and Writing
+ * \defgroup Group_PipeRW Pipe Data Reading and Writing
*
* Functions, macros, variables, enums and types related to data reading and writing from and to pipes.
*/
/** \ingroup Group_PipeRW
- * @defgroup Group_PipePrimitiveRW Read/Write of Primitive Data Types
+ * \defgroup Group_PipePrimitiveRW Read/Write of Primitive Data Types
*
* Functions, macros, variables, enums and types related to data reading and writing of primitive data types
* from and to pipes.
*/
/** \ingroup Group_PipeManagement
- * @defgroup Group_PipePacketManagement Pipe Packet Management
+ * \defgroup Group_PipePacketManagement Pipe Packet Management
*
* Functions, macros, variables, enums and types related to packet management of pipes.
*/
/** \ingroup Group_PipeManagement
- * @defgroup Group_PipeControlReq Pipe Control Request Management
+ * \defgroup Group_PipeControlReq Pipe Control Request Management
*
* Module for host mode request processing. This module allows for the transmission of standard, class and
* vendor control requests to the default control endpoint of an attached device while in host mode.
@@ -67,7 +67,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_PipeManagement Pipe Management
+ * \defgroup Group_PipeManagement Pipe Management
*
* This module contains functions, macros and enums related to pipe management when in USB Host mode. This
* module contains the pipe management macros, as well as pipe interrupt and data send/receive functions
diff --git a/LUFA/Drivers/USB/LowLevel/USBController.h b/LUFA/Drivers/USB/LowLevel/USBController.h
index f35c52da9..b85539d3e 100644
--- a/LUFA/Drivers/USB/LowLevel/USBController.h
+++ b/LUFA/Drivers/USB/LowLevel/USBController.h
@@ -39,7 +39,7 @@
*/
/** \ingroup Group_USB
- * @defgroup Group_USBManagement USB Interface Management
+ * \defgroup Group_USBManagement USB Interface Management
*
* Functions, macros, variables, enums and types related to the setup and management of the USB interface.
*
diff --git a/LUFA/Drivers/USB/USB.h b/LUFA/Drivers/USB/USB.h
index ff72a08f3..70dc97e10 100644
--- a/LUFA/Drivers/USB/USB.h
+++ b/LUFA/Drivers/USB/USB.h
@@ -37,7 +37,7 @@
* including any headers in the USB/LowLevel/ or USB/HighLevel/ subdirectories.
*/
-/** @defgroup Group_USB USB Core - LUFA/Drivers/USB/USB.h
+/** \defgroup Group_USB USB Core - LUFA/Drivers/USB/USB.h
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -71,7 +71,7 @@
* of USB management functions found \ref Group_USBManagement.
*/
-/** @defgroup Group_USBClassDrivers USB Class Drivers
+/** \defgroup Group_USBClassDrivers USB Class Drivers
*
* Drivers for both host and device mode of the standard USB classes, for rapid application development.
* Class drivers give a framework which sits on top of the low level library API, allowing for standard
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index 915b83a4d..26700f6c3 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -22,6 +22,7 @@
* - Added new MAX() and MIN() convenience macros
* - Added new Serial_SendData() function to the Serial driver
* - Added board driver support for the Sparkfun ATMEGA8U2 breakout board
+ * - Started internal restructuring for eventual multiple architecture ports
* - Library Applications:
* - Added ability to write protect Mass Storage disk write operations from the host OS
* - Added new MIDIToneGenerator project
diff --git a/LUFA/ManPages/DirectorySummaries.txt b/LUFA/ManPages/DirectorySummaries.txt
index 36ba26d65..a02d4076b 100644
--- a/LUFA/ManPages/DirectorySummaries.txt
+++ b/LUFA/ManPages/DirectorySummaries.txt
@@ -27,13 +27,12 @@
* This folder contains drivers for several of the AVR internal peripherals such as the USART, compatible with
* all USB AVR models.
*
- * \dir LUFA/Drivers/Peripheral/AVRU4U6U7
- * \brief AT90USBXXX6, AT90USBXXX7 and ATMEGAXXU4 AVR model peripheral driver files.
+ * \dir LUFA/Drivers/Peripheral/AVR8
+ * \brief AVR8 AVR microcontroller model specific peripheral driver files.
*
* This folder contains drivers for several of the AVR internal peripherals such as the USART, compatible only with
- * the AT90USBXXX6, AT90USBXXX7 and ATMEGAXXU4 USB AVR models, such as the AT90USB1287. Its contents should <b>not</b> be
- * included by the user application - the dispatch header file located in the parent directory should be used
- * instead.
+ * the 8-bit AVR microcontroller models, such as the AT90USB1287. Its contents should <b>not</b> be included by the
+ * user application - the dispatch header file located in the parent directory should be used instead.
*
* \dir LUFA/Drivers/USB
* \brief USB controller peripheral driver files.
diff --git a/LUFA/Scheduler/Scheduler.c b/LUFA/Scheduler/Scheduler.c
index 857e9dd2d..4e71d4d87 100644
--- a/LUFA/Scheduler/Scheduler.c
+++ b/LUFA/Scheduler/Scheduler.c
@@ -31,9 +31,9 @@
#include "Scheduler.h"
volatile SchedulerDelayCounter_t Scheduler_TickCounter;
-volatile uint8_t Scheduler_TotalTasks;
+volatile uint_least8_t Scheduler_TotalTasks;
-bool Scheduler_HasDelayElapsed(const uint16_t Delay,
+bool Scheduler_HasDelayElapsed(const uint_least16_t Delay,
SchedulerDelayCounter_t* const DelayCounter)
{
SchedulerDelayCounter_t CurrentTickValue_LCL;
@@ -83,7 +83,7 @@ void Scheduler_SetTaskMode(const TaskPtr_t Task,
}
}
-void Scheduler_SetGroupTaskMode(const uint8_t GroupID,
+void Scheduler_SetGroupTaskMode(const uint_least8_t GroupID,
const bool TaskStatus)
{
TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h
index 72b877364..35f165fb4 100644
--- a/LUFA/Scheduler/Scheduler.h
+++ b/LUFA/Scheduler/Scheduler.h
@@ -37,7 +37,7 @@
* \deprecated This module is deprecated and will be removed in a future library release.
*/
-/** @defgroup Group_Scheduler Simple Task Scheduler - LUFA/Scheduler/Scheduler.h
+/** \defgroup Group_Scheduler Simple Task Scheduler - LUFA/Scheduler/Scheduler.h
*
* \deprecated This module is deprecated and will be removed in a future library release.
*
@@ -105,11 +105,6 @@
#define __SCHEDULER_H__
/* Includes: */
- #include <stdint.h>
- #include <stdbool.h>
-
- #include <util/atomic.h>
-
#include "../Common/Common.h"
/* Enable C linkage for C++ Compilers: */
@@ -180,7 +175,7 @@
/** Type define for a variable which can hold a tick delay value for the scheduler up to the maximum delay
* possible.
*/
- typedef uint16_t SchedulerDelayCounter_t;
+ typedef uint_least16_t SchedulerDelayCounter_t;
/** \brief Scheduler Task List Entry Structure.
*
@@ -188,9 +183,9 @@
*/
typedef struct
{
- TaskPtr_t Task; /**< Pointer to the task to execute. */
- bool TaskStatus; /**< Status of the task (either TASK_RUN or TASK_STOP). */
- uint8_t GroupID; /**< Group ID of the task so that its status can be changed as a group. */
+ TaskPtr_t Task; /**< Pointer to the task to execute. */
+ bool TaskStatus; /**< Status of the task (either TASK_RUN or TASK_STOP). */
+ uint_least8_t GroupID; /**< Group ID of the task so that its status can be changed as a group. */
} TaskEntry_t;
/* Global Variables: */
@@ -198,14 +193,14 @@
* \ref TaskEntry_t and can be manipulated as desired, although it is preferred that the proper Scheduler
* functions should be used instead of direct manipulation.
*/
- exter TaskEntry_t Scheduler_TaskList[];
+ extern TaskEntry_t Scheduler_TaskList[];
/** Contains the total number of tasks in the task list, irrespective of if the task's status is set to
* \ref TASK_RUN or \ref TASK_STOP.
*
* \note This value should be treated as read-only, and never altered in user-code.
*/
- extern volatile uint8_t Scheduler_TotalTasks;
+ extern volatile uint_least8_t Scheduler_TotalTasks;
/** Contains the current scheduler tick count, for use with the delay functions. If the delay functions
* are used in the user code, this should be incremented each tick period so that the delays can be
@@ -248,7 +243,7 @@
* }
* \endcode
*/
- bool Scheduler_HasDelayElapsed(const uint16_t Delay,
+ bool Scheduler_HasDelayElapsed(const uint_least16_t Delay,
SchedulerDelayCounter_t* const DelayCounter)
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(2);
@@ -266,24 +261,25 @@
* \param[in] GroupID Value of the task group ID whose status is to be changed.
* \param[in] TaskStatus New task status for tasks in the specified group (\ref TASK_RUN or \ref TASK_STOP).
*/
- void Scheduler_SetGroupTaskMode(const uint8_t GroupID,
+ void Scheduler_SetGroupTaskMode(const uint_least8_t GroupID,
const bool TaskStatus);
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
#define TOTAL_TASKS (sizeof(Scheduler_TaskList) / sizeof(TaskEntry_t))
- #define MAX_DELAYCTR_COUNT 0xFFFF
+ #define MAX_DELAYCTR_COUNT UINT_LEAST16_MAX
/* Inline Functions: */
- static inline void Scheduler_InitScheduler(const uint8_t TotalTasks) ATTR_ALWAYS_INLINE;
- static inline void Scheduler_InitScheduler(const uint8_t TotalTasks)
+ static inline void Scheduler_InitScheduler(const uint_least8_t TotalTasks) ATTR_ALWAYS_INLINE;
+ static inline void Scheduler_InitScheduler(const uint_least8_t TotalTasks)
{
Scheduler_TotalTasks = TotalTasks;
}
- static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) ATTR_NO_RETURN ATTR_ALWAYS_INLINE ATTR_DEPRECATED;
- static inline void Scheduler_GoSchedule(const uint8_t TotalTasks)
+ static inline void Scheduler_GoSchedule(const uint_least8_t TotalTasks)
+ ATTR_NO_RETURN ATTR_ALWAYS_INLINE ATTR_DEPRECATED;
+ static inline void Scheduler_GoSchedule(const uint_least8_t TotalTasks)
{
Scheduler_InitScheduler(TotalTasks);
diff --git a/LUFA/makefile b/LUFA/makefile
index d1710ef80..ccc2afd8c 100644
--- a/LUFA/makefile
+++ b/LUFA/makefile
@@ -16,6 +16,11 @@ else
LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
endif
+# Check to see if the chip architecture has not been defined in the user makefile, set a default architecture if not
+ifeq ($(origin ARCH), undefined)
+ ARCH = AVR8
+endif
+
# Define module source file lists
LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Device.c \
$(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Endpoint.c \
@@ -45,8 +50,8 @@ LUFA_SRC_USBCLASS = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/Audio.c
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDIS.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImage.c
LUFA_SRC_TEMPERATURE = $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c
-LUFA_SRC_SERIAL = $(LUFA_ROOT_PATH)/Drivers/Peripheral/Serial.c
-LUFA_SRC_TWI = $(LUFA_ROOT_PATH)/Drivers/Peripheral/TWI.c
+LUFA_SRC_SERIAL = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial.c
+LUFA_SRC_TWI = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI.c
LUFA_SRC_SCHEDULER = $(LUFA_ROOT_PATH)/Scheduler/Scheduler.c