Commit 6a10d6b4 authored by Dean Camera's avatar Dean Camera
Browse files

Moved all source to the trunk directory.

parent 99913213
/** \file
*
* This file contains special DoxyGen information for the generation of the main page and other special
* documentation pages. It is not a project source file.
*/
/** \page Page_BuildLibrary Building as a Linkable Library
*
* The LUFA library can be built as a proper linkable library (with the extention .a) under AVR-GCC, so that
* the library does not need to be recompiled with each revision of a user project. Instructions for creating
* a library from a given source tree can be found in the AVR-GCC user manual included in the WinAVR install
* /Docs/ directory.
*
* However, building the library is <b>not recommended</b>, as the static (compile-time) options will be
* unable to be changed without a recompilation of the LUFA code. Therefore, if the library is to be built
* from the LUFA source, it should be made to be application-specific and compiled with the static options
* that are required for each project (which should be recorded along with the library).
*
* Normal library use has the library components compiled in at the same point as the application code, as
* demonstrated in the library demos and applications. This is the preferred method, as the library is recompiled
* each time to ensure that all static options for a particular application are applied.
*/
This diff is collapsed.
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, 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
*
* This file contains constants which can be passed to the compiler (via setting the macro BOARD) in the
* user project makefile using the -D option to configure the library board-specific drivers.
*
* \note Do not include this file directly, rather include the Common.h header file instead to gain this file's
* functionality.
*/
#ifndef __BOARDTYPES_H__
#define __BOARDTYPES_H__
/* Preprocessor Checks: */
#if !defined(__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 USBKEY specific board drivers, including Dataflash, Joystick and LED drivers. */
#define BOARD_USBKEY 0
/** Selects the STK525 specific board drivers, including Dataflash, Joystick and LED drivers. */
#define BOARD_STK525 1
/** Selects the STK526 specific board drivers, including Dataflash, Joystick and LED drivers. */
#define BOARD_STK526 2
/** Selects the RZUSBSTICK specific board drivers, including the driver for the boards LEDs. */
#define BOARD_RZUSBSTICK 3
/** Selects the ATAVRUSBRF01 specific board drivers, including the driver for the board LEDs. */
#define BOARD_ATAVRUSBRF01 4
/** Selects the user-defined board drivers, which should be placed in the user project's folder
* under a directory named /Board/. Each board driver should be named identically to the LUFA
* master board driver (i.e., driver in the LUFA/Drivers/Board director) so that the library
* can correctly identify it.
*/
#define BOARD_USER 5
#endif
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, 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
*
* This file contains macros for the embedding of compile-time strings into the resultant project binary for
* identification purposes. It is designed to prefix "tags" with the magic string of "@(#)" so that the tags
* can easily be identified in the binary data.
*
* These tags are compatible with the ButtLoad project at http://www.fourwalledcubicle.com/ButtLoad.php .
*/
#ifndef __BUTTLOADTAG_H__
#define __BUTTLOADTAG_H__
/* Includes: */
#include <avr/io.h>
#include <avr/pgmspace.h>
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Creates a new tag in the resultant binary, containing the specified data array. The macro id
* parameter is only for identification purposes (so that the tag data can be referenced in code)
* and is not visible in the compiled binary.
*/
#define BUTTLOADTAG(id, data) const struct ButtLoadTagData BUTTTAG_##id \
PROGMEM __attribute__((used, externally_visible)) = \
{MagicString: BT_TAGHEADER, TagData: data}
/** Macro for retrieving a reference to the specified tag's contents. The tag data is located in
* the program memory (FLASH) space, and so must be read out with the macros in avr-libc which
* deal with embedded data.
*/
#define BUTTLOADTAG_DATA(id) BUTTTAG_##id.TagData
/* Structures: */
/** Structure for ButtLoad compatible binary tags. */
struct ButtLoadTagData
{
char MagicString[4]; /**< Magic tag header, containing the string "@(#)". */
char TagData[]; /**< Tag contents as a char array. */
};
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
#define BT_TAGHEADER {'@','(','#',')'}
#endif
#endif
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, 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
*
* This file contains macros which are common to all library elements, and which may be useful in user code. It
* also includes other common headees, such as Atomic.h, FunctionAttributes.h and BoardTypes.h.
*/
#ifndef __COMMON_H__
#define __COMMON_H__
/* Includes: */
#include <avr/io.h>
#include <stdio.h>
#include <avr/version.h>
#include "FunctionAttributes.h"
#include "BoardTypes.h"
#include <alloca.h>
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Macro for encasing other multi-statment macros. This should be used along with an opening brace
* before the start of any multi-statement macro, so that the macros contents as a whole are treated
* as a discreete block and not as a list of seperate statements which may cause problems when used as
* a block (such as inline IF statments).
*/
#define MACROS do
/** Macro for encasing other multi-statment macros. This should be used along with a preceeding closing
* brace at the end of any multi-statement macro, so that the macros contents as a whole are treated
* as a discreete block and not as a list of seperate statements which may cause problems when used as
* a block (such as inline IF statments).
*/
#define MACROE while (0)
/** Defines a volatile NOP statment 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 optimizer
* removes/reorders code to the point where break points cannot reliably be set.
*/
#define JTAG_DEBUG_POINT() asm volatile ("NOP" ::)
/** Defines an explicit JTAG break point in the resulting binary via the ASM BREAK statment. When
* a JTAG is used, this causes the program execution to halt when reached until manually resumed. */
#define JTAG_DEBUG_BREAK() asm volatile ("BREAK" ::)
/** Macro for testing condition "x" and breaking via JTAG_DEBUG_BREAK() if the condition is false. */
#define JTAG_DEBUG_ASSERT(x) MACROS{ if (!(x)) { JTAG_DEBUG_BREAK(); } }MACROE
/** Macro for testing condition "x" and writing debug data to the serial stream if false. As a
* prerequisite for this macro, the serial stream should be configured via the Serial_Stream driver.
*
* The serial output takes the form "{FILENAME}: Function {FUNCTION NAME}, Line {LINE NUMBER}: Assertion
* {x} failed."
*/
#define SERIAL_STREAM_ASSERT(x) MACROS{ if (!(x)) { printf_P(PSTR("%s: Function \"%s\", Line %d: " \
"Assertion \"%s\" failed.\r\n"), \
__FILE__, __func__, __LINE__, #x); \
} }MACROE
/* Inline Functions: */
/** Function for reliably setting the AVR's system clock prescaler, using inline assembly. This function
* is guaranteed to operate reliably regardless of optimization setting or other compile time options.
*
* \param PrescalerMask The mask of the new prescaler setting for CLKPR
*/
static inline void SetSystemClockPrescaler(uint8_t PrescalerMask)
{
uint8_t tmp = (1 << CLKPCE);
__asm__ __volatile__ (
"in __tmp_reg__,__SREG__" "\n\t"
"cli" "\n\t"
"sts %1, %0" "\n\t"
"sts %1, %2" "\n\t"
"out __SREG__, __tmp_reg__"
: /* no outputs */
: "d" (tmp),
"M" (_SFR_MEM_ADDR(CLKPR)),
"d" (PrescalerMask)
: "r0");
}
/** Function to reverse the individual bits in a byte - i.e. bit 7 is moved to bit 0, bit 6 to bit 1,
* etc.
*
* \param Byte Byte of data whose bits are to be reversed
*/
static inline uint8_t BitReverse(uint8_t Byte) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint8_t BitReverse(uint8_t Byte)
{
Byte = (((Byte & 0xF0) >> 4) | ((Byte & 0x0F) << 4));
Byte = (((Byte & 0xCC) >> 2) | ((Byte & 0x33) << 2));
Byte = (((Byte & 0xAA) >> 1) | ((Byte & 0x55) << 1));
return Byte;
}
/** Function to reverse the byte ordering of the individual bytes in a 16 bit number.
*
* \param Word Word of data whose bytes are to be swapped
*/
static inline uint16_t SwapEndian_16(uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint16_t SwapEndian_16(uint16_t Word)
{
return ((Word >> 8) | (Word << 8));
}
/** Function to reverse the byte ordering of the individual bytes in a 32 bit number.
*
* \param DWord Double word of data whose bytes are to be swapped
*/
static inline uint32_t SwapEndian_32(uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
static inline uint32_t SwapEndian_32(uint32_t DWord)
{
return (((DWord & 0xFF000000) >> 24) |
((DWord & 0x00FF0000) >> 8) |
((DWord & 0x0000FF00) << 8) |
((DWord & 0x000000FF) << 24));
}
/** Function to reverse the byte ordering of the individual bytes in a n byte number.
*
* \param Data Pointer to a number containing an even number of bytes to be reversed
* \param Bytes Length of the data in bytes
*/
static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes);
static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes)
{
uint8_t Temp;
while (Bytes)
{
Temp = *Data;
*Data = *(Data + Bytes - 1);
*(Data + Bytes) = Temp;
Data++;
Bytes -= 2;
}
}
#endif
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, 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
*
* This file contains macros for applying GCC specific attributes to functions to control various optimizer
* and code generation features of the compiler. Attributes may be placed in the function prototype in any
* order, and multiple attributes can be specified for a single function via a space seperated list.
*
* \note Do not include this file directly, rather include the Common.h header file instead to gain this file's
* functionality.
*/
#ifndef __FUNCATTR_H__
#define __FUNCATTR_H__
/* Preprocessor Checks: */
#if !defined(__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: */
/** Indicates to the compiler that the function can not ever return, so that any stack restoring or
* return code may be ommited by the compiler in the resulting binary.
*/
#define ATTR_NO_RETURN __attribute__ ((noreturn))
/** Places the function in one of the initilization sections, which execute before the main function
* of the application. The init function number can be specified as "x", as an integer. Refer to the
* avr-libc manual for more information on the initialization sections.
*/
#define ATTR_INIT_SECTION(x) __attribute__ ((naked, section (".init" #x )))
/** Indicates that the function returns a value which should not be ignored by the user code. When
* applied, any ignored return value from calling the function will produce a compiler warning.
*/
#define ATTR_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result))
/** Indicates that the specified parameters of the function are pointers which should never be NULL.
* When applied as a 1-based comma seperated list the compiler will emmit a warning if the specified
* parameters are known at compiler time to be NULL at the point of calling the function.
*/
#define ATTR_NON_NULL_PTR_ARG(...) __attribute__ ((nonnull (__VA_ARGS__)))
/** Removes any preample or postample from the function. When used, the function will not have any
* register or stack saving code. This should be used with caution, and when used the programmer
* is responsible for maintaining stack and register integrity.
*/
#define ATTR_NAKED __attribute__ ((naked))
/** Prevents the compiler from considering a specified function for inlining. When applied, the given
* function will not be inlined under any circumstances.
*/
#define ATTR_NOINLINE __attribute__ ((noinline))
/** Forces the compiler to inline the specified function. When applied, the given function will be
* inlined under all circumstances.
*/
#define ATTR_ALWAYSINLINE __attribute__ ((always_inline))
/** Indicates that the specified function is pure, in that it has no side-effects other than global
* or parameter variable access.
*/
#define ATTR_PURE __attribute__ ((pure))
/** Indicates that the specified function is constant, in that it has no side effects other than
* parameter access.
*/
#define ATTR_CONST __attribute__ ((const))
/** Marks a given function as deprecated, which produces a warning if the function is called. */
#define ATTR_DEPRECATED __attribute__ ((deprecated))
/** Marks a function as a weak reference, which can be overridden by other functions with an
* identical name (in which case the weak reference is discarded at link time).
*/
#define ATTR_WEAK __attribute__ ((weak))
/** Marks a function as an alias for another function of name "x". */
#define ATTR_ALIAS(x) __attribute__ ((alias( #x )))
#endif
/** \file
*
* This file contains special DoxyGen information for the generation of the main page and other special
* documentation pages. It is not a project source file.
*/
/** \page TokenSummary Summary of Compile Tokens
*
* The following lists all the possible tokens which can be defined in a project makefile, and passed to the
* compiler via the -D switch, to alter the LUFA library code. These tokens may alter the library behaviour,
* or remove features unused by a given application in order to save flash space.
*
* \section Sec_SummaryNonUSBTokens Non USB Related Tokens
* This section describes compile tokens which affect non-USB sections of the LUFA library.
*
* <b>DISABLE_TERMINAL_CODES</b> - TerminalCodes.h \n
* If an application contains ANSI terminal control codes listed in TerminalCodes.h, it might be desired to remove them
* at compile time for use with a terminal which is non-ANSI control code aware, without modifying the source code. If
* this token is defined, all ANSI control codes in the application code from the TerminalCodes.h header are removed from
* the source code at compile time.
*
* <b>NUM_BLOCKS</b> - DynAlloc.h \n
* Sets the number of allocable blocks in the psudo-heap of the dynamic memory allocation driver. This should be
* defined as a constant larger than zero.
*
* <b>BLOCK_SIZE</b> - DynAlloc.h \n
* Sets the size of each allocable block in the psudo-heap of the dynamic memory allocation driver. This should be
* defined as a constant larger than zero.
*
* <b>NUM_HANDLES</b> - DynAlloc.h \n
* Sets the maximum number of managed memory handles which can be handed out by the dynamic memory allocation driver
* simultaneously, before a handle (and its associated allocated memory) must be freed.
*
* \section Sec_SummaryUSBClassTokens USB Class Driver Related Tokens
* This section describes compile tokens which affect USB class-specific drivers in the LUFA library.
*
* <b>HID_ENABLE_FEATURE_PROCESSING</b> - HIDParser.h \n
* Define this token to enable the processing of FEATURE HID report items, if any, into the processed HID structure.
* By default FEATURE items (which are device features settable by the host but not directly visible by the user) are
* skipped when processing a device HID report.
*
* <b>HID_INCLUDE_CONSTANT_DATA_ITEMS</b> - HIDParser.h \n
* By default, constant data items (usually used as spacers to align seperate report items to a byte or word boundary)
* in the HID report are skipped during report processing. It is highly unusual for an application to make any use of
* constant data items (as they do not carry any useful data and only occupy limited RAM) however if required defining
* this switch will put constant data items into the processed HID report structure.
*
* <b>HID_STATETABLE_STACK_DEPTH</b> - HIDParser.h \n
* HID reports may contain PUSH and POP elements, to store and retrieve the current HID state table onto a stack. This
* allows for reports to save the state table before modifying it slightly for a data item, and then restore the previous
* state table in a compact manner. This token may be defined to a non-zero value to give the maximum depth of the state
* table stack. If not defined, this defaults to the value indicated in the HID.h file documentation.
*
* <b>HID_USAGE_STACK_DEPTH</b> - HIDParser.h \n
* HID reports generally contain many USAGE elements, which are assigned to INPUT, OUTPUT and FEATURE items in succession
* when multiple items are defined at once (via REPORT COUNT elements). This allows for several items to be defined with
* different usages in a compact manner. This token may be defined to a non-zero value to set the maximum depth of the
* usage stack, indicating the maximum number of USAGE items which can be stored tempoarily until the next INPUT, OUTPUT
* and FEATURE item. If not defined, this defaults to the value indicated in the HID.h file documentation.
*
* <b>HID_MAX_COLLECTIONS</b> - HIDParser.h \n
* HID reports generally contain several COLLECTION elements, used to group related data items together. Collection information
* is stored seperately in the processed usage structure (and referred to by the data elements in the structure) to save space.
* This token may be defined to a non-zero value to set the maximum number of COLLECTION items which can be processed by the
* parser into the resultant processed report structure. If not defined, this defaults to the value indicated in the HID.h file
* documentation.
*
* <b>HID_MAX_REPORTITEMS</b> - HIDParser.h \n
* All HID reports contain one or more INPUT, OUTPUT and/or FEATURE items describing the data which can be sent to and from the HID
* device. Each item has associated usages, bit offsets in the item reports and other associated data indicating the manner in which
* the report data should be interpreted by the host. This token may be defined to a non-zero value to set the maximum number of
* data elements which can be stored in the processed HID report strucuture, including INPUT, OUTPUT and (if enabled) FEATURE items.
* If a item has a multiple count (i.e. a REPORT COUNT of more than 1), each item in the report count is placed seperately in the
* processed HID report table. If not defined, this defaults to the value indicated in the HID.h file documentation.
*
* \section Sec_SummaryUSBTokens USB Driver Related Tokens
* This section describes compile tokens which affect USB driver stack as a whole in the LUFA library.
*
* <b>USE_RAM_DESCRIPTORS</b> - StdDescriptors.h \n
* Define this token to indicate to the USB driver that device descriptors are stored in RAM, rather than the default of
* the AVR's flash. RAM descriptors may be desirable in applications where speed or minimizing flash usage is more important
* than RAM usage, or applications where the descriptors need to be modified at runtime.
*
* <b>USE_EEPROM_DESCRIPTORS</b> - StdDescriptors.h \n
* Similar to USE_RAM_DESCRIPTORS, but descriptors are stored in the AVR's EEPROM memory rather than RAM.
*
* <b>USE_NONSTANDARD_DESCRIPTOR_NAMES</b> - StdDescriptors.h \n
* The USB 2.0 standard gives some rather obscure names for the elements in the standard descriptor types (device, configuration,
* string, endpoint, etc.). By default the LUFA library uses these names in its predefined descriptor structure types for
* compatibility. If this token is defined, the structure element names are switched to the LUFA-specific but more descriptive
* names documented in the StdDescriptors.h source file.
*
* <b>FIXED_CONTROL_ENDPOINT_SIZE</b> - Endpoint.h \n
* By default, the library determines the size of the control endpoint (when in device mode) by reading the device descriptor.
* Normally this reduces the amount of configuration required for the library, allows the value to change dynamically (if
* descriptors are stored in EEPROM or RAM rather than flash memory) and reduces code maintenance. However, this token can be
* defined to a non-zero value instead to give the size in bytes of the control endpoint, to reduce the size of the compiled
* binary at the expense of flexibility.
*
* <b>STATIC_ENDPOINT_CONFIGURATION</b> - Endpoint.h \n
* By default, the endpoint configuration routine is designed to accept dynamic inputs, so that the endpoints can be configured
* using variable values known only at runtime. This allows for a great deal of flexibility, however uses a small amount of binary
* space which may be wasted if all endpoint configurations are static and known at compile time. Define this token via the -D switch
* to optimize the endpoint configuration routine for constant inputs, to reduce the size of the compiled binary at the expense of
* flexibility. Note that with this option dynamic values may still be used, but will result in many times more code to be generated than
* if the option was disabled. This is designed to be used only if the FIXED_CONTROL_ENDPOINT_SIZE option is also used.
*
* <b>USE_SINGLE_DEVICE_CONFIGURATION</b> - DevChapter9.h \n
* By default, the library determines the number of configurations a USB device supports by reading the device descriptor. This reduces
* the amount of configuration required to set up the library, and allows the value to change dynamically (if descriptors are stored in
* EEPROM or RAM rather than flash memory) and reduces code maintenance. However, many USB device projects use only a single configuration.
* Defining this token enables single-configuration mode, reducing the compiled size of the binary at the expense of flexibility.
*
* <b>NO_CLEARSET_FEATURE_REQUEST</b> - DevChapter9.h \n
* In some limited USB device applications, the Get Feature and Set Feature requests are not used - this is when the device does not have
* device level features (such as remote wakeup) nor any data endpoints beyond the mandatory control endpoint. In such limited situations,
* this token may be defined to remove the handling of the Get Feature and Set Feature Chapter 9 requests to save space. Generally, this
* is usually only useful in (some) bootloaders.
*
* <b>NO_STREAM_CALLBACKS</b> - Endpoint.h, Pipe.h \n
* Both the endpoint and the pipe driver code contains stream functions, allowing for arrays of data to be sent to or from the
* host easily via a single function call (rather than complex routines worrying about sending full packets, waiting for the endpoint/
* pipe to become ready, etc.). By default, these stream functions require a callback function which is executed after each byte processed,
* allowing for early-aborts of stream transfers by the application. If callbacks are not required in an application, they can be removed
* by defining this token, reducing the compiled binary size. When removed, the stream functions no longer accept a callback function as
* a parameter.
*
* <b>USB_HOST_TIMEOUT_MS</b> - Host.h \n
* When a control transfer is initiated in host mode to an attached device, a timeout is used to abort the transfer if the attached
* device fails to respond within the timeout period. This token may be defined to a non-zero value to set the timeout period for
* control transfers, specified in milliseconds. If not defined, the default value specified in Host.h is used instead.
*
* <b>HOST_DEVICE_SETTLE_DELAY_MS</b> - Host.h \n
* Some devices require a delay of up to 5 seconds after they are connected to VBUS before the enumeration process can be started, or
* they will fail to enumerate correctly. By placing a delay before the enumeration process, it can be ensured that the bus has settled
* back to a known idle state before communications occur with the device. This token may be defined to a non-zero value to set the
* device settle period, specified in milliseconds. If not defined, the default value specified in Host.h is used instead.
*
* <b>USE_STATIC_OPTIONS</b> - LowLevel.h \n
* By default, the USB_Init() function accepts dynamic options at runtime to alter the library behaviour, including whether the USB pad
* voltage regulator is enabled, and the device speed when in device mode. By defining this token to a mask comprised of the USB options
* mask defines usually passed as the Options parameter to USB_Init(), the resulting compiled binary can be decreased in size by removing
* the dynamic options code, and replacing it with the statically set options. When defined, the USB_Init() function no longer accepts an
* Options parameter.
*
* <b>USB_DEVICE_ONLY</b> - LowLevel.h \n
* For the USB AVR models supporting both device and host USB modes, the USB_Init() function contains a Mode parameter which specifies the
* mode the library should be initialized to. If only device mode is required, the code for USB host mode can be removed from the binary to
* save space. When defined, the USB_Init() function no longer accepts a Mode parameter. This define is irrelevent on smaller USB AVRs which
* do not support host mode.
*
* <b>USB_HOST_ONLY</b> - LowLevel.h \n
* Same as USB_DEVICE_ONLY, except the library is fixed to USB host mode rather than USB device mode. Not available on some USB AVR models.
*
* <b>USB_STREAM_TIMEOUT_MS</b> - LowLevel.h \n
* When endpoint and/or pipe stream functions are used, by default there is a timeout between each transfer which the connected device or host
* must satisfy, or the stream function aborts the remaining data transfer. This token may be defined to a non-zero value to set the timeout
* period for stream transfers, specified in milliseconds. If not defined, the default value specified in LowLevel.h is used instead.
*
* <b>NO_LIMITED_CONTROLLER_CONNECT</b> - Events.h \n
* On the smaller USB AVRs, the USB controller lacks VBUS events to determine the physical connection state of the USB bus to a host. In lieu of
* VBUS events, the library attempts to determine the connection state via the bus suspension and wake up events instead. This however may be
* slightly inaccurate due to the possibility of the host suspending the bus while the device is still connected. If accurate connection status is
* required, the VBUS line of the USB connector should be routed to an AVR pin to detect its level, so that the USB_IsConnected global
* can be accurately set and the USB_Connect and USB_Disconnect events manually raised by the RAISE_EVENT macro. When defined, this token disables
* the library's auto-detection of the connection state by the aformentioned suspension and wake up events.
*/
/** \file
*
* This file contains special DoxyGen information for the generation of the main page and other special
* documentation pages. It is not a project source file.
*/
/** \dir Common