*/
static bool RunBootloader = true;
+/** Magic lock for forced application start. If the HWBE fuse is programmed and BOOTRST is unprogrammed, the bootloader
+ * will start if the /HWB line of the AVR is held low and the system is reset. However, if the /HWB line is still held
+ * low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
+ * \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
+ */
+uint32_t MagicBootKey ATTR_NO_INIT;
+
+
+/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
+ * start key has been loaded into \ref MagicBootKey. If the bootloader started via the watchdog and the key is valid,
+ * this will force the user application to start via a software jump.
+ */
+void Application_Jump_Check(void)
+{
+ /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
+ if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
+ {
+ MagicBootKey = 0;
+ // cppcheck-suppress constStatement
+ ((void (*)(void))0x0000)();
+ }
+}
/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
* runs the bootloader processing routine until instructed to soft-exit, or hard-reset via the watchdog to start
/* Disconnect from the host - USB interface will be reset later along with the AVR */
USB_Detach();
+
+ /* Unlock the forced application start mode of the bootloader if it is restarted */
+ MagicBootKey = MAGIC_BOOT_KEY;
/* Enable the watchdog and force a timeout to reset the AVR */
wdt_enable(WDTO_250MS);
void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Setup CDC Notification, Rx and Tx Endpoints */
- Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,
- ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,
- ENDPOINT_BANK_SINGLE);
+ Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT,
+ CDC_NOTIFICATION_EPSIZE, 1);
- Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,
- ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,
- ENDPOINT_BANK_SINGLE);
+ Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
- Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,
- ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,
- ENDPOINT_BANK_SINGLE);
+ Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
}
/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
static uint8_t FetchNextCommandByte(void)
{
/* Select the OUT endpoint so that the next data byte can be read */
- Endpoint_SelectEndpoint(CDC_RX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_RX_EPADDR);
/* If OUT endpoint empty, clear it and wait for the next packet from the host */
while (!(Endpoint_IsReadWriteAllowed()))
static void WriteNextResponseByte(const uint8_t Response)
{
/* Select the IN endpoint so that the next data byte can be written */
- Endpoint_SelectEndpoint(CDC_TX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_TX_EPADDR);
/* If IN endpoint full, clear it and wait until ready for the next packet to the host */
if (!(Endpoint_IsReadWriteAllowed()))
static void CDC_Task(void)
{
/* Select the OUT endpoint */
- Endpoint_SelectEndpoint(CDC_RX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_RX_EPADDR);
/* Check if endpoint has a command in it sent from the host */
if (!(Endpoint_IsOUTReceived()))
}
/* Select the IN endpoint */
- Endpoint_SelectEndpoint(CDC_TX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_TX_EPADDR);
/* Remember if the endpoint is completely full before clearing it */
bool IsEndpointFull = !(Endpoint_IsReadWriteAllowed());
}
/* Select the OUT endpoint */
- Endpoint_SelectEndpoint(CDC_RX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_RX_EPADDR);
/* Acknowledge the command from the host */
Endpoint_ClearOUT();
/** Eight character bootloader firmware identifier reported to the host when requested */
#define SOFTWARE_IDENTIFIER "LUFACDC"
+ /** Magic bootloader key to unlock forced application start mode. */
+ #define MAGIC_BOOT_KEY 0xDC42CACA
+
/* Type Defines: */
/** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;
static void CDC_Task(void);
static void SetupHardware(void);
+ void Application_Jump_Check(void) ATTR_INIT_SECTION(3);
+
void EVENT_USB_Device_ConfigurationChanged(void);
#if defined(INCLUDE_FROM_BOOTLOADERCDC_C) || defined(__DOXYGEN__)
* This bootloader enumerates to the host as a CDC Class device (virtual serial port), allowing for AVR109
* protocol compatible programming software to load firmware onto the AVR.
*
- * Out of the box this bootloader builds for the USB1287, and will fit into 4KB of bootloader space. If
- * you wish to enlarge this space and/or change the AVR model, you will need to edit the BOOT_START and MCU
- * values in the accompanying makefile.
+ * Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit
+ * into 4KB of bootloader space. If you wish to alter this size and/or change the AVR model, you will need to
+ * edit the MCU, FLASH_SIZE_KB and BOOT_SECTION_SIZE_KB values in the accompanying makefile.
*
* When the bootloader is running, the board's LED(s) will flash at regular intervals to distinguish the
* bootloader from the normal user application.
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 LUFA Library Configuration Header File
+ *
+ * This is a header file which is be used to configure LUFA's
+ * compile time options, as an alternative to the compile time
+ * constants supplied through a makefile.
+ *
+ * For information on what each token does, refer to the LUFA
+ * manual section "Summary of Compile Tokens".
+ */
+
+#ifndef _APP_CONFIG_H_
+#define _APP_CONFIG_H_
+
+ #define NO_BLOCK_SUPPORT
+ #define NO_EEPROM_BYTE_SUPPORT
+ #define NO_FLASH_BYTE_SUPPORT
+ #define NO_LOCK_BYTE_WRITE_SUPPORT
+
+#endif
\ No newline at end of file
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 LUFA Library Configuration Header File
+ *
+ * This is a header file which is be used to configure LUFA's
+ * compile time options, as an alternative to the compile time
+ * constants supplied through a makefile.
+ *
+ * For information on what each token does, refer to the LUFA
+ * manual section "Summary of Compile Tokens".
+ */
+
+#ifndef _LUFA_CONFIG_H_
+#define _LUFA_CONFIG_H_
+
+ #if (ARCH == ARCH_AVR8)
+
+ /* Non-USB Related Configuration Tokens: */
+// #define DISABLE_TERMINAL_CODES
+
+ /* USB Class Driver Related Tokens: */
+// #define HID_HOST_BOOT_PROTOCOL_ONLY
+// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here}
+// #define HID_USAGE_STACK_DEPTH {Insert Value Here}
+// #define HID_MAX_COLLECTIONS {Insert Value Here}
+// #define HID_MAX_REPORTITEMS {Insert Value Here}
+// #define HID_MAX_REPORT_IDS {Insert Value Here}
+// #define NO_CLASS_DRIVER_AUTOFLUSH
+
+ /* General USB Driver Related Tokens: */
+ #define ORDERED_EP_CONFIG
+ #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
+ #define USB_DEVICE_ONLY
+// #define USB_HOST_ONLY
+// #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
+// #define NO_LIMITED_CONTROLLER_CONNECT
+ #define NO_SOF_EVENTS
+
+ /* USB Device Mode Driver Related Tokens: */
+ #define USE_RAM_DESCRIPTORS
+// #define USE_FLASH_DESCRIPTORS
+// #define USE_EEPROM_DESCRIPTORS
+ #define NO_INTERNAL_SERIAL
+ #define FIXED_CONTROL_ENDPOINT_SIZE 8
+ #define DEVICE_STATE_AS_GPIOR 0
+ #define FIXED_NUM_CONFIGURATIONS 1
+// #define CONTROL_ONLY_DEVICE
+// #define INTERRUPT_CONTROL_ENDPOINT
+ #define NO_DEVICE_REMOTE_WAKEUP
+ #define NO_DEVICE_SELF_POWER
+
+ /* USB Host Mode Driver Related Tokens: */
+// #define HOST_STATE_AS_GPIOR {Insert Value Here}
+// #define USB_HOST_TIMEOUT_MS {Insert Value Here}
+// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
+// #define NO_AUTO_VBUS_MANAGEMENT
+// #define INVERTED_VBUS_ENABLE_LINE
+
+ #else
+
+ #error Unsupported architecture for this LUFA configuration file.
+
+ #endif
+#endif
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#error The selected AVR part is not currently supported by this bootloader.
#endif
- /** Endpoint number for the CDC control interface event notification endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address for the CDC control interface event notification endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number for the CDC data interface TX (data IN) endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address for the CDC data interface TX (data IN) endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number for the CDC data interface RX (data OUT) endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address for the CDC data interface RX (data OUT) endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size of the CDC data interface TX and RX data endpoint banks, in bytes. */
#define CDC_TXRX_EPSIZE 16
# Note that the bootloader size and start address given in AVRStudio is in words and not
# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
FLASH_SIZE_KB = 128
-BOOT_SECTION_SIZE_KB = 4
+BOOT_SECTION_SIZE_KB = 8
# Formulas used to calculate the starting address of the Bootloader section, and the User Application
# LUFA library compile-time options and predefined tokens
-LUFA_OPTS = -D USB_DEVICE_ONLY
-LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0
-LUFA_OPTS += -D ORDERED_EP_CONFIG
-LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8
-LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1
-LUFA_OPTS += -D USE_RAM_DESCRIPTORS
-LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
-LUFA_OPTS += -D NO_INTERNAL_SERIAL
-LUFA_OPTS += -D NO_DEVICE_SELF_POWER
-LUFA_OPTS += -D NO_DEVICE_REMOTE_WAKEUP
-LUFA_OPTS += -D NO_SOF_EVENTS
-
-#LUFA_OPTS += -D NO_BLOCK_SUPPORT
-#LUFA_OPTS += -D NO_EEPROM_BYTE_SUPPORT
-#LUFA_OPTS += -D NO_FLASH_BYTE_SUPPORT
-#LUFA_OPTS += -D NO_LOCK_BYTE_WRITE_SUPPORT
+LUFA_OPTS = -D USE_LUFA_CONFIG_HEADER
# Create the LUFA source path variables by including the LUFA root makefile
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS = $(LUFA_PATH)/
+EXTRAINCDIRS = $(LUFA_PATH)/ Config/
# Compiler flag to set the C Standard level.
*/
static uint16_t EndAddr = 0x0000;
+/** Magic lock for forced application start. If the HWBE fuse is programmed and BOOTRST is unprogrammed, the bootloader
+ * will start if the /HWB line of the AVR is held low and the system is reset. However, if the /HWB line is still held
+ * low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
+ * \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
+ */
+uint32_t MagicBootKey ATTR_NO_INIT;
+
+
+/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
+ * start key has been loaded into \ref MagicBootKey. If the bootloader started via the watchdog and the key is valid,
+ * this will force the user application to start via a software jump.
+ */
+void Application_Jump_Check(void)
+{
+ // If the reset source was the bootloader and the key is correct, clear it and jump to the application
+ if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
+ {
+ MagicBootKey = 0;
+ AppStartPtr();
+ }
+}
/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
* runs the bootloader processing routine until instructed to soft-exit, or hard-reset via the watchdog to start
{
if (SentCommand.Data[1] == 0x00) // Start via watchdog
{
+ /* Unlock the forced application start mode of the bootloader if it is restarted */
+ MagicBootKey = MAGIC_BOOT_KEY;
+
/* Start the watchdog to reset the AVR once the communications are finalized */
wdt_enable(WDTO_250MS);
}
/** Minor bootloader version number. */
#define BOOTLOADER_VERSION_REV 0
+
+ /** Magic bootloader key to unlock forced application start mode. */
+ #define MAGIC_BOOT_KEY 0xDC42CACA
/** Complete bootloader version number expressed as a packed byte, constructed from the
* two individual bootloader version macros.
static void ProcessWriteCommand(void);
static void ProcessReadCommand(void);
#endif
+
+ void Application_Jump_Check(void) ATTR_INIT_SECTION(3);
#endif
* This bootloader enumerates to the host as a DFU Class device, allowing for DFU-compatible programming
* software to load firmware onto the AVR.
*
- * Out of the box this bootloader builds for the USB1287, and should fit into 4KB of bootloader space. If
- * you wish to enlarge this space and/or change the AVR model, you will need to edit the BOOT_START and MCU
- * values in the accompanying makefile.
+ * Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit
+ * into 4KB of bootloader space. If you wish to alter this size and/or change the AVR model, you will need to
+ * edit the MCU, FLASH_SIZE_KB and BOOT_SECTION_SIZE_KB values in the accompanying makefile.
*
* When the bootloader is running, the board's LED(s) will flash at regular intervals to distinguish the
* bootloader from the normal user application.
.DetachTimeout = 0x0000,
.TransferSize = 0x0C00,
- .DFUSpecification = VERSION_BCD(01.01)
+ .DFUSpecification = VERSION_BCD(01.10)
}
};
# Note that the bootloader size and start address given in AVRStudio is in words and not
# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
FLASH_SIZE_KB = 128
-BOOT_SECTION_SIZE_KB = 4
+BOOT_SECTION_SIZE_KB = 8
# Formulas used to calculate the starting address of the Bootloader section, and the User Application
*/
static bool RunBootloader = true;
+/** Magic lock for forced application start. If the HWBE fuse is programmed and BOOTRST is unprogrammed, the bootloader
+ * will start if the /HWB line of the AVR is held low and the system is reset. However, if the /HWB line is still held
+ * low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
+ * \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
+ */
+uint32_t MagicBootKey ATTR_NO_INIT;
+
+
+/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
+ * start key has been loaded into \ref MagicBootKey. If the bootloader started via the watchdog and the key is valid,
+ * this will force the user application to start via a software jump.
+ */
+void Application_Jump_Check(void)
+{
+ /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
+ if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
+ {
+ MagicBootKey = 0;
+ // cppcheck-suppress constStatement
+ ((void (*)(void))0x0000)();
+ }
+}
+
/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
* runs the bootloader processing routine until instructed to soft-exit.
*/
/* Disconnect from the host - USB interface will be reset later along with the AVR */
USB_Detach();
+ /* Unlock the forced application start mode of the bootloader if it is restarted */
+ MagicBootKey = MAGIC_BOOT_KEY;
+
/* Enable the watchdog and force a timeout to reset the AVR */
wdt_enable(WDTO_250MS);
void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Setup HID Report Endpoint */
- Endpoint_ConfigureEndpoint(HID_IN_EPNUM, EP_TYPE_INTERRUPT,
- ENDPOINT_DIR_IN, HID_IN_EPSIZE,
- ENDPOINT_BANK_SINGLE);
+ Endpoint_ConfigureEndpoint(HID_IN_EPADDR, EP_TYPE_INTERRUPT, HID_IN_EPSIZE, 1);
}
/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
/** Bootloader special address to start the user application */
#define COMMAND_STARTAPPLICATION 0xFFFF
+ /** Magic bootloader key to unlock forced application start mode. */
+ #define MAGIC_BOOT_KEY 0xDC42CACA
+
/* Function Prototypes: */
static void SetupHardware(void);
+ void Application_Jump_Check(void) ATTR_INIT_SECTION(3);
+
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);
* from PJRC (used with permission). This bootloader is deliberatley non-compatible with the properietary PJRC
* HalfKay bootloader GUI; only the command line interface software accompanying this bootloader will work with it.
*
- * Out of the box this bootloader builds for the USB1287, and will fit into 2KB of bootloader space for the
- * Series 2 USB AVRs (ATMEGAxxU2, AT90USBxx2) or 4KB of bootloader space for all other models. If you wish to
- * enlarge this space and/or change the AVR model, you will need to edit the BOOT_START and MCU values in the
- * accompanying makefile.
+ * Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit
+ * into 2KB of bootloader space for the Series 2 USB AVRs (ATMEGAxxU2, AT90USBxx2) or 4KB of bootloader space for
+ * all other models. If you wish to alter this size and/or change the AVR model, you will need to edit the MCU,
+ * FLASH_SIZE_KB and BOOT_SECTION_SIZE_KB values in the accompanying makefile.
*
* \section Sec_Installation Driver Installation
*
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | HID_IN_EPNUM),
+ .EndpointAddress = HID_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_IN_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the HID data IN endpoint. */
- #define HID_IN_EPNUM 1
+ /** Endpoint address of the HID data IN endpoint. */
+ #define HID_IN_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the HID reporting IN endpoint. */
#define HID_IN_EPSIZE 64
} else if (strncmp(arg, "-mmcu=", 6) == 0) {
arg += 6;
- uint8_t valid_prefix = 0;
-
if (strncmp(arg, "at90usb", 7) == 0) {
- valid_prefix = 1;
arg += 7;
} else if (strncmp(arg, "atmega", 6) == 0) {
- valid_prefix = 1;
arg += 6;
} else {
die("Unknown MCU type\n");
# Note that the bootloader size and start address given in AVRStudio is in words and not
# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
FLASH_SIZE_KB = 128
-BOOT_SECTION_SIZE_KB = 4
+BOOT_SECTION_SIZE_KB = 8
# Formulas used to calculate the starting address of the Bootloader section. These formulas
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 LUFA Custom Board Button Hardware Driver (Template)
+ *
+ * This is a stub driver header file, for implementing custom board
+ * layout hardware with compatible LUFA board specific drivers. If
+ * the library is configured to use the BOARD_USER board mode, this
+ * driver file should be completed and copied into the "/Board/" folder
+ * inside the application's folder.
+ *
+ * This stub is for the board-specific component of the LUFA Buttons driver,
+ * for the control of physical board-mounted GPIO pushbuttons.
+ */
+
+#ifndef __BUTTONS_USER_H__
+#define __BUTTONS_USER_H__
+
+ /* Includes: */
+ // TODO: Add any required includes here
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_BUTTONS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Button mask for the first button on the board. */
+ #define BUTTONS_BUTTON1 (1 << 0)
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void Buttons_Init(void)
+ {
+
+ }
+
+ static inline void Buttons_Disable(void)
+ {
+
+ }
+
+ static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t Buttons_GetStatus(void)
+ {
+ return 0;
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 LUFA Custom Board Dataflash Hardware Driver (Template)
+ *
+ * This is a stub driver header file, for implementing custom board
+ * layout hardware with compatible LUFA board specific drivers. If
+ * the library is configured to use the BOARD_USER board mode, this
+ * driver file should be completed and copied into the "/Board/" folder
+ * inside the application's folder.
+ *
+ * This stub is for the board-specific component of the LUFA Dataflash
+ * driver.
+*/
+
+#ifndef __DATAFLASH_USER_H__
+#define __DATAFLASH_USER_H__
+
+ /* Includes: */
+ // TODO: Add any required includes here
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_DATAFLASH_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/Dataflash.h instead.
+ #endif
+
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
+ /* Macros: */
+ #define DATAFLASH_CHIPCS_MASK // TODO: Replace this with a mask of all the /CS pins of all Dataflashes
+ #define DATAFLASH_CHIPCS_DDR // TODO: Replace with the DDR register name for the board's Dataflash ICs
+ #define DATAFLASH_CHIPCS_PORT // TODO: Replace with the PORT register name for the board's Dataflash ICs
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Constant indicating the total number of dataflash ICs mounted on the selected board. */
+ #define DATAFLASH_TOTALCHIPS 1 // TODO: Replace with the number of Dataflashes on the board, max 2
+
+ /** Mask for no dataflash chip selected. */
+ #define DATAFLASH_NO_CHIP DATAFLASH_CHIPCS_MASK
+
+ /** Mask for the first dataflash chip selected. */
+ #define DATAFLASH_CHIP1 // TODO: Replace with mask to hold /CS of first Dataflash low, and all others high
+
+ /** Mask for the second dataflash chip selected. */
+ #define DATAFLASH_CHIP2 // TODO: Replace with mask to hold /CS of second Dataflash low, and all others high
+
+ /** Internal main memory page size for the board's dataflash ICs. */
+ #define DATAFLASH_PAGE_SIZE // TODO: Replace with the page size for the Dataflash ICs
+
+ /** Total number of pages inside each of the board's dataflash ICs. */
+ #define DATAFLASH_PAGES // TODO: Replace with the total number of pages inside one of the Dataflash ICs
+
+ /* Inline Functions: */
+ /** Initializes the dataflash driver so that commands and data may be sent to an attached dataflash IC.
+ * The microcontroller's SPI driver MUST be initialized before any of the dataflash commands are used.
+ */
+ static inline void Dataflash_Init(void)
+ {
+
+ }
+
+ /** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.
+ *
+ * \param[in] Byte Byte of data to send to the dataflash
+ *
+ * \return Last response byte from the dataflash
+ */
+ static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
+ static inline uint8_t Dataflash_TransferByte(const uint8_t Byte)
+ {
+ return 0;
+ }
+
+ /** Sends a byte to the currently selected dataflash IC, and ignores the next byte from the dataflash.
+ *
+ * \param[in] Byte Byte of data to send to the dataflash
+ */
+ static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
+ static inline void Dataflash_SendByte(const uint8_t Byte)
+ {
+
+ }
+
+ /** Sends a dummy byte to the currently selected dataflash IC, and returns the next byte from the dataflash.
+ *
+ * \return Last response byte from the dataflash
+ */
+ static inline uint8_t Dataflash_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t Dataflash_ReceiveByte(void)
+ {
+ return 0;
+ }
+
+ /** Determines the currently selected dataflash chip.
+ *
+ * \return Mask of the currently selected Dataflash chip, either \ref DATAFLASH_NO_CHIP if no chip is selected
+ * or a DATAFLASH_CHIPn mask (where n is the chip number).
+ */
+ static inline uint8_t Dataflash_GetSelectedChip(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t Dataflash_GetSelectedChip(void)
+ {
+ return 0;
+ }
+
+ /** Selects the given dataflash chip.
+ *
+ * \param[in] ChipMask Mask of the Dataflash IC to select, in the form of DATAFLASH_CHIPn mask (where n is
+ * the chip number).
+ */
+ static inline void Dataflash_SelectChip(const uint8_t ChipMask) ATTR_ALWAYS_INLINE;
+ static inline void Dataflash_SelectChip(const uint8_t ChipMask)
+ {
+
+ }
+
+ /** Deselects the current dataflash chip, so that no dataflash is selected. */
+ static inline void Dataflash_DeselectChip(void) ATTR_ALWAYS_INLINE;
+ static inline void Dataflash_DeselectChip(void)
+ {
+
+ }
+
+ /** Selects a dataflash IC from the given page number, which should range from 0 to
+ * ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). For boards containing only one
+ * dataflash IC, this will select DATAFLASH_CHIP1. If the given page number is outside
+ * the total number of pages contained in the boards dataflash ICs, all dataflash ICs
+ * are deselected.
+ *
+ * \param[in] PageAddress Address of the page to manipulate, ranging from
+ * 0 to ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1).
+ */
+ static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress)
+ {
+
+ }
+
+ /** Toggles the select line of the currently selected dataflash IC, so that it is ready to receive
+ * a new command.
+ */
+ static inline void Dataflash_ToggleSelectedChipCS(void)
+ {
+
+ }
+
+ /** Spin-loops while the currently selected dataflash is busy executing a command, such as a main
+ * memory page program or main memory to buffer transfer.
+ */
+ static inline void Dataflash_WaitWhileBusy(void)
+ {
+
+ }
+
+ /** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with
+ * dataflash commands which require a complete 24-bit address.
+ *
+ * \param[in] PageAddress Page address within the selected dataflash IC
+ * \param[in] BufferByte Address within the dataflash's buffer
+ */
+ static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
+ {
+
+ }
+
+#endif
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 LUFA Custom Board Joystick Hardware Driver (Template)
+ *
+ * This is a stub driver header file, for implementing custom board
+ * layout hardware with compatible LUFA board specific drivers. If
+ * the library is configured to use the BOARD_USER board mode, this
+ * driver file should be completed and copied into the "/Board/" folder
+ * inside the application's folder.
+ *
+ * This stub is for the board-specific component of the LUFA Joystick
+ * driver, for a digital four-way (plus button) joystick.
+*/
+
+#ifndef __JOYSTICK_USER_H__
+#define __JOYSTICK_USER_H__
+
+ /* Includes: */
+ // TODO: Add any required includes here
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_JOYSTICK_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead.
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Mask for the joystick being pushed in the left direction. */
+ #define JOY_LEFT // TODO: Add mask to indicate joystick left position here
+
+ /** Mask for the joystick being pushed in the right direction. */
+ #define JOY_RIGHT // TODO: Add mask to indicate joystick right position here
+
+ /** Mask for the joystick being pushed in the upward direction. */
+ #define JOY_UP // TODO: Add mask to indicate joystick up position here
+
+ /** Mask for the joystick being pushed in the downward direction. */
+ #define JOY_DOWN // TODO: Add mask to indicate joystick down position here
+
+ /** Mask for the joystick being pushed inward. */
+ #define JOY_PRESS // TODO: Add mask to indicate joystick pressed position here
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void Joystick_Init(void)
+ {
+
+ }
+
+ static inline void Joystick_Disable(void)
+ {
+
+ }
+
+ static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t Joystick_GetStatus(void)
+ {
+ return 0;
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 LUFA Custom Board LED Hardware Driver (Template)
+ *
+ * This is a stub driver header file, for implementing custom board
+ * layout hardware with compatible LUFA board specific drivers. If
+ * the library is configured to use the BOARD_USER board mode, this
+ * driver file should be completed and copied into the "/Board/" folder
+ * inside the application's folder.
+ *
+ * This stub is for the board-specific component of the LUFA LEDs driver,
+ * for the LEDs (up to four) mounted on most development boards.
+*/
+
+#ifndef __LEDS_USER_H__
+#define __LEDS_USER_H__
+
+ /* Includes: */
+ // TODO: Add any required includes here
+
+/* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_LEDS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** LED mask for the first LED on the board. */
+ #define LEDS_LED1 (1 << 0)
+
+ /** LED mask for the second LED on the board. */
+ #define LEDS_LED2 (1 << 1)
+
+ /** LED mask for the third LED on the board. */
+ #define LEDS_LED3 (1 << 2)
+
+ /** LED mask for the fourth LED on the board. */
+ #define LEDS_LED4 (1 << 3)
+
+ /** LED mask for all the LEDs on the board. */
+ #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
+
+ /** LED mask for none of the board LEDs. */
+ #define LEDS_NO_LEDS 0
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void LEDs_Init(void)
+ {
+
+ }
+
+ static inline void LEDs_Disable(void)
+ {
+
+ }
+
+ static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
+ {
+
+ }
+
+ static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
+ {
+
+ }
+
+ static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
+ {
+
+ }
+
+ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
+ {
+
+ }
+
+ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
+ {
+
+ }
+
+ static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t LEDs_GetLEDs(void)
+ {
+ return 0;
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
--- /dev/null
+# BOARD DEFINE = {ARCH} : {MCU} :\r
+BOARD_USER = avr8 : at90usb1287 :\r
+BOARD_NONE = avr8 : at90usb1287 :\r
+BOARD_USBKEY = avr8 : at90usb1287 :\r
+BOARD_STK525 = avr8 : at90usb647 :\r
+BOARD_STK526 = avr8 : at90usb162 :\r
+BOARD_RZUSBSTICK = avr8 : at90usb1287 :\r
+BOARD_ATAVRUSBRF01 = avr8 : at90usb1287 :\r
+BOARD_BUMBLEB = avr8 : at90usb162 :\r
+BOARD_XPLAIN = avr8 : at90usb1287 :\r
+BOARD_XPLAIN_REV1 = avr8 : at90usb1287 :\r
+BOARD_EVK527 = avr8 : atmega32u4 :\r
+BOARD_TEENSY = avr8 : at90usb162 :\r
+BOARD_USBTINYMKII = avr8 : at90usb162 :\r
+BOARD_BENITO = avr8 : at90usb162 :\r
+BOARD_JMDBU2 = avr8 : atmega32u2 :\r
+BOARD_OLIMEX162 = avr8 : at90usb162 :\r
+BOARD_UDIP = avr8 : atmega32u2 :\r
+BOARD_BUI = avr8 : at90usb646 :\r
+BOARD_UNO = avr8 : atmega8u2 :\r
+BOARD_CULV3 = avr8 : atmega32u4 :\r
+BOARD_BLACKCAT = avr8 : at90usb162 :\r
+BOARD_MAXIMUS = avr8 : at90usb162 :\r
+BOARD_MINIMUS = avr8 : atmega32u2 :\r
+BOARD_ADAFRUITU4 = avr8 : atmega32u4 :\r
+BOARD_MICROSIN162 = avr8 : atmega162 :\r
+BOARD_USBFOO = avr8 : atmega162 :\r
+BOARD_SPARKFUN8U2 = avr8 : atmega8u2 :\r
+BOARD_EVK1101 = uc3 : uc3b0256 :\r
+BOARD_TUL = avr8 : atmega32u4 :\r
+BOARD_EVK1100 = uc3 : uc3a0512 :\r
+BOARD_EVK1104 = uc3 : uc3a3256 :\r
+BOARD_A3BU_XPLAINED = xmega : atxmega256a3bu :\r
+BOARD_TEENSY2 = avr8 : at90usb646 :\r
+BOARD_USB2AX = avr8 : atmega32u4 :\r
+BOARD_USB2AX_V3 = avr8 : atmega32u4 :\r
+BOARD_MICROPENDOUS_32U2 = avr8 : atmega32u2 :\r
+BOARD_MICROPENDOUS_A = avr8 : at90usb1287 :\r
+BOARD_MICROPENDOUS_1 = avr8 : at90usb162 :\r
+BOARD_MICROPENDOUS_2 = avr8 : atmega32u4 :\r
+BOARD_MICROPENDOUS_3 = avr8 : at90usb1287 :\r
+BOARD_MICROPENDOUS_4 = avr8 : at90usb1287 :\r
+BOARD_MICROPENDOUS_DIP = avr8 : at90usb1287 :\r
+BOARD_MICROPENDOUS_REV1 = avr8 : at90usb1287 :\r
+BOARD_MICROPENDOUS_REV2 = avr8 : at90usb1287 :\r
+BOARD_B1_XPLAINED = xmega : atxmega128b1 :\r
+BOARD_MULTIO = avr8 : at90usb162 :\r
+BOARD_BIGMULTIO = avr8 : atmega32u4 :\r
+BOARD_DUCE = avr8 : atmega32u2 :\r
+BOARD_OLIMEX32U4 = avr8 : atmega32u4 :\r
+BOARD_OLIMEXT32U4 = avr8 : atmega32u4 :
\ No newline at end of file
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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.
+*/
+
+#include <LUFA/Common/Common.h>
+#include <LUFA/Drivers/Board/Buttons.h>
+#include <LUFA/Drivers/Board/Dataflash.h>
+#include <LUFA/Drivers/Board/LEDs.h>
+#include <LUFA/Drivers/Board/Joystick.h>
+
+int main(void)
+{
+ uint_reg_t Dummy;
+
+ /* Buttons Compile Check */
+ Buttons_Init();
+ Dummy = Buttons_GetStatus();
+ Buttons_Disable();
+
+ /* Dataflash Compile Check */
+ Dataflash_Init();
+ Dataflash_TransferByte(0);
+ Dataflash_SendByte(0);
+ Dummy = Dataflash_ReceiveByte();
+ Dummy = Dataflash_GetSelectedChip();
+ Dataflash_SelectChip(0);
+ Dataflash_DeselectChip();
+ Dataflash_SelectChipFromPage(0);
+ Dataflash_ToggleSelectedChipCS();
+ Dataflash_WaitWhileBusy();
+ Dataflash_SendAddressBytes(0, 0);
+
+ /* LEDs Compile Check */
+ LEDs_Init();
+ LEDs_TurnOnLEDs(LEDS_ALL_LEDS);
+ LEDs_TurnOffLEDs(LEDS_ALL_LEDS);
+ LEDs_SetAllLEDs(LEDS_ALL_LEDS);
+ LEDs_ChangeLEDs(LEDS_ALL_LEDS, LEDS_NO_LEDS);
+ LEDs_ToggleLEDs(LEDS_ALL_LEDS);
+ Dummy = LEDs_GetLEDs();
+ LEDs_Disable();
+
+ /* Joystick Compile Check */
+ Joystick_Init();
+ Dummy = Joystick_GetStatus();
+ Joystick_Disable();
+
+ (void)Dummy;
+}
+
+
--- /dev/null
+#\r
+# LUFA Library\r
+# Copyright (C) Dean Camera, 2011.\r
+#\r
+# dean [at] fourwalledcubicle [dot] com\r
+# www.lufa-lib.org\r
+#\r
+\r
+# Makefile for the board driver build test. This\r
+# test attempts to build a dummy project with all\r
+# possible board targets using their respective\r
+# compiler.\r
+\r
+# Path to the root of the LUFA tree to scan\r
+LUFA_ROOT_PATH = ../..\r
+\r
+\r
+all: begin makeboardlist testboards clean end\r
+\r
+begin:\r
+ @echo Executing build test "BoardDriverTest".\r
+ @echo\r
+\r
+end:\r
+ @echo Build test "BoardDriverTest" complete.\r
+ @echo\r
+\r
+makeboardlist:\r
+ @grep "BOARD_" $(LUFA_ROOT_PATH)/LUFA/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt\r
+ \r
+testboards:\r
+ echo "buildtest:" > BuildMakefile\r
+ \r
+ @while read line; \\r
+ do \\r
+ build_cfg=`grep "$$line " BoardDeviceMap.cfg | sed 's/ //g' | cut -d'=' -f2-`; \\r
+ \\r
+ build_board=$$line; \\r
+ build_arch=`echo $$build_cfg | cut -d':' -f1`; \\r
+ build_mcu=`echo $$build_cfg | cut -d':' -f2`; \\r
+ \\r
+ if ( test -z "$$build_cfg" ); then \\r
+ echo "No matching information set for board $$build_board"; \\r
+ else \\r
+ echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu"; \\r
+ \\r
+ printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile; \\r
+ printf "\tmake -s -f makefile.%s clean\n" $$build_arch >> BuildMakefile; \\r
+ printf "\tmake -s -f makefile.%s MCU=%s BOARD=%s elf\n\n" $$build_arch $$build_mcu $$build_board >> BuildMakefile; \\r
+ fi; \\r
+ done < BoardList.txt\r
+ \r
+ $(MAKE) -f BuildMakefile buildtest\r
+\r
+clean:\r
+ rm -f BuildMakefile\r
+ rm -f BoardList.txt\r
+ $(MAKE) -f makefile.avr8 clean\r
+ $(MAKE) -f makefile.xmega clean\r
+ $(MAKE) -f makefile.uc3 clean\r
+\r
+%:\r
+
\ No newline at end of file
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging,\r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = at90usb1287\r
+\r
+\r
+# Target architecture (see library "Board Types" documentation).\r
+ARCH = AVR8\r
+\r
+\r
+# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called\r
+# "Board" inside the application directory.\r
+BOARD = NONE\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the\r
+# processor frequency in Hz. You can then use this symbol in your source code to\r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+#\r
+# This will be an integer division of F_USB below, as it is sourced by\r
+# F_USB after it has run through any CPU prescalers. Note that this value\r
+# does not *change* the processor frequency - it should merely be updated to\r
+# reflect the processor speed set externally so that the code can use accurate\r
+# software delays.\r
+F_CPU = 16000000\r
+\r
+\r
+# Input clock frequency.\r
+# This will define a symbol, F_USB, in all source code files equal to the\r
+# input clock frequency (before any prescaling is performed) in Hz. This value may\r
+# differ from F_CPU if prescaling is used on the latter, and is required as the\r
+# raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+# at the end, this will be done automatically to create a 32-bit value in your\r
+# source code.\r
+#\r
+# If no clock division is performed on the input clock inside the AVR (via the\r
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_USB = $(F_CPU)\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = Test\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# Path to the LUFA library\r
+LUFA_PATH = ../..\r
+\r
+\r
+# LUFA library compile-time options and predefined tokens\r
+LUFA_OPTS = \r
+\r
+\r
+# Create the LUFA source path variables by including the LUFA root makefile\r
+include $(LUFA_PATH)/LUFA/makefile\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = Test.c\r
+\r
+\r
+\r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC = \r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s].\r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = $(LUFA_PATH)/\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=c99\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL\r
+CDEFS += -DF_USB=$(F_USB)UL\r
+CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)\r
+CDEFS += $(LUFA_OPTS)\r
+\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+ADEFS += -DF_USB=$(F_USB)UL\r
+ADEFS += -DBOARD=BOARD_$(BOARD)\r
+ADEFS += $(LUFA_OPTS)\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+CPPDEFS += -DF_USB=$(F_USB)UL\r
+CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
+CPPDEFS += $(LUFA_OPTS)\r
+#CPPDEFS += -D__STDC_LIMIT_MACROS\r
+#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
+\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fno-inline-small-functions\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -fno-strict-aliasing\r
+CFLAGS += -fno-split-wide-types\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+#CFLAGS += -mshort-calls\r
+#CFLAGS += -fno-unit-at-a-time\r
+#CFLAGS += -Wundef\r
+#CFLAGS += -Wunreachable-code\r
+#CFLAGS += -Wsign-compare\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CPPFLAGS += -Wundef\r
+#CPPFLAGS += -mshort-calls\r
+#CPPFLAGS += -fno-unit-at-a-time\r
+#CPPFLAGS += -Wstrict-prototypes\r
+#CPPFLAGS += -Wunreachable-code\r
+#CPPFLAGS += -Wsign-compare\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex\r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB =\r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB =\r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS =\r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax\r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+#AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>\r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when\r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before:\r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+\r
+\r
+# Display compiler version information.\r
+gccversion :\r
+ @$(CC) --version\r
+\r
+\r
+# Program the device.\r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+ $(REMOVE) $(TARGET)eep.hex\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set\r
+# a breakpoint at main().\r
+gdb-config:\r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -S -z $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@\r
+\r
+\r
+# Target: clean project.\r
+clean: begin clean_list end\r
+\r
+clean_list :\r
+ @echo\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).hex\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation \($(TARGET)\)...\r
+ @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
+ exit 1; \\r
+ fi;\r
+ @echo Documentation Generation Complete.\r
+\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+checksource:\r
+ @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
+ if [ -f $$f ]; then \\r
+ echo "Found Source File: $$f" ; \\r
+ else \\r
+ echo "Source File Not Found: $$f" ; \\r
+ fi; done \r
+\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff doxygen clean \\r
+clean_list clean_doxygen program dfu flip flip-ee dfu-ee \\r
+debug gdb-config checksource\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = uc3a3256\r
+\r
+\r
+# Targeted chip architecture (see library "Architectures" documentation)\r
+ARCH = UC3\r
+\r
+\r
+# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
+# "Board" inside the application directory.\r
+BOARD = NONE\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the\r
+# processor frequency in Hz. You can then use this symbol in your source code to\r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+#\r
+# This should be the frequency the system core runs at, after the system clock\r
+# has been set up correctly and started.\r
+F_CPU = 12000000\r
+\r
+\r
+# USB controller master clock frequency.\r
+# This will define a symbol, F_USB, in all source code files equal to the\r
+# input clock frequency of the USB controller's clock generator in Hz.\r
+#\r
+# For the UC3 chips, this should be equal to 48MHz or 96MHz.\r
+F_USB = 48000000\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = Test\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# Path to the LUFA library\r
+LUFA_PATH = ../..\r
+\r
+\r
+# LUFA library compile-time options and predefined tokens (add '-D' before each token)\r
+LUFA_OPTS = \r
+\r
+\r
+# Create the LUFA source path variables by including the LUFA root makefile\r
+include $(LUFA_PATH)/LUFA/makefile\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = Test.c\r
+\r
+\r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC = \r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s]. \r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = $(LUFA_PATH)/\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL\r
+CDEFS += -DF_USB=$(F_USB)UL\r
+CDEFS += -DBOARD=BOARD_$(BOARD)\r
+CDEFS += -DARCH=ARCH_$(ARCH)\r
+CDEFS += $(LUFA_OPTS)\r
+\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+ADEFS += -DF_USB=$(F_USB)UL\r
+ADEFS += -DBOARD=BOARD_$(BOARD)\r
+ADEFS += -DARCH=ARCH_$(ARCH)\r
+ADEFS += $(LUFA_OPTS)\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+CPPDEFS += -DF_USB=$(F_USB)UL\r
+CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
+CPPDEFS += -DARCH=ARCH_$(ARCH)\r
+CPPDEFS += $(LUFA_OPTS)\r
+\r
+\r
+# Debugging level.\r
+DEBUG = 3\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fno-strict-aliasing\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+CFLAGS += -masm-addr-pseudos\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -ffunction-sections\r
+CPPFLAGS += -fno-strict-aliasing\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -masm-addr-pseudos\r
+CPPFLAGS += -Wall\r
+CPPFLAGS += -Wundef\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--gc-sections --rodata-writable\r
+LDFLAGS += -Wl,--direct-data\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr32-gcc\r
+OBJCOPY = avr32-objcopy\r
+OBJDUMP = avr32-objdump\r
+SIZE = avr32-size\r
+AR = avr32-ar rcs\r
+NM = avr32-nm\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before: \r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mpart=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mpart=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mpart=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+\r
+\r
+# Display compiler version information.\r
+gccversion : \r
+ @$(CC) --version\r
+\r
+\r
+# Program the device. \r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -S -z $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
+\r
+\r
+# Target: clean project.\r
+clean: begin clean_list end\r
+\r
+clean_list :\r
+ @echo\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).hex\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation \($(TARGET)\)...\r
+ @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
+ exit 1; \\r
+ fi;\r
+ @echo Documentation Generation Complete.\r
+\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+checksource:\r
+ @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
+ if [ -f $$f ]; then \\r
+ echo "Found Source File: $$f" ; \\r
+ else \\r
+ echo "Source File Not Found: $$f" ; \\r
+ fi; done \r
+\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
+build elf hex lss sym doxygen clean clean_list clean_doxygen \\r
+dfu flip checksource\r
+\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = atxmega128a1u\r
+\r
+\r
+# Targeted chip architecture (see library "Architectures" documentation)\r
+ARCH = XMEGA\r
+\r
+\r
+# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
+# "Board" inside the application directory.\r
+BOARD = NONE\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the\r
+# processor frequency in Hz. You can then use this symbol in your source code to\r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+#\r
+# This should be the frequency the system core runs at, after the system clock\r
+# has been set up correctly and started.\r
+F_CPU = 24000000\r
+\r
+\r
+# USB controller master clock frequency.\r
+# This will define a symbol, F_USB, in all source code files equal to the\r
+# input clock frequency of the USB controller's clock generator in Hz.\r
+#\r
+# For the XMEGA chips, this should be equal to a multiple of 6MHz for Low\r
+# Speed USB mode, or a multiple of 48MHz for Full Speed USB mode.\r
+F_USB = 48000000\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = Test\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# Path to the LUFA library\r
+LUFA_PATH = ../..\r
+\r
+\r
+# LUFA library compile-time options and predefined tokens\r
+LUFA_OPTS = \r
+\r
+\r
+# Create the LUFA source path variables by including the LUFA root makefile\r
+include $(LUFA_PATH)/LUFA/makefile\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = Test.c\r
+\r
+\r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC = \r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s]. \r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = $(LUFA_PATH)/\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL\r
+CDEFS += -DF_USB=$(F_USB)UL\r
+CDEFS += -DBOARD=BOARD_$(BOARD)\r
+CDEFS += -DARCH=ARCH_$(ARCH)\r
+CDEFS += $(LUFA_OPTS)\r
+\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+ADEFS += -DF_USB=$(F_USB)UL\r
+ADEFS += -DBOARD=BOARD_$(BOARD)\r
+ADEFS += -DARCH=ARCH_$(ARCH)\r
+ADEFS += $(LUFA_OPTS)\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+CPPDEFS += -DF_USB=$(F_USB)UL\r
+CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
+CPPDEFS += -DARCH=ARCH_$(ARCH)\r
+CPPDEFS += $(LUFA_OPTS)\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fno-inline-small-functions\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -fno-strict-aliasing\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -ffunction-sections\r
+CPPFLAGS += -fno-strict-aliasing\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CPPFLAGS += -Wundef\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB = \r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB = \r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS = \r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax \r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+#AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when \r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before: \r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+\r
+\r
+# Display compiler version information.\r
+gccversion : \r
+ @$(CC) --version\r
+\r
+\r
+# Program the device. \r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+ $(REMOVE) $(TARGET)eep.hex\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set \r
+# a breakpoint at main().\r
+gdb-config: \r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -S -z $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
+\r
+\r
+# Target: clean project.\r
+clean: begin clean_list end\r
+\r
+clean_list :\r
+ @echo\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).hex\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation \($(TARGET)\)...\r
+ @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
+ exit 1; \\r
+ fi;\r
+ @echo Documentation Generation Complete.\r
+\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+checksource:\r
+ @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
+ if [ -f $$f ]; then \\r
+ echo "Found Source File: $$f" ; \\r
+ else \\r
+ echo "Source File Not Found: $$f" ; \\r
+ fi; done \r
+\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff doxygen clean \\r
+clean_list clean_doxygen program dfu flip flip-ee dfu-ee \\r
+debug gdb-config checksource\r
\r
# List of device families per architecture, one device per architecture sub-family\r
AVR8_FAMILIES = at90usb1287 at90usb1286 atmega16u4 atmega16u2 at90usb162\r
-XMEGA_FAMILIES = atxmega128a1u atxmega128a3u atxmega256a3bu atxmega128a4u atxmega128b1 atxmega128b3\r
+XMEGA_FAMILIES = atxmega128a1u atxmega128a3u atxmega256a3bu atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega32c4\r
UC3_FAMILIES = uc3a0256 uc3a1256 uc3a3256 uc3a4256 uc3b0256 uc3b1256\r
\r
# List of all device families, with a family postfix\r
\r
all: begin $(DEVICE_FAMILIES) clean end\r
\r
+arch_avr8: begin $(AVR8_FAMILIES:%=%.avr8) end\r
+arch_xmega: begin $(XMEGA_FAMILIES:%=%.xmega) end\r
+arch_uc3: begin $(UC3_FAMILIES:%=%.uc3) end\r
+\r
begin:\r
@echo Executing build test "ModuleTest".\r
@echo\r
@echo\r
\r
%.avr8:\r
- $(MAKE) -f makefile.avr8 clean -s\r
- $(MAKE) -f makefile.avr8 all MCU=$(@:%.avr8=%) -s\r
+ $(MAKE) -s -f makefile.avr8 clean\r
+ $(MAKE) -s -f makefile.avr8 all MCU=$(@:%.avr8=%) elf\r
\r
%.xmega:\r
- $(MAKE) -f makefile.xmega clean -s\r
- $(MAKE) -f makefile.xmega all MCU=$(@:%.xmega=%) -s\r
+ $(MAKE) -s -f makefile.xmega clean\r
+ $(MAKE) -s -f makefile.xmega all MCU=$(@:%.xmega=%) elf\r
\r
%.uc3:\r
- $(MAKE) -f makefile.uc3 clean -s\r
- $(MAKE) -f makefile.uc3 all MCU=$(@:%.uc3=%) -s\r
+ $(MAKE) -s -f makefile.uc3 clean\r
+ $(MAKE) -s -f makefile.uc3 all MCU=$(@:%.uc3=%) elf\r
\r
clean:\r
- $(MAKE) -f makefile.avr8 clean -s\r
- $(MAKE) -f makefile.xmega clean -s\r
- $(MAKE) -f makefile.uc3 clean -s\r
+ $(MAKE) -s -f makefile.avr8 clean\r
+ $(MAKE) -s -f makefile.xmega clean\r
+ $(MAKE) -s -f makefile.uc3 clean\r
\r
%:\r
\ No newline at end of file
@echo\r
\r
compile:\r
- $(MAKE) -f makefile.avr8 clean -s\r
- $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_DEVICE_ONLY' -s\r
- $(MAKE) -f makefile.avr8 clean -s\r
- $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_HOST_ONLY' -s\r
-\r
- $(MAKE) -f makefile.xmega clean -s\r
- $(MAKE) -f makefile.xmega LUFA_OPTS='-D USB_DEVICE_ONLY' -s\r
-\r
- $(MAKE) -f makefile.uc3 clean -s\r
- $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_DEVICE_ONLY' -s\r
- $(MAKE) -f makefile.uc3 clean -s\r
- $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_HOST_ONLY' -s\r
+ $(MAKE) -s -f makefile.avr8 clean\r
+ $(MAKE) -s -f makefile.avr8 LUFA_OPTS='-D USB_DEVICE_ONLY' elf\r
+ $(MAKE) -s -f makefile.avr8 clean\r
+ $(MAKE) -s -f makefile.avr8 LUFA_OPTS='-D USB_HOST_ONLY' elf\r
+\r
+ $(MAKE) -s -f makefile.xmega clean\r
+ $(MAKE) -s -f makefile.xmega LUFA_OPTS='-D USB_DEVICE_ONLY' elf\r
+ \r
+ $(MAKE) -s -f makefile.uc3 clean\r
+ $(MAKE) -s -f makefile.uc3 LUFA_OPTS='-D USB_DEVICE_ONLY' elf\r
+ $(MAKE) -s -f makefile.uc3 clean\r
+ $(MAKE) -s -f makefile.uc3 LUFA_OPTS='-D USB_HOST_ONLY' elf\r
\r
clean:\r
- $(MAKE) -f makefile.avr8 clean -s\r
- $(MAKE) -f makefile.xmega clean -s\r
- $(MAKE) -f makefile.uc3 clean -s\r
+ $(MAKE) -s -f makefile.avr8 clean\r
+ $(MAKE) -s -f makefile.xmega clean\r
+ $(MAKE) -s -f makefile.uc3 clean\r
\r
%:\r
\ No newline at end of file
missingInclude\r
\r
# Extra paths to search for include files\r
-INCLUDE_PATHS = $(LUFA_ROOT_PATH)/LUFA/CodeTemplates/\r
+INCLUDE_PATHS = $(LUFA_ROOT_PATH)/LUFA/CodeTemplates/ \\r
+ $(LUFA_ROOT_PATH)/Projects/AVRISP-MKII/\r
\r
# Configuration options to pass to cppcheck\r
CPPCHECK_OPTIONS = --template=$(MESSAGE_TEMPLATE) $(INCLUDE_PATHS:%=-I%) $(EXCLUDE_LIST:%=-i%) --inline-suppr --force --error-exitcode=1 --std=c99\r
# not intended to be modified or compiled by non-developers.\r
\r
all:\r
- $(MAKE) -C ModuleTest all\r
- $(MAKE) -C SingleUSBModeTest all\r
- $(MAKE) -C StaticAnalysisTest all\r
-\r
%:\r
+ $(MAKE) -C BoardDriverTest $@\r
$(MAKE) -C ModuleTest $@\r
$(MAKE) -C SingleUSBModeTest $@\r
$(MAKE) -C StaticAnalysisTest $@\r
{
.ControlInterfaceNumber = 0,
.StreamingInterfaceNumber = 1,
-
- .DataINEndpointNumber = AUDIO_STREAM_EPNUM,
- .DataINEndpointSize = AUDIO_STREAM_EPSIZE,
+ .DataINEndpoint =
+ {
+ .Address = AUDIO_STREAM_EPADDR,
+ .Size = AUDIO_STREAM_EPSIZE,
+ .Banks = 2,
+ },
},
};
uint8_t* Data)
{
/* Check the requested endpoint to see if a supported endpoint is being manipulated */
- if (EndpointAddress == (ENDPOINT_DIR_IN | Microphone_Audio_Interface.Config.DataINEndpointNumber))
+ if (EndpointAddress == Microphone_Audio_Interface.Config.DataINEndpoint.Address)
{
/* Check the requested control to see if a supported control is being manipulated */
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM),
+ .EndpointAddress = AUDIO_STREAM_EPADDR,
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AUDIO_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the Audio isochronous streaming data endpoint. */
- #define AUDIO_STREAM_EPNUM 1
+ /** Endpoint address of the Audio isochronous streaming data IN endpoint. */
+ #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
- * at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller
- * USB AVR models will result in unavoidable distorted output.
- */
- #define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM)
+ /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */
+ #define AUDIO_STREAM_EPSIZE 256
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
{
.ControlInterfaceNumber = 0,
.StreamingInterfaceNumber = 1,
-
- .DataOUTEndpointNumber = AUDIO_STREAM_EPNUM,
- .DataOUTEndpointSize = AUDIO_STREAM_EPSIZE,
+ .DataOUTEndpoint =
+ {
+ .Address = AUDIO_STREAM_EPADDR,
+ .Size = AUDIO_STREAM_EPSIZE,
+ .Banks = 2,
+ },
},
};
uint8_t* Data)
{
/* Check the requested endpoint to see if a supported endpoint is being manipulated */
- if (EndpointAddress == (ENDPOINT_DIR_OUT | Speaker_Audio_Interface.Config.DataOUTEndpointNumber))
+ if (EndpointAddress == Speaker_Audio_Interface.Config.DataOUTEndpoint.Address)
{
/* Check the requested control to see if a supported control is being manipulated */
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM),
+ .EndpointAddress = AUDIO_STREAM_EPADDR,
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AUDIO_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the Audio isochronous streaming data endpoint. */
- #define AUDIO_STREAM_EPNUM 1
+ /** Endpoint address of the Audio isochronous streaming data OUT endpoint. */
+ #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_OUT | 1)
- /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
- * at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller
- * USB AVR models will result in unavoidable distorted output.
- */
- #define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM)
+ /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */
+ #define AUDIO_STREAM_EPSIZE 256
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC1_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC1_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC1_RX_EPNUM),
+ .EndpointAddress = CDC1_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC1_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC1_TX_EPNUM),
+ .EndpointAddress = CDC1_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC2_IAD =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC2_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC2_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC2_RX_EPNUM),
+ .EndpointAddress = CDC2_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC2_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC2_TX_EPNUM),
+ .EndpointAddress = CDC2_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the first CDC interface's device-to-host data IN endpoint. */
- #define CDC1_TX_EPNUM 1
+ /** Endpoint address of the first CDC interface's device-to-host data IN endpoint. */
+ #define CDC1_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the first CDC interface's host-to-device data OUT endpoint. */
- #define CDC1_RX_EPNUM 2
+ /** Endpoint address of the first CDC interface's host-to-device data OUT endpoint. */
+ #define CDC1_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the first CDC interface's device-to-host notification IN endpoint. */
- #define CDC1_NOTIFICATION_EPNUM 3
+ /** Endpoint address of the first CDC interface's device-to-host notification IN endpoint. */
+ #define CDC1_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the second CDC interface's device-to-host data IN endpoint. */
- #define CDC2_TX_EPNUM 4
+ /** Endpoint address of the second CDC interface's device-to-host data IN endpoint. */
+ #define CDC2_TX_EPADDR (ENDPOINT_DIR_IN | 4)
- /** Endpoint number of the second CDC interface's host-to-device data OUT endpoint. */
- #define CDC2_RX_EPNUM 5
+ /** Endpoint address of the second CDC interface's host-to-device data OUT endpoint. */
+ #define CDC2_RX_EPADDR (ENDPOINT_DIR_OUT | 5)
- /** Endpoint number of the second CDC interface's device-to-host notification IN endpoint. */
- #define CDC2_NOTIFICATION_EPNUM 6
+ /** Endpoint address of the second CDC interface's device-to-host notification IN endpoint. */
+ #define CDC2_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 6)
/** Size in bytes of the CDC device-to-host notification IN endpoints. */
#define CDC_NOTIFICATION_EPSIZE 8
{
.Config =
{
- .ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC1_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC1_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC1_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .ControlInterfaceNumber = 0,
+ .DataINEndpoint =
+ {
+ .Address = CDC1_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC1_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC1_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
{
.Config =
{
- .ControlInterfaceNumber = 2,
-
- .DataINEndpointNumber = CDC2_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC2_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
+ .ControlInterfaceNumber = 2,
+ .DataINEndpoint =
+ {
+ .Address = CDC2_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC2_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC2_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
- .NotificationEndpointNumber = CDC2_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | GENERIC_IN_EPNUM),
+ .EndpointAddress = GENERIC_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = GENERIC_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Generic HID reporting IN endpoint. */
- #define GENERIC_IN_EPNUM 1
+ /** Endpoint address of the Generic HID reporting IN endpoint. */
+ #define GENERIC_IN_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Generic HID reporting endpoint. */
#define GENERIC_EPSIZE 8
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = GENERIC_IN_EPNUM,
- .ReportINEndpointSize = GENERIC_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = GENERIC_IN_EPADDR,
+ .Size = GENERIC_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_EPNUM),
+ .EndpointAddress = JOYSTICK_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = JOYSTICK_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Joystick HID reporting IN endpoint. */
- #define JOYSTICK_EPNUM 1
+ /** Endpoint address of the Joystick HID reporting IN endpoint. */
+ #define JOYSTICK_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Joystick HID reporting IN endpoint. */
#define JOYSTICK_EPSIZE 8
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = JOYSTICK_EPNUM,
- .ReportINEndpointSize = JOYSTICK_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = JOYSTICK_EPADDR,
+ .Size = JOYSTICK_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevJoystickHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevJoystickHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_EPNUM),
+ .EndpointAddress = KEYBOARD_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Keyboard HID reporting IN endpoint. */
- #define KEYBOARD_EPNUM 1
+ /** Endpoint address of the Keyboard HID reporting IN endpoint. */
+ #define KEYBOARD_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Keyboard HID reporting IN endpoint. */
#define KEYBOARD_EPSIZE 8
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = KEYBOARD_EPNUM,
- .ReportINEndpointSize = KEYBOARD_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = KEYBOARD_EPADDR,
+ .Size = KEYBOARD_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM),
+ .EndpointAddress = KEYBOARD_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID2_MouseInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_IN_EPNUM),
+ .EndpointAddress = MOUSE_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Keyboard HID reporting IN endpoint. */
- #define KEYBOARD_IN_EPNUM 1
+ /** Endpoint address of the Keyboard HID reporting IN endpoint. */
+ #define KEYBOARD_IN_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the Mouse HID reporting IN endpoint. */
- #define MOUSE_IN_EPNUM 3
+ /** Endpoint address of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
/** Size in bytes of each of the HID reporting IN endpoints. */
#define HID_EPSIZE 8
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = KEYBOARD_IN_EPNUM,
- .ReportINEndpointSize = HID_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = KEYBOARD_IN_EPADDR,
+ .Size = HID_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
},
.Config =
{
.InterfaceNumber = 1,
-
- .ReportINEndpointNumber = MOUSE_IN_EPNUM,
- .ReportINEndpointSize = HID_EPSIZE,
-
+ .ReportINEndpoint =
+ {
+ .Address = MOUSE_IN_EPADDR,
+ .Size = HID_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | HID_IN_EPNUM),
+ .EndpointAddress = HID_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the HID reporting IN endpoint. */
- #define HID_IN_EPNUM 1
+ /** Endpoint address of the HID reporting IN endpoint. */
+ #define HID_IN_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of each of the HID reporting IN endpoint. */
#define HID_EPSIZE 8
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = HID_IN_EPNUM,
- .ReportINEndpointSize = HID_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = HID_IN_EPADDR,
+ .Size = HID_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
+ .EndpointAddress = MIDI_STREAM_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.Refresh = 0,
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
+ .EndpointAddress = MIDI_STREAM_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.Refresh = 0,
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
- #define MIDI_STREAM_IN_EPNUM 2
+ /** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
+ #define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
- #define MIDI_STREAM_OUT_EPNUM 1
+ /** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
+ #define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 1)
/** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
#define MIDI_STREAM_EPSIZE 64
.Config =
{
.StreamingInterfaceNumber = 1,
-
- .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM,
- .DataINEndpointSize = MIDI_STREAM_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM,
- .DataOUTEndpointSize = MIDI_STREAM_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = MIDI_STREAM_IN_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MIDI_STREAM_OUT_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
},
};
MIDI_EventPacket_t ReceivedMIDIEvent;
while (MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &ReceivedMIDIEvent))
{
- if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && (ReceivedMIDIEvent.Data3 > 0))
+ if ((ReceivedMIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_ON)) && (ReceivedMIDIEvent.Data3 > 0))
LEDs_SetAllLEDs(ReceivedMIDIEvent.Data2 > 64 ? LEDS_LED1 : LEDS_LED2);
else
LEDs_SetAllLEDs(LEDS_NO_LEDS);
{
MIDI_EventPacket_t MIDIEvent = (MIDI_EventPacket_t)
{
- .CableNumber = 0,
- .Command = (MIDICommand >> 4),
+ .Event = MIDI_EVENT(0, MIDICommand),
.Data1 = MIDICommand | Channel,
.Data2 = MIDIPitch,
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
.Config =
{
.InterfaceNumber = 0,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = TOTAL_LUNS,
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID_KeyboardInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_EPNUM),
+ .EndpointAddress = KEYBOARD_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the Keyboard HID reporting IN endpoint. */
- #define KEYBOARD_EPNUM 1
+ /** Endpoint address of the Keyboard HID reporting IN endpoint. */
+ #define KEYBOARD_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Keyboard HID reporting IN endpoint. */
#define KEYBOARD_EPSIZE 8
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
.Config =
{
.InterfaceNumber = 0,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = TOTAL_LUNS,
},
};
.Config =
{
.InterfaceNumber = 1,
-
- .ReportINEndpointNumber = KEYBOARD_EPNUM,
- .ReportINEndpointSize = KEYBOARD_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = KEYBOARD_EPADDR,
+ .Size = KEYBOARD_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_EPNUM),
+ .EndpointAddress = MOUSE_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MOUSE_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <avr/pgmspace.h>
+ /* Macros: */
+ /** Endpoint address of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_EPADDR (ENDPOINT_DIR_IN | 1)
+
+ /** Size in bytes of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_EPSIZE 8
+
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
* application code, as the configuration descriptor contains several sub-descriptors which
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
- /* Macros: */
- /** Endpoint number of the Mouse HID reporting IN endpoint. */
- #define MOUSE_EPNUM 1
-
- /** Size in bytes of the Mouse HID reporting IN endpoint. */
- #define MOUSE_EPSIZE 8
-
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = MOUSE_EPNUM,
- .ReportINEndpointSize = MOUSE_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = MOUSE_EPADDR,
+ .Size = MOUSE_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.RNDIS_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 3
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 1
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 2
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
.AdapterVendorDescription = "LUFA RNDIS Demo Adapter",
.AdapterMACAddress = {ADAPTER_MAC_ADDRESS},
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
{
.Config =
{
- .ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .ControlInterfaceNumber = 0,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 1
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 2
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 3
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 3)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
/** Size in bytes of the CDC data IN and OUT endpoints. */
#define CDC_TXRX_EPSIZE 16
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 4
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 4)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 5
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 5)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
.Config =
{
.InterfaceNumber = 2,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = TOTAL_LUNS,
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_EPNUM),
+ .EndpointAddress = MOUSE_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MOUSE_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
/** Size in bytes of the CDC data IN and OUT endpoints. */
#define CDC_TXRX_EPSIZE 16
- /** Endpoint number of the Mouse HID reporting IN endpoint. */
- #define MOUSE_EPNUM 1
+ /** Endpoint address of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Mouse HID reporting IN endpoint. */
#define MOUSE_EPSIZE 8
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
.Config =
{
.InterfaceNumber = 2,
-
- .ReportINEndpointNumber = MOUSE_EPNUM,
- .ReportINEndpointSize = MOUSE_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = MOUSE_EPADDR,
+ .Size = MOUSE_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
},
{
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DIR_IN | SIDESHOW_IN_EPNUM),
+ EndpointAddress: SIDESHOW_IN_EPADDR,
Attributes: EP_TYPE_BULK,
EndpointSize: SIDESHOW_IO_EPSIZE,
PollingIntervalMS: 0x00
{
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DIR_OUT | SIDESHOW_OUT_EPNUM),
+ EndpointAddress: SIDESHOW_OUT_EPADDR,
Attributes: EP_TYPE_BULK,
EndpointSize: SIDESHOW_IO_EPSIZE,
PollingIntervalMS: 0x00
#include "Sideshow.h"
/* Macros: */
- #define SIDESHOW_IN_EPNUM 3
- #define SIDESHOW_OUT_EPNUM 4
+ #define SIDESHOW_IN_EPADDR 3
+ #define SIDESHOW_OUT_EPADDR 4
#define SIDESHOW_IO_EPSIZE 64
/* Type Defines: */
{
SideShow_PacketHeader_t PacketHeader;
- Endpoint_SelectEndpoint(SIDESHOW_OUT_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_OUT_EPADDR);
Endpoint_Read_Stream_LE(&PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
PacketHeader.Type.TypeFields.Response = true;
PacketHeader.Length = sizeof(SideShow_PacketHeader_t);
PacketHeader.Type.TypeFields.NAK = true;
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(&PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
if (!(GUID_COMPARE(&ProtocolGUID, (uint32_t[])STANDARD_PROTOCOL_GUID)))
PacketHeader->Type.TypeFields.NAK = true;
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_Write_Stream_LE(&ProtocolGUID, sizeof(GUID_t), NULL);
Endpoint_ClearIN();
PacketHeader->Length = sizeof(SideShow_PacketHeader_t) + sizeof(uint32_t) + UserSID.LengthInBytes;
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
SideShow_Write_Unicode_String(&UserSID);
Endpoint_ClearIN();
PacketHeader->Length = sizeof(SideShow_PacketHeader_t);
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
Property.PropertyGUID.Chunks[2], Property.PropertyGUID.Chunks[3]);
}
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
if (!(PacketHeader->Type.TypeFields.NAK))
PacketHeader->Length = sizeof(SideShow_PacketHeader_t) +
sizeof(uint32_t) + ((Unicode_String_t*)UnicodeStruct)->LengthInBytes;
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
SideShow_Write_Unicode_String(UnicodeStruct);
Endpoint_ClearIN();
PacketHeader->Length = sizeof(SideShow_PacketHeader_t) +
sizeof(uint32_t) + (TotalApplications * sizeof(GUID_t));
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_Write_32_LE(TotalApplications);
PacketHeader->Length = sizeof(SideShow_PacketHeader_t) + sizeof(uint32_t) + sizeof(GUID_t);
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_Write_32_LE(1);
Endpoint_Write_Stream_LE(&SupportedEndpointGUID, sizeof(GUID_t), NULL);
PacketHeader->Length = sizeof(SideShow_PacketHeader_t);
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
PacketHeader->Length = sizeof(SideShow_PacketHeader_t);
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
for (uint8_t App = 0; App < MAX_APPLICATIONS; App++)
InstalledApplications[App].InUse = false;
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
PacketHeader->Length = sizeof(SideShow_PacketHeader_t);
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
PacketHeader->Length = sizeof(SideShow_PacketHeader_t);
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
PacketHeader->Length = sizeof(SideShow_PacketHeader_t);
- Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_IN_EPADDR);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
Endpoint_ClearIN();
}
bool ConfigSuccess = true;
/* Setup Sideshow Data Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(SIDESHOW_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- SIDESHOW_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(SIDESHOW_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- SIDESHOW_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(SIDESHOW_IN_EPADDR, EP_TYPE_BULK, SIDESHOW_IO_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(SIDESHOW_OUT_EPADDR, EP_TYPE_BULK, SIDESHOW_IO_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
return;
/* Select the SideShow data out endpoint */
- Endpoint_SelectEndpoint(SIDESHOW_OUT_EPNUM);
+ Endpoint_SelectEndpoint(SIDESHOW_OUT_EPADDR);
/* Check to see if a new SideShow message has been received */
if (Endpoint_IsReadWriteAllowed())
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | TMC_OUT_EPNUM),
+ .EndpointAddress = TMC_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = TMC_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.TM_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | TMC_IN_EPNUM),
+ .EndpointAddress = TMC_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = TMC_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.TM_NotificationEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | TMC_NOTIFICATION_EPNUM),
+ .EndpointAddress = TMC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = TMC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
#include <LUFA/Drivers/USB/USB.h>\r
\r
/* Macros: */\r
- /** Endpoint number of the TMC notification IN endpoint. */\r
- #define TMC_NOTIFICATION_EPNUM 2 \r
+ /** Endpoint address of the TMC notification IN endpoint. */\r
+ #define TMC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)\r
\r
- /** Endpoint number of the TMC device-to-host data IN endpoint. */\r
- #define TMC_IN_EPNUM 3 \r
+ /** Endpoint address of the TMC device-to-host data IN endpoint. */\r
+ #define TMC_IN_EPADDR (ENDPOINT_DIR_IN | 3)\r
\r
- /** Endpoint number of the TMC host-to-device data OUT endpoint. */\r
- #define TMC_OUT_EPNUM 4 \r
+ /** Endpoint address of the TMC host-to-device data OUT endpoint. */\r
+ #define TMC_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)\r
\r
/** Size in bytes of the TMC data endpoints. */\r
- #define TMC_IO_EPSIZE 64\r
+ #define TMC_IO_EPSIZE 64\r
\r
/** Size in bytes of the TMC notification endpoint. */\r
- #define TMC_NOTIFICATION_EPSIZE 8\r
+ #define TMC_NOTIFICATION_EPSIZE 8\r
\r
/* Type Defines: */\r
/** Type define for the device configuration descriptor structure. This must be defined in the\r
bool ConfigSuccess = true;
/* Setup TMC In, Out and Notification Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, TMC_IO_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPADDR, EP_TYPE_BULK, TMC_IO_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPADDR, EP_TYPE_BULK, TMC_IO_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
uint8_t ErrorCode;
/* Select the Data Out endpoint */
- Endpoint_SelectEndpoint(TMC_OUT_EPNUM);
+ Endpoint_SelectEndpoint(TMC_OUT_EPADDR);
/* Abort if no command has been sent from the host */
if (!(Endpoint_IsOUTReceived()))
MessageHeader->InverseTag = ~CurrentTransferTag;
/* Select the Data In endpoint */
- Endpoint_SelectEndpoint(TMC_IN_EPNUM);
+ Endpoint_SelectEndpoint(TMC_IN_EPADDR);
/* Send the command header to the host */
BytesTransferred = 0;
bool ConfigSuccess = true;
/* Setup Audio Stream Endpoint */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS, ENDPOINT_DIR_IN,
- AUDIO_STREAM_EPSIZE, ENDPOINT_BANK_DOUBLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPADDR, EP_TYPE_ISOCHRONOUS, AUDIO_STREAM_EPSIZE, 2);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */
- if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
+ if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */
- if ((EndpointAddress == (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
+ if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
/* Select the audio stream endpoint */
- Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM);
+ Endpoint_SelectEndpoint(AUDIO_STREAM_EPADDR);
/* Check if the current endpoint can be written to and that the audio interface is enabled */
if (Endpoint_IsINReady() && StreamingAudioInterfaceSelected)
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | AUDIO_STREAM_EPNUM),
+ .EndpointAddress = AUDIO_STREAM_EPADDR,
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AUDIO_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the Audio isochronous streaming data endpoint. */
- #define AUDIO_STREAM_EPNUM 1
+ /** Endpoint address of the Audio isochronous streaming data IN endpoint. */
+ #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
- * at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller
- * USB AVR models will result in unavoidable distorted output.
- */
- #define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM)
+ /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */
+ #define AUDIO_STREAM_EPSIZE 256
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
bool ConfigSuccess = true;
/* Setup Audio Stream Endpoint */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS, ENDPOINT_DIR_OUT,
- AUDIO_STREAM_EPSIZE, ENDPOINT_BANK_DOUBLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPADDR, EP_TYPE_ISOCHRONOUS, AUDIO_STREAM_EPSIZE, 2);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */
- if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
+ if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
/* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */
- if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
+ if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
{
uint8_t SampleRate[3];
uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
/* Select the audio stream endpoint */
- Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM);
+ Endpoint_SelectEndpoint(AUDIO_STREAM_EPADDR);
/* Check if the current endpoint can be read from (contains a packet) and the host is sending data */
if (Endpoint_IsOUTReceived() && StreamingAudioInterfaceSelected)
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM),
+ .EndpointAddress = AUDIO_STREAM_EPADDR,
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AUDIO_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the Audio isochronous streaming data endpoint. */
- #define AUDIO_STREAM_EPNUM 1
+ /** Endpoint address of the Audio isochronous streaming data OUT endpoint. */
+ #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_OUT | 1)
- /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
- * at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller
- * USB AVR models will result in unavoidable distorted output.
- */
- #define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM)
+ /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */
+ #define AUDIO_STREAM_EPSIZE 256
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC1_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC1_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC1_RX_EPNUM),
+ .EndpointAddress = CDC1_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC1_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC1_TX_EPNUM),
+ .EndpointAddress = CDC1_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC2_IAD =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC2_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC2_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC2_RX_EPNUM),
+ .EndpointAddress = CDC2_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC2_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC2_TX_EPNUM),
+ .EndpointAddress = CDC2_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the first CDC interface's device-to-host data IN endpoint. */
- #define CDC1_TX_EPNUM 1
+ /** Endpoint address of the first CDC interface's device-to-host data IN endpoint. */
+ #define CDC1_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the first CDC interface's host-to-device data OUT endpoint. */
- #define CDC1_RX_EPNUM 2
+ /** Endpoint address of the first CDC interface's host-to-device data OUT endpoint. */
+ #define CDC1_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the first CDC interface's device-to-host notification IN endpoint. */
- #define CDC1_NOTIFICATION_EPNUM 3
+ /** Endpoint address of the first CDC interface's device-to-host notification IN endpoint. */
+ #define CDC1_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the second CDC interface's device-to-host data IN endpoint. */
- #define CDC2_TX_EPNUM 4
+ /** Endpoint address of the second CDC interface's device-to-host data IN endpoint. */
+ #define CDC2_TX_EPADDR (ENDPOINT_DIR_IN | 4)
- /** Endpoint number of the second CDC interface's host-to-device data OUT endpoint. */
- #define CDC2_RX_EPNUM 5
+ /** Endpoint address of the second CDC interface's host-to-device data OUT endpoint. */
+ #define CDC2_RX_EPADDR (ENDPOINT_DIR_OUT | 5)
- /** Endpoint number of the second CDC interface's device-to-host notification IN endpoint. */
- #define CDC2_NOTIFICATION_EPNUM 6
+ /** Endpoint address of the second CDC interface's device-to-host notification IN endpoint. */
+ #define CDC2_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 6)
/** Size in bytes of the CDC device-to-host notification IN endpoints. */
#define CDC_NOTIFICATION_EPSIZE 8
bool ConfigSuccess = true;
/* Setup first CDC Interface's Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC1_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1);
/* Setup second CDC Interface's Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC2_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1);
/* Reset line encoding baud rates so that the host knows to send new values */
LineEncoding1.BaudRateBPS = 0;
ActionSent = true;
/* Select the Serial Tx Endpoint */
- Endpoint_SelectEndpoint(CDC1_TX_EPNUM);
+ Endpoint_SelectEndpoint(CDC1_TX_EPADDR);
/* Write the String to the Endpoint */
Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), NULL);
}
/* Select the Serial Rx Endpoint */
- Endpoint_SelectEndpoint(CDC1_RX_EPNUM);
+ Endpoint_SelectEndpoint(CDC1_RX_EPADDR);
/* Throw away any received data from the host */
if (Endpoint_IsOUTReceived())
return;
/* Select the Serial Rx Endpoint */
- Endpoint_SelectEndpoint(CDC2_RX_EPNUM);
+ Endpoint_SelectEndpoint(CDC2_RX_EPADDR);
/* Check to see if any data has been received */
if (Endpoint_IsOUTReceived())
Endpoint_ClearOUT();
/* Select the Serial Tx Endpoint */
- Endpoint_SelectEndpoint(CDC2_TX_EPNUM);
+ Endpoint_SelectEndpoint(CDC2_TX_EPADDR);
/* Write the received data to the endpoint */
Endpoint_Write_Stream_LE(&Buffer, DataLength, NULL);
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | GENERIC_IN_EPNUM),
+ .EndpointAddress = GENERIC_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = GENERIC_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID_ReportOUTEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | GENERIC_OUT_EPNUM),
+ .EndpointAddress = GENERIC_OUT_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = GENERIC_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Generic HID reporting IN endpoint. */
- #define GENERIC_IN_EPNUM 1
+ /** Endpoint address of the Generic HID reporting IN endpoint. */
+ #define GENERIC_IN_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the Generic HID reporting OUT endpoint. */
- #define GENERIC_OUT_EPNUM 2
+ /** Endpoint address of the Generic HID reporting OUT endpoint. */
+ #define GENERIC_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Size in bytes of the Generic HID reporting endpoint. */
#define GENERIC_EPSIZE 8
bool ConfigSuccess = true;
/* Setup HID Report Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,
- GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPADDR, EP_TYPE_INTERRUPT, GENERIC_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPADDR, EP_TYPE_INTERRUPT, GENERIC_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
- Endpoint_SelectEndpoint(GENERIC_OUT_EPNUM);
+ Endpoint_SelectEndpoint(GENERIC_OUT_EPADDR);
/* Check to see if a packet has been sent from the host */
if (Endpoint_IsOUTReceived())
Endpoint_ClearOUT();
}
- Endpoint_SelectEndpoint(GENERIC_IN_EPNUM);
+ Endpoint_SelectEndpoint(GENERIC_IN_EPADDR);
/* Check to see if the host is ready to accept another packet */
if (Endpoint_IsINReady())
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_EPNUM),
+ .EndpointAddress = JOYSTICK_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = JOYSTICK_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Joystick HID reporting IN endpoint. */
- #define JOYSTICK_EPNUM 1
+ /** Endpoint address of the Joystick HID reporting IN endpoint. */
+ #define JOYSTICK_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Joystick HID reporting IN endpoint. */
#define JOYSTICK_EPSIZE 8
bool ConfigSuccess = true;
/* Setup HID Report Endpoint */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(JOYSTICK_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- JOYSTICK_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(JOYSTICK_EPADDR, EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
return;
/* Select the Joystick Report Endpoint */
- Endpoint_SelectEndpoint(JOYSTICK_EPNUM);
+ Endpoint_SelectEndpoint(JOYSTICK_EPADDR);
/* Check to see if the host is ready for another packet */
if (Endpoint_IsINReady())
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM),
+ .EndpointAddress = KEYBOARD_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID_ReportOUTEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | KEYBOARD_OUT_EPNUM),
+ .EndpointAddress = KEYBOARD_OUT_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Keyboard HID reporting IN endpoint. */
- #define KEYBOARD_IN_EPNUM 1
+ /** Endpoint address of the Keyboard HID reporting IN endpoint. */
+ #define KEYBOARD_IN_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the Keyboard HID reporting OUT endpoint. */
- #define KEYBOARD_OUT_EPNUM 2
+ /** Endpoint address of the Keyboard HID reporting OUT endpoint. */
+ #define KEYBOARD_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Size in bytes of the Keyboard HID reporting IN and OUT endpoints. */
#define KEYBOARD_EPSIZE 8
bool ConfigSuccess = true;
/* Setup HID Report Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- KEYBOARD_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,
- KEYBOARD_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPADDR, EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPADDR, EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1);
/* Turn on Start-of-Frame events for tracking HID report period expiry */
USB_Device_EnableSOFEvents();
}
/* Select the Keyboard Report Endpoint */
- Endpoint_SelectEndpoint(KEYBOARD_IN_EPNUM);
+ Endpoint_SelectEndpoint(KEYBOARD_IN_EPADDR);
/* Check if Keyboard Endpoint Ready for Read/Write and if we should send a new report */
if (Endpoint_IsReadWriteAllowed() && SendReport)
void ReceiveNextReport(void)
{
/* Select the Keyboard LED Report Endpoint */
- Endpoint_SelectEndpoint(KEYBOARD_OUT_EPNUM);
+ Endpoint_SelectEndpoint(KEYBOARD_OUT_EPADDR);
/* Check if Keyboard LED Endpoint contains a packet */
if (Endpoint_IsOUTReceived())
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_IN_EPNUM),
+ .EndpointAddress = KEYBOARD_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID1_ReportOUTEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | KEYBOARD_OUT_EPNUM),
+ .EndpointAddress = KEYBOARD_OUT_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID2_MouseInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_IN_EPNUM),
+ .EndpointAddress = MOUSE_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Keyboard HID reporting IN endpoint. */
- #define KEYBOARD_IN_EPNUM 1
+ /** Endpoint address of the Keyboard HID reporting IN endpoint. */
+ #define KEYBOARD_IN_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the Keyboard HID reporting OUT endpoint. */
- #define KEYBOARD_OUT_EPNUM 2
+ /** Endpoint address of the Keyboard HID reporting OUT endpoint. */
+ #define KEYBOARD_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the Mouse HID reporting IN endpoint. */
- #define MOUSE_IN_EPNUM 3
+ /** Endpoint address of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
/** Size in bytes of each of the HID reporting IN and OUT endpoints. */
#define HID_EPSIZE 8
bool ConfigSuccess = true;
/* Setup Keyboard HID Report Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- HID_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,
- HID_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1);
/* Setup Mouse HID Report Endpoint */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- HID_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_IN_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
}
/* Select the Keyboard Report Endpoint */
- Endpoint_SelectEndpoint(KEYBOARD_IN_EPNUM);
+ Endpoint_SelectEndpoint(KEYBOARD_IN_EPADDR);
/* Check if Keyboard Endpoint Ready for Read/Write */
if (Endpoint_IsReadWriteAllowed())
}
/* Select the Keyboard LED Report Endpoint */
- Endpoint_SelectEndpoint(KEYBOARD_OUT_EPNUM);
+ Endpoint_SelectEndpoint(KEYBOARD_OUT_EPADDR);
/* Check if Keyboard LED Endpoint Ready for Read/Write */
if (Endpoint_IsReadWriteAllowed())
}
/* Select the Mouse Report Endpoint */
- Endpoint_SelectEndpoint(MOUSE_IN_EPNUM);
+ Endpoint_SelectEndpoint(MOUSE_IN_EPADDR);
/* Check if Mouse Endpoint Ready for Read/Write */
if (Endpoint_IsReadWriteAllowed())
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
+ .EndpointAddress = MIDI_STREAM_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.Refresh = 0,
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
+ .EndpointAddress = MIDI_STREAM_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.Refresh = 0,
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
- #define MIDI_STREAM_IN_EPNUM 1
+ /** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
+ #define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
- #define MIDI_STREAM_OUT_EPNUM 2
+ /** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
+ #define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
#define MIDI_STREAM_EPSIZE 64
bool ConfigSuccess = true;
/* Setup MIDI Data Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
- Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);
+ Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPADDR);
if (Endpoint_IsINReady())
{
{
MIDI_EventPacket_t MIDIEvent = (MIDI_EventPacket_t)
{
- .CableNumber = 0,
- .Command = (MIDICommand >> 4),
+ .Event = MIDI_EVENT(0, MIDICommand),
.Data1 = MIDICommand | Channel,
.Data2 = MIDIPitch,
}
/* Select the MIDI OUT stream */
- Endpoint_SelectEndpoint(MIDI_STREAM_OUT_EPNUM);
+ Endpoint_SelectEndpoint(MIDI_STREAM_OUT_EPADDR);
/* Check if a MIDI command has been received */
if (Endpoint_IsOUTReceived())
Endpoint_Read_Stream_LE(&MIDIEvent, sizeof(MIDIEvent), NULL);
/* Check to see if the sent command is a note on message with a non-zero velocity */
- if ((MIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && (MIDIEvent.Data3 > 0))
+ if ((MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_ON)) && (MIDIEvent.Data3 > 0))
{
/* Change LEDs depending on the pitch of the sent note */
LEDs_SetAllLEDs(MIDIEvent.Data2 > 64 ? LEDS_LED1 : LEDS_LED2);
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
bool ConfigSuccess = true;
/* Setup Mass Storage Data Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- MASS_STORAGE_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- MASS_STORAGE_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_IN_EPADDR, EP_TYPE_BULK, MASS_STORAGE_IO_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(MASS_STORAGE_OUT_EPADDR, EP_TYPE_BULK, MASS_STORAGE_IO_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
/* Check direction of command, select Data IN endpoint if data is from the device */
if (CommandBlock.Flags & MS_COMMAND_DIR_DATA_IN)
- Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
+ Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR);
/* Decode the received SCSI command, set returned status code */
CommandStatus.Status = SCSI_DecodeSCSICommand() ? MS_SCSI_COMMAND_Pass : MS_SCSI_COMMAND_Fail;
if (IsMassStoreReset)
{
/* Reset the data endpoint banks */
- Endpoint_ResetEndpoint(MASS_STORAGE_OUT_EPNUM);
- Endpoint_ResetEndpoint(MASS_STORAGE_IN_EPNUM);
+ Endpoint_ResetEndpoint(MASS_STORAGE_OUT_EPADDR);
+ Endpoint_ResetEndpoint(MASS_STORAGE_IN_EPADDR);
- Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPNUM);
+ Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPADDR);
Endpoint_ClearStall();
Endpoint_ResetDataToggle();
- Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
+ Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR);
Endpoint_ClearStall();
Endpoint_ResetDataToggle();
uint16_t BytesTransferred;
/* Select the Data Out endpoint */
- Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPNUM);
+ Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPADDR);
/* Abort if no command has been sent from the host */
if (!(Endpoint_IsOUTReceived()))
{
/* Stall both data pipes until reset by host */
Endpoint_StallTransaction();
- Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
+ Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR);
Endpoint_StallTransaction();
return false;
uint16_t BytesTransferred;
/* Select the Data Out endpoint */
- Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPNUM);
+ Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPADDR);
/* While data pipe is stalled, wait until the host issues a control request to clear the stall */
while (Endpoint_IsStalled())
}
/* Select the Data In endpoint */
- Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
+ Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPADDR);
/* While data pipe is stalled, wait until the host issues a control request to clear the stall */
while (Endpoint_IsStalled())
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_EPNUM),
+ .EndpointAddress = MOUSE_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MOUSE_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <avr/pgmspace.h>
+ /* Macros: */
+ /** Endpoint address of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_EPADDR (ENDPOINT_DIR_IN | 1)
+
+ /** Size in bytes of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_EPSIZE 8
+
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
* application code, as the configuration descriptor contains several sub-descriptors which
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
- /* Macros: */
- /** Endpoint number of the Mouse HID reporting IN endpoint. */
- #define MOUSE_EPNUM 1
-
- /** Size in bytes of the Mouse HID reporting IN endpoint. */
- #define MOUSE_EPSIZE 8
-
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
bool ConfigSuccess = true;
/* Setup HID Report Endpoint */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- MOUSE_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_EPADDR, EP_TYPE_INTERRUPT, MOUSE_EPSIZE, 1);
/* Turn on Start-of-Frame events for tracking HID report period expiry */
USB_Device_EnableSOFEvents();
}
/* Select the Mouse Report Endpoint */
- Endpoint_SelectEndpoint(MOUSE_EPNUM);
+ Endpoint_SelectEndpoint(MOUSE_EPADDR);
/* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */
if (Endpoint_IsReadWriteAllowed() && SendReport)
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.RNDIS_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 1
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 2
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 3
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 3)
/** Size in bytes of the CDC data IN and OUT endpoints. */
#define CDC_TXRX_EPSIZE 64
bool ConfigSuccess = true;
/* Setup RNDIS Data Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
void RNDIS_Task(void)
{
/* Select the notification endpoint */
- Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPNUM);
+ Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPADDR);
/* Check if a message response is ready for the host */
if (Endpoint_IsINReady() && ResponseReady)
RNDIS_Packet_Message_t RNDISPacketHeader;
/* Select the data OUT endpoint */
- Endpoint_SelectEndpoint(CDC_RX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_RX_EPADDR);
/* Check if the data OUT endpoint contains data, and that the IN buffer is empty */
if (Endpoint_IsOUTReceived() && !(FrameIN.FrameLength))
}
/* Select the data IN endpoint */
- Endpoint_SelectEndpoint(CDC_TX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_TX_EPADDR);
/* Check if the data IN endpoint is ready for more data, and that the IN buffer is full */
if (Endpoint_IsINReady() && FrameOUT.FrameLength)
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
bool ConfigSuccess = true;
/* Setup CDC Data Endpoints */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
/* Reset line encoding baud rate so that the host knows to send new values */
LineEncoding.BaudRateBPS = 0;
ActionSent = true;
/* Select the Serial Tx Endpoint */
- Endpoint_SelectEndpoint(CDC_TX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_TX_EPADDR);
/* Write the String to the Endpoint */
Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), NULL);
}
/* Select the Serial Rx Endpoint */
- Endpoint_SelectEndpoint(CDC_RX_EPNUM);
+ Endpoint_SelectEndpoint(CDC_RX_EPADDR);
/* Throw away any received data from the host */
if (Endpoint_IsOUTReceived())
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MOUSE_EPNUM),
+ .EndpointAddress = MOUSE_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MOUSE_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Mouse HID reporting IN endpoint. */
- #define MOUSE_EPNUM 1
+ /** Endpoint address of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Mouse HID reporting IN endpoint. */
#define MOUSE_EPSIZE 8
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = MOUSE_EPNUM,
- .ReportINEndpointSize = MOUSE_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = MOUSE_EPADDR,
+ .Size = MOUSE_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
},
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataOUTPipeNumber = 2,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_MouseBootProtocol,
},
};
{\r
.Config =\r
{\r
- .DataINPipeNumber = 1,\r
- .DataINPipeDoubleBank = false,\r
-\r
- .DataOUTPipeNumber = 2,\r
- .DataOUTPipeDoubleBank = false,\r
- \r
+ .DataINPipe =\r
+ {\r
+ .Address = (PIPE_DIR_IN | 1),\r
+ .Banks = 1,\r
+ },\r
+ .DataOUTPipe =\r
+ {\r
+ .Address = (PIPE_DIR_OUT | 2),\r
+ .Banks = 1,\r
+ }, \r
.PropertyStrings =\r
{\r
[AOA_STRING_Manufacturer] = "Dean Camera",\r
{
.Config =
{
- .DataINPipeNumber = 1,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ },
},
};
}
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
- if (Audio_Host_GetSetEndpointProperty(&Microphone_Audio_Interface, Microphone_Audio_Interface.Config.DataINPipeNumber,
+ if (Audio_Host_GetSetEndpointProperty(&Microphone_Audio_Interface, Microphone_Audio_Interface.Config.DataINPipe.Address,
AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,
sizeof(SampleRate), &SampleRate) != HOST_SENDCONTROL_Successful)
{
{
.Config =
{
- .DataOUTPipeNumber = 1,
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ },
},
};
}
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
- if (Audio_Host_GetSetEndpointProperty(&Speaker_Audio_Interface, Speaker_Audio_Interface.Config.DataOUTPipeNumber,
+ if (Audio_Host_GetSetEndpointProperty(&Speaker_Audio_Interface, Speaker_Audio_Interface.Config.DataOUTPipe.Address,
AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,
sizeof(SampleRate), &SampleRate) != HOST_SENDCONTROL_Successful)
{
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
-
.HIDParserData = &HIDReportInfo
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_KeyboardBootProtocol,
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
-
.HIDParserData = &HIDReportInfo
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
},
};
MIDI_EventPacket_t MIDIEvent;
while (MIDI_Host_ReceiveEventPacket(&Keyboard_MIDI_Interface, &MIDIEvent))
{
- bool NoteOnEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_ON >> 4));
- bool NoteOffEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_OFF >> 4));
+ bool NoteOnEvent = (MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_ON));
+ bool NoteOffEvent = (MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_OFF));
/* Display note events from the host */
if (NoteOnEvent || NoteOffEvent)
{
MIDI_EventPacket_t MIDIEvent = (MIDI_EventPacket_t)
{
- .CableNumber = 0,
- .Command = (MIDICommand >> 4),
+ .Event = MIDI_EVENT(0, MIDICommand),
.Data1 = MIDICommand | Channel,
.Data2 = MIDIPitch,
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_MouseBootProtocol,
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
-
.HIDParserData = &HIDReportInfo
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
- .NotificationPipeNumber = 3,
- .NotificationPipeDoubleBank = false,
-
- .HostMaxPacketSize = sizeof(PacketBuffer),
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
+ .NotificationPipe =
+ {
+ .Address = (PIPE_DIR_IN | 3),
+ .Banks = 1,
+ },
+ .HostMaxPacketSize = sizeof(PacketBuffer),
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
- .EventsPipeNumber = 3,
- .EventsPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
+ .EventsPipe =
+ {
+ .Address = (PIPE_DIR_IN | 3),
+ .Banks = 1,
+ },
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
- .NotificationPipeNumber = 3,
- .NotificationPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
+ .NotificationPipe =
+ {
+ .Address = (PIPE_DIR_IN | 3),
+ .Banks = 1,
+ },
},
};
}
/* Configure the Bluetooth data IN pipe */
- Pipe_ConfigurePipe(BLUETOOTH_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(BLUETOOTH_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the Bluetooth data OUT pipe */
- Pipe_ConfigurePipe(BLUETOOTH_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(BLUETOOTH_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Configure the Bluetooth events pipe */
- Pipe_ConfigurePipe(BLUETOOTH_EVENTS_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- EventsEndpoint->EndpointAddress, EventsEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(BLUETOOTH_EVENTS_PIPE, EP_TYPE_INTERRUPT, EventsEndpoint->EndpointAddress, EventsEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(EventsEndpoint->PollingIntervalMS);
/* Valid data found, return success */
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- #define BLUETOOTH_DATA_IN_PIPE 1
- #define BLUETOOTH_DATA_OUT_PIPE 2
- #define BLUETOOTH_EVENTS_PIPE 3
+ #define BLUETOOTH_DATA_IN_PIPE (PIPE_DIR_IN | 1)
+ #define BLUETOOTH_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
+ #define BLUETOOTH_EVENTS_PIPE (PIPE_DIR_IN | 3)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the Android Accessory data IN pipe */
- Pipe_ConfigurePipe(ANDROID_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(ANDROID_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the Android Accessory data OUT pipe */
- Pipe_ConfigurePipe(ANDROID_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(ANDROID_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Valid data found, return success */
return SuccessfulConfigRead;
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- #define ANDROID_DATA_IN_PIPE 1
- #define ANDROID_DATA_OUT_PIPE 2
+ /** Pipe address of the Android Accessory data IN pipe. */
+ #define ANDROID_DATA_IN_PIPE (PIPE_DIR_IN | 1)
+
+ /** Pipe address of the Android Accessory data OUT pipe. */
+ #define ANDROID_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
StreamingEndpointAddress = DataINEndpoint->EndpointAddress;
/* Configure the Audio data IN pipe */
- Pipe_ConfigurePipe(AUDIO_DATA_IN_PIPE, EP_TYPE_ISOCHRONOUS, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_DOUBLE);
+ Pipe_ConfigurePipe(AUDIO_DATA_IN_PIPE, EP_TYPE_ISOCHRONOUS, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 2);
/* Valid data found, return success */
return SuccessfulConfigRead;
#include "AudioInputHost.h"
/* Macros: */
- /** Pipe number for the Audio data IN pipe. */
- #define AUDIO_DATA_IN_PIPE 1
+ /** Pipe address for the Audio data IN pipe. */
+ #define AUDIO_DATA_IN_PIPE (PIPE_DIR_IN | 1)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
-PROJECT_NAME = "LUFA Library - Audio Input Host"
+PROJECT_NAME = "LUFA Library - Audio Input Host Demo"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
StreamingEndpointAddress = DataOUTEndpoint->EndpointAddress;
/* Configure the Audio data OUT pipe */
- Pipe_ConfigurePipe(AUDIO_DATA_OUT_PIPE, EP_TYPE_ISOCHRONOUS, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_DOUBLE);
+ Pipe_ConfigurePipe(AUDIO_DATA_OUT_PIPE, EP_TYPE_ISOCHRONOUS, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 2);
/* Valid data found, return success */
return SuccessfulConfigRead;
#include "AudioOutputHost.h"
/* Macros: */
- /** Pipe number for the Audio data OUT pipe. */
- #define AUDIO_DATA_OUT_PIPE 1
+ /** Pipe address for the Audio data OUT pipe. */
+ #define AUDIO_DATA_OUT_PIPE (PIPE_DIR_OUT | 1)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
-PROJECT_NAME = "LUFA Library - Audio Output Host"
+PROJECT_NAME = "LUFA Library - Audio Output Host Demo"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
}
/* Configure the HID data IN pipe */
- Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
/* Check if the HID interface contained an optional OUT data endpoint */
if (DataOUTEndpoint)
{
/* Configure the HID data OUT pipe */
- Pipe_ConfigurePipe(HID_DATA_OUT_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(HID_DATA_OUT_PIPE, EP_TYPE_INTERRUPT, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
}
/* Valid data found, return success */
#include "GenericHIDHost.h"
/* Macros: */
- /** Pipe number for the HID data IN pipe. */
- #define HID_DATA_IN_PIPE 1
+ /** Pipe address for the HID data IN pipe. */
+ #define HID_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number for the HID data OUT pipe. */
- #define HID_DATA_OUT_PIPE 2
+ /** Pipe address for the HID data OUT pipe. */
+ #define HID_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the HID data IN pipe */
- Pipe_ConfigurePipe(JOYSTICK_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(JOYSTICK_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
/* Get the HID report size from the HID report descriptor */
#include "HIDReport.h"
/* Macros: */
- /** Pipe number for the joystick report data pipe. */
- #define JOYSTICK_DATA_IN_PIPE 1
+ /** Pipe address for the joystick report data pipe. */
+ #define JOYSTICK_DATA_IN_PIPE (PIPE_DIR_IN | 1)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
-PROJECT_NAME = "LUFA Library - Joystick Host (Using HID Descriptor Parser)"
+PROJECT_NAME = "LUFA Library - Joystick Host Demo (Using HID Descriptor Parser)"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
}
/* Configure the HID data IN pipe */
- Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
/* Valid data found, return success */
#include "KeyboardHost.h"
/* Macros: */
- /** Pipe number for the keyboard data IN pipe. */
- #define KEYBOARD_DATA_IN_PIPE 1
+ /** Pipe address for the keyboard data IN pipe. */
+ #define KEYBOARD_DATA_IN_PIPE (PIPE_DIR_IN | 1)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the HID data IN pipe */
- Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
/* Get the HID report size from the HID report descriptor */
#include "HIDReport.h"
/* Macros: */
- /** Pipe number for the keyboard report data pipe. */
- #define KEYBOARD_DATA_IN_PIPE 1
+ /** Pipe address for the keyboard report data IN pipe. */
+ #define KEYBOARD_DATA_IN_PIPE (PIPE_DIR_IN | 1)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
-PROJECT_NAME = "LUFA Library - Keyboard Host (Using HID Descriptor Parser)"
+PROJECT_NAME = "LUFA Library - Keyboard Host Demo (Using HID Descriptor Parser)"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
}
/* Configure the MIDI data IN pipe */
- Pipe_ConfigurePipe(MIDI_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(MIDI_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the MIDI data OUT pipe */
- Pipe_ConfigurePipe(MIDI_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(MIDI_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Valid data found, return success */
return SuccessfulConfigRead;
#include "MIDIHost.h"
/* Macros: */
- /** Pipe number for the MIDI data IN pipe. */
- #define MIDI_DATA_IN_PIPE 1
+ /** Pipe address for the MIDI data IN pipe. */
+ #define MIDI_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number for the MIDI data OUT pipe. */
- #define MIDI_DATA_OUT_PIPE 2
+ /** Pipe address for the MIDI data OUT pipe. */
+ #define MIDI_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
if (!(Pipe_BytesInPipe()))
Pipe_ClearIN();
- bool NoteOnEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_ON >> 4));
- bool NoteOffEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_OFF >> 4));
+ bool NoteOnEvent = (MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_ON));
+ bool NoteOffEvent = (MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_OFF));
if (NoteOnEvent || NoteOffEvent)
{
{
MIDI_EventPacket_t MIDIEvent = (MIDI_EventPacket_t)
{
- .CableNumber = 0,
- .Command = (MIDICommand >> 4),
+ .Event = MIDI_EVENT(0, MIDICommand),
.Data1 = MIDICommand | Channel,
.Data2 = MIDIPitch,
}
/* Configure the Mass Storage data IN pipe */
- Pipe_ConfigurePipe(MASS_STORE_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(MASS_STORE_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the Mass Storage data OUT pipe */
- Pipe_ConfigurePipe(MASS_STORE_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(MASS_STORE_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Valid data found, return success */
return SuccessfulConfigRead;
/** Interface Protocol value for the Bulk Only transport protocol. */
#define MASS_STORE_PROTOCOL 0x50
- /** Pipe number of the Mass Storage data IN pipe. */
- #define MASS_STORE_DATA_IN_PIPE 1
+ /** Pipe address of the Mass Storage data IN pipe. */
+ #define MASS_STORE_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number of the Mass Storage data OUT pipe. */
- #define MASS_STORE_DATA_OUT_PIPE 2
+ /** Pipe address of the Mass Storage data OUT pipe. */
+ #define MASS_STORE_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the HID data IN pipe */
- Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
/* Valid data found, return success */
#include "MouseHost.h"
/* Macros: */
- /** Pipe number for the mouse data IN pipe. */
- #define MOUSE_DATA_IN_PIPE 1
+ /** Pipe address for the mouse data IN pipe. */
+ #define MOUSE_DATA_IN_PIPE (PIPE_DIR_IN | 1)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the HID data IN pipe */
- Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
/* Get the HID report size from the HID report descriptor */
#include "HIDReport.h"
/* Macros: */
- /** Pipe number for the mouse report data pipe. */
- #define MOUSE_DATA_IN_PIPE 1
+ /** Pipe address for the mouse report data IN pipe. */
+ #define MOUSE_DATA_IN_PIPE (ENDPOINT_DIR_IN | 1)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
-PROJECT_NAME = "LUFA Library - Mouse Host (Using HID Descriptor Parser)"
+PROJECT_NAME = "LUFA Library - Mouse Host Demo (Using HID Descriptor Parser)"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
PrinterAltSetting = PrinterInterface->AlternateSetting;
/* Configure the Printer data IN pipe */
- Pipe_ConfigurePipe(PRINTER_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(PRINTER_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the Printer data OUT pipe */
- Pipe_ConfigurePipe(PRINTER_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(PRINTER_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Valid data found, return success */
return SuccessfulConfigRead;
#include "Lib/PrinterCommands.h"
/* Macros: */
- /** Pipe number of the Printer data IN pipe. */
- #define PRINTER_DATA_IN_PIPE 1
+ /** Pipe address of the Printer data IN pipe. */
+ #define PRINTER_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number of the Printer data OUT pipe. */
- #define PRINTER_DATA_OUT_PIPE 2
+ /** Pipe address of the Printer data OUT pipe. */
+ #define PRINTER_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the RNDIS data IN pipe */
- Pipe_ConfigurePipe(RNDIS_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(RNDIS_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the RNDIS data OUT pipe */
- Pipe_ConfigurePipe(RNDIS_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(RNDIS_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Configure the RNDIS notification pipe */
- Pipe_ConfigurePipe(RNDIS_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(RNDIS_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(NotificationEndpoint->PollingIntervalMS);
/* Valid data found, return success */
#include "RNDISEthernetHost.h"
/* Macros: */
- /** Pipe number for the RNDIS data IN pipe. */
- #define RNDIS_DATA_IN_PIPE 1
+ /** Pipe address for the RNDIS data IN pipe. */
+ #define RNDIS_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number for the RNDIS data OUT pipe. */
- #define RNDIS_DATA_OUT_PIPE 2
+ /** Pipe address for the RNDIS data OUT pipe. */
+ #define RNDIS_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
- /** Pipe number for the RNDIS notification pipe. */
- #define RNDIS_NOTIFICATION_PIPE 3
+ /** Pipe address for the RNDIS notification IN pipe. */
+ #define RNDIS_NOTIFICATION_PIPE (PIPE_DIR_IN | 3)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the Still Image data IN pipe */
- Pipe_ConfigurePipe(SIMAGE_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(SIMAGE_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the Still Image data OUT pipe */
- Pipe_ConfigurePipe(SIMAGE_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(SIMAGE_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Configure the Still Image events pipe */
- Pipe_ConfigurePipe(SIMAGE_EVENTS_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- EventsEndpoint->EndpointAddress, EventsEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(SIMAGE_EVENTS_PIPE, EP_TYPE_INTERRUPT, EventsEndpoint->EndpointAddress, EventsEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(EventsEndpoint->PollingIntervalMS);
/* Valid data found, return success */
#include "StillImageHost.h"
/* Macros: */
- /** Pipe number of the Still Image data IN pipe. */
- #define SIMAGE_DATA_IN_PIPE 1
+ /** Pipe address of the Still Image data IN pipe. */
+ #define SIMAGE_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number of the Still Image data OUT pipe. */
- #define SIMAGE_DATA_OUT_PIPE 2
+ /** Pipe address of the Still Image data OUT pipe. */
+ #define SIMAGE_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
- /** Pipe number of the Still Image events pipe. */
- #define SIMAGE_EVENTS_PIPE 3
+ /** Pipe address of the Still Image events IN pipe. */
+ #define SIMAGE_EVENTS_PIPE (PIPE_DIR_IN | 3)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
}
/* Configure the CDC data IN pipe */
- Pipe_ConfigurePipe(CDC_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(CDC_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
/* Configure the CDC data OUT pipe */
- Pipe_ConfigurePipe(CDC_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(CDC_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
/* Configure the CDC notification pipe */
- Pipe_ConfigurePipe(CDC_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(CDC_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(NotificationEndpoint->PollingIntervalMS);
/* Valid data found, return success */
#include "VirtualSerialHost.h"
/* Macros: */
- /** Pipe number for the CDC data IN pipe. */
- #define CDC_DATA_IN_PIPE 1
+ /** Pipe address for the CDC data IN pipe. */
+ #define CDC_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number for the CDC data OUT pipe. */
- #define CDC_DATA_OUT_PIPE 2
+ /** Pipe address for the CDC data OUT pipe. */
+ #define CDC_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
- /** Pipe number for the CDC notification pipe. */
- #define CDC_NOTIFICATION_PIPE 3
+ /** Pipe address for the CDC notification IN pipe. */
+ #define CDC_NOTIFICATION_PIPE (PIPE_DIR_IN | 3)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
-<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.aps"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.aps"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.aps"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.aps"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.aps"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.aps"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.aps"></File></Folder><Folder name="KeyboardMouseMultiReport"><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\makefile"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.aps"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.aps"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.aps"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.aps"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.aps"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.aps"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.aps"></File></Folder><Folder name="VirtualSerialMassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\LUFA VirtualSerialMassStorage.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.aps"></File></Folder><Folder name="VirtualSerialMouse"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\LUFA VirtualSerialMouse.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.aps"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.aps"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.aps"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.aps"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.aps"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.aps"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.aps"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.aps"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.aps"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.aps"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.aps"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.aps"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\LowLevel\VirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.txt"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.aps"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder><Folder name="TestAndMeasurement"><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\makefile"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="AndroidAccessoryHost"><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.aps"></File></Folder><Folder name="AudioInputHost"><File path="Demos\Host\ClassDriver\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioInputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.aps"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.aps"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.aps"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.aps"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.aps"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.aps"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.aps"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.aps"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.aps"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.aps"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.aps"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\makefile"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.txt"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.aps"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AndroidAccessoryHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.h"></File></Folder><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.aps"></File></Folder><Folder name="AudioInputHost"><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.aps"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.aps"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.aps"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.aps"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.aps"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.aps"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.aps"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.aps"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.aps"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.aps"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.aps"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.aps"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.aps"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\makefile"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.txt"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.aps"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDPServices.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDPServices.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMM.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMM.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDP.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDP.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMMControl.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMMControl.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Doxygen.conf"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothEvents.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothEvents.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.aps"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="CodeTemplates"><Folder name="DriverStubs"><File path="LUFA\CodeTemplates\DriverStubs\Buttons.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Dataflash.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Joystick.h"></File><File path="LUFA\CodeTemplates\DriverStubs\LEDs.h"></File></Folder><File path="LUFA\CodeTemplates\makefile_template.avr8"></File><File path="LUFA\CodeTemplates\makefile_template.uc3"></File><File path="LUFA\CodeTemplates\makefile_template.xmega"></File><File path="LUFA\CodeTemplates\LUFAConfig.h"></File></Folder><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\BoardTypes.h"></File><File path="LUFA\Common\Attributes.h"></File><File path="LUFA\Common\Architectures.h"></File><File path="LUFA\Common\Endianness.h"></File><File path="LUFA\Common\CompilerSpecific.h"></File><File path="LUFA\Common\ArchitectureSpecific.h"></File></Folder><Folder name="DoxygenPages"><Folder name="Style"><File path="LUFA\DoxygenPages\Style\Footer.htm"></File><File path="LUFA\DoxygenPages\Style\Style.css"></File></Folder><Folder name="Images"><Folder name="AS5_AS6_Import"><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step3.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step4.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_3.png"></File></Folder><File path="LUFA\DoxygenPages\Images\Author.jpg"></File><File path="LUFA\DoxygenPages\Images\LUFA.png"></File><File path="LUFA\DoxygenPages\Images\LUFA_thumb.png"></File></Folder><File path="LUFA\DoxygenPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\DoxygenPages\ChangeLog.txt"></File><File path="LUFA\DoxygenPages\CompileTimeTokens.txt"></File><File path="LUFA\DoxygenPages\CompilingApps.txt"></File><File path="LUFA\DoxygenPages\ConfiguringApps.txt"></File><File path="LUFA\DoxygenPages\DevelopingWithLUFA.txt"></File><File path="LUFA\DoxygenPages\DeviceSupport.txt"></File><File path="LUFA\DoxygenPages\DirectorySummaries.txt"></File><File path="LUFA\DoxygenPages\Donating.txt"></File><File path="LUFA\DoxygenPages\FutureChanges.txt"></File><File path="LUFA\DoxygenPages\GettingStarted.txt"></File><File path="LUFA\DoxygenPages\Groups.txt"></File><File path="LUFA\DoxygenPages\LibraryResources.txt"></File><File path="LUFA\DoxygenPages\LicenseInfo.txt"></File><File path="LUFA\DoxygenPages\LUFAPoweredProjects.txt"></File><File path="LUFA\DoxygenPages\MainPage.txt"></File><File path="LUFA\DoxygenPages\MigrationInformation.txt"></File><File path="LUFA\DoxygenPages\ProgrammingApps.txt"></File><File path="LUFA\DoxygenPages\SoftwareBootloaderJump.txt"></File><File path="LUFA\DoxygenPages\VIDAndPIDValues.txt"></File><File path="LUFA\DoxygenPages\WritingBoardDrivers.txt"></File><File path="LUFA\DoxygenPages\ExportingLibrary.txt"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.h"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\AudioClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDCClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDIClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\PrinterClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\AndroidAccessoryClassCommon.h"></File></Folder><File path="LUFA\Drivers\USB\Class\AudioClass.h"></File><File path="LUFA\Drivers\USB\Class\CDCClass.h"></File><File path="LUFA\Drivers\USB\Class\HIDClass.h"></File><File path="LUFA\Drivers\USB\Class\MassStorageClass.h"></File><File path="LUFA\Drivers\USB\Class\MIDIClass.h"></File><File path="LUFA\Drivers\USB\Class\PrinterClass.h"></File><File path="LUFA\Drivers\USB\Class\RNDISClass.h"></File><File path="LUFA\Drivers\USB\Class\StillImageClass.h"></File><File path="LUFA\Drivers\USB\Class\AndroidAccessoryClass.h"></File></Folder><Folder name="Core"><Folder name="AVR8"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\OTG_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.h"></File></Folder><Folder name="UC3"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.h"></File></Folder><Folder name="XMEGA"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Host_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Pipe_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\PipeStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.h"></File></Folder><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.h"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\Events.c"></File><File path="LUFA\Drivers\USB\Core\Events.h"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\Core\StdRequestType.h"></File><File path="LUFA\Drivers\USB\Core\USBMode.h"></File><File path="LUFA\Drivers\USB\Core\USBTask.c"></File><File path="LUFA\Drivers\USB\Core\USBTask.h"></File><File path="LUFA\Drivers\USB\Core\Device.h"></File><File path="LUFA\Drivers\USB\Core\Endpoint.h"></File><File path="LUFA\Drivers\USB\Core\Host.h"></File><File path="LUFA\Drivers\USB\Core\Pipe.h"></File><File path="LUFA\Drivers\USB\Core\USBController.h"></File><File path="LUFA\Drivers\USB\Core\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\Core\OTG.h"></File><File path="LUFA\Drivers\USB\Core\EndpointStream.h"></File><File path="LUFA\Drivers\USB\Core\PipeStream.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File><File path="LUFA\Drivers\Misc\RingBuffer.h"></File><File path="LUFA\Drivers\Misc\AT45DB321C.h"></File><File path="LUFA\Drivers\Misc\AT45DB642D.h"></File></Folder><Folder name="Board"><Folder name="AVR8"><Folder name="ADAFRUITU4"><File path="LUFA\Drivers\Board\AVR8\ADAFRUITU4\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\LEDs.h"></File></Folder><Folder name="BENITO"><File path="LUFA\Drivers\Board\AVR8\BENITO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BENITO\LEDs.h"></File></Folder><Folder name="BIGMULTIO"><File path="LUFA\Drivers\Board\AVR8\BIGMULTIO\LEDs.h"></File></Folder><Folder name="BLACKCAT"><File path="LUFA\Drivers\Board\AVR8\BLACKCAT\LEDs.h"></File></Folder><Folder name="BUI"><File path="LUFA\Drivers\Board\AVR8\BUI\LEDs.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\LEDs.h"></File></Folder><Folder name="CULV3"><File path="LUFA\Drivers\Board\AVR8\CULV3\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\CULV3\LEDs.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\AVR8\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\LEDs.h"></File></Folder><Folder name="JMDBU2"><File path="LUFA\Drivers\Board\AVR8\JMDBU2\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\JMDBU2\LEDs.h"></File></Folder><Folder name="MAXIMUS"><File path="LUFA\Drivers\Board\AVR8\MAXIMUS\LEDs.h"></File></Folder><Folder name="MICROPENDOUS"><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\LEDs.h"></File></Folder><Folder name="MICROSIN162"><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\LEDs.h"></File></Folder><Folder name="MINIMUS"><File path="LUFA\Drivers\Board\AVR8\MINIMUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MINIMUS\LEDs.h"></File></Folder><Folder name="MULTIO"><File path="LUFA\Drivers\Board\AVR8\MULTIO\LEDs.h"></File></Folder><Folder name="OLIMEX162"><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\LEDs.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\AVR8\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="SPARKFUN8U2"><File path="LUFA\Drivers\Board\AVR8\SPARKFUN8U2\LEDs.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\AVR8\STK525\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\LEDs.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\AVR8\STK526\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\LEDs.h"></File></Folder><Folder name="TEENSY"><File path="LUFA\Drivers\Board\AVR8\TEENSY\LEDs.h"></File></Folder><Folder name="TUL"><File path="LUFA\Drivers\Board\AVR8\TUL\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\TUL\LEDs.h"></File></Folder><Folder name="UDIP"><File path="LUFA\Drivers\Board\AVR8\UDIP\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\UDIP\LEDs.h"></File></Folder><Folder name="UNO"><File path="LUFA\Drivers\Board\AVR8\UNO\LEDs.h"></File></Folder><Folder name="USB2AX"><File path="LUFA\Drivers\Board\AVR8\USB2AX\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USB2AX\LEDs.h"></File></Folder><Folder name="USBFOO"><File path="LUFA\Drivers\Board\AVR8\USBFOO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBFOO\LEDs.h"></File></Folder><Folder name="USBKEY"><File path="LUFA\Drivers\Board\AVR8\USBKEY\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\LEDs.h"></File></Folder><Folder name="USBTINYMKII"><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\AVR8\XPLAIN\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\XPLAIN\LEDs.h"></File></Folder></Folder><Folder name="UC3"><Folder name="EVK1100"><File path="LUFA\Drivers\Board\UC3\EVK1100\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\LEDs.h"></File></Folder><Folder name="EVK1101"><File path="LUFA\Drivers\Board\UC3\EVK1101\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\LEDs.h"></File></Folder><Folder name="EVK1104"><File path="LUFA\Drivers\Board\UC3\EVK1104\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1104\LEDs.h"></File></Folder></Folder><Folder name="XMEGA"><Folder name="A3BU_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Dataflash.h"></File></Folder><Folder name="B1_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Dataflash.h"></File></Folder></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVR8"><File path="LUFA\Drivers\Peripheral\AVR8\ADC_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SPI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SerialSPI_AVR8.h"></File></Folder><Folder name="UC3"></Folder><Folder name="XMEGA"><File path="LUFA\Drivers\Peripheral\XMEGA\SPI_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.c"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\SerialSPI_XMEGA.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\TWI.h"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialSPI.h"></File></Folder></Folder><Folder name="Platform"><Folder name="AVR8"></Folder><Folder name="UC3"><File path="LUFA\Platform\UC3\InterruptManagement.h"></File><File path="LUFA\Platform\UC3\InterruptManagement.c"></File><File path="LUFA\Platform\UC3\Exception.S"></File><File path="LUFA\Platform\UC3\ClockManagement.h"></File></Folder><Folder name="XMEGA"><File path="LUFA\Platform\XMEGA\ClockManagement.h"></File></Folder></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File><File path="LUFA\License.txt"></File></Folder><Folder name="Bootloaders"><Folder name="CDC"><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File><File path="Bootloaders\CDC\BootloaderCDC.aps"></File><File path="Bootloaders\CDC\BootloaderAPI.c"></File><File path="Bootloaders\CDC\BootloaderAPI.h"></File><File path="Bootloaders\CDC\BootloaderAPITable.S"></File></Folder><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File><File path="Bootloaders\DFU\BootloaderDFU.aps"></File><File path="Bootloaders\DFU\BootloaderAPI.c"></File><File path="Bootloaders\DFU\BootloaderAPI.h"></File><File path="Bootloaders\DFU\BootloaderAPITable.S"></File></Folder><Folder name="HID"><Folder name="HostLoaderApp"><File path="Bootloaders\HID\HostLoaderApp\gpl3.txt"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile.bsd"></File><File path="Bootloaders\HID\HostLoaderApp\hid_bootloader_cli.c"></File></Folder><File path="Bootloaders\HID\Descriptors.c"></File><File path="Bootloaders\HID\Descriptors.h"></File><File path="Bootloaders\HID\makefile"></File><File path="Bootloaders\HID\BootloaderHID.txt"></File><File path="Bootloaders\HID\BootloaderHID.c"></File><File path="Bootloaders\HID\BootloaderHID.h"></File><File path="Bootloaders\HID\Doxygen.conf"></File><File path="Bootloaders\HID\BootloaderHID.aps"></File></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP-MKII"><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="XPROG"><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.h"></File></Folder><File path="Projects\AVRISP-MKII\Lib\V2Protocol.c"></File><File path="Projects\AVRISP-MKII\Lib\V2Protocol.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.h"></File></Folder><File path="Projects\AVRISP-MKII\Descriptors.c"></File><File path="Projects\AVRISP-MKII\Descriptors.h"></File><File path="Projects\AVRISP-MKII\Doxygen.conf"></File><File path="Projects\AVRISP-MKII\makefile"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.c"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.h"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.txt"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.aps"></File></Folder><Folder name="Benito"><File path="Projects\Benito\Benito.c"></File><File path="Projects\Benito\Benito.h"></File><File path="Projects\Benito\Descriptors.c"></File><File path="Projects\Benito\Descriptors.h"></File><File path="Projects\Benito\Doxygen.conf"></File><File path="Projects\Benito\makefile"></File><File path="Projects\Benito\Benito.txt"></File><File path="Projects\Benito\Benito Programmer.inf"></File><File path="Projects\Benito\Benito.aps"></File></Folder><Folder name="HIDReportViewer"><File path="Projects\HIDReportViewer\HIDReportViewer.c"></File><File path="Projects\HIDReportViewer\HIDReportViewer.h"></File><File path="Projects\HIDReportViewer\makefile"></File><File path="Projects\HIDReportViewer\HIDReportViewer.txt"></File><File path="Projects\HIDReportViewer\Doxygen.conf"></File><File path="Projects\HIDReportViewer\HIDReportViewer.aps"></File></Folder><Folder name="LEDNotifier"><Folder name="CPUUsageApp"><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.Designer.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.resx"></File><File path="Projects\LEDNotifier\CPUUsageApp\Program.cs"></File></Folder><Folder name="HotmailNotifierApp"><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.csproj"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.Designer.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.resx"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\Program.cs"></File></Folder><Folder name="LEDMixerApp"><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.Designer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.resx"></File><File path="Projects\LEDNotifier\LEDMixerApp\Program.cs"></File></Folder><File path="Projects\LEDNotifier\Descriptors.c"></File><File path="Projects\LEDNotifier\Descriptors.h"></File><File path="Projects\LEDNotifier\Doxygen.conf"></File><File path="Projects\LEDNotifier\LEDNotifier.c"></File><File path="Projects\LEDNotifier\LEDNotifier.h"></File><File path="Projects\LEDNotifier\LEDNotifier.txt"></File><File path="Projects\LEDNotifier\LUFA LED Notifier.inf"></File><File path="Projects\LEDNotifier\makefile"></File><File path="Projects\LEDNotifier\LEDNotifier.aps"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File><File path="Projects\Magstripe\Magstripe.aps"></File></Folder><Folder name="MediaController"><File path="Projects\MediaController\Descriptors.c"></File><File path="Projects\MediaController\Descriptors.h"></File><File path="Projects\MediaController\Doxygen.conf"></File><File path="Projects\MediaController\makefile"></File><File path="Projects\MediaController\MediaController.c"></File><File path="Projects\MediaController\MediaController.h"></File><File path="Projects\MediaController\MediaController.txt"></File><File path="Projects\MediaController\MediaController.aps"></File></Folder><Folder name="MIDIToneGenerator"><File path="Projects\MIDIToneGenerator\Descriptors.c"></File><File path="Projects\MIDIToneGenerator\Descriptors.h"></File><File path="Projects\MIDIToneGenerator\makefile"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.c"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.h"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.txt"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.aps"></File><File path="Projects\MIDIToneGenerator\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File><File path="Projects\MissileLauncher\MissileLauncher.aps"></File></Folder><Folder name="RelayBoard"><File path="Projects\RelayBoard\Descriptors.c"></File><File path="Projects\RelayBoard\Descriptors.h"></File><File path="Projects\RelayBoard\Doxygen.conf"></File><File path="Projects\RelayBoard\makefile"></File><File path="Projects\RelayBoard\RelayBoard.c"></File><File path="Projects\RelayBoard\RelayBoard.h"></File><File path="Projects\RelayBoard\RelayBoard.txt"></File><File path="Projects\RelayBoard\RelayBoard.aps"></File></Folder><Folder name="TempDataLogger"><Folder name="Lib"><Folder name="FATFs"><File path="Projects\TempDataLogger\Lib\FATFs\diskio.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\diskio.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ffconf.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\integer.h"></File></Folder><File path="Projects\TempDataLogger\Lib\DataflashManager.c"></File><File path="Projects\TempDataLogger\Lib\DataflashManager.h"></File><File path="Projects\TempDataLogger\Lib\DS1307.c"></File><File path="Projects\TempDataLogger\Lib\DS1307.h"></File><File path="Projects\TempDataLogger\Lib\SCSI.c"></File><File path="Projects\TempDataLogger\Lib\SCSI.h"></File></Folder><Folder name="TempLogHostApp"><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.Designer.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.resx"></File><File path="Projects\TempDataLogger\TempLogHostApp\Program.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\TempLoggerHostApp.csproj"></File></Folder><File path="Projects\TempDataLogger\Descriptors.c"></File><File path="Projects\TempDataLogger\Descriptors.h"></File><File path="Projects\TempDataLogger\Doxygen.conf"></File><File path="Projects\TempDataLogger\makefile"></File><File path="Projects\TempDataLogger\TempDataLogger.c"></File><File path="Projects\TempDataLogger\TempDataLogger.h"></File><File path="Projects\TempDataLogger\TemperatureDataLogger.txt"></File><File path="Projects\TempDataLogger\TempDataLogger.aps"></File></Folder><Folder name="USBtoSerial"><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File><File path="Projects\USBtoSerial\USBtoSerial.aps"></File><File path="Projects\USBtoSerial\Descriptors.c"></File></Folder><Folder name="Webserver"><Folder name="Lib"><Folder name="uip"><File path="Projects\Webserver\Lib\uip\clock.c"></File><File path="Projects\Webserver\Lib\uip\clock.h"></File><File path="Projects\Webserver\Lib\uip\timer.c"></File><File path="Projects\Webserver\Lib\uip\timer.h"></File><File path="Projects\Webserver\Lib\uip\uip.c"></File><File path="Projects\Webserver\Lib\uip\uip.h"></File><File path="Projects\Webserver\Lib\uip\uip_arp.c"></File><File path="Projects\Webserver\Lib\uip\uip_arp.h"></File><File path="Projects\Webserver\Lib\uip\uipopt.h"></File><File path="Projects\Webserver\Lib\uip\uip-split.c"></File><File path="Projects\Webserver\Lib\uip\uip-split.h"></File></Folder><Folder name="FATFs"><File path="Projects\Webserver\Lib\FATFs\diskio.c"></File><File path="Projects\Webserver\Lib\FATFs\diskio.h"></File><File path="Projects\Webserver\Lib\FATFs\ff.c"></File><File path="Projects\Webserver\Lib\FATFs\ff.h"></File><File path="Projects\Webserver\Lib\FATFs\ffconf.h"></File><File path="Projects\Webserver\Lib\FATFs\integer.h"></File></Folder><File path="Projects\Webserver\Lib\DataflashManager.c"></File><File path="Projects\Webserver\Lib\DataflashManager.h"></File><File path="Projects\Webserver\Lib\uIPManagement.c"></File><File path="Projects\Webserver\Lib\uIPManagement.h"></File><File path="Projects\Webserver\Lib\HTTPServerApp.c"></File><File path="Projects\Webserver\Lib\HTTPServerApp.h"></File><File path="Projects\Webserver\Lib\SCSI.c"></File><File path="Projects\Webserver\Lib\SCSI.h"></File><File path="Projects\Webserver\Lib\TELNETServerApp.c"></File><File path="Projects\Webserver\Lib\TELNETServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPClientApp.c"></File><File path="Projects\Webserver\Lib\DHCPClientApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.h"></File><File path="Projects\Webserver\Lib\DHCPServerApp.c"></File><File path="Projects\Webserver\Lib\DHCPServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.c"></File></Folder><File path="Projects\Webserver\makefile"></File><File path="Projects\Webserver\Webserver.c"></File><File path="Projects\Webserver\Webserver.h"></File><File path="Projects\Webserver\Doxygen.conf"></File><File path="Projects\Webserver\Webserver.txt"></File><File path="Projects\Webserver\Descriptors.c"></File><File path="Projects\Webserver\Descriptors.h"></File><File path="Projects\Webserver\USBHostMode.c"></File><File path="Projects\Webserver\USBHostMode.h"></File><File path="Projects\Webserver\USBDeviceMode.c"></File><File path="Projects\Webserver\USBDeviceMode.h"></File><File path="Projects\Webserver\Webserver.aps"></File><File path="Projects\Webserver\LUFA Webserver RNDIS.inf"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.aps"></File><File path="Projects\XPLAINBridge\USARTDescriptors.h"></File><File path="Projects\XPLAINBridge\USARTDescriptors.c"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\Doxygen.conf"></File><File path="Projects\XPLAINBridge\AVRISPDescriptors.h"></File><File path="Projects\XPLAINBridge\AVRISPDescriptors.c"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><Folder name="BuildTests"><Folder name="ModuleTest"><File path="BuildTests\ModuleTest\makefile"></File><File path="BuildTests\ModuleTest\makefile.avr8"></File><File path="BuildTests\ModuleTest\makefile.uc3"></File><File path="BuildTests\ModuleTest\makefile.xmega"></File><File path="BuildTests\ModuleTest\Modules.h"></File><File path="BuildTests\ModuleTest\Test_C.c"></File><File path="BuildTests\ModuleTest\Test_CPP.cpp"></File><File path="BuildTests\ModuleTest\Dummy.S"></File></Folder><Folder name="SingleUSBModeTest"><File path="BuildTests\SingleUSBModeTest\Dummy.S"></File><File path="BuildTests\SingleUSBModeTest\makefile"></File><File path="BuildTests\SingleUSBModeTest\makefile.avr8"></File><File path="BuildTests\SingleUSBModeTest\makefile.uc3"></File><File path="BuildTests\SingleUSBModeTest\makefile.xmega"></File><File path="BuildTests\SingleUSBModeTest\Test.c"></File></Folder><Folder name="StaticAnalysisTest"><File path="BuildTests\StaticAnalysisTest\makefile"></File></Folder><File path="BuildTests\makefile"></File></Folder><Folder name="Maintenance"><File path="Maintenance\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
+<Project name="LUFA"><Folder name="Demos"><Folder name="Device"><Folder name="ClassDriver"><Folder name="AudioInput"><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.c"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.h"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.txt"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioInput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioInput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioInput\makefile"></File><File path="Demos\Device\ClassDriver\AudioInput\AudioInput.aps"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.c"></File><File path="Demos\Device\ClassDriver\AudioOutput\Descriptors.h"></File><File path="Demos\Device\ClassDriver\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\AudioOutput\makefile"></File><File path="Demos\Device\ClassDriver\AudioOutput\AudioOutput.aps"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\DualVirtualSerial\DualVirtualSerial.aps"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.c"></File><File path="Demos\Device\ClassDriver\GenericHID\Descriptors.h"></File><File path="Demos\Device\ClassDriver\GenericHID\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.c"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.h"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.txt"></File><File path="Demos\Device\ClassDriver\GenericHID\makefile"></File><File path="Demos\Device\ClassDriver\GenericHID\GenericHID.aps"></File></Folder><Folder name="Joystick"><File path="Demos\Device\ClassDriver\Joystick\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Joystick\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Joystick\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.c"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.h"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.txt"></File><File path="Demos\Device\ClassDriver\Joystick\makefile"></File><File path="Demos\Device\ClassDriver\Joystick\Joystick.aps"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.c"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.h"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.txt"></File><File path="Demos\Device\ClassDriver\Keyboard\makefile"></File><File path="Demos\Device\ClassDriver\Keyboard\Keyboard.aps"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\makefile"></File><File path="Demos\Device\ClassDriver\KeyboardMouse\KeyboardMouse.aps"></File></Folder><Folder name="KeyboardMouseMultiReport"><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Descriptors.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.c"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.h"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.txt"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\makefile"></File><File path="Demos\Device\ClassDriver\KeyboardMouseMultiReport\KeyboardMouseMultiReport.aps"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorage\makefile"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.c"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.h"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.txt"></File><File path="Demos\Device\ClassDriver\MassStorage\MassStorage.aps"></File></Folder><Folder name="MassStorageKeyboard"><Folder name="Lib"><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\makefile"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.c"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.h"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.txt"></File><File path="Demos\Device\ClassDriver\MassStorageKeyboard\MassStorageKeyboard.aps"></File></Folder><Folder name="MIDI"><File path="Demos\Device\ClassDriver\MIDI\Descriptors.c"></File><File path="Demos\Device\ClassDriver\MIDI\Descriptors.h"></File><File path="Demos\Device\ClassDriver\MIDI\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\MIDI\makefile"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.c"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.h"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.txt"></File><File path="Demos\Device\ClassDriver\MIDI\MIDI.aps"></File></Folder><Folder name="Mouse"><File path="Demos\Device\ClassDriver\Mouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\Mouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\Mouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\Mouse\makefile"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.c"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.h"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.txt"></File><File path="Demos\Device\ClassDriver\Mouse\Mouse.aps"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\makefile"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.txt"></File><File path="Demos\Device\ClassDriver\RNDISEthernet\RNDISEthernet.aps"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerial\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerial\VirtualSerial.aps"></File></Folder><Folder name="VirtualSerialMassStorage"><Folder name="Lib"><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\LUFA VirtualSerialMassStorage.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMassStorage\VirtualSerialMassStorage.aps"></File></Folder><Folder name="VirtualSerialMouse"><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Descriptors.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\Doxygen.conf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\LUFA VirtualSerialMouse.inf"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\makefile"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.c"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.h"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.txt"></File><File path="Demos\Device\ClassDriver\VirtualSerialMouse\VirtualSerialMouse.aps"></File></Folder><File path="Demos\Device\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AudioInput"><File path="Demos\Device\LowLevel\AudioInput\AudioInput.c"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.h"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.txt"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioInput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioInput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioInput\makefile"></File><File path="Demos\Device\LowLevel\AudioInput\AudioInput.aps"></File></Folder><Folder name="AudioOutput"><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.c"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.h"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.txt"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.c"></File><File path="Demos\Device\LowLevel\AudioOutput\Descriptors.h"></File><File path="Demos\Device\LowLevel\AudioOutput\Doxygen.conf"></File><File path="Demos\Device\LowLevel\AudioOutput\makefile"></File><File path="Demos\Device\LowLevel\AudioOutput\AudioOutput.aps"></File></Folder><Folder name="DualVirtualSerial"><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.c"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.h"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.txt"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\LUFA DualVirtualSerial.inf"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\DualVirtualSerial\DualVirtualSerial.aps"></File></Folder><Folder name="GenericHID"><File path="Demos\Device\LowLevel\GenericHID\Descriptors.c"></File><File path="Demos\Device\LowLevel\GenericHID\Descriptors.h"></File><File path="Demos\Device\LowLevel\GenericHID\Doxygen.conf"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.c"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.h"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.txt"></File><File path="Demos\Device\LowLevel\GenericHID\makefile"></File><File path="Demos\Device\LowLevel\GenericHID\GenericHID.aps"></File></Folder><Folder name="Joystick"><File path="Demos\Device\LowLevel\Joystick\Descriptors.c"></File><File path="Demos\Device\LowLevel\Joystick\Descriptors.h"></File><File path="Demos\Device\LowLevel\Joystick\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.c"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.h"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.txt"></File><File path="Demos\Device\LowLevel\Joystick\makefile"></File><File path="Demos\Device\LowLevel\Joystick\Joystick.aps"></File></Folder><Folder name="Keyboard"><File path="Demos\Device\LowLevel\Keyboard\Descriptors.c"></File><File path="Demos\Device\LowLevel\Keyboard\Descriptors.h"></File><File path="Demos\Device\LowLevel\Keyboard\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.c"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.h"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.txt"></File><File path="Demos\Device\LowLevel\Keyboard\makefile"></File><File path="Demos\Device\LowLevel\Keyboard\Keyboard.aps"></File></Folder><Folder name="KeyboardMouse"><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.c"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.h"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.txt"></File><File path="Demos\Device\LowLevel\KeyboardMouse\makefile"></File><File path="Demos\Device\LowLevel\KeyboardMouse\KeyboardMouse.aps"></File></Folder><Folder name="MassStorage"><Folder name="Lib"><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\DataflashManager.h"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.c"></File><File path="Demos\Device\LowLevel\MassStorage\Lib\SCSI.h"></File></Folder><File path="Demos\Device\LowLevel\MassStorage\Descriptors.c"></File><File path="Demos\Device\LowLevel\MassStorage\Descriptors.h"></File><File path="Demos\Device\LowLevel\MassStorage\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MassStorage\makefile"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.c"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.h"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.txt"></File><File path="Demos\Device\LowLevel\MassStorage\MassStorage.aps"></File></Folder><Folder name="MIDI"><File path="Demos\Device\LowLevel\MIDI\Descriptors.c"></File><File path="Demos\Device\LowLevel\MIDI\Descriptors.h"></File><File path="Demos\Device\LowLevel\MIDI\Doxygen.conf"></File><File path="Demos\Device\LowLevel\MIDI\makefile"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.c"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.h"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.txt"></File><File path="Demos\Device\LowLevel\MIDI\MIDI.aps"></File></Folder><Folder name="Mouse"><File path="Demos\Device\LowLevel\Mouse\Descriptors.c"></File><File path="Demos\Device\LowLevel\Mouse\Descriptors.h"></File><File path="Demos\Device\LowLevel\Mouse\Doxygen.conf"></File><File path="Demos\Device\LowLevel\Mouse\makefile"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.c"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.h"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.txt"></File><File path="Demos\Device\LowLevel\Mouse\Mouse.aps"></File></Folder><Folder name="RNDISEthernet"><Folder name="Lib"><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ARP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\DHCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Ethernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\EthernetProtocols.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ICMP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\IP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\ProtocolDecoders.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\RNDIS.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\TCP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\UDP.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Lib\Webserver.c"></File></Folder><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Descriptors.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\Doxygen.conf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\LUFA RNDIS.inf"></File><File path="Demos\Device\LowLevel\RNDISEthernet\makefile"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.c"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.h"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.txt"></File><File path="Demos\Device\LowLevel\RNDISEthernet\RNDISEthernet.aps"></File></Folder><Folder name="VirtualSerial"><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\Descriptors.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\Doxygen.conf"></File><File path="Demos\Device\LowLevel\VirtualSerial\LUFA VirtualSerial.inf"></File><File path="Demos\Device\LowLevel\VirtualSerial\makefile"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.c"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.h"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.txt"></File><File path="Demos\Device\LowLevel\VirtualSerial\VirtualSerial.aps"></File></Folder><File path="Demos\Device\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="SideShow"><Folder name="Lib"><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowApplications.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommands.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowCommon.h"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.c"></File><File path="Demos\Device\Incomplete\Sideshow\Lib\SideshowContent.h"></File></Folder><File path="Demos\Device\Incomplete\Sideshow\Descriptors.c"></File><File path="Demos\Device\Incomplete\Sideshow\Descriptors.h"></File><File path="Demos\Device\Incomplete\Sideshow\makefile"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.c"></File><File path="Demos\Device\Incomplete\Sideshow\Sideshow.h"></File></Folder><Folder name="TestAndMeasurement"><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\Descriptors.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.c"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\TestAndMeasurement.h"></File><File path="Demos\Device\Incomplete\TestAndMeasurement\makefile"></File></Folder></Folder><File path="Demos\Device\makefile"></File></Folder><Folder name="Host"><Folder name="ClassDriver"><Folder name="AndroidAccessoryHost"><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AndroidAccessoryHost\AndroidAccessoryHost.aps"></File></Folder><Folder name="AudioInputHost"><File path="Demos\Host\ClassDriver\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioInputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.aps"></File><File path="Demos\Host\ClassDriver\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\makefile"></File><File path="Demos\Host\ClassDriver\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\ClassDriver\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\JoystickHostWithParser\JoystickHostWithParser.aps"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\ClassDriver\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\ClassDriver\KeyboardHost\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\ClassDriver\KeyboardHost\KeyboardHost.aps"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\KeyboardHostWithParser\KeyboardHostWithParser.aps"></File></Folder><Folder name="MassStorageHost"><File path="Demos\Host\ClassDriver\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MassStorageHost\makefile"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.txt"></File><File path="Demos\Host\ClassDriver\MassStorageHost\MassStorageHost.aps"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\ClassDriver\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MIDIHost\makefile"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.txt"></File><File path="Demos\Host\ClassDriver\MIDIHost\MIDIHost.aps"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\ClassDriver\MouseHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHost\makefile"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.c"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.h"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.txt"></File><File path="Demos\Host\ClassDriver\MouseHost\MouseHost.aps"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\ClassDriver\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\makefile"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.h"></File><File path="Demos\Host\ClassDriver\MouseHostWithParser\MouseHostWithParser.aps"></File></Folder><Folder name="PrinterHost"><File path="Demos\Host\ClassDriver\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\PrinterHost\makefile"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.txt"></File><File path="Demos\Host\ClassDriver\PrinterHost\PrinterHost.aps"></File></Folder><Folder name="RNDISEthernetHost"><File path="Demos\Host\ClassDriver\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\makefile"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.txt"></File><File path="Demos\Host\ClassDriver\RNDISEthernetHost\RNDISEthernetHost.aps"></File></Folder><Folder name="StillImageHost"><File path="Demos\Host\ClassDriver\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\StillImageHost\makefile"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.txt"></File><File path="Demos\Host\ClassDriver\StillImageHost\StillImageHost.aps"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\ClassDriver\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\makefile"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.txt"></File><File path="Demos\Host\ClassDriver\VirtualSerialHost\VirtualSerialHost.aps"></File></Folder><File path="Demos\Host\ClassDriver\makefile"></File></Folder><Folder name="LowLevel"><Folder name="AndroidAccessoryHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Lib\AndroidAccessoryCommands.h"></File></Folder><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.c"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\DeviceDescriptor.h"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\makefile"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.txt"></File><File path="Demos\Host\LowLevel\AndroidAccessoryHost\AndroidAccessoryHost.aps"></File></Folder><Folder name="AudioInputHost"><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioInputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioInputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioInputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.aps"></File><File path="Demos\Host\LowLevel\AudioInputHost\AudioInputHost.txt"></File></Folder><Folder name="AudioOutputHost"><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\AudioOutputHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\AudioOutputHost\makefile"></File><File path="Demos\Host\LowLevel\AudioOutputHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.aps"></File><File path="Demos\Host\LowLevel\AudioOutputHost\AudioOutputHost.txt"></File></Folder><Folder name="GenericHIDHost"><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.c"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.h"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.txt"></File><File path="Demos\Host\LowLevel\GenericHIDHost\makefile"></File><File path="Demos\Host\LowLevel\GenericHIDHost\GenericHIDHost.aps"></File></Folder><Folder name="JoystickHostWithParser"><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.c"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.h"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.txt"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\JoystickHostWithParser\JoystickHostWithParser.aps"></File></Folder><Folder name="KeyboardHost"><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.c"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.h"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.txt"></File><File path="Demos\Host\LowLevel\KeyboardHost\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHost\KeyboardHost.aps"></File></Folder><Folder name="KeyboardHostWithParser"><File path="Demos\Host\LowLevel\KeyboardHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.c"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.h"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.txt"></File><File path="Demos\Host\LowLevel\KeyboardHostWithParser\KeyboardHostWithParser.aps"></File></Folder><Folder name="MassStorageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\Lib\MassStoreCommands.h"></File></Folder><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MassStorageHost\makefile"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.c"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.h"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.txt"></File><File path="Demos\Host\LowLevel\MassStorageHost\MassStorageHost.aps"></File></Folder><Folder name="MIDIHost"><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MIDIHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MIDIHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MIDIHost\makefile"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.c"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.h"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.txt"></File><File path="Demos\Host\LowLevel\MIDIHost\MIDIHost.aps"></File></Folder><Folder name="MouseHost"><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHost\makefile"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.c"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.h"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.txt"></File><File path="Demos\Host\LowLevel\MouseHost\MouseHost.aps"></File></Folder><Folder name="MouseHostWithParser"><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.txt"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\Doxygen.conf"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\HIDReport.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\makefile"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.c"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.h"></File><File path="Demos\Host\LowLevel\MouseHostWithParser\MouseHostWithParser.aps"></File></Folder><Folder name="PrinterHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.c"></File><File path="Demos\Host\LowLevel\PrinterHost\Lib\PrinterCommands.h"></File></Folder><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\PrinterHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\PrinterHost\makefile"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.c"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.h"></File><File path="Demos\Host\LowLevel\PrinterHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.txt"></File><File path="Demos\Host\LowLevel\PrinterHost\PrinterHost.aps"></File></Folder><Folder name="RNDISEthernetHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Lib\RNDISCommands.h"></File></Folder><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\makefile"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.c"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.h"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISHost.txt"></File><File path="Demos\Host\LowLevel\RNDISEthernetHost\RNDISEthernetHost.aps"></File></Folder><Folder name="StillImageHost"><Folder name="Lib"><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.c"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\StillImageCommands.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Lib\PIMACodes.h"></File></Folder><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\StillImageHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\StillImageHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\StillImageHost\makefile"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.c"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.h"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.txt"></File><File path="Demos\Host\LowLevel\StillImageHost\StillImageHost.aps"></File></Folder><Folder name="VirtualSerialHost"><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\ConfigDescriptor.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\Doxygen.conf"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\makefile"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.c"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.h"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.txt"></File><File path="Demos\Host\LowLevel\VirtualSerialHost\VirtualSerialHost.aps"></File></Folder><File path="Demos\Host\LowLevel\makefile"></File></Folder><Folder name="Incomplete"><Folder name="BluetoothHost"><Folder name="Lib"><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothACLPackets.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothClassCodes.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothHCICommands.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\BluetoothStack.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDPServices.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDPServices.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMM.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMM.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDP.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\SDP.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMMControl.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\Lib\RFCOMMControl.h"></File></Folder><File path="Demos\Host\Incomplete\BluetoothHost\makefile"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothHost.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\ConfigDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\DeviceDescriptor.h"></File><File path="Demos\Host\Incomplete\BluetoothHost\Doxygen.conf"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothEvents.c"></File><File path="Demos\Host\Incomplete\BluetoothHost\BluetoothEvents.h"></File></Folder></Folder><File path="Demos\Host\makefile"></File></Folder><Folder name="DualRole"><Folder name="ClassDriver"><Folder name="MouseHostDevice"><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Doxygen.conf"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\makefile"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\Descriptors.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.c"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\HostFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\DeviceFunctions.h"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.txt"></File><File path="Demos\DualRole\ClassDriver\MouseHostDevice\MouseHostDevice.aps"></File></Folder><File path="Demos\DualRole\ClassDriver\makefile"></File></Folder><File path="Demos\DualRole\makefile"></File></Folder><File path="Demos\makefile"></File></Folder><Folder name="LUFA"><Folder name="CodeTemplates"><Folder name="DriverStubs"><File path="LUFA\CodeTemplates\DriverStubs\Buttons.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Dataflash.h"></File><File path="LUFA\CodeTemplates\DriverStubs\Joystick.h"></File><File path="LUFA\CodeTemplates\DriverStubs\LEDs.h"></File></Folder><File path="LUFA\CodeTemplates\makefile_template.avr8"></File><File path="LUFA\CodeTemplates\makefile_template.uc3"></File><File path="LUFA\CodeTemplates\makefile_template.xmega"></File><File path="LUFA\CodeTemplates\LUFAConfig.h"></File></Folder><Folder name="Common"><File path="LUFA\Common\Common.h"></File><File path="LUFA\Common\BoardTypes.h"></File><File path="LUFA\Common\Attributes.h"></File><File path="LUFA\Common\Architectures.h"></File><File path="LUFA\Common\Endianness.h"></File><File path="LUFA\Common\CompilerSpecific.h"></File><File path="LUFA\Common\ArchitectureSpecific.h"></File></Folder><Folder name="DoxygenPages"><Folder name="Style"><File path="LUFA\DoxygenPages\Style\Footer.htm"></File><File path="LUFA\DoxygenPages\Style\Style.css"></File></Folder><Folder name="Images"><Folder name="AS5_AS6_Import"><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step3.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step4.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_1.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_2.png"></File><File path="LUFA\DoxygenPages\Images\AS5_AS6_Import\AS5_AS6_Import_Step5_3.png"></File></Folder><File path="LUFA\DoxygenPages\Images\Author.jpg"></File><File path="LUFA\DoxygenPages\Images\LUFA.png"></File><File path="LUFA\DoxygenPages\Images\LUFA_thumb.png"></File></Folder><File path="LUFA\DoxygenPages\BuildingLinkableLibraries.txt"></File><File path="LUFA\DoxygenPages\ChangeLog.txt"></File><File path="LUFA\DoxygenPages\CompileTimeTokens.txt"></File><File path="LUFA\DoxygenPages\CompilingApps.txt"></File><File path="LUFA\DoxygenPages\ConfiguringApps.txt"></File><File path="LUFA\DoxygenPages\DevelopingWithLUFA.txt"></File><File path="LUFA\DoxygenPages\DeviceSupport.txt"></File><File path="LUFA\DoxygenPages\DirectorySummaries.txt"></File><File path="LUFA\DoxygenPages\Donating.txt"></File><File path="LUFA\DoxygenPages\FutureChanges.txt"></File><File path="LUFA\DoxygenPages\GettingStarted.txt"></File><File path="LUFA\DoxygenPages\Groups.txt"></File><File path="LUFA\DoxygenPages\LibraryResources.txt"></File><File path="LUFA\DoxygenPages\LicenseInfo.txt"></File><File path="LUFA\DoxygenPages\LUFAPoweredProjects.txt"></File><File path="LUFA\DoxygenPages\MainPage.txt"></File><File path="LUFA\DoxygenPages\MigrationInformation.txt"></File><File path="LUFA\DoxygenPages\ProgrammingApps.txt"></File><File path="LUFA\DoxygenPages\SoftwareBootloaderJump.txt"></File><File path="LUFA\DoxygenPages\VIDAndPIDValues.txt"></File><File path="LUFA\DoxygenPages\WritingBoardDrivers.txt"></File><File path="LUFA\DoxygenPages\ExportingLibrary.txt"></File><File path="LUFA\DoxygenPages\KnownIssues.txt"></File></Folder><Folder name="Drivers"><Folder name="USB"><Folder name="Class"><Folder name="Device"><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\AudioClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\CDCClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\HIDClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MassStorageClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\MIDIClassDevice.h"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.c"></File><File path="LUFA\Drivers\USB\Class\Device\RNDISClassDevice.h"></File></Folder><Folder name="Host"><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AudioClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\CDCClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\HIDClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MassStorageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\MIDIClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\PrinterClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\RNDISClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\StillImageClassHost.h"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.c"></File><File path="LUFA\Drivers\USB\Class\Host\AndroidAccessoryClassHost.h"></File></Folder><Folder name="Common"><File path="LUFA\Drivers\USB\Class\Common\AudioClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\CDCClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.c"></File><File path="LUFA\Drivers\USB\Class\Common\HIDParser.h"></File><File path="LUFA\Drivers\USB\Class\Common\HIDReportData.h"></File><File path="LUFA\Drivers\USB\Class\Common\MassStorageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\MIDIClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\PrinterClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\RNDISClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\StillImageClassCommon.h"></File><File path="LUFA\Drivers\USB\Class\Common\AndroidAccessoryClassCommon.h"></File></Folder><File path="LUFA\Drivers\USB\Class\AudioClass.h"></File><File path="LUFA\Drivers\USB\Class\CDCClass.h"></File><File path="LUFA\Drivers\USB\Class\HIDClass.h"></File><File path="LUFA\Drivers\USB\Class\MassStorageClass.h"></File><File path="LUFA\Drivers\USB\Class\MIDIClass.h"></File><File path="LUFA\Drivers\USB\Class\PrinterClass.h"></File><File path="LUFA\Drivers\USB\Class\RNDISClass.h"></File><File path="LUFA\Drivers\USB\Class\StillImageClass.h"></File><File path="LUFA\Drivers\USB\Class\AndroidAccessoryClass.h"></File></Folder><Folder name="Core"><Folder name="AVR8"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Device_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Endpoint_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Host_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\OTG_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\Pipe_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBController_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\USBInterrupt_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\EndpointStream_AVR8.h"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.c"></File><File path="LUFA\Drivers\USB\Core\AVR8\PipeStream_AVR8.h"></File></Folder><Folder name="UC3"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Endpoint_RW.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Template\Template_Pipe_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Device_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Endpoint_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Pipe_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBController_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\USBInterrupt_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\Host_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\EndpointStream_UC3.h"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.c"></File><File path="LUFA\Drivers\USB\Core\UC3\PipeStream_UC3.h"></File></Folder><Folder name="XMEGA"><Folder name="Template"><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_R.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_Control_W.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Template\Template_Endpoint_RW.c"></File></Folder><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Device_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Endpoint_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\EndpointStream_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Host_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\Pipe_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\PipeStream_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBController_XMEGA.h"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.c"></File><File path="LUFA\Drivers\USB\Core\XMEGA\USBInterrupt_XMEGA.h"></File></Folder><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.c"></File><File path="LUFA\Drivers\USB\Core\ConfigDescriptor.h"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\DeviceStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\Events.c"></File><File path="LUFA\Drivers\USB\Core\Events.h"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.c"></File><File path="LUFA\Drivers\USB\Core\HostStandardReq.h"></File><File path="LUFA\Drivers\USB\Core\StdDescriptors.h"></File><File path="LUFA\Drivers\USB\Core\StdRequestType.h"></File><File path="LUFA\Drivers\USB\Core\USBMode.h"></File><File path="LUFA\Drivers\USB\Core\USBTask.c"></File><File path="LUFA\Drivers\USB\Core\USBTask.h"></File><File path="LUFA\Drivers\USB\Core\Device.h"></File><File path="LUFA\Drivers\USB\Core\Endpoint.h"></File><File path="LUFA\Drivers\USB\Core\Host.h"></File><File path="LUFA\Drivers\USB\Core\Pipe.h"></File><File path="LUFA\Drivers\USB\Core\USBController.h"></File><File path="LUFA\Drivers\USB\Core\USBInterrupt.h"></File><File path="LUFA\Drivers\USB\Core\OTG.h"></File><File path="LUFA\Drivers\USB\Core\EndpointStream.h"></File><File path="LUFA\Drivers\USB\Core\PipeStream.h"></File></Folder><File path="LUFA\Drivers\USB\USB.h"></File></Folder><Folder name="Misc"><File path="LUFA\Drivers\Misc\TerminalCodes.h"></File><File path="LUFA\Drivers\Misc\RingBuffer.h"></File><File path="LUFA\Drivers\Misc\AT45DB321C.h"></File><File path="LUFA\Drivers\Misc\AT45DB642D.h"></File></Folder><Folder name="Board"><Folder name="AVR8"><Folder name="ADAFRUITU4"><File path="LUFA\Drivers\Board\AVR8\ADAFRUITU4\LEDs.h"></File></Folder><Folder name="ATAVRUSBRF01"><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\ATAVRUSBRF01\LEDs.h"></File></Folder><Folder name="BENITO"><File path="LUFA\Drivers\Board\AVR8\BENITO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BENITO\LEDs.h"></File></Folder><Folder name="BIGMULTIO"><File path="LUFA\Drivers\Board\AVR8\BIGMULTIO\LEDs.h"></File></Folder><Folder name="BLACKCAT"><File path="LUFA\Drivers\Board\AVR8\BLACKCAT\LEDs.h"></File></Folder><Folder name="BUI"><File path="LUFA\Drivers\Board\AVR8\BUI\LEDs.h"></File></Folder><Folder name="BUMBLEB"><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\BUMBLEB\LEDs.h"></File></Folder><Folder name="CULV3"><File path="LUFA\Drivers\Board\AVR8\CULV3\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\CULV3\LEDs.h"></File></Folder><Folder name="DUCE"><File path="LUFA\Drivers\Board\AVR8\DUCE\LEDs.h"></File></Folder><Folder name="EVK527"><File path="LUFA\Drivers\Board\AVR8\EVK527\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\EVK527\LEDs.h"></File></Folder><Folder name="JMDBU2"><File path="LUFA\Drivers\Board\AVR8\JMDBU2\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\JMDBU2\LEDs.h"></File></Folder><Folder name="MAXIMUS"><File path="LUFA\Drivers\Board\AVR8\MAXIMUS\LEDs.h"></File></Folder><Folder name="MICROPENDOUS"><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROPENDOUS\LEDs.h"></File></Folder><Folder name="MICROSIN162"><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MICROSIN162\LEDs.h"></File></Folder><Folder name="MINIMUS"><File path="LUFA\Drivers\Board\AVR8\MINIMUS\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\MINIMUS\LEDs.h"></File></Folder><Folder name="MULTIO"><File path="LUFA\Drivers\Board\AVR8\MULTIO\LEDs.h"></File></Folder><Folder name="OLIMEX32U4"><File path="LUFA\Drivers\Board\AVR8\OLIMEX32U4\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEX32U4\LEDs.h"></File></Folder><Folder name="OLIMEX162"><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEX162\LEDs.h"></File></Folder><Folder name="OLIMEXT32U4"><File path="LUFA\Drivers\Board\AVR8\OLIMEXT32U4\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\OLIMEXT32U4\LEDs.h"></File></Folder><Folder name="RZUSBSTICK"><File path="LUFA\Drivers\Board\AVR8\RZUSBSTICK\LEDs.h"></File></Folder><Folder name="SPARKFUN8U2"><File path="LUFA\Drivers\Board\AVR8\SPARKFUN8U2\LEDs.h"></File></Folder><Folder name="STK525"><File path="LUFA\Drivers\Board\AVR8\STK525\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK525\LEDs.h"></File></Folder><Folder name="STK526"><File path="LUFA\Drivers\Board\AVR8\STK526\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\STK526\LEDs.h"></File></Folder><Folder name="TEENSY"><File path="LUFA\Drivers\Board\AVR8\TEENSY\LEDs.h"></File></Folder><Folder name="TUL"><File path="LUFA\Drivers\Board\AVR8\TUL\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\TUL\LEDs.h"></File></Folder><Folder name="UDIP"><File path="LUFA\Drivers\Board\AVR8\UDIP\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\UDIP\LEDs.h"></File></Folder><Folder name="UNO"><File path="LUFA\Drivers\Board\AVR8\UNO\LEDs.h"></File></Folder><Folder name="USB2AX"><File path="LUFA\Drivers\Board\AVR8\USB2AX\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USB2AX\LEDs.h"></File></Folder><Folder name="USBFOO"><File path="LUFA\Drivers\Board\AVR8\USBFOO\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBFOO\LEDs.h"></File></Folder><Folder name="USBKEY"><File path="LUFA\Drivers\Board\AVR8\USBKEY\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\Joystick.h"></File><File path="LUFA\Drivers\Board\AVR8\USBKEY\LEDs.h"></File></Folder><Folder name="USBTINYMKII"><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\Buttons.h"></File><File path="LUFA\Drivers\Board\AVR8\USBTINYMKII\LEDs.h"></File></Folder><Folder name="XPLAIN"><File path="LUFA\Drivers\Board\AVR8\XPLAIN\Dataflash.h"></File><File path="LUFA\Drivers\Board\AVR8\XPLAIN\LEDs.h"></File></Folder></Folder><Folder name="UC3"><Folder name="EVK1100"><File path="LUFA\Drivers\Board\UC3\EVK1100\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1100\LEDs.h"></File></Folder><Folder name="EVK1101"><File path="LUFA\Drivers\Board\UC3\EVK1101\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\Joystick.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1101\LEDs.h"></File></Folder><Folder name="EVK1104"><File path="LUFA\Drivers\Board\UC3\EVK1104\Buttons.h"></File><File path="LUFA\Drivers\Board\UC3\EVK1104\LEDs.h"></File></Folder></Folder><Folder name="XMEGA"><Folder name="A3BU_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\A3BU_XPLAINED\Dataflash.h"></File></Folder><Folder name="B1_XPLAINED"><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Buttons.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\LEDs.h"></File><File path="LUFA\Drivers\Board\XMEGA\B1_XPLAINED\Dataflash.h"></File></Folder></Folder><File path="LUFA\Drivers\Board\Temperature.h"></File><File path="LUFA\Drivers\Board\Dataflash.h"></File><File path="LUFA\Drivers\Board\Joystick.h"></File><File path="LUFA\Drivers\Board\Temperature.c"></File><File path="LUFA\Drivers\Board\LEDs.h"></File><File path="LUFA\Drivers\Board\Buttons.h"></File></Folder><Folder name="Peripheral"><Folder name="AVR8"><File path="LUFA\Drivers\Peripheral\AVR8\ADC_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\Serial_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SPI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.c"></File><File path="LUFA\Drivers\Peripheral\AVR8\TWI_AVR8.h"></File><File path="LUFA\Drivers\Peripheral\AVR8\SerialSPI_AVR8.h"></File></Folder><Folder name="UC3"></Folder><Folder name="XMEGA"><File path="LUFA\Drivers\Peripheral\XMEGA\SPI_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.c"></File><File path="LUFA\Drivers\Peripheral\XMEGA\Serial_XMEGA.h"></File><File path="LUFA\Drivers\Peripheral\XMEGA\SerialSPI_XMEGA.h"></File></Folder><File path="LUFA\Drivers\Peripheral\ADC.h"></File><File path="LUFA\Drivers\Peripheral\TWI.h"></File><File path="LUFA\Drivers\Peripheral\Serial.h"></File><File path="LUFA\Drivers\Peripheral\SPI.h"></File><File path="LUFA\Drivers\Peripheral\SerialSPI.h"></File></Folder></Folder><Folder name="Platform"><Folder name="AVR8"></Folder><Folder name="UC3"><File path="LUFA\Platform\UC3\InterruptManagement.h"></File><File path="LUFA\Platform\UC3\InterruptManagement.c"></File><File path="LUFA\Platform\UC3\Exception.S"></File><File path="LUFA\Platform\UC3\ClockManagement.h"></File></Folder><Folder name="XMEGA"><File path="LUFA\Platform\XMEGA\ClockManagement.h"></File></Folder></Folder><File path="LUFA\makefile"></File><File path="LUFA\Version.h"></File><File path="LUFA\Doxygen.conf"></File><File path="LUFA\License.txt"></File></Folder><Folder name="Bootloaders"><Folder name="CDC"><Folder name="Config"><File path="Bootloaders\CDC\Config\LUFAConfig.h"></File></Folder><File path="Bootloaders\CDC\BootloaderCDC.c"></File><File path="Bootloaders\CDC\BootloaderCDC.h"></File><File path="Bootloaders\CDC\Descriptors.c"></File><File path="Bootloaders\CDC\Descriptors.h"></File><File path="Bootloaders\CDC\makefile"></File><File path="Bootloaders\CDC\LUFA CDC Bootloader.inf"></File><File path="Bootloaders\CDC\Doxygen.conf"></File><File path="Bootloaders\CDC\BootloaderCDC.txt"></File><File path="Bootloaders\CDC\BootloaderCDC.aps"></File><File path="Bootloaders\CDC\BootloaderAPI.c"></File><File path="Bootloaders\CDC\BootloaderAPI.h"></File><File path="Bootloaders\CDC\BootloaderAPITable.S"></File></Folder><Folder name="DFU"><File path="Bootloaders\DFU\BootloaderDFU.c"></File><File path="Bootloaders\DFU\BootloaderDFU.h"></File><File path="Bootloaders\DFU\Descriptors.c"></File><File path="Bootloaders\DFU\Descriptors.h"></File><File path="Bootloaders\DFU\makefile"></File><File path="Bootloaders\DFU\BootloaderDFU.txt"></File><File path="Bootloaders\DFU\Doxygen.conf"></File><File path="Bootloaders\DFU\BootloaderDFU.aps"></File><File path="Bootloaders\DFU\BootloaderAPI.c"></File><File path="Bootloaders\DFU\BootloaderAPI.h"></File><File path="Bootloaders\DFU\BootloaderAPITable.S"></File></Folder><Folder name="HID"><Folder name="HostLoaderApp"><File path="Bootloaders\HID\HostLoaderApp\gpl3.txt"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile"></File><File path="Bootloaders\HID\HostLoaderApp\Makefile.bsd"></File><File path="Bootloaders\HID\HostLoaderApp\hid_bootloader_cli.c"></File></Folder><File path="Bootloaders\HID\Descriptors.c"></File><File path="Bootloaders\HID\Descriptors.h"></File><File path="Bootloaders\HID\makefile"></File><File path="Bootloaders\HID\BootloaderHID.txt"></File><File path="Bootloaders\HID\BootloaderHID.c"></File><File path="Bootloaders\HID\BootloaderHID.h"></File><File path="Bootloaders\HID\Doxygen.conf"></File><File path="Bootloaders\HID\BootloaderHID.aps"></File></Folder><File path="Bootloaders\makefile"></File></Folder><Folder name="Projects"><Folder name="AVRISP-MKII"><Folder name="Lib"><Folder name="ISP"><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\ISP\ISPTarget.h"></File></Folder><Folder name="XPROG"><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\TINYNVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XMEGANVM.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGProtocol.h"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.c"></File><File path="Projects\AVRISP-MKII\Lib\XPROG\XPROGTarget.h"></File></Folder><File path="Projects\AVRISP-MKII\Lib\V2Protocol.c"></File><File path="Projects\AVRISP-MKII\Lib\V2Protocol.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolConstants.h"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.c"></File><File path="Projects\AVRISP-MKII\Lib\V2ProtocolParams.h"></File></Folder><File path="Projects\AVRISP-MKII\Descriptors.c"></File><File path="Projects\AVRISP-MKII\Descriptors.h"></File><File path="Projects\AVRISP-MKII\Doxygen.conf"></File><File path="Projects\AVRISP-MKII\makefile"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.c"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.h"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.txt"></File><File path="Projects\AVRISP-MKII\AVRISP-MKII.aps"></File></Folder><Folder name="Benito"><File path="Projects\Benito\Benito.c"></File><File path="Projects\Benito\Benito.h"></File><File path="Projects\Benito\Descriptors.c"></File><File path="Projects\Benito\Descriptors.h"></File><File path="Projects\Benito\Doxygen.conf"></File><File path="Projects\Benito\makefile"></File><File path="Projects\Benito\Benito.txt"></File><File path="Projects\Benito\Benito Programmer.inf"></File><File path="Projects\Benito\Benito.aps"></File></Folder><Folder name="HIDReportViewer"><File path="Projects\HIDReportViewer\HIDReportViewer.c"></File><File path="Projects\HIDReportViewer\HIDReportViewer.h"></File><File path="Projects\HIDReportViewer\makefile"></File><File path="Projects\HIDReportViewer\HIDReportViewer.txt"></File><File path="Projects\HIDReportViewer\Doxygen.conf"></File><File path="Projects\HIDReportViewer\HIDReportViewer.aps"></File></Folder><Folder name="LEDNotifier"><Folder name="CPUUsageApp"><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.csproj"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.Designer.cs"></File><File path="Projects\LEDNotifier\CPUUsageApp\CPUMonitor.resx"></File><File path="Projects\LEDNotifier\CPUUsageApp\Program.cs"></File></Folder><Folder name="HotmailNotifierApp"><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.csproj"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.Designer.cs"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\MailNotifier.resx"></File><File path="Projects\LEDNotifier\HotmailNotifierApp\Program.cs"></File></Folder><Folder name="LEDMixerApp"><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.csproj"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.Designer.cs"></File><File path="Projects\LEDNotifier\LEDMixerApp\LEDMixer.resx"></File><File path="Projects\LEDNotifier\LEDMixerApp\Program.cs"></File></Folder><File path="Projects\LEDNotifier\Descriptors.c"></File><File path="Projects\LEDNotifier\Descriptors.h"></File><File path="Projects\LEDNotifier\Doxygen.conf"></File><File path="Projects\LEDNotifier\LEDNotifier.c"></File><File path="Projects\LEDNotifier\LEDNotifier.h"></File><File path="Projects\LEDNotifier\LEDNotifier.txt"></File><File path="Projects\LEDNotifier\LUFA LED Notifier.inf"></File><File path="Projects\LEDNotifier\makefile"></File><File path="Projects\LEDNotifier\LEDNotifier.aps"></File></Folder><Folder name="MagStripe"><Folder name="Lib"><File path="Projects\Magstripe\Lib\CircularBitBuffer.c"></File><File path="Projects\Magstripe\Lib\CircularBitBuffer.h"></File><File path="Projects\Magstripe\Lib\MagstripeHW.h"></File></Folder><File path="Projects\Magstripe\Descriptors.c"></File><File path="Projects\Magstripe\Descriptors.h"></File><File path="Projects\Magstripe\Magstripe.c"></File><File path="Projects\Magstripe\Magstripe.h"></File><File path="Projects\Magstripe\makefile"></File><File path="Projects\Magstripe\Magstripe.txt"></File><File path="Projects\Magstripe\Doxygen.conf"></File><File path="Projects\Magstripe\Magstripe.aps"></File></Folder><Folder name="MediaController"><File path="Projects\MediaController\Descriptors.c"></File><File path="Projects\MediaController\Descriptors.h"></File><File path="Projects\MediaController\Doxygen.conf"></File><File path="Projects\MediaController\makefile"></File><File path="Projects\MediaController\MediaController.c"></File><File path="Projects\MediaController\MediaController.h"></File><File path="Projects\MediaController\MediaController.txt"></File><File path="Projects\MediaController\MediaController.aps"></File></Folder><Folder name="MIDIToneGenerator"><File path="Projects\MIDIToneGenerator\Descriptors.c"></File><File path="Projects\MIDIToneGenerator\Descriptors.h"></File><File path="Projects\MIDIToneGenerator\makefile"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.c"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.h"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.txt"></File><File path="Projects\MIDIToneGenerator\MIDIToneGenerator.aps"></File><File path="Projects\MIDIToneGenerator\Doxygen.conf"></File></Folder><Folder name="MissileLauncher"><File path="Projects\MissileLauncher\ConfigDescriptor.c"></File><File path="Projects\MissileLauncher\ConfigDescriptor.h"></File><File path="Projects\MissileLauncher\Doxygen.conf"></File><File path="Projects\MissileLauncher\makefile"></File><File path="Projects\MissileLauncher\MissileLauncher.c"></File><File path="Projects\MissileLauncher\MissileLauncher.h"></File><File path="Projects\MissileLauncher\MissileLauncher.txt"></File><File path="Projects\MissileLauncher\MissileLauncher.aps"></File></Folder><Folder name="RelayBoard"><File path="Projects\RelayBoard\Descriptors.c"></File><File path="Projects\RelayBoard\Descriptors.h"></File><File path="Projects\RelayBoard\Doxygen.conf"></File><File path="Projects\RelayBoard\makefile"></File><File path="Projects\RelayBoard\RelayBoard.c"></File><File path="Projects\RelayBoard\RelayBoard.h"></File><File path="Projects\RelayBoard\RelayBoard.txt"></File><File path="Projects\RelayBoard\RelayBoard.aps"></File></Folder><Folder name="SerialToLCD"><Folder name="Lib"><File path="Projects\SerialToLCD\Lib\HD44780.c"></File><File path="Projects\SerialToLCD\Lib\HD44780.h"></File></Folder><File path="Projects\SerialToLCD\Descriptors.c"></File><File path="Projects\SerialToLCD\Descriptors.h"></File><File path="Projects\SerialToLCD\makefile"></File><File path="Projects\SerialToLCD\SerialToLCD.c"></File><File path="Projects\SerialToLCD\SerialToLCD.h"></File><File path="Projects\SerialToLCD\SerialToLCD.txt"></File><File path="Projects\SerialToLCD\Doxygen.conf"></File></Folder><Folder name="TempDataLogger"><Folder name="Lib"><Folder name="FATFs"><File path="Projects\TempDataLogger\Lib\FATFs\diskio.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\diskio.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.c"></File><File path="Projects\TempDataLogger\Lib\FATFs\ff.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\ffconf.h"></File><File path="Projects\TempDataLogger\Lib\FATFs\integer.h"></File></Folder><File path="Projects\TempDataLogger\Lib\DataflashManager.c"></File><File path="Projects\TempDataLogger\Lib\DataflashManager.h"></File><File path="Projects\TempDataLogger\Lib\DS1307.c"></File><File path="Projects\TempDataLogger\Lib\DS1307.h"></File><File path="Projects\TempDataLogger\Lib\SCSI.c"></File><File path="Projects\TempDataLogger\Lib\SCSI.h"></File></Folder><Folder name="TempLogHostApp"><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.Designer.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\DataLoggerSettings.resx"></File><File path="Projects\TempDataLogger\TempLogHostApp\Program.cs"></File><File path="Projects\TempDataLogger\TempLogHostApp\TempLoggerHostApp.csproj"></File></Folder><File path="Projects\TempDataLogger\Descriptors.c"></File><File path="Projects\TempDataLogger\Descriptors.h"></File><File path="Projects\TempDataLogger\Doxygen.conf"></File><File path="Projects\TempDataLogger\makefile"></File><File path="Projects\TempDataLogger\TempDataLogger.c"></File><File path="Projects\TempDataLogger\TempDataLogger.h"></File><File path="Projects\TempDataLogger\TemperatureDataLogger.txt"></File><File path="Projects\TempDataLogger\TempDataLogger.aps"></File></Folder><Folder name="USBtoSerial"><File path="Projects\USBtoSerial\Descriptors.h"></File><File path="Projects\USBtoSerial\Doxygen.conf"></File><File path="Projects\USBtoSerial\LUFA USBtoSerial.inf"></File><File path="Projects\USBtoSerial\makefile"></File><File path="Projects\USBtoSerial\USBtoSerial.c"></File><File path="Projects\USBtoSerial\USBtoSerial.h"></File><File path="Projects\USBtoSerial\USBtoSerial.txt"></File><File path="Projects\USBtoSerial\USBtoSerial.aps"></File><File path="Projects\USBtoSerial\Descriptors.c"></File></Folder><Folder name="Webserver"><Folder name="Lib"><Folder name="uip"><File path="Projects\Webserver\Lib\uip\clock.c"></File><File path="Projects\Webserver\Lib\uip\clock.h"></File><File path="Projects\Webserver\Lib\uip\timer.c"></File><File path="Projects\Webserver\Lib\uip\timer.h"></File><File path="Projects\Webserver\Lib\uip\uip.c"></File><File path="Projects\Webserver\Lib\uip\uip.h"></File><File path="Projects\Webserver\Lib\uip\uip_arp.c"></File><File path="Projects\Webserver\Lib\uip\uip_arp.h"></File><File path="Projects\Webserver\Lib\uip\uipopt.h"></File><File path="Projects\Webserver\Lib\uip\uip-split.c"></File><File path="Projects\Webserver\Lib\uip\uip-split.h"></File></Folder><Folder name="FATFs"><File path="Projects\Webserver\Lib\FATFs\diskio.c"></File><File path="Projects\Webserver\Lib\FATFs\diskio.h"></File><File path="Projects\Webserver\Lib\FATFs\ff.c"></File><File path="Projects\Webserver\Lib\FATFs\ff.h"></File><File path="Projects\Webserver\Lib\FATFs\ffconf.h"></File><File path="Projects\Webserver\Lib\FATFs\integer.h"></File></Folder><File path="Projects\Webserver\Lib\DataflashManager.c"></File><File path="Projects\Webserver\Lib\DataflashManager.h"></File><File path="Projects\Webserver\Lib\uIPManagement.c"></File><File path="Projects\Webserver\Lib\uIPManagement.h"></File><File path="Projects\Webserver\Lib\HTTPServerApp.c"></File><File path="Projects\Webserver\Lib\HTTPServerApp.h"></File><File path="Projects\Webserver\Lib\SCSI.c"></File><File path="Projects\Webserver\Lib\SCSI.h"></File><File path="Projects\Webserver\Lib\TELNETServerApp.c"></File><File path="Projects\Webserver\Lib\TELNETServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPClientApp.c"></File><File path="Projects\Webserver\Lib\DHCPClientApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.h"></File><File path="Projects\Webserver\Lib\DHCPServerApp.c"></File><File path="Projects\Webserver\Lib\DHCPServerApp.h"></File><File path="Projects\Webserver\Lib\DHCPCommon.c"></File></Folder><File path="Projects\Webserver\makefile"></File><File path="Projects\Webserver\Webserver.c"></File><File path="Projects\Webserver\Webserver.h"></File><File path="Projects\Webserver\Doxygen.conf"></File><File path="Projects\Webserver\Webserver.txt"></File><File path="Projects\Webserver\Descriptors.c"></File><File path="Projects\Webserver\Descriptors.h"></File><File path="Projects\Webserver\USBHostMode.c"></File><File path="Projects\Webserver\USBHostMode.h"></File><File path="Projects\Webserver\USBDeviceMode.c"></File><File path="Projects\Webserver\USBDeviceMode.h"></File><File path="Projects\Webserver\Webserver.aps"></File><File path="Projects\Webserver\LUFA Webserver RNDIS.inf"></File></Folder><Folder name="XPLAINBridge"><Folder name="Lib"><File path="Projects\XPLAINBridge\Lib\SoftUART.c"></File><File path="Projects\XPLAINBridge\Lib\SoftUART.h"></File></Folder><File path="Projects\XPLAINBridge\XPLAINBridge.txt"></File><File path="Projects\XPLAINBridge\XPLAINBridge.h"></File><File path="Projects\XPLAINBridge\XPLAINBridge.c"></File><File path="Projects\XPLAINBridge\XPLAINBridge.aps"></File><File path="Projects\XPLAINBridge\USARTDescriptors.h"></File><File path="Projects\XPLAINBridge\USARTDescriptors.c"></File><File path="Projects\XPLAINBridge\makefile"></File><File path="Projects\XPLAINBridge\LUFA XPLAIN Bridge.inf"></File><File path="Projects\XPLAINBridge\Doxygen.conf"></File><File path="Projects\XPLAINBridge\AVRISPDescriptors.h"></File><File path="Projects\XPLAINBridge\AVRISPDescriptors.c"></File></Folder><Folder name="Incomplete"><Folder name="StandaloneProgrammer"><Folder name="Lib"><Folder name="PetiteFATFs"><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\diskio.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\integer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\PetiteFATFs\pff.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\DataflashManager.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\SCSI.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Lib\ProgrammerConfig.h"></File></Folder><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\Descriptors.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\makefile"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\StandaloneProgrammer.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskDevice.h"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.c"></File><File path="Projects\Incomplete\StandaloneProgrammer\DiskHost.h"></File></Folder></Folder><File path="Projects\makefile"></File></Folder><Folder name="BuildTests"><Folder name="BoardDriverTest"><Folder name="Board"><File path="BuildTests\BoardDriverTest\Board\Buttons.h"></File><File path="BuildTests\BoardDriverTest\Board\Dataflash.h"></File><File path="BuildTests\BoardDriverTest\Board\Joystick.h"></File><File path="BuildTests\BoardDriverTest\Board\LEDs.h"></File></Folder><File path="BuildTests\BoardDriverTest\BoardDeviceMap.cfg"></File><File path="BuildTests\BoardDriverTest\makefile"></File><File path="BuildTests\BoardDriverTest\makefile.avr8"></File><File path="BuildTests\BoardDriverTest\makefile.uc3"></File><File path="BuildTests\BoardDriverTest\makefile.xmega"></File><File path="BuildTests\BoardDriverTest\Test.c"></File></Folder><Folder name="ModuleTest"><File path="BuildTests\ModuleTest\makefile"></File><File path="BuildTests\ModuleTest\makefile.avr8"></File><File path="BuildTests\ModuleTest\makefile.uc3"></File><File path="BuildTests\ModuleTest\makefile.xmega"></File><File path="BuildTests\ModuleTest\Modules.h"></File><File path="BuildTests\ModuleTest\Test_C.c"></File><File path="BuildTests\ModuleTest\Test_CPP.cpp"></File><File path="BuildTests\ModuleTest\Dummy.S"></File></Folder><Folder name="SingleUSBModeTest"><File path="BuildTests\SingleUSBModeTest\makefile"></File><File path="BuildTests\SingleUSBModeTest\makefile.avr8"></File><File path="BuildTests\SingleUSBModeTest\makefile.uc3"></File><File path="BuildTests\SingleUSBModeTest\makefile.xmega"></File><File path="BuildTests\SingleUSBModeTest\Test.c"></File><File path="BuildTests\SingleUSBModeTest\Dummy.S"></File></Folder><Folder name="StaticAnalysisTest"><File path="BuildTests\StaticAnalysisTest\makefile"></File></Folder><File path="BuildTests\makefile"></File></Folder><Folder name="Maintenance"><File path="Maintenance\makefile"></File></Folder><File path="makefile"></File><File path="README.txt"></File></Project>
\ No newline at end of file
// #define NO_AUTO_VBUS_MANAGEMENT
// #define INVERTED_VBUS_ENABLE_LINE
+ #else
+
+ #error Unsupported architecture for this LUFA configuration file.
+
#endif
#endif
/* Public Interface - May be used in end-application: */
/* Macros: */
- #if (ARCH == ARCH_AVR8) || defined(__DOXYGEN__)
- /** Disables the AVR's JTAG bus in software, until a system reset. This will override the current JTAG
- * status as set by the JTAGEN fuse, disabling JTAG debugging and reverting the JTAG pins back to GPIO
- * mode.
- *
- * \note This macro is not available for all architectures.
- */
- #define JTAG_DISABLE() MACROS{ \
- __asm__ __volatile__ ( \
- "in __tmp_reg__,__SREG__" "\n\t" \
- "cli" "\n\t" \
- "out %1, %0" "\n\t" \
- "out __SREG__, __tmp_reg__" "\n\t" \
- "out %1, %0" "\n\t" \
- : \
- : "r" (1 << JTD), \
- "M" (_SFR_IO_ADDR(MCUCR)) \
- : "r0"); \
- }MACROE
+ #if (ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA) || defined(__DOXYGEN__)
+ #if (ARCH == ARCH_AVR8) || defined(__DOXYGEN__)
+ /** Disables the AVR's JTAG bus in software, until a system reset. This will override the current JTAG
+ * status as set by the JTAGEN fuse, disabling JTAG debugging and reverting the JTAG pins back to GPIO
+ * mode.
+ *
+ * \note This macro is not available for all architectures.
+ */
+ #define JTAG_DISABLE() MACROS{ \
+ __asm__ __volatile__ ( \
+ "in __tmp_reg__,__SREG__" "\n\t" \
+ "cli" "\n\t" \
+ "out %1, %0" "\n\t" \
+ "out __SREG__, __tmp_reg__" "\n\t" \
+ "out %1, %0" "\n\t" \
+ : \
+ : "r" (1 << JTD), \
+ "M" (_SFR_IO_ADDR(MCUCR)) \
+ : "r0"); \
+ }MACROE
+ #endif
/** 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 optimizer
*
* \param[in] Condition Condition that will be evaluated,
*/
- #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
+ #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
#if !defined(pgm_read_ptr) || defined(__DOXYGEN__)
/** Reads a pointer out of PROGMEM space on the AVR8 architecture. This is currently a wrapper for the
*/
#define pgm_read_ptr(Address) (void*)pgm_read_word(Address)
#endif
+ #elif (ARCH == ARCH_UC3)
+ #define JTAG_DEBUG_POINT() __asm__ __volatile__ ("nop" ::)
+ #define JTAG_DEBUG_BREAK() __asm__ __volatile__ ("breakpoint" ::)
+ #define JTAG_ASSERT(Condition) MACROS{ if (!(Condition)) { JTAG_DEBUG_BREAK(); } }MACROE
+ #define STDOUT_ASSERT(Condition) MACROS{ if (!(x)) { \
+ printf("%s: Function \"%s\", Line %d: " \
+ "Assertion \"%s\" failed.\r\n"), \
+ __FILE__, __func__, __LINE__, #Condition); } }MACROE
#endif
/* Disable C linkage for C++ Compilers: */
/** Selects the Bitwizard Big-Multio specific board drivers, including the driver for the board LEDs. */
#define BOARD_BIGMULTIO 46
+ /** Selects the DorkbotPDX Duce specific board drivers, including the driver for the board LEDs. */
+ #define BOARD_DUCE 47
+
+ /** Selects the Olimex AVR-USB-32U4 specific board drivers, including the Button and LED drivers. */
+ #define BOARD_OLIMEX32U4 48
+
+ /** Selects the Olimex AVR-USB-T32U4 specific board drivers, including the Button and LED drivers. */
+ #define BOARD_OLIMEXT32U4 49
+
+
#if !defined(__DOXYGEN__)
#define BOARD_ BOARD_NONE
* <b>New:</b>
* - Core:
* - Added support for the BitWizard Multio and Big-Multio boards
+ * - Added support for the DorkbotPDX Duce board
+ * - Added support for the Olimex AVR-USB-32U4 board
+ * - Added support for the Olimex AVR-USB-T32U4 board
+ * - Added new Endpoint_ConfigureEndpointTable() function
+ * - Added new Pipe_ConfigurePipeTable() function
* - Library Applications:
* - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices
* - Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use
+ * - Added new SerialToLCD user project contributed by Simon Foster
*
* <b>Changed:</b>
* - Core:
* - Audio Device Class driver changed to also require the index of the Audio Control interface within the device, for SET/GET/CUR/MIN/MAX/RES property adjustments
* - Removed variable axis support from the HID_DESCRIPTOR_JOYSTICK() macro due to OS incompatibilities, replaced with fixed 3-axis joystick report structure
* - Removed the old pseudo-scheduler from the library as it was unused and deprecated since the 090810 release
+ * - Endpoint indexes are now specified as full endpoint addresses within the device in device mode, rather than a logical index
+ * - The Endpoint_ConfigureEndpoint() function no longer takes an endpoint direction as a parameter, as this is now deduced from the specified full endpoint
+ * address and type
+ * - The Endpoint_ConfigureEndpoint() function no longer takes a number of banks as a special mask; the number of banks is now specified as an integer parameter
+ * - Endpoints are now configured via instances of a new struct USB_Endpoint_Table_t in all device mode class drivers, rather than a list of endpoint parameters
+ * - Pipe indexes are now specified as full pipe addresses within the host in host mode, rather than a logical index
+ * - The Pipe_ConfigurePipe() function no longer takes an pipe token as a parameter, as this is now deduced from the specified full pipe address and type
+ * - The Pipe_ConfigurePipe() function no longer takes a number of banks as a special mask; the number of banks is now specified as an integer parameter
+ * - Pipes are now configured via instances of a new struct USB_Pipe_Table_t in all host mode class drivers, rather than a list of pipe parameters
+ * - Added support for various assert and debugging macros for the UC3 devices
+ * - Changed MIDI event structure MIDI_EventPacket_t to use a single field for the combined virtual cable index and command ID, to prevent bitfield packing issues
+ * on some architectures (thanks to Darren Gibbs)
+ * - Changed board LED driver implementations of LEDs_ToggleLEDs() for the AVR8 architecture to use the fast PIN register toggle alternative function for speed
* - Library Applications:
* - Raised the guard bits in the AVRISP-MKII clone project when in PDI and TPI to 32, to prevent communication errors on low quality connections to a target
* - Added additional bootloader API data to expose the bootloader start address and class to the DFU and CDC class bootloaders
* - Reverted AVRISP-MKII clone project watchdog based command timeout patch in favour of a hardware timer, to allow for use in devices with WDTRST fuse programmed
+ * - The library bootloaders will now correctly start the user application after a watchdog-based application start, even if the /HWB line is held low externally
+ * during the reset phase
+ * - Increased endpoint polling interval for all demos and projects to 5ms, as 1ms was causing some enumeration issues on some machines (thanks to Riku Salminen)
*
* <b>Fixed:</b>
* - Core:
* - Fixed compile error for the UC3 architecture when INTERRUPT_CONTROL_ENDPOINT is specified (thanks to Andrus Aaslaid)
* - Fixed compile error if LEDs_Disable() is called and BOARD=NONE is set (thanks to Sam Lin)
* - Fixed inverted LED logic in the OLIMEX162 board LED driver
+ * - Fixed incorrect reponse to GET STATUS requests in device mode if NO_DEVICE_SELF_POWER or NO_DEVICE_REMOTE_WAKEUP tokens are defined (thanks to Georg Glock)
+ * - Fixed inverted LED logic in the USB2AX board LED driver
+ * - Fixed possible deadlock in the CDC device driver if the USB connection is dropped while the CDC_REQ_SetLineEncoding control request is being processed by
+ * the stack (thanks to Jonathan Hudgins)
+ * - Fixed broken MIDI host driver MIDI_Host_ReceiveEventPacket() function due to not unfreezing the MIDI data IN pipe before use (thanks to Michael Brown)
* - Library Applications:
* - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter)
* - Fixed AVRISP-MKII programmer project failing to compile for the U4 chips when VTARGET_ADC_CHANNEL is defined to an invalid channel and NO_VTARGET_DETECT is
* defined (thanks to Steven Morehouse)
+ * - Fixed AVRISP-MKII programmer project reset line polarity inverted when the generated EEP file is loaded into the USB AVR's EEPROM and avr-dude is used
* - Fixed CDC and DFU bootloaders failing to compile when the bootloader section size is 8KB or more (thanks to Georg Glock)
+ * - Fixed incorrect DFU version number reported to the host in the DFU bootloader descriptors (thanks to Georg Glock)
+ * - Fixed incorrect version hundredths value encoding in VERSION_BCD() macro (thanks to Georg Glock)
*
* \section Sec_ChangeLog120219 Version 120219
* <b>New:</b>
* - Busware BUI
* - Busware CUL V3
* - Busware TUL
+ * - DorkbotPDX Duce
* - Fletchtronics Bumble-B (using manufacturer recommended peripheral layout)
* - Kernel Concepts USBFOO
* - Linnix UDIP
* - Microsin AVR-USB162
* - Minimus USB
* - Olimex AVR-USB-162
+ * - Olimex AVR-USB-32U4
+ * - Olimex AVR-USB-T32U4
* - Paranoid Studio's US2AX (V1, V2 and V3 hardware revisions)
* - PJRC Teensy (1.x and 2.x versions)
* - Sparkfun U2 Breakout Board
* <td bgcolor="#00EE00">Yes</td>
* <td bgcolor="#EE0000">No</td>
* </tr>
+ * <tr>
+ * <td>ATXMEGA64C3</td>
+ * <td bgcolor="#00EE00">Yes</td>
+ * <td bgcolor="#EE0000">No</td>
+ * </tr>
+ * <tr>
+ * <td>ATXMEGA128C3</td>
+ * <td bgcolor="#00EE00">Yes</td>
+ * <td bgcolor="#EE0000">No</td>
+ * </tr>
+ * <tr>
+ * <td>ATXMEGA192C3</td>
+ * <td bgcolor="#00EE00">Yes</td>
+ * <td bgcolor="#EE0000">No</td>
+ * </tr>
+ * <tr>
+ * <td>ATXMEGA256C3</td>
+ * <td bgcolor="#00EE00">Yes</td>
+ * <td bgcolor="#EE0000">No</td>
+ * </tr>
+ * <tr>
+ * <td>ATXMEGA384C3</td>
+ * <td bgcolor="#00EE00">Yes</td>
+ * <td bgcolor="#EE0000">No</td>
+ * </tr>
+ * <tr>
+ * <td>ATXMEGA16C4</td>
+ * <td bgcolor="#00EE00">Yes</td>
+ * <td bgcolor="#EE0000">No</td>
+ * </tr>
+ * <tr>
+ * <td>ATXMEGA32C4</td>
+ * <td bgcolor="#00EE00">Yes</td>
+ * <td bgcolor="#EE0000">No</td>
+ * </tr>
* </table>
*
* \section Sec_XMEGASupport_Boards Supported Atmel Boards
* -# Pull out third party libraries into a separate folder and reference them as required
* -# Add a LUFA_YIELD macro for integration into a third-party RTOS
* -# Abstract out Mass Storage byte send/receive to prevent low level API use in projects
- * -# Consider switch from endpoint numbers to full endpoint addresses to ease future architecture expansion
* -# Fix HID report parser usage support for array types
* -# Make HOST_DEVICE_SETTLE_DELAY_MS a global variable that can be changed
* -# Add MANDATORY_EVENT_FUNCTIONS compile time option
* -# Add watchdog support to the library and apps/bootloaders
- * -# Fix Still Image Host class driver - missing reqs, parameters
* - Testing/Verification
* -# Re-run USBIF test suite on all classes to formally verify operation
* -# Implement automated functional testing of all demos
--- /dev/null
+/** \file\r
+ *\r
+ * This file contains special DoxyGen information for the generation of the main page and other special\r
+ * documentation pages. It is not a project source file.\r
+ */\r
+\r
+ /** \page Page_KnownIssues Known Issues\r
+ * The following are known issues present in each official LUFA release. This list should contain all known\r
+ * issues in the library. Most of these issues should be corrected in the future release - see\r
+ * \ref Page_FutureChanges for a list of planned changes in future releases.\r
+ *\r
+ * \section Sec_KnownIssuesXXXXXX Version XXXXXX\r
+ * - AVR8 Architecture\r
+ * - No known issues.\r
+ * - XMEGA Architecture\r
+ * - No demos, bootloaders or projects have been ported for the XMEGA devices in the current release,\r
+ * although the architecture is supported in the LUFA core library.\r
+ * - Endpoints of more than 64 bytes are not currently supported in this release.\r
+ * - Isochronous endpoints are not currently supported in this release. As a result, the audio class\r
+ * cannot be used on XMEGA devices.\r
+ * - Multiple-bank endpoints are not currently supported in this release.\r
+ * - Early revisions of the ATXMEGA128A1U are incompatible with LUFA, due to their various errata\r
+ * relating to the USB controller.\r
+ * - UC3 Architecture\r
+ * - No demos, bootloaders or projects have been ported for the UC3 devices in the current release,\r
+ * although the architecture is supported in the LUFA core library.\r
+ * - DMA transfers to and from the USB controller are not yet implemented for this release.\r
+ * - The UC3C, UC3D and UC3L sub-families of UC3 are not currently supported by the library due to their\r
+ * altered USB controller design.\r
+ * - The various \c CreateStream() functions for creating standard \c <stdio.h> compatible virtual file\r
+ * streams are not available on the UC3 architecture, due to a lack of suitable library support.\r
+ * - Architecture Independant\r
+ * - The HID parser fails for array type elements that have a MIN and MAX usage applied; each element\r
+ * in the array will receive a unique incrementing usage from the MIN value, up to MAX.\r
+ * - The current application makefiles do not work if the output directory is not the same directory\r
+ * as the makefile itself.\r
+ * - The LUFA library is not watchdog aware, and thus timeouts are possible if short periods are used\r
+ * and a lengthy USB operation is initiated.\r
+ */\r
+\r
*
* \li AVR-USB-162, a USBKEY-like development board for the AT90USB162: http://olimex.com/dev/avr-usb-162.html
* \li Benito #7, a no-frills USB board: http://www.dorkbotpdx.org/wiki/benito
+ * \li Duce, the sucessor to the Benito #7: http://dorkbotpdx.org/wiki/duce
* \li JM-DB-U2, an ATMEGA32U2 development board: http://u2.mattair.net/index.html
* \li Micropendous, an open design/source set of AVR USB development boards: http://micropendous.org/
* \li Microsin AVR-USB162 breakout board, a DIY AT90USB162 development board: http://microsin.ru/content/view/685/44/
* The following are known hobbyist projects using LUFA. Most are open source, and show off interesting ways that the LUFA library
* can be incorporated into many different applications.
*
+ * \li Accelerometer Game Joystick: http://www.crictor.co.il/he/episodes/joystick/
* \li Arcade Controller: http://fletchtronics.net/arcade-controller-made-petunia
* \li Arcade Joystick: http://jamie.lentin.co.uk/embedded/arcade-joystick/
* \li AttoBasic AVR BASIC interpreter: http://www.cappels.org/dproj/AttoBasic2_1/AttoBasic_2.1_with_USB_and_Arduino_support.html
*
* \section Sec_UnofficialResources Unofficial Resources
* Unofficial Russian LUFA documentation translation: http://microsin.ru/Download.cnt/doc/LUFA/ \n
+ * Tutorial for LUFA USB Control Transfers: http://www.avrbeginners.net/new/tutorials/usb-control-transfers-with-lufa/
*
* \section Sec_ProjectPages LUFA Related Webpages
* Project Homepage: http://www.lufa-lib.org \n
*
* \section Sec_InDevelopment Latest In-Development Source Code
* Issue Tracker: http://www.lufa-lib.org/tracker \n
- * SVN Access: http://www.lufa-lib.org/svn \n
- * GIT Access: http://www.lufa-lib.org/git \n
+ * Public SVN Repository: http://www.lufa-lib.org/svn \n
+ * Public GIT Repository: http://www.lufa-lib.org/git \n
* Latest Repository Source Archive: http://www.lufa-lib.org/latest-archive \n
* Commit RSS Feed: http://www.lufa-lib.org/rss \n
*
* \li \subpage Page_Donating - Donating to support this project
* \li \subpage Page_DeviceSupport - Current Device and Hardware Support
* \li \subpage Page_ChangeLog - Project Changelog
+ * \li \subpage Page_KnownIssues - Known Issues
* \li \subpage Page_FutureChanges - Planned Changes to the Library
* \li \subpage Page_GettingStarted - Getting started with LUFA
* \li \subpage Page_DevelopingWithLUFA - Developing with LUFA
* - The HID_DESCRIPTOR_JOYSTICK() macro no longer takes a variable number of axis as a parameter, due to OS incompatibilities; this macro now uses a fixed
* 3 axis of data. User applications should update their calls to this macro and their report structures to suit a fixed 3-axis joystick report. If a user
* application requires more than 3 axis' of data, a custom report descriptor will need to be constructed by hand.
+ * - The \ref Endpoint_ConfigureEndpoint() function no longer takes in masks for the banks and direction; the number of banks is now an integer argument, and
+ * the direction is obtained from the full endpoint address within the device. Applications calling Endpoint_ConfigureEndpoint() should update their API
+ * call to use a full endpoint address (including ENDPOINT_DIR_IN or ENDPOINT_DIR_OUT direction in the MSB of the endpoint address) and an integer number
+ * of banks.
+ * - All endpoint functions now operate on full endpoint addresses within the device, rather than a directionless endpoint index. Applications should update
+ * their API calls to use full endpoint addresses when required within the device.
+ * - All device mode class drivers have been updated to use a new unified endpoint description structure for all endpoints; existing applications will need
+ * to update their class driver struct instantiation to match the new scheme (see \ref USB_Endpoint_Table_t).
+ * - The \c ENDPOINT_BANKS_SUPPORTED() and \c ENDPOINT_MAX_ENDPOINT_SIZE() macros have been removed, as these do not function correctly with the new addressing
+ * scheme for the endpoint APIs. Please refer to the target device's datasheet for the maximum bank size of each endpoint.
+ * - The MIDI class driver \ref MIDI_EventPacket_t event packet no longer contains seperate \c CableIndex and \c Command entries; these have been combined
+ * into a single \c Event element which can be contructed using the new macro \ref MIDI_EVENT(). Existing applications should use the new macro and structure
+ * element name.
*
* <b>Host Mode</b>
* - The Android Accessory Host class driver property strings are now a array of \c char* rather than a struct of named pointers. Existing applications
* should use C99 Designated Initializers with the property string indexes located in \ref AOA_Strings_t instead.
+ * - The \ref Pipe_ConfigurePipe() function no longer takes in masks for the banks and token; the number of banks is now an integer argument, and the token
+ * is now inferred from the full pipe address within the device, and the pipe type. Applications calling Pipe_ConfigurePipe() should update their API
+ * call to use a full pipe address (including PIPE_DIR_IN or PIPE_DIR_OUT direction in the MSB of the pipe address) and an integer number of banks.
+ * - All pipe functions now operate on full pipe addresses within the device, rather than a directionless pipe index. Applications should update their API
+ * calls to use full pipe addresses when required within the device.
+ * - All host mode class drivers have been updated to use a new unified pipe description structure for all pipes; existing applications will need to update
+ * their class driver struct instantiation to match the new scheme (see \ref USB_Pipe_Table_t).
+ * - The MIDI class driver \ref MIDI_EventPacket_t event packet no longer contains seperate \c CableIndex and \c Command entries; these have been combined
+ * into a single \c Event element which can be contructed using the new macro \ref MIDI_EVENT(). Existing applications should use the new macro and structure
+ * element name.
*
* \section Sec_Migration120219 Migrating from 111009 to 120219
* <b>USB Core</b>
* eliminate any casting of descriptor pointers to a non \c const pointer.
* - The names of the class specific descriptor type defines in the USB Class drivers have changed - refer to the driver documentation
* for each class driver for the new class specific descriptor type names.
- * - The \c ENDPOINT_DOUBLEBANK_SUPPORTED() macro is has been renamed \ref ENDPOINT_BANKS_SUPPORTED() and now returns the total number of
+ * - The \c ENDPOINT_DOUBLEBANK_SUPPORTED() macro is has been renamed \c ENDPOINT_BANKS_SUPPORTED() and now returns the total number of
* banks supported by the given endpoint. Existing code should switch to the new naming scheme, and test that the return value of the
* macro is equal to or greater than 2 to regain the previous functionality.
* - The \c EVENT_USB_Device_UnhandledControlRequest() event is now named \ref EVENT_USB_Device_ControlRequest() and fires before (not after)
*
* Board specific LED driver header for the Adafruit U4 Breakout board (http://ladyada.net/products/atmega32u4breakout).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTE.6</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTE ^= LEDMask;
+ PINE = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Atmel ATAVRUSBRF01.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Atmel ATAVRUSBRF01.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>RX LED</td><td>High</td><td>PORTD.0</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Red</td><td>TX LED</td><td>High</td><td>PORTD.1</td></tr>
+ * </table>
+ *
* @{
*/
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif
- /* Private Interface - For use in library only: */
- #if !defined(__DOXYGEN__)
- /* Macros: */
- #define LEDS_PORTD_LEDS (LEDS_LED1 | LEDS_LED2)
- #define LEDS_PORTE_LEDS (LEDS_LED3 | LEDS_LED4)
-
- #define LEDS_PORTE_MASK_SHIFT 4
- #endif
-
/* Public Interface - May be used in end-application: */
/* Macros: */
/** LED mask for the first LED on the board. */
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>TX LED</td><td>Low</td><td>PORTC.7</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Red</td><td>RX LED</td><td>Low</td><td>PORTC.6</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTC ^= LEDMask;
+ PINC = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*\r
* Board specific LED driver header for the Bitwizard Big-Multio (http://www.bitwizard.nl/wiki/index.php/Usbbigmultio).\r
*\r
+ * <table>\r
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
+ * <tr><td>LEDS_LED1</td><td>Unknown</td><td>LED0</td><td>High</td><td>PORTF.6</td></tr>\r
+ * <tr><td>LEDS_LED2</td><td>Unknown</td><td>LED1</td><td>High</td><td>PORTF.7</td></tr>\r
+ * <tr><td>LEDS_LED3</td><td>Unknown</td><td>LED2</td><td>High</td><td>PORTE.2</td></tr>\r
+ * </table>\r
+ *\r
* @{\r
*/\r
\r
\r
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)\r
{\r
- PORTF ^= (LEDMask & LEDS_PORTF_LEDS);\r
- PORTE ^= (LEDMask & LEDS_PORTE_LEDS);\r
+ PINF = (LEDMask & LEDS_PORTF_LEDS);\r
+ PINE = (LEDMask & LEDS_PORTE_LEDS);\r
}\r
\r
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;\r
* \defgroup Group_LEDs_BLACKCAT BLACKCAT
* \brief Board specific LED driver header for the BLACKCAT USB JTAG.
*
- * Board specific LED driver header for the TCNISO Blackcat USB JTAG (http://www.embeddedcomputers.net/products/BlackcatUSB/.
+ * Board specific LED driver header for the TCNISO Blackcat USB JTAG (http://www.embeddedcomputers.net/products/BlackcatUSB).
+ *
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Unknown</td><td>LED0</td><td>High</td><td>PORTD.6</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Unknown</td><td>LED1</td><td>High</td><td>PORTD.3</td></tr>
+ * </table>
*
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific LED driver header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Red</td><td>RGB LED</td><td>High</td><td>PORTC.2</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>RGB LED</td><td>High</td><td>PORTC.3</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Blue</td><td>RGB LED</td><td>High</td><td>PORTC.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTC ^= LEDMask;
+ PINC = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
* third-party board does not include any on-board peripherals, but does have an officially recommended external peripheral
* layout for buttons, LEDs and a Joystick.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
* third-party board does not include any on-board peripherals, but does have an officially recommended external peripheral
* layout for buttons, LEDs and a Joystick.
*
+ * <table>
+ * <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ * <tr><td>PORTD.2</td><td>PORTD.3</td><td>PORTD.0</td><td>PORTD.1</td><td>PORTD.4</td></tr>
+ * </table>
+ *
* @{
*/
* third-party board does not include any on-board peripherals, but does have an officially recommended external
* peripheral layout for buttons, LEDs and a Joystick.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>N/A</td><td>User Supplied</td><td>High</td><td>PORTB.4</td></tr>
+ * <tr><td>LEDS_LED2</td><td>N/A</td><td>User Supplied</td><td>High</td><td>PORTB.5</td></tr>
+ * <tr><td>LEDS_LED3</td><td>N/A</td><td>User Supplied</td><td>High</td><td>PORTB.6</td></tr>
+ * <tr><td>LEDS_LED4</td><td>N/A</td><td>User Supplied</td><td>High</td><td>PORTB.7</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTB ^= LEDMask;
+ PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Yellow</td><td>General Indicator</td><td>High</td><td>PORTE.6</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTE ^= LEDMask;
+ PINE = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 Board specific LED driver header for the DorkbotPDX Duce.
+ * \copydetails Group_LEDs_DUCE
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
+ * dispatch header located in LUFA/Drivers/Board/LEDs.h.
+ */
+
+/** \ingroup Group_LEDs
+ * \defgroup Group_LEDs_DUCE DUCE
+ * \brief Board specific LED driver header for the DorkbotPDX Duce.
+ *
+ * Board specific LED driver header for the DorkbotPDX Duce (http://dorkbotpdx.org/wiki/duce).
+ *
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Red</td><td>Bicolor Indicator 1</td><td>High</td><td>PORTC.4</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>Bicolor Indicator 1</td><td>High</td><td>PORTC.5</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Red</td><td>Bicolor Indicator 2</td><td>High</td><td>PORTC.6</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>Bicolor Indicator 2</td><td>High</td><td>PORTC.7</td></tr>
+ * </table>
+ *
+ * @{
+ */
+
+#ifndef __LEDS_DUCE_H__
+#define __LEDS_DUCE_H__
+
+ /* Includes: */
+ #include "../../../../Common/Common.h"
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_LEDS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** LED mask for the first LED on the board. */
+ #define LEDS_LED1 (1 << 4)
+
+ /** LED mask for the second LED on the board. */
+ #define LEDS_LED2 (1 << 5)
+
+ /** LED mask for the third LED on the board. */
+ #define LEDS_LED3 (1 << 6)
+
+ /** LED mask for the fourth LED on the board. */
+ #define LEDS_LED4 (1 << 7)
+
+ /** LED mask for all the LEDs on the board. */
+ #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
+
+ /** LED mask for none of the board LEDs. */
+ #define LEDS_NO_LEDS 0
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void LEDs_Init(void)
+ {
+ DDRC |= LEDS_ALL_LEDS;
+ PORTC &= ~LEDS_ALL_LEDS;
+ }
+
+ static inline void LEDs_Disable(void)
+ {
+ DDRC &= ~LEDS_ALL_LEDS;
+ PORTC &= ~LEDS_ALL_LEDS;
+ }
+
+ static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
+ {
+ PORTC |= LEDMask;
+ }
+
+ static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
+ {
+ PORTC &= ~LEDMask;
+ }
+
+ static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
+ {
+ PORTC = ((PORTC & ~LEDS_ALL_LEDS) | LEDMask);
+ }
+
+ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+ const uint8_t ActiveMask)
+ {
+ PORTC = ((PORTC & ~LEDMask) | ActiveMask);
+ }
+
+ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
+ {
+ PINC = LEDMask;
+ }
+
+ static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t LEDs_GetLEDs(void)
+ {
+ return (PORTC & LEDS_ALL_LEDS);
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
+/** @} */
+
*
* Board specific Buttons driver header for the Atmel EVK527.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Dataflash driver header for the Atmel EVK527.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB321C (4MB)</td><td>PORTE.6</td><td>SPI0</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific joystick driver header for the Atmel EVK527.
*
+ * <table>
+ * <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ * <tr><td>PORTF.4</td><td>PORTF.5</td><td>PORTF.7</td><td>PORTC.6</td><td>PORTF.6</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Atmel EVK527.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.6</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific LED driver header for the Maximus (http://www.avrusb.com/).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>LG</td><td>High</td><td>PORTB.6</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Red</td><td>LR</td><td>High</td><td>PORTB.7</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTB ^= LEDMask;
+ PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*\r
* Board specific Buttons driver header for the Micropendous 32U2 (https://code.google.com/p/micropendous/wiki/Micropendous_32U2).\r
*\r
+ * <b>BOARD_MICROPENDOUS_1 and BOARD_MICROPENDOUS_32U2</b>:\r
+ * <table>\r
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>\r
+ * </table>\r
+ *\r
+ * <b>Other Revisions</b>:\r
+ * <table>\r
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>\r
+ * </table>\r
+ *\r
* @{\r
*/\r
\r
*
* Board specific LED driver header for the Micropendous 32U2 (https://code.google.com/p/micropendous/wiki/Micropendous_32U2).
*
+ * <b>BOARD_MICROPENDOUS_32U2</b>:
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.6</td></tr>
+ * </table>
+ *
+ * <b>Other Revisions</b>:
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTB.1</td></tr>
+ * </table>
+ *
* @{
*/
#define _BOARD_LED_CONCAT(Reg, Letter) _BOARD_LED_CONCAT2(Reg, Letter)
#define _BOARD_LED_PORT _BOARD_LED_CONCAT(PORT, _BOARD_LED_PORTLETTER)
+ #define _BOARD_LED_PIN _BOARD_LED_CONCAT(PIN, _BOARD_LED_PORTLETTER)
#define _BOARD_LED_DDR _BOARD_LED_CONCAT(DDR, _BOARD_LED_PORTLETTER)
#endif
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- _BOARD_LED_PORT ^= LEDMask;
+ _BOARD_LED_PIN = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Microsin AVR-USB162 board (http://microsin.ru/content/view/685/44/).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Microsin AVR-USB162 board (http://microsin.ru/content/view/685/44/).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTD.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the MINIMUS.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Minimus USB (http://www.minimususb.com/).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Red</td><td>General Indicator</td><td>Low</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTD.6</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Blue</td><td>General Indicator</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
/** LED mask for the second LED on the board. */
#define LEDS_LED2 (1 << 6)
+ /** LED mask for the third LED on the board. */
+ #define LEDS_LED3 (1 << 7)
+
/** LED mask for all the LEDs on the board. */
- #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2)
+ #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
/** LED mask for the none of the board LEDs. */
- #define LEDS_NO_LEDS 1
+ #define LEDS_NO_LEDS 0
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*\r
* Board specific LED driver header for the Bitwizard Multio (http://www.bitwizard.nl/wiki/index.php/USB-multio).\r
*\r
+ * <table>\r
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.0</td></tr>\r
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.2</td></tr>\r
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr>\r
+ * </table>\r
+ *\r
* @{\r
*/\r
\r
\r
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)\r
{\r
- PORTD ^= (LEDMask & LEDS_PORTD_LEDS);\r
- PORTC ^= (LEDMask & LEDS_PORTC_LEDS);\r
+ PIND = (LEDMask & LEDS_PORTD_LEDS);\r
+ PINC = (LEDMask & LEDS_PORTC_LEDS);\r
}\r
\r
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;\r
*
* Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board (http://www.olimex.com/dev/avr-usb-162.html).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Yellow</td><td>General Indicator</td><td>High</td><td>PORTD.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 Board specific Buttons driver header for the Olimex AVR-USB-32U4 Development Board.
+ * \copydetails Group_Buttons_OLIMEX32U4
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the Buttons driver
+ * dispatch header located in LUFA/Drivers/Board/Buttons.h.
+ */
+
+/** \ingroup Group_Buttons
+ * \defgroup Group_Buttons_OLIMEX32U4 OLIMEX32U4
+ * \brief Board specific Buttons driver header for the Olimex AVR-USB-32U4 Development Board.
+ *
+ * Board specific Buttons driver header for the Olimex AVR-USB-32U4 Development Board (http://www.olimex.com/dev/olimexino-32u4.html).
+ *
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * </table>
+ *
+ * @{
+ */
+
+#ifndef __BUTTONS_OLIMEX32U4_H__
+#define __BUTTONS_OLIMEX32U4_H__
+
+ /* Includes: */
+ #include "../../../../Common/Common.h"
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_BUTTONS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Button mask for the first button on the board. */
+ #define BUTTONS_BUTTON1 (1 << 2)
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void Buttons_Init(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE |= BUTTONS_BUTTON1;
+ }
+
+ static inline void Buttons_Disable(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE &= ~BUTTONS_BUTTON1;
+ }
+
+ static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t Buttons_GetStatus(void)
+ {
+ return ((PINE & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
+/** @} */
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 Board specific LED driver header for the Olimex AVR-USB-32U4.
+ * \copydetails Group_LEDs_OLIMEX32U4
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
+ * dispatch header located in LUFA/Drivers/Board/LEDs.h.
+ */
+
+/** \ingroup Group_LEDs
+ * \defgroup Group_LEDs_OLIMEX32U4 OLIMEX32U4
+ * \brief Board specific LED driver header for the Olimex AVR-USB-32U4.
+ *
+ * Board specific LED driver header for the Olimex AVR-USB-32U4 (http://www.olimex.com/dev/olimexino-32u4.html).
+ *
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>TX</td><td>High</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Yellow</td><td>RX</td><td>High</td><td>PORTB.0</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator (Default Unconnected)</td><td>High</td><td>PORTE.6</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Yellow</td><td>General Indicator (Default Unconnected)</td><td>High</td><td>PORTB.5</td></tr>
+ * </table>
+ *
+ * @{
+ */
+
+#ifndef __LEDS_OLIMEX32U4_H__
+#define __LEDS_OLIMEX32U4_H__
+
+ /* Includes: */
+ #include "../../../../Common/Common.h"
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_LEDS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
+ #endif
+
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
+ /* Macros: */
+ #define LEDS_PORTB_LEDS (LEDS_LED2 | LEDS_LED4)
+ #define LEDS_PORTD_LEDS (LEDS_LED1)
+ #define LEDS_PORTE_LEDS (LEDS_LED3)
+
+ #define LEDS_PORTD_MASK_SHIFT 1
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** LED mask for the first LED on the board. */
+ #define LEDS_LED1 ((1 << 5) >> LEDS_PORTD_MASK_SHIFT)
+
+ /** LED mask for the second LED on the board. */
+ #define LEDS_LED2 (1 << 0)
+
+ /** LED mask for the third LED on the board. */
+ #define LEDS_LED3 (1 << 5)
+
+ /** LED mask for the fourth LED on the board. */
+ #define LEDS_LED4 (1 << 6)
+
+ /** LED mask for all the LEDs on the board. */
+ #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
+
+ /** LED mask for none of the board LEDs. */
+ #define LEDS_NO_LEDS 0
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void LEDs_Init(void)
+ {
+ DDRB |= LEDS_PORTB_LEDS;
+ PORTB &= ~LEDS_PORTB_LEDS;
+ DDRD |= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
+ PORTD &= ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
+ DDRE |= LEDS_PORTE_LEDS;
+ PORTE &= ~LEDS_PORTE_LEDS;
+ }
+
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= LEDS_PORTB_LEDS;
+ PORTB &= ~LEDS_PORTB_LEDS;
+ DDRD &= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
+ PORTD &= ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
+ DDRE &= LEDS_PORTE_LEDS;
+ PORTE &= ~LEDS_PORTE_LEDS;
+ }
+
+ static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
+ {
+ PORTB |= (LEDMask & LEDS_PORTB_LEDS);
+ PORTD |= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
+ PORTE |= (LEDMask & LEDS_PORTE_LEDS);
+ }
+
+ static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
+ {
+ PORTB &= ~(LEDMask & LEDS_PORTB_LEDS);
+ PORTD &= ~((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
+ PORTE &= ~(LEDMask & LEDS_PORTE_LEDS);
+ }
+
+ static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
+ {
+ PORTB = ((PORTB & ~LEDS_PORTB_LEDS) | (LEDMask & LEDS_PORTB_LEDS));
+ PORTD = ((PORTD & ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT)) |
+ ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT));
+ PORTE = ((PORTE & ~LEDS_PORTE_LEDS) | (LEDMask & LEDS_PORTE_LEDS));
+ }
+
+ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+ const uint8_t ActiveMask)
+ {
+ PORTB = ((PORTB & ~(LEDMask & LEDS_PORTB_LEDS)) | (ActiveMask & LEDS_PORTB_LEDS));
+ PORTD = ((PORTD & ~((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT)) |
+ ((ActiveMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT));
+ PORTE = ((PORTE & ~(LEDMask & LEDS_PORTE_LEDS)) | (ActiveMask & LEDS_PORTE_LEDS));
+ }
+
+ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
+ {
+ PINB = (LEDMask & LEDS_PORTB_LEDS);
+ PIND = ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
+ PINE = (LEDMask & LEDS_PORTE_LEDS);
+ }
+
+ static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t LEDs_GetLEDs(void)
+ {
+ return ((PORTB & LEDS_PORTB_LEDS) |
+ ((PORTD & (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT)) >> LEDS_PORTD_MASK_SHIFT) |
+ (PORTE & LEDS_PORTE_LEDS));
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
+/** @} */
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 Board specific Buttons driver header for the Olimex AVR-USB-T32U4 Development Board.
+ * \copydetails Group_Buttons_OLIMEXT32U4
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the Buttons driver
+ * dispatch header located in LUFA/Drivers/Board/Buttons.h.
+ */
+
+/** \ingroup Group_Buttons
+ * \defgroup Group_Buttons_OLIMEXT32U4 OLIMEXT32U4
+ * \brief Board specific Buttons driver header for the Olimex AVR-USB-32U4 Development Board.
+ *
+ * Board specific Buttons driver header for the Olimex AVR-USB-T32U4 Development Board (http://www.olimex.com/dev/avr-t32u4.html).
+ *
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * </table>
+ *
+ * @{
+ */
+
+#ifndef __BUTTONS_OLIMEXT32U4_H__
+#define __BUTTONS_OLIMEXT32U4_H__
+
+ /* Includes: */
+ #include "../../../../Common/Common.h"
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_BUTTONS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Button mask for the first button on the board. */
+ #define BUTTONS_BUTTON1 (1 << 2)
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void Buttons_Init(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE |= BUTTONS_BUTTON1;
+ }
+
+ static inline void Buttons_Disable(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE &= ~BUTTONS_BUTTON1;
+ }
+
+ static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t Buttons_GetStatus(void)
+ {
+ return ((PINE & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
+/** @} */
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 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 Board specific LED driver header for the Olimex AVR-USB-T32U4.
+ * \copydetails Group_LEDs_OLIMEXT32U4
+ *
+ * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
+ * dispatch header located in LUFA/Drivers/Board/LEDs.h.
+ */
+
+/** \ingroup Group_LEDs
+ * \defgroup Group_LEDs_OLIMEXT32U4 OLIMEXT32U4
+ * \brief Board specific LED driver header for the Olimex AVR-USB-T32U4.
+ *
+ * Board specific LED driver header for the Olimex AVR-USB-T32U4 (http://www.olimex.com/dev/avr-t32u4.html).
+ *
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>TX</td><td>High</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Yellow</td><td>RX</td><td>High</td><td>PORTB.0</td></tr>
+ * <tr><td>LEDS_LED3</td><td>N/A</td><td>General Indicator (Not Mounted)</td><td>High</td><td>PORTE.6</td></tr>
+ * </table>
+ *
+ * @{
+ */
+
+#ifndef __LEDS_OLIMEXT32U4_H__
+#define __LEDS_OLIMEXT32U4_H__
+
+ /* Includes: */
+ #include "../../../../Common/Common.h"
+
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_LEDS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
+ #endif
+
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
+ /* Macros: */
+ #define LEDS_PORTB_LEDS (LEDS_LED2)
+ #define LEDS_PORTD_LEDS (LEDS_LED1)
+ #define LEDS_PORTE_LEDS (LEDS_LED3)
+ #endif
+
+ /* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** LED mask for the first LED on the board. */
+ #define LEDS_LED1 (1 << 5)
+
+ /** LED mask for the second LED on the board. */
+ #define LEDS_LED2 (1 << 0)
+
+ /** LED mask for the third LED on the board. */
+ #define LEDS_LED3 (1 << 6)
+
+ /** LED mask for all the LEDs on the board. */
+ #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for none of the board LEDs. */
+ #define LEDS_NO_LEDS 0
+
+ /* Inline Functions: */
+ #if !defined(__DOXYGEN__)
+ static inline void LEDs_Init(void)
+ {
+ DDRB |= LEDS_PORTB_LEDS;
+ PORTB &= ~LEDS_PORTB_LEDS;
+ DDRD |= LEDS_PORTD_LEDS;
+ PORTD &= ~LEDS_PORTD_LEDS;
+ DDRE |= LEDS_PORTE_LEDS;
+ PORTE &= ~LEDS_PORTE_LEDS;
+ }
+
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= LEDS_PORTB_LEDS;
+ PORTB &= ~LEDS_PORTB_LEDS;
+ DDRD &= LEDS_PORTD_LEDS;
+ PORTD &= ~LEDS_PORTD_LEDS;
+ DDRE &= LEDS_PORTE_LEDS;
+ PORTE &= ~LEDS_PORTE_LEDS;
+ }
+
+ static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
+ {
+ PORTB |= (LEDMask & LEDS_PORTB_LEDS);
+ PORTD |= (LEDMask & LEDS_PORTD_LEDS);
+ PORTE |= (LEDMask & LEDS_PORTE_LEDS);
+ }
+
+ static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
+ {
+ PORTB &= ~(LEDMask & LEDS_PORTB_LEDS);
+ PORTD &= ~(LEDMask & LEDS_PORTD_LEDS);
+ PORTE &= ~(LEDMask & LEDS_PORTE_LEDS);
+ }
+
+ static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
+ {
+ PORTB = ((PORTB & ~LEDS_PORTB_LEDS) | (LEDMask & LEDS_PORTB_LEDS));
+ PORTD = ((PORTD & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS));
+ PORTE = ((PORTE & ~LEDS_PORTE_LEDS) | (LEDMask & LEDS_PORTE_LEDS));
+ }
+
+ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+ const uint8_t ActiveMask)
+ {
+ PORTB = ((PORTB & ~(LEDMask & LEDS_PORTB_LEDS)) | (ActiveMask & LEDS_PORTB_LEDS));
+ PORTD = ((PORTD & ~(LEDMask & LEDS_PORTD_LEDS)) | (ActiveMask & LEDS_PORTD_LEDS));
+ PORTE = ((PORTE & ~(LEDMask & LEDS_PORTE_LEDS)) | (ActiveMask & LEDS_PORTE_LEDS));
+ }
+
+ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
+ {
+ PINB = (LEDMask & LEDS_PORTB_LEDS);
+ PIND = (LEDMask & LEDS_PORTD_LEDS);
+ PINE = (LEDMask & LEDS_PORTE_LEDS);
+ }
+
+ static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t LEDs_GetLEDs(void)
+ {
+ return ((PORTB & LEDS_PORTB_LEDS) | (PORTD & LEDS_PORTD_LEDS) | (PORTE & LEDS_PORTE_LEDS));
+ }
+ #endif
+
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
+#endif
+
+/** @} */
+
*
* Board specific LED driver header for the Atmel RZUSBSTICK.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Blue</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr>
+ * <tr><td>LEDS_LED1</td><td>Red</td><td>General Indicator</td><td>Low</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTE.6</td></tr>
+ * <tr><td>LEDS_LED1</td><td>Yellow</td><td>General Indicator</td><td>Low</td><td>PORTE.7</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= (LEDMask & LEDS_PORTD_LEDS);
- PORTE ^= ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT);
+ PIND = (LEDMask & LEDS_PORTD_LEDS);
+ PINE = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT);
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific LED driver header for the Sparkfun ATMEGA8U2 breakout board (http://www.sparkfun.com/products/10277).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTB.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTB ^= LEDMask;
+ PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Atmel STK525.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Dataflash driver header for the Atmel STK525.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB321C (4MB)</td><td>PORTB.4</td><td>SPI0</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific joystick driver header for the Atmel STK525.
*
+ * <table>
+ * <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ * <tr><td>PORTB.6</td><td>PORTB.7</td><td>PORTE.4</td><td>PORTE.5</td><td>PORTB.5</td></tr>
+ * </table>
+ *
* @{
*/
#define JOY_LEFT (1 << 6)
/** Mask for the joystick being pushed in the right direction. */
- #define JOY_RIGHT ((1 << 4) >> 1)
+ #define JOY_RIGHT ((1 << 4) >> JOY_PORTE_MASK_SHIFT)
/** Mask for the joystick being pushed in the upward direction. */
#define JOY_UP (1 << 7)
*
* Board specific LED driver header for the Atmel STK525.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.4</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.6</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Atmel STK526.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Dataflash driver header for the Atmel STK525.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB642D (8MB)</td><td>PORTC.2</td><td>SPI0</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific joystick driver header for the Atmel STK526.
*
+ * <table>
+ * <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ * <tr><td>PORTB.4</td><td>PORTB.5</td><td>PORTB.6</td><td>PORTB.7</td><td>PORTB.0</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Atmel STK526.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.1</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.0</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific LED driver header for the PJRC Teensy boards (http://www.pjrc.com/teensy/index.html).
*
+ * <b>TEENSY</b>:
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.6</td></tr>
+ * </table>
+ *
+ * <b>TEENSY2</b>:
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTD.6</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Busware TUL (http://www.busware.de/tiki-index.php?page=TUL).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Busware TUL (http://www.busware.de/tiki-index.php?page=TUL).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTF.0</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTF ^= LEDMask;
+ PINF = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Linnix UDIP (http://linnix.com/udip/).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Linnix UDIP (http://linnix.com/udip/).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>Bicolor Indicator 1</td><td>High</td><td>PORTB.6</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Red</td><td>Bicolor Indicator 1</td><td>High</td><td>PORTB.5</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>Bicolor Indicator 2</td><td>High</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Red</td><td>Bicolor Indicator 2</td><td>High</td><td>PORTD.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTB ^= (LEDMask & LEDS_PORTB_LEDS);
- PORTD ^= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
+ PINB = (LEDMask & LEDS_PORTB_LEDS);
+ PIND = ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Yellow</td><td>RX</td><td>Low</td><td>PORTD.4</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Yellow</td><td>TX</td><td>Low</td><td>PORTD.5</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*\r
* Board specific Buttons driver header for the Paranoid Studio USB2AX (http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX).\r
*\r
+ * <table>\r
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>\r
+ * </table>\r
+ *\r
* @{\r
*/\r
\r
*\r
* Board specific LED driver header for the Paranoid Studio USB2AX (http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX).\r
*\r
+ * <b>USB2AX</b>:\r
+ * <table>\r
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.6</td></tr>\r
+ * </table>\r
+ *\r
+ * <b>USB2AX_V3</b>:\r
+ * <table>\r
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>\r
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.1</td></tr>\r
+ * </table>\r
+ *\r
* @{\r
*/\r
\r
static inline void LEDs_Init(void)\r
{\r
#if (BOARD == BOARD_USB2AX)\r
- DDRC |= LEDS_ALL_LEDS;\r
- PORTC |= LEDS_ALL_LEDS; \r
+ DDRC |= LEDS_ALL_LEDS;\r
+ PORTC &= ~LEDS_ALL_LEDS; \r
#else\r
- DDRD |= LEDS_ALL_LEDS;\r
- PORTD |= LEDS_ALL_LEDS; \r
+ DDRD |= LEDS_ALL_LEDS;\r
+ PORTD &= ~LEDS_ALL_LEDS; \r
#endif \r
}\r
\r
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)\r
{\r
#if (BOARD == BOARD_USB2AX)\r
- PORTC &= ~LEDMask; \r
+ PORTC |= LEDMask; \r
#else\r
- PORTD &= ~LEDMask;\r
+ PORTD |= LEDMask;\r
#endif\r
}\r
\r
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)\r
{\r
#if (BOARD == BOARD_USB2AX)\r
- PORTC |= LEDMask;\r
+ PORTC &= ~LEDMask;\r
#else\r
- PORTD |= LEDMask;\r
+ PORTD &= ~LEDMask;\r
#endif\r
}\r
\r
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)\r
{\r
#if (BOARD == BOARD_USB2AX)\r
- PORTC = ((PORTC | LEDS_ALL_LEDS) & ~LEDMask); \r
+ PORTC = ((PORTC & ~LEDS_ALL_LEDS) | LEDMask); \r
#else\r
- PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);\r
+ PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);\r
#endif\r
}\r
\r
const uint8_t ActiveMask)\r
{\r
#if (BOARD == BOARD_USB2AX)\r
- PORTC = ((PORTC | LEDMask) & ~ActiveMask); \r
+ PORTC = ((PORTC & ~LEDMask) | ActiveMask); \r
#else\r
- PORTD = ((PORTD | LEDMask) & ~ActiveMask);\r
+ PORTD = ((PORTD & ~LEDMask) | ActiveMask);\r
#endif\r
}\r
\r
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)\r
{\r
#if (BOARD == BOARD_USB2AX)\r
- PORTC ^= LEDMask; \r
+ PINC = LEDMask; \r
#else\r
- PORTD ^= LEDMask;\r
+ PIND = LEDMask;\r
#endif\r
}\r
\r
static inline uint8_t LEDs_GetLEDs(void)\r
{\r
#if (BOARD == BOARD_USB2AX)\r
- return (~PORTC & LEDS_ALL_LEDS); \r
+ return (PORTC & LEDS_ALL_LEDS); \r
#else\r
- return (~PORTD & LEDS_ALL_LEDS);\r
+ return (PORTD & LEDS_ALL_LEDS);\r
#endif\r
}\r
#endif\r
*
* Board specific Buttons driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTD.4</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for the Atmel USBKEY.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Dataflash driver header for the Atmel USBKEY board.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB642D (8MB)</td><td>PORTE.0</td><td>SPI0</td></tr>
+ * <tr><td>DATAFLASH_CHIP2</td><td>AT45DB642D (8MB)</td><td>PORTE.1</td><td>SPI0</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific joystick driver header for the Atmel USBKEY.
*
+ * <table>
+ * <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ * <tr><td>PORTB.6</td><td>PORTB.7</td><td>PORTE.4</td><td>PORTE.5</td><td>PORTB.5</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Atmel USBKEY.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Red</td><td>Bicolor Indicator 1</td><td>Low</td><td>PORTD.4</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>Bicolor Indicator 1</td><td>Low</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Red</td><td>Bicolor Indicator 2</td><td>Low</td><td>PORTD.6</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>Bicolor Indicator 2</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTD ^= LEDMask;
+ PIND = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Buttons driver header for Tom's USBTINY MKII (http://tom-itx.dyndns.org:81/~webpage/).
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>HWB Button</td><td>Low</td><td>PORTD.7</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for Tom's USBTINY MKII (http://tom-itx.dyndns.org:81/~webpage/).
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Red</td><td>Bicolor Indicator 1</td><td>High</td><td>PORTB.6</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>Bicolor Indicator 1</td><td>High</td><td>PORTB.7</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Red</td><td>Target Power</td><td>High</td><td>PORTB.5</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTB ^= LEDMask;
+ PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
*
* Board specific Dataflash driver header for the Atmel XPLAIN.
*
+ * <b>Revision 1 Boards</b>:
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB041D (512KB)</td><td>PORTB.5</td><td>SPI0</td></tr>
+ * </table>
+ *
+ * <b>Other Board Revisions</b>:
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB642D (8MB)</td><td>PORTB.5</td><td>SPI0</td></tr>
+ * </table>
+ *
* @{
*/
/* Includes: */
#include "../../../../Common/Common.h"
+
#include "../../../Misc/AT45DB642D.h"
#include "../../../Peripheral/SPI.h"
*
* Board specific LED driver header for the Atmel XPLAIN.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTB.6</td></tr>
+ * </table>
+ *
* @{
*/
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
- PORTB ^= LEDMask;
+ PINB = LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
#include "AVR8/MICROPENDOUS/Buttons.h"
#elif (BOARD == BOARD_B1_XPLAINED)
#include "XMEGA/B1_XPLAINED/Buttons.h"
+ #elif (BOARD == BOARD_OLIMEX32U4)
+ #include "AVR8/OLIMEX32U4/Buttons.h"
+ #elif (BOARD == BOARD_OLIMEXT32U4)
+ #include "AVR8/OLIMEXT32U4/Buttons.h"
#else
#include "Board/Buttons.h"
#endif
* // Turn on each of the four LEDs in turn
* LEDs_SetAllLEDs(LEDS_LED1);
* Delay_MS(500);
- * LEDs_SetAllLEDs(LEDS_LED1);
+ * LEDs_SetAllLEDs(LEDS_LED2);
* Delay_MS(500);
- * LEDs_SetAllLEDs(LEDS_LED1);
+ * LEDs_SetAllLEDs(LEDS_LED3);
* Delay_MS(500);
- * LEDs_SetAllLEDs(LEDS_LED1);
+ * LEDs_SetAllLEDs(LEDS_LED4);
* Delay_MS(500);
*
* // Turn on all LEDs
#include "AVR8/MULTIO/LEDs.h"
#elif (BOARD == BOARD_BIGMULTIO)
#include "AVR8/BIGMULTIO/LEDs.h"
+ #elif (BOARD == BOARD_DUCE)
+ #include "AVR8/DUCE/LEDs.h"
+ #elif (BOARD == BOARD_OLIMEX32U4)
+ #include "AVR8/OLIMEX32U4/LEDs.h"
+ #elif (BOARD == BOARD_OLIMEXT32U4)
+ #include "AVR8/OLIMEXT32U4/LEDs.h"
#else
#include "Board/LEDs.h"
#endif
*
* Board specific Buttons driver header for the Atmel EVK1100.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>SW0 Button</td><td>Low</td><td>GPIO88</td></tr>
+ * <tr><td>BUTTONS_BUTTON2</td><td>SW1 Button</td><td>Low</td><td>GPIO85</td></tr>
+ * <tr><td>BUTTONS_BUTTON3</td><td>SW2 Button</td><td>Low</td><td>GPIO82</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific joystick driver header for the Atmel EVK1100.
*
+ * <table>
+ * <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ * <tr><td>GPIO25</td><td>GPIO26</td><td>GPIO28</td><td>GPIO27</td><td>GPIO20</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Atmel EVK1100.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>LED0 LED</td><td>Low</td><td>GPIO51</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>LED1 LED</td><td>Low</td><td>GPIO52</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>LED2 LED</td><td>Low</td><td>GPIO53</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>LED3 LED</td><td>Low</td><td>GPIO54</td></tr>
+ * <tr><td>LEDS_LED5</td><td>Green</td><td>LED4 LED</td><td>Low</td><td>GPIO59</td></tr>
+ * <tr><td>LEDS_LED6</td><td>Green</td><td>LED5 LED</td><td>Low</td><td>GPIO60</td></tr>
+ * <tr><td>LEDS_LED7</td><td>Green</td><td>LED6 LED</td><td>Low</td><td>GPIO61</td></tr>
+ * <tr><td>LEDS_LED8</td><td>Green</td><td>LED7 LED</td><td>Low</td><td>GPIO62</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Buttons driver header for the Atmel EVK1101.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>SW0 Button</td><td>Low</td><td>GPIO34</td></tr>
+ * <tr><td>BUTTONS_BUTTON2</td><td>SW1 Button</td><td>Low</td><td>GPIO35</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific joystick driver header for the Atmel EVK1101.
*
+ * <table>
+ * <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ * <tr><td>GPIO38</td><td>GPIO39</td><td>GPIO41</td><td>GPIO40</td><td>GPIO13</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Atmel EVK1101.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>LED0 LED</td><td>Low</td><td>GPIO7</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>LED1 LED</td><td>Low</td><td>GPIO8</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>LED2 LED</td><td>Low</td><td>GPIO21</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>LED3 LED</td><td>Low</td><td>GPIO22</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Buttons driver header for the Atmel EVK1104.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>SW0 Button</td><td>Low</td><td>GPIO42</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific LED driver header for the Atmel EVK1104.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Green</td><td>LED0 LED</td><td>Low</td><td>GPIO67</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>LED1 LED</td><td>Low</td><td>GPIO101</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Green</td><td>LED2 LED</td><td>Low</td><td>GPIO102</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>LED3 LED</td><td>Low</td><td>GPIO105</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Buttons driver header for the Atmel XMEGA A3BU Xplained.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>SW0 Button</td><td>Low</td><td>PORTE.5</td></tr>
+ * <tr><td>BUTTONS_BUTTON2</td><td>SW1 Button</td><td>Low</td><td>PORTF.1</td></tr>
+ * <tr><td>BUTTONS_BUTTON3</td><td>SW2 Button</td><td>Low</td><td>PORTF.2</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Dataflash driver header for the Atmel XMEGA B1 Xplained board.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB642D (8MB)</td><td>PORTF.4</td><td>USARTD0 (In SPI Mode)</td></tr>
+ * </table>
+ *
* @{
*/
#define DATAFLASH_TOTALCHIPS 1
/** Mask for no dataflash chip selected. */
- #define DATAFLASH_NO_CHIP DATAFLASH_CHIPCS_MASK
+ #define DATAFLASH_NO_CHIP 0
/** Mask for the first dataflash chip selected. */
- #define DATAFLASH_CHIP1 0
+ #define DATAFLASH_CHIP1 (1 << 4)
/** Internal main memory page size for the board's dataflash ICs. */
#define DATAFLASH_PAGE_SIZE 1024
*/
static inline void Dataflash_Init(void)
{
- DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK;
- DATAFLASH_CHIPCS_PORT.OUTSET = DATAFLASH_CHIPCS_MASK;
+ DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK;
+
+ PORTCFG.MPCMASK = DATAFLASH_CHIPCS_MASK;
+ DATAFLASH_CHIPCS_PORT.PIN0CTRL = PORT_INVEN_bm;
}
/** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.
static inline void Dataflash_SelectChip(const uint8_t ChipMask) ATTR_ALWAYS_INLINE;
static inline void Dataflash_SelectChip(const uint8_t ChipMask)
{
- DATAFLASH_CHIPCS_PORT.OUT = ((DATAFLASH_CHIPCS_PORT.OUT & ~DATAFLASH_CHIPCS_MASK) | ChipMask);
+ DATAFLASH_CHIPCS_PORT.OUTCLR = DATAFLASH_CHIPCS_MASK;
+ DATAFLASH_CHIPCS_PORT.OUTSET = ChipMask;
}
/** Deselects the current dataflash chip, so that no dataflash is selected. */
*
* Board specific LED driver header for the Atmel XMEGA A3BU Xplained.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Yellow</td><td>LED0 LED</td><td>Low</td><td>PORTR.0</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Yellow</td><td>LED1 LED</td><td>Low</td><td>PORTR.1</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Buttons driver header for the Atmel XMEGA B1 Xplained.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>BUTTONS_BUTTON1</td><td>Touch CS0 Button</td><td>Low</td><td>PORTE.0</td></tr>
+ * <tr><td>BUTTONS_BUTTON2</td><td>Touch CS1 Button</td><td>Low</td><td>PORTE.1</td></tr>
+ * <tr><td>BUTTONS_BUTTON3</td><td>Touch CS2 Button</td><td>Low</td><td>PORTE.2</td></tr>
+ * <tr><td>BUTTONS_BUTTON4</td><td>Touch CS3 Button</td><td>Low</td><td>PORTE.3</td></tr>
+ * </table>
+ *
* @{
*/
*
* Board specific Dataflash driver header for the Atmel XMEGA A3BU Xplained board.
*
+ * <table>
+ * <tr><th>Name</th><th>Info</th><th>Select Pin</th><th>SPI Port</th></tr>
+ * <tr><td>DATAFLASH_CHIP1</td><td>AT45DB642D (8MB)</td><td>PORTD.2</td><td>USARTC0 (In SPI Mode, Remapped)</td></tr>
+ * </table>
+ *
* @{
*/
#define DATAFLASH_TOTALCHIPS 1
/** Mask for no dataflash chip selected. */
- #define DATAFLASH_NO_CHIP DATAFLASH_CHIPCS_MASK
+ #define DATAFLASH_NO_CHIP 0
/** Mask for the first dataflash chip selected. */
- #define DATAFLASH_CHIP1 0
+ #define DATAFLASH_CHIP1 (1 << 2)
/** Internal main memory page size for the board's dataflash ICs. */
#define DATAFLASH_PAGE_SIZE 1024
*/
static inline void Dataflash_Init(void)
{
- DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK;
- DATAFLASH_CHIPCS_PORT.OUTSET = DATAFLASH_CHIPCS_MASK;
+ DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK;
+
+ PORTCFG.MPCMASK = DATAFLASH_CHIPCS_MASK;
+ DATAFLASH_CHIPCS_PORT.PIN0CTRL = PORT_INVEN_bm;
- PORTE.REMAP |= PORT_USART0_bm;
+ PORTC.REMAP |= PORT_USART0_bm;
}
/** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.
static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline uint8_t Dataflash_TransferByte(const uint8_t Byte)
{
- return SerialSPI_TransferByte(&USARTE0, Byte);
+ return SerialSPI_TransferByte(&USARTC0, Byte);
}
/** Sends a byte to the currently selected dataflash IC, and ignores the next byte from the dataflash.
static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline void Dataflash_SendByte(const uint8_t Byte)
{
- SerialSPI_SendByte(&USARTE0, Byte);
+ SerialSPI_SendByte(&USARTC0, Byte);
}
/** Sends a dummy byte to the currently selected dataflash IC, and returns the next byte from the dataflash.
static inline uint8_t Dataflash_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Dataflash_ReceiveByte(void)
{
- return SerialSPI_ReceiveByte(&USARTE0);
+ return SerialSPI_ReceiveByte(&USARTC0);
}
/** Determines the currently selected dataflash chip.
static inline void Dataflash_SelectChip(const uint8_t ChipMask) ATTR_ALWAYS_INLINE;
static inline void Dataflash_SelectChip(const uint8_t ChipMask)
{
- DATAFLASH_CHIPCS_PORT.OUT = ((DATAFLASH_CHIPCS_PORT.OUT & ~DATAFLASH_CHIPCS_MASK) | ChipMask);
+ DATAFLASH_CHIPCS_PORT.OUTCLR = DATAFLASH_CHIPCS_MASK;
+ DATAFLASH_CHIPCS_PORT.OUTSET = (ChipMask & DATAFLASH_CHIPCS_MASK);
}
/** Deselects the current dataflash chip, so that no dataflash is selected. */
*
* Board specific LED driver header for the Atmel XMEGA B1 Xplained.
*
+ * <table>
+ * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
+ * <tr><td>LEDS_LED1</td><td>Yellow</td><td>LED0 LED</td><td>High</td><td>PORTB.4</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Yellow</td><td>LED1 LED</td><td>High</td><td>PORTB.5</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Yellow</td><td>LED2 LED</td><td>High</td><td>PORTB.6</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Yellow</td><td>LED3 LED</td><td>High</td><td>PORTB.7</td></tr>
+ * <tr><td>LEDS_LED5</td><td>Green</td><td>USB LED</td><td>Low</td><td>PORTE.4</td></tr>
+ * </table>
+ *
* @{
*/
*/
static inline void SerialSPI_SendByte(const uint8_t DataByte)
{
- UDR1 = DataByte;
- while (!(UCSR1A & (1 << TXC1)));
- UCSR1A = (1 << TXC1);
+ SerialSPI_TransferByte(DataByte);
}
/** Sends a dummy byte through the USART SPI interface, blocking until the transfer is complete. The response
*/
static inline uint8_t SerialSPI_ReceiveByte(void)
{
- UDR1 = 0;
- while (!(UCSR1A & (1 << TXC1)));
- UCSR1A = (1 << TXC1);
- return UDR1;
+ return SerialSPI_TransferByte(0);
}
/* Disable C linkage for C++ Compilers: */
*
* \code
* // Initialize the Master SPI mode USART driver before first use, with 1Mbit baud
- * SerialSPI_Init(&USARTD0, (USART_SPI_SCK_LEAD_RISING | SPI_SAMPLE_LEADING | SPI_ORDER_MSB_FIRST), 1000000);
+ * SerialSPI_Init(&USARTD0, (USART_SPI_SCK_LEAD_RISING | USART_SPI_SAMPLE_LEADING | USART_SPI_ORDER_MSB_FIRST), 1000000);
*
* // Send several bytes, ignoring the returned data
* SerialSPI_SendByte(&USARTD0, 0x01);
static inline void SerialSPI_SendByte(USART_t* const USART,
const uint8_t DataByte)
{
- USART->DATA = DataByte;
- while (!(USART->STATUS & USART_TXCIF_bm));
- USART->STATUS = USART_TXCIF_bm;
+ SerialSPI_TransferByte(USART, DataByte);
}
/** Sends a dummy byte through the USART SPI interface, blocking until the transfer is complete. The response
*/
static inline uint8_t SerialSPI_ReceiveByte(USART_t* const USART)
{
- USART->DATA = 0;
- while (!(USART->STATUS & USART_TXCIF_bm));
- USART->STATUS = USART_TXCIF_bm;
- return USART->DATA;
+ return SerialSPI_TransferByte(USART, 0);
}
/* Disable C linkage for C++ Compilers: */
* addresses are zero-indexed. This converts a natural MIDI channel number into the logical channel address.
*
* \param[in] channel MIDI channel number to address.
+ *
+ * \return Constructed MIDI channel ID.
*/
#define MIDI_CHANNEL(channel) ((channel) - 1)
+
+ /** Constructs a MIDI event ID from a given MIDI command and a virtual MIDI cable index. This can then be
+ * used to create and decode \ref MIDI_EventPacket_t MIDI event packets.
+ *
+ * \param[in] virtualcable Index of the virtual MIDI cable the event relates to
+ * \param[in] command MIDI command to send through the virtual MIDI cable
+ *
+ * \return Constructed MIDI event ID.
+ */
+ #define MIDI_EVENT(virtualcable, command) ((virtualcable << 4) | (command >> 4))
/* Enums: */
/** Enum for the possible MIDI jack types in a MIDI device jack descriptor. */
*/
typedef struct
{
- unsigned Command : 4; /**< Upper nibble of the MIDI command being sent or received in the event packet. */
- unsigned CableNumber : 4; /**< Virtual cable number of the event being sent or received in the given MIDI interface. */
+ uint8_t Event; /**< MIDI event type, constructed with the \ref MIDI_EVENT() macro. */
uint8_t Data1; /**< First byte of data in the MIDI event. */
uint8_t Data2; /**< Second byte of data in the MIDI event. */
if ((InterfaceIndex != AudioInterfaceInfo->Config.ControlInterfaceNumber) &&
(InterfaceIndex != AudioInterfaceInfo->Config.StreamingInterfaceNumber))
-
- return;
+ {
+ return;
+ }
}
else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
{
- uint8_t EndpointIndex = (USB_ControlRequest.wIndex & 0xFF);
+ uint8_t EndpointAddress = (USB_ControlRequest.wIndex & 0xFF);
- if ((EndpointIndex != (ENDPOINT_DIR_IN | AudioInterfaceInfo->Config.DataINEndpointNumber)) &&
- (EndpointIndex != (ENDPOINT_DIR_OUT | AudioInterfaceInfo->Config.DataOUTEndpointNumber)))
+ if ((EndpointAddress != AudioInterfaceInfo->Config.DataINEndpoint.Address) &&
+ (EndpointAddress != AudioInterfaceInfo->Config.DataOUTEndpoint.Address))
{
return;
}
case AUDIO_REQ_SetMinimum:
case AUDIO_REQ_SetMaximum:
case AUDIO_REQ_SetResolution:
- if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT))
+ if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
{
uint8_t EndpointProperty = USB_ControlRequest.bRequest;
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
EndpointControl, &ValueLength, Value);
}
}
- else if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
+ else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_INTERFACE)
{
uint8_t Property = USB_ControlRequest.bRequest;
uint8_t Entity = (USB_ControlRequest.wIndex >> 8);
case AUDIO_REQ_GetMinimum:
case AUDIO_REQ_GetMaximum:
case AUDIO_REQ_GetResolution:
- if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
+ if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
{
uint8_t EndpointProperty = USB_ControlRequest.bRequest;
uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
Endpoint_ClearOUT();
}
}
- else if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
+ else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_INTERFACE)
{
uint8_t Property = USB_ControlRequest.bRequest;
uint8_t Entity = (USB_ControlRequest.wIndex >> 8);
bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
{
memset(&AudioInterfaceInfo->State, 0x00, sizeof(AudioInterfaceInfo->State));
+
+ AudioInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_ISOCHRONOUS;
+ AudioInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_ISOCHRONOUS;
- for (uint8_t EndpointNum = 1; EndpointNum < ENDPOINT_TOTAL_ENDPOINTS; EndpointNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Direction;
- bool DoubleBanked;
+ if (!(Endpoint_ConfigureEndpointTable(&AudioInterfaceInfo->Config.DataINEndpoint, 1)))
+ return false;
- if (EndpointNum == AudioInterfaceInfo->Config.DataINEndpointNumber)
- {
- Size = AudioInterfaceInfo->Config.DataINEndpointSize;
- Direction = ENDPOINT_DIR_IN;
- Type = EP_TYPE_ISOCHRONOUS;
- DoubleBanked = true;
- }
- else if (EndpointNum == AudioInterfaceInfo->Config.DataOUTEndpointNumber)
- {
- Size = AudioInterfaceInfo->Config.DataOUTEndpointSize;
- Direction = ENDPOINT_DIR_OUT;
- Type = EP_TYPE_ISOCHRONOUS;
- DoubleBanked = true;
- }
- else
- {
- continue;
- }
-
- if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
- {
- return false;
- }
- }
+ if (!(Endpoint_ConfigureEndpointTable(&AudioInterfaceInfo->Config.DataOUTEndpoint, 1)))
+ return false;
return true;
}
* structure controls.
*/
- uint8_t DataINEndpointNumber; /**< Endpoint number of the incoming Audio Streaming data, if available
- * (zero if unused).
- */
- uint16_t DataINEndpointSize; /**< Size in bytes of the incoming Audio Streaming data endpoint, if available
- * (zero if unused).
- */
-
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing Audio Streaming data, if available
- * (zero if unused).
- */
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing Audio Streaming data endpoint, if available
- * (zero if unused).
- */
+ USB_Endpoint_Table_t DataINEndpoint; /**< Data IN endpoint configuration table. */
+ USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(AudioInterfaceInfo->State.InterfaceEnabled))
return false;
- Endpoint_SelectEndpoint(AudioInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(AudioInterfaceInfo->Config.DataOUTEndpoint.Address);
return Endpoint_IsOUTReceived();
}
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(AudioInterfaceInfo->State.InterfaceEnabled))
return false;
- Endpoint_SelectEndpoint(AudioInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(AudioInterfaceInfo->Config.DataINEndpoint.Address);
return Endpoint_IsINReady();
}
{
Endpoint_Write_8(Sample);
- if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
+ if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpoint.Size)
Endpoint_ClearIN();
}
{
Endpoint_Write_16_LE(Sample);
- if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
+ if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpoint.Size)
Endpoint_ClearIN();
}
Endpoint_Write_16_LE(Sample);
Endpoint_Write_8(Sample >> 16);
- if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
+ if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpoint.Size)
Endpoint_ClearIN();
}
{
Endpoint_ClearSETUP();
- while (!(Endpoint_IsOUTReceived()));
-
+ while (!(Endpoint_IsOUTReceived()))
+ {
+ if (USB_DeviceState == DEVICE_STATE_Unattached)
+ return;
+ }
+
CDCInterfaceInfo->State.LineEncoding.BaudRateBPS = Endpoint_Read_32_LE();
CDCInterfaceInfo->State.LineEncoding.CharFormat = Endpoint_Read_8();
CDCInterfaceInfo->State.LineEncoding.ParityType = Endpoint_Read_8();
{
memset(&CDCInterfaceInfo->State, 0x00, sizeof(CDCInterfaceInfo->State));
- for (uint8_t EndpointNum = 1; EndpointNum < ENDPOINT_TOTAL_ENDPOINTS; EndpointNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Direction;
- bool DoubleBanked;
+ CDCInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK;
+ CDCInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK;
+ CDCInterfaceInfo->Config.NotificationEndpoint.Type = EP_TYPE_INTERRUPT;
- if (EndpointNum == CDCInterfaceInfo->Config.DataINEndpointNumber)
- {
- Size = CDCInterfaceInfo->Config.DataINEndpointSize;
- Direction = ENDPOINT_DIR_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = CDCInterfaceInfo->Config.DataINEndpointDoubleBank;
- }
- else if (EndpointNum == CDCInterfaceInfo->Config.DataOUTEndpointNumber)
- {
- Size = CDCInterfaceInfo->Config.DataOUTEndpointSize;
- Direction = ENDPOINT_DIR_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = CDCInterfaceInfo->Config.DataOUTEndpointDoubleBank;
- }
- else if (EndpointNum == CDCInterfaceInfo->Config.NotificationEndpointNumber)
- {
- Size = CDCInterfaceInfo->Config.NotificationEndpointSize;
- Direction = ENDPOINT_DIR_IN;
- Type = EP_TYPE_INTERRUPT;
- DoubleBanked = CDCInterfaceInfo->Config.NotificationEndpointDoubleBank;
- }
- else
- {
- continue;
- }
+ if (!(Endpoint_ConfigureEndpointTable(&CDCInterfaceInfo->Config.DataINEndpoint, 1)))
+ return false;
- if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
- {
- return false;
- }
- }
+ if (!(Endpoint_ConfigureEndpointTable(&CDCInterfaceInfo->Config.DataOUTEndpoint, 1)))
+ return false;
+
+ if (!(Endpoint_ConfigureEndpointTable(&CDCInterfaceInfo->Config.NotificationEndpoint, 1)))
+ return false;
return true;
}
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
return ENDPOINT_RWSTREAM_DeviceDisconnected;
- Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
return Endpoint_Write_Stream_LE(String, strlen(String), NULL);
}
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
return ENDPOINT_RWSTREAM_DeviceDisconnected;
- Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
return Endpoint_Write_Stream_LE(Buffer, Length, NULL);
}
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
return ENDPOINT_RWSTREAM_DeviceDisconnected;
- Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
if (!(Endpoint_IsReadWriteAllowed()))
{
uint8_t ErrorCode;
- Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
if (!(Endpoint_BytesInEndpoint()))
return ENDPOINT_READYWAIT_NoError;
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
return 0;
- Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataOUTEndpoint.Address);
if (Endpoint_IsOUTReceived())
{
int16_t ReceivedByte = -1;
- Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataOUTEndpoint.Address);
if (Endpoint_IsOUTReceived())
{
if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
return;
- Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.NotificationEndpointNumber);
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.NotificationEndpoint.Address);
USB_Request_Header_t Notification = (USB_Request_Header_t)
{
{
struct
{
- uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */
-
- uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint. */
- uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint. */
- bool DataINEndpointDoubleBank; /**< Indicates if the CDC interface's IN data endpoint should use double banking. */
-
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint. */
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint. */
- bool DataOUTEndpointDoubleBank; /**< Indicates if the CDC interface's OUT data endpoint should use double banking. */
-
- uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used. */
- uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used. */
- bool NotificationEndpointDoubleBank; /**< Indicates if the CDC interface's notification endpoint should use double banking. */
+ uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device. */
+
+ USB_Endpoint_Table_t DataINEndpoint; /**< Data IN endpoint configuration table. */
+ USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
+ USB_Endpoint_Table_t NotificationEndpoint; /**< Notification IN Endpoint configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
HIDInterfaceInfo->State.UsingReportProtocol = true;
HIDInterfaceInfo->State.IdleCount = 500;
- if (!(Endpoint_ConfigureEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber, EP_TYPE_INTERRUPT,
- ENDPOINT_DIR_IN, HIDInterfaceInfo->Config.ReportINEndpointSize,
- HIDInterfaceInfo->Config.ReportINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
- {
- return false;
- }
+ HIDInterfaceInfo->Config.ReportINEndpoint.Type = EP_TYPE_INTERRUPT;
+ if (!(Endpoint_ConfigureEndpointTable(&HIDInterfaceInfo->Config.ReportINEndpoint, 1)))
+ return false;
+
return true;
}
if (HIDInterfaceInfo->State.PrevFrameNum == USB_Device_GetFrameNumber())
return;
- Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
+ Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpoint.Address);
if (Endpoint_IsReadWriteAllowed())
{
{
HIDInterfaceInfo->State.IdleMSRemaining = HIDInterfaceInfo->State.IdleCount;
- Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
+ Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpoint.Address);
if (ReportID)
Endpoint_Write_8(ReportID);
{
uint8_t InterfaceNumber; /**< Interface number of the HID interface within the device. */
- uint8_t ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint. */
- uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint. */
- bool ReportINEndpointDoubleBank; /**< Indicates if the HID interface's IN report endpoint should use double banking. */
+ USB_Endpoint_Table_t ReportINEndpoint; /**< Data IN HID report endpoint configuration table. */
void* PrevReportINBuffer; /**< Pointer to a buffer where the previously created HID input report can be
* stored by the driver, for comparison purposes to detect report changes that
{
memset(&MIDIInterfaceInfo->State, 0x00, sizeof(MIDIInterfaceInfo->State));
- for (uint8_t EndpointNum = 1; EndpointNum < ENDPOINT_TOTAL_ENDPOINTS; EndpointNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Direction;
- bool DoubleBanked;
-
- if (EndpointNum == MIDIInterfaceInfo->Config.DataINEndpointNumber)
- {
- Size = MIDIInterfaceInfo->Config.DataINEndpointSize;
- Direction = ENDPOINT_DIR_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = MIDIInterfaceInfo->Config.DataINEndpointDoubleBank;
- }
- else if (EndpointNum == MIDIInterfaceInfo->Config.DataOUTEndpointNumber)
- {
- Size = MIDIInterfaceInfo->Config.DataOUTEndpointSize;
- Direction = ENDPOINT_DIR_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = MIDIInterfaceInfo->Config.DataOUTEndpointDoubleBank;
- }
- else
- {
- continue;
- }
-
- if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
- {
- return false;
- }
- }
+ MIDIInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK;
+ MIDIInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK;
+
+ if (!(Endpoint_ConfigureEndpointTable(&MIDIInterfaceInfo->Config.DataINEndpoint, 1)))
+ return false;
+
+ if (!(Endpoint_ConfigureEndpointTable(&MIDIInterfaceInfo->Config.DataOUTEndpoint, 1)))
+ return false;
return true;
}
uint8_t ErrorCode;
- Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpoint.Address);
if ((ErrorCode = Endpoint_Write_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NULL)) != ENDPOINT_RWSTREAM_NoError)
return ErrorCode;
uint8_t ErrorCode;
- Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpoint.Address);
if (Endpoint_BytesInEndpoint())
{
if (USB_DeviceState != DEVICE_STATE_Configured)
return false;
- Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataOUTEndpoint.Address);
if (!(Endpoint_IsReadWriteAllowed()))
return false;
{
uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this structure controls. */
- uint8_t DataINEndpointNumber; /**< Endpoint number of the incoming MIDI IN data, if available (zero if unused). */
- uint16_t DataINEndpointSize; /**< Size in bytes of the incoming MIDI IN data endpoint, if available (zero if unused). */
- bool DataINEndpointDoubleBank; /**< Indicates if the MIDI interface's IN data endpoint should use double banking. */
-
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI OUT data, if available (zero if unused). */
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI OUT data endpoint, if available (zero if unused). */
- bool DataOUTEndpointDoubleBank; /**< Indicates if the MIDI interface's OUT data endpoint should use double banking. */
+ USB_Endpoint_Table_t DataINEndpoint; /**< Data IN endpoint configuration table. */
+ USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
{
memset(&MSInterfaceInfo->State, 0x00, sizeof(MSInterfaceInfo->State));
- for (uint8_t EndpointNum = 1; EndpointNum < ENDPOINT_TOTAL_ENDPOINTS; EndpointNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Direction;
- bool DoubleBanked;
+ MSInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK;
+ MSInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK;
- if (EndpointNum == MSInterfaceInfo->Config.DataINEndpointNumber)
- {
- Size = MSInterfaceInfo->Config.DataINEndpointSize;
- Direction = ENDPOINT_DIR_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = MSInterfaceInfo->Config.DataINEndpointDoubleBank;
- }
- else if (EndpointNum == MSInterfaceInfo->Config.DataOUTEndpointNumber)
- {
- Size = MSInterfaceInfo->Config.DataOUTEndpointSize;
- Direction = ENDPOINT_DIR_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = MSInterfaceInfo->Config.DataOUTEndpointDoubleBank;
- }
- else
- {
- continue;
- }
+ if (!(Endpoint_ConfigureEndpointTable(&MSInterfaceInfo->Config.DataINEndpoint, 1)))
+ return false;
- if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
- {
- return false;
- }
- }
+ if (!(Endpoint_ConfigureEndpointTable(&MSInterfaceInfo->Config.DataOUTEndpoint, 1)))
+ return false;
return true;
}
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpoint.Address);
- if (Endpoint_IsReadWriteAllowed())
+ if (Endpoint_IsOUTReceived())
{
if (MS_Device_ReadInCommandBlock(MSInterfaceInfo))
{
if (MSInterfaceInfo->State.CommandBlock.Flags & MS_COMMAND_DIR_DATA_IN)
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpoint.Address);
bool SCSICommandResult = CALLBACK_MS_Device_SCSICommandReceived(MSInterfaceInfo);
if (MSInterfaceInfo->State.IsMassStoreReset)
{
- Endpoint_ResetEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
- Endpoint_ResetEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_ResetEndpoint(MSInterfaceInfo->Config.DataOUTEndpoint.Address);
+ Endpoint_ResetEndpoint(MSInterfaceInfo->Config.DataINEndpoint.Address);
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpoint.Address);
Endpoint_ClearStall();
Endpoint_ResetDataToggle();
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpoint.Address);
Endpoint_ClearStall();
Endpoint_ResetDataToggle();
{
uint16_t BytesProcessed;
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
-
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpoint.Address);
+
BytesProcessed = 0;
while (Endpoint_Read_Stream_LE(&MSInterfaceInfo->State.CommandBlock,
(sizeof(MS_CommandBlockWrapper_t) - 16), &BytesProcessed) ==
(MSInterfaceInfo->State.CommandBlock.Flags & 0x1F) ||
(MSInterfaceInfo->State.CommandBlock.SCSICommandLength == 0) ||
(MSInterfaceInfo->State.CommandBlock.SCSICommandLength > 16))
- {
+ {
Endpoint_StallTransaction();
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpoint.Address);
Endpoint_StallTransaction();
return false;
static void MS_Device_ReturnCommandStatus(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
{
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpoint.Address);
while (Endpoint_IsStalled())
{
return;
}
- Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpoint.Address);
while (Endpoint_IsStalled())
{
{
uint8_t InterfaceNumber; /**< Interface number of the Mass Storage interface within the device. */
- uint8_t DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint. */
- uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint. */
- bool DataINEndpointDoubleBank; /**< Indicates if the Mass Storage interface's IN data endpoint should use double banking. */
-
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint. */
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the Mass Storage interface's OUT data endpoint. */
- bool DataOUTEndpointDoubleBank; /**< Indicates if the Mass Storage interface's OUT data endpoint should use double banking. */
+ USB_Endpoint_Table_t DataINEndpoint; /**< Data IN endpoint configuration table. */
+ USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
uint8_t TotalLUNs; /**< Total number of logical drives in the Mass Storage interface. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
{
memset(&RNDISInterfaceInfo->State, 0x00, sizeof(RNDISInterfaceInfo->State));
- for (uint8_t EndpointNum = 1; EndpointNum < ENDPOINT_TOTAL_ENDPOINTS; EndpointNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Direction;
- bool DoubleBanked;
-
- if (EndpointNum == RNDISInterfaceInfo->Config.DataINEndpointNumber)
- {
- Size = RNDISInterfaceInfo->Config.DataINEndpointSize;
- Direction = ENDPOINT_DIR_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = RNDISInterfaceInfo->Config.DataINEndpointDoubleBank;
- }
- else if (EndpointNum == RNDISInterfaceInfo->Config.DataOUTEndpointNumber)
- {
- Size = RNDISInterfaceInfo->Config.DataOUTEndpointSize;
- Direction = ENDPOINT_DIR_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = RNDISInterfaceInfo->Config.DataOUTEndpointDoubleBank;
- }
- else if (EndpointNum == RNDISInterfaceInfo->Config.NotificationEndpointNumber)
- {
- Size = RNDISInterfaceInfo->Config.NotificationEndpointSize;
- Direction = ENDPOINT_DIR_IN;
- Type = EP_TYPE_INTERRUPT;
- DoubleBanked = RNDISInterfaceInfo->Config.NotificationEndpointDoubleBank;
- }
- else
- {
- continue;
- }
-
- if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
- DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
- {
- return false;
- }
- }
+ RNDISInterfaceInfo->Config.DataINEndpoint.Type = EP_TYPE_BULK;
+ RNDISInterfaceInfo->Config.DataOUTEndpoint.Type = EP_TYPE_BULK;
+ RNDISInterfaceInfo->Config.NotificationEndpoint.Type = EP_TYPE_INTERRUPT;
+
+ if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.DataINEndpoint, 1)))
+ return false;
+
+ if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.DataOUTEndpoint, 1)))
+ return false;
+
+ if (!(Endpoint_ConfigureEndpointTable(&RNDISInterfaceInfo->Config.NotificationEndpoint, 1)))
+ return false;
return true;
}
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
- Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.NotificationEndpointNumber);
+ Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.NotificationEndpoint.Address);
if (Endpoint_IsINReady() && RNDISInterfaceInfo->State.ResponseReady)
{
return false;
}
- Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpoint.Address);
return Endpoint_IsOUTReceived();
}
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
- Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber);
+ Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpoint.Address);
*PacketLength = 0;
return ENDPOINT_RWSTREAM_DeviceDisconnected;
}
- Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber);
+ Endpoint_SelectEndpoint(RNDISInterfaceInfo->Config.DataINEndpoint.Address);
if ((ErrorCode = Endpoint_WaitUntilReady()) != ENDPOINT_READYWAIT_NoError)
return ErrorCode;
{
uint8_t ControlInterfaceNumber; /**< Interface number of the RNDIS control interface within the device. */
- uint8_t DataINEndpointNumber; /**< Endpoint number of the RNDIS interface's IN data endpoint. */
- uint16_t DataINEndpointSize; /**< Size in bytes of the RNDIS interface's IN data endpoint. */
- bool DataINEndpointDoubleBank; /**< Indicates if the RNDIS interface's IN data endpoint should use double banking. */
-
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the RNDIS interface's OUT data endpoint. */
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the RNDIS interface's OUT data endpoint. */
- bool DataOUTEndpointDoubleBank; /**< Indicates if the RNDIS interface's OUT data endpoint should use double banking. */
-
- uint8_t NotificationEndpointNumber; /**< Endpoint number of the RNDIS interface's IN notification endpoint, if used. */
- uint16_t NotificationEndpointSize; /**< Size in bytes of the RNDIS interface's IN notification endpoint, if used. */
- bool NotificationEndpointDoubleBank; /**< Indicates if the RNDIS interface's notification endpoint should use double banking. */
+ USB_Endpoint_Table_t DataINEndpoint; /**< Data IN endpoint configuration table. */
+ USB_Endpoint_Table_t DataOUTEndpoint; /**< Data OUT endpoint configuration table. */
+ USB_Endpoint_Table_t NotificationEndpoint; /**< Notification IN Endpoint configuration table. */
char* AdapterVendorDescription; /**< String description of the adapter vendor. */
MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter. */
DataOUTEndpoint = EndpointData;\r
}\r
\r
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)\r
- {\r
- uint16_t Size;\r
- uint8_t Type;\r
- uint8_t Token;\r
- uint8_t EndpointAddress;\r
- bool DoubleBanked;\r
-\r
- if (PipeNum == AOAInterfaceInfo->Config.DataINPipeNumber)\r
- {\r
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);\r
- EndpointAddress = DataINEndpoint->EndpointAddress;\r
- Token = PIPE_TOKEN_IN;\r
- Type = EP_TYPE_BULK;\r
- DoubleBanked = AOAInterfaceInfo->Config.DataINPipeDoubleBank;\r
-\r
- AOAInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;\r
- }\r
- else if (PipeNum == AOAInterfaceInfo->Config.DataOUTPipeNumber)\r
- {\r
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);\r
- EndpointAddress = DataOUTEndpoint->EndpointAddress;\r
- Token = PIPE_TOKEN_OUT;\r
- Type = EP_TYPE_BULK;\r
- DoubleBanked = AOAInterfaceInfo->Config.DataOUTPipeDoubleBank;\r
-\r
- AOAInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;\r
- }\r
- else\r
- {\r
- continue;\r
- }\r
- \r
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,\r
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))\r
- {\r
- return AOA_ENUMERROR_PipeConfigurationFailed;\r
- }\r
- }\r
+ AOAInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);\r
+ AOAInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;\r
+ AOAInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK;\r
+ \r
+ AOAInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);\r
+ AOAInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;\r
+ AOAInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;\r
+ \r
+ if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataINPipe, 1)))\r
+ return false;\r
+ \r
+ if (!(Pipe_ConfigurePipeTable(&AOAInterfaceInfo->Config.DataOUTPipe, 1)))\r
+ return false;\r
\r
AOAInterfaceInfo->State.IsActive = true;\r
AOAInterfaceInfo->State.InterfaceNumber = AOAInterface->InterfaceNumber;\r
\r
uint8_t ErrorCode;\r
\r
- Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipeNumber);\r
+ Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
\r
Pipe_Unfreeze();\r
ErrorCode = Pipe_Write_Stream_LE(Buffer, Length, NULL);\r
\r
uint8_t ErrorCode;\r
\r
- Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipeNumber);\r
+ Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
\r
Pipe_Unfreeze();\r
ErrorCode = Pipe_Write_Stream_LE(String, strlen(String), NULL);\r
\r
uint8_t ErrorCode;\r
\r
- Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipeNumber);\r
+ Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
Pipe_Unfreeze();\r
\r
if (!(Pipe_IsReadWriteAllowed()))\r
if ((USB_HostState != HOST_STATE_Configured) || !(AOAInterfaceInfo->State.IsActive))\r
return 0;\r
\r
- Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipeNumber);\r
+ Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipe.Address);\r
Pipe_Unfreeze();\r
\r
if (Pipe_IsINReceived())\r
\r
int16_t ReceivedByte = -1;\r
\r
- Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipeNumber);\r
+ Pipe_SelectPipe(AOAInterfaceInfo->Config.DataINPipe.Address);\r
Pipe_Unfreeze();\r
\r
if (Pipe_IsINReceived())\r
\r
uint8_t ErrorCode;\r
\r
- Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipeNumber);\r
+ Pipe_SelectPipe(AOAInterfaceInfo->Config.DataOUTPipe.Address);\r
Pipe_Unfreeze();\r
\r
if (!(Pipe_BytesInPipe()))\r
{\r
struct\r
{\r
- uint8_t DataINPipeNumber; /**< Pipe number of the AOA interface's IN data pipe. */\r
- bool DataINPipeDoubleBank; /**< Indicates if the AOA interface's IN data pipe should use double banking. */\r
-\r
- uint8_t DataOUTPipeNumber; /**< Pipe number of the AOA interface's OUT data pipe. */\r
- bool DataOUTPipeDoubleBank; /**< Indicates if the AOA interface's OUT data pipe should use double banking. */\r
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */\r
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */\r
\r
char* PropertyStrings[AOA_STRING_TOTAL_STRINGS]; /**< Android Accessory property strings, sent to identify the accessory when the\r
* Android device is switched into Open Accessory mode. */\r
* Configured state.\r
*/\r
uint8_t InterfaceNumber; /**< Interface index of the AOA interface within the attached device. */\r
-\r
- uint16_t DataINPipeSize; /**< Size in bytes of the AOA interface's IN data pipe. */\r
- uint16_t DataOUTPipeSize; /**< Size in bytes of the AOA interface's OUT data pipe. */\r
} State; /**< State data for the USB class interface within the device. All elements in this section\r
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
* the interface is enumerated.\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
return AUDIO_ENUMERROR_InvalidConfigDescriptor;
- while ((AudioInterfaceInfo->Config.DataINPipeNumber && !(DataINEndpoint)) ||
- (AudioInterfaceInfo->Config.DataOUTPipeNumber && !(DataOUTEndpoint)))
+ while ((AudioInterfaceInfo->Config.DataINPipe.Address && !(DataINEndpoint)) ||
+ (AudioInterfaceInfo->Config.DataOUTPipe.Address && !(DataOUTEndpoint)))
{
if (!(AudioControlInterface) ||
USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
DataOUTEndpoint = EndpointData;
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- bool DoubleBanked;
-
- if (PipeNum == AudioInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_ISOCHRONOUS;
- DoubleBanked = true;
-
- AudioInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == AudioInterfaceInfo->Config.DataOUTPipeNumber)
- {
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_ISOCHRONOUS;
- DoubleBanked = true;
-
- AudioInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return AUDIO_ENUMERROR_PipeConfigurationFailed;
- }
- }
+ AudioInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ AudioInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ AudioInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_ISOCHRONOUS;
+ AudioInterfaceInfo->Config.DataINPipe.Banks = 2;
+
+ AudioInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ AudioInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ AudioInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_ISOCHRONOUS;
+ AudioInterfaceInfo->Config.DataOUTPipe.Banks = 2;
+
+ if (!(Pipe_ConfigurePipeTable(&AudioInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&AudioInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
AudioInterfaceInfo->State.ControlInterfaceNumber = AudioControlInterface->InterfaceNumber;
AudioInterfaceInfo->State.StreamingInterfaceNumber = AudioStreamingInterface->InterfaceNumber;
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the Audio interface's IN data pipe. If this interface should not
- * bind to an IN endpoint, this may be set to 0 to disable audio input streaming for
- * this driver instance.
- */
- uint8_t DataOUTPipeNumber; /**< Pipe number of the Audio interface's OUT data pipe. If this interface should not
- * bind to an OUT endpoint, this may be set to 0 to disable audio output streaming for
- * this driver instance.
- */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
uint8_t StreamingInterfaceNumber; /**< Interface index of the Audio Streaming interface within the attached device. */
uint8_t EnabledStreamingAltIndex; /**< Alternative setting index of the Audio Streaming interface when the stream is enabled. */
-
- uint16_t DataINPipeSize; /**< Size in bytes of the Audio interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the Audio interface's OUT data pipe. */
} State; /**< State data for the USB class interface within the device. All elements in this section
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when
* the interface is enumerated.
bool SampleReceived = false;
- Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
SampleReceived = Pipe_IsINReceived();
Pipe_Freeze();
if ((USB_HostState != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))
return false;
- Pipe_SelectPipe(AudioInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(AudioInterfaceInfo->Config.DataOUTPipe.Address);
return Pipe_IsOUTReady();
}
}
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- uint8_t InterruptPeriod;
- bool DoubleBanked;
-
- if (PipeNum == CDCInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = CDCInterfaceInfo->Config.DataINPipeDoubleBank;
- InterruptPeriod = 0;
-
- CDCInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == CDCInterfaceInfo->Config.DataOUTPipeNumber)
- {
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = CDCInterfaceInfo->Config.DataOUTPipeDoubleBank;
- InterruptPeriod = 0;
-
- CDCInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- }
- else if (PipeNum == CDCInterfaceInfo->Config.NotificationPipeNumber)
- {
- Size = le16_to_cpu(NotificationEndpoint->EndpointSize);
- EndpointAddress = NotificationEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_INTERRUPT;
- DoubleBanked = CDCInterfaceInfo->Config.NotificationPipeDoubleBank;
- InterruptPeriod = NotificationEndpoint->PollingIntervalMS;
-
- CDCInterfaceInfo->State.NotificationPipeSize = NotificationEndpoint->EndpointSize;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return CDC_ENUMERROR_PipeConfigurationFailed;
- }
-
- if (InterruptPeriod)
- Pipe_SetInterruptPeriod(InterruptPeriod);
- }
+ CDCInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ CDCInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ CDCInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK;
+
+ CDCInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ CDCInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ CDCInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
+
+ CDCInterfaceInfo->Config.NotificationPipe.Size = le16_to_cpu(NotificationEndpoint->EndpointSize);
+ CDCInterfaceInfo->Config.NotificationPipe.EndpointAddress = NotificationEndpoint->EndpointAddress;
+ CDCInterfaceInfo->Config.NotificationPipe.Type = EP_TYPE_INTERRUPT;
+
+ if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&CDCInterfaceInfo->Config.NotificationPipe, 1)))
+ return false;
CDCInterfaceInfo->State.ControlInterfaceNumber = CDCControlInterface->InterfaceNumber;
CDCInterfaceInfo->State.ControlLineStates.HostToDevice = (CDC_CONTROL_LINE_OUT_RTS | CDC_CONTROL_LINE_OUT_DTR);
if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
return;
- Pipe_SelectPipe(CDCInterfaceInfo->Config.NotificationPipeNumber);
+ Pipe_SelectPipe(CDCInterfaceInfo->Config.NotificationPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsINReceived())
uint8_t ErrorCode;
- Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
ErrorCode = Pipe_Write_Stream_LE(Buffer, Length, NULL);
uint8_t ErrorCode;
- Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
ErrorCode = Pipe_Write_Stream_LE(String, strlen(String), NULL);
uint8_t ErrorCode;
- Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if (!(Pipe_IsReadWriteAllowed()))
if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
return 0;
- Pipe_SelectPipe(CDCInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(CDCInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsINReceived())
int16_t ReceivedByte = -1;
- Pipe_SelectPipe(CDCInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(CDCInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsINReceived())
uint8_t ErrorCode;
- Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(CDCInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if (!(Pipe_BytesInPipe()))
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe. */
- bool DataINPipeDoubleBank; /**< Indicates if the CDC interface's IN data pipe should use double banking. */
-
- uint8_t DataOUTPipeNumber; /**< Pipe number of the CDC interface's OUT data pipe. */
- bool DataOUTPipeDoubleBank; /**< Indicates if the CDC interface's OUT data pipe should use double banking. */
-
- uint8_t NotificationPipeNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used. */
- bool NotificationPipeDoubleBank; /**< Indicates if the CDC interface's notification pipe should use double banking. */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
+ USB_Pipe_Table_t NotificationPipe; /**< Notification IN Pipe configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
*/
uint8_t ControlInterfaceNumber; /**< Interface index of the CDC-ACM control interface within the attached device. */
- uint16_t DataINPipeSize; /**< Size in bytes of the CDC interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the CDC interface's OUT data pipe. */
- uint16_t NotificationPipeSize; /**< Size in bytes of the CDC interface's IN notification pipe, if used. */
-
struct
{
uint16_t HostToDevice; /**< Control line states from the host to device, as a set of \c CDC_CONTROL_LINE_OUT_*
DataOUTEndpoint = EndpointData;
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- uint8_t InterruptPeriod;
- bool DoubleBanked;
-
- if (PipeNum == HIDInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_INTERRUPT;
- DoubleBanked = HIDInterfaceInfo->Config.DataINPipeDoubleBank;
- InterruptPeriod = DataINEndpoint->PollingIntervalMS;
-
- HIDInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == HIDInterfaceInfo->Config.DataOUTPipeNumber)
- {
- if (DataOUTEndpoint == NULL)
- continue;
-
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_INTERRUPT;
- DoubleBanked = HIDInterfaceInfo->Config.DataOUTPipeDoubleBank;
- InterruptPeriod = DataOUTEndpoint->PollingIntervalMS;
-
- HIDInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- HIDInterfaceInfo->State.DeviceUsesOUTPipe = true;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return HID_ENUMERROR_PipeConfigurationFailed;
- }
-
- if (InterruptPeriod)
- Pipe_SetInterruptPeriod(InterruptPeriod);
- }
+ HIDInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ HIDInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ HIDInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_INTERRUPT;
+
+ HIDInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ HIDInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ HIDInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_INTERRUPT;
+
+ if (!(Pipe_ConfigurePipeTable(&HIDInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&HIDInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
HIDInterfaceInfo->State.InterfaceNumber = HIDInterface->InterfaceNumber;
HIDInterfaceInfo->State.HIDReportSize = LE16_TO_CPU(HIDDescriptor->HIDReportLength);
uint8_t ErrorCode;
- Pipe_SelectPipe(HIDInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(HIDInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
uint16_t ReportSize;
{
uint8_t ErrorCode;
- Pipe_SelectPipe(HIDInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(HIDInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if (ReportID)
bool ReportReceived;
- Pipe_SelectPipe(HIDInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(HIDInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
ReportReceived = Pipe_IsINReceived();
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the HID interface's IN data pipe. */
- bool DataINPipeDoubleBank; /**< Indicates if the HID interface's IN data pipe should use double banking. */
-
- uint8_t DataOUTPipeNumber; /**< Pipe number of the HID interface's OUT data pipe. */
- bool DataOUTPipeDoubleBank; /**< Indicates if the HID interface's OUT data pipe should use double banking. */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
uint8_t HIDInterfaceProtocol; /**< HID interface protocol value to match against if a specific
* boot subclass protocol is required, a protocol value from the
*/
uint8_t InterfaceNumber; /**< Interface index of the HID interface within the attached device. */
- uint16_t DataINPipeSize; /**< Size in bytes of the HID interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the HID interface's OUT data pipe. */
-
bool SupportsBootProtocol; /**< Indicates if the current interface instance supports the HID Boot
* Protocol when enabled via \ref HID_Host_SetBootProtocol().
*/
DataOUTEndpoint = EndpointData;
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- bool DoubleBanked;
-
- if (PipeNum == MIDIInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = MIDIInterfaceInfo->Config.DataINPipeDoubleBank;
-
- MIDIInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == MIDIInterfaceInfo->Config.DataOUTPipeNumber)
- {
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = MIDIInterfaceInfo->Config.DataOUTPipeDoubleBank;
-
- MIDIInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return MIDI_ENUMERROR_PipeConfigurationFailed;
- }
- }
+ MIDIInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ MIDIInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ MIDIInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK;
+
+ MIDIInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ MIDIInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ MIDIInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
+
+ if (!(Pipe_ConfigurePipeTable(&MIDIInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&MIDIInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
MIDIInterfaceInfo->State.InterfaceNumber = MIDIInterface->InterfaceNumber;
MIDIInterfaceInfo->State.IsActive = true;
uint8_t ErrorCode;
- Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipe.Address);
if (Pipe_BytesInPipe())
{
uint8_t ErrorCode;
- Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipe.Address);
if ((ErrorCode = Pipe_Write_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NULL)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
{
if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))
return HOST_SENDCONTROL_DeviceDisconnected;
+
+ bool DataReady = false;
- Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataINPipeNumber);
-
- if (!(Pipe_IsReadWriteAllowed()))
- return false;
+ Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataINPipe.Address);
+ Pipe_Unfreeze();
- Pipe_Read_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NULL);
-
- if (!(Pipe_IsReadWriteAllowed()))
- Pipe_ClearIN();
+ if (Pipe_IsINReceived())
+ {
+ if (Pipe_BytesInPipe())
+ {
+ Pipe_Read_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NULL);
+ DataReady = true;
+ }
- return true;
+ if (!(Pipe_BytesInPipe()))
+ Pipe_ClearIN();
+ }
+
+ Pipe_Freeze();
+
+ return DataReady;
}
#endif
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the MIDI interface's streaming IN data pipe. */
- bool DataINPipeDoubleBank; /**< Indicates if the MIDI interface's IN data pipe should use double banking. */
-
- uint8_t DataOUTPipeNumber; /**< Pipe number of the MIDI interface's streaming OUT data pipe. */
- bool DataOUTPipeDoubleBank; /**< Indicates if the MIDI interface's OUT data pipe should use double banking. */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
* Configured state.
*/
uint8_t InterfaceNumber; /**< Interface index of the MIDI interface within the attached device. */
-
- uint16_t DataINPipeSize; /**< Size in bytes of the MIDI Streaming Data interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the MIDI Streaming Data interface's OUT data pipe. */
} State; /**< State data for the USB class interface within the device. All elements in this section
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when
* the interface is enumerated.
DataOUTEndpoint = EndpointData;
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- bool DoubleBanked;
-
- if (PipeNum == MSInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = MSInterfaceInfo->Config.DataINPipeDoubleBank;
-
- MSInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == MSInterfaceInfo->Config.DataOUTPipeNumber)
- {
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = MSInterfaceInfo->Config.DataOUTPipeDoubleBank;
-
- MSInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return MS_ENUMERROR_PipeConfigurationFailed;
- }
- }
+ MSInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ MSInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ MSInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK;
+
+ MSInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ MSInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ MSInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
+
+ if (!(Pipe_ConfigurePipeTable(&MSInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&MSInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
MSInterfaceInfo->State.InterfaceNumber = MassStorageInterface->InterfaceNumber;
MSInterfaceInfo->State.IsActive = true;
SCSICommandBlock->Signature = CPU_TO_LE32(MS_CBW_SIGNATURE);
SCSICommandBlock->Tag = cpu_to_le32(MSInterfaceInfo->State.TransactionTag);
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(SCSICommandBlock, sizeof(MS_CommandBlockWrapper_t),
uint16_t TimeoutMSRem = MS_COMMAND_DATA_TIMEOUT_MS;
uint16_t PreviousFrameNumber = USB_Host_GetFrameNumber();
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
while (!(Pipe_IsINReceived()))
}
Pipe_Freeze();
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsStalled())
}
Pipe_Freeze();
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsStalled())
return PIPE_RWSTREAM_DeviceDisconnected;
};
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipe.Address);
Pipe_Freeze();
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Freeze();
return PIPE_RWSTREAM_NoError;
return ErrorCode;
}
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem, NULL)) != PIPE_RWSTREAM_NoError)
}
else
{
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem, NULL)) != PIPE_RWSTREAM_NoError)
if ((ErrorCode = MS_Host_WaitForDataReceived(MSInterfaceInfo)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t),
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
return ErrorCode;
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataINPipe.Address);
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
- Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(MSInterfaceInfo->Config.DataOUTPipe.Address);
if ((ErrorCode = USB_Host_ClearEndpointStall(Pipe_GetBoundEndpointAddress())) != HOST_SENDCONTROL_Successful)
return ErrorCode;
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the Mass Storage interface's IN data pipe. */
- bool DataINPipeDoubleBank; /**< Indicates if the Mass Storage interface's IN data pipe should use double banking. */
-
- uint8_t DataOUTPipeNumber; /**< Pipe number of the Mass Storage interface's OUT data pipe. */
- bool DataOUTPipeDoubleBank; /**< Indicates if the Mass Storage interface's OUT data pipe should use double banking. */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
*/
uint8_t InterfaceNumber; /**< Interface index of the Mass Storage interface within the attached device. */
- uint16_t DataINPipeSize; /**< Size in bytes of the Mass Storage interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the Mass Storage interface's OUT data pipe. */
-
uint32_t TransactionTag; /**< Current transaction tag for data synchronizing of packets. */
} State; /**< State data for the USB class interface within the device. All elements in this section
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when
DataOUTEndpoint = EndpointData;
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- bool DoubleBanked;
-
- if (PipeNum == PRNTInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = PRNTInterfaceInfo->Config.DataINPipeDoubleBank;
-
- PRNTInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == PRNTInterfaceInfo->Config.DataOUTPipeNumber)
- {
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = PRNTInterfaceInfo->Config.DataOUTPipeDoubleBank;
-
- PRNTInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return PRNT_ENUMERROR_PipeConfigurationFailed;
- }
- }
+ PRNTInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ PRNTInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ PRNTInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK;
+
+ PRNTInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ PRNTInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ PRNTInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
+
+ if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&PRNTInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
PRNTInterfaceInfo->State.InterfaceNumber = PrinterInterface->InterfaceNumber;
PRNTInterfaceInfo->State.AlternateSetting = PrinterInterface->AlternateSetting;
uint8_t ErrorCode;
- Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if (!(Pipe_BytesInPipe()))
uint8_t ErrorCode;
- Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if (!(Pipe_IsReadWriteAllowed()))
if ((USB_HostState != HOST_STATE_Configured) || !(PRNTInterfaceInfo->State.IsActive))
return PIPE_RWSTREAM_DeviceDisconnected;
- Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(String, strlen(String), NULL)) != PIPE_RWSTREAM_NoError)
if ((USB_HostState != HOST_STATE_Configured) || !(PRNTInterfaceInfo->State.IsActive))
return PIPE_RWSTREAM_DeviceDisconnected;
- Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(Buffer, Length, NULL)) != PIPE_RWSTREAM_NoError)
if ((USB_HostState != HOST_STATE_Configured) || !(PRNTInterfaceInfo->State.IsActive))
return 0;
- Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsINReceived())
int16_t ReceivedByte = -1;
- Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsINReceived())
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the Printer interface's IN data pipe. */
- bool DataINPipeDoubleBank; /**< Indicates if the Printer interface's IN data pipe should use double banking. */
-
- uint8_t DataOUTPipeNumber; /**< Pipe number of the Printer interface's OUT data pipe. */
- bool DataOUTPipeDoubleBank; /**< Indicates if the Printer interface's OUT data pipe should use double banking. */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
*/
uint8_t InterfaceNumber; /**< Interface index of the Printer interface within the attached device. */
uint8_t AlternateSetting; /**< Alternate setting within the Printer Interface in the attached device. */
-
- uint16_t DataINPipeSize; /**< Size in bytes of the Printer interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the Printer interface's OUT data pipe. */
} State; /**< State data for the USB class interface within the device. All elements in this section
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when
* the interface is enumerated.
}
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- uint8_t InterruptPeriod;
- bool DoubleBanked;
-
- if (PipeNum == RNDISInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = le16_to_cpu(DataINEndpoint->EndpointSize);
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = RNDISInterfaceInfo->Config.DataINPipeDoubleBank;
- InterruptPeriod = 0;
-
- RNDISInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == RNDISInterfaceInfo->Config.DataOUTPipeNumber)
- {
- Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = RNDISInterfaceInfo->Config.DataOUTPipeDoubleBank;
- InterruptPeriod = 0;
-
- RNDISInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- }
- else if (PipeNum == RNDISInterfaceInfo->Config.NotificationPipeNumber)
- {
- Size = le16_to_cpu(NotificationEndpoint->EndpointSize);
- EndpointAddress = NotificationEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_INTERRUPT;
- DoubleBanked = RNDISInterfaceInfo->Config.NotificationPipeDoubleBank;
- InterruptPeriod = NotificationEndpoint->PollingIntervalMS;
-
- RNDISInterfaceInfo->State.NotificationPipeSize = NotificationEndpoint->EndpointSize;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return CDC_ENUMERROR_PipeConfigurationFailed;
- }
+ RNDISInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ RNDISInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ RNDISInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK;
+
+ RNDISInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ RNDISInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ RNDISInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
+
+ RNDISInterfaceInfo->Config.NotificationPipe.Size = le16_to_cpu(NotificationEndpoint->EndpointSize);
+ RNDISInterfaceInfo->Config.NotificationPipe.EndpointAddress = NotificationEndpoint->EndpointAddress;
+ RNDISInterfaceInfo->Config.NotificationPipe.Type = EP_TYPE_INTERRUPT;
+
+ if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
- if (InterruptPeriod)
- Pipe_SetInterruptPeriod(InterruptPeriod);
- }
+ if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.NotificationPipe, 1)))
+ return false;
RNDISInterfaceInfo->State.ControlInterfaceNumber = RNDISControlInterface->InterfaceNumber;
RNDISInterfaceInfo->State.IsActive = true;
if ((USB_HostState != HOST_STATE_Configured) || !(RNDISInterfaceInfo->State.IsActive))
return false;
- Pipe_SelectPipe(RNDISInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(RNDISInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
PacketWaiting = Pipe_IsINReceived();
if ((USB_HostState != HOST_STATE_Configured) || !(RNDISInterfaceInfo->State.IsActive))
return PIPE_READYWAIT_DeviceDisconnected;
- Pipe_SelectPipe(RNDISInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(RNDISInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if (!(Pipe_IsReadWriteAllowed()))
DeviceMessage.DataOffset = CPU_TO_LE32(sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t));
DeviceMessage.DataLength = cpu_to_le32(PacketLength);
- Pipe_SelectPipe(RNDISInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(RNDISInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(&DeviceMessage, sizeof(RNDIS_Packet_Message_t),
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the RNDIS interface's IN data pipe. */
- bool DataINPipeDoubleBank; /**< Indicates if the RNDIS interface's IN data pipe should use double banking. */
-
- uint8_t DataOUTPipeNumber; /**< Pipe number of the RNDIS interface's OUT data pipe. */
- bool DataOUTPipeDoubleBank; /**< Indicates if the RNDIS interface's OUT data pipe should use double banking. */
-
- uint8_t NotificationPipeNumber; /**< Pipe number of the RNDIS interface's IN notification endpoint, if used. */
- bool NotificationPipeDoubleBank; /**< Indicates if the RNDIS interface's notification pipe should use double banking. */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
+ USB_Pipe_Table_t NotificationPipe; /**< Notification IN Pipe configuration table. */
uint32_t HostMaxPacketSize; /**< Maximum size of a packet which can be buffered by the host. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
*/
uint8_t ControlInterfaceNumber; /**< Interface index of the RNDIS control interface within the attached device. */
- uint16_t DataINPipeSize; /**< Size in bytes of the RNDIS interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the RNDIS interface's OUT data pipe. */
- uint16_t NotificationPipeSize; /**< Size in bytes of the RNDIS interface's IN notification pipe, if used. */
-
uint32_t DeviceMaxPacketSize; /**< Maximum size of a packet which can be buffered by the attached RNDIS device. */
uint32_t RequestID; /**< Request ID counter to give a unique ID for each command/response pair. */
}
}
- for (uint8_t PipeNum = 1; PipeNum < PIPE_TOTAL_PIPES; PipeNum++)
- {
- uint16_t Size;
- uint8_t Type;
- uint8_t Token;
- uint8_t EndpointAddress;
- uint8_t InterruptPeriod;
- bool DoubleBanked;
-
- if (PipeNum == SIInterfaceInfo->Config.DataINPipeNumber)
- {
- Size = DataINEndpoint->EndpointSize;
- EndpointAddress = DataINEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_BULK;
- DoubleBanked = SIInterfaceInfo->Config.DataINPipeDoubleBank;
- InterruptPeriod = 0;
-
- SIInterfaceInfo->State.DataINPipeSize = DataINEndpoint->EndpointSize;
- }
- else if (PipeNum == SIInterfaceInfo->Config.DataOUTPipeNumber)
- {
- Size = DataOUTEndpoint->EndpointSize;
- EndpointAddress = DataOUTEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_OUT;
- Type = EP_TYPE_BULK;
- DoubleBanked = SIInterfaceInfo->Config.DataOUTPipeDoubleBank;
- InterruptPeriod = 0;
-
- SIInterfaceInfo->State.DataOUTPipeSize = DataOUTEndpoint->EndpointSize;
- }
- else if (PipeNum == SIInterfaceInfo->Config.EventsPipeNumber)
- {
- Size = EventsEndpoint->EndpointSize;
- EndpointAddress = EventsEndpoint->EndpointAddress;
- Token = PIPE_TOKEN_IN;
- Type = EP_TYPE_INTERRUPT;
- DoubleBanked = SIInterfaceInfo->Config.EventsPipeDoubleBank;
- InterruptPeriod = EventsEndpoint->PollingIntervalMS;
-
- SIInterfaceInfo->State.EventsPipeSize = EventsEndpoint->EndpointSize;
- }
- else
- {
- continue;
- }
-
- if (!(Pipe_ConfigurePipe(PipeNum, Type, Token, EndpointAddress, Size,
- DoubleBanked ? PIPE_BANK_DOUBLE : PIPE_BANK_SINGLE)))
- {
- return SI_ENUMERROR_PipeConfigurationFailed;
- }
-
- if (InterruptPeriod)
- Pipe_SetInterruptPeriod(InterruptPeriod);
- }
+ SIInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize);
+ SIInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress;
+ SIInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK;
+
+ SIInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize);
+ SIInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress;
+ SIInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK;
+
+ SIInterfaceInfo->Config.EventsPipe.Size = le16_to_cpu(EventsEndpoint->EndpointSize);
+ SIInterfaceInfo->Config.EventsPipe.EndpointAddress = EventsEndpoint->EndpointAddress;
+ SIInterfaceInfo->Config.EventsPipe.Type = EP_TYPE_INTERRUPT;
+
+ if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.DataINPipe, 1)))
+ return false;
+
+ if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.DataOUTPipe, 1)))
+ return false;
+ if (!(Pipe_ConfigurePipeTable(&SIInterfaceInfo->Config.EventsPipe, 1)))
+ return false;
+
SIInterfaceInfo->State.InterfaceNumber = StillImageInterface->InterfaceNumber;
SIInterfaceInfo->State.IsActive = true;
if (SIInterfaceInfo->State.IsSessionOpen)
PIMAHeader->TransactionID = cpu_to_le32(SIInterfaceInfo->State.TransactionID++);
- Pipe_SelectPipe(SIInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(PIMAHeader, PIMA_COMMAND_SIZE(0), NULL)) != PIPE_RWSTREAM_NoError)
if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
return PIPE_RWSTREAM_DeviceDisconnected;
- Pipe_SelectPipe(SIInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
while (!(Pipe_IsINReceived()))
}
Pipe_Freeze();
- Pipe_SelectPipe(SIInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsStalled())
}
Pipe_Freeze();
- Pipe_SelectPipe(SIInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
if (Pipe_IsStalled())
if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
return PIPE_RWSTREAM_DeviceDisconnected;
- Pipe_SelectPipe(SIInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.DataOUTPipe.Address);
Pipe_Unfreeze();
ErrorCode = Pipe_Write_Stream_LE(Buffer, Bytes, NULL);
if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
return PIPE_RWSTREAM_DeviceDisconnected;
- Pipe_SelectPipe(SIInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
ErrorCode = Pipe_Read_Stream_LE(Buffer, Bytes, NULL);
if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
return false;
- Pipe_SelectPipe(SIInterfaceInfo->Config.EventsPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.EventsPipe.Address);
Pipe_Unfreeze();
if (Pipe_BytesInPipe())
if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
return PIPE_RWSTREAM_DeviceDisconnected;
- Pipe_SelectPipe(SIInterfaceInfo->Config.EventsPipeNumber);
+ Pipe_SelectPipe(SIInterfaceInfo->Config.EventsPipe.Address);
Pipe_Unfreeze();
ErrorCode = Pipe_Read_Stream_LE(PIMAHeader, sizeof(PIMA_Container_t), NULL);
{
struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the Still Image interface's IN data pipe. */
- bool DataINPipeDoubleBank; /**< Indicates if the Still Image interface's IN data pipe should use double banking. */
-
- uint8_t DataOUTPipeNumber; /**< Pipe number of the Still Image interface's OUT data pipe. */
- bool DataOUTPipeDoubleBank; /**< Indicates if the Still Image interface's OUT data pipe should use double banking. */
-
- uint8_t EventsPipeNumber; /**< Pipe number of the Still Image interface's IN events endpoint, if used. */
- bool EventsPipeDoubleBank; /**< Indicates if the Still Image interface's events data pipe should use double banking. */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
+ USB_Pipe_Table_t EventsPipe; /**< Event notification IN Pipe configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
*/
uint8_t InterfaceNumber; /**< Interface index of the Still Image interface within the attached device. */
- uint16_t DataINPipeSize; /**< Size in bytes of the Still Image interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the Still Image interface's OUT data pipe. */
- uint16_t EventsPipeSize; /**< Size in bytes of the Still Image interface's IN events pipe. */
-
bool IsSessionOpen; /**< Indicates if a PIMA session is currently open with the attached device. */
uint32_t TransactionID; /**< Transaction ID for the next transaction to send to the device. */
} State; /**< State data for the USB class interface within the device. All elements in this section
uint8_t USB_Device_ControlEndpointSize = ENDPOINT_CONTROLEP_DEFAULT_SIZE;
#endif
+bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table,
+ const uint8_t Entries)
+{
+ for (uint8_t i = 0; i < Entries; i++)
+ {
+ if (!(Table[i].Address))
+ continue;
+
+ if (!(Endpoint_ConfigureEndpoint(Table[i].Address, Table[i].Type, Table[i].Size, Table[i].Banks)))
+ return false;
+ }
+
+ return true;
+}
+
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
const uint8_t UECFG0XData,
const uint8_t UECFG1XData)
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
- /* Macros: */
- #define _ENDPOINT_GET_MAXSIZE(EPIndex) _ENDPOINT_GET_MAXSIZE2(ENDPOINT_DETAILS_EP ## EPIndex)
- #define _ENDPOINT_GET_MAXSIZE2(EPDetails) _ENDPOINT_GET_MAXSIZE3(EPDetails)
- #define _ENDPOINT_GET_MAXSIZE3(MaxSize, Banks) (MaxSize)
-
- #define _ENDPOINT_GET_BANKS(EPIndex) _ENDPOINT_GET_BANKS2(ENDPOINT_DETAILS_EP ## EPIndex)
- #define _ENDPOINT_GET_BANKS2(EPDetails) _ENDPOINT_GET_BANKS3(EPDetails)
- #define _ENDPOINT_GET_BANKS3(MaxSize, Banks) (Banks)
-
- #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
- #define ENDPOINT_DETAILS_MAXEP 7
-
- #define ENDPOINT_DETAILS_EP0 64, 1
- #define ENDPOINT_DETAILS_EP1 256, 2
- #define ENDPOINT_DETAILS_EP2 64, 2
- #define ENDPOINT_DETAILS_EP3 64, 2
- #define ENDPOINT_DETAILS_EP4 64, 2
- #define ENDPOINT_DETAILS_EP5 64, 2
- #define ENDPOINT_DETAILS_EP6 64, 2
- #else
- #define ENDPOINT_DETAILS_MAXEP 5
-
- #define ENDPOINT_DETAILS_EP0 64, 1
- #define ENDPOINT_DETAILS_EP1 64, 1
- #define ENDPOINT_DETAILS_EP2 64, 1
- #define ENDPOINT_DETAILS_EP3 64, 2
- #define ENDPOINT_DETAILS_EP4 64, 2
- #endif
-
/* Inline Functions: */
static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST
ATTR_ALWAYS_INLINE;
/* Public Interface - May be used in end-application: */
/* Macros: */
- /** \name Endpoint Bank Mode Masks */
- //@{
- /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
- * that the endpoint should have one single bank, which requires less USB FIFO memory but results
- * in slower transfers as only one USB device (the AVR or the host) can access the endpoint's
- * bank at the one time.
- */
- #define ENDPOINT_BANK_SINGLE (0 << EPBK0)
-
- /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
- * that the endpoint should have two banks, which requires more USB FIFO memory but results
- * in faster transfers as one USB device (the AVR or the host) can access one bank while the other
- * accesses the second bank.
- */
- #define ENDPOINT_BANK_DOUBLE (1 << EPBK0)
- //@}
-
#if (!defined(FIXED_CONTROL_ENDPOINT_SIZE) || defined(__DOXYGEN__))
/** Default size of the default control endpoint's bank, until altered by the control endpoint bank size
* value in the device descriptor. Not available if the \c FIXED_CONTROL_ENDPOINT_SIZE token is defined.
#define ENDPOINT_CONTROLEP_DEFAULT_SIZE 8
#endif
- /** Retrieves the maximum bank size in bytes of a given endpoint.
- *
- * \attention This macro will only work correctly on endpoint indexes that are compile-time constants
- * defined by the preprocessor.
- *
- * \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
- */
- #define ENDPOINT_MAX_SIZE(EPIndex) _ENDPOINT_GET_MAXSIZE(EPIndex)
-
- /** Retrieves the total number of banks supported by the given endpoint.
- *
- * \attention This macro will only work correctly on endpoint indexes that are compile-time constants
- * defined by the preprocessor.
- *
- * \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
- */
- #define ENDPOINT_BANKS_SUPPORTED(EPIndex) _ENDPOINT_GET_BANKS(EPIndex)
-
#if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__)
- /** Total number of endpoints (including the default control endpoint at address 0) which may
- * be used in the device. Different USB AVR models support different amounts of endpoints,
- * this value reflects the maximum number of endpoints for the currently selected AVR model.
- */
- #define ENDPOINT_TOTAL_ENDPOINTS ENDPOINT_DETAILS_MAXEP
+ #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
+ #define ENDPOINT_TOTAL_ENDPOINTS 7
+ #else
+ /** Total number of endpoints (including the default control endpoint at address 0) which may
+ * be used in the device. Different USB AVR models support different amounts of endpoints,
+ * this value reflects the maximum number of endpoints for the currently selected AVR model.
+ */
+ #define ENDPOINT_TOTAL_ENDPOINTS 5
+ #endif
#else
#define ENDPOINT_TOTAL_ENDPOINTS 1
#endif
};
/* Inline Functions: */
- /** Configures the specified endpoint number with the given endpoint type, direction, bank size
- * and banking mode. Once configured, the endpoint may be read from or written to, depending
- * on its direction.
+ /** Configures the specified endpoint address with the given endpoint type, bank size and number of hardware
+ * banks. Once configured, the endpoint may be read from or written to, depending on its direction.
*
- * \param[in] Number Endpoint number to configure. This must be more than 0 and less than
- * \ref ENDPOINT_TOTAL_ENDPOINTS.
+ * \param[in] Address Endpoint address to configure.
*
* \param[in] Type Type of endpoint to configure, a \c EP_TYPE_* mask. Not all endpoint types
* are available on Low Speed USB devices - refer to the USB 2.0 specification.
*
- * \param[in] Direction Endpoint data direction, either \ref ENDPOINT_DIR_OUT or \ref ENDPOINT_DIR_IN.
- * All endpoints (except Control type) are unidirectional - data may only be read
- * from or written to the endpoint bank based on its direction, not both.
- *
* \param[in] Size Size of the endpoint's bank, where packets are stored before they are transmitted
* to the USB host, or after they have been received from the USB host (depending on
* the endpoint's data direction). The bank size must indicate the maximum packet size
* that the endpoint can handle.
*
- * \param[in] Banks Number of banks to use for the endpoint being configured, an \c ENDPOINT_BANK_* mask.
- * More banks uses more USB DPRAM, but offers better performance. Isochronous type
- * endpoints <b>must</b> have at least two banks.
+ * \param[in] Banks Number of banks to use for the endpoint being configured.
*
* \attention When the \c ORDERED_EP_CONFIG compile time option is used, Endpoints <b>must</b> be configured in
* ascending order, or bank corruption will occur.
*
* \return Boolean \c true if the configuration succeeded, \c false otherwise.
*/
- static inline bool Endpoint_ConfigureEndpoint(const uint8_t Number,
+ static inline bool Endpoint_ConfigureEndpoint(const uint8_t Address,
const uint8_t Type,
- const uint8_t Direction,
const uint16_t Size,
const uint8_t Banks) ATTR_ALWAYS_INLINE;
- static inline bool Endpoint_ConfigureEndpoint(const uint8_t Number,
+ static inline bool Endpoint_ConfigureEndpoint(const uint8_t Address,
const uint8_t Type,
- const uint8_t Direction,
const uint16_t Size,
const uint8_t Banks)
{
- return Endpoint_ConfigureEndpoint_Prv(Number, ((Type << EPTYPE0) | (Direction ? (1 << EPDIR) : 0)),
- ((1 << ALLOC) | Banks | Endpoint_BytesToEPSizeMask(Size)));
+ return Endpoint_ConfigureEndpoint_Prv((Address & ENDPOINT_EPNUM_MASK),
+ ((Type << EPTYPE0) | ((Address & ENDPOINT_DIR_IN) ? (1 << EPDIR) : 0)),
+ ((1 << ALLOC) | ((Banks > 1) ? (1 << EPBK0) : 0) | Endpoint_BytesToEPSizeMask(Size)));
}
/** Indicates the number of bytes currently stored in the current endpoint's selected bank.
#endif
}
+ /** Determines the currently selected endpoint's direction.
+ *
+ * \return The currently selected endpoint's direction, as a \c ENDPOINT_DIR_* mask.
+ */
+ static inline uint8_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline uint8_t Endpoint_GetEndpointDirection(void)
+ {
+ return (UECFG0X & (1 << EPDIR)) ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT;
+ }
+
/** Get the endpoint address of the currently selected endpoint. This is typically used to save
- * the currently selected endpoint number so that it can be restored after another endpoint has
- * been manipulated.
+ * the currently selected endpoint so that it can be restored after another endpoint has been
+ * manipulated.
*
* \return Index of the currently selected endpoint.
*/
static inline uint8_t Endpoint_GetCurrentEndpoint(void)
{
#if !defined(CONTROL_ONLY_DEVICE)
- return (UENUM & ENDPOINT_EPNUM_MASK);
+ return ((UENUM & ENDPOINT_EPNUM_MASK) | Endpoint_GetEndpointDirection());
#else
return ENDPOINT_CONTROLEP;
#endif
}
- /** Selects the given endpoint number. If the address from the device descriptors is used, the
- * value should be masked with the \ref ENDPOINT_EPNUM_MASK constant to extract only the endpoint
- * number (and discarding the endpoint direction bit).
+ /** Selects the given endpoint address.
*
- * Any endpoint operations which do not require the endpoint number to be indicated will operate on
+ * Any endpoint operations which do not require the endpoint address to be indicated will operate on
* the currently selected endpoint.
*
- * \param[in] EndpointNumber Endpoint number to select.
+ * \param[in] Address Endpoint address to select.
*/
- static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE;
- static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber)
+ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Endpoint_SelectEndpoint(const uint8_t Address)
{
#if !defined(CONTROL_ONLY_DEVICE)
- UENUM = EndpointNumber;
+ UENUM = (Address & ENDPOINT_EPNUM_MASK);
#endif
}
/** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's
* data In and Out pointers to the bank's contents.
*
- * \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset.
+ * \param[in] Address Endpoint address whose FIFO buffers are to be reset.
*/
- static inline void Endpoint_ResetEndpoint(const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE;
- static inline void Endpoint_ResetEndpoint(const uint8_t EndpointNumber)
+ static inline void Endpoint_ResetEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Endpoint_ResetEndpoint(const uint8_t Address)
{
- UERST = (1 << EndpointNumber);
+ UERST = (1 << (Address & ENDPOINT_EPNUM_MASK));
UERST = 0;
}
/** Determines if the specified endpoint number has interrupted (valid only for INTERRUPT type
* endpoints).
*
- * \param[in] EndpointNumber Index of the endpoint whose interrupt flag should be tested.
+ * \param[in] Address Address of the endpoint whose interrupt flag should be tested.
*
* \return Boolean \c true if the specified endpoint has interrupted, \c false otherwise.
*/
- static inline bool Endpoint_HasEndpointInterrupted(const uint8_t EndpointNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline bool Endpoint_HasEndpointInterrupted(const uint8_t EndpointNumber)
+ static inline bool Endpoint_HasEndpointInterrupted(const uint8_t Address) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline bool Endpoint_HasEndpointInterrupted(const uint8_t Address)
{
- return ((Endpoint_GetEndpointInterrupts() & (1 << EndpointNumber)) ? true : false);
+ return ((Endpoint_GetEndpointInterrupts() & (1 << (Address & ENDPOINT_EPNUM_MASK))) ? true : false);
}
/** Determines if the selected IN endpoint is ready for a new packet to be sent to the host.
UECONX |= (1 << RSTDT);
}
- /** Determines the currently selected endpoint's direction.
- *
- * \return The currently selected endpoint's direction, as a \c ENDPOINT_DIR_* mask.
- */
- static inline uint8_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline uint8_t Endpoint_GetEndpointDirection(void)
- {
- return (UECFG0X & (1 << EPDIR)) ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT;
- }
-
/** Sets the direction of the currently selected endpoint.
*
* \param[in] DirectionMask New endpoint direction, as a \c ENDPOINT_DIR_* mask.
#endif
/* Function Prototypes: */
+ /** Configures a table of endpoint descriptions, in sequence. This function can be used to configure multiple
+ * endpoints at the same time.
+ *
+ * \note Endpoints with a zero address will be ignored, thus this function cannot be used to configure the
+ * control endpoint.
+ *
+ * \param[in] Table Pointer to a table of endpoint descriptions.
+ * \param[in] Entries Number of entries in the endpoint table to configure.
+ *
+ * \return Boolean \c true if all endpoints configured successfully, \c false otherwise.
+ */
+ bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table,
+ const uint8_t Entries);
+
/** Completes the status stage of a control transfer on a CONTROL type endpoint automatically,
* with respect to the data direction. This is a convenience function which can be used to
* simplify user control request handling.
HOST_TASK_NONBLOCK_WAIT(200, HOST_STATE_Powered_ConfigPipe);
break;
case HOST_STATE_Powered_ConfigPipe:
- if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
- PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
- PIPE_CONTROLPIPE_DEFAULT_SIZE, PIPE_BANK_SINGLE)))
+ if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL, ENDPOINT_CONTROLEP, PIPE_CONTROLPIPE_DEFAULT_SIZE, 1)))
{
ErrorCode = HOST_ENUMERROR_PipeConfigError;
SubErrorCode = 0;
HOST_TASK_NONBLOCK_WAIT(200, HOST_STATE_Default_PostReset);
break;
case HOST_STATE_Default_PostReset:
- if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
- PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
- USB_Host_ControlPipeSize, PIPE_BANK_SINGLE)))
+ if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL, ENDPOINT_CONTROLEP, USB_Host_ControlPipeSize, 1)))
{
ErrorCode = HOST_ENUMERROR_PipeConfigError;
SubErrorCode = 0;
uint8_t USB_Host_ControlPipeSize = PIPE_CONTROLPIPE_DEFAULT_SIZE;
-bool Pipe_ConfigurePipe(const uint8_t Number,
+bool Pipe_ConfigurePipeTable(const USB_Pipe_Table_t* const Table,
+ const uint8_t Entries)
+{
+ for (uint8_t i = 0; i < Entries; i++)
+ {
+ if (!(Table[i].Address))
+ continue;
+
+ if (!(Pipe_ConfigurePipe(Table[i].Address, Table[i].Type, Table[i].EndpointAddress, Table[i].Size, Table[i].Banks)))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool Pipe_ConfigurePipe(const uint8_t Address,
const uint8_t Type,
- const uint8_t Token,
- const uint8_t EndpointNumber,
+ const uint8_t EndpointAddress,
const uint16_t Size,
const uint8_t Banks)
{
+ uint8_t Number = (Address & PIPE_EPNUM_MASK);
+ uint8_t Token = (Address & PIPE_DIR_IN) ? PIPE_TOKEN_IN : PIPE_TOKEN_OUT;
+
+ if (Type == EP_TYPE_CONTROL)
+ Token = PIPE_TOKEN_SETUP;
+
#if defined(ORDERED_EP_CONFIG)
Pipe_SelectPipe(Number);
Pipe_EnablePipe();
UPCFG1X = 0;
- UPCFG0X = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
- UPCFG1X = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
+ UPCFG0X = ((Type << EPTYPE0) | Token | ((EndpointAddress & PIPE_EPNUM_MASK) << PEPNUM0));
+ UPCFG1X = ((1 << ALLOC) | ((Banks > 1) ? (1 << EPBK0) : 0) | Pipe_BytesToEPSizeMask(Size));
Pipe_SetInfiniteINRequests();
if (PNum == Number)
{
- UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
+ UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointAddress & PIPE_EPNUM_MASK) << PEPNUM0));
UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
UPCFG2XTemp = 0;
UPIENXTemp = 0;
/** \name Pipe Token Masks */
//@{
- /** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a SETUP token (for CONTROL type pipes),
+ /** Token mask for \ref Pipe_SetPipeToken() and \ref Pipe_GetPipeToken(). This sets the pipe as a SETUP token (for CONTROL type pipes),
* which will trigger a control request on the attached device when data is written to the pipe.
*/
#define PIPE_TOKEN_SETUP (0 << PTOKEN0)
- /** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
+ /** Token mask for \ref Pipe_SetPipeToken() and \ref Pipe_GetPipeToken(). This sets the pipe as a IN token (for non-CONTROL type pipes),
* indicating that the pipe data will flow from device to host.
*/
#define PIPE_TOKEN_IN (1 << PTOKEN0)
- /** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a OUT token (for non-CONTROL type pipes),
+ /** Token mask for \ref Pipe_SetPipeToken() and \ref Pipe_GetPipeToken(). This sets the pipe as a OUT token (for non-CONTROL type pipes),
* indicating that the pipe data will flow from host to device.
*/
#define PIPE_TOKEN_OUT (2 << PTOKEN0)
//@}
- /** \name Pipe Bank Mode Masks */
- //@{
- /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
- * should have one single bank, which requires less USB FIFO memory but results in slower transfers as
- * only one USB device (the AVR or the attached device) can access the pipe's bank at the one time.
- */
- #define PIPE_BANK_SINGLE (0 << EPBK0)
-
- /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
- * should have two banks, which requires more USB FIFO memory but results in faster transfers as one
- * USB device (the AVR or the attached device) can access one bank while the other accesses the second
- * bank.
- */
- #define PIPE_BANK_DOUBLE (1 << EPBK0)
- //@}
-
/** Default size of the default control pipe's bank, until altered by the Endpoint0Size value
* in the device descriptor of the attached device.
*/
return UPBCX;
}
+ /** Determines the currently selected pipe's direction.
+ *
+ * \return The currently selected pipe's direction, as a \c PIPE_DIR_* mask.
+ */
+ static inline uint8_t Pipe_GetPipeDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline uint8_t Pipe_GetPipeDirection(void)
+ {
+ return (UPCFG0X & (1 << EPDIR)) ? PIPE_DIR_IN : PIPE_DIR_OUT;
+ }
+
/** Returns the pipe address of the currently selected pipe. This is typically used to save the
- * currently selected pipe number so that it can be restored after another pipe has been manipulated.
+ * currently selected pipe address so that it can be restored after another pipe has been manipulated.
*
* \return Index of the currently selected pipe.
*/
static inline uint8_t Pipe_GetCurrentPipe(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetCurrentPipe(void)
{
- return (UPNUM & PIPE_PIPENUM_MASK);
+ return ((UPNUM & PIPE_PIPENUM_MASK) | Pipe_GetPipeDirection());
}
- /** Selects the given pipe number. Any pipe operations which do not require the pipe number to be
+ /** Selects the given pipe address. Any pipe operations which do not require the pipe address to be
* indicated will operate on the currently selected pipe.
*
- * \param[in] PipeNumber Index of the pipe to select.
+ * \param[in] Address Address of the pipe to select.
*/
- static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
- static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
+ static inline void Pipe_SelectPipe(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Pipe_SelectPipe(const uint8_t Address)
{
- UPNUM = PipeNumber;
+ UPNUM = (Address & PIPE_PIPENUM_MASK);
}
/** Resets the desired pipe, including the pipe banks and flags.
*
- * \param[in] PipeNumber Index of the pipe to reset.
+ * \param[in] Address Address of the pipe to reset.
*/
- static inline void Pipe_ResetPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
- static inline void Pipe_ResetPipe(const uint8_t PipeNumber)
+ static inline void Pipe_ResetPipe(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Pipe_ResetPipe(const uint8_t Address)
{
- UPRST = (1 << PipeNumber);
+ UPRST = (1 << (Address & PIPE_PIPENUM_MASK));
UPRST = 0;
}
static inline uint8_t Pipe_GetBoundEndpointAddress(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetBoundEndpointAddress(void)
{
- return (((UPCFG0X >> PEPNUM0) & PIPE_EPNUM_MASK) |
- ((Pipe_GetPipeToken() == PIPE_TOKEN_IN) ? PIPE_EPDIR_MASK : 0));
+ uint8_t UPCFG0X_Temp = UPCFG0X;
+
+ return (((UPCFG0X_Temp >> PEPNUM0) & PIPE_EPNUM_MASK) | ((UPCFG0X_Temp & PEPNUM1) ? ENDPOINT_DIR_OUT : ENDPOINT_DIR_IN));
}
/** Sets the period between interrupts for an INTERRUPT type pipe to a specified number of milliseconds.
return UPINT;
}
- /** Determines if the specified pipe number has interrupted (valid only for INTERRUPT type
+ /** Determines if the specified pipe address has interrupted (valid only for INTERRUPT type
* pipes).
*
- * \param[in] PipeNumber Index of the pipe whose interrupt flag should be tested.
+ * \param[in] Address Address of the pipe whose interrupt flag should be tested.
*
* \return Boolean \c true if the specified pipe has interrupted, \c false otherwise.
*/
- static inline bool Pipe_HasPipeInterrupted(const uint8_t PipeNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline bool Pipe_HasPipeInterrupted(const uint8_t PipeNumber)
+ static inline bool Pipe_HasPipeInterrupted(const uint8_t Address) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline bool Pipe_HasPipeInterrupted(const uint8_t Address)
{
- return ((UPINT & (1 << PipeNumber)) ? true : false);
+ return ((UPINT & (1 << (Address & PIPE_PIPENUM_MASK))) ? true : false);
}
/** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
extern uint8_t USB_Host_ControlPipeSize;
/* Function Prototypes: */
- /** Configures the specified pipe number with the given pipe type, token, target endpoint number in the
- * attached device, bank size and banking mode.
+ /** Configures a table of pipe descriptions, in sequence. This function can be used to configure multiple
+ * pipes at the same time.
+ *
+ * \note Pipe with a zero address will be ignored, thus this function cannot be used to configure the
+ * control pipe.
+ *
+ * \param[in] Table Pointer to a table of pipe descriptions.
+ * \param[in] Entries Number of entries in the pipe table to configure.
+ *
+ * \return Boolean \c true if all pipes configured successfully, \c false otherwise.
+ */
+ bool Pipe_ConfigurePipeTable(const USB_Pipe_Table_t* const Table,
+ const uint8_t Entries);
+
+ /** Configures the specified pipe address with the given pipe type, endpoint address within the attached device, bank size
+ * and number of hardware banks.
*
* A newly configured pipe is frozen by default, and must be unfrozen before use via the \ref Pipe_Unfreeze()
* before being used. Pipes should be kept frozen unless waiting for data from a device while in IN mode, or
* numbers of IN requests without automatic freezing - this can be overridden by a call to
* \ref Pipe_SetFiniteINRequests().
*
- * \param[in] Number Pipe number to configure. This must be more than 0 and less than \ref PIPE_TOTAL_PIPES.
- *
- * \param[in] Type Type of pipe to configure, an \c EP_TYPE_* mask. Not all pipe types are available on Low
- * Speed USB devices - refer to the USB 2.0 specification.
+ * \param[in] Address Pipe address to configure.
*
- * \param[in] Token Pipe data token, either \ref PIPE_TOKEN_SETUP, \ref PIPE_TOKEN_OUT or \ref PIPE_TOKEN_IN.
- * All pipes (except Control type) are unidirectional - data may only be read from or
- * written to the pipe bank based on its direction, not both.
+ * \param[in] Type Type of pipe to configure, an \c EP_TYPE_* mask. Not all pipe types are available on Low
+ * Speed USB devices - refer to the USB 2.0 specification.
*
- * \param[in] EndpointNumber Endpoint index within the attached device that the pipe should interface to.
+ * \param[in] EndpointAddress Endpoint address within the attached device that the pipe should interface to.
*
- * \param[in] Size Size of the pipe's bank, where packets are stored before they are transmitted to
- * the USB device, or after they have been received from the USB device (depending on
- * the pipe's data direction). The bank size must indicate the maximum packet size that
- * the pipe can handle.
+ * \param[in] Size Size of the pipe's bank, where packets are stored before they are transmitted to
+ * the USB device, or after they have been received from the USB device (depending on
+ * the pipe's data direction). The bank size must indicate the maximum packet size that
+ * the pipe can handle.
*
- * \param[in] Banks Number of banks to use for the pipe being configured, a \c PIPE_BANK_* mask. More banks
- * uses more USB DPRAM, but offers better performance. Isochronous type pipes <b>must</b>
- * have at least two banks.
+ * \param[in] Banks Number of banks to use for the pipe being configured.
*
* \attention When the \c ORDERED_EP_CONFIG compile time option is used, Pipes <b>must</b> be configured in ascending order,
* or bank corruption will occur.
*
* \return Boolean \c true if the configuration succeeded, \c false otherwise.
*/
- bool Pipe_ConfigurePipe(const uint8_t Number,
+ bool Pipe_ConfigurePipe(const uint8_t Address,
const uint8_t Type,
- const uint8_t Token,
- const uint8_t EndpointNumber,
+ const uint8_t EndpointAddress,
const uint16_t Size,
const uint8_t Banks);
#endif
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
- ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,
- ENDPOINT_BANK_SINGLE);
+ USB_Device_ControlEndpointSize, 1);
USB_INT_Clear(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_WAKEUPI);
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
- ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,
- ENDPOINT_BANK_SINGLE);
+ USB_Device_ControlEndpointSize, 1);
#if defined(INTERRUPT_CONTROL_ENDPOINT)
USB_INT_Enable(USB_INT_RXSTPI);
switch (USB_ControlRequest.bmRequestType)
{
- #if !defined(NO_DEVICE_SELF_POWER) || !defined(NO_DEVICE_REMOTE_WAKEUP)
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE):
#if !defined(NO_DEVICE_SELF_POWER)
if (USB_Device_CurrentlySelfPowered)
CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;
#endif
break;
- #endif
- #if !defined(CONTROL_ONLY_DEVICE)
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT):
+ #if !defined(CONTROL_ONLY_DEVICE)
Endpoint_SelectEndpoint((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK);
CurrentStatus = Endpoint_IsStalled();
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
+ #endif
break;
- #endif
default:
return;
}
#endif
/* Public Interface - May be used in end-application: */
+ /* Type Defines: */
+ /** Type define for a endpoint table entry, used to configure endpoints in groups via
+ * \ref Endpoint_ConfigureEndpointTable().
+ */
+ typedef struct
+ {
+ uint8_t Address; /**< Address of the endpoint to configure, or zero if the table entry is to be unused. */
+ uint16_t Size; /**< Size of the endpoint bank, in bytes. */
+ uint8_t Type; /**< Type of the endpoint, a \c EP_TYPE_* mask. */
+ uint8_t Banks; /**< Number of hardware banks to use for the endpoint. */
+ } USB_Endpoint_Table_t;
+
/* Macros: */
/** Endpoint number mask, for masking against endpoint addresses to retrieve the endpoint's
* numerical address in the device.
#endif
/* Public Interface - May be used in end-application: */
+ /* Type Defines: */
+ /** Type define for a pipe table entry, used to configure pipes in groups via
+ * \ref Pipe_ConfigurePipeTable().
+ */
+ typedef struct
+ {
+ uint8_t Address; /**< Address of the pipe to configure, or zero if the table entry is to be unused. */
+ uint16_t Size; /**< Size of the pipe bank, in bytes. */
+ uint8_t EndpointAddress; /** Address of the endpoint in the connected device. */
+ uint8_t Type; /**< Type of the endpoint, a \c EP_TYPE_* mask. */
+ uint8_t Banks; /**< Number of hardware banks to use for the pipe. */
+ } USB_Pipe_Table_t;
+
/* Macros: */
/** Pipe address for the default control pipe, which always resides in address 0. This is
* defined for convenience to give more readable code when used with the pipe macros.
*/
#define PIPE_EPNUM_MASK 0x0F
- /** Endpoint direction mask, for masking against endpoint addresses to retrieve the endpoint's
- * direction for comparing with the \c ENDPOINT_DIR_* masks.
- */
- #define PIPE_EPDIR_MASK 0x80
-
/* Architecture Includes: */
#if (ARCH == ARCH_AVR8)
#include "AVR8/Pipe_AVR8.h"
*
* \param[in] x Version number to encode as a 16-bit little-endian number, as a floating point number.
*/
- #define VERSION_BCD(x) CPU_TO_LE16((((VERSION_TENS(x) << 4) | VERSION_ONES(x)) << 8) | \
- ((VERSION_TENTHS(x) << 4) | VERSION_HUNDREDTHS(x)))
+ #define VERSION_BCD(x) CPU_TO_LE16((VERSION_TENS(x) << 12) | (VERSION_ONES(x) << 8) | \
+ (VERSION_TENTHS(x) << 4) | (VERSION_HUNDREDTHS(x) << 0) )
/** String language ID for the English language. Should be used in \ref USB_Descriptor_String_t descriptors
* to indicate that the English language is supported by the device in its string descriptors.
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
- #define VERSION_TENS(x) (int)((x) / 10)
- #define VERSION_ONES(x) (int)((x) - (10 * VERSION_TENS(x)))
- #define VERSION_TENTHS(x) (int)(((x) - (int)(x)) * 10)
- #define VERSION_HUNDREDTHS(x) (int)((((x) - (int)(x)) * 100) - (10 * VERSION_TENTHS(x)))
+ #define VERSION_TENS(x) (int)((int)(x) / 10)
+ #define VERSION_ONES(x) (int)((int)(x) % 10)
+ #define VERSION_TENTHS(x) (int)(((x * 1) - ((int)(x * 1))) * 10)
+ #define VERSION_HUNDREDTHS(x) (int)(((x * 10) - ((int)(x * 10))) * 10)
#endif
/* Disable C linkage for C++ Compilers: */
volatile uint32_t USB_Endpoint_SelectedEndpoint = ENDPOINT_CONTROLEP;
volatile uint8_t* USB_Endpoint_FIFOPos[ENDPOINT_TOTAL_ENDPOINTS];
+bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table,
+ const uint8_t Entries)
+{
+ for (uint8_t i = 0; i < Entries; i++)
+ {
+ if (!(Table[i].Address))
+ continue;
+
+ if (!(Endpoint_ConfigureEndpoint(Table[i].Address, Table[i].Type, Table[i].Size, Table[i].Banks)))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
const uint32_t UECFG0Data)
{
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
- #define _ENDPOINT_GET_MAXSIZE(EPIndex) _ENDPOINT_GET_MAXSIZE2(ENDPOINT_DETAILS_EP ## EPIndex)
- #define _ENDPOINT_GET_MAXSIZE2(EPDetails) _ENDPOINT_GET_MAXSIZE3(EPDetails)
- #define _ENDPOINT_GET_MAXSIZE3(MaxSize, Banks) (MaxSize)
-
- #define _ENDPOINT_GET_BANKS(EPIndex) _ENDPOINT_GET_BANKS2(ENDPOINT_DETAILS_EP ## EPIndex)
- #define _ENDPOINT_GET_BANKS2(EPDetails) _ENDPOINT_GET_BANKS3(EPDetails)
- #define _ENDPOINT_GET_BANKS3(MaxSize, Banks) (Banks)
-
- #if defined(USB_SERIES_UC3A0_AVR32) || defined(USB_SERIES_UC3A1_AVR32)
- #define ENDPOINT_DETAILS_MAXEP 7
-
- #define ENDPOINT_DETAILS_EP0 64, 1
- #define ENDPOINT_DETAILS_EP1 256, 2
- #define ENDPOINT_DETAILS_EP2 256, 2
- #define ENDPOINT_DETAILS_EP3 64, 2
- #define ENDPOINT_DETAILS_EP4 64, 2
- #define ENDPOINT_DETAILS_EP5 256, 2
- #define ENDPOINT_DETAILS_EP6 256, 2
- #elif defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32)
- #define ENDPOINT_DETAILS_MAXEP 8
-
- #define ENDPOINT_DETAILS_EP0 64, 1
- #define ENDPOINT_DETAILS_EP1 512, 3
- #define ENDPOINT_DETAILS_EP2 512, 3
- #define ENDPOINT_DETAILS_EP3 512, 3
- #define ENDPOINT_DETAILS_EP4 512, 3
- #define ENDPOINT_DETAILS_EP5 512, 3
- #define ENDPOINT_DETAILS_EP6 512, 3
- #define ENDPOINT_DETAILS_EP7 512, 3
- #elif defined(USB_SERIES_UC3B0_AVR32) || defined(USB_SERIES_UC3B1_AVR32)
- #define ENDPOINT_DETAILS_MAXEP 7
-
- #define ENDPOINT_DETAILS_EP0 64, 1
- #define ENDPOINT_DETAILS_EP1 64, 2
- #define ENDPOINT_DETAILS_EP2 64, 2
- #define ENDPOINT_DETAILS_EP3 64, 2
- #define ENDPOINT_DETAILS_EP4 64, 2
- #define ENDPOINT_DETAILS_EP5 256, 2
- #define ENDPOINT_DETAILS_EP6 256, 2
- #endif
-
#define ENDPOINT_HSB_ADDRESS_SPACE_SIZE (64 * 1024UL)
/* Inline Functions: */
/* Public Interface - May be used in end-application: */
/* Macros: */
- /** \name Endpoint Bank Mode Masks */
- //@{
- /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
- * that the endpoint should have one single bank, which requires less USB FIFO memory but results
- * in slower transfers as only one USB device (the AVR or the host) can access the endpoint's
- * bank at the one time.
- */
- #define ENDPOINT_BANK_SINGLE AVR32_USBB_UECFG0_EPBK_SINGLE
-
- /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
- * that the endpoint should have two banks, which requires more USB FIFO memory but results
- * in faster transfers as one USB device (the AVR or the host) can access one bank while the other
- * accesses the second bank.
- */
- #define ENDPOINT_BANK_DOUBLE AVR32_USBB_UECFG0_EPBK_DOUBLE
-
- #if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || defined(__DOXYGEN__)
- /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
- * that the endpoint should have three banks, which requires more USB FIFO memory but results
- * in faster transfers as one USB device (the AVR or the host) can access one bank while the other
- * accesses the remaining banks.
- *
- * \note Not available on all AVR models.
- */
- #define ENDPOINT_BANK_TRIPLE AVR32_USBB_UECFG0_EPBK_TRIPLE
- #endif
- //@}
-
#if (!defined(FIXED_CONTROL_ENDPOINT_SIZE) || defined(__DOXYGEN__))
/** Default size of the default control endpoint's bank, until altered by the control endpoint bank size
* value in the device descriptor. Not available if the \c FIXED_CONTROL_ENDPOINT_SIZE token is defined.
#define ENDPOINT_CONTROLEP_DEFAULT_SIZE 8
#endif
- /** Retrieves the maximum bank size in bytes of a given endpoint.
- *
- * \attention This macro will only work correctly on endpoint indexes that are compile-time constants
- * defined by the preprocessor.
- *
- * \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
- */
- #define ENDPOINT_MAX_SIZE(EPIndex) _ENDPOINT_GET_MAXSIZE(EPIndex)
-
- /** Retrieves the total number of banks supported by the given endpoint.
- *
- * \attention This macro will only work correctly on endpoint indexes that are compile-time constants
- * defined by the preprocessor.
- *
- * \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
- */
- #define ENDPOINT_BANKS_SUPPORTED(EPIndex) _ENDPOINT_GET_BANKS(EPIndex)
-
#if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__)
- /** Total number of endpoints (including the default control endpoint at address 0) which may
- * be used in the device. Different AVR models support different amounts of endpoints,
- * this value reflects the maximum number of endpoints for the currently selected AVR model.
- */
- #define ENDPOINT_TOTAL_ENDPOINTS ENDPOINT_DETAILS_MAXEP
+ #if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32)
+ #define ENDPOINT_TOTAL_ENDPOINTS 8
+ #else
+ /** Total number of endpoints (including the default control endpoint at address 0) which may
+ * be used in the device. Different AVR models support different amounts of endpoints,
+ * this value reflects the maximum number of endpoints for the currently selected AVR model.
+ */
+ #define ENDPOINT_TOTAL_ENDPOINTS 7
+ #endif
#else
#define ENDPOINT_TOTAL_ENDPOINTS 1
#endif
};
/* Inline Functions: */
- /** Configures the specified endpoint number with the given endpoint type, direction, bank size
+ /** Configures the specified endpoint address with the given endpoint type, direction, bank size
* and banking mode. Once configured, the endpoint may be read from or written to, depending
* on its direction.
*
- * \param[in] Number Endpoint number to configure. This must be more than 0 and less than
- * \ref ENDPOINT_TOTAL_ENDPOINTS.
+ * \param[in] Address Endpoint address to configure.
*
* \param[in] Type Type of endpoint to configure, a \c EP_TYPE_* mask. Not all endpoint types
* are available on Low Speed USB devices - refer to the USB 2.0 specification.
*
- * \param[in] Direction Endpoint data direction, either \ref ENDPOINT_DIR_OUT or \ref ENDPOINT_DIR_IN.
- * All endpoints (except Control type) are unidirectional - data may only be read
- * from or written to the endpoint bank based on its direction, not both.
- *
* \param[in] Size Size of the endpoint's bank, where packets are stored before they are transmitted
* to the USB host, or after they have been received from the USB host (depending on
* the endpoint's data direction). The bank size must indicate the maximum packet size
* that the endpoint can handle.
*
- * \param[in] Banks Number of banks to use for the endpoint being configured, an \c ENDPOINT_BANK_* mask.
- * More banks uses more USB DPRAM, but offers better performance. Isochronous type
- * endpoints <b>must</b> have at least two banks.
+ * \param[in] Banks Number of hardware banks to use for the endpoint being configured.
*
* \attention When the \c ORDERED_EP_CONFIG compile time option is used, Endpoints <b>must</b> be configured in
* ascending order, or bank corruption will occur.
*
* \return Boolean \c true if the configuration succeeded, \c false otherwise.
*/
- static inline bool Endpoint_ConfigureEndpoint(const uint8_t Number,
+ static inline bool Endpoint_ConfigureEndpoint(const uint8_t Address,
const uint8_t Type,
- const uint8_t Direction,
const uint16_t Size,
const uint8_t Banks) ATTR_ALWAYS_INLINE;
- static inline bool Endpoint_ConfigureEndpoint(const uint8_t Number,
+ static inline bool Endpoint_ConfigureEndpoint(const uint8_t Address,
const uint8_t Type,
- const uint8_t Direction,
const uint16_t Size,
const uint8_t Banks)
{
- return Endpoint_ConfigureEndpoint_Prv(Number, (AVR32_USBB_ALLOC_MASK |
- ((uint32_t)Type << AVR32_USBB_EPTYPE_OFFSET) |
- ((uint32_t)(Direction ? AVR32_USBB_UECFG0_EPDIR_MASK : 0) |
- ((uint32_t)Banks << AVR32_USBB_EPBK_OFFSET) |
- Endpoint_BytesToEPSizeMask(Size))));
+ return Endpoint_ConfigureEndpoint_Prv((Address & ENDPOINT_EPNUM_MASK),
+ (AVR32_USBB_ALLOC_MASK |
+ ((uint32_t)Type << AVR32_USBB_EPTYPE_OFFSET) |
+ ((uint32_t)(Address & ENDPOINT_DIR_IN) ? AVR32_USBB_UECFG0_EPDIR_MASK : 0) |
+ ((uint32_t)Banks << AVR32_USBB_EPBK_OFFSET) |
+ Endpoint_BytesToEPSizeMask(Size)));
}
/** Indicates the number of bytes currently stored in the current endpoint's selected bank.
return (&AVR32_USBB.UESTA0)[USB_Endpoint_SelectedEndpoint].byct;
}
+ /** Determines the currently selected endpoint's direction.
+ *
+ * \return The currently selected endpoint's direction, as a \c ENDPOINT_DIR_* mask.
+ */
+ static inline uint32_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline uint32_t Endpoint_GetEndpointDirection(void)
+ {
+ return ((&AVR32_USBB.UECFG0)[USB_Endpoint_SelectedEndpoint].epdir ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT);
+ }
+
/** Get the endpoint address of the currently selected endpoint. This is typically used to save
- * the currently selected endpoint number so that it can be restored after another endpoint has
- * been manipulated.
+ * the currently selected endpoint so that it can be restored after another endpoint has been
+ * manipulated.
*
* \return Index of the currently selected endpoint.
*/
static inline uint8_t Endpoint_GetCurrentEndpoint(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Endpoint_GetCurrentEndpoint(void)
{
- return USB_Endpoint_SelectedEndpoint;
+ return (USB_Endpoint_SelectedEndpoint | Endpoint_GetEndpointDirection());
}
- /** Selects the given endpoint number. If the address from the device descriptors is used, the
- * value should be masked with the \ref ENDPOINT_EPNUM_MASK constant to extract only the endpoint
- * number (and discarding the endpoint direction bit).
+ /** Selects the given endpoint address.
*
- * Any endpoint operations which do not require the endpoint number to be indicated will operate on
+ * Any endpoint operations which do not require the endpoint address to be indicated will operate on
* the currently selected endpoint.
*
- * \param[in] EndpointNumber Endpoint number to select.
+ * \param[in] Address Endpoint address to select.
*/
- static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE;
- static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber)
+ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Endpoint_SelectEndpoint(const uint8_t Address)
{
- USB_Endpoint_SelectedEndpoint = EndpointNumber;
+ USB_Endpoint_SelectedEndpoint = (Address & ENDPOINT_EPNUM_MASK);
}
/** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's
* data In and Out pointers to the bank's contents.
*
- * \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset.
+ * \param[in] Address Endpoint number whose FIFO buffers are to be reset.
*/
- static inline void Endpoint_ResetEndpoint(const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE;
- static inline void Endpoint_ResetEndpoint(const uint8_t EndpointNumber)
+ static inline void Endpoint_ResetEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Endpoint_ResetEndpoint(const uint8_t Address)
{
+ uint32_t EndpointNumber = (Address & ENDPOINT_EPNUM_MASK);
+
AVR32_USBB.uerst |= (AVR32_USBB_EPRST0_MASK << EndpointNumber);
AVR32_USBB.uerst &= ~(AVR32_USBB_EPRST0_MASK << EndpointNumber);
USB_Endpoint_FIFOPos[EndpointNumber] = &AVR32_USBB_SLAVE[EndpointNumber * ENDPOINT_HSB_ADDRESS_SPACE_SIZE];
*
* \return Mask whose bits indicate which endpoints have interrupted.
*/
- static inline uint8_t Endpoint_GetEndpointInterrupts(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline uint8_t Endpoint_GetEndpointInterrupts(void)
+ static inline uint32_t Endpoint_GetEndpointInterrupts(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline uint32_t Endpoint_GetEndpointInterrupts(void)
{
return ((AVR32_USBB.udint & (AVR32_USBB_EP6INT_MASK | AVR32_USBB_EP5INT_MASK |
AVR32_USBB_EP4INT_MASK | AVR32_USBB_EP3INT_MASK |
/** Determines if the specified endpoint number has interrupted (valid only for INTERRUPT type
* endpoints).
*
- * \param[in] EndpointNumber Index of the endpoint whose interrupt flag should be tested.
+ * \param[in] Address Address of the endpoint whose interrupt flag should be tested.
*
* \return Boolean \c true if the specified endpoint has interrupted, \c false otherwise.
*/
- static inline bool Endpoint_HasEndpointInterrupted(const uint8_t EndpointNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline bool Endpoint_HasEndpointInterrupted(const uint8_t EndpointNumber)
+ static inline bool Endpoint_HasEndpointInterrupted(const uint8_t Address) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline bool Endpoint_HasEndpointInterrupted(const uint8_t Address)
{
- return ((Endpoint_GetEndpointInterrupts() & (AVR32_USBB_EP0INT_MASK << EndpointNumber)) ? true : false);
+ return ((Endpoint_GetEndpointInterrupts() & (AVR32_USBB_EP0INT_MASK << (Address & ENDPOINT_EPNUM_MASK))) ? true : false);
}
/** Determines if the selected IN endpoint is ready for a new packet to be sent to the host.
(&AVR32_USBB.UECON0SET)[USB_Endpoint_SelectedEndpoint].rstdts = true;
}
- /** Determines the currently selected endpoint's direction.
- *
- * \return The currently selected endpoint's direction, as a \c ENDPOINT_DIR_* mask.
- */
- static inline uint32_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline uint32_t Endpoint_GetEndpointDirection(void)
- {
- return ((&AVR32_USBB.UECFG0)[USB_Endpoint_SelectedEndpoint].epdir ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT);
- }
-
/** Sets the direction of the currently selected endpoint.
*
* \param[in] DirectionMask New endpoint direction, as a \c ENDPOINT_DIR_* mask.
#endif
/* Function Prototypes: */
+ /** Configures a table of endpoint descriptions, in sequence. This function can be used to configure multiple
+ * endpoints at the same time.
+ *
+ * \note Endpoints with a zero address will be ignored, thus this function cannot be used to configure the
+ * control endpoint.
+ *
+ * \param[in] Table Pointer to a table of endpoint descriptions.
+ * \param[in] Entries Number of entries in the endpoint table to configure.
+ *
+ * \return Boolean \c true if all endpoints configured successfully, \c false otherwise.
+ */
+ bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table,
+ const uint8_t Entries);
+
/** Completes the status stage of a control transfer on a CONTROL type endpoint automatically,
* with respect to the data direction. This is a convenience function which can be used to
* simplify user control request handling.
HOST_TASK_NONBLOCK_WAIT(200, HOST_STATE_Powered_ConfigPipe);
break;
case HOST_STATE_Powered_ConfigPipe:
- if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
- PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
- PIPE_CONTROLPIPE_DEFAULT_SIZE, PIPE_BANK_SINGLE)))
+ if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL, ENDPOINT_CONTROLEP, PIPE_CONTROLPIPE_DEFAULT_SIZE, 1)))
{
ErrorCode = HOST_ENUMERROR_PipeConfigError;
SubErrorCode = 0;
HOST_TASK_NONBLOCK_WAIT(200, HOST_STATE_Default_PostReset);
break;
case HOST_STATE_Default_PostReset:
- if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
- PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
- USB_Host_ControlPipeSize, PIPE_BANK_SINGLE)))
+ if (!(Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL, ENDPOINT_CONTROLEP, USB_Host_ControlPipeSize, 1)))
{
ErrorCode = HOST_ENUMERROR_PipeConfigError;
SubErrorCode = 0;
volatile uint32_t USB_Pipe_SelectedPipe = PIPE_CONTROLPIPE;
volatile uint8_t* USB_Pipe_FIFOPos[PIPE_TOTAL_PIPES];
-bool Pipe_ConfigurePipe(const uint8_t Number,
+bool Pipe_ConfigurePipeTable(const USB_Pipe_Table_t* const Table,
+ const uint8_t Entries)
+{
+ for (uint8_t i = 0; i < Entries; i++)
+ {
+ if (!(Table[i].Address))
+ continue;
+
+ if (!(Pipe_ConfigurePipe(Table[i].Address, Table[i].Type, Table[i].EndpointAddress, Table[i].Size, Table[i].Banks)))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool Pipe_ConfigurePipe(const uint8_t Address,
const uint8_t Type,
- const uint8_t Token,
- const uint8_t EndpointNumber,
+ const uint8_t EndpointAddress,
const uint16_t Size,
const uint8_t Banks)
{
+ uint8_t Number = (Address & PIPE_EPNUM_MASK);
+ uint8_t Token = (Address & PIPE_DIR_IN) ? PIPE_TOKEN_IN : PIPE_TOKEN_OUT;
+
+ if (Type == EP_TYPE_CONTROL)
+ Token = PIPE_TOKEN_SETUP;
+
USB_Pipe_FIFOPos[Number] = &AVR32_USBB_SLAVE[Number * 0x10000];
#if defined(ORDERED_EP_CONFIG)
(&AVR32_USBB.upcfg0)[Number] = (AVR32_USBB_ALLOC_MASK |
((uint32_t)Type << AVR32_USBB_PTYPE_OFFSET) |
((uint32_t)Token << AVR32_USBB_PTOKEN_OFFSET) |
- ((uint32_t)Banks << AVR32_USBB_PBK_OFFSET) |
+ ((Banks > 1) ? AVR32_USBB_PBK_MASK : 0) |
Pipe_BytesToEPSizeMask(Size) |
((EndpointNumber & PIPE_EPNUM_MASK) << AVR32_USBB_PEPNUM_OFFSET));
UPCFG0Temp = (AVR32_USBB_ALLOC_MASK |
((uint32_t)Type << AVR32_USBB_PTYPE_OFFSET) |
((uint32_t)Token << AVR32_USBB_PTOKEN_OFFSET) |
- ((uint32_t)Banks << AVR32_USBB_PBK_OFFSET) |
+ ((Banks > 1) ? AVR32_USBB_PBK_MASK : 0) |
Pipe_BytesToEPSizeMask(Size) |
- ((EndpointNumber & PIPE_EPNUM_MASK) << AVR32_USBB_PEPNUM_OFFSET));
+ ((EndpointAddress & PIPE_EPNUM_MASK) << AVR32_USBB_PEPNUM_OFFSET));
}
else
{
/** \name Pipe Token Masks */
//@{
- /** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a SETUP token (for CONTROL type pipes),
+ /** Token mask for \ref Pipe_SetPipeToken() and \ref Pipe_GetPipeToken(). This sets the pipe as a SETUP token (for CONTROL type pipes),
* which will trigger a control request on the attached device when data is written to the pipe.
*/
#define PIPE_TOKEN_SETUP AVR32_USBB_UPCFG0_PTOKEN_SETUP
- /** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),
+ /** Token mask for \ref Pipe_SetPipeToken() and \ref Pipe_GetPipeToken(). This sets the pipe as a IN token (for non-CONTROL type pipes),
* indicating that the pipe data will flow from device to host.
*/
#define PIPE_TOKEN_IN AVR32_USBB_UPCFG0_PTOKEN_IN
- /** Token mask for \ref Pipe_ConfigurePipe(). This sets the pipe as a OUT token (for non-CONTROL type pipes),
+ /** Token mask for \ref Pipe_SetPipeToken() and \ref Pipe_GetPipeToken(). This sets the pipe as a OUT token (for non-CONTROL type pipes),
* indicating that the pipe data will flow from host to device.
*/
#define PIPE_TOKEN_OUT AVR32_USBB_UPCFG0_PTOKEN_OUT
//@}
- /** \name Pipe Bank Mode Masks */
- //@{
- /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
- * should have one single bank, which requires less USB FIFO memory but results in slower transfers as
- * only one USB device (the AVR or the attached device) can access the pipe's bank at the one time.
- */
- #define PIPE_BANK_SINGLE AVR32_USBB_UPCFG0_PBK_SINGLE
-
- /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe
- * should have two banks, which requires more USB FIFO memory but results in faster transfers as one
- * USB device (the AVR or the attached device) can access one bank while the other accesses the second
- * bank.
- */
- #define PIPE_BANK_DOUBLE AVR32_USBB_UPCFG0_PBK_DOUBLE
-
- #if defined(USB_SERIES_UC3A3_AVR32) || defined(USB_SERIES_UC3A4_AVR32) || defined(__DOXYGEN__)
- /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the
- * pipe should have three banks, which requires more USB FIFO memory but results in faster transfers
- * as one USB device (the AVR or the attached device) can access one bank while the other accesses the
- * remaining banks.
- *
- * \note Not available on all AVR models.
- */
- #define PIPE_BANK_TRIPLE AVR32_USBB_UPCFG0_PBK_TRIPLE
- #endif
- //@}
-
/** Default size of the default control pipe's bank, until altered by the Endpoint0Size value
* in the device descriptor of the attached device.
*/
return (&AVR32_USBB.UPSTA0)[USB_Pipe_SelectedPipe].pbyct;
}
+ /** Determines the currently selected pipe's direction.
+ *
+ * \return The currently selected pipe's direction, as a \c PIPE_DIR_* mask.
+ */
+ static inline uint8_t Pipe_GetPipeDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline uint8_t Pipe_GetPipeDirection(void)
+ {
+ return (((&AVR32_USBB.UPCFG0)[USB_Endpoint_SelectedEndpoint].ptoken == PIPE_TOKEN_OUT) ? PIPE_DIR_OUT : PIPE_DIR_IN);
+ }
+
/** Returns the pipe address of the currently selected pipe. This is typically used to save the
* currently selected pipe number so that it can be restored after another pipe has been manipulated.
*
static inline uint8_t Pipe_GetCurrentPipe(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetCurrentPipe(void)
{
- return USB_Pipe_SelectedPipe;
+ return (USB_Pipe_SelectedPipe | Pipe_GetPipeDirection());
}
- /** Selects the given pipe number. Any pipe operations which do not require the pipe number to be
+ /** Selects the given pipe address. Any pipe operations which do not require the pipe address to be
* indicated will operate on the currently selected pipe.
*
- * \param[in] PipeNumber Index of the pipe to select.
+ * \param[in] Address Address of the pipe to select.
*/
- static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
- static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
+ static inline void Pipe_SelectPipe(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Pipe_SelectPipe(const uint8_t Address)
{
- USB_Pipe_SelectedPipe = PipeNumber;
+ USB_Pipe_SelectedPipe = (Address & PIPE_EPNUM_MASK);
}
/** Resets the desired pipe, including the pipe banks and flags.
*
- * \param[in] PipeNumber Index of the pipe to reset.
+ * \param[in] Address Index of the pipe to reset.
*/
- static inline void Pipe_ResetPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
- static inline void Pipe_ResetPipe(const uint8_t PipeNumber)
+ static inline void Pipe_ResetPipe(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Pipe_ResetPipe(const uint8_t Address)
{
+ uint32_t PipeNumber = (Address & PIPE_EPNUM_MASK);
+
AVR32_USBB.uprst |= (AVR32_USBB_PRST0_MASK << PipeNumber);
AVR32_USBB.uprst &= ~(AVR32_USBB_PRST0_MASK << PipeNumber);
- USB_Pipe_FIFOPos[USB_Pipe_SelectedPipe] = &AVR32_USBB_SLAVE[USB_Pipe_SelectedPipe * PIPE_HSB_ADDRESS_SPACE_SIZE];
+ USB_Pipe_FIFOPos[PipeNumber] = &AVR32_USBB_SLAVE[PipeNumber * PIPE_HSB_ADDRESS_SPACE_SIZE];
}
/** Enables the currently selected pipe so that data can be sent and received through it to and from
static inline uint8_t Pipe_GetBoundEndpointAddress(void)
{
return ((&AVR32_USBB.UPCFG0)[USB_Pipe_SelectedPipe].pepnum |
- ((Pipe_GetPipeToken() == PIPE_TOKEN_IN) ? PIPE_EPDIR_MASK : 0));
+ ((Pipe_GetPipeToken() == PIPE_TOKEN_IN) ? PIPE_DIR_IN : PIPE_DIR_OUT));
}
/** Sets the period between interrupts for an INTERRUPT type pipe to a specified number of milliseconds.
AVR32_USBB_P0INT_MASK)) >> AVR32_USBB_P0INT_OFFSET);
}
- /** Determines if the specified pipe number has interrupted (valid only for INTERRUPT type
+ /** Determines if the specified pipe address has interrupted (valid only for INTERRUPT type
* pipes).
*
- * \param[in] PipeNumber Index of the pipe whose interrupt flag should be tested.
+ * \param[in] Address Address of the pipe whose interrupt flag should be tested.
*
* \return Boolean \c true if the specified pipe has interrupted, \c false otherwise.
*/
- static inline bool Pipe_HasPipeInterrupted(const uint8_t PipeNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline bool Pipe_HasPipeInterrupted(const uint8_t PipeNumber)
+ static inline bool Pipe_HasPipeInterrupted(const uint8_t Address) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline bool Pipe_HasPipeInterrupted(const uint8_t Address)
{
- return ((AVR32_USBB.uhint & (AVR32_USBB_P0INTES_MASK << PipeNumber)) ? true : false);
+ return ((AVR32_USBB.uhint & (AVR32_USBB_P0INTES_MASK << (Address & PIPE_EPNUM_MASK))) ? true : false);
}
/** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
extern uint8_t USB_Host_ControlPipeSize;
/* Function Prototypes: */
- /** Configures the specified pipe number with the given pipe type, token, target endpoint number in the
- * attached device, bank size and banking mode.
+ /** Configures a table of pipe descriptions, in sequence. This function can be used to configure multiple
+ * pipes at the same time.
+ *
+ * \note Pipe with a zero address will be ignored, thus this function cannot be used to configure the
+ * control pipe.
+ *
+ * \param[in] Table Pointer to a table of pipe descriptions.
+ * \param[in] Entries Number of entries in the pipe table to configure.
+ *
+ * \return Boolean \c true if all pipes configured successfully, \c false otherwise.
+ */
+ bool Pipe_ConfigurePipeTable(const USB_Pipe_Table_t* const Table,
+ const uint8_t Entries);
+
+ /** Configures the specified pipe address with the given pipe type, endpoint address within the attached device, bank size
+ * and number of hardware banks.
*
* A newly configured pipe is frozen by default, and must be unfrozen before use via the \ref Pipe_Unfreeze()
* before being used. Pipes should be kept frozen unless waiting for data from a device while in IN mode, or
* numbers of IN requests without automatic freezing - this can be overridden by a call to
* \ref Pipe_SetFiniteINRequests().
*
- * \param[in] Number Pipe number to configure. This must be more than 0 and less than \ref PIPE_TOTAL_PIPES.
- *
- * \param[in] Type Type of pipe to configure, an \c EP_TYPE_* mask. Not all pipe types are available on Low
- * Speed USB devices - refer to the USB 2.0 specification.
+ * \param[in] Address Pipe address to configure.
*
- * \param[in] Token Pipe data token, either \ref PIPE_TOKEN_SETUP, \ref PIPE_TOKEN_OUT or \ref PIPE_TOKEN_IN.
- * All pipes (except Control type) are unidirectional - data may only be read from or
- * written to the pipe bank based on its direction, not both.
+ * \param[in] Type Type of pipe to configure, an \c EP_TYPE_* mask. Not all pipe types are available on Low
+ * Speed USB devices - refer to the USB 2.0 specification.
*
- * \param[in] EndpointNumber Endpoint index within the attached device that the pipe should interface to.
+ * \param[in] EndpointAddress Endpoint address within the attached device that the pipe should interface to.
*
- * \param[in] Size Size of the pipe's bank, where packets are stored before they are transmitted to
- * the USB device, or after they have been received from the USB device (depending on
- * the pipe's data direction). The bank size must indicate the maximum packet size that
- * the pipe can handle.
+ * \param[in] Size Size of the pipe's bank, where packets are stored before they are transmitted to
+ * the USB device, or after they have been received from the USB device (depending on
+ * the pipe's data direction). The bank size must indicate the maximum packet size that
+ * the pipe can handle.
*
- * \param[in] Banks Number of banks to use for the pipe being configured, a \c PIPE_BANK_* mask. More banks
- * uses more USB DPRAM, but offers better performance. Isochronous type pipes <b>must</b>
- * have at least two banks.
+ * \param[in] Banks Number of banks to use for the pipe being configured.
*
* \note When the \c ORDERED_EP_CONFIG compile time option is used, Pipes <b>must</b> be configured in ascending order,
* or bank corruption will occur.
*
* \return Boolean \c true if the configuration succeeded, \c false otherwise.
*/
- bool Pipe_ConfigurePipe(const uint8_t Number,
+ bool Pipe_ConfigurePipe(const uint8_t Address,
const uint8_t Type,
- const uint8_t Token,
- const uint8_t EndpointNumber,
+ const uint8_t EndpointAddress,
const uint16_t Size,
const uint8_t Banks);
USB_INT_Enable(USB_INT_VBUSTI);
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
- ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,
- ENDPOINT_BANK_SINGLE);
+ USB_Device_ControlEndpointSize, 1);
USB_INT_Clear(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_SUSPI);
USB_Device_SetDeviceAddress(0);
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
- ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,
- ENDPOINT_BANK_SINGLE);
+ USB_Device_ControlEndpointSize, 1);
#if defined(INTERRUPT_CONTROL_ENDPOINT)
USB_INT_Enable(USB_INT_RXSTPI);
#define ENDPOINT_DIR_IN 0x80
//@}
+ /** \name Pipe Direction Masks */
+ //@{
+ /** Pipe direction mask, for masking against pipe addresses to retrieve the pipe's
+ * direction for comparing with the \c PIPE_DIR_* masks.
+ */
+ #define PIPE_DIR_MASK 0x80
+
+ /** Endpoint address direction mask for an OUT direction (Host to Device) endpoint. This may be ORed with
+ * the index of the address within a device to obtain the full endpoint address.
+ */
+ #define PIPE_DIR_OUT 0x00
+
+ /** Endpoint address direction mask for an IN direction (Device to Host) endpoint. This may be ORed with
+ * the index of the address within a device to obtain the full endpoint address.
+ */
+ #define PIPE_DIR_IN 0x80
+ //@}
+
/** \name Endpoint/Pipe Type Masks */
//@{
/** Mask for determining the type of an endpoint from an endpoint descriptor. This should then be compared
*/
#define USB_SERIES_B3_XMEGA
+ /** Indicates that the target AVR microcontroller belongs to the XMEGA C3 Series USB controller
+ * (i.e. ATXMEGA*C3) when defined.
+ */
+ #define USB_SERIES_C3_XMEGA
+
+ /** Indicates that the target AVR microcontroller belongs to the XMEGA C4 Series USB controller
+ * (i.e. ATXMEGA*C4) when defined.
+ */
+ #define USB_SERIES_C4_XMEGA
+
/** Indicates that the target microcontroller and compilation settings allow for the
* target to be configured in USB Device mode when defined.
*/
#elif (defined(__AVR_ATxmega128B3__) || defined(__AVR_ATxmega64B3__))
#define USB_SERIES_B3_XMEGA
#define USB_CAN_BE_DEVICE
+ #elif (defined(__AVR_ATxmega128C3__) || defined(__AVR_ATxmega64C3__) || \
+ defined(__AVR_ATxmega192C3__) || defined(__AVR_ATxmega256C3__) || \
+ defined(__AVR_ATxmega384C3__))
+ #define USB_SERIES_C3_XMEGA
+ #define USB_CAN_BE_DEVICE
+ #elif (defined(__AVR_ATxmega16C4__) || defined(__AVR_ATxmega32C4__))
+ #define USB_SERIES_C4_XMEGA
+ #define USB_CAN_BE_DEVICE
#endif
#if (defined(USB_CAN_BE_DEVICE) && defined(USB_CAN_BE_HOST))
*/
#define USB_DEVICE_OPT_LOWSPEED (1 << 0)
- /** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
- * USB interface should be initialized in full speed (12Mb/s) mode.
- */
- #define USB_DEVICE_OPT_FULLSPEED (0 << 0)
+ #if (F_USB > 6000000)
+ /** Mask for the Options parameter of the \ref USB_Init() function. This indicates that the
+ * USB interface should be initialized in full speed (12Mb/s) mode.
+ */
+ #define USB_DEVICE_OPT_FULLSPEED (0 << 0)
+ #endif
//@}
#if (!defined(NO_INTERNAL_SERIAL) || defined(__DOXYGEN__))
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)
{
- return USB_EndpointTable.FrameNum;
+ return ((USB_EndpointTable_t*)USB.EPPTR)->FrameNum;
}
#if !defined(NO_SOF_EVENTS)
volatile USB_EP_t* USB_Endpoint_SelectedHandle;
volatile Endpoint_FIFO_t* USB_Endpoint_SelectedFIFO;
-bool Endpoint_ConfigureEndpoint_PRV(const uint8_t Number,
- const uint8_t Direction,
+bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table,
+ const uint8_t Entries)
+{
+ for (uint8_t i = 0; i < Entries; i++)
+ {
+ if (!(Table[i].Address))
+ continue;
+
+ if (!(Endpoint_ConfigureEndpoint(Table[i].Address, Table[i].Type, Table[i].Size, Table[i].Banks)))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool Endpoint_ConfigureEndpoint_PRV(const uint8_t Address,
const uint8_t Config,
const uint8_t Size)
{
- Endpoint_SelectEndpoint(Number | Direction);
+ Endpoint_SelectEndpoint(Address);
USB_Endpoint_SelectedHandle->CTRL = 0;
- USB_Endpoint_SelectedHandle->STATUS = (Direction == ENDPOINT_DIR_IN) ? USB_EP_BUSNACK0_bm : 0;
+ USB_Endpoint_SelectedHandle->STATUS = (Address & ENDPOINT_DIR_IN) ? USB_EP_BUSNACK0_bm : 0;
USB_Endpoint_SelectedHandle->CTRL = Config;
USB_Endpoint_SelectedHandle->CNT = 0;
USB_Endpoint_SelectedHandle->DATAPTR = (intptr_t)USB_Endpoint_SelectedFIFO->Data;
- USB_Endpoint_SelectedFIFO->Length = (Direction == ENDPOINT_DIR_IN) ? Size : 0;
+ USB_Endpoint_SelectedFIFO->Length = (Address & ENDPOINT_DIR_IN) ? Size : 0;
USB_Endpoint_SelectedFIFO->Position = 0;
return true;
{
for (uint8_t EPNum = 0; EPNum < ENDPOINT_TOTAL_ENDPOINTS; EPNum++)
{
- USB_EndpointTable.Endpoints[EPNum].IN.CTRL = 0;
- USB_EndpointTable.Endpoints[EPNum].OUT.CTRL = 0;
+ ((USB_EndpointTable_t*)USB.EPPTR)->Endpoints[EPNum].IN.CTRL = 0;
+ ((USB_EndpointTable_t*)USB.EPPTR)->Endpoints[EPNum].OUT.CTRL = 0;
}
}
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
#endif
- /* Private Interface - For use in library only: */
- #if !defined(__DOXYGEN__)
+ /* Public Interface - May be used in end-application: */
/* Macros: */
- #define _ENDPOINT_GET_MAXSIZE(EPIndex) 1023
- #define _ENDPOINT_GET_BANKS(EPIndex) 2
-
- #define ENDPOINT_DETAILS_MAXEP 16
+ #if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__)
+ /** Total number of endpoints (including the default control endpoint at address 0) which may
+ * be used in the device. Different USB AVR models support different amounts of endpoints,
+ * this value reflects the maximum number of endpoints for the currently selected AVR model.
+ */
+ #define ENDPOINT_TOTAL_ENDPOINTS 16
+ #else
+ #define ENDPOINT_TOTAL_ENDPOINTS 1
+ #endif
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
/* Type Defines: */
typedef struct
{
} Endpoint_FIFOPair_t;
/* External Variables: */
- extern Endpoint_FIFOPair_t USB_Endpoint_FIFOs[ENDPOINT_DETAILS_MAXEP];
+ extern Endpoint_FIFOPair_t USB_Endpoint_FIFOs[ENDPOINT_TOTAL_ENDPOINTS];
extern volatile uint8_t USB_Endpoint_SelectedEndpoint;
extern volatile USB_EP_t* USB_Endpoint_SelectedHandle;
extern volatile Endpoint_FIFO_t* USB_Endpoint_SelectedFIFO;
}
/* Function Prototypes: */
- bool Endpoint_ConfigureEndpoint_PRV(const uint8_t Number,
- const uint8_t Direction,
+ bool Endpoint_ConfigureEndpoint_PRV(const uint8_t Address,
const uint8_t Config,
const uint8_t Size);
void Endpoint_ClearEndpoints(void);
/* Public Interface - May be used in end-application: */
/* Macros: */
- /** \name Endpoint Bank Mode Masks */
- //@{
- /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
- * that the endpoint should have one single bank, which requires less USB FIFO memory but results
- * in slower transfers as only one USB device (the AVR or the host) can access the endpoint's
- * bank at the one time.
- */
- #define ENDPOINT_BANK_SINGLE 0
-
- /** Mask for the bank mode selection for the \ref Endpoint_ConfigureEndpoint() macro. This indicates
- * that the endpoint should have two banks, which requires more USB FIFO memory but results
- * in faster transfers as one USB device (the AVR or the host) can access one bank while the other
- * accesses the second bank.
- */
- #define ENDPOINT_BANK_DOUBLE USB_EP_PINGPONG_bm
- //@}
-
#if (!defined(FIXED_CONTROL_ENDPOINT_SIZE) || defined(__DOXYGEN__))
/** Default size of the default control endpoint's bank, until altered by the control endpoint bank size
* value in the device descriptor. Not available if the \c FIXED_CONTROL_ENDPOINT_SIZE token is defined.
#define ENDPOINT_CONTROLEP_DEFAULT_SIZE 8
#endif
- /** Retrieves the maximum bank size in bytes of a given endpoint.
- *
- * \attention This macro will only work correctly on endpoint indexes that are compile-time constants
- * defined by the preprocessor.
- *
- * \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
- */
- #define ENDPOINT_MAX_SIZE(EPIndex) _ENDPOINT_GET_MAXSIZE(EPIndex)
-
- /** Retrieves the total number of banks supported by the given endpoint.
- *
- * \attention This macro will only work correctly on endpoint indexes that are compile-time constants
- * defined by the preprocessor.
- *
- * \param[in] EPIndex Endpoint number, a value between 0 and (\ref ENDPOINT_TOTAL_ENDPOINTS - 1)
- */
- #define ENDPOINT_BANKS_SUPPORTED(EPIndex) _ENDPOINT_GET_BANKS(EPIndex)
-
- #if !defined(CONTROL_ONLY_DEVICE) || defined(__DOXYGEN__)
- /** Total number of endpoints (including the default control endpoint at address 0) which may
- * be used in the device. Different USB AVR models support different amounts of endpoints,
- * this value reflects the maximum number of endpoints for the currently selected AVR model.
- */
- #define ENDPOINT_TOTAL_ENDPOINTS ENDPOINT_DETAILS_MAXEP
- #else
- #define ENDPOINT_TOTAL_ENDPOINTS 1
- #endif
-
/* Enums: */
/** Enum for the possible error return codes of the \ref Endpoint_WaitUntilReady() function.
*
};
/* Inline Functions: */
- /** Selects the given endpoint number. If the address from the device descriptors is used, the
- * value should be masked with the \ref ENDPOINT_EPNUM_MASK constant to extract only the endpoint
- * number (and discarding the endpoint direction bit).
+ /** Selects the given endpoint address.
*
- * Any endpoint operations which do not require the endpoint number to be indicated will operate on
+ * Any endpoint operations which do not require the endpoint address to be indicated will operate on
* the currently selected endpoint.
*
- * \param[in] EndpointNumber Endpoint number to select.
+ * \param[in] Address Endpoint address to select.
*/
- static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber);
- static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber)
+ static inline void Endpoint_SelectEndpoint(const uint8_t Address);
+ static inline void Endpoint_SelectEndpoint(const uint8_t Address)
{
- USB_Endpoint_SelectedEndpoint = EndpointNumber;
+ uint8_t EndpointNumber = (Address & ENDPOINT_EPNUM_MASK);
+
+ USB_Endpoint_SelectedEndpoint = Address;
- if (EndpointNumber & ENDPOINT_DIR_IN)
+ if (Address & ENDPOINT_DIR_IN)
{
- USB_Endpoint_SelectedFIFO = &USB_Endpoint_FIFOs[EndpointNumber & ENDPOINT_EPNUM_MASK].IN;
- USB_Endpoint_SelectedHandle = &USB_EndpointTable.Endpoints[EndpointNumber & ENDPOINT_EPNUM_MASK].IN;
+ USB_Endpoint_SelectedFIFO = &USB_Endpoint_FIFOs[EndpointNumber].IN;
+ USB_Endpoint_SelectedHandle = &((USB_EndpointTable_t*)USB.EPPTR)->Endpoints[EndpointNumber].IN;
}
else
{
- USB_Endpoint_SelectedFIFO = &USB_Endpoint_FIFOs[EndpointNumber & ENDPOINT_EPNUM_MASK].OUT;
- USB_Endpoint_SelectedHandle = &USB_EndpointTable.Endpoints[EndpointNumber & ENDPOINT_EPNUM_MASK].OUT;
+ USB_Endpoint_SelectedFIFO = &USB_Endpoint_FIFOs[EndpointNumber].OUT;
+ USB_Endpoint_SelectedHandle = &((USB_EndpointTable_t*)USB.EPPTR)->Endpoints[EndpointNumber].OUT;
}
}
- /** Configures the specified endpoint number with the given endpoint type, direction, bank size
+ /** Configures the specified endpoint address with the given endpoint type, direction, bank size
* and banking mode. Once configured, the endpoint may be read from or written to, depending
* on its direction.
*
- * \param[in] Number Endpoint number to configure. This must be more than 0 and less than
- * \ref ENDPOINT_TOTAL_ENDPOINTS.
+ * \param[in] Address Endpoint address to configure.
*
* \param[in] Type Type of endpoint to configure, a \c EP_TYPE_* mask. Not all endpoint types
* are available on Low Speed USB devices - refer to the USB 2.0 specification.
*
- * \param[in] Direction Endpoint data direction, either \ref ENDPOINT_DIR_OUT or \ref ENDPOINT_DIR_IN.
- * All endpoints (except Control type) are unidirectional - data may only be read
- * from or written to the endpoint bank based on its direction, not both.
- *
* \param[in] Size Size of the endpoint's bank, where packets are stored before they are transmitted
* to the USB host, or after they have been received from the USB host (depending on
* the endpoint's data direction). The bank size must indicate the maximum packet size
* that the endpoint can handle.
*
- * \param[in] Banks Number of banks to use for the endpoint being configured, an \c ENDPOINT_BANK_* mask.
- * More banks uses more USB DPRAM, but offers better performance. Isochronous type
- * endpoints <b>must</b> have at least two banks.
+ * \param[in] Banks Number of hardware banks to use for the endpoint being configured.
*
* \note The default control endpoint should not be manually configured by the user application, as
* it is automatically configured by the library internally.
*
* \return Boolean \c true if the configuration succeeded, \c false otherwise.
*/
- static inline bool Endpoint_ConfigureEndpoint(const uint8_t Number,
+ static inline bool Endpoint_ConfigureEndpoint(const uint8_t Address,
const uint8_t Type,
- const uint8_t Direction,
const uint16_t Size,
const uint8_t Banks) ATTR_ALWAYS_INLINE;
- static inline bool Endpoint_ConfigureEndpoint(const uint8_t Number,
+ static inline bool Endpoint_ConfigureEndpoint(const uint8_t Address,
const uint8_t Type,
- const uint8_t Direction,
const uint16_t Size,
const uint8_t Banks)
{
- uint8_t EPConfigMask = (USB_EP_INTDSBL_bm | Banks | Endpoint_BytesToEPSizeMask(Size));
+ uint8_t EPConfigMask = (USB_EP_INTDSBL_bm | ((Banks > 1) ? USB_EP_PINGPONG_bm : 0) | Endpoint_BytesToEPSizeMask(Size));
// TODO - Fix once limitations are lifted
- if ((Banks != ENDPOINT_BANK_SINGLE) || (Size > 64))
+ if ((Banks > 1) || (Size > 64))
return false;
switch (Type)
}
if (Type == EP_TYPE_CONTROL)
- Endpoint_ConfigureEndpoint_PRV(Number, (Direction ^ ENDPOINT_DIR_IN), EPConfigMask, Size);
+ Endpoint_ConfigureEndpoint_PRV(Address ^ ENDPOINT_DIR_IN, EPConfigMask, Size);
- return Endpoint_ConfigureEndpoint_PRV(Number, Direction, EPConfigMask, Size);
+ return Endpoint_ConfigureEndpoint_PRV(Address, EPConfigMask, Size);
}
/** Indicates the number of bytes currently stored in the current endpoint's selected bank.
}
/** Get the endpoint address of the currently selected endpoint. This is typically used to save
- * the currently selected endpoint number so that it can be restored after another endpoint has
- * been manipulated.
+ * the currently selected endpoint so that it can be restored after another endpoint has been
+ * manipulated.
*
* \return Index of the currently selected endpoint.
*/
/** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's
* data In and Out pointers to the bank's contents.
*
- * \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset.
+ * \param[in] Address Endpoint address whose FIFO buffers are to be reset.
*/
- static inline void Endpoint_ResetEndpoint(const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE;
- static inline void Endpoint_ResetEndpoint(const uint8_t EndpointNumber)
+ static inline void Endpoint_ResetEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE;
+ static inline void Endpoint_ResetEndpoint(const uint8_t Address)
{
- if (EndpointNumber & ENDPOINT_DIR_IN)
- USB_Endpoint_FIFOs[EndpointNumber & ENDPOINT_EPNUM_MASK].IN.Position = 0;
+ if (Address & ENDPOINT_DIR_IN)
+ USB_Endpoint_FIFOs[Address & ENDPOINT_EPNUM_MASK].IN.Position = 0;
else
- USB_Endpoint_FIFOs[EndpointNumber & ENDPOINT_EPNUM_MASK].OUT.Position = 0;
+ USB_Endpoint_FIFOs[Address & ENDPOINT_EPNUM_MASK].OUT.Position = 0;
}
/** Determines if the currently selected endpoint is enabled, but not necessarily configured.
static inline bool Endpoint_IsReadWriteAllowed(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline bool Endpoint_IsReadWriteAllowed(void)
{
- if (USB_Endpoint_SelectedEndpoint & ENDPOINT_DIR_IN)
- return (USB_Endpoint_SelectedFIFO->Position < USB_Endpoint_SelectedFIFO->Length);
- else
- return (USB_Endpoint_SelectedFIFO->Position > 0);
+ return (USB_Endpoint_SelectedFIFO->Position < USB_Endpoint_SelectedFIFO->Length);
}
/** Determines if the currently selected endpoint is configured.
return ((USB_Endpoint_SelectedHandle->CTRL & USB_EP_TYPE_gm) ? true : false);
}
- /** Returns a mask indicating which INTERRUPT type endpoints have interrupted - i.e. their
- * interrupt duration has elapsed. Which endpoints have interrupted can be determined by
- * masking the return value against <tt>(1 << <i>{Endpoint Number}</i>)</tt>.
- *
- * \return Mask whose bits indicate which endpoints have interrupted.
- */
- static inline uint8_t Endpoint_GetEndpointInterrupts(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline uint8_t Endpoint_GetEndpointInterrupts(void)
- {
- return 0; // TODO
- }
-
- /** Determines if the specified endpoint number has interrupted (valid only for INTERRUPT type
- * endpoints).
- *
- * \param[in] EndpointNumber Index of the endpoint whose interrupt flag should be tested.
- *
- * \return Boolean \c true if the specified endpoint has interrupted, \c false otherwise.
- */
- static inline bool Endpoint_HasEndpointInterrupted(const uint8_t EndpointNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
- static inline bool Endpoint_HasEndpointInterrupted(const uint8_t EndpointNumber)
- {
- (void)EndpointNumber;
- return 0; // TODO
- }
-
/** Determines if the selected IN endpoint is ready for a new packet to be sent to the host.
*
* \ingroup Group_EndpointPacketManagement_XMEGA
#endif
/* Function Prototypes: */
+ /** Configures a table of endpoint descriptions, in sequence. This function can be used to configure multiple
+ * endpoints at the same time.
+ *
+ * \note Endpoints with a zero address will be ignored, thus this function cannot be used to configure the
+ * control endpoint.
+ *
+ * \param[in] Table Pointer to a table of endpoint descriptions.
+ * \param[in] Entries Number of entries in the endpoint table to configure.
+ *
+ * \return Boolean \c true if all endpoints configured successfully, \c false otherwise.
+ */
+ bool Endpoint_ConfigureEndpointTable(const USB_Endpoint_Table_t* const Table,
+ const uint8_t Entries);
+
/** Completes the status stage of a control transfer on a CONTROL type endpoint automatically,
* with respect to the data direction. This is a convenience function which can be used to
* simplify user control request handling.
volatile uint8_t USB_Options;
#endif
-USB_EndpointTable_t USB_EndpointTable ATTR_ALIGNED(4);
+/* Ugly workaround to ensure an aligned table, since __BIGGEST_ALIGNMENT__ == 1 for 8-bit AVR-GCC */
+uint8_t USB_EndpointTable[sizeof(USB_EndpointTable_t) + 1];
void USB_Init(
#if defined(USB_CAN_BE_BOTH)
USB.CAL1 = pgm_read_byte(offsetof(NVM_PROD_SIGNATURES_t, USBCAL1));
NVM.CMD = 0;
- USB.EPPTR = (intptr_t)&USB_EndpointTable;
- USB.CTRLA = (USB_STFRNUM_bm | USB_MAXEP_gm);
+ /* Ugly workaround to ensure an aligned table, since __BIGGEST_ALIGNMENT__ == 1 for 8-bit AVR-GCC */
+ USB.EPPTR = ((intptr_t)&USB_EndpointTable[1] & ~(1 << 0));
+ USB.CTRLA = (USB_STFRNUM_bm | ((ENDPOINT_TOTAL_ENDPOINTS - 1) << USB_MAXEP_gp));
if ((USB_Options & USB_OPT_BUSEVENT_PRIHIGH) == USB_OPT_BUSEVENT_PRIHIGH)
USB.INTCTRLA = (3 << USB_INTLVL_gp);
void USB_ResetInterface(void)
{
+ #if defined(USB_DEVICE_OPT_FULLSPEED)
if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
CLK.USBCTRL = (((F_USB / 6000000) - 1) << CLK_USBPSDIV_gp);
else
CLK.USBCTRL = (((F_USB / 48000000) - 1) << CLK_USBPSDIV_gp);
-
+ #else
+ CLK.USBCTRL = (((F_USB / 6000000) - 1) << CLK_USBPSDIV_gp);
+ #endif
+
if (USB_Options & USB_OPT_PLLCLKSRC)
- CLK.USBCTRL |= (CLK_USBSRC_PLL_gc | CLK_USBSEN_bm);
+ CLK.USBCTRL |= (CLK_USBSRC_PLL_gc | CLK_USBSEN_bm);
else
CLK.USBCTRL |= (CLK_USBSRC_RC32M_gc | CLK_USBSEN_bm);
USB_Device_SetFullSpeed();
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
- ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,
- ENDPOINT_BANK_SINGLE);
+ USB_Device_ControlEndpointSize, 1);
USB_INT_Enable(USB_INT_BUSEVENTI);
} ATTR_PACKED USB_EndpointTable_t;
/* External Variables: */
- extern USB_EndpointTable_t USB_EndpointTable;
+ extern uint8_t USB_EndpointTable[];
#endif
#error F_USB is not defined. You must define F_USB to the frequency of the unprescaled USB controller clock in your project makefile.
#endif
- #if (F_USB % 6000000)
+ #if ((F_USB % 6000000) || (F_USB < 6000000))
#error Invalid F_USB specified. F_USB must be a multiple of 6MHz for USB Low Speed operation, and a multiple of 48MHz for Full Speed operation.
#endif
Endpoint_ClearEndpoints();
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
- ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,
- ENDPOINT_BANK_SINGLE);
+ USB_Device_ControlEndpointSize, 1);
EVENT_USB_Device_Reset();
}
* .Config =
* {
* .StreamingInterfaceNumber = 1,
- *
- * .DataINEndpointNumber = 1,
- * .DataINEndpointSize = 256,
+ * .DataINEndpoint =
+ * {
+ * .Address = (ENDPOINT_DIR_IN | 1),
+ * .Size = 64,
+ * .Banks = 1,
+ * },
* },
* };
* \endcode
* {
* .Config =
* {
- * .DataINPipeNumber = 1,
- * .DataINPipeDoubleBank = false,
- *
- * .DataOUTPipeNumber = 2,
- * .DataOUTPipeDoubleBank = false,
+ * .DataINPipe =
+ * {
+ * .Address = (PIPE_DIR_IN | 1),
+ * .Size = 64,
+ * .Banks = 1,
+ * },
+ * .DataOUTPipe =
+ * {
+ * .Address = (PIPE_DIR_OUT | 2),
+ * .Size = 64,
+ * .Banks = 1,
+ * },
* },
* };
* \endcode
*
* void main(void)
* {
- * // Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it
- * XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, 32000000);
- * XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL, F_CPU);
+ * // Start the PLL to multiply the 2MHz RC oscillator to F_CPU and switch the CPU core to run from it
+ * XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+ * XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
*
- * // Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference
+ * // Start the 32MHz internal RC oscillator and start the DFLL to increase it to F_USB using the USB SOF as a reference
* XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
- * XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, 48000000);
+ * XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
* }
* \endcode
*
};
/* Inline Functions: */
+ /** Write a value to a location protected by the XMEGA CCP protection mechanism. This function uses inline assembly to ensure that
+ * the protected address is written to within four clock cycles of the CCP key being written.
+ *
+ * \param[in] Address Address to write to, a memory address protected by the CCP mechanism
+ * \param[in] Value Value to write to the protected location
+ */
+ static inline void XMEGACLK_CCP_Write(volatile void* Address, const uint8_t Value) ATTR_ALWAYS_INLINE;
+ static inline void XMEGACLK_CCP_Write(volatile void* Address, const uint8_t Value)
+ {
+ __asm__ __volatile__ (
+ "out %0, __zero_reg__" "\n\t" /* Zero RAMPZ using fixed zero value register */
+ "movw r30, %1" "\n\t" /* Copy address to Z register pair */
+ "out %2, %3" "\n\t" /* Write key to CCP register */
+ "st Z, %4" "\n\t" /* Indirectly write value to address */
+ : /* No output operands */
+ : /* Input operands: */ "m" (RAMPZ), "e" (Address), "m" (CCP), "r" (CCP_IOREG_gc), "r" (Value)
+ : /* Clobbered registers: */ "r30", "r31"
+ );
+ }
+
/** Starts the external oscillator of the XMEGA microcontroller, with the given options. This routine blocks until
* the oscillator is ready for use.
*
if (SourceFreq > Frequency)
return false;
+
+ if (MulFactor > 31)
+ return false;
switch (Source)
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
- CCP = CCP_IOREG_gc;
- CLK_CTRL = ClockSourceMask;
+ XMEGACLK_CCP_Write(&CLK.CTRL, ClockSourceMask);
SetGlobalInterruptMask(CurrentGlobalInt);
\r
# Maintenance scripts not required by general LUFA users, used for project development purposes.\r
\r
+\r
+# Path to the root of the LUFA tree\r
LUFA_ROOT = ../\r
\r
all:\r
\r
-\r
# Update all Doxygen configuration files to the latest Doxygen version - force Markdown support to be disabled\r
upgrade-doxygen:\r
@echo Upgrading Doxygen.conf files...\r
fi;\r
@echo Done.\r
\r
-# Test all generated documentation for any bad links\r
-check-documentation-links:\r
- @for html_file in `find $(LUFA_ROOT) -name *.html`; do \\r
- echo Checking $$html_file...; \\r
- cat $$html_file | grep -v "doxygen.org" | grep -v "fourwalledcubicle.com" | wget -nv --referer=www.lufa-lib.org --user-agent="lufa-link-check-script" -B $(dir $$html_file) --spider --force-html --input-file=-; \\r
- done;\r
-\r
# Validate the working branch - compile all documentation, demos/projects/examples and run build tests\r
validate-branch:\r
make -s -C $(LUFA_ROOT) doxygen\r
bool ConfigSuccess = true;
/* Setup AVRISP Data Endpoint(s) */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#if defined(LIBUSB_DRIVER_COMPAT)
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#endif
/* Indicate endpoint configuration success or failure */
V2Params_UpdateParamValues();
- Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPADDR);
/* Check to see if a V2 Protocol command has been received */
if (Endpoint_IsOUTReceived())
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | AVRISP_DATA_IN_EPNUM),
+ .EndpointAddress = AVRISP_DATA_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | AVRISP_DATA_OUT_EPNUM),
+ .EndpointAddress = AVRISP_DATA_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- #if !defined(LIBUSB_DRIVER_COMPAT)
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
+ #if !defined(LIBUSB_DRIVER_COMPAT) || defined(__DOXYGEN__)
+ /** Endpoint address of the AVRISP data OUT endpoint. */
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 2
+ /** Endpoint address of the AVRISP data IN endpoint. */
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 2)
#else
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
-
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 3
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 3)
#endif
/** Size in bytes of the AVRISP data endpoint. */
Endpoint_Read_Stream_LE(&Enter_ISP_Params, sizeof(Enter_ISP_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ResponseStatus = STATUS_CMD_FAILED;
Endpoint_Read_Stream_LE(&Leave_ISP_Params, sizeof(Leave_ISP_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
/* Perform pre-exit delay, release the target /RESET, disable the SPI bus and perform the post-exit delay */
if (Write_Memory_Params.BytesToWrite > sizeof(Write_Memory_Params.ProgData))
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ProgrammingStatus = STATUS_CMD_OK;
Read_Memory_Params.BytesToRead = SwapEndian_16(Read_Memory_Params.BytesToRead);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
Endpoint_Read_Stream_LE(&Erase_Chip_Params, sizeof(Erase_Chip_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ResponseStatus = STATUS_CMD_OK;
Endpoint_Read_Stream_LE(&Read_FuseLockSigOSCCAL_Params, sizeof(Read_FuseLockSigOSCCAL_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ResponseBytes[4];
Endpoint_Read_Stream_LE(&Write_FuseLockSig_Params, sizeof(Write_FuseLockSig_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
/* Send the Fuse or Lock byte program commands as given by the host to the device */
Endpoint_Read_Stream_LE(&SPI_Multi_Params.TxData, SPI_Multi_Params.TxBytes, NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_SPI_MULTI);
TCCR0B = 0;
Endpoint_WaitUntilReady();
- Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_OUT);
}
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
static void V2Protocol_SignOn(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_SIGN_ON);
static void V2Protocol_ResetProtection(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_RESET_PROTECTION);
ParamValue = Endpoint_Read_8();
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
Endpoint_Read_Stream_BE(&CurrentAddress, sizeof(CurrentAddress), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
if (CurrentAddress & (1UL << 31))
#include "V2ProtocolParams.h"
/* Non-Volatile Parameter Values for EEPROM storage */
-static uint8_t EEMEM EEPROM_Reset_Polarity = 0x00;
+static uint8_t EEMEM EEPROM_Reset_Polarity = 0x01;
/* Volatile Parameter Values for RAM storage */
static ParameterItem_t ParameterTable[] =
*/
bool XMEGANVM_GetMemoryCRC(const uint8_t CRCCommand, uint32_t* const CRCDest)
{
+ *CRCDest = 0;
+
/* Wait until the NVM controller is no longer busy */
if (!(XMEGANVM_WaitWhileNVMControllerBusy()))
return false;
Endpoint_Read_Stream_LE(&SetMode_XPROG_Params, sizeof(SetMode_XPROG_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
XPROG_SelectedProtocol = SetMode_XPROG_Params.Protocol;
static void XPROGProtocol_EnterXPROGMode(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
bool NVMBusEnabled = false;
static void XPROGProtocol_LeaveXPROGMode(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
if (XPROG_SelectedProtocol == XPRG_PROTOCOL_PDI)
Erase_XPROG_Params.Address = SwapEndian_32(Erase_XPROG_Params.Address);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t EraseCommand;
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
if (XPROG_SelectedProtocol == XPRG_PROTOCOL_PDI)
ReadMemory_XPROG_Params.Length = SwapEndian_16(ReadMemory_XPROG_Params.Length);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ReadBuffer[256];
Endpoint_Read_Stream_LE(&ReadCRC_XPROG_Params, sizeof(ReadCRC_XPROG_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint32_t MemoryCRC;
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_XPROG);
#if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
/* On the XPLAIN board, we only need PDI programming
for the ATXMEGA128A1 - disable ISP to prevent hardware
- damage.
+ damage and force-enable XPROG.
*/
#undef ENABLE_ISP_PROTOCOL
DDRD |= (1 << 5) | (1 << 3);
DDRD &= ~(1 << 2);
- /* Set up the synchronous USART for TINY communications - 8 data bits, even parity, 2 stop bits */
+ /* Set up the synchronous USART for TPI communications - 8 data bits, even parity, 2 stop bits */
UBRR1 = ((F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1);
UCSR1B = (1 << TXEN1);
UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);
{
.Config =
{
- .ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .ControlInterfaceNumber = 0,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
-
.HIDParserData = &HIDReportInfo
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 5
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 5)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 1
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 2
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
/** Size in bytes of the CDC data IN and OUT endpoints. */
#define CDC_TXRX_EPSIZE 16
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
.Config =
{
.InterfaceNumber = 0,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = 1,
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
},
};
#include "diskio.h"
#include <string.h>
-#include <LUFA/Drivers/USB/Class/MassStorage.h>
+#include <LUFA/Drivers/USB/USB.h>
#include "../DataflashManager.h"
#include "../../DiskHost.h"
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
{
.Config =
{
- .ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .ControlInterfaceNumber = 0,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
+ .EndpointAddress = MIDI_STREAM_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.Refresh = 0,
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
+ .EndpointAddress = MIDI_STREAM_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.Refresh = 0,
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
- #define MIDI_STREAM_IN_EPNUM 2
+ /** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
+ #define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
- #define MIDI_STREAM_OUT_EPNUM 1
+ /** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
+ #define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 1)
/** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
#define MIDI_STREAM_EPSIZE 64
.Config =
{
.StreamingInterfaceNumber = 1,
-
- .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM,
- .DataINEndpointSize = MIDI_STREAM_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM,
- .DataOUTEndpointSize = MIDI_STREAM_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = MIDI_STREAM_IN_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MIDI_STREAM_OUT_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
},
};
MIDI_EventPacket_t ReceivedMIDIEvent;
if (MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &ReceivedMIDIEvent))
{
- if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
+ if ((ReceivedMIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_ON)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
DDSNoteData* LRUNoteStruct = &NoteData[0];
/* Turn on indicator LED to indicate note generation activity */
LEDs_SetAllLEDs(LEDS_LED1);
}
- else if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_OFF >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
+ else if ((ReceivedMIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_OFF)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
bool FoundActiveNote = false;
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_EPNUM),
+ .EndpointAddress = KEYBOARD_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the keyboard key press reporting endpoint. */
- #define KEYBOARD_EPNUM 1
+ /** Endpoint address of the keyboard key press reporting endpoint. */
+ #define KEYBOARD_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size of the keyboard report endpoints, in bytes. */
#define KEYBOARD_EPSIZE 8
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = KEYBOARD_EPNUM,
- .ReportINEndpointSize = KEYBOARD_EPSIZE,
- .ReportINEndpointDoubleBank = KEYBOARD_EPSIZE,
-
+ .ReportINEndpoint =
+ {
+ .Address = KEYBOARD_EPADDR,
+ .Size = KEYBOARD_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MEDIACONTROL_HID_EPNUM),
+ .EndpointAddress = MEDIACONTROL_HID_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MEDIACONTROL_HID_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Media Control HID reporting IN endpoint. */
- #define MEDIACONTROL_HID_EPNUM 1
+ /** Endpoint address of the Media Control HID reporting IN endpoint. */
+ #define MEDIACONTROL_HID_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Size in bytes of the Media Control HID reporting IN and OUT endpoints. */
- #define MEDIACONTROL_HID_EPSIZE 8
+ /** Size in bytes of the Media Control HID reporting IN endpoint. */
+ #define MEDIACONTROL_HID_EPSIZE 8
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = MEDIACONTROL_HID_EPNUM,
- .ReportINEndpointSize = MEDIACONTROL_HID_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = MEDIACONTROL_HID_EPADDR,
+ .Size = MEDIACONTROL_HID_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevMediaControlHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMediaControlHIDReportBuffer),
},
}
/* Configure the HID data IN pipe */
- Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
- DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
/* Check if the HID interface contained an optional OUT data endpoint */
if (DataOUTEndpoint)
{
/* Configure the HID data OUT pipe */
- Pipe_ConfigurePipe(HID_DATA_OUT_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_OUT,
- DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
+ Pipe_ConfigurePipe(HID_DATA_OUT_PIPE, EP_TYPE_INTERRUPT, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
}
/* Valid data found, return success */
/** Interface Class value for the Human Interface Device class. */
#define HID_CLASS 0x03
- /** Pipe number for the HID data IN pipe. */
- #define HID_DATA_IN_PIPE 1
+ /** Pipe address for the HID data IN pipe. */
+ #define HID_DATA_IN_PIPE (PIPE_DIR_IN | 1)
- /** Pipe number for the HID data OUT pipe. */
- #define HID_DATA_OUT_PIPE 2
+ /** Pipe address for the HID data OUT pipe. */
+ #define HID_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
/* Enums: */
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
-PROJECT_NAME = "OB's Dual-Relay outlet control using a Teensy2++"
+PROJECT_NAME = "OB's Dual-Relay Outlet Control Project"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Simon Foster (simon.foster [at] inbox [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
+ *
+ * USB Device Descriptors, for library use when in USB device mode. Descriptors are special
+ * computer-readable structures which the host requests upon device enumeration, to determine
+ * the device's capabilities and functions.
+ */
+
+#include "Descriptors.h"
+
+/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as
+ * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL.
+ * This allows the host to track a device across insertions on different ports, allowing them to retain allocated
+ * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices
+ * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value
+ * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and
+ * port location).
+ */
+#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR)
+ #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor.
+#endif
+
+/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall
+ * device characteristics, including the supported USB version, control endpoint size and the
+ * number of device configurations. The descriptor is read out by the USB host when the enumeration
+ * process begins.
+ */
+const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
+{
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
+
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = CDC_CSCP_CDCClass,
+ .SubClass = CDC_CSCP_NoSpecificSubclass,
+ .Protocol = CDC_CSCP_NoSpecificProtocol,
+
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
+
+ .VendorID = 0x03EB,
+ .ProductID = 0x204B,
+ .ReleaseNumber = VERSION_BCD(00.01),
+
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = USE_INTERNAL_SERIAL,
+
+ .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
+};
+
+/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
+ * of the device in one of its supported configurations, including information about any device interfaces
+ * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
+ * a configuration so that the host may correctly communicate with the USB device.
+ */
+const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
+{
+ .Config =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
+
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
+
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
+
+ .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_SELFPOWERED),
+
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
+ },
+
+ .CDC_CCI_Interface =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
+
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
+
+ .TotalEndpoints = 1,
+
+ .Class = CDC_CSCP_CDCClass,
+ .SubClass = CDC_CSCP_ACMSubclass,
+ .Protocol = CDC_CSCP_ATCommandProtocol,
+
+ .InterfaceStrIndex = NO_DESCRIPTOR
+ },
+
+ .CDC_Functional_Header =
+ {
+ .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface},
+ .Subtype = CDC_DSUBTYPE_CSInterface_Header,
+
+ .CDCSpecification = VERSION_BCD(01.10),
+ },
+
+ .CDC_Functional_ACM =
+ {
+ .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface},
+ .Subtype = CDC_DSUBTYPE_CSInterface_ACM,
+
+ .Capabilities = 0x06,
+ },
+
+ .CDC_Functional_Union =
+ {
+ .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
+ .Subtype = CDC_DSUBTYPE_CSInterface_Union,
+
+ .MasterInterfaceNumber = 0,
+ .SlaveInterfaceNumber = 1,
+ },
+
+ .CDC_NotificationEndpoint =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
+
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
+ .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,
+ .PollingIntervalMS = 0xFF
+ },
+
+ .CDC_DCI_Interface =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
+
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
+
+ .TotalEndpoints = 2,
+
+ .Class = CDC_CSCP_CDCDataClass,
+ .SubClass = CDC_CSCP_NoDataSubclass,
+ .Protocol = CDC_CSCP_NoDataProtocol,
+
+ .InterfaceStrIndex = NO_DESCRIPTOR
+ },
+
+ .CDC_DataOutEndpoint =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
+
+ .EndpointAddress = CDC_RX_EPADDR,
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x05
+ },
+
+ .CDC_DataInEndpoint =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
+
+ .EndpointAddress = CDC_TX_EPADDR,
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x05
+ }
+};
+
+/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests
+ * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
+ * via the language ID table available at USB.org what languages the device supports for its string descriptors.
+ */
+const USB_Descriptor_String_t PROGMEM LanguageString =
+{
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
+
+ .UnicodeString = {LANGUAGE_ID_ENG}
+};
+
+/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
+ * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
+ * Descriptor.
+ */
+const USB_Descriptor_String_t PROGMEM ManufacturerString =
+{
+ .Header = {.Size = USB_STRING_LEN(12), .Type = DTYPE_String},
+
+ .UnicodeString = L"Simon Foster"
+};
+
+/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
+ * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
+ * Descriptor.
+ */
+const USB_Descriptor_String_t PROGMEM ProductString =
+{
+ .Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},
+
+ .UnicodeString = L"USB-HD44780 Adapter"
+};
+
+/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"
+ * documentation) by the application code so that the address and size of a requested descriptor can be given
+ * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function
+ * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
+ * USB host.
+ */
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+ const uint8_t wIndex,
+ const void** const DescriptorAddress)
+{
+ const uint8_t DescriptorType = (wValue >> 8);
+ const uint8_t DescriptorNumber = (wValue & 0xFF);
+
+ const void* Address = NULL;
+ uint16_t Size = NO_DESCRIPTOR;
+
+ switch (DescriptorType)
+ {
+ case DTYPE_Device:
+ Address = &DeviceDescriptor;
+ Size = sizeof(USB_Descriptor_Device_t);
+ break;
+ case DTYPE_Configuration:
+ Address = &ConfigurationDescriptor;
+ Size = sizeof(USB_Descriptor_Configuration_t);
+ break;
+ case DTYPE_String:
+ switch (DescriptorNumber)
+ {
+ case 0x00:
+ Address = &LanguageString;
+ Size = pgm_read_byte(&LanguageString.Header.Size);
+ break;
+ case 0x01:
+ Address = &ManufacturerString;
+ Size = pgm_read_byte(&ManufacturerString.Header.Size);
+ break;
+ case 0x02:
+ Address = &ProductString;
+ Size = pgm_read_byte(&ProductString.Header.Size);
+ break;
+ }
+
+ break;
+ }
+
+ *DescriptorAddress = Address;
+ return Size;
+}
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Simon Foster (simon.foster [at] inbox [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
+ *
+ * Header file for Descriptors.c.
+ */
+
+#ifndef _DESCRIPTORS_H_
+#define _DESCRIPTORS_H_
+
+ /* Includes: */
+ #include <avr/pgmspace.h>
+
+ #include <LUFA/Drivers/USB/USB.h>
+
+ /* Macros: */
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
+
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
+
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
+
+ /** Size in bytes of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPSIZE 8
+
+ /** Size in bytes of the CDC data IN and OUT endpoints. */
+ #define CDC_TXRX_EPSIZE 16
+
+ /* Type Defines: */
+ /** Type define for the device configuration descriptor structure. This must be defined in the
+ * application code, as the configuration descriptor contains several sub-descriptors which
+ * vary between devices, and which describe the device's usage to the host.
+ */
+ typedef struct
+ {
+ USB_Descriptor_Configuration_Header_t Config;
+
+ // CDC Command Interface
+ USB_Descriptor_Interface_t CDC_CCI_Interface;
+ USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
+ USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
+ USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
+ USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
+
+ // CDC Data Interface
+ USB_Descriptor_Interface_t CDC_DCI_Interface;
+ USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
+ USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
+ } USB_Descriptor_Configuration_t;
+
+ /* Function Prototypes: */
+ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+ const uint8_t wIndex,
+ const void** const DescriptorAddress)
+ ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+
+#endif
+
--- /dev/null
+# Doxyfile 1.8.0\r
+\r
+# This file describes the settings to be used by the documentation system\r
+# doxygen (www.doxygen.org) for a project.\r
+#\r
+# All text after a hash (#) is considered a comment and will be ignored.\r
+# The format is:\r
+# TAG = value [value, ...]\r
+# For lists items can also be appended using:\r
+# TAG += value [value, ...]\r
+# Values that contain spaces should be placed between quotes (" ").\r
+\r
+#---------------------------------------------------------------------------\r
+# Project related configuration options\r
+#---------------------------------------------------------------------------\r
+\r
+# This tag specifies the encoding used for all characters in the config file\r
+# that follow. The default is UTF-8 which is also the encoding used for all\r
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the\r
+# iconv built into libc) for the transcoding. See\r
+# http://www.gnu.org/software/libiconv for the list of possible encodings.\r
+\r
+DOXYFILE_ENCODING = UTF-8\r
+\r
+# The PROJECT_NAME tag is a single word (or sequence of words) that should\r
+# identify the project. Note that if you do not use Doxywizard you need\r
+# to put quotes around the project name if it contains spaces.\r
+\r
+PROJECT_NAME = "Simon Foster's USB Serial to HD44780 LCD Project"\r
+\r
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.\r
+# This could be handy for archiving the generated documentation or\r
+# if some version control system is used.\r
+\r
+PROJECT_NUMBER = 0.0.0\r
+\r
+# Using the PROJECT_BRIEF tag one can provide an optional one line description\r
+# for a project that appears at the top of each page and should give viewer\r
+# a quick idea about the purpose of the project. Keep the description short.\r
+\r
+PROJECT_BRIEF =\r
+\r
+# With the PROJECT_LOGO tag one can specify an logo or icon that is\r
+# included in the documentation. The maximum height of the logo should not\r
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.\r
+# Doxygen will copy the logo to the output directory.\r
+\r
+PROJECT_LOGO =\r
+\r
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)\r
+# base path where the generated documentation will be put.\r
+# If a relative path is entered, it will be relative to the location\r
+# where doxygen was started. If left blank the current directory will be used.\r
+\r
+OUTPUT_DIRECTORY = ./Documentation/\r
+\r
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create\r
+# 4096 sub-directories (in 2 levels) under the output directory of each output\r
+# format and will distribute the generated files over these directories.\r
+# Enabling this option can be useful when feeding doxygen a huge amount of\r
+# source files, where putting all generated files in the same directory would\r
+# otherwise cause performance problems for the file system.\r
+\r
+CREATE_SUBDIRS = NO\r
+\r
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all\r
+# documentation generated by doxygen is written. Doxygen will use this\r
+# information to generate all constant output in the proper language.\r
+# The default language is English, other supported languages are:\r
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,\r
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,\r
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English\r
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,\r
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,\r
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.\r
+\r
+OUTPUT_LANGUAGE = English\r
+\r
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will\r
+# include brief member descriptions after the members that are listed in\r
+# the file and class documentation (similar to JavaDoc).\r
+# Set to NO to disable this.\r
+\r
+BRIEF_MEMBER_DESC = YES\r
+\r
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend\r
+# the brief description of a member or function before the detailed description.\r
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\r
+# brief descriptions will be completely suppressed.\r
+\r
+REPEAT_BRIEF = YES\r
+\r
+# This tag implements a quasi-intelligent brief description abbreviator\r
+# that is used to form the text in various listings. Each string\r
+# in this list, if found as the leading text of the brief description, will be\r
+# stripped from the text and the result after processing the whole list, is\r
+# used as the annotated text. Otherwise, the brief description is used as-is.\r
+# If left blank, the following values are used ("$name" is automatically\r
+# replaced with the name of the entity): "The $name class" "The $name widget"\r
+# "The $name file" "is" "provides" "specifies" "contains"\r
+# "represents" "a" "an" "the"\r
+\r
+ABBREVIATE_BRIEF = "The $name class" \\r
+ "The $name widget" \\r
+ "The $name file" \\r
+ is \\r
+ provides \\r
+ specifies \\r
+ contains \\r
+ represents \\r
+ a \\r
+ an \\r
+ the\r
+\r
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\r
+# Doxygen will generate a detailed section even if there is only a brief\r
+# description.\r
+\r
+ALWAYS_DETAILED_SEC = NO\r
+\r
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\r
+# inherited members of a class in the documentation of that class as if those\r
+# members were ordinary class members. Constructors, destructors and assignment\r
+# operators of the base classes will not be shown.\r
+\r
+INLINE_INHERITED_MEMB = NO\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full\r
+# path before files name in the file list and in the header files. If set\r
+# to NO the shortest path that makes the file name unique will be used.\r
+\r
+FULL_PATH_NAMES = YES\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag\r
+# can be used to strip a user-defined part of the path. Stripping is\r
+# only done if one of the specified strings matches the left-hand part of\r
+# the path. The tag can be used to show relative paths in the file list.\r
+# If left blank the directory from which doxygen is run is used as the\r
+# path to strip.\r
+\r
+STRIP_FROM_PATH =\r
+\r
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of\r
+# the path mentioned in the documentation of a class, which tells\r
+# the reader which header file to include in order to use a class.\r
+# If left blank only the name of the header file containing the class\r
+# definition is used. Otherwise one should specify the include paths that\r
+# are normally passed to the compiler using the -I flag.\r
+\r
+STRIP_FROM_INC_PATH =\r
+\r
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter\r
+# (but less readable) file names. This can be useful if your file system\r
+# doesn't support long names like on DOS, Mac, or CD-ROM.\r
+\r
+SHORT_NAMES = YES\r
+\r
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen\r
+# will interpret the first line (until the first dot) of a JavaDoc-style\r
+# comment as the brief description. If set to NO, the JavaDoc\r
+# comments will behave just like regular Qt-style comments\r
+# (thus requiring an explicit @brief command for a brief description.)\r
+\r
+JAVADOC_AUTOBRIEF = NO\r
+\r
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will\r
+# interpret the first line (until the first dot) of a Qt-style\r
+# comment as the brief description. If set to NO, the comments\r
+# will behave just like regular Qt-style comments (thus requiring\r
+# an explicit \brief command for a brief description.)\r
+\r
+QT_AUTOBRIEF = NO\r
+\r
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen\r
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///\r
+# comments) as a brief description. This used to be the default behaviour.\r
+# The new default is to treat a multi-line C++ comment block as a detailed\r
+# description. Set this tag to YES if you prefer the old behaviour instead.\r
+\r
+MULTILINE_CPP_IS_BRIEF = NO\r
+\r
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented\r
+# member inherits the documentation from any documented member that it\r
+# re-implements.\r
+\r
+INHERIT_DOCS = YES\r
+\r
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce\r
+# a new page for each member. If set to NO, the documentation of a member will\r
+# be part of the file/class/namespace that contains it.\r
+\r
+SEPARATE_MEMBER_PAGES = NO\r
+\r
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.\r
+# Doxygen uses this value to replace tabs by spaces in code fragments.\r
+\r
+TAB_SIZE = 4\r
+\r
+# This tag can be used to specify a number of aliases that acts\r
+# as commands in the documentation. An alias has the form "name=value".\r
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to\r
+# put the command \sideeffect (or @sideeffect) in the documentation, which\r
+# will result in a user-defined paragraph with heading "Side Effects:".\r
+# You can put \n's in the value part of an alias to insert newlines.\r
+\r
+ALIASES =\r
+\r
+# This tag can be used to specify a number of word-keyword mappings (TCL only).\r
+# A mapping has the form "name=value". For example adding\r
+# "class=itcl::class" will allow you to use the command class in the\r
+# itcl::class meaning.\r
+\r
+TCL_SUBST =\r
+\r
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C\r
+# sources only. Doxygen will then generate output that is more tailored for C.\r
+# For instance, some of the names that are used will be different. The list\r
+# of all members will be omitted, etc.\r
+\r
+OPTIMIZE_OUTPUT_FOR_C = YES\r
+\r
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java\r
+# sources only. Doxygen will then generate output that is more tailored for\r
+# Java. For instance, namespaces will be presented as packages, qualified\r
+# scopes will look different, etc.\r
+\r
+OPTIMIZE_OUTPUT_JAVA = NO\r
+\r
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\r
+# sources only. Doxygen will then generate output that is more tailored for\r
+# Fortran.\r
+\r
+OPTIMIZE_FOR_FORTRAN = NO\r
+\r
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\r
+# sources. Doxygen will then generate output that is tailored for\r
+# VHDL.\r
+\r
+OPTIMIZE_OUTPUT_VHDL = NO\r
+\r
+# Doxygen selects the parser to use depending on the extension of the files it\r
+# parses. With this tag you can assign which parser to use for a given extension.\r
+# Doxygen has a built-in mapping, but you can override or extend it using this\r
+# tag. The format is ext=language, where ext is a file extension, and language\r
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,\r
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make\r
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C\r
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions\r
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.\r
+\r
+EXTENSION_MAPPING =\r
+\r
+# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all\r
+# comments according to the Markdown format, which allows for more readable\r
+# documentation. See http://daringfireball.net/projects/markdown/ for details.\r
+# The output of markdown processing is further processed by doxygen, so you\r
+# can mix doxygen, HTML, and XML commands with Markdown formatting.\r
+# Disable only in case of backward compatibilities issues.\r
+\r
+MARKDOWN_SUPPORT = NO\r
+\r
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\r
+# to include (a tag file for) the STL sources as input, then you should\r
+# set this tag to YES in order to let doxygen match functions declarations and\r
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.\r
+# func(std::string) {}). This also makes the inheritance and collaboration\r
+# diagrams that involve STL classes more complete and accurate.\r
+\r
+BUILTIN_STL_SUPPORT = NO\r
+\r
+# If you use Microsoft's C++/CLI language, you should set this option to YES to\r
+# enable parsing support.\r
+\r
+CPP_CLI_SUPPORT = NO\r
+\r
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.\r
+# Doxygen will parse them like normal C++ but will assume all classes use public\r
+# instead of private inheritance when no explicit protection keyword is present.\r
+\r
+SIP_SUPPORT = NO\r
+\r
+# For Microsoft's IDL there are propget and propput attributes to indicate getter\r
+# and setter methods for a property. Setting this option to YES (the default)\r
+# will make doxygen replace the get and set methods by a property in the\r
+# documentation. This will only work if the methods are indeed getting or\r
+# setting a simple type. If this is not the case, or you want to show the\r
+# methods anyway, you should set this option to NO.\r
+\r
+IDL_PROPERTY_SUPPORT = YES\r
+\r
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\r
+# tag is set to YES, then doxygen will reuse the documentation of the first\r
+# member in the group (if any) for the other members of the group. By default\r
+# all members of a group must be documented explicitly.\r
+\r
+DISTRIBUTE_GROUP_DOC = NO\r
+\r
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of\r
+# the same type (for instance a group of public functions) to be put as a\r
+# subgroup of that type (e.g. under the Public Functions section). Set it to\r
+# NO to prevent subgrouping. Alternatively, this can be done per class using\r
+# the \nosubgrouping command.\r
+\r
+SUBGROUPING = YES\r
+\r
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and\r
+# unions are shown inside the group in which they are included (e.g. using\r
+# @ingroup) instead of on a separate page (for HTML and Man pages) or\r
+# section (for LaTeX and RTF).\r
+\r
+INLINE_GROUPED_CLASSES = NO\r
+\r
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and\r
+# unions with only public data fields will be shown inline in the documentation\r
+# of the scope in which they are defined (i.e. file, namespace, or group\r
+# documentation), provided this scope is documented. If set to NO (the default),\r
+# structs, classes, and unions are shown on a separate page (for HTML and Man\r
+# pages) or section (for LaTeX and RTF).\r
+\r
+INLINE_SIMPLE_STRUCTS = NO\r
+\r
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum\r
+# is documented as struct, union, or enum with the name of the typedef. So\r
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\r
+# with name TypeT. When disabled the typedef will appear as a member of a file,\r
+# namespace, or class. And the struct will be named TypeS. This can typically\r
+# be useful for C code in case the coding convention dictates that all compound\r
+# types are typedef'ed and only the typedef is referenced, never the tag name.\r
+\r
+TYPEDEF_HIDES_STRUCT = NO\r
+\r
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to\r
+# determine which symbols to keep in memory and which to flush to disk.\r
+# When the cache is full, less often used symbols will be written to disk.\r
+# For small to medium size projects (<1000 input files) the default value is\r
+# probably good enough. For larger projects a too small cache size can cause\r
+# doxygen to be busy swapping symbols to and from disk most of the time\r
+# causing a significant performance penalty.\r
+# If the system has enough physical memory increasing the cache will improve the\r
+# performance by keeping more symbols in memory. Note that the value works on\r
+# a logarithmic scale so increasing the size by one will roughly double the\r
+# memory usage. The cache size is given by this formula:\r
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,\r
+# corresponding to a cache size of 2^16 = 65536 symbols.\r
+\r
+SYMBOL_CACHE_SIZE = 0\r
+\r
+# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be\r
+# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given\r
+# their name and scope. Since this can be an expensive process and often the\r
+# same symbol appear multiple times in the code, doxygen keeps a cache of\r
+# pre-resolved symbols. If the cache is too small doxygen will become slower.\r
+# If the cache is too large, memory is wasted. The cache size is given by this\r
+# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,\r
+# corresponding to a cache size of 2^16 = 65536 symbols.\r
+\r
+LOOKUP_CACHE_SIZE = 0\r
+\r
+#---------------------------------------------------------------------------\r
+# Build related configuration options\r
+#---------------------------------------------------------------------------\r
+\r
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in\r
+# documentation are documented, even if no documentation was available.\r
+# Private class members and static file members will be hidden unless\r
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES\r
+\r
+EXTRACT_ALL = YES\r
+\r
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class\r
+# will be included in the documentation.\r
+\r
+EXTRACT_PRIVATE = YES\r
+\r
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.\r
+\r
+EXTRACT_PACKAGE = NO\r
+\r
+# If the EXTRACT_STATIC tag is set to YES all static members of a file\r
+# will be included in the documentation.\r
+\r
+EXTRACT_STATIC = YES\r
+\r
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)\r
+# defined locally in source files will be included in the documentation.\r
+# If set to NO only classes defined in header files are included.\r
+\r
+EXTRACT_LOCAL_CLASSES = YES\r
+\r
+# This flag is only useful for Objective-C code. When set to YES local\r
+# methods, which are defined in the implementation section but not in\r
+# the interface are included in the documentation.\r
+# If set to NO (the default) only methods in the interface are included.\r
+\r
+EXTRACT_LOCAL_METHODS = NO\r
+\r
+# If this flag is set to YES, the members of anonymous namespaces will be\r
+# extracted and appear in the documentation as a namespace called\r
+# 'anonymous_namespace{file}', where file will be replaced with the base\r
+# name of the file that contains the anonymous namespace. By default\r
+# anonymous namespaces are hidden.\r
+\r
+EXTRACT_ANON_NSPACES = NO\r
+\r
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all\r
+# undocumented members of documented classes, files or namespaces.\r
+# If set to NO (the default) these members will be included in the\r
+# various overviews, but no documentation section is generated.\r
+# This option has no effect if EXTRACT_ALL is enabled.\r
+\r
+HIDE_UNDOC_MEMBERS = NO\r
+\r
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all\r
+# undocumented classes that are normally visible in the class hierarchy.\r
+# If set to NO (the default) these classes will be included in the various\r
+# overviews. This option has no effect if EXTRACT_ALL is enabled.\r
+\r
+HIDE_UNDOC_CLASSES = NO\r
+\r
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all\r
+# friend (class|struct|union) declarations.\r
+# If set to NO (the default) these declarations will be included in the\r
+# documentation.\r
+\r
+HIDE_FRIEND_COMPOUNDS = NO\r
+\r
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any\r
+# documentation blocks found inside the body of a function.\r
+# If set to NO (the default) these blocks will be appended to the\r
+# function's detailed documentation block.\r
+\r
+HIDE_IN_BODY_DOCS = NO\r
+\r
+# The INTERNAL_DOCS tag determines if documentation\r
+# that is typed after a \internal command is included. If the tag is set\r
+# to NO (the default) then the documentation will be excluded.\r
+# Set it to YES to include the internal documentation.\r
+\r
+INTERNAL_DOCS = NO\r
+\r
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate\r
+# file names in lower-case letters. If set to YES upper-case letters are also\r
+# allowed. This is useful if you have classes or files whose names only differ\r
+# in case and if your file system supports case sensitive file names. Windows\r
+# and Mac users are advised to set this option to NO.\r
+\r
+CASE_SENSE_NAMES = NO\r
+\r
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen\r
+# will show members with their full class and namespace scopes in the\r
+# documentation. If set to YES the scope will be hidden.\r
+\r
+HIDE_SCOPE_NAMES = NO\r
+\r
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen\r
+# will put a list of the files that are included by a file in the documentation\r
+# of that file.\r
+\r
+SHOW_INCLUDE_FILES = YES\r
+\r
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen\r
+# will list include files with double quotes in the documentation\r
+# rather than with sharp brackets.\r
+\r
+FORCE_LOCAL_INCLUDES = NO\r
+\r
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]\r
+# is inserted in the documentation for inline members.\r
+\r
+INLINE_INFO = YES\r
+\r
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen\r
+# will sort the (detailed) documentation of file and class members\r
+# alphabetically by member name. If set to NO the members will appear in\r
+# declaration order.\r
+\r
+SORT_MEMBER_DOCS = YES\r
+\r
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the\r
+# brief documentation of file, namespace and class members alphabetically\r
+# by member name. If set to NO (the default) the members will appear in\r
+# declaration order.\r
+\r
+SORT_BRIEF_DOCS = NO\r
+\r
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen\r
+# will sort the (brief and detailed) documentation of class members so that\r
+# constructors and destructors are listed first. If set to NO (the default)\r
+# the constructors will appear in the respective orders defined by\r
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.\r
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO\r
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.\r
+\r
+SORT_MEMBERS_CTORS_1ST = NO\r
+\r
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the\r
+# hierarchy of group names into alphabetical order. If set to NO (the default)\r
+# the group names will appear in their defined order.\r
+\r
+SORT_GROUP_NAMES = NO\r
+\r
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be\r
+# sorted by fully-qualified names, including namespaces. If set to\r
+# NO (the default), the class list will be sorted only by class name,\r
+# not including the namespace part.\r
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\r
+# Note: This option applies only to the class list, not to the\r
+# alphabetical list.\r
+\r
+SORT_BY_SCOPE_NAME = NO\r
+\r
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to\r
+# do proper type resolution of all parameters of a function it will reject a\r
+# match between the prototype and the implementation of a member function even\r
+# if there is only one candidate or it is obvious which candidate to choose\r
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen\r
+# will still accept a match between prototype and implementation in such cases.\r
+\r
+STRICT_PROTO_MATCHING = NO\r
+\r
+# The GENERATE_TODOLIST tag can be used to enable (YES) or\r
+# disable (NO) the todo list. This list is created by putting \todo\r
+# commands in the documentation.\r
+\r
+GENERATE_TODOLIST = NO\r
+\r
+# The GENERATE_TESTLIST tag can be used to enable (YES) or\r
+# disable (NO) the test list. This list is created by putting \test\r
+# commands in the documentation.\r
+\r
+GENERATE_TESTLIST = NO\r
+\r
+# The GENERATE_BUGLIST tag can be used to enable (YES) or\r
+# disable (NO) the bug list. This list is created by putting \bug\r
+# commands in the documentation.\r
+\r
+GENERATE_BUGLIST = NO\r
+\r
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or\r
+# disable (NO) the deprecated list. This list is created by putting\r
+# \deprecated commands in the documentation.\r
+\r
+GENERATE_DEPRECATEDLIST= YES\r
+\r
+# The ENABLED_SECTIONS tag can be used to enable conditional\r
+# documentation sections, marked by \if sectionname ... \endif.\r
+\r
+ENABLED_SECTIONS =\r
+\r
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines\r
+# the initial value of a variable or macro consists of for it to appear in\r
+# the documentation. If the initializer consists of more lines than specified\r
+# here it will be hidden. Use a value of 0 to hide initializers completely.\r
+# The appearance of the initializer of individual variables and macros in the\r
+# documentation can be controlled using \showinitializer or \hideinitializer\r
+# command in the documentation regardless of this setting.\r
+\r
+MAX_INITIALIZER_LINES = 30\r
+\r
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated\r
+# at the bottom of the documentation of classes and structs. If set to YES the\r
+# list will mention the files that were used to generate the documentation.\r
+\r
+SHOW_USED_FILES = YES\r
+\r
+# If the sources in your project are distributed over multiple directories\r
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy\r
+# in the documentation. The default is NO.\r
+\r
+SHOW_DIRECTORIES = YES\r
+\r
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.\r
+# This will remove the Files entry from the Quick Index and from the\r
+# Folder Tree View (if specified). The default is YES.\r
+\r
+SHOW_FILES = YES\r
+\r
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the\r
+# Namespaces page.\r
+# This will remove the Namespaces entry from the Quick Index\r
+# and from the Folder Tree View (if specified). The default is YES.\r
+\r
+SHOW_NAMESPACES = YES\r
+\r
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that\r
+# doxygen should invoke to get the current version for each file (typically from\r
+# the version control system). Doxygen will invoke the program by executing (via\r
+# popen()) the command <command> <input-file>, where <command> is the value of\r
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file\r
+# provided by doxygen. Whatever the program writes to standard output\r
+# is used as the file version. See the manual for examples.\r
+\r
+FILE_VERSION_FILTER =\r
+\r
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\r
+# by doxygen. The layout file controls the global structure of the generated\r
+# output files in an output format independent way. The create the layout file\r
+# that represents doxygen's defaults, run doxygen with the -l option.\r
+# You can optionally specify a file name after the option, if omitted\r
+# DoxygenLayout.xml will be used as the name of the layout file.\r
+\r
+LAYOUT_FILE =\r
+\r
+# The CITE_BIB_FILES tag can be used to specify one or more bib files\r
+# containing the references data. This must be a list of .bib files. The\r
+# .bib extension is automatically appended if omitted. Using this command\r
+# requires the bibtex tool to be installed. See also\r
+# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\r
+# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this\r
+# feature you need bibtex and perl available in the search path.\r
+\r
+CITE_BIB_FILES =\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to warning and progress messages\r
+#---------------------------------------------------------------------------\r
+\r
+# The QUIET tag can be used to turn on/off the messages that are generated\r
+# by doxygen. Possible values are YES and NO. If left blank NO is used.\r
+\r
+QUIET = YES\r
+\r
+# The WARNINGS tag can be used to turn on/off the warning messages that are\r
+# generated by doxygen. Possible values are YES and NO. If left blank\r
+# NO is used.\r
+\r
+WARNINGS = YES\r
+\r
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings\r
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will\r
+# automatically be disabled.\r
+\r
+WARN_IF_UNDOCUMENTED = YES\r
+\r
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for\r
+# potential errors in the documentation, such as not documenting some\r
+# parameters in a documented function, or documenting parameters that\r
+# don't exist or using markup commands wrongly.\r
+\r
+WARN_IF_DOC_ERROR = YES\r
+\r
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for\r
+# functions that are documented, but have no documentation for their parameters\r
+# or return value. If set to NO (the default) doxygen will only warn about\r
+# wrong or incomplete parameter documentation, but not about the absence of\r
+# documentation.\r
+\r
+WARN_NO_PARAMDOC = YES\r
+\r
+# The WARN_FORMAT tag determines the format of the warning messages that\r
+# doxygen can produce. The string should contain the $file, $line, and $text\r
+# tags, which will be replaced by the file and line number from which the\r
+# warning originated and the warning text. Optionally the format may contain\r
+# $version, which will be replaced by the version of the file (if it could\r
+# be obtained via FILE_VERSION_FILTER)\r
+\r
+WARN_FORMAT = "$file:$line: $text"\r
+\r
+# The WARN_LOGFILE tag can be used to specify a file to which warning\r
+# and error messages should be written. If left blank the output is written\r
+# to stderr.\r
+\r
+WARN_LOGFILE =\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the input files\r
+#---------------------------------------------------------------------------\r
+\r
+# The INPUT tag can be used to specify the files and/or directories that contain\r
+# documented source files. You may enter file names like "myfile.cpp" or\r
+# directories like "/usr/src/myproject". Separate the files or directories\r
+# with spaces.\r
+\r
+INPUT = ./\r
+\r
+# This tag can be used to specify the character encoding of the source files\r
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is\r
+# also the default input encoding. Doxygen uses libiconv (or the iconv built\r
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for\r
+# the list of possible encodings.\r
+\r
+INPUT_ENCODING = UTF-8\r
+\r
+# If the value of the INPUT tag contains directories, you can use the\r
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\r
+# and *.h) to filter out the source-files in the directories. If left\r
+# blank the following patterns are tested:\r
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh\r
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py\r
+# *.f90 *.f *.for *.vhd *.vhdl\r
+\r
+FILE_PATTERNS = *.h \\r
+ *.c \\r
+ *.txt\r
+\r
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories\r
+# should be searched for input files as well. Possible values are YES and NO.\r
+# If left blank NO is used.\r
+\r
+RECURSIVE = YES\r
+\r
+# The EXCLUDE tag can be used to specify files and/or directories that should be\r
+# excluded from the INPUT source files. This way you can easily exclude a\r
+# subdirectory from a directory tree whose root is specified with the INPUT tag.\r
+# Note that relative paths are relative to the directory from which doxygen is\r
+# run.\r
+\r
+EXCLUDE = Documentation/\r
+\r
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\r
+# directories that are symbolic links (a Unix file system feature) are excluded\r
+# from the input.\r
+\r
+EXCLUDE_SYMLINKS = NO\r
+\r
+# If the value of the INPUT tag contains directories, you can use the\r
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\r
+# certain files from those directories. Note that the wildcards are matched\r
+# against the file with absolute path, so to exclude all test directories\r
+# for example use the pattern */test/*\r
+\r
+EXCLUDE_PATTERNS =\r
+\r
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\r
+# (namespaces, classes, functions, etc.) that should be excluded from the\r
+# output. The symbol name can be a fully qualified name, a word, or if the\r
+# wildcard * is used, a substring. Examples: ANamespace, AClass,\r
+# AClass::ANamespace, ANamespace::*Test\r
+\r
+EXCLUDE_SYMBOLS = __* \\r
+ INCLUDE_FROM_*\r
+\r
+# The EXAMPLE_PATH tag can be used to specify one or more files or\r
+# directories that contain example code fragments that are included (see\r
+# the \include command).\r
+\r
+EXAMPLE_PATH =\r
+\r
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the\r
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\r
+# and *.h) to filter out the source-files in the directories. If left\r
+# blank all files are included.\r
+\r
+EXAMPLE_PATTERNS = *\r
+\r
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\r
+# searched for input files to be used with the \include or \dontinclude\r
+# commands irrespective of the value of the RECURSIVE tag.\r
+# Possible values are YES and NO. If left blank NO is used.\r
+\r
+EXAMPLE_RECURSIVE = NO\r
+\r
+# The IMAGE_PATH tag can be used to specify one or more files or\r
+# directories that contain image that are included in the documentation (see\r
+# the \image command).\r
+\r
+IMAGE_PATH =\r
+\r
+# The INPUT_FILTER tag can be used to specify a program that doxygen should\r
+# invoke to filter for each input file. Doxygen will invoke the filter program\r
+# by executing (via popen()) the command <filter> <input-file>, where <filter>\r
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an\r
+# input file. Doxygen will then use the output that the filter program writes\r
+# to standard output.\r
+# If FILTER_PATTERNS is specified, this tag will be\r
+# ignored.\r
+\r
+INPUT_FILTER =\r
+\r
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\r
+# basis.\r
+# Doxygen will compare the file name with each pattern and apply the\r
+# filter if there is a match.\r
+# The filters are a list of the form:\r
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further\r
+# info on how filters are used. If FILTER_PATTERNS is empty or if\r
+# non of the patterns match the file name, INPUT_FILTER is applied.\r
+\r
+FILTER_PATTERNS =\r
+\r
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\r
+# INPUT_FILTER) will be used to filter the input files when producing source\r
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).\r
+\r
+FILTER_SOURCE_FILES = NO\r
+\r
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\r
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)\r
+# and it is also possible to disable source filtering for a specific pattern\r
+# using *.ext= (so without naming a filter). This option only has effect when\r
+# FILTER_SOURCE_FILES is enabled.\r
+\r
+FILTER_SOURCE_PATTERNS =\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to source browsing\r
+#---------------------------------------------------------------------------\r
+\r
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will\r
+# be generated. Documented entities will be cross-referenced with these sources.\r
+# Note: To get rid of all source code in the generated output, make sure also\r
+# VERBATIM_HEADERS is set to NO.\r
+\r
+SOURCE_BROWSER = NO\r
+\r
+# Setting the INLINE_SOURCES tag to YES will include the body\r
+# of functions and classes directly in the documentation.\r
+\r
+INLINE_SOURCES = NO\r
+\r
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct\r
+# doxygen to hide any special comment blocks from generated source code\r
+# fragments. Normal C and C++ comments will always remain visible.\r
+\r
+STRIP_CODE_COMMENTS = YES\r
+\r
+# If the REFERENCED_BY_RELATION tag is set to YES\r
+# then for each documented function all documented\r
+# functions referencing it will be listed.\r
+\r
+REFERENCED_BY_RELATION = NO\r
+\r
+# If the REFERENCES_RELATION tag is set to YES\r
+# then for each documented function all documented entities\r
+# called/used by that function will be listed.\r
+\r
+REFERENCES_RELATION = NO\r
+\r
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\r
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\r
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\r
+# link to the source code.\r
+# Otherwise they will link to the documentation.\r
+\r
+REFERENCES_LINK_SOURCE = NO\r
+\r
+# If the USE_HTAGS tag is set to YES then the references to source code\r
+# will point to the HTML generated by the htags(1) tool instead of doxygen\r
+# built-in source browser. The htags tool is part of GNU's global source\r
+# tagging system (see http://www.gnu.org/software/global/global.html). You\r
+# will need version 4.8.6 or higher.\r
+\r
+USE_HTAGS = NO\r
+\r
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen\r
+# will generate a verbatim copy of the header file for each class for\r
+# which an include is specified. Set to NO to disable this.\r
+\r
+VERBATIM_HEADERS = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the alphabetical class index\r
+#---------------------------------------------------------------------------\r
+\r
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index\r
+# of all compounds will be generated. Enable this if the project\r
+# contains a lot of classes, structs, unions or interfaces.\r
+\r
+ALPHABETICAL_INDEX = YES\r
+\r
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then\r
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns\r
+# in which this list will be split (can be a number in the range [1..20])\r
+\r
+COLS_IN_ALPHA_INDEX = 5\r
+\r
+# In case all classes in a project start with a common prefix, all\r
+# classes will be put under the same header in the alphabetical index.\r
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that\r
+# should be ignored while generating the index headers.\r
+\r
+IGNORE_PREFIX =\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the HTML output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will\r
+# generate HTML output.\r
+\r
+GENERATE_HTML = YES\r
+\r
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.\r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be\r
+# put in front of it. If left blank `html' will be used as the default path.\r
+\r
+HTML_OUTPUT = html\r
+\r
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for\r
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank\r
+# doxygen will generate files with .html extension.\r
+\r
+HTML_FILE_EXTENSION = .html\r
+\r
+# The HTML_HEADER tag can be used to specify a personal HTML header for\r
+# each generated HTML page. If it is left blank doxygen will generate a\r
+# standard header. Note that when using a custom header you are responsible\r
+# for the proper inclusion of any scripts and style sheets that doxygen\r
+# needs, which is dependent on the configuration options used.\r
+# It is advised to generate a default header using "doxygen -w html\r
+# header.html footer.html stylesheet.css YourConfigFile" and then modify\r
+# that header. Note that the header is subject to change so you typically\r
+# have to redo this when upgrading to a newer version of doxygen or when\r
+# changing the value of configuration settings such as GENERATE_TREEVIEW!\r
+\r
+HTML_HEADER =\r
+\r
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for\r
+# each generated HTML page. If it is left blank doxygen will generate a\r
+# standard footer.\r
+\r
+HTML_FOOTER =\r
+\r
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading\r
+# style sheet that is used by each HTML page. It can be used to\r
+# fine-tune the look of the HTML output. If the tag is left blank doxygen\r
+# will generate a default style sheet. Note that doxygen will try to copy\r
+# the style sheet file to the HTML output directory, so don't put your own\r
+# style sheet in the HTML output directory as well, or it will be erased!\r
+\r
+HTML_STYLESHEET =\r
+\r
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\r
+# other source files which should be copied to the HTML output directory. Note\r
+# that these files will be copied to the base HTML output directory. Use the\r
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\r
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that\r
+# the files will be copied as-is; there are no commands or markers available.\r
+\r
+HTML_EXTRA_FILES =\r
+\r
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.\r
+# Doxygen will adjust the colors in the style sheet and background images\r
+# according to this color. Hue is specified as an angle on a colorwheel,\r
+# see http://en.wikipedia.org/wiki/Hue for more information.\r
+# For instance the value 0 represents red, 60 is yellow, 120 is green,\r
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.\r
+# The allowed range is 0 to 359.\r
+\r
+HTML_COLORSTYLE_HUE = 220\r
+\r
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of\r
+# the colors in the HTML output. For a value of 0 the output will use\r
+# grayscales only. A value of 255 will produce the most vivid colors.\r
+\r
+HTML_COLORSTYLE_SAT = 100\r
+\r
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to\r
+# the luminance component of the colors in the HTML output. Values below\r
+# 100 gradually make the output lighter, whereas values above 100 make\r
+# the output darker. The value divided by 100 is the actual gamma applied,\r
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,\r
+# and 100 does not change the gamma.\r
+\r
+HTML_COLORSTYLE_GAMMA = 80\r
+\r
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\r
+# page will contain the date and time when the page was generated. Setting\r
+# this to NO can help when comparing the output of multiple runs.\r
+\r
+HTML_TIMESTAMP = NO\r
+\r
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,\r
+# files or namespaces will be aligned in HTML using tables. If set to\r
+# NO a bullet list will be used.\r
+\r
+HTML_ALIGN_MEMBERS = YES\r
+\r
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\r
+# documentation will contain sections that can be hidden and shown after the\r
+# page has loaded. For this to work a browser that supports\r
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox\r
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).\r
+\r
+HTML_DYNAMIC_SECTIONS = YES\r
+\r
+# If the GENERATE_DOCSET tag is set to YES, additional index files\r
+# will be generated that can be used as input for Apple's Xcode 3\r
+# integrated development environment, introduced with OSX 10.5 (Leopard).\r
+# To create a documentation set, doxygen will generate a Makefile in the\r
+# HTML output directory. Running make will produce the docset in that\r
+# directory and running "make install" will install the docset in\r
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find\r
+# it at startup.\r
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\r
+# for more information.\r
+\r
+GENERATE_DOCSET = NO\r
+\r
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the\r
+# feed. A documentation feed provides an umbrella under which multiple\r
+# documentation sets from a single provider (such as a company or product suite)\r
+# can be grouped.\r
+\r
+DOCSET_FEEDNAME = "Doxygen generated docs"\r
+\r
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that\r
+# should uniquely identify the documentation set bundle. This should be a\r
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen\r
+# will append .docset to the name.\r
+\r
+DOCSET_BUNDLE_ID = org.doxygen.Project\r
+\r
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify\r
+# the documentation publisher. This should be a reverse domain-name style\r
+# string, e.g. com.mycompany.MyDocSet.documentation.\r
+\r
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher\r
+\r
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.\r
+\r
+DOCSET_PUBLISHER_NAME = Publisher\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files\r
+# will be generated that can be used as input for tools like the\r
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)\r
+# of the generated HTML documentation.\r
+\r
+GENERATE_HTMLHELP = NO\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can\r
+# be used to specify the file name of the resulting .chm file. You\r
+# can add a path in front of the file if the result should not be\r
+# written to the html output directory.\r
+\r
+CHM_FILE =\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can\r
+# be used to specify the location (absolute path including file name) of\r
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run\r
+# the HTML help compiler on the generated index.hhp.\r
+\r
+HHC_LOCATION =\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag\r
+# controls if a separate .chi index file is generated (YES) or that\r
+# it should be included in the master .chm file (NO).\r
+\r
+GENERATE_CHI = NO\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING\r
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file\r
+# content.\r
+\r
+CHM_INDEX_ENCODING =\r
+\r
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag\r
+# controls whether a binary table of contents is generated (YES) or a\r
+# normal table of contents (NO) in the .chm file.\r
+\r
+BINARY_TOC = NO\r
+\r
+# The TOC_EXPAND flag can be set to YES to add extra items for group members\r
+# to the contents of the HTML help documentation and to the tree view.\r
+\r
+TOC_EXPAND = YES\r
+\r
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\r
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated\r
+# that can be used as input for Qt's qhelpgenerator to generate a\r
+# Qt Compressed Help (.qch) of the generated HTML documentation.\r
+\r
+GENERATE_QHP = NO\r
+\r
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can\r
+# be used to specify the file name of the resulting .qch file.\r
+# The path specified is relative to the HTML output folder.\r
+\r
+QCH_FILE =\r
+\r
+# The QHP_NAMESPACE tag specifies the namespace to use when generating\r
+# Qt Help Project output. For more information please see\r
+# http://doc.trolltech.com/qthelpproject.html#namespace\r
+\r
+QHP_NAMESPACE = org.doxygen.Project\r
+\r
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating\r
+# Qt Help Project output. For more information please see\r
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders\r
+\r
+QHP_VIRTUAL_FOLDER = doc\r
+\r
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to\r
+# add. For more information please see\r
+# http://doc.trolltech.com/qthelpproject.html#custom-filters\r
+\r
+QHP_CUST_FILTER_NAME =\r
+\r
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the\r
+# custom filter to add. For more information please see\r
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">\r
+# Qt Help Project / Custom Filters</a>.\r
+\r
+QHP_CUST_FILTER_ATTRS =\r
+\r
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\r
+# project's\r
+# filter section matches.\r
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">\r
+# Qt Help Project / Filter Attributes</a>.\r
+\r
+QHP_SECT_FILTER_ATTRS =\r
+\r
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can\r
+# be used to specify the location of Qt's qhelpgenerator.\r
+# If non-empty doxygen will try to run qhelpgenerator on the generated\r
+# .qhp file.\r
+\r
+QHG_LOCATION =\r
+\r
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files\r
+# will be generated, which together with the HTML files, form an Eclipse help\r
+# plugin. To install this plugin and make it available under the help contents\r
+# menu in Eclipse, the contents of the directory containing the HTML and XML\r
+# files needs to be copied into the plugins directory of eclipse. The name of\r
+# the directory within the plugins directory should be the same as\r
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before\r
+# the help appears.\r
+\r
+GENERATE_ECLIPSEHELP = NO\r
+\r
+# A unique identifier for the eclipse help plugin. When installing the plugin\r
+# the directory name containing the HTML and XML files should also have\r
+# this name.\r
+\r
+ECLIPSE_DOC_ID = org.doxygen.Project\r
+\r
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)\r
+# at top of each HTML page. The value NO (the default) enables the index and\r
+# the value YES disables it. Since the tabs have the same information as the\r
+# navigation tree you can set this option to NO if you already set\r
+# GENERATE_TREEVIEW to YES.\r
+\r
+DISABLE_INDEX = NO\r
+\r
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\r
+# structure should be generated to display hierarchical information.\r
+# If the tag value is set to YES, a side panel will be generated\r
+# containing a tree-like index structure (just like the one that\r
+# is generated for HTML Help). For this to work a browser that supports\r
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).\r
+# Windows users are probably better off using the HTML help feature.\r
+# Since the tree basically has the same information as the tab index you\r
+# could consider to set DISABLE_INDEX to NO when enabling this option.\r
+\r
+GENERATE_TREEVIEW = YES\r
+\r
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values\r
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML\r
+# documentation. Note that a value of 0 will completely suppress the enum\r
+# values from appearing in the overview section.\r
+\r
+ENUM_VALUES_PER_LINE = 1\r
+\r
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,\r
+# and Class Hierarchy pages using a tree view instead of an ordered list.\r
+\r
+USE_INLINE_TREES = NO\r
+\r
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be\r
+# used to set the initial width (in pixels) of the frame in which the tree\r
+# is shown.\r
+\r
+TREEVIEW_WIDTH = 250\r
+\r
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open\r
+# links to external symbols imported via tag files in a separate window.\r
+\r
+EXT_LINKS_IN_WINDOW = NO\r
+\r
+# Use this tag to change the font size of Latex formulas included\r
+# as images in the HTML documentation. The default is 10. Note that\r
+# when you change the font size after a successful doxygen run you need\r
+# to manually remove any form_*.png images from the HTML output directory\r
+# to force them to be regenerated.\r
+\r
+FORMULA_FONTSIZE = 10\r
+\r
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images\r
+# generated for formulas are transparent PNGs. Transparent PNGs are\r
+# not supported properly for IE 6.0, but are supported on all modern browsers.\r
+# Note that when changing this option you need to delete any form_*.png files\r
+# in the HTML output before the changes have effect.\r
+\r
+FORMULA_TRANSPARENT = YES\r
+\r
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax\r
+# (see http://www.mathjax.org) which uses client side Javascript for the\r
+# rendering instead of using prerendered bitmaps. Use this if you do not\r
+# have LaTeX installed or if you want to formulas look prettier in the HTML\r
+# output. When enabled you may also need to install MathJax separately and\r
+# configure the path to it using the MATHJAX_RELPATH option.\r
+\r
+USE_MATHJAX = NO\r
+\r
+# When MathJax is enabled you need to specify the location relative to the\r
+# HTML output directory using the MATHJAX_RELPATH option. The destination\r
+# directory should contain the MathJax.js script. For instance, if the mathjax\r
+# directory is located at the same level as the HTML output directory, then\r
+# MATHJAX_RELPATH should be ../mathjax. The default value points to\r
+# the MathJax Content Delivery Network so you can quickly see the result without\r
+# installing MathJax.\r
+# However, it is strongly recommended to install a local\r
+# copy of MathJax from http://www.mathjax.org before deployment.\r
+\r
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest\r
+\r
+# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension\r
+# names that should be enabled during MathJax rendering.\r
+\r
+MATHJAX_EXTENSIONS =\r
+\r
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box\r
+# for the HTML output. The underlying search engine uses javascript\r
+# and DHTML and should work on any modern browser. Note that when using\r
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets\r
+# (GENERATE_DOCSET) there is already a search function so this one should\r
+# typically be disabled. For large projects the javascript based search engine\r
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.\r
+\r
+SEARCHENGINE = NO\r
+\r
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\r
+# implemented using a PHP enabled web server instead of at the web client\r
+# using Javascript. Doxygen will generate the search PHP script and index\r
+# file to put on the web server. The advantage of the server\r
+# based approach is that it scales better to large projects and allows\r
+# full text search. The disadvantages are that it is more difficult to setup\r
+# and does not have live searching capabilities.\r
+\r
+SERVER_BASED_SEARCH = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the LaTeX output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will\r
+# generate Latex output.\r
+\r
+GENERATE_LATEX = NO\r
+\r
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.\r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be\r
+# put in front of it. If left blank `latex' will be used as the default path.\r
+\r
+LATEX_OUTPUT = latex\r
+\r
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\r
+# invoked. If left blank `latex' will be used as the default command name.\r
+# Note that when enabling USE_PDFLATEX this option is only used for\r
+# generating bitmaps for formulas in the HTML output, but not in the\r
+# Makefile that is written to the output directory.\r
+\r
+LATEX_CMD_NAME = latex\r
+\r
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to\r
+# generate index for LaTeX. If left blank `makeindex' will be used as the\r
+# default command name.\r
+\r
+MAKEINDEX_CMD_NAME = makeindex\r
+\r
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact\r
+# LaTeX documents. This may be useful for small projects and may help to\r
+# save some trees in general.\r
+\r
+COMPACT_LATEX = NO\r
+\r
+# The PAPER_TYPE tag can be used to set the paper type that is used\r
+# by the printer. Possible values are: a4, letter, legal and\r
+# executive. If left blank a4wide will be used.\r
+\r
+PAPER_TYPE = a4wide\r
+\r
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX\r
+# packages that should be included in the LaTeX output.\r
+\r
+EXTRA_PACKAGES =\r
+\r
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for\r
+# the generated latex document. The header should contain everything until\r
+# the first chapter. If it is left blank doxygen will generate a\r
+# standard header. Notice: only use this tag if you know what you are doing!\r
+\r
+LATEX_HEADER =\r
+\r
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for\r
+# the generated latex document. The footer should contain everything after\r
+# the last chapter. If it is left blank doxygen will generate a\r
+# standard footer. Notice: only use this tag if you know what you are doing!\r
+\r
+LATEX_FOOTER =\r
+\r
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\r
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will\r
+# contain links (just like the HTML output) instead of page references\r
+# This makes the output suitable for online browsing using a pdf viewer.\r
+\r
+PDF_HYPERLINKS = YES\r
+\r
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of\r
+# plain latex in the generated Makefile. Set this option to YES to get a\r
+# higher quality PDF documentation.\r
+\r
+USE_PDFLATEX = YES\r
+\r
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.\r
+# command to the generated LaTeX files. This will instruct LaTeX to keep\r
+# running if errors occur, instead of asking the user for help.\r
+# This option is also used when generating formulas in HTML.\r
+\r
+LATEX_BATCHMODE = NO\r
+\r
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not\r
+# include the index chapters (such as File Index, Compound Index, etc.)\r
+# in the output.\r
+\r
+LATEX_HIDE_INDICES = NO\r
+\r
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include\r
+# source code with syntax highlighting in the LaTeX output.\r
+# Note that which sources are shown also depends on other settings\r
+# such as SOURCE_BROWSER.\r
+\r
+LATEX_SOURCE_CODE = NO\r
+\r
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\r
+# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See\r
+# http://en.wikipedia.org/wiki/BibTeX for more info.\r
+\r
+LATEX_BIB_STYLE = plain\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the RTF output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output\r
+# The RTF output is optimized for Word 97 and may not look very pretty with\r
+# other RTF readers or editors.\r
+\r
+GENERATE_RTF = NO\r
+\r
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.\r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be\r
+# put in front of it. If left blank `rtf' will be used as the default path.\r
+\r
+RTF_OUTPUT = rtf\r
+\r
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact\r
+# RTF documents. This may be useful for small projects and may help to\r
+# save some trees in general.\r
+\r
+COMPACT_RTF = NO\r
+\r
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated\r
+# will contain hyperlink fields. The RTF file will\r
+# contain links (just like the HTML output) instead of page references.\r
+# This makes the output suitable for online browsing using WORD or other\r
+# programs which support those fields.\r
+# Note: wordpad (write) and others do not support links.\r
+\r
+RTF_HYPERLINKS = NO\r
+\r
+# Load style sheet definitions from file. Syntax is similar to doxygen's\r
+# config file, i.e. a series of assignments. You only have to provide\r
+# replacements, missing definitions are set to their default value.\r
+\r
+RTF_STYLESHEET_FILE =\r
+\r
+# Set optional variables used in the generation of an rtf document.\r
+# Syntax is similar to doxygen's config file.\r
+\r
+RTF_EXTENSIONS_FILE =\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the man page output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will\r
+# generate man pages\r
+\r
+GENERATE_MAN = NO\r
+\r
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.\r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be\r
+# put in front of it. If left blank `man' will be used as the default path.\r
+\r
+MAN_OUTPUT = man\r
+\r
+# The MAN_EXTENSION tag determines the extension that is added to\r
+# the generated man pages (default is the subroutine's section .3)\r
+\r
+MAN_EXTENSION = .3\r
+\r
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,\r
+# then it will generate one additional man file for each entity\r
+# documented in the real man page(s). These additional files\r
+# only source the real man page, but without them the man command\r
+# would be unable to find the correct page. The default is NO.\r
+\r
+MAN_LINKS = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the XML output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_XML tag is set to YES Doxygen will\r
+# generate an XML file that captures the structure of\r
+# the code including all documentation.\r
+\r
+GENERATE_XML = NO\r
+\r
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.\r
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be\r
+# put in front of it. If left blank `xml' will be used as the default path.\r
+\r
+XML_OUTPUT = xml\r
+\r
+# The XML_SCHEMA tag can be used to specify an XML schema,\r
+# which can be used by a validating XML parser to check the\r
+# syntax of the XML files.\r
+\r
+XML_SCHEMA =\r
+\r
+# The XML_DTD tag can be used to specify an XML DTD,\r
+# which can be used by a validating XML parser to check the\r
+# syntax of the XML files.\r
+\r
+XML_DTD =\r
+\r
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will\r
+# dump the program listings (including syntax highlighting\r
+# and cross-referencing information) to the XML output. Note that\r
+# enabling this will significantly increase the size of the XML output.\r
+\r
+XML_PROGRAMLISTING = YES\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options for the AutoGen Definitions output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will\r
+# generate an AutoGen Definitions (see autogen.sf.net) file\r
+# that captures the structure of the code including all\r
+# documentation. Note that this feature is still experimental\r
+# and incomplete at the moment.\r
+\r
+GENERATE_AUTOGEN_DEF = NO\r
+\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the Perl module output\r
+#---------------------------------------------------------------------------\r
+\r
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will\r
+# generate a Perl module file that captures the structure of\r
+# the code including all documentation. Note that this\r
+# feature is still experimental and incomplete at the\r
+# moment.\r
+\r
+GENERATE_PERLMOD = NO\r
+\r
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate\r
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able\r
+# to generate PDF and DVI output from the Perl module output.\r
+\r
+PERLMOD_LATEX = NO\r
+\r
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be\r
+# nicely formatted so it can be parsed by a human reader.\r
+# This is useful\r
+# if you want to understand what is going on.\r
+# On the other hand, if this\r
+# tag is set to NO the size of the Perl module output will be much smaller\r
+# and Perl will parse it just the same.\r
+\r
+PERLMOD_PRETTY = YES\r
+\r
+# The names of the make variables in the generated doxyrules.make file\r
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.\r
+# This is useful so different doxyrules.make files included by the same\r
+# Makefile don't overwrite each other's variables.\r
+\r
+PERLMOD_MAKEVAR_PREFIX =\r
+\r
+#---------------------------------------------------------------------------\r
+# Configuration options related to the preprocessor\r
+#---------------------------------------------------------------------------\r
+\r
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will\r
+# evaluate all C-preprocessor directives found in the sources and include\r
+# files.\r
+\r
+ENABLE_PREPROCESSING = YES\r
+\r
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro\r
+# names in the source code. If set to NO (the default) only conditional\r
+# compilation will be performed. Macro expansion can be done in a controlled\r
+# way by setting EXPAND_ONLY_PREDEF to YES.\r
+\r
+MACRO_EXPANSION = YES\r
+\r
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES\r
+# then the macro expansion is limited to the macros specified with the\r
+# PREDEFINED and EXPAND_AS_DEFINED tags.\r
+\r
+EXPAND_ONLY_PREDEF = YES\r
+\r
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files\r
+# pointed to by INCLUDE_PATH will be searched when a #include is found.\r
+\r
+SEARCH_INCLUDES = YES\r
+\r
+# The INCLUDE_PATH tag can be used to specify one or more directories that\r
+# contain include files that are not input files but should be processed by\r
+# the preprocessor.\r
+\r
+INCLUDE_PATH =\r
+\r
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\r
+# patterns (like *.h and *.hpp) to filter out the header-files in the\r
+# directories. If left blank, the patterns specified with FILE_PATTERNS will\r
+# be used.\r
+\r
+INCLUDE_FILE_PATTERNS =\r
+\r
+# The PREDEFINED tag can be used to specify one or more macro names that\r
+# are defined before the preprocessor is started (similar to the -D option of\r
+# gcc). The argument of the tag is a list of macros of the form: name\r
+# or name=definition (no spaces). If the definition and the = are\r
+# omitted =1 is assumed. To prevent a macro definition from being\r
+# undefined via #undef or recursively expanded use the := operator\r
+# instead of the = operator.\r
+\r
+PREDEFINED = __DOXYGEN__ \\r
+ PROGMEM\r
+\r
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then\r
+# this tag can be used to specify a list of macro names that should be expanded.\r
+# The macro definition that is found in the sources will be used.\r
+# Use the PREDEFINED tag if you want to use a different macro definition that\r
+# overrules the definition found in the source code.\r
+\r
+EXPAND_AS_DEFINED =\r
+\r
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then\r
+# doxygen's preprocessor will remove all references to function-like macros\r
+# that are alone on a line, have an all uppercase name, and do not end with a\r
+# semicolon, because these will confuse the parser if not removed.\r
+\r
+SKIP_FUNCTION_MACROS = YES\r
+\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to external references\r
+#---------------------------------------------------------------------------\r
+\r
+# The TAGFILES option can be used to specify one or more tagfiles. For each\r
+# tag file the location of the external documentation should be added. The\r
+# format of a tag file without this location is as follows:\r
+#\r
+# TAGFILES = file1 file2 ...\r
+# Adding location for the tag files is done as follows:\r
+#\r
+# TAGFILES = file1=loc1 "file2 = loc2" ...\r
+# where "loc1" and "loc2" can be relative or absolute paths\r
+# or URLs. Note that each tag file must have a unique name (where the name does\r
+# NOT include the path). If a tag file is not located in the directory in which\r
+# doxygen is run, you must also specify the path to the tagfile here.\r
+\r
+TAGFILES =\r
+\r
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create\r
+# a tag file that is based on the input files it reads.\r
+\r
+GENERATE_TAGFILE =\r
+\r
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed\r
+# in the class index. If set to NO only the inherited external classes\r
+# will be listed.\r
+\r
+ALLEXTERNALS = NO\r
+\r
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed\r
+# in the modules index. If set to NO, only the current project's groups will\r
+# be listed.\r
+\r
+EXTERNAL_GROUPS = YES\r
+\r
+# The PERL_PATH should be the absolute path and name of the perl script\r
+# interpreter (i.e. the result of `which perl').\r
+\r
+PERL_PATH = /usr/bin/perl\r
+\r
+#---------------------------------------------------------------------------\r
+# Configuration options related to the dot tool\r
+#---------------------------------------------------------------------------\r
+\r
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will\r
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base\r
+# or super classes. Setting the tag to NO turns the diagrams off. Note that\r
+# this option also works with HAVE_DOT disabled, but it is recommended to\r
+# install and use dot, since it yields more powerful graphs.\r
+\r
+CLASS_DIAGRAMS = NO\r
+\r
+# You can define message sequence charts within doxygen comments using the \msc\r
+# command. Doxygen will then run the mscgen tool (see\r
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the\r
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where\r
+# the mscgen tool resides. If left empty the tool is assumed to be found in the\r
+# default search path.\r
+\r
+MSCGEN_PATH =\r
+\r
+# If set to YES, the inheritance and collaboration graphs will hide\r
+# inheritance and usage relations if the target is undocumented\r
+# or is not a class.\r
+\r
+HIDE_UNDOC_RELATIONS = YES\r
+\r
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\r
+# available from the path. This tool is part of Graphviz, a graph visualization\r
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section\r
+# have no effect if this option is set to NO (the default)\r
+\r
+HAVE_DOT = NO\r
+\r
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is\r
+# allowed to run in parallel. When set to 0 (the default) doxygen will\r
+# base this on the number of processors available in the system. You can set it\r
+# explicitly to a value larger than 0 to get control over the balance\r
+# between CPU load and processing speed.\r
+\r
+DOT_NUM_THREADS = 0\r
+\r
+# By default doxygen will use the Helvetica font for all dot files that\r
+# doxygen generates. When you want a differently looking font you can specify\r
+# the font name using DOT_FONTNAME. You need to make sure dot is able to find\r
+# the font, which can be done by putting it in a standard location or by setting\r
+# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\r
+# directory containing the font.\r
+\r
+DOT_FONTNAME = FreeSans\r
+\r
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.\r
+# The default size is 10pt.\r
+\r
+DOT_FONTSIZE = 10\r
+\r
+# By default doxygen will tell dot to use the Helvetica font.\r
+# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to\r
+# set the path where dot can find it.\r
+\r
+DOT_FONTPATH =\r
+\r
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen\r
+# will generate a graph for each documented class showing the direct and\r
+# indirect inheritance relations. Setting this tag to YES will force the\r
+# CLASS_DIAGRAMS tag to NO.\r
+\r
+CLASS_GRAPH = NO\r
+\r
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen\r
+# will generate a graph for each documented class showing the direct and\r
+# indirect implementation dependencies (inheritance, containment, and\r
+# class references variables) of the class with other documented classes.\r
+\r
+COLLABORATION_GRAPH = NO\r
+\r
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen\r
+# will generate a graph for groups, showing the direct groups dependencies\r
+\r
+GROUP_GRAPHS = NO\r
+\r
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and\r
+# collaboration diagrams in a style similar to the OMG's Unified Modeling\r
+# Language.\r
+\r
+UML_LOOK = NO\r
+\r
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside\r
+# the class node. If there are many fields or methods and many nodes the\r
+# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS\r
+# threshold limits the number of items for each type to make the size more\r
+# managable. Set this to 0 for no limit. Note that the threshold may be\r
+# exceeded by 50% before the limit is enforced.\r
+\r
+UML_LIMIT_NUM_FIELDS = 10\r
+\r
+# If set to YES, the inheritance and collaboration graphs will show the\r
+# relations between templates and their instances.\r
+\r
+TEMPLATE_RELATIONS = NO\r
+\r
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT\r
+# tags are set to YES then doxygen will generate a graph for each documented\r
+# file showing the direct and indirect include dependencies of the file with\r
+# other documented files.\r
+\r
+INCLUDE_GRAPH = NO\r
+\r
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and\r
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each\r
+# documented header file showing the documented files that directly or\r
+# indirectly include this file.\r
+\r
+INCLUDED_BY_GRAPH = NO\r
+\r
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then\r
+# doxygen will generate a call dependency graph for every global function\r
+# or class method. Note that enabling this option will significantly increase\r
+# the time of a run. So in most cases it will be better to enable call graphs\r
+# for selected functions only using the \callgraph command.\r
+\r
+CALL_GRAPH = NO\r
+\r
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then\r
+# doxygen will generate a caller dependency graph for every global function\r
+# or class method. Note that enabling this option will significantly increase\r
+# the time of a run. So in most cases it will be better to enable caller\r
+# graphs for selected functions only using the \callergraph command.\r
+\r
+CALLER_GRAPH = NO\r
+\r
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen\r
+# will generate a graphical hierarchy of all classes instead of a textual one.\r
+\r
+GRAPHICAL_HIERARCHY = NO\r
+\r
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES\r
+# then doxygen will show the dependencies a directory has on other directories\r
+# in a graphical way. The dependency relations are determined by the #include\r
+# relations between the files in the directories.\r
+\r
+DIRECTORY_GRAPH = NO\r
+\r
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\r
+# generated by dot. Possible values are svg, png, jpg, or gif.\r
+# If left blank png will be used. If you choose svg you need to set\r
+# HTML_FILE_EXTENSION to xhtml in order to make the SVG files\r
+# visible in IE 9+ (other browsers do not have this requirement).\r
+\r
+DOT_IMAGE_FORMAT = png\r
+\r
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\r
+# enable generation of interactive SVG images that allow zooming and panning.\r
+# Note that this requires a modern browser other than Internet Explorer.\r
+# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you\r
+# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files\r
+# visible. Older versions of IE do not have SVG support.\r
+\r
+INTERACTIVE_SVG = NO\r
+\r
+# The tag DOT_PATH can be used to specify the path where the dot tool can be\r
+# found. If left blank, it is assumed the dot tool can be found in the path.\r
+\r
+DOT_PATH =\r
+\r
+# The DOTFILE_DIRS tag can be used to specify one or more directories that\r
+# contain dot files that are included in the documentation (see the\r
+# \dotfile command).\r
+\r
+DOTFILE_DIRS =\r
+\r
+# The MSCFILE_DIRS tag can be used to specify one or more directories that\r
+# contain msc files that are included in the documentation (see the\r
+# \mscfile command).\r
+\r
+MSCFILE_DIRS =\r
+\r
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of\r
+# nodes that will be shown in the graph. If the number of nodes in a graph\r
+# becomes larger than this value, doxygen will truncate the graph, which is\r
+# visualized by representing a node as a red box. Note that doxygen if the\r
+# number of direct children of the root node in a graph is already larger than\r
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note\r
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\r
+\r
+DOT_GRAPH_MAX_NODES = 15\r
+\r
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the\r
+# graphs generated by dot. A depth value of 3 means that only nodes reachable\r
+# from the root by following a path via at most 3 edges will be shown. Nodes\r
+# that lay further from the root node will be omitted. Note that setting this\r
+# option to 1 or 2 may greatly reduce the computation time needed for large\r
+# code bases. Also note that the size of a graph can be further restricted by\r
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\r
+\r
+MAX_DOT_GRAPH_DEPTH = 2\r
+\r
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\r
+# background. This is disabled by default, because dot on Windows does not\r
+# seem to support this out of the box. Warning: Depending on the platform used,\r
+# enabling this option may lead to badly anti-aliased labels on the edges of\r
+# a graph (i.e. they become hard to read).\r
+\r
+DOT_TRANSPARENT = YES\r
+\r
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output\r
+# files in one run (i.e. multiple -o and -T options on the command line). This\r
+# makes dot run faster, but since only newer versions of dot (>1.8.10)\r
+# support this, this feature is disabled by default.\r
+\r
+DOT_MULTI_TARGETS = NO\r
+\r
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will\r
+# generate a legend page explaining the meaning of the various boxes and\r
+# arrows in the dot generated graphs.\r
+\r
+GENERATE_LEGEND = YES\r
+\r
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will\r
+# remove the intermediate dot files that are used to generate\r
+# the various graphs.\r
+\r
+DOT_CLEANUP = YES\r
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Simon Foster (simon.foster [at] inbox [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.
+*/
+
+#include "HD44780.h"
+
+static void HD44780_WriteNibble(const uint8_t nib)
+{
+ /* Read PORTD and clear the ENABLE and PD0..3 bits
+ then OR in the data */
+
+ PORTD = (PORTD & ~(ENABLE | LO4_MASK)) | (nib & LO4_MASK);
+
+ /* Enforce address setup time (tAS) 60ns
+ 60 @ 16MHz = <1
+ Let's us a few NOPs for good measure */
+ asm volatile("nop\n\t"
+ "nop\n\t"
+ :: );
+
+ /* Take enable high and enforce Enable High time (tEH=450ns)
+ 450ns @ 16MHz = 7.2 => 7 NOPs */
+
+ PORTD |= ENABLE;
+
+ asm volatile("nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ :: );
+
+ /* Take enable low and enforce Enable Low time (tEL=500ns)
+ 500ns @ 16MHz = 8.0 => 7 NOPs */
+ PORTD &= ~ENABLE;
+
+ asm volatile("nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ :: );
+}
+
+static void HD44780_WriteByte(const uint8_t c)
+{
+ HD44780_WriteNibble(HI4(c));
+ HD44780_WriteNibble(LO4(c));
+}
+
+static void HD44780_PowerUp4Bit(void)
+{
+ /* Wait for more than 40 ms after VCC rises to 2.7 V */
+ _delay_ms(40);
+ HD44780_WriteNibble(0x03); // FN_SET 8-bit
+
+ /* Wait for more than 4.1 ms */
+ _delay_ms(5);
+ HD44780_WriteNibble(0x03); // FN_SET 8-bit
+
+ /* Wait for more than 100 µs */
+ _delay_us(100);
+ HD44780_WriteNibble(0x03); // FN_SET 8-bit
+
+ /* From now on we must allow 40us for each command */
+ _delay_us(50);
+ HD44780_WriteNibble(0x02); // FN_SET 4-bit
+
+ /* The LCD is now in 4-bit mode so we can continue
+ using the 4-bit API */
+ _delay_us(50);
+}
+
+void HD44780_Initialise(void)
+{
+ PORTD &= ~ALL_BITS;
+ DDRD |= ALL_BITS;
+ HD44780_PowerUp4Bit();
+}
+
+void HD44780_WriteCommand(const uint8_t c)
+{
+ PORTD &= ~RS;
+ HD44780_WriteByte(c);
+ _delay_us(50);
+}
+
+void HD44780_WriteData(const uint8_t c)
+{
+ PORTD |= RS;
+ HD44780_WriteByte(c);
+ PORTD &= ~RS;
+ _delay_us(50);
+}
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Simon Foster (simon.foster [at] inbox [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
+ *
+ * Header file for HD44780.c.
+ */
+
+#ifndef _HD44780_H_
+#define _HD44780_H_
+
+ /* Includes: */
+ #include <avr/io.h>
+ #include <util/delay.h>
+ #include <avr/power.h>
+
+ /* Macros: */
+ #define RS (1 << 4) /* PD4 */
+ #define ENABLE (1 << 7) /* PD7 */
+
+ #define HI4_MASK 0xF0
+ #define LO4_MASK 0x0F /* PD0-PD3 */
+
+ #define ALL_BITS (RS | ENABLE | LO4_MASK)
+
+ #define HI4(c) ((c & HI4_MASK) >> 4)
+ #define LO4(c) ((c & LO4_MASK) >> 0)
+
+ #define CMD_DISPLAY_ON 0x0C
+
+ /* Function Prototypes: */
+ void HD44780_Initialise(void);
+ void HD44780_WriteData(const uint8_t c);
+ void HD44780_WriteCommand(const uint8_t c);
+
+#endif
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Simon Foster (simon.foster [at] inbox [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
+ *
+ * Main source file for the SerialToLCD program. This file contains the main tasks of
+ * the project and is responsible for the initial application hardware configuration.
+ */
+
+#include "SerialToLCD.h"
+
+/** Circular buffer to hold data from the host before it is sent to the LCD */
+static RingBuffer_t FromHost_Buffer;
+
+/** Underlying data buffer for \ref FromHost_Buffer, where the stored bytes are located. */
+static uint8_t FromHost_Buffer_Data[128];
+
+/** LUFA CDC Class driver interface configuration and state information. This structure is
+ * passed to all CDC Class driver functions, so that multiple instances of the same class
+ * within a device can be differentiated from one another.
+ */
+USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
+ {
+ .Config =
+ {
+ .ControlInterfaceNumber = 0,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
+ },
+ };
+
+
+/** Main program entry point. This routine contains the overall program flow, including initial
+ * setup of all components and the main program loop.
+ */
+int main(void)
+{
+ SetupHardware();
+
+ RingBuffer_InitBuffer(&FromHost_Buffer, FromHost_Buffer_Data, sizeof(FromHost_Buffer_Data));
+
+ sei();
+
+ for (;;)
+ {
+ /* Only try to read in bytes from the CDC interface if the transmit buffer is not full */
+ if (!(RingBuffer_IsFull(&FromHost_Buffer)))
+ {
+ int16_t ReceivedByte = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);
+
+ /* Read bytes from the USB OUT endpoint into the USART transmit buffer */
+ if (!(ReceivedByte < 0))
+ RingBuffer_Insert(&FromHost_Buffer, ReceivedByte);
+ }
+
+ while (RingBuffer_GetCount(&FromHost_Buffer) > 0)
+ {
+ static uint8_t EscapePending = 0;
+ int16_t HD44780Byte = RingBuffer_Remove(&FromHost_Buffer);
+
+ if (HD44780Byte == COMMAND_ESCAPE)
+ {
+ if (EscapePending)
+ {
+ HD44780_WriteData(HD44780Byte);
+ EscapePending = 0;
+ }
+ else
+ {
+ /* Next received character is the command byte */
+ EscapePending = 1;
+ }
+ }
+ else
+ {
+ if (EscapePending)
+ {
+ HD44780_WriteCommand(HD44780Byte);
+ EscapePending = 0;
+ }
+ else
+ {
+ HD44780_WriteData(HD44780Byte);
+ }
+ }
+ }
+
+ CDC_Device_USBTask(&VirtualSerial_CDC_Interface);
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the application's functionality. */
+void SetupHardware(void)
+{
+ /* Disable watchdog if enabled by bootloader/fuses */
+ MCUSR &= ~(1 << WDRF);
+ wdt_disable();
+
+ /* Disable clock division */
+ clock_prescale_set(clock_div_1);
+
+ /* Hardware Initialization */
+ USB_Init();
+
+ /* Power up the HD44780 Interface */
+ HD44780_Initialise();
+ HD44780_WriteCommand(CMD_DISPLAY_ON);
+
+ /* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
+ TCCR0B = (1 << CS02);
+}
+
+/** Event handler for the library USB Configuration Changed event. */
+void EVENT_USB_Device_ConfigurationChanged(void)
+{
+ CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
+}
+
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
+{
+ CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
+}
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2012.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2012 Simon Foster (simon.foster [at] inbox [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
+ *
+ * Header file for SerialToLCD.c.
+ */
+
+#ifndef _SERIALTOLCD_H_
+#define _SERIALTOLCD_H_
+
+ /* Includes: */
+ #include <avr/io.h>
+ #include <avr/wdt.h>
+ #include <avr/interrupt.h>
+ #include <avr/power.h>
+
+ #include "Descriptors.h"
+ #include "Lib/HD44780.h"
+
+ #include <LUFA/Version.h>
+ #include <LUFA/Drivers/Misc/RingBuffer.h>
+ #include <LUFA/Drivers/USB/USB.h>
+
+ /* Macros: */
+ #define COMMAND_ESCAPE 0x1B
+
+ /* Function Prototypes: */
+ void SetupHardware(void);
+
+ void EVENT_USB_Device_ConfigurationChanged(void);
+ void EVENT_USB_Device_ControlRequest(void);
+
+#endif
+
--- /dev/null
+/** \file\r
+ *\r
+ * This file contains special DoxyGen information for the generation of the main page and other special\r
+ * documentation pages. It is not a project source file.\r
+ */\r
+\r
+/** \mainpage Simon Foster's USB Serial to HD44780 LCD Project\r
+ *\r
+ * \section Sec_Compat Project Compatibility:\r
+ *\r
+ * The following list indicates what microcontrollers are compatible with this project.\r
+ *\r
+ * - AT90USB162\r
+ *\r
+ * \section Sec_Info USB Information:\r
+ *\r
+ * The following table gives a rundown of the USB utilization of this project.\r
+ *\r
+ * <table>\r
+ * <tr>\r
+ * <td><b>USB Mode:</b></td>\r
+ * <td>Device</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>USB Class:</b></td>\r
+ * <td>Communications Device Class (CDC)</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>USB Subclass:</b></td>\r
+ * <td>Abstract Control Model (ACM)</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Relevant Standards:</b></td>\r
+ * <td>USBIF CDC Class Standard</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Usable Speeds:</b></td>\r
+ * <td>Full Speed Mode</td>\r
+ * </tr>\r
+ * </table>\r
+ *\r
+ * \section Sec_Description Project Description:\r
+ *\r
+ * Firmware for a USB Virtual Serial to HD44780 LCD controller project, by Simon Foster. This\r
+ * project connects a standard HD7780 compatible LCD controller to a PC via a virtual serial\r
+ * link, so that data supplied by the host can be written to the display. This project is\r
+ * designed to use the Minimum USB AVR board, however it can be modified to suit other hardware\r
+ * if desired.\r
+ *\r
+ * LCD Datasheet: http://www.sparkfun.com/datasheets/LCD/HD44780.pdf \n\r
+ * More Information: http://en.wikipedia.org/wiki/HD44780_Character_LCD \n\r
+ *\r
+ * Below are the connections between the AVR Minimus board and LCD.\r
+ *\r
+ * <table>\r
+ * <tr>\r
+ * <td><b>AVR Pin:</b></td>\r
+ * <td><b>HD44780 LCD Pin:</b></td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>VCC</td>\r
+ * <td>VCC</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>GND</td>\r
+ * <td>GND</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>PD0</td>\r
+ * <td>DB4</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>PD1</td>\r
+ * <td>DB5</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>PD2</td>\r
+ * <td>DB6</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>PD3</td>\r
+ * <td>DB7</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>PD4</td>\r
+ * <td>/RS</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>GND</td>\r
+ * <td>/RW</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>PD7</td>\r
+ * <td>/E</td>\r
+ * </tr>\r
+ * </table>\r
+ */\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging,\r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = at90usb162\r
+\r
+\r
+# Target architecture (see library "Board Types" documentation).\r
+ARCH = AVR8\r
+\r
+\r
+# Target board (see library "Board Types" documentation, NONE for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called\r
+# "Board" inside the application directory.\r
+BOARD = MINIMUS\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the\r
+# processor frequency in Hz. You can then use this symbol in your source code to\r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+#\r
+# This will be an integer division of F_USB below, as it is sourced by\r
+# F_USB after it has run through any CPU prescalers. Note that this value\r
+# does not *change* the processor frequency - it should merely be updated to\r
+# reflect the processor speed set externally so that the code can use accurate\r
+# software delays.\r
+F_CPU = 16000000\r
+\r
+\r
+# Input clock frequency.\r
+# This will define a symbol, F_USB, in all source code files equal to the\r
+# input clock frequency (before any prescaling is performed) in Hz. This value may\r
+# differ from F_CPU if prescaling is used on the latter, and is required as the\r
+# raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+# at the end, this will be done automatically to create a 32-bit value in your\r
+# source code.\r
+#\r
+# If no clock division is performed on the input clock inside the AVR (via the\r
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_USB = $(F_CPU)\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = SerialToLCD\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# Path to the LUFA library\r
+LUFA_PATH = ../..\r
+\r
+\r
+# LUFA library compile-time options and predefined tokens\r
+LUFA_OPTS = -D USB_DEVICE_ONLY\r
+LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0\r
+LUFA_OPTS += -D ORDERED_EP_CONFIG\r
+LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8\r
+LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1\r
+LUFA_OPTS += -D USE_FLASH_DESCRIPTORS\r
+LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+LUFA_OPTS += -D INTERRUPT_CONTROL_ENDPOINT\r
+\r
+\r
+# Create the LUFA source path variables by including the LUFA root makefile\r
+include $(LUFA_PATH)/LUFA/makefile\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = $(TARGET).c \\r
+ Lib/HD44780.c \\r
+ Descriptors.c \\r
+ $(LUFA_SRC_USB) \\r
+ $(LUFA_SRC_USBCLASS)\r
+\r
+\r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC =\r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC =\r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s].\r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = $(LUFA_PATH)/\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL\r
+CDEFS += -DF_USB=$(F_USB)UL\r
+CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)\r
+CDEFS += $(LUFA_OPTS)\r
+\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+ADEFS += -DF_USB=$(F_USB)UL\r
+ADEFS += -DBOARD=BOARD_$(BOARD)\r
+ADEFS += $(LUFA_OPTS)\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+CPPDEFS += -DF_USB=$(F_USB)UL\r
+CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
+CPPDEFS += $(LUFA_OPTS)\r
+#CPPDEFS += -D__STDC_LIMIT_MACROS\r
+#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
+\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fno-inline-small-functions\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -fno-strict-aliasing\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+#CFLAGS += -mshort-calls\r
+#CFLAGS += -fno-unit-at-a-time\r
+#CFLAGS += -Wundef\r
+#CFLAGS += -Wunreachable-code\r
+#CFLAGS += -Wsign-compare\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CPPFLAGS += -Wundef\r
+#CPPFLAGS += -mshort-calls\r
+#CPPFLAGS += -fno-unit-at-a-time\r
+#CPPFLAGS += -Wstrict-prototypes\r
+#CPPFLAGS += -Wunreachable-code\r
+#CPPFLAGS += -Wsign-compare\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex\r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB =\r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB =\r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS =\r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax\r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+#AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>\r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when\r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before:\r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+\r
+\r
+# Display compiler version information.\r
+gccversion :\r
+ @$(CC) --version\r
+\r
+\r
+# Program the device.\r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ $(COPY) $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+ $(REMOVE) $(TARGET)eep.hex\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set\r
+# a breakpoint at main().\r
+gdb-config:\r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -S -z $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@\r
+\r
+\r
+# Target: clean project.\r
+clean: begin clean_list end\r
+\r
+clean_list :\r
+ @echo\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).hex\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation \($(TARGET)\)...\r
+ @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \\r
+ exit 1; \\r
+ fi;\r
+ @echo Documentation Generation Complete.\r
+\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+checksource:\r
+ @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
+ if [ -f $$f ]; then \\r
+ echo "Found Source File: $$f" ; \\r
+ else \\r
+ echo "Source File Not Found: $$f" ; \\r
+ fi; done \r
+\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all begin finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff doxygen clean \\r
+clean_list clean_doxygen program dfu flip flip-ee dfu-ee \\r
+debug gdb-config checksource\r
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.HID_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | GENERIC_IN_EPNUM),
+ .EndpointAddress = GENERIC_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = GENERIC_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
};
#include "TempDataLogger.h"
/* Macros: */
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
- /** Endpoint number of the Generic HID reporting IN endpoint. */
- #define GENERIC_IN_EPNUM 1
+ /** Endpoint address of the Generic HID reporting IN endpoint. */
+ #define GENERIC_IN_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Generic HID reporting endpoint. */
#define GENERIC_EPSIZE 16
.Config =
{
.InterfaceNumber = 0,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = 1,
},
};
.Config =
{
.InterfaceNumber = 1,
-
- .ReportINEndpointNumber = GENERIC_IN_EPNUM,
- .ReportINEndpointSize = GENERIC_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = GENERIC_IN_EPADDR,
+ .Size = GENERIC_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevHIDReportBuffer),
},
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.RNDIS_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.MS_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 5
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 5)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 1
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 2
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = true,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = true,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = true,
-
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
.AdapterVendorDescription = "LUFA RNDIS Adapter",
.AdapterMACAddress = {{0x02, 0x00, 0x02, 0x00, 0x02, 0x00}},
},
{
.Config =
{
- .InterfaceNumber = 2,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .InterfaceNumber = 2,
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = 1,
},
};
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
- .NotificationPipeNumber = 3,
- .NotificationPipeDoubleBank = false,
-
- .HostMaxPacketSize = UIP_CONF_BUFFER_SIZE,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
+ .NotificationPipe =
+ {
+ .Address = (PIPE_DIR_IN | 3),
+ .Banks = 1,
+ },
+ .HostMaxPacketSize = UIP_CONF_BUFFER_SIZE,
},
};
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | AVRISP_DATA_IN_EPNUM),
+ .EndpointAddress = AVRISP_DATA_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | AVRISP_DATA_OUT_EPNUM),
+ .EndpointAddress = AVRISP_DATA_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- #if !defined(LIBUSB_DRIVER_COMPAT)
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
+ #if !defined(LIBUSB_DRIVER_COMPAT) || defined(__DOXYGEN__)
+ /** Endpoint address of the AVRISP data OUT endpoint. */
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 2
+ /** Endpoint address of the AVRISP data IN endpoint. */
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 2)
#else
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
-
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 3
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 3)
#endif
/** Size in bytes of the AVRISP data endpoint. */
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
-PROJECT_NAME = "LUFA Library - XPLAIN Serial Bridge/PDI Programmer Device Demo"
+PROJECT_NAME = "LUFA Library - XPLAIN Serial Bridge/PDI Programmer Project"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
},
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x01
+ .PollingIntervalMS = 0x05
}
};
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = true,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = true,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
V2Params_UpdateParamValues();
- Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPADDR);
/* Check to see if a V2 Protocol command has been received */
if (Endpoint_IsOUTReceived())
}
else
{
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#if defined(LIBUSB_DRIVER_COMPAT)
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#endif
/* Configure the V2 protocol packet handler */
#include "AVRISPDescriptors.h"
#include "USARTDescriptors.h"
- // cppcheck-suppress missingInclude
#include "Lib/V2Protocol.h"
- // cppcheck-suppress missingInclude
#include "Lib/SoftUART.h"
#include <LUFA/Version.h>
* <td><b>Description:</b></td>
* </tr>
* <tr>
- * <td>BUFFER_SIZE</td>
- * <td>LightweightRingBuff.h</td>
- * <td>Defines the maximum number of bytes which can be buffered in each Ring Buffer when in serial bridge mode.</td>
- * </tr>
- * <tr>
* <td>LIBUSB_DRIVER_COMPAT</td>
* <td>Makefile LUFA_OPTS</td>
* <td>Define to switch to a non-standard endpoint scheme, breaking compatibility with AVRStudio under Windows but making
$(MAKE) -C RelayBoard clean
$(MAKE) -C RelayBoard all
+ $(MAKE) -C SerialToLCD clean
+ $(MAKE) -C SerialToLCD all
+
$(MAKE) -C TempDataLogger clean
$(MAKE) -C TempDataLogger all
$(MAKE) -C MIDIToneGenerator $@
$(MAKE) -C MissileLauncher $@
$(MAKE) -C RelayBoard $@
+ $(MAKE) -C SerialToLCD $@
$(MAKE) -C TempDataLogger $@
$(MAKE) -C USBtoSerial $@
$(MAKE) -C Webserver $@