+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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
- *
- * Bootloader user application API functions.
- */
-
-#include "BootloaderAPI.h"
-
-void BootloaderAPI_ErasePage(const uint32_t Address)
-{
- boot_page_erase_safe(Address);
- boot_spm_busy_wait();
- boot_rww_enable();
-}
-
-void BootloaderAPI_WritePage(const uint32_t Address)
-{
- boot_page_write_safe(Address);
- boot_spm_busy_wait();
- boot_rww_enable();
-}
-
-void BootloaderAPI_FillWord(const uint32_t Address, const uint16_t Word)
-{
- boot_page_fill_safe(Address, Word);
-}
-
-uint8_t BootloaderAPI_ReadSignature(const uint16_t Address)
-{
- return boot_signature_byte_get(Address);
-}
-
-uint8_t BootloaderAPI_ReadFuse(const uint16_t Address)
-{
- return boot_lock_fuse_bits_get(Address);
-}
-
-uint8_t BootloaderAPI_ReadLock(void)
-{
- return boot_lock_fuse_bits_get(GET_LOCK_BITS);
-}
-
-void BootloaderAPI_WriteLock(const uint8_t LockBits)
-{
- boot_lock_bits_set_safe(LockBits);
-}
-
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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 BootloaderAPI.c.
- */
-
-#ifndef _BOOTLOADER_API_H_
-#define _BOOTLOADER_API_H_
-
- /* Includes: */
- #include <avr/io.h>
- #include <avr/boot.h>
- #include <stdbool.h>
-
- #include <LUFA/Common/Common.h>
-
- /* Function Prototypes: */
- void BootloaderAPI_ErasePage(const uint32_t Address);
- void BootloaderAPI_WritePage(const uint32_t Address);
- void BootloaderAPI_FillWord(const uint32_t Address, const uint16_t Word);
- uint8_t BootloaderAPI_ReadSignature(const uint16_t Address);
- uint8_t BootloaderAPI_ReadFuse(const uint16_t Address);
- uint8_t BootloaderAPI_ReadLock(void);
- void BootloaderAPI_WriteLock(const uint8_t LockBits);
-
-#endif
-
+++ /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
-/*\r
- Copyright 2013 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, distribute, and sell this\r
- software and its documentation for any purpose is hereby granted\r
- without fee, provided that the above copyright notice appear in\r
- all copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
- software without specific, written prior permission.\r
-\r
- The author disclaims all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-; Trampolines to actual API implementations if the target address is outside the\r
-; range of a rjmp instruction (can happen with large bootloader sections)\r
-.section .apitable_trampolines, "ax"\r
-.global BootloaderAPI_Trampolines\r
-BootloaderAPI_Trampolines:\r
-\r
- BootloaderAPI_ErasePage_Trampoline:\r
- jmp BootloaderAPI_ErasePage\r
- BootloaderAPI_WritePage_Trampoline:\r
- jmp BootloaderAPI_WritePage\r
- BootloaderAPI_FillWord_Trampoline:\r
- jmp BootloaderAPI_FillWord\r
- BootloaderAPI_ReadSignature_Trampoline:\r
- jmp BootloaderAPI_ReadSignature\r
- BootloaderAPI_ReadFuse_Trampoline:\r
- jmp BootloaderAPI_ReadFuse\r
- BootloaderAPI_ReadLock_Trampoline:\r
- jmp BootloaderAPI_ReadLock\r
- BootloaderAPI_WriteLock_Trampoline:\r
- jmp BootloaderAPI_WriteLock\r
- BootloaderAPU_UNUSED1:\r
- ret\r
- BootloaderAPU_UNUSED2:\r
- ret\r
- BootloaderAPU_UNUSED3:\r
- ret\r
- BootloaderAPU_UNUSED4:\r
- ret\r
- BootloaderAPU_UNUSED5:\r
- ret\r
-\r
-\r
-\r
-; API function jump table\r
-.section .apitable_jumptable, "ax"\r
-.global BootloaderAPI_JumpTable\r
-BootloaderAPI_JumpTable:\r
-\r
- rjmp BootloaderAPI_ErasePage_Trampoline\r
- rjmp BootloaderAPI_WritePage_Trampoline\r
- rjmp BootloaderAPI_FillWord_Trampoline\r
- rjmp BootloaderAPI_ReadSignature_Trampoline\r
- rjmp BootloaderAPI_ReadFuse_Trampoline\r
- rjmp BootloaderAPI_ReadLock_Trampoline\r
- rjmp BootloaderAPI_WriteLock_Trampoline\r
- rjmp BootloaderAPU_UNUSED1 ; UNUSED ENTRY 1\r
- rjmp BootloaderAPU_UNUSED2 ; UNUSED ENTRY 2\r
- rjmp BootloaderAPU_UNUSED3 ; UNUSED ENTRY 3\r
- rjmp BootloaderAPU_UNUSED4 ; UNUSED ENTRY 4\r
- rjmp BootloaderAPU_UNUSED5 ; UNUSED ENTRY 5\r
-\r
-\r
-\r
-; Bootloader table signatures and information\r
-.section .apitable_signatures, "ax"\r
-.global BootloaderAPI_Signatures\r
-BootloaderAPI_Signatures:\r
-\r
- .long BOOT_START_ADDR ; Start address of the bootloader\r
- .word 0xDF30 ; Signature for the MS class bootloader, V1\r
- .word 0xDCFB ; Signature for a LUFA class bootloader\r
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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 Mass Storage class bootloader. This file contains the complete bootloader logic.
- */
-
-#include "BootloaderMassStorage.h"
-
-/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
- * passed to all Mass Storage Class driver functions, so that multiple instances of the same class
- * within a device can be differentiated from one another.
- */
-USB_ClassInfo_MS_Device_t Disk_MS_Interface =
- {
- .Config =
- {
- .InterfaceNumber = 0,
- .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,
- },
- };
-
-
-/** Main program entry point. This routine configures the hardware required by the application, then
- * enters a loop to run the application tasks in sequence.
- */
-int main(void)
-{
- SetupHardware();
-
- LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
- GlobalInterruptEnable();
-
- for (;;)
- {
- MS_Device_USBTask(&Disk_MS_Interface);
- USB_USBTask();
- }
-}
-
-/** Configures the board hardware and chip peripherals for the demo'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);
-
- /* Relocate the interrupt vector table to the bootloader section */
- MCUCR = (1 << IVCE);
- MCUCR = (1 << IVSEL);
-
- /* Hardware Initialization */
- LEDs_Init();
- USB_Init();
-
- /* Bootloader active LED toggle timer initialization */
- TIMSK1 = (1 << TOIE1);
- TCCR1B = ((1 << CS11) | (1 << CS10));
-}
-
-/** ISR to periodically toggle the LEDs on the board to indicate that the bootloader is active. */
-ISR(TIMER1_OVF_vect, ISR_BLOCK)
-{
- LEDs_ToggleLEDs(LEDS_LED1 | LEDS_LED2);
-}
-
-/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs. */
-void EVENT_USB_Device_Connect(void)
-{
- /* Indicate USB enumerating */
- LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
-}
-
-/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
- * the status LEDs and stops the Mass Storage management task.
- */
-void EVENT_USB_Device_Disconnect(void)
-{
- /* Indicate USB not ready */
- LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-}
-
-/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_Device_ConfigurationChanged(void)
-{
- bool ConfigSuccess = true;
-
- /* Setup Mass Storage Data Endpoints */
- ConfigSuccess &= MS_Device_ConfigureEndpoints(&Disk_MS_Interface);
-
- /* Indicate endpoint configuration success or failure */
- LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
-}
-
-/** Event handler for the library USB Control Request reception event. */
-void EVENT_USB_Device_ControlRequest(void)
-{
- MS_Device_ProcessControlRequest(&Disk_MS_Interface);
-}
-
-/** Mass Storage class driver callback function the reception of SCSI commands from the host, which must be processed.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface configuration structure being referenced
- */
-bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
-{
- bool CommandSuccess;
-
- LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
- CommandSuccess = SCSI_DecodeSCSICommand(MSInterfaceInfo);
- LEDs_SetAllLEDs(LEDMASK_USB_READY);
-
- return CommandSuccess;
-}
-
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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 BootloaderMassStorage.c.
- */
-
-#ifndef _BOOTLOADER_MASS_STORAGE_H_
-#define _BOOTLOADER_MASS_STORAGE_H_
-
- /* Includes: */
- #include <avr/io.h>
- #include <avr/wdt.h>
- #include <avr/power.h>
- #include <avr/interrupt.h>
- #include <string.h>
-
- #include "Descriptors.h"
-
- #include "Lib/SCSI.h"
-
- #include <LUFA/Drivers/Board/LEDs.h>
- #include <LUFA/Drivers/USB/USB.h>
-
- /* Macros: */
- /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
- #define LEDMASK_USB_NOTREADY LEDS_LED1
-
- /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
- #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
-
- /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
- #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
-
- /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
- #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
-
- /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
- #define LEDMASK_USB_BUSY LEDS_LED2
-
- /* Function Prototypes: */
- void SetupHardware(void);
-
- void EVENT_USB_Device_Connect(void);
- void EVENT_USB_Device_Disconnect(void);
- void EVENT_USB_Device_ConfigurationChanged(void);
- void EVENT_USB_Device_ControlRequest(void);
-
- bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-
-#endif
-
+++ /dev/null
-/** \file
- *
- * This file contains special DoxyGen information for the generation of the main page and other special
- * documentation pages. It is not a project source file.
- */
-
-/** \mainpage Mass Storage Class USB AVR Bootloader
- *
- * \section Sec_Compat Demo Compatibility:
- *
- * The following list indicates what microcontrollers are compatible with this demo.
- *
- * \li Series 7 USB AVRs (AT90USBxxx7)
- * \li Series 6 USB AVRs (AT90USBxxx6)
- *
- * \section Sec_Info USB Information:
- *
- * The following table gives a rundown of the USB utilization of this demo.
- *
- * <table>
- * <tr>
- * <td><b>USB Mode:</b></td>
- * <td>Device</td>
- * </tr>
- * <tr>
- * <td><b>USB Class:</b></td>
- * <td>Mass Storage Device</td>
- * </tr>
- * <tr>
- * <td><b>USB Subclass:</b></td>
- * <td>Bulk-Only Transport</td>
- * </tr>
- * <tr>
- * <td><b>Relevant Standards:</b></td>
- * <td>USBIF Mass Storage Standard \n
- * USB Bulk-Only Transport Standard \n
- * SCSI Primary Commands Specification \n
- * SCSI Block Commands Specification</td>
- * </tr>
- * <tr>
- * <td><b>Supported USB Speeds:</b></td>
- * <td>Full Speed Mode</td>
- * </tr>
- * </table>
- *
- * \section Sec_Description Project Description:
- *
- * This bootloader enumerates to the host as a Mass Storage device, capable of reading and writing a new binary
- * firmware image file, to load firmware onto the AVR.
- *
- * Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit
- * into 8KB 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.
- *
- * \section Sec_Installation Driver Installation
- *
- * This bootloader uses the Mass Storage printer drivers inbuilt into all modern operating systems, thus no additional
- * drivers need to be supplied for correct operation.
- *
- * \section Sec_HostApp Host Controller Application
- *
- * This bootloader is compatible with all operating systems that support the FAT12 file system format. To reprogram the
- * device, overwrite a file stored on the virtual FAT filesystem with a new binary (BIN format) image. Remember to safely
- * remove your device from the host using the host OS's ejection APIs, to ensure all data is correctly flushed to the
- * bootloader's virtual filesystem and not cached in the OS's file system driver.
- *
- * The current device firmware can be read from the device by reading a file from the virtual FAT filesystem.
- *
- * \section Sec_API User Application API
- *
- * Several user application functions for FLASH and other special memory area manipulations are exposed by the bootloader,
- * allowing the user application to call into the bootloader at runtime to read and write FLASH data.
- *
- * By default, the bootloader API jump table is located 32 bytes from the end of the device's FLASH memory, and follows the
- * following layout:
- *
- * \code
- * #define BOOTLOADER_API_TABLE_SIZE 32
- * #define BOOTLOADER_API_TABLE_START ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
- * #define BOOTLOADER_API_CALL(Index) (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
- *
- * void (*BootloaderAPI_ErasePage)(uint32_t Address) = BOOTLOADER_API_CALL(0);
- * void (*BootloaderAPI_WritePage)(uint32_t Address) = BOOTLOADER_API_CALL(1);
- * void (*BootloaderAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
- * uint8_t (*BootloaderAPI_ReadSignature)(uint16_t Address) = BOOTLOADER_API_CALL(3);
- * uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address) = BOOTLOADER_API_CALL(4);
- * uint8_t (*BootloaderAPI_ReadLock)(void) = BOOTLOADER_API_CALL(5);
- * void (*BootloaderAPI_WriteLock)(uint8_t LockBits) = BOOTLOADER_API_CALL(6);
- *
- * #define BOOTLOADER_MAGIC_SIGNATURE_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
- * #define BOOTLOADER_MAGIC_SIGNATURE 0xDCFB
- *
- * #define BOOTLOADER_CLASS_SIGNATURE_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
- * #define BOOTLOADER_MASS_STORAGE_SIGNATURE 0xDF30
- *
- * #define BOOTLOADER_ADDRESS_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
- * #define BOOTLOADER_ADDRESS_LENGTH 4
- * \endcode
- *
- * \subsection SSec_API_MemLayout Device Memory Map
- * The following illustration indicates the final memory map of the device when loaded with the bootloader.
- *
- * \verbatim
- * +----------------------------+ 0x0000
- * | |
- * | |
- * | |
- * | |
- * | |
- * | |
- * | |
- * | |
- * | User Application |
- * | |
- * | |
- * | |
- * | |
- * | |
- * | |
- * | |
- * +----------------------------+ FLASHEND - BOOT_SECTION_SIZE
- * | |
- * | Bootloader Application |
- * | (Not User App. Accessible) |
- * | |
- * +----------------------------+ FLASHEND - 96
- * | API Table Trampolines |
- * | (Not User App. Accessible) |
- * +----------------------------+ FLASHEND - 32
- * | Bootloader API Table |
- * | (User App. Accessible) |
- * +----------------------------+ FLASHEND - 8
- * | Bootloader ID Constants |
- * | (User App. Accessible) |
- * +----------------------------+ FLASHEND
- * \endverbatim
- *
- * Bootloaders reporting a device release revision number of 1.00 or greater are bootloader API enabled. From the application
- * the API support of the bootloader can be detected by reading the FLASH memory bytes located at address \c BOOTLOADER_MAGIC_SIGNATURE_START
- * and comparing them to the value \c BOOTLOADER_MAGIC_SIGNATURE. The class of bootloader can be determined by reading the
- * FLASH memory bytes located at address \c BOOTLOADER_CLASS_SIGNATURE_START and comparing them to the value \c BOOTLOADER_MASS_STORAGE_SIGNATURE.
- * The start address of the bootloader can be retrieved by reading the bytes of FLASH memory starting from address \c BOOTLOADER_ADDRESS_START.
- *
- * \section Sec_Options Project Options
- *
- * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.
- *
- * <table>
- * <tr>
- * <td>
- * None
- * </td>
- * </tr>
- * </table>
- */
-
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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 header file is 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
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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"
-
-
-/** 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 DeviceDescriptor =
-{
- .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
-
- .USBSpecification = VERSION_BCD(01.10),
- .Class = USB_CSCP_NoDeviceClass,
- .SubClass = USB_CSCP_NoDeviceSubclass,
- .Protocol = USB_CSCP_NoDeviceProtocol,
-
- .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
-
- .VendorID = 0x03EB,
- .ProductID = 0x2045,
- .ReleaseNumber = VERSION_BCD(00.01),
-
- .ManufacturerStrIndex = NO_DESCRIPTOR,
- .ProductStrIndex = NO_DESCRIPTOR,
- .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 ConfigurationDescriptor =
-{
- .Config =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
-
- .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
- .TotalInterfaces = 1,
-
- .ConfigurationNumber = 1,
- .ConfigurationStrIndex = NO_DESCRIPTOR,
-
- .ConfigAttributes = USB_CONFIG_ATTR_RESERVED,
-
- .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
- },
-
- .MS_Interface =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
-
- .InterfaceNumber = 0,
- .AlternateSetting = 0,
-
- .TotalEndpoints = 2,
-
- .Class = MS_CSCP_MassStorageClass,
- .SubClass = MS_CSCP_SCSITransparentSubclass,
- .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
-
- .InterfaceStrIndex = NO_DESCRIPTOR
- },
-
- .MS_DataInEndpoint =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
-
- .EndpointAddress = MASS_STORAGE_IN_EPADDR,
- .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
- .EndpointSize = MASS_STORAGE_IO_EPSIZE,
- .PollingIntervalMS = 0x05
- },
-
- .MS_DataOutEndpoint =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
-
- .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
- .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
- .EndpointSize = MASS_STORAGE_IO_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 LanguageString =
-{
- .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
-
- .UnicodeString = {LANGUAGE_ID_ENG}
-};
-
-/** 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:
- if (!(DescriptorNumber))
- {
- Address = &LanguageString;
- Size = pgm_read_byte(&LanguageString.Header.Size);
- }
-
- break;
- }
-
- *DescriptorAddress = Address;
- return Size;
-}
-
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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 Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
-
- /** 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
-
- /* 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;
-
- // Mass Storage Interface
- USB_Descriptor_Interface_t MS_Interface;
- USB_Descriptor_Endpoint_t MS_DataInEndpoint;
- USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
- } 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.3.1\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 = "LUFA Library - Mass Storage Class Bootloader"\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 =\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. Note that you specify absolute paths here, but also\r
-# relative paths, which will be relative from the directory where doxygen is\r
-# started.\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\r
-# extension. Doxygen has a built-in mapping, but you can override or extend it\r
-# using this tag. The format is ext=language, where ext is a file extension,\r
-# and language is one of the parsers supported by doxygen: IDL, Java,\r
-# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,\r
-# C++. For instance to make doxygen treat .inc files as Fortran files (default\r
-# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note\r
-# that for custom extensions you also need to set FILE_PATTERNS otherwise the\r
-# 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
-# When enabled doxygen tries to link words that correspond to documented classes,\r
-# or namespaces to their corresponding documentation. Such a link can be\r
-# prevented in individual cases by by putting a % sign in front of the word or\r
-# globally by setting AUTOLINK_SUPPORT to NO.\r
-\r
-AUTOLINK_SUPPORT = YES\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\r
-# getter and setter methods for a property. Setting this option to YES (the\r
-# default) will make doxygen replace the get and set methods by a property in\r
-# the 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\r
-# 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 section-label ... \endif\r
-# and \cond section-label ... \endcond blocks.\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
-# 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. To 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. Do not use\r
-# file names with spaces, bibtex cannot handle them.\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
-# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that\r
-# is part of the input, its contents will be placed on the main page (index.html).\r
-# This can be useful if you have a project on for instance GitHub and want reuse\r
-# the introduction page also for the doxygen output.\r
-\r
-USE_MDFILE_AS_MAINPAGE =\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, C++ and Fortran 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 left blank doxygen will\r
-# generate a default style sheet. Note that it is recommended to use\r
-# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this\r
-# tag will in the future become obsolete.\r
-\r
-HTML_STYLESHEET =\r
-\r
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional\r
-# user-defined cascading style sheet that is included after the standard\r
-# style sheets created by doxygen. Using this option one can overrule\r
-# certain style aspects. This is preferred over using HTML_STYLESHEET\r
-# since it does not replace the standard style sheet and is therefor more\r
-# robust against future updates. Doxygen will copy the style sheet file to\r
-# the output directory.\r
-\r
-HTML_EXTRA_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_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.\r
-\r
-HTML_DYNAMIC_SECTIONS = YES\r
-\r
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of\r
-# entries shown in the various tree structured indices initially; the user\r
-# can expand and collapse entries dynamically later on. Doxygen will expand\r
-# the tree to such a level that at most the specified number of entries are\r
-# visible (unless a fully collapsed tree already exceeds this amount).\r
-# So setting the number of entries 1 will produce a full collapsed tree by\r
-# default. 0 is a special value representing an infinite number of entries\r
-# and will result in a full expanded tree by default.\r
-\r
-HTML_INDEX_NUM_ENTRIES = 100\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\r
-# identify the documentation publisher. This should be a reverse domain-name\r
-# style 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 = YES\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
-# 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 can set the default output format to be used for\r
-# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and\r
-# SVG. The default value is HTML-CSS, which is slower, but has the best\r
-# compatibility.\r
-\r
-MATHJAX_FORMAT = HTML-CSS\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 web server instead of a web client using Javascript.\r
-# There are two flavours of web server based search depending on the\r
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for\r
-# searching and an index file used by the script. When EXTERNAL_SEARCH is\r
-# enabled the indexing and searching needs to be provided by external tools.\r
-# See the manual for details.\r
-\r
-SERVER_BASED_SEARCH = NO\r
-\r
-# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP\r
-# script for searching. Instead the search results are written to an XML file\r
-# which needs to be processed by an external indexer. Doxygen will invoke an\r
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain\r
-# the search results. Doxygen ships with an example indexer (doxyindexer) and\r
-# search engine (doxysearch.cgi) which are based on the open source search engine\r
-# library Xapian. See the manual for configuration details.\r
-\r
-EXTERNAL_SEARCH = NO\r
-\r
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server\r
-# which will returned the search results when EXTERNAL_SEARCH is enabled.\r
-# Doxygen ships with an example search engine (doxysearch) which is based on\r
-# the open source search engine library Xapian. See the manual for configuration\r
-# details.\r
-\r
-SEARCHENGINE_URL =\r
-\r
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\r
-# search data is written to a file for indexing by an external tool. With the\r
-# SEARCHDATA_FILE tag the name of this file can be specified.\r
-\r
-SEARCHDATA_FILE = searchdata.xml\r
-\r
-# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the\r
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\r
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\r
-# projects and redirect the results back to the right project.\r
-\r
-EXTERNAL_SEARCH_ID =\r
-\r
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\r
-# projects other than the one defined by this configuration file, but that are\r
-# all added to the same external search index. Each project needs to have a\r
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id\r
-# of to a relative location where the documentation can be found.\r
-# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...\r
-\r
-EXTRA_SEARCH_MAPPINGS =\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
- ATTR_NO_INIT\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 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, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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
- *
- * SCSI command processing routines, for SCSI commands issued by the host. Mass Storage
- * devices use a thin "Bulk-Only Transport" protocol for issuing commands and status information,
- * which wrap around standard SCSI device commands for controlling the actual storage medium.
- */
-
-#define INCLUDE_FROM_SCSI_C
-#include "SCSI.h"
-
-/** Structure to hold the SCSI response data to a SCSI INQUIRY command. This gives information about the device's
- * features and capabilities.
- */
-static const SCSI_Inquiry_Response_t InquiryData =
- {
- .DeviceType = DEVICE_TYPE_BLOCK,
- .PeripheralQualifier = 0,
-
- .Removable = true,
-
- .Version = 0,
-
- .ResponseDataFormat = 2,
- .NormACA = false,
- .TrmTsk = false,
- .AERC = false,
-
- .AdditionalLength = 0x1F,
-
- .SoftReset = false,
- .CmdQue = false,
- .Linked = false,
- .Sync = false,
- .WideBus16Bit = false,
- .WideBus32Bit = false,
- .RelAddr = false,
-
- .VendorID = "LUFA",
- .ProductID = "Bootloader",
- .RevisionID = {'0','.','0','0'},
- };
-
-/** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE
- * command is issued. This gives information on exactly why the last command failed to complete.
- */
-static SCSI_Request_Sense_Response_t SenseData =
- {
- .ResponseCode = 0x70,
- .AdditionalLength = 0x0A,
- };
-
-
-/** Main routine to process the SCSI command located in the Command Block Wrapper read from the host. This dispatches
- * to the appropriate SCSI command handling routine if the issued command is supported by the device, else it returns
- * a command failure due to a ILLEGAL REQUEST.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
- *
- * \return Boolean true if the command completed successfully, false otherwise
- */
-bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
-{
- bool CommandSuccess = false;
-
- /* Run the appropriate SCSI command hander function based on the passed command */
- switch (MSInterfaceInfo->State.CommandBlock.SCSICommandData[0])
- {
- case SCSI_CMD_INQUIRY:
- CommandSuccess = SCSI_Command_Inquiry(MSInterfaceInfo);
- break;
- case SCSI_CMD_REQUEST_SENSE:
- CommandSuccess = SCSI_Command_Request_Sense(MSInterfaceInfo);
- break;
- case SCSI_CMD_READ_CAPACITY_10:
- CommandSuccess = SCSI_Command_Read_Capacity_10(MSInterfaceInfo);
- break;
- case SCSI_CMD_SEND_DIAGNOSTIC:
- CommandSuccess = SCSI_Command_Send_Diagnostic(MSInterfaceInfo);
- break;
- case SCSI_CMD_WRITE_10:
- CommandSuccess = SCSI_Command_ReadWrite_10(MSInterfaceInfo, DATA_WRITE);
- break;
- case SCSI_CMD_READ_10:
- CommandSuccess = SCSI_Command_ReadWrite_10(MSInterfaceInfo, DATA_READ);
- break;
- case SCSI_CMD_MODE_SENSE_6:
- CommandSuccess = SCSI_Command_ModeSense_6(MSInterfaceInfo);
- break;
- case SCSI_CMD_START_STOP_UNIT:
- case SCSI_CMD_TEST_UNIT_READY:
- case SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL:
- case SCSI_CMD_VERIFY_10:
- /* These commands should just succeed, no handling required */
- CommandSuccess = true;
- MSInterfaceInfo->State.CommandBlock.DataTransferLength = 0;
- break;
- default:
- /* Update the SENSE key to reflect the invalid command */
- SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
- SCSI_ASENSE_INVALID_COMMAND,
- SCSI_ASENSEQ_NO_QUALIFIER);
- break;
- }
-
- /* Check if command was successfully processed */
- if (CommandSuccess)
- {
- SCSI_SET_SENSE(SCSI_SENSE_KEY_GOOD,
- SCSI_ASENSE_NO_ADDITIONAL_INFORMATION,
- SCSI_ASENSEQ_NO_QUALIFIER);
-
- return true;
- }
-
- return false;
-}
-
-/** Command processing for an issued SCSI INQUIRY command. This command returns information about the device's features
- * and capabilities to the host.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
- *
- * \return Boolean true if the command completed successfully, false otherwise.
- */
-static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
-{
- uint16_t AllocationLength = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]);
- uint16_t BytesTransferred = MIN(AllocationLength, sizeof(InquiryData));
-
- /* Only the standard INQUIRY data is supported, check if any optional INQUIRY bits set */
- if ((MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & ((1 << 0) | (1 << 1))) ||
- MSInterfaceInfo->State.CommandBlock.SCSICommandData[2])
- {
- /* Optional but unsupported bits set - update the SENSE key and fail the request */
- SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
- SCSI_ASENSE_INVALID_FIELD_IN_CDB,
- SCSI_ASENSEQ_NO_QUALIFIER);
-
- return false;
- }
-
- Endpoint_Write_Stream_LE(&InquiryData, BytesTransferred, NULL);
-
- /* Pad out remaining bytes with 0x00 */
- Endpoint_Null_Stream((AllocationLength - BytesTransferred), NULL);
-
- /* Finalize the stream transfer to send the last packet */
- Endpoint_ClearIN();
-
- /* Succeed the command and update the bytes transferred counter */
- MSInterfaceInfo->State.CommandBlock.DataTransferLength -= BytesTransferred;
-
- return true;
-}
-
-/** Command processing for an issued SCSI REQUEST SENSE command. This command returns information about the last issued command,
- * including the error code and additional error information so that the host can determine why a command failed to complete.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
- *
- * \return Boolean true if the command completed successfully, false otherwise.
- */
-static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
-{
- uint8_t AllocationLength = MSInterfaceInfo->State.CommandBlock.SCSICommandData[4];
- uint8_t BytesTransferred = MIN(AllocationLength, sizeof(SenseData));
-
- Endpoint_Write_Stream_LE(&SenseData, BytesTransferred, NULL);
- Endpoint_Null_Stream((AllocationLength - BytesTransferred), NULL);
- Endpoint_ClearIN();
-
- /* Succeed the command and update the bytes transferred counter */
- MSInterfaceInfo->State.CommandBlock.DataTransferLength -= BytesTransferred;
-
- return true;
-}
-
-/** Command processing for an issued SCSI READ CAPACITY (10) command. This command returns information about the device's capacity
- * on the selected Logical Unit (drive), as a number of OS-sized blocks.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
- *
- * \return Boolean true if the command completed successfully, false otherwise.
- */
-static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
-{
- uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);
- uint32_t MediaBlockSize = SECTOR_SIZE_BYTES;
-
- Endpoint_Write_Stream_BE(&LastBlockAddressInLUN, sizeof(LastBlockAddressInLUN), NULL);
- Endpoint_Write_Stream_BE(&MediaBlockSize, sizeof(MediaBlockSize), NULL);
- Endpoint_ClearIN();
-
- /* Succeed the command and update the bytes transferred counter */
- MSInterfaceInfo->State.CommandBlock.DataTransferLength -= 8;
-
- return true;
-}
-
-/** Command processing for an issued SCSI SEND DIAGNOSTIC command. This command performs a quick check of the Dataflash ICs on the
- * board, and indicates if they are present and functioning correctly. Only the Self-Test portion of the diagnostic command is
- * supported.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
- *
- * \return Boolean true if the command completed successfully, false otherwise.
- */
-static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
-{
- /* Check to see if the SELF TEST bit is not set */
- if (!(MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & (1 << 2)))
- {
- /* Only self-test supported - update SENSE key and fail the command */
- SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
- SCSI_ASENSE_INVALID_FIELD_IN_CDB,
- SCSI_ASENSEQ_NO_QUALIFIER);
-
- return false;
- }
-
- /* Succeed the command and update the bytes transferred counter */
- MSInterfaceInfo->State.CommandBlock.DataTransferLength = 0;
-
- return true;
-}
-
-/** Command processing for an issued SCSI READ (10) or WRITE (10) command. This command reads in the block start address
- * and total number of blocks to process, then calls the appropriate low-level Dataflash routine to handle the actual
- * reading and writing of the data.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
- * \param[in] IsDataRead Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
- *
- * \return Boolean true if the command completed successfully, false otherwise.
- */
-static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
- const bool IsDataRead)
-{
- uint32_t BlockAddress;
- uint16_t TotalBlocks;
-
- /* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
- BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
-
- /* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */
- TotalBlocks = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
-
- /* Check if the block address is outside the maximum allowable value for the LUN */
- if (BlockAddress >= LUN_MEDIA_BLOCKS)
- {
- /* Block address is invalid, update SENSE key and return command fail */
- SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
- SCSI_ASENSE_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE,
- SCSI_ASENSEQ_NO_QUALIFIER);
-
- return false;
- }
-
- /* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
- if (IsDataRead == DATA_READ)
- VirtualFAT_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
- else
- VirtualFAT_WriteBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
-
- /* Update the bytes transferred counter and succeed the command */
- MSInterfaceInfo->State.CommandBlock.DataTransferLength -= ((uint32_t)TotalBlocks * SECTOR_SIZE_BYTES);
-
- return true;
-}
-
-/** Command processing for an issued SCSI MODE SENSE (6) command. This command returns various informational pages about
- * the SCSI device, as well as the device's Write Protect status.
- *
- * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
- *
- * \return Boolean true if the command completed successfully, false otherwise.
- */
-static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
-{
- /* Send an empty header response indicating Write Protect flag is off */
- Endpoint_Write_32_LE(0);
- Endpoint_ClearIN();
-
- /* Update the bytes transferred counter and succeed the command */
- MSInterfaceInfo->State.CommandBlock.DataTransferLength -= 4;
-
- return true;
-}
-
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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 SCSI.c.
- */
-
-#ifndef _SCSI_H_
-#define _SCSI_H_
-
- /* Includes: */
- #include <avr/io.h>
- #include <avr/pgmspace.h>
-
- #include <LUFA/Drivers/USB/USB.h>
-
- #include "../BootloaderMassStorage.h"
- #include "../Descriptors.h"
- #include "VirtualFAT.h"
-
- /* Macros: */
- /** Macro to set the current SCSI sense data to the given key, additional sense code and additional sense qualifier. This
- * is for convenience, as it allows for all three sense values (returned upon request to the host to give information about
- * the last command failure) in a quick and easy manner.
- *
- * \param[in] Key New SCSI sense key to set the sense code to
- * \param[in] Acode New SCSI additional sense key to set the additional sense code to
- * \param[in] Aqual New SCSI additional sense key qualifier to set the additional sense qualifier code to
- */
- #define SCSI_SET_SENSE(Key, Acode, Aqual) MACROS{ SenseData.SenseKey = (Key); \
- SenseData.AdditionalSenseCode = (Acode); \
- SenseData.AdditionalSenseQualifier = (Aqual); }MACROE
-
- /** Macro for the \ref SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium. */
- #define DATA_READ true
-
- /** Macro for the \ref SCSI_Command_ReadWrite_10() function, to indicate that data is to be written to the storage medium. */
- #define DATA_WRITE false
-
- /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a Block Media device. */
- #define DEVICE_TYPE_BLOCK 0x00
-
- /* Function Prototypes: */
- bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-
- #if defined(INCLUDE_FROM_SCSI_C)
- static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
- const bool IsDataRead);
- static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
- #endif
-
-#endif
-
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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
- *
- * Virtualized FAT12 filesystem implementation, to perform self-programming
- * in response to read and write requests to the virtual filesystem by the
- * host PC.
- */
-
-#define INCLUDE_FROM_VIRTUAL_FAT_C
-#include "VirtualFAT.h"
-
-/** FAT filesystem boot sector block, must be the first sector on the physical
- * disk so that the host can identify the presence of a FAT filesystem. This
- * block is truncated; normally a large bootstrap section is located near the
- * end of the block for booting purposes however as this is not meant to be a
- * bootable disk it is omitted for space reasons.
- *
- * \note When returning the boot block to the host, the magic signature 0xAA55
- * must be added to the very end of the block to identify it as a boot
- * block.
- */
-static const FATBootBlock_t BootBlock =
- {
- .Bootstrap = {0xEB, 0x3C, 0x90},
- .Description = "mkdosfs",
- .SectorSize = SECTOR_SIZE_BYTES,
- .SectorsPerCluster = SECTOR_PER_CLUSTER,
- .ReservedSectors = 1,
- .FATCopies = 2,
- .RootDirectoryEntries = (SECTOR_SIZE_BYTES / sizeof(FATDirectoryEntry_t)),
- .TotalSectors16 = LUN_MEDIA_BLOCKS,
- .MediaDescriptor = 0xF8,
- .SectorsPerFAT = 1,
- .SectorsPerTrack = (LUN_MEDIA_BLOCKS % 64),
- .Heads = (LUN_MEDIA_BLOCKS / 64),
- .HiddenSectors = 0,
- .TotalSectors32 = 0,
- .PhysicalDriveNum = 0,
- .ExtendedBootRecordSig = 0x29,
- .VolumeSerialNumber = 0x12345678,
- .VolumeLabel = "LUFA BOOT ",
- .FilesystemIdentifier = "FAT12 ",
- };
-
-/** FAT 8.3 style directory entry, for the virtual FLASH contents file. */
-static FATDirectoryEntry_t FirmwareFileEntry =
- {
- .Filename = "FIRMWARE",
- .Extension = "BIN",
- .Attributes = 0,
- .Reserved = {0},
- .CreationTime = FAT_TIME(1, 1, 0),
- .CreationDate = FAT_DATE(14, 2, 1989),
- .StartingCluster = 2,
- .FileSizeBytes = FIRMWARE_FILE_SIZE_BYTES,
- };
-
-
-/** Updates a FAT12 cluster entry in the FAT file table with the specified next
- * chain index. If the cluster is the last in the file chain, the magic value
- * 0xFFF is used.
- *
- * \note FAT data cluster indexes are offset by 2, so that cluster 2 is the
- * first file data cluster on the disk. See the FAT specification.
- *
- * \param[out] FATTable Pointer to the FAT12 allocation table
- * \param[in] Index Index of the cluster entry to update
- * \param[in] ChainEntry Next cluster index in the file chain
- */
-static void UpdateFAT12ClusterEntry(uint8_t* const FATTable,
- const uint16_t Index,
- const uint16_t ChainEntry)
-{
- /* Calculate the starting offset of the cluster entry in the FAT12 table */
- uint8_t FATOffset = (Index * 3) / 2;
- bool UpperNibble = (((Index * 3) % 2) != 0);
-
- /* Check if the start of the entry is at an upper nibble of the byte, fill
- * out FAT12 entry as required */
- if (UpperNibble)
- {
- FATTable[FATOffset] = (FATTable[FATOffset] & 0x0F) | ((ChainEntry & 0x0F) << 4);
- FATTable[FATOffset + 1] = (ChainEntry >> 4);
- }
- else
- {
- FATTable[FATOffset] = ChainEntry;
- FATTable[FATOffset + 1] = (FATTable[FATOffset] & 0xF0) | (ChainEntry >> 8);
- }
-}
-
-/** Writes a block of data to the virtual FAT filesystem, from the USB Mass
- * Storage interface.
- *
- * \param[in] BlockNumber Index of the block to write.
- */
-static void WriteVirtualBlock(const uint16_t BlockNumber)
-{
- uint8_t BlockBuffer[SECTOR_SIZE_BYTES];
-
- /* Buffer the entire block to be written from the host */
- Endpoint_Read_Stream_LE(BlockBuffer, sizeof(BlockBuffer), NULL);
- Endpoint_ClearOUT();
-
- if ((BlockNumber >= 4) && (BlockNumber < (4 + FILE_SECTORS(FIRMWARE_FILE_SIZE_BYTES))))
- {
- uint32_t WriteFlashAddress = (uint32_t)(BlockNumber - 4) * SECTOR_SIZE_BYTES;
-
- for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i += 2)
- {
- if ((WriteFlashAddress % SPM_PAGESIZE) == 0)
- {
- /* Erase the given FLASH page, ready to be programmed */
- boot_page_erase(WriteFlashAddress);
- boot_spm_busy_wait();
- }
-
- /* Write the next data word to the FLASH page */
- boot_page_fill(WriteFlashAddress, (BlockBuffer[i + 1] << 8) | BlockBuffer[i]);
- WriteFlashAddress += 2;
-
- if ((WriteFlashAddress % SPM_PAGESIZE) == 0)
- {
- /* Write the filled FLASH page to memory */
- boot_page_write(WriteFlashAddress - SPM_PAGESIZE);
- boot_spm_busy_wait();
- }
- }
- }
-}
-
-/** Reads a block of data from the virtual FAT filesystem, and sends it to the
- * host via the USB Mass Storage interface.
- *
- * \param[in] BlockNumber Index of the block to read.
- */
-static void ReadVirtualBlock(const uint16_t BlockNumber)
-{
- uint8_t BlockBuffer[SECTOR_SIZE_BYTES];
- memset(BlockBuffer, 0x00, sizeof(BlockBuffer));
-
- switch (BlockNumber)
- {
- case 0: /* Block 0: Boot block sector */
- memcpy(BlockBuffer, &BootBlock, sizeof(FATBootBlock_t));
-
- /* Add the magic signature to the end of the block */
- BlockBuffer[SECTOR_SIZE_BYTES - 2] = 0x55;
- BlockBuffer[SECTOR_SIZE_BYTES - 1] = 0xAA;
- break;
-
- case 1: /* Block 1: First FAT12 cluster chain copy */
- case 2: /* Block 2: Second FAT12 cluster chain copy */
- /* Cluster 0: Media type/Reserved */
- UpdateFAT12ClusterEntry(BlockBuffer, 0, 0xF00 | BootBlock.MediaDescriptor);
-
- /* Cluster 1: Reserved */
- UpdateFAT12ClusterEntry(BlockBuffer, 1, 0xFFF);
-
- /* Cluster 2 onwards: Cluster chain of FIRMWARE.BIN */
- for (uint16_t i = 0; i < FILE_CLUSTERS(FIRMWARE_FILE_SIZE_BYTES); i++)
- UpdateFAT12ClusterEntry(BlockBuffer, i+2, i+3);
-
- /* Mark last cluster as end of file */
- UpdateFAT12ClusterEntry(BlockBuffer, FILE_CLUSTERS(FIRMWARE_FILE_SIZE_BYTES) + 1, 0xFFF);
- break;
-
- case 3: /* Block 3: Root file entries */
- memcpy(BlockBuffer, &FirmwareFileEntry, sizeof(FATDirectoryEntry_t));
- break;
-
- default: /* Blocks 4 onwards: Data allocation section */
- if ((BlockNumber >= 4) && (BlockNumber < (4 + FILE_SECTORS(FIRMWARE_FILE_SIZE_BYTES))))
- {
- uint32_t ReadFlashAddress = (uint32_t)(BlockNumber - 4) * SECTOR_SIZE_BYTES;
-
- for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i++)
- BlockBuffer[i] = pgm_read_byte_far(ReadFlashAddress++);
- }
-
- break;
- }
-
- /* Write the entire read block Buffer to the host */
- Endpoint_Write_Stream_LE(BlockBuffer, sizeof(BlockBuffer), NULL);
- Endpoint_ClearIN();
-}
-
-/** Writes a number of blocks to the virtual FAT file system, from the host
- * PC via the USB Mass Storage interface.
- *
- * \param[in] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state
- * \param[in] BlockAddress Data block starting address for the write sequence
- * \param[in] TotalBlocks Number of blocks of data to write
- */
-void VirtualFAT_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
- const uint32_t BlockAddress,
- uint16_t TotalBlocks)
-{
- uint16_t CurrentBlock = (uint16_t)BlockAddress;
-
- /* Emulated FAT is performed per-block, pass each requested block index
- * to the emulated FAT block write function */
- while (TotalBlocks--)
- WriteVirtualBlock(CurrentBlock++);
-}
-
-/** Reads a number of blocks from the virtual FAT file system, and sends them
- * to the host PC via the USB Mass Storage interface.
- *
- * \param[in] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state
- * \param[in] BlockAddress Data block starting address for the read sequence
- * \param[in] TotalBlocks Number of blocks of data to read
- */
-void VirtualFAT_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
- const uint32_t BlockAddress,
- uint16_t TotalBlocks)
-{
- uint16_t CurrentBlock = (uint16_t)BlockAddress;
-
- /* Emulated FAT is performed per-block, pass each requested block index
- * to the emulated FAT block read function */
- while (TotalBlocks--)
- ReadVirtualBlock(CurrentBlock++);
-}
-
+++ /dev/null
-/*
- LUFA Library
- Copyright (C) Dean Camera, 2013.
-
- dean [at] fourwalledcubicle [dot] com
- www.lufa-lib.org
-*/
-
-/*
- Copyright 2013 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 disclaims 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.
-*/
-
-#ifndef _VIRTUALFAT_H_
-#define _VIRTUALFAT_H_
-
- /* Includes: */
- #include <avr/io.h>
- #include <avr/pgmspace.h>
-
- #include <LUFA/Drivers/USB/USB.h>
-
- /* Macros: */
- /** Size of the virtual FIRMWARE.BIN file in bytes. */
- #define FIRMWARE_FILE_SIZE_BYTES (FLASHEND - (FLASHEND - BOOT_START_ADDR) + 1UL)
-
- /** Number of sectors that comprise a single logical disk cluster. */
- #define SECTOR_PER_CLUSTER 4
-
- /** Size of a single logical sector on the disk. */
- #define SECTOR_SIZE_BYTES 512
-
- /** Size of a logical cluster on the disk, in bytes */
- #define CLUSTER_SIZE_BYTES (SECTOR_PER_CLUSTER * SECTOR_SIZE_BYTES)
-
- /** Number of sectors required to store a given size in bytes.
- *
- * \param[in] size Size of the data that needs to be stored
- *
- * \return Number of sectors required to store the given data on the disk.
- */
- #define FILE_SECTORS(size) ((size / SECTOR_SIZE_BYTES) + ((size % SECTOR_SIZE_BYTES) ? 1 : 0))
-
- /** Number of clusters required to store a given size in bytes.
- *
- * \param[in] size Size of the data that needs to be stored
- *
- * \return Number of clusters required to store the given data on the disk.
- */
- #define FILE_CLUSTERS(size) ((size / CLUSTER_SIZE_BYTES) + ((size % CLUSTER_SIZE_BYTES) ? 1 : 0))
-
- /** Total number of logical sectors/blocks on the disk. */
- #define LUN_MEDIA_BLOCKS (FILE_SECTORS(FIRMWARE_FILE_SIZE_BYTES) + 32)
-
- /** Converts a given time in HH:MM:SS format to a FAT filesystem time.
- *
- * \note The minimum seconds resolution of FAT is 2, thus odd seconds
- * will be truncated to the previous integer multiple of 2 seconds.
- *
- * \param[in] hh Hours (0-23)
- * \param[in] mm Minutes (0-59)
- * \param[in] ss Seconds (0-59)
- *
- * \return Given time encoded as a FAT filesystem timestamp
- */
- #define FAT_TIME(hh, mm, ss) ((hh << 11) | (mm << 5) | (ss >> 1))
-
- /** Converts a given date in DD/MM/YYYY format to a FAT filesystem date.
- *
- * \param[in] dd Days in the month (1-31)
- * \param[in] mm Months in the year (1-12)
- * \param[in] yyyy Year (1980 - 2107)
- *
- * \return Given date encoded as a FAT filesystem datestamp
- */
- #define FAT_DATE(dd, mm, yyyy) (((yyyy - 1980) << 9) | (mm << 5) | (dd << 0))
-
- /* Type Definitions: */
- /** FAT boot block structure definition, used to identify the core
- * parameters of a FAT filesystem stored on a disk.
- *
- * \note This definition is truncated to save space; the magic signature
- * 0xAA55 must be appended to the very end of the block for it to
- * be detected by the host as a valid boot block.
- */
- typedef struct
- {
- uint8_t Bootstrap[3];
- uint8_t Description[8];
- uint16_t SectorSize;
- uint8_t SectorsPerCluster;
- uint16_t ReservedSectors;
- uint8_t FATCopies;
- uint16_t RootDirectoryEntries;
- uint16_t TotalSectors16;
- uint8_t MediaDescriptor;
- uint16_t SectorsPerFAT;
- uint16_t SectorsPerTrack;
- uint16_t Heads;
- uint32_t HiddenSectors;
- uint32_t TotalSectors32;
- uint16_t PhysicalDriveNum;
- uint8_t ExtendedBootRecordSig;
- uint32_t VolumeSerialNumber;
- uint8_t VolumeLabel[11];
- uint8_t FilesystemIdentifier[8];
- /* uint8_t BootstrapProgram[448]; */
- /* uint16_t MagicSignature; */
- } FATBootBlock_t;
-
- /** FAT legacy 8.3 style directory entry structure definition, used to
- * identify the files and folders of FAT filesystem stored on a disk.
- */
- typedef struct
- {
- uint8_t Filename[8];
- uint8_t Extension[3];
- uint8_t Attributes;
- uint8_t Reserved[10];
- uint16_t CreationTime;
- uint16_t CreationDate;
- uint16_t StartingCluster;
- uint32_t FileSizeBytes;
- } FATDirectoryEntry_t;
-
- /* Function Prototypes: */
- #if defined(INCLUDE_FROM_VIRTUAL_FAT_C)
- static void UpdateFAT12ClusterEntry(uint8_t* const FATTable,
- const uint16_t Index,
- const uint16_t ChainEntry);
- static void WriteVirtualBlock(const uint16_t BlockNumber);
- static void ReadVirtualBlock(const uint16_t BlockNumber);
- #endif
-
- void VirtualFAT_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
- const uint32_t BlockAddress,
- uint16_t TotalBlocks);
-
- void VirtualFAT_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
- const uint32_t BlockAddress,
- uint16_t TotalBlocks);
-#endif
+++ /dev/null
-#\r
-# LUFA Library\r
-# Copyright (C) Dean Camera, 2013.\r
-#\r
-# dean [at] fourwalledcubicle [dot] com\r
-# www.lufa-lib.org\r
-#\r
-# --------------------------------------\r
-# LUFA Project Makefile.\r
-# --------------------------------------\r
-\r
-# Run "make help" for target help.\r
-\r
-MCU = at90usb1287\r
-ARCH = AVR8\r
-BOARD = USBKEY\r
-F_CPU = 8000000\r
-F_USB = $(F_CPU)\r
-OPTIMIZATION = s\r
-TARGET = BootloaderMassStorage\r
-SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)\r
-LUFA_PATH = ../../../LUFA\r
-CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)\r
-LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)\r
-\r
-# Flash size and bootloader section sizes of the target, in KB. These must\r
-# match the target's total FLASH size and the bootloader size set in the\r
-# device's fuses.\r
-FLASH_SIZE_KB = 128\r
-BOOT_SECTION_SIZE_KB = 8\r
-\r
-# Bootloader address calculation formulas\r
-# Do not modify these macros, but rather modify the dependent values above.\r
-CALC_ADDRESS_IN_HEX = $(shell printf "0x%X" $$(( $(1) )) )\r
-BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 )\r
-BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - $(strip $(1)) )\r
-\r
-# Bootloader linker section flags for relocating the API table sections to\r
-# known FLASH addresses - these should not normally be user-edited.\r
-BOOT_SECTION_LD_FLAG = -Wl,--section-start=.apitable_$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=BootloaderAPI_$(strip $(2))\r
-BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, 96)\r
-BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, jumptable, JumpTable, 32)\r
-BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8)\r
-\r
-# Default target\r
-all:\r
-\r
-# Include LUFA build script makefiles\r
-include $(LUFA_PATH)/Build/lufa_core.mk\r
-include $(LUFA_PATH)/Build/lufa_sources.mk\r
-include $(LUFA_PATH)/Build/lufa_build.mk\r
-include $(LUFA_PATH)/Build/lufa_cppcheck.mk\r
-include $(LUFA_PATH)/Build/lufa_doxygen.mk\r
-include $(LUFA_PATH)/Build/lufa_avrdude.mk\r
-include $(LUFA_PATH)/Build/lufa_atprogram.mk\r
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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
+ *
+ * Bootloader user application API functions.
+ */
+
+#include "BootloaderAPI.h"
+
+void BootloaderAPI_ErasePage(const uint32_t Address)
+{
+ boot_page_erase_safe(Address);
+ boot_spm_busy_wait();
+ boot_rww_enable();
+}
+
+void BootloaderAPI_WritePage(const uint32_t Address)
+{
+ boot_page_write_safe(Address);
+ boot_spm_busy_wait();
+ boot_rww_enable();
+}
+
+void BootloaderAPI_FillWord(const uint32_t Address, const uint16_t Word)
+{
+ boot_page_fill_safe(Address, Word);
+}
+
+uint8_t BootloaderAPI_ReadSignature(const uint16_t Address)
+{
+ return boot_signature_byte_get(Address);
+}
+
+uint8_t BootloaderAPI_ReadFuse(const uint16_t Address)
+{
+ return boot_lock_fuse_bits_get(Address);
+}
+
+uint8_t BootloaderAPI_ReadLock(void)
+{
+ return boot_lock_fuse_bits_get(GET_LOCK_BITS);
+}
+
+void BootloaderAPI_WriteLock(const uint8_t LockBits)
+{
+ boot_lock_bits_set_safe(LockBits);
+}
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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 BootloaderAPI.c.
+ */
+
+#ifndef _BOOTLOADER_API_H_
+#define _BOOTLOADER_API_H_
+
+ /* Includes: */
+ #include <avr/io.h>
+ #include <avr/boot.h>
+ #include <stdbool.h>
+
+ #include <LUFA/Common/Common.h>
+
+ /* Function Prototypes: */
+ void BootloaderAPI_ErasePage(const uint32_t Address);
+ void BootloaderAPI_WritePage(const uint32_t Address);
+ void BootloaderAPI_FillWord(const uint32_t Address, const uint16_t Word);
+ uint8_t BootloaderAPI_ReadSignature(const uint16_t Address);
+ uint8_t BootloaderAPI_ReadFuse(const uint16_t Address);
+ uint8_t BootloaderAPI_ReadLock(void);
+ void BootloaderAPI_WriteLock(const uint8_t LockBits);
+
+#endif
+
--- /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
+/*\r
+ Copyright 2013 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, distribute, and sell this\r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in\r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting\r
+ documentation, and that the name of the author not be used in\r
+ advertising or publicity pertaining to distribution of the\r
+ software without specific, written prior permission.\r
+\r
+ The author disclaims all warranties with regard to this\r
+ software, including all implied warranties of merchantability\r
+ and fitness. In no event shall the author be liable for any\r
+ special, indirect or consequential damages or any damages\r
+ whatsoever resulting from loss of use, data or profits, whether\r
+ in an action of contract, negligence or other tortious action,\r
+ arising out of or in connection with the use or performance of\r
+ this software.\r
+*/\r
+\r
+; Trampolines to actual API implementations if the target address is outside the\r
+; range of a rjmp instruction (can happen with large bootloader sections)\r
+.section .apitable_trampolines, "ax"\r
+.global BootloaderAPI_Trampolines\r
+BootloaderAPI_Trampolines:\r
+\r
+ BootloaderAPI_ErasePage_Trampoline:\r
+ jmp BootloaderAPI_ErasePage\r
+ BootloaderAPI_WritePage_Trampoline:\r
+ jmp BootloaderAPI_WritePage\r
+ BootloaderAPI_FillWord_Trampoline:\r
+ jmp BootloaderAPI_FillWord\r
+ BootloaderAPI_ReadSignature_Trampoline:\r
+ jmp BootloaderAPI_ReadSignature\r
+ BootloaderAPI_ReadFuse_Trampoline:\r
+ jmp BootloaderAPI_ReadFuse\r
+ BootloaderAPI_ReadLock_Trampoline:\r
+ jmp BootloaderAPI_ReadLock\r
+ BootloaderAPI_WriteLock_Trampoline:\r
+ jmp BootloaderAPI_WriteLock\r
+ BootloaderAPU_UNUSED1:\r
+ ret\r
+ BootloaderAPU_UNUSED2:\r
+ ret\r
+ BootloaderAPU_UNUSED3:\r
+ ret\r
+ BootloaderAPU_UNUSED4:\r
+ ret\r
+ BootloaderAPU_UNUSED5:\r
+ ret\r
+\r
+\r
+\r
+; API function jump table\r
+.section .apitable_jumptable, "ax"\r
+.global BootloaderAPI_JumpTable\r
+BootloaderAPI_JumpTable:\r
+\r
+ rjmp BootloaderAPI_ErasePage_Trampoline\r
+ rjmp BootloaderAPI_WritePage_Trampoline\r
+ rjmp BootloaderAPI_FillWord_Trampoline\r
+ rjmp BootloaderAPI_ReadSignature_Trampoline\r
+ rjmp BootloaderAPI_ReadFuse_Trampoline\r
+ rjmp BootloaderAPI_ReadLock_Trampoline\r
+ rjmp BootloaderAPI_WriteLock_Trampoline\r
+ rjmp BootloaderAPU_UNUSED1 ; UNUSED ENTRY 1\r
+ rjmp BootloaderAPU_UNUSED2 ; UNUSED ENTRY 2\r
+ rjmp BootloaderAPU_UNUSED3 ; UNUSED ENTRY 3\r
+ rjmp BootloaderAPU_UNUSED4 ; UNUSED ENTRY 4\r
+ rjmp BootloaderAPU_UNUSED5 ; UNUSED ENTRY 5\r
+\r
+\r
+\r
+; Bootloader table signatures and information\r
+.section .apitable_signatures, "ax"\r
+.global BootloaderAPI_Signatures\r
+BootloaderAPI_Signatures:\r
+\r
+ .long BOOT_START_ADDR ; Start address of the bootloader\r
+ .word 0xDF30 ; Signature for the MS class bootloader, V1\r
+ .word 0xDCFB ; Signature for a LUFA class bootloader\r
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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 Mass Storage class bootloader. This file contains the complete bootloader logic.
+ */
+
+#include "BootloaderMassStorage.h"
+
+/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
+ * passed to all Mass Storage Class driver functions, so that multiple instances of the same class
+ * within a device can be differentiated from one another.
+ */
+USB_ClassInfo_MS_Device_t Disk_MS_Interface =
+ {
+ .Config =
+ {
+ .InterfaceNumber = 0,
+ .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,
+ },
+ };
+
+
+/** Main program entry point. This routine configures the hardware required by the application, then
+ * enters a loop to run the application tasks in sequence.
+ */
+int main(void)
+{
+ SetupHardware();
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+ GlobalInterruptEnable();
+
+ for (;;)
+ {
+ MS_Device_USBTask(&Disk_MS_Interface);
+ USB_USBTask();
+ }
+}
+
+/** Configures the board hardware and chip peripherals for the demo'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);
+
+ /* Relocate the interrupt vector table to the bootloader section */
+ MCUCR = (1 << IVCE);
+ MCUCR = (1 << IVSEL);
+
+ /* Hardware Initialization */
+ LEDs_Init();
+ USB_Init();
+
+ /* Bootloader active LED toggle timer initialization */
+ TIMSK1 = (1 << TOIE1);
+ TCCR1B = ((1 << CS11) | (1 << CS10));
+}
+
+/** ISR to periodically toggle the LEDs on the board to indicate that the bootloader is active. */
+ISR(TIMER1_OVF_vect, ISR_BLOCK)
+{
+ LEDs_ToggleLEDs(LEDS_LED1 | LEDS_LED2);
+}
+
+/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs. */
+void EVENT_USB_Device_Connect(void)
+{
+ /* Indicate USB enumerating */
+ LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
+}
+
+/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
+ * the status LEDs and stops the Mass Storage management task.
+ */
+void EVENT_USB_Device_Disconnect(void)
+{
+ /* Indicate USB not ready */
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+}
+
+/** Event handler for the library USB Configuration Changed event. */
+void EVENT_USB_Device_ConfigurationChanged(void)
+{
+ bool ConfigSuccess = true;
+
+ /* Setup Mass Storage Data Endpoints */
+ ConfigSuccess &= MS_Device_ConfigureEndpoints(&Disk_MS_Interface);
+
+ /* Indicate endpoint configuration success or failure */
+ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
+}
+
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
+{
+ MS_Device_ProcessControlRequest(&Disk_MS_Interface);
+}
+
+/** Mass Storage class driver callback function the reception of SCSI commands from the host, which must be processed.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface configuration structure being referenced
+ */
+bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
+{
+ bool CommandSuccess;
+
+ LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
+ CommandSuccess = SCSI_DecodeSCSICommand(MSInterfaceInfo);
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);
+
+ return CommandSuccess;
+}
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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 BootloaderMassStorage.c.
+ */
+
+#ifndef _BOOTLOADER_MASS_STORAGE_H_
+#define _BOOTLOADER_MASS_STORAGE_H_
+
+ /* Includes: */
+ #include <avr/io.h>
+ #include <avr/wdt.h>
+ #include <avr/power.h>
+ #include <avr/interrupt.h>
+ #include <string.h>
+
+ #include "Descriptors.h"
+
+ #include "Lib/SCSI.h"
+
+ #include <LUFA/Drivers/Board/LEDs.h>
+ #include <LUFA/Drivers/USB/USB.h>
+
+ /* Macros: */
+ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
+ #define LEDMASK_USB_NOTREADY LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */
+ #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
+ #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
+
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
+ #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
+
+ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
+ #define LEDMASK_USB_BUSY LEDS_LED2
+
+ /* Function Prototypes: */
+ void SetupHardware(void);
+
+ void EVENT_USB_Device_Connect(void);
+ void EVENT_USB_Device_Disconnect(void);
+ void EVENT_USB_Device_ConfigurationChanged(void);
+ void EVENT_USB_Device_ControlRequest(void);
+
+ bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+
+#endif
+
--- /dev/null
+/** \file
+ *
+ * This file contains special DoxyGen information for the generation of the main page and other special
+ * documentation pages. It is not a project source file.
+ */
+
+/** \mainpage Mass Storage Class USB AVR Bootloader
+ *
+ * \section Sec_Compat Demo Compatibility:
+ *
+ * The following list indicates what microcontrollers are compatible with this demo.
+ *
+ * \li Series 7 USB AVRs (AT90USBxxx7)
+ * \li Series 6 USB AVRs (AT90USBxxx6)
+ *
+ * \section Sec_Info USB Information:
+ *
+ * The following table gives a rundown of the USB utilization of this demo.
+ *
+ * <table>
+ * <tr>
+ * <td><b>USB Mode:</b></td>
+ * <td>Device</td>
+ * </tr>
+ * <tr>
+ * <td><b>USB Class:</b></td>
+ * <td>Mass Storage Device</td>
+ * </tr>
+ * <tr>
+ * <td><b>USB Subclass:</b></td>
+ * <td>Bulk-Only Transport</td>
+ * </tr>
+ * <tr>
+ * <td><b>Relevant Standards:</b></td>
+ * <td>USBIF Mass Storage Standard \n
+ * USB Bulk-Only Transport Standard \n
+ * SCSI Primary Commands Specification \n
+ * SCSI Block Commands Specification</td>
+ * </tr>
+ * <tr>
+ * <td><b>Supported USB Speeds:</b></td>
+ * <td>Full Speed Mode</td>
+ * </tr>
+ * </table>
+ *
+ * \section Sec_Description Project Description:
+ *
+ * This bootloader enumerates to the host as a Mass Storage device, capable of reading and writing a new binary
+ * firmware image file, to load firmware onto the AVR.
+ *
+ * Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit
+ * into 8KB 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.
+ *
+ * \section Sec_Installation Driver Installation
+ *
+ * This bootloader uses the Mass Storage printer drivers inbuilt into all modern operating systems, thus no additional
+ * drivers need to be supplied for correct operation.
+ *
+ * \section Sec_HostApp Host Controller Application
+ *
+ * This bootloader is compatible with all operating systems that support the FAT12 file system format. To reprogram the
+ * device, overwrite a file stored on the virtual FAT filesystem with a new binary (BIN format) image. Remember to safely
+ * remove your device from the host using the host OS's ejection APIs, to ensure all data is correctly flushed to the
+ * bootloader's virtual filesystem and not cached in the OS's file system driver.
+ *
+ * The current device firmware can be read from the device by reading a file from the virtual FAT filesystem.
+ *
+ * \section Sec_API User Application API
+ *
+ * Several user application functions for FLASH and other special memory area manipulations are exposed by the bootloader,
+ * allowing the user application to call into the bootloader at runtime to read and write FLASH data.
+ *
+ * By default, the bootloader API jump table is located 32 bytes from the end of the device's FLASH memory, and follows the
+ * following layout:
+ *
+ * \code
+ * #define BOOTLOADER_API_TABLE_SIZE 32
+ * #define BOOTLOADER_API_TABLE_START ((FLASHEND + 1UL) - BOOTLOADER_API_TABLE_SIZE)
+ * #define BOOTLOADER_API_CALL(Index) (void*)((BOOTLOADER_API_TABLE_START + (Index * 2)) / 2)
+ *
+ * void (*BootloaderAPI_ErasePage)(uint32_t Address) = BOOTLOADER_API_CALL(0);
+ * void (*BootloaderAPI_WritePage)(uint32_t Address) = BOOTLOADER_API_CALL(1);
+ * void (*BootloaderAPI_FillWord)(uint32_t Address, uint16_t Word) = BOOTLOADER_API_CALL(2);
+ * uint8_t (*BootloaderAPI_ReadSignature)(uint16_t Address) = BOOTLOADER_API_CALL(3);
+ * uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address) = BOOTLOADER_API_CALL(4);
+ * uint8_t (*BootloaderAPI_ReadLock)(void) = BOOTLOADER_API_CALL(5);
+ * void (*BootloaderAPI_WriteLock)(uint8_t LockBits) = BOOTLOADER_API_CALL(6);
+ *
+ * #define BOOTLOADER_MAGIC_SIGNATURE_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 2))
+ * #define BOOTLOADER_MAGIC_SIGNATURE 0xDCFB
+ *
+ * #define BOOTLOADER_CLASS_SIGNATURE_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 4))
+ * #define BOOTLOADER_MASS_STORAGE_SIGNATURE 0xDF30
+ *
+ * #define BOOTLOADER_ADDRESS_START (BOOTLOADER_API_TABLE_START + (BOOTLOADER_API_TABLE_SIZE - 8))
+ * #define BOOTLOADER_ADDRESS_LENGTH 4
+ * \endcode
+ *
+ * \subsection SSec_API_MemLayout Device Memory Map
+ * The following illustration indicates the final memory map of the device when loaded with the bootloader.
+ *
+ * \verbatim
+ * +----------------------------+ 0x0000
+ * | |
+ * | |
+ * | |
+ * | |
+ * | |
+ * | |
+ * | |
+ * | |
+ * | User Application |
+ * | |
+ * | |
+ * | |
+ * | |
+ * | |
+ * | |
+ * | |
+ * +----------------------------+ FLASHEND - BOOT_SECTION_SIZE
+ * | |
+ * | Bootloader Application |
+ * | (Not User App. Accessible) |
+ * | |
+ * +----------------------------+ FLASHEND - 96
+ * | API Table Trampolines |
+ * | (Not User App. Accessible) |
+ * +----------------------------+ FLASHEND - 32
+ * | Bootloader API Table |
+ * | (User App. Accessible) |
+ * +----------------------------+ FLASHEND - 8
+ * | Bootloader ID Constants |
+ * | (User App. Accessible) |
+ * +----------------------------+ FLASHEND
+ * \endverbatim
+ *
+ * Bootloaders reporting a device release revision number of 1.00 or greater are bootloader API enabled. From the application
+ * the API support of the bootloader can be detected by reading the FLASH memory bytes located at address \c BOOTLOADER_MAGIC_SIGNATURE_START
+ * and comparing them to the value \c BOOTLOADER_MAGIC_SIGNATURE. The class of bootloader can be determined by reading the
+ * FLASH memory bytes located at address \c BOOTLOADER_CLASS_SIGNATURE_START and comparing them to the value \c BOOTLOADER_MASS_STORAGE_SIGNATURE.
+ * The start address of the bootloader can be retrieved by reading the bytes of FLASH memory starting from address \c BOOTLOADER_ADDRESS_START.
+ *
+ * \section Sec_Options Project Options
+ *
+ * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.
+ *
+ * <table>
+ * <tr>
+ * <td>
+ * None
+ * </td>
+ * </tr>
+ * </table>
+ */
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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 header file is 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
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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"
+
+
+/** 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 DeviceDescriptor =
+{
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
+
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = USB_CSCP_NoDeviceClass,
+ .SubClass = USB_CSCP_NoDeviceSubclass,
+ .Protocol = USB_CSCP_NoDeviceProtocol,
+
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
+
+ .VendorID = 0x03EB,
+ .ProductID = 0x2045,
+ .ReleaseNumber = VERSION_BCD(00.01),
+
+ .ManufacturerStrIndex = NO_DESCRIPTOR,
+ .ProductStrIndex = NO_DESCRIPTOR,
+ .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 ConfigurationDescriptor =
+{
+ .Config =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
+
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
+
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
+
+ .ConfigAttributes = USB_CONFIG_ATTR_RESERVED,
+
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
+ },
+
+ .MS_Interface =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
+
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
+
+ .TotalEndpoints = 2,
+
+ .Class = MS_CSCP_MassStorageClass,
+ .SubClass = MS_CSCP_SCSITransparentSubclass,
+ .Protocol = MS_CSCP_BulkOnlyTransportProtocol,
+
+ .InterfaceStrIndex = NO_DESCRIPTOR
+ },
+
+ .MS_DataInEndpoint =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
+
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = MASS_STORAGE_IO_EPSIZE,
+ .PollingIntervalMS = 0x05
+ },
+
+ .MS_DataOutEndpoint =
+ {
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
+
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = MASS_STORAGE_IO_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 LanguageString =
+{
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
+
+ .UnicodeString = {LANGUAGE_ID_ENG}
+};
+
+/** 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:
+ if (!(DescriptorNumber))
+ {
+ Address = &LanguageString;
+ Size = pgm_read_byte(&LanguageString.Header.Size);
+ }
+
+ break;
+ }
+
+ *DescriptorAddress = Address;
+ return Size;
+}
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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 Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
+
+ /** 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
+
+ /* 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;
+
+ // Mass Storage Interface
+ USB_Descriptor_Interface_t MS_Interface;
+ USB_Descriptor_Endpoint_t MS_DataInEndpoint;
+ USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
+ } 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.3.1\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 = "LUFA Library - Mass Storage Class Bootloader"\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 =\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. Note that you specify absolute paths here, but also\r
+# relative paths, which will be relative from the directory where doxygen is\r
+# started.\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\r
+# extension. Doxygen has a built-in mapping, but you can override or extend it\r
+# using this tag. The format is ext=language, where ext is a file extension,\r
+# and language is one of the parsers supported by doxygen: IDL, Java,\r
+# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,\r
+# C++. For instance to make doxygen treat .inc files as Fortran files (default\r
+# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note\r
+# that for custom extensions you also need to set FILE_PATTERNS otherwise the\r
+# 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
+# When enabled doxygen tries to link words that correspond to documented classes,\r
+# or namespaces to their corresponding documentation. Such a link can be\r
+# prevented in individual cases by by putting a % sign in front of the word or\r
+# globally by setting AUTOLINK_SUPPORT to NO.\r
+\r
+AUTOLINK_SUPPORT = YES\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\r
+# getter and setter methods for a property. Setting this option to YES (the\r
+# default) will make doxygen replace the get and set methods by a property in\r
+# the 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\r
+# 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 section-label ... \endif\r
+# and \cond section-label ... \endcond blocks.\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
+# 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. To 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. Do not use\r
+# file names with spaces, bibtex cannot handle them.\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
+# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that\r
+# is part of the input, its contents will be placed on the main page (index.html).\r
+# This can be useful if you have a project on for instance GitHub and want reuse\r
+# the introduction page also for the doxygen output.\r
+\r
+USE_MDFILE_AS_MAINPAGE =\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, C++ and Fortran 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 left blank doxygen will\r
+# generate a default style sheet. Note that it is recommended to use\r
+# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this\r
+# tag will in the future become obsolete.\r
+\r
+HTML_STYLESHEET =\r
+\r
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional\r
+# user-defined cascading style sheet that is included after the standard\r
+# style sheets created by doxygen. Using this option one can overrule\r
+# certain style aspects. This is preferred over using HTML_STYLESHEET\r
+# since it does not replace the standard style sheet and is therefor more\r
+# robust against future updates. Doxygen will copy the style sheet file to\r
+# the output directory.\r
+\r
+HTML_EXTRA_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_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.\r
+\r
+HTML_DYNAMIC_SECTIONS = YES\r
+\r
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of\r
+# entries shown in the various tree structured indices initially; the user\r
+# can expand and collapse entries dynamically later on. Doxygen will expand\r
+# the tree to such a level that at most the specified number of entries are\r
+# visible (unless a fully collapsed tree already exceeds this amount).\r
+# So setting the number of entries 1 will produce a full collapsed tree by\r
+# default. 0 is a special value representing an infinite number of entries\r
+# and will result in a full expanded tree by default.\r
+\r
+HTML_INDEX_NUM_ENTRIES = 100\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\r
+# identify the documentation publisher. This should be a reverse domain-name\r
+# style 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 = YES\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
+# 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 can set the default output format to be used for\r
+# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and\r
+# SVG. The default value is HTML-CSS, which is slower, but has the best\r
+# compatibility.\r
+\r
+MATHJAX_FORMAT = HTML-CSS\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 web server instead of a web client using Javascript.\r
+# There are two flavours of web server based search depending on the\r
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for\r
+# searching and an index file used by the script. When EXTERNAL_SEARCH is\r
+# enabled the indexing and searching needs to be provided by external tools.\r
+# See the manual for details.\r
+\r
+SERVER_BASED_SEARCH = NO\r
+\r
+# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP\r
+# script for searching. Instead the search results are written to an XML file\r
+# which needs to be processed by an external indexer. Doxygen will invoke an\r
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain\r
+# the search results. Doxygen ships with an example indexer (doxyindexer) and\r
+# search engine (doxysearch.cgi) which are based on the open source search engine\r
+# library Xapian. See the manual for configuration details.\r
+\r
+EXTERNAL_SEARCH = NO\r
+\r
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server\r
+# which will returned the search results when EXTERNAL_SEARCH is enabled.\r
+# Doxygen ships with an example search engine (doxysearch) which is based on\r
+# the open source search engine library Xapian. See the manual for configuration\r
+# details.\r
+\r
+SEARCHENGINE_URL =\r
+\r
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\r
+# search data is written to a file for indexing by an external tool. With the\r
+# SEARCHDATA_FILE tag the name of this file can be specified.\r
+\r
+SEARCHDATA_FILE = searchdata.xml\r
+\r
+# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the\r
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\r
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\r
+# projects and redirect the results back to the right project.\r
+\r
+EXTERNAL_SEARCH_ID =\r
+\r
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\r
+# projects other than the one defined by this configuration file, but that are\r
+# all added to the same external search index. Each project needs to have a\r
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id\r
+# of to a relative location where the documentation can be found.\r
+# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...\r
+\r
+EXTRA_SEARCH_MAPPINGS =\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
+ ATTR_NO_INIT\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 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, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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
+ *
+ * SCSI command processing routines, for SCSI commands issued by the host. Mass Storage
+ * devices use a thin "Bulk-Only Transport" protocol for issuing commands and status information,
+ * which wrap around standard SCSI device commands for controlling the actual storage medium.
+ */
+
+#define INCLUDE_FROM_SCSI_C
+#include "SCSI.h"
+
+/** Structure to hold the SCSI response data to a SCSI INQUIRY command. This gives information about the device's
+ * features and capabilities.
+ */
+static const SCSI_Inquiry_Response_t InquiryData =
+ {
+ .DeviceType = DEVICE_TYPE_BLOCK,
+ .PeripheralQualifier = 0,
+
+ .Removable = true,
+
+ .Version = 0,
+
+ .ResponseDataFormat = 2,
+ .NormACA = false,
+ .TrmTsk = false,
+ .AERC = false,
+
+ .AdditionalLength = 0x1F,
+
+ .SoftReset = false,
+ .CmdQue = false,
+ .Linked = false,
+ .Sync = false,
+ .WideBus16Bit = false,
+ .WideBus32Bit = false,
+ .RelAddr = false,
+
+ .VendorID = "LUFA",
+ .ProductID = "Bootloader",
+ .RevisionID = {'0','.','0','0'},
+ };
+
+/** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE
+ * command is issued. This gives information on exactly why the last command failed to complete.
+ */
+static SCSI_Request_Sense_Response_t SenseData =
+ {
+ .ResponseCode = 0x70,
+ .AdditionalLength = 0x0A,
+ };
+
+
+/** Main routine to process the SCSI command located in the Command Block Wrapper read from the host. This dispatches
+ * to the appropriate SCSI command handling routine if the issued command is supported by the device, else it returns
+ * a command failure due to a ILLEGAL REQUEST.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
+ *
+ * \return Boolean true if the command completed successfully, false otherwise
+ */
+bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
+{
+ bool CommandSuccess = false;
+
+ /* Run the appropriate SCSI command hander function based on the passed command */
+ switch (MSInterfaceInfo->State.CommandBlock.SCSICommandData[0])
+ {
+ case SCSI_CMD_INQUIRY:
+ CommandSuccess = SCSI_Command_Inquiry(MSInterfaceInfo);
+ break;
+ case SCSI_CMD_REQUEST_SENSE:
+ CommandSuccess = SCSI_Command_Request_Sense(MSInterfaceInfo);
+ break;
+ case SCSI_CMD_READ_CAPACITY_10:
+ CommandSuccess = SCSI_Command_Read_Capacity_10(MSInterfaceInfo);
+ break;
+ case SCSI_CMD_SEND_DIAGNOSTIC:
+ CommandSuccess = SCSI_Command_Send_Diagnostic(MSInterfaceInfo);
+ break;
+ case SCSI_CMD_WRITE_10:
+ CommandSuccess = SCSI_Command_ReadWrite_10(MSInterfaceInfo, DATA_WRITE);
+ break;
+ case SCSI_CMD_READ_10:
+ CommandSuccess = SCSI_Command_ReadWrite_10(MSInterfaceInfo, DATA_READ);
+ break;
+ case SCSI_CMD_MODE_SENSE_6:
+ CommandSuccess = SCSI_Command_ModeSense_6(MSInterfaceInfo);
+ break;
+ case SCSI_CMD_START_STOP_UNIT:
+ case SCSI_CMD_TEST_UNIT_READY:
+ case SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL:
+ case SCSI_CMD_VERIFY_10:
+ /* These commands should just succeed, no handling required */
+ CommandSuccess = true;
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength = 0;
+ break;
+ default:
+ /* Update the SENSE key to reflect the invalid command */
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
+ SCSI_ASENSE_INVALID_COMMAND,
+ SCSI_ASENSEQ_NO_QUALIFIER);
+ break;
+ }
+
+ /* Check if command was successfully processed */
+ if (CommandSuccess)
+ {
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_GOOD,
+ SCSI_ASENSE_NO_ADDITIONAL_INFORMATION,
+ SCSI_ASENSEQ_NO_QUALIFIER);
+
+ return true;
+ }
+
+ return false;
+}
+
+/** Command processing for an issued SCSI INQUIRY command. This command returns information about the device's features
+ * and capabilities to the host.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
+ *
+ * \return Boolean true if the command completed successfully, false otherwise.
+ */
+static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
+{
+ uint16_t AllocationLength = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]);
+ uint16_t BytesTransferred = MIN(AllocationLength, sizeof(InquiryData));
+
+ /* Only the standard INQUIRY data is supported, check if any optional INQUIRY bits set */
+ if ((MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & ((1 << 0) | (1 << 1))) ||
+ MSInterfaceInfo->State.CommandBlock.SCSICommandData[2])
+ {
+ /* Optional but unsupported bits set - update the SENSE key and fail the request */
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
+ SCSI_ASENSE_INVALID_FIELD_IN_CDB,
+ SCSI_ASENSEQ_NO_QUALIFIER);
+
+ return false;
+ }
+
+ Endpoint_Write_Stream_LE(&InquiryData, BytesTransferred, NULL);
+
+ /* Pad out remaining bytes with 0x00 */
+ Endpoint_Null_Stream((AllocationLength - BytesTransferred), NULL);
+
+ /* Finalize the stream transfer to send the last packet */
+ Endpoint_ClearIN();
+
+ /* Succeed the command and update the bytes transferred counter */
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= BytesTransferred;
+
+ return true;
+}
+
+/** Command processing for an issued SCSI REQUEST SENSE command. This command returns information about the last issued command,
+ * including the error code and additional error information so that the host can determine why a command failed to complete.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
+ *
+ * \return Boolean true if the command completed successfully, false otherwise.
+ */
+static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
+{
+ uint8_t AllocationLength = MSInterfaceInfo->State.CommandBlock.SCSICommandData[4];
+ uint8_t BytesTransferred = MIN(AllocationLength, sizeof(SenseData));
+
+ Endpoint_Write_Stream_LE(&SenseData, BytesTransferred, NULL);
+ Endpoint_Null_Stream((AllocationLength - BytesTransferred), NULL);
+ Endpoint_ClearIN();
+
+ /* Succeed the command and update the bytes transferred counter */
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= BytesTransferred;
+
+ return true;
+}
+
+/** Command processing for an issued SCSI READ CAPACITY (10) command. This command returns information about the device's capacity
+ * on the selected Logical Unit (drive), as a number of OS-sized blocks.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
+ *
+ * \return Boolean true if the command completed successfully, false otherwise.
+ */
+static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
+{
+ uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);
+ uint32_t MediaBlockSize = SECTOR_SIZE_BYTES;
+
+ Endpoint_Write_Stream_BE(&LastBlockAddressInLUN, sizeof(LastBlockAddressInLUN), NULL);
+ Endpoint_Write_Stream_BE(&MediaBlockSize, sizeof(MediaBlockSize), NULL);
+ Endpoint_ClearIN();
+
+ /* Succeed the command and update the bytes transferred counter */
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= 8;
+
+ return true;
+}
+
+/** Command processing for an issued SCSI SEND DIAGNOSTIC command. This command performs a quick check of the Dataflash ICs on the
+ * board, and indicates if they are present and functioning correctly. Only the Self-Test portion of the diagnostic command is
+ * supported.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
+ *
+ * \return Boolean true if the command completed successfully, false otherwise.
+ */
+static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
+{
+ /* Check to see if the SELF TEST bit is not set */
+ if (!(MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & (1 << 2)))
+ {
+ /* Only self-test supported - update SENSE key and fail the command */
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
+ SCSI_ASENSE_INVALID_FIELD_IN_CDB,
+ SCSI_ASENSEQ_NO_QUALIFIER);
+
+ return false;
+ }
+
+ /* Succeed the command and update the bytes transferred counter */
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength = 0;
+
+ return true;
+}
+
+/** Command processing for an issued SCSI READ (10) or WRITE (10) command. This command reads in the block start address
+ * and total number of blocks to process, then calls the appropriate low-level Dataflash routine to handle the actual
+ * reading and writing of the data.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
+ * \param[in] IsDataRead Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
+ *
+ * \return Boolean true if the command completed successfully, false otherwise.
+ */
+static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+ const bool IsDataRead)
+{
+ uint32_t BlockAddress;
+ uint16_t TotalBlocks;
+
+ /* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
+ BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
+
+ /* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */
+ TotalBlocks = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
+
+ /* Check if the block address is outside the maximum allowable value for the LUN */
+ if (BlockAddress >= LUN_MEDIA_BLOCKS)
+ {
+ /* Block address is invalid, update SENSE key and return command fail */
+ SCSI_SET_SENSE(SCSI_SENSE_KEY_ILLEGAL_REQUEST,
+ SCSI_ASENSE_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE,
+ SCSI_ASENSEQ_NO_QUALIFIER);
+
+ return false;
+ }
+
+ /* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
+ if (IsDataRead == DATA_READ)
+ VirtualFAT_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
+ else
+ VirtualFAT_WriteBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
+
+ /* Update the bytes transferred counter and succeed the command */
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= ((uint32_t)TotalBlocks * SECTOR_SIZE_BYTES);
+
+ return true;
+}
+
+/** Command processing for an issued SCSI MODE SENSE (6) command. This command returns various informational pages about
+ * the SCSI device, as well as the device's Write Protect status.
+ *
+ * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
+ *
+ * \return Boolean true if the command completed successfully, false otherwise.
+ */
+static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
+{
+ /* Send an empty header response indicating Write Protect flag is off */
+ Endpoint_Write_32_LE(0);
+ Endpoint_ClearIN();
+
+ /* Update the bytes transferred counter and succeed the command */
+ MSInterfaceInfo->State.CommandBlock.DataTransferLength -= 4;
+
+ return true;
+}
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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 SCSI.c.
+ */
+
+#ifndef _SCSI_H_
+#define _SCSI_H_
+
+ /* Includes: */
+ #include <avr/io.h>
+ #include <avr/pgmspace.h>
+
+ #include <LUFA/Drivers/USB/USB.h>
+
+ #include "../BootloaderMassStorage.h"
+ #include "../Descriptors.h"
+ #include "VirtualFAT.h"
+
+ /* Macros: */
+ /** Macro to set the current SCSI sense data to the given key, additional sense code and additional sense qualifier. This
+ * is for convenience, as it allows for all three sense values (returned upon request to the host to give information about
+ * the last command failure) in a quick and easy manner.
+ *
+ * \param[in] Key New SCSI sense key to set the sense code to
+ * \param[in] Acode New SCSI additional sense key to set the additional sense code to
+ * \param[in] Aqual New SCSI additional sense key qualifier to set the additional sense qualifier code to
+ */
+ #define SCSI_SET_SENSE(Key, Acode, Aqual) MACROS{ SenseData.SenseKey = (Key); \
+ SenseData.AdditionalSenseCode = (Acode); \
+ SenseData.AdditionalSenseQualifier = (Aqual); }MACROE
+
+ /** Macro for the \ref SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium. */
+ #define DATA_READ true
+
+ /** Macro for the \ref SCSI_Command_ReadWrite_10() function, to indicate that data is to be written to the storage medium. */
+ #define DATA_WRITE false
+
+ /** Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a Block Media device. */
+ #define DEVICE_TYPE_BLOCK 0x00
+
+ /* Function Prototypes: */
+ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+
+ #if defined(INCLUDE_FROM_SCSI_C)
+ static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+ const bool IsDataRead);
+ static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+ #endif
+
+#endif
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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
+ *
+ * Virtualized FAT12 filesystem implementation, to perform self-programming
+ * in response to read and write requests to the virtual filesystem by the
+ * host PC.
+ */
+
+#define INCLUDE_FROM_VIRTUAL_FAT_C
+#include "VirtualFAT.h"
+
+/** FAT filesystem boot sector block, must be the first sector on the physical
+ * disk so that the host can identify the presence of a FAT filesystem. This
+ * block is truncated; normally a large bootstrap section is located near the
+ * end of the block for booting purposes however as this is not meant to be a
+ * bootable disk it is omitted for space reasons.
+ *
+ * \note When returning the boot block to the host, the magic signature 0xAA55
+ * must be added to the very end of the block to identify it as a boot
+ * block.
+ */
+static const FATBootBlock_t BootBlock =
+ {
+ .Bootstrap = {0xEB, 0x3C, 0x90},
+ .Description = "mkdosfs",
+ .SectorSize = SECTOR_SIZE_BYTES,
+ .SectorsPerCluster = SECTOR_PER_CLUSTER,
+ .ReservedSectors = 1,
+ .FATCopies = 2,
+ .RootDirectoryEntries = (SECTOR_SIZE_BYTES / sizeof(FATDirectoryEntry_t)),
+ .TotalSectors16 = LUN_MEDIA_BLOCKS,
+ .MediaDescriptor = 0xF8,
+ .SectorsPerFAT = 1,
+ .SectorsPerTrack = (LUN_MEDIA_BLOCKS % 64),
+ .Heads = (LUN_MEDIA_BLOCKS / 64),
+ .HiddenSectors = 0,
+ .TotalSectors32 = 0,
+ .PhysicalDriveNum = 0,
+ .ExtendedBootRecordSig = 0x29,
+ .VolumeSerialNumber = 0x12345678,
+ .VolumeLabel = "LUFA BOOT ",
+ .FilesystemIdentifier = "FAT12 ",
+ };
+
+/** FAT 8.3 style directory entry, for the virtual FLASH contents file. */
+static FATDirectoryEntry_t FirmwareFileEntry =
+ {
+ .Filename = "FIRMWARE",
+ .Extension = "BIN",
+ .Attributes = 0,
+ .Reserved = {0},
+ .CreationTime = FAT_TIME(1, 1, 0),
+ .CreationDate = FAT_DATE(14, 2, 1989),
+ .StartingCluster = 2,
+ .FileSizeBytes = FIRMWARE_FILE_SIZE_BYTES,
+ };
+
+
+/** Updates a FAT12 cluster entry in the FAT file table with the specified next
+ * chain index. If the cluster is the last in the file chain, the magic value
+ * 0xFFF is used.
+ *
+ * \note FAT data cluster indexes are offset by 2, so that cluster 2 is the
+ * first file data cluster on the disk. See the FAT specification.
+ *
+ * \param[out] FATTable Pointer to the FAT12 allocation table
+ * \param[in] Index Index of the cluster entry to update
+ * \param[in] ChainEntry Next cluster index in the file chain
+ */
+static void UpdateFAT12ClusterEntry(uint8_t* const FATTable,
+ const uint16_t Index,
+ const uint16_t ChainEntry)
+{
+ /* Calculate the starting offset of the cluster entry in the FAT12 table */
+ uint8_t FATOffset = (Index * 3) / 2;
+ bool UpperNibble = (((Index * 3) % 2) != 0);
+
+ /* Check if the start of the entry is at an upper nibble of the byte, fill
+ * out FAT12 entry as required */
+ if (UpperNibble)
+ {
+ FATTable[FATOffset] = (FATTable[FATOffset] & 0x0F) | ((ChainEntry & 0x0F) << 4);
+ FATTable[FATOffset + 1] = (ChainEntry >> 4);
+ }
+ else
+ {
+ FATTable[FATOffset] = ChainEntry;
+ FATTable[FATOffset + 1] = (FATTable[FATOffset] & 0xF0) | (ChainEntry >> 8);
+ }
+}
+
+/** Writes a block of data to the virtual FAT filesystem, from the USB Mass
+ * Storage interface.
+ *
+ * \param[in] BlockNumber Index of the block to write.
+ */
+static void WriteVirtualBlock(const uint16_t BlockNumber)
+{
+ uint8_t BlockBuffer[SECTOR_SIZE_BYTES];
+
+ /* Buffer the entire block to be written from the host */
+ Endpoint_Read_Stream_LE(BlockBuffer, sizeof(BlockBuffer), NULL);
+ Endpoint_ClearOUT();
+
+ if ((BlockNumber >= 4) && (BlockNumber < (4 + FILE_SECTORS(FIRMWARE_FILE_SIZE_BYTES))))
+ {
+ uint32_t WriteFlashAddress = (uint32_t)(BlockNumber - 4) * SECTOR_SIZE_BYTES;
+
+ for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i += 2)
+ {
+ if ((WriteFlashAddress % SPM_PAGESIZE) == 0)
+ {
+ /* Erase the given FLASH page, ready to be programmed */
+ boot_page_erase(WriteFlashAddress);
+ boot_spm_busy_wait();
+ }
+
+ /* Write the next data word to the FLASH page */
+ boot_page_fill(WriteFlashAddress, (BlockBuffer[i + 1] << 8) | BlockBuffer[i]);
+ WriteFlashAddress += 2;
+
+ if ((WriteFlashAddress % SPM_PAGESIZE) == 0)
+ {
+ /* Write the filled FLASH page to memory */
+ boot_page_write(WriteFlashAddress - SPM_PAGESIZE);
+ boot_spm_busy_wait();
+ }
+ }
+ }
+}
+
+/** Reads a block of data from the virtual FAT filesystem, and sends it to the
+ * host via the USB Mass Storage interface.
+ *
+ * \param[in] BlockNumber Index of the block to read.
+ */
+static void ReadVirtualBlock(const uint16_t BlockNumber)
+{
+ uint8_t BlockBuffer[SECTOR_SIZE_BYTES];
+ memset(BlockBuffer, 0x00, sizeof(BlockBuffer));
+
+ switch (BlockNumber)
+ {
+ case 0: /* Block 0: Boot block sector */
+ memcpy(BlockBuffer, &BootBlock, sizeof(FATBootBlock_t));
+
+ /* Add the magic signature to the end of the block */
+ BlockBuffer[SECTOR_SIZE_BYTES - 2] = 0x55;
+ BlockBuffer[SECTOR_SIZE_BYTES - 1] = 0xAA;
+ break;
+
+ case 1: /* Block 1: First FAT12 cluster chain copy */
+ case 2: /* Block 2: Second FAT12 cluster chain copy */
+ /* Cluster 0: Media type/Reserved */
+ UpdateFAT12ClusterEntry(BlockBuffer, 0, 0xF00 | BootBlock.MediaDescriptor);
+
+ /* Cluster 1: Reserved */
+ UpdateFAT12ClusterEntry(BlockBuffer, 1, 0xFFF);
+
+ /* Cluster 2 onwards: Cluster chain of FIRMWARE.BIN */
+ for (uint16_t i = 0; i < FILE_CLUSTERS(FIRMWARE_FILE_SIZE_BYTES); i++)
+ UpdateFAT12ClusterEntry(BlockBuffer, i+2, i+3);
+
+ /* Mark last cluster as end of file */
+ UpdateFAT12ClusterEntry(BlockBuffer, FILE_CLUSTERS(FIRMWARE_FILE_SIZE_BYTES) + 1, 0xFFF);
+ break;
+
+ case 3: /* Block 3: Root file entries */
+ memcpy(BlockBuffer, &FirmwareFileEntry, sizeof(FATDirectoryEntry_t));
+ break;
+
+ default: /* Blocks 4 onwards: Data allocation section */
+ if ((BlockNumber >= 4) && (BlockNumber < (4 + FILE_SECTORS(FIRMWARE_FILE_SIZE_BYTES))))
+ {
+ uint32_t ReadFlashAddress = (uint32_t)(BlockNumber - 4) * SECTOR_SIZE_BYTES;
+
+ for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i++)
+ BlockBuffer[i] = pgm_read_byte_far(ReadFlashAddress++);
+ }
+
+ break;
+ }
+
+ /* Write the entire read block Buffer to the host */
+ Endpoint_Write_Stream_LE(BlockBuffer, sizeof(BlockBuffer), NULL);
+ Endpoint_ClearIN();
+}
+
+/** Writes a number of blocks to the virtual FAT file system, from the host
+ * PC via the USB Mass Storage interface.
+ *
+ * \param[in] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state
+ * \param[in] BlockAddress Data block starting address for the write sequence
+ * \param[in] TotalBlocks Number of blocks of data to write
+ */
+void VirtualFAT_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+ const uint32_t BlockAddress,
+ uint16_t TotalBlocks)
+{
+ uint16_t CurrentBlock = (uint16_t)BlockAddress;
+
+ /* Emulated FAT is performed per-block, pass each requested block index
+ * to the emulated FAT block write function */
+ while (TotalBlocks--)
+ WriteVirtualBlock(CurrentBlock++);
+}
+
+/** Reads a number of blocks from the virtual FAT file system, and sends them
+ * to the host PC via the USB Mass Storage interface.
+ *
+ * \param[in] MSInterfaceInfo Pointer to a structure containing a Mass Storage Class configuration and state
+ * \param[in] BlockAddress Data block starting address for the read sequence
+ * \param[in] TotalBlocks Number of blocks of data to read
+ */
+void VirtualFAT_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+ const uint32_t BlockAddress,
+ uint16_t TotalBlocks)
+{
+ uint16_t CurrentBlock = (uint16_t)BlockAddress;
+
+ /* Emulated FAT is performed per-block, pass each requested block index
+ * to the emulated FAT block read function */
+ while (TotalBlocks--)
+ ReadVirtualBlock(CurrentBlock++);
+}
+
--- /dev/null
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2013.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2013 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 disclaims 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.
+*/
+
+#ifndef _VIRTUALFAT_H_
+#define _VIRTUALFAT_H_
+
+ /* Includes: */
+ #include <avr/io.h>
+ #include <avr/pgmspace.h>
+
+ #include <LUFA/Drivers/USB/USB.h>
+
+ /* Macros: */
+ /** Size of the virtual FIRMWARE.BIN file in bytes. */
+ #define FIRMWARE_FILE_SIZE_BYTES (FLASHEND - (FLASHEND - BOOT_START_ADDR) + 1UL)
+
+ /** Number of sectors that comprise a single logical disk cluster. */
+ #define SECTOR_PER_CLUSTER 4
+
+ /** Size of a single logical sector on the disk. */
+ #define SECTOR_SIZE_BYTES 512
+
+ /** Size of a logical cluster on the disk, in bytes */
+ #define CLUSTER_SIZE_BYTES (SECTOR_PER_CLUSTER * SECTOR_SIZE_BYTES)
+
+ /** Number of sectors required to store a given size in bytes.
+ *
+ * \param[in] size Size of the data that needs to be stored
+ *
+ * \return Number of sectors required to store the given data on the disk.
+ */
+ #define FILE_SECTORS(size) ((size / SECTOR_SIZE_BYTES) + ((size % SECTOR_SIZE_BYTES) ? 1 : 0))
+
+ /** Number of clusters required to store a given size in bytes.
+ *
+ * \param[in] size Size of the data that needs to be stored
+ *
+ * \return Number of clusters required to store the given data on the disk.
+ */
+ #define FILE_CLUSTERS(size) ((size / CLUSTER_SIZE_BYTES) + ((size % CLUSTER_SIZE_BYTES) ? 1 : 0))
+
+ /** Total number of logical sectors/blocks on the disk. */
+ #define LUN_MEDIA_BLOCKS (FILE_SECTORS(FIRMWARE_FILE_SIZE_BYTES) + 32)
+
+ /** Converts a given time in HH:MM:SS format to a FAT filesystem time.
+ *
+ * \note The minimum seconds resolution of FAT is 2, thus odd seconds
+ * will be truncated to the previous integer multiple of 2 seconds.
+ *
+ * \param[in] hh Hours (0-23)
+ * \param[in] mm Minutes (0-59)
+ * \param[in] ss Seconds (0-59)
+ *
+ * \return Given time encoded as a FAT filesystem timestamp
+ */
+ #define FAT_TIME(hh, mm, ss) ((hh << 11) | (mm << 5) | (ss >> 1))
+
+ /** Converts a given date in DD/MM/YYYY format to a FAT filesystem date.
+ *
+ * \param[in] dd Days in the month (1-31)
+ * \param[in] mm Months in the year (1-12)
+ * \param[in] yyyy Year (1980 - 2107)
+ *
+ * \return Given date encoded as a FAT filesystem datestamp
+ */
+ #define FAT_DATE(dd, mm, yyyy) (((yyyy - 1980) << 9) | (mm << 5) | (dd << 0))
+
+ /* Type Definitions: */
+ /** FAT boot block structure definition, used to identify the core
+ * parameters of a FAT filesystem stored on a disk.
+ *
+ * \note This definition is truncated to save space; the magic signature
+ * 0xAA55 must be appended to the very end of the block for it to
+ * be detected by the host as a valid boot block.
+ */
+ typedef struct
+ {
+ uint8_t Bootstrap[3];
+ uint8_t Description[8];
+ uint16_t SectorSize;
+ uint8_t SectorsPerCluster;
+ uint16_t ReservedSectors;
+ uint8_t FATCopies;
+ uint16_t RootDirectoryEntries;
+ uint16_t TotalSectors16;
+ uint8_t MediaDescriptor;
+ uint16_t SectorsPerFAT;
+ uint16_t SectorsPerTrack;
+ uint16_t Heads;
+ uint32_t HiddenSectors;
+ uint32_t TotalSectors32;
+ uint16_t PhysicalDriveNum;
+ uint8_t ExtendedBootRecordSig;
+ uint32_t VolumeSerialNumber;
+ uint8_t VolumeLabel[11];
+ uint8_t FilesystemIdentifier[8];
+ /* uint8_t BootstrapProgram[448]; */
+ /* uint16_t MagicSignature; */
+ } FATBootBlock_t;
+
+ /** FAT legacy 8.3 style directory entry structure definition, used to
+ * identify the files and folders of FAT filesystem stored on a disk.
+ */
+ typedef struct
+ {
+ uint8_t Filename[8];
+ uint8_t Extension[3];
+ uint8_t Attributes;
+ uint8_t Reserved[10];
+ uint16_t CreationTime;
+ uint16_t CreationDate;
+ uint16_t StartingCluster;
+ uint32_t FileSizeBytes;
+ } FATDirectoryEntry_t;
+
+ /* Function Prototypes: */
+ #if defined(INCLUDE_FROM_VIRTUAL_FAT_C)
+ static void UpdateFAT12ClusterEntry(uint8_t* const FATTable,
+ const uint16_t Index,
+ const uint16_t ChainEntry);
+ static void WriteVirtualBlock(const uint16_t BlockNumber);
+ static void ReadVirtualBlock(const uint16_t BlockNumber);
+ #endif
+
+ void VirtualFAT_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+ const uint32_t BlockAddress,
+ uint16_t TotalBlocks);
+
+ void VirtualFAT_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+ const uint32_t BlockAddress,
+ uint16_t TotalBlocks);
+#endif
--- /dev/null
+#\r
+# LUFA Library\r
+# Copyright (C) Dean Camera, 2013.\r
+#\r
+# dean [at] fourwalledcubicle [dot] com\r
+# www.lufa-lib.org\r
+#\r
+# --------------------------------------\r
+# LUFA Project Makefile.\r
+# --------------------------------------\r
+\r
+# Run "make help" for target help.\r
+\r
+MCU = at90usb1287\r
+ARCH = AVR8\r
+BOARD = USBKEY\r
+F_CPU = 8000000\r
+F_USB = $(F_CPU)\r
+OPTIMIZATION = s\r
+TARGET = BootloaderMassStorage\r
+SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)\r
+LUFA_PATH = ../../LUFA\r
+CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)\r
+LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)\r
+\r
+# Flash size and bootloader section sizes of the target, in KB. These must\r
+# match the target's total FLASH size and the bootloader size set in the\r
+# device's fuses.\r
+FLASH_SIZE_KB = 128\r
+BOOT_SECTION_SIZE_KB = 8\r
+\r
+# Bootloader address calculation formulas\r
+# Do not modify these macros, but rather modify the dependent values above.\r
+CALC_ADDRESS_IN_HEX = $(shell printf "0x%X" $$(( $(1) )) )\r
+BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 )\r
+BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - $(strip $(1)) )\r
+\r
+# Bootloader linker section flags for relocating the API table sections to\r
+# known FLASH addresses - these should not normally be user-edited.\r
+BOOT_SECTION_LD_FLAG = -Wl,--section-start=.apitable_$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=BootloaderAPI_$(strip $(2))\r
+BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, 96)\r
+BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, jumptable, JumpTable, 32)\r
+BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8)\r
+\r
+# Default target\r
+all:\r
+\r
+# Include LUFA build script makefiles\r
+include $(LUFA_PATH)/Build/lufa_core.mk\r
+include $(LUFA_PATH)/Build/lufa_sources.mk\r
+include $(LUFA_PATH)/Build/lufa_build.mk\r
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk\r
+include $(LUFA_PATH)/Build/lufa_doxygen.mk\r
+include $(LUFA_PATH)/Build/lufa_avrdude.mk\r
+include $(LUFA_PATH)/Build/lufa_atprogram.mk\r