--- /dev/null
+<AVRStudio><MANAGEMENT><ProjectName>BootloaderCDC</ProjectName><Created>30-Sep-2008 14:20:09</Created><LastEdit>30-Sep-2008 14:20:30</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>30-Sep-2008 14:20:09</Created><Version>4</Version><Build>4, 14, 0, 589</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>BootloaderCDC.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Users\Dean\Documents\Electronics\Projects\WORK\MyUSBWORK\Bootloaders\CDC\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>BootloaderCDC.c</SOURCEFILE><SOURCEFILE>Descriptors.c</SOURCEFILE><HEADERFILE>BootloaderCDC.h</HEADERFILE><HEADERFILE>Descriptors.h</HEADERFILE><OTHERFILE>makefile</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>YES</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE>makefile</EXTERNALMAKEFILE><PART>atmega128</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>BootloaderCDC.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20080512\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20080512\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><ProjectFiles><Files><Name>C:\Users\Dean\Documents\Electronics\Projects\WORK\MyUSBWORK\Bootloaders\CDC\BootloaderCDC.h</Name><Name>C:\Users\Dean\Documents\Electronics\Projects\WORK\MyUSBWORK\Bootloaders\CDC\Descriptors.h</Name><Name>C:\Users\Dean\Documents\Electronics\Projects\WORK\MyUSBWORK\Bootloaders\CDC\BootloaderCDC.c</Name><Name>C:\Users\Dean\Documents\Electronics\Projects\WORK\MyUSBWORK\Bootloaders\CDC\Descriptors.c</Name></Files></ProjectFiles><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Main source file for the CDC class bootloader. This file contains the complete bootloader logic.\r
+ */\r
+ \r
+#define INCLUDE_FROM_BOOTLOADERCDC_C\r
+#include "BootloaderCDC.h"\r
+\r
+/* Globals: */\r
+/** Line coding options for the virtual serial port. Although the virtual serial port data is never\r
+ * sent through a physical serial port, the line encoding data must still be read and preserved from\r
+ * the host, or the host will detect a problem and fail to open the port. This structure contains the\r
+ * current encoding options, including baud rate, character format, parity mode and total number of \r
+ * bits in each data chunk.\r
+ */\r
+CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,\r
+ CharFormat: OneStopBit,\r
+ ParityType: Parity_None,\r
+ DataBits: 8 };\r
+\r
+/** Current address counter. This stores the current address of the FLASH or EEPROM as set by the host,\r
+ * and is used when reading or writing to the AVRs memory (either FLASH or EEPROM depending on the issued\r
+ * command.)\r
+ */\r
+uint16_t CurrAddress;\r
+\r
+/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run\r
+ * via a soft reset. When cleared, the bootloader will abort, the USB interface will shut down and the application\r
+ * jumped to via an indirect jump to location 0x0000.\r
+ */\r
+bool RunBootloader = true;\r
+\r
+\r
+/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously \r
+ * runs the bootloader processing routine until instructed to soft-exit, or hard-reset via the watchdog to start\r
+ * the loaded application code.\r
+ */\r
+int main(void)\r
+{\r
+ /* Disable watchdog if enabled by bootloader/fuses */\r
+ MCUSR &= ~(1 << WDRF);\r
+ wdt_disable();\r
+\r
+ /* Disable Clock Division */\r
+ SetSystemClockPrescaler(0);\r
+ \r
+ /* Relocate the interrupt vector table to the bootloader section */\r
+ MCUCR = (1 << IVCE);\r
+ MCUCR = (1 << IVSEL);\r
+ \r
+ /* Initialize USB Subsystem */\r
+ USB_Init();\r
+\r
+ while (RunBootloader)\r
+ {\r
+ USB_USBTask();\r
+ CDC_Task();\r
+ }\r
+ \r
+ Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
+\r
+ /* Wait until any pending transmissions have completed before shutting down */\r
+ while (!(Endpoint_ReadWriteAllowed()));\r
+ \r
+ /* Shut down the USB subsystem */\r
+ USB_ShutDown();\r
+ \r
+ /* Relocate the interrupt vector table back to the application section */\r
+ MCUCR = (1 << IVCE);\r
+ MCUCR = 0;\r
+\r
+ /* Reset any used hardware ports back to their defaults */\r
+ PORTD = 0;\r
+ DDRD = 0;\r
+ \r
+ #if defined(PORTE)\r
+ PORTE = 0;\r
+ DDRE = 0;\r
+ #endif\r
+ \r
+ /* Re-enable RWW section */\r
+ boot_rww_enable();\r
+\r
+ /* Start the user application */\r
+ AppPtr_t AppStartPtr = (AppPtr_t)0x0000;\r
+ AppStartPtr(); \r
+}\r
+\r
+/** Event handler for the USB_Disconnect event. This indicates that the bootloader should exit and the user\r
+ * application started.\r
+ */\r
+EVENT_HANDLER(USB_Disconnect)\r
+{\r
+ /* Upon disconnection, run user application */\r
+ RunBootloader = false;\r
+}\r
+\r
+/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready\r
+ * to relay data to and from the attached USB host.\r
+ */\r
+EVENT_HANDLER(USB_ConfigurationChanged)\r
+{\r
+ /* Setup CDC Notification, Rx and Tx Endpoints */\r
+ Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,\r
+ ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,\r
+ ENDPOINT_BANK_SINGLE);\r
+\r
+ Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,\r
+ ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,\r
+ ENDPOINT_BANK_SINGLE);\r
+\r
+ Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,\r
+ ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,\r
+ ENDPOINT_BANK_SINGLE);\r
+}\r
+\r
+/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific\r
+ * control requests that are not handled internally by the USB library, so that they can be handled appropriately\r
+ * for the application.\r
+ */\r
+EVENT_HANDLER(USB_UnhandledControlPacket)\r
+{\r
+ uint8_t* LineCodingData = (uint8_t*)&LineCoding;\r
+\r
+ Endpoint_Discard_Word();\r
+\r
+ /* Process CDC specific control requests */\r
+ switch (bRequest)\r
+ {\r
+ case REQ_GetLineEncoding:\r
+ if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
+ {\r
+ Endpoint_ClearSetupReceived();\r
+\r
+ for (uint8_t i = 0; i < sizeof(LineCoding); i++)\r
+ Endpoint_Write_Byte(*(LineCodingData++)); \r
+ \r
+ Endpoint_ClearSetupIN();\r
+ \r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ Endpoint_ClearSetupOUT();\r
+ }\r
+ \r
+ break;\r
+ case REQ_SetLineEncoding:\r
+ if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+ {\r
+ Endpoint_ClearSetupReceived();\r
+\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+\r
+ for (uint8_t i = 0; i < sizeof(LineCoding); i++)\r
+ *(LineCodingData++) = Endpoint_Read_Byte();\r
+\r
+ Endpoint_ClearSetupOUT();\r
+\r
+ while (!(Endpoint_IsSetupINReady()));\r
+ Endpoint_ClearSetupIN();\r
+ }\r
+ \r
+ break;\r
+ case REQ_SetControlLineState:\r
+ if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+ {\r
+ Endpoint_ClearSetupReceived();\r
+ \r
+ while (!(Endpoint_IsSetupINReady()));\r
+ Endpoint_ClearSetupIN();\r
+ }\r
+ \r
+ break;\r
+ }\r
+}\r
+\r
+/** Reads or writes a block of EEPROM or FLASH memory to or from the appropriate CDC data endpoint, depending\r
+ * on the AVR910 protocol command issued.\r
+ *\r
+ * \param Command Single character AVR910 protocol command indicating what memory operation to perform\r
+ */\r
+static void ProgramReadWriteMemoryBlock(const uint8_t Command)\r
+{\r
+ uint16_t BlockSize;\r
+ char MemoryType;\r
+ \r
+ bool HighByte = false;\r
+ uint8_t LowByte = 0;\r
+ \r
+ BlockSize = (FetchNextCommandByte() << 8);\r
+ BlockSize |= FetchNextCommandByte();\r
+ \r
+ MemoryType = FetchNextCommandByte();\r
+\r
+ if ((MemoryType == 'E') || (MemoryType == 'F'))\r
+ {\r
+ /* Check if command is to read memory */\r
+ if (Command == 'g')\r
+ {\r
+ /* Re-enable RWW section */\r
+ boot_rww_enable();\r
+\r
+ while (BlockSize--)\r
+ {\r
+ if (MemoryType == 'E')\r
+ {\r
+ /* Read the next EEPROM byte into the endpoint */\r
+ WriteNextResponseByte(eeprom_read_byte((uint8_t*)CurrAddress));\r
+\r
+ /* Increment the address counter after use */\r
+ CurrAddress++;\r
+ }\r
+ else\r
+ {\r
+ /* Read the next FLASH byte from the current FLASH page */\r
+ #if defined(RAMPZ)\r
+ WriteNextResponseByte(pgm_read_byte_far(((uint32_t)CurrAddress << 1) + HighByte));\r
+ #else\r
+ WriteNextResponseByte(pgm_read_byte((CurrAddress << 1) + HighByte)); \r
+ #endif\r
+ \r
+ /* If both bytes in current word have been read, increment the address counter */\r
+ if (HighByte)\r
+ CurrAddress++;\r
+ \r
+ HighByte ^= 1;\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ uint32_t PageStartAddress = ((uint32_t)CurrAddress << 1);\r
+ \r
+ if (MemoryType == 'F')\r
+ {\r
+ boot_page_erase(PageStartAddress);\r
+ boot_spm_busy_wait();\r
+ }\r
+ \r
+ while (BlockSize--)\r
+ {\r
+ if (MemoryType == 'E')\r
+ {\r
+ /* Write the next EEPROM byte from the endpoint */\r
+ eeprom_write_byte((uint8_t*)CurrAddress, FetchNextCommandByte()); \r
+\r
+ /* Increment the address counter after use */\r
+ CurrAddress++;\r
+ }\r
+ else\r
+ { \r
+ /* If both bytes in current word have been written, increment the address counter */\r
+ if (HighByte)\r
+ {\r
+ /* Write the next FLASH word to the current FLASH page */\r
+ boot_page_fill(((uint32_t)CurrAddress << 1), ((FetchNextCommandByte() << 8) | LowByte));\r
+\r
+ HighByte = false;\r
+ \r
+ /* Increment the address counter after use */\r
+ CurrAddress++;\r
+ }\r
+ else\r
+ {\r
+ LowByte = FetchNextCommandByte();\r
+ \r
+ HighByte = true;\r
+ }\r
+ }\r
+ }\r
+\r
+ /* If in FLASH programming mode, commit the page after writing */\r
+ if (MemoryType == 'F')\r
+ {\r
+ /* Commit the flash page to memory */\r
+ boot_page_write(PageStartAddress);\r
+ \r
+ /* Wait until write operation has completed */\r
+ boot_spm_busy_wait();\r
+ }\r
+ \r
+ /* Send response byte back to the host */\r
+ WriteNextResponseByte('\r'); \r
+ }\r
+ }\r
+ else\r
+ {\r
+ /* Send error byte back to the host */\r
+ WriteNextResponseByte('?');\r
+ }\r
+}\r
+\r
+/** Retrieves the next byte from the host in the CDC data OUT endpoint, and clears the endpoint bank if needed\r
+ * to allow reception of the next data packet from the host.\r
+ *\r
+ * \return Next received byte from the host in the CDC data OUT endpoint\r
+ */\r
+static uint8_t FetchNextCommandByte(void)\r
+{\r
+ /* Select the OUT endpoint so that the next data byte can be read */\r
+ Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
+ \r
+ /* If OUT endpoint empty, clear it and wait for the next packet from the host */\r
+ if (!(Endpoint_ReadWriteAllowed()))\r
+ {\r
+ Endpoint_ClearCurrentBank();\r
+ while (!(Endpoint_ReadWriteAllowed()));\r
+ }\r
+ \r
+ /* Fetch the next byte from the OUT endpoint */\r
+ return Endpoint_Read_Byte();\r
+}\r
+\r
+/** Writes the next response byte to the CDC data IN endpoint, and sends the endpoint back if needed to free up the\r
+ * bank when full ready for the next byte in the packet to the host.\r
+ *\r
+ * \param Response Next response byte to send to the host\r
+ */\r
+static void WriteNextResponseByte(const uint8_t Response)\r
+{\r
+ /* Select the IN endpoint so that the next data byte can be written */\r
+ Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
+ \r
+ /* If OUT endpoint empty, clear it and wait for the next packet from the host */\r
+ if (!(Endpoint_ReadWriteAllowed()))\r
+ {\r
+ Endpoint_ClearCurrentBank();\r
+ while (!(Endpoint_ReadWriteAllowed()));\r
+ }\r
+ \r
+ /* Write the next byte to the OUT endpoint */\r
+ Endpoint_Write_Byte(Response);\r
+}\r
+\r
+/** Task to read in AVR910 commands from the CDC data OUT endpoint, process them, perform the required actions\r
+ * and send the appropriate response back to the host.\r
+ */\r
+TASK(CDC_Task)\r
+{\r
+ /* Select the OUT endpoint */\r
+ Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
+ \r
+ /* Check if endpoint has a command in it sent from the host */\r
+ if (Endpoint_ReadWriteAllowed())\r
+ {\r
+ /* Read in the bootloader command (first byte sent from host) */\r
+ uint8_t Command = FetchNextCommandByte();\r
+\r
+ if ((Command == 'L') || (Command == 'P') || (Command == 'T') || (Command == 'E'))\r
+ {\r
+ if (Command == 'E')\r
+ RunBootloader = false;\r
+ if (Command == 'T')\r
+ FetchNextCommandByte();\r
+\r
+ /* Send confirmation byte back to the host */\r
+ WriteNextResponseByte('\r'); \r
+ }\r
+ else if (Command == 't')\r
+ {\r
+ /* Return ATMEGA128 part code - this is only to allow AVRProg to use the bootloader */\r
+ WriteNextResponseByte(0x44);\r
+\r
+ WriteNextResponseByte(0x00);\r
+ }\r
+ else if (Command == 'a')\r
+ {\r
+ /* Indicate auto-address increment is supported */\r
+ WriteNextResponseByte('Y');\r
+ }\r
+ else if (Command == 'A')\r
+ {\r
+ /* Set the current address to that given by the host */\r
+ CurrAddress = (FetchNextCommandByte() << 8);\r
+ CurrAddress |= FetchNextCommandByte();\r
+\r
+ /* Send confirmation byte back to the host */\r
+ WriteNextResponseByte('\r');\r
+ }\r
+ else if (Command == 'p')\r
+ {\r
+ /* Indicate serial programmer back to the host */\r
+ WriteNextResponseByte('S'); \r
+ }\r
+ else if (Command == 'S')\r
+ {\r
+ /* Write the 7-byte software identifier to the endpoint */\r
+ for (uint8_t CurrByte = 0; CurrByte < 7; CurrByte++)\r
+ WriteNextResponseByte(SOFTWARE_IDENTIFIER[CurrByte]); \r
+ }\r
+ else if (Command == 'V')\r
+ {\r
+ WriteNextResponseByte('0' + BOOTLOADER_VERSION_MAJOR);\r
+ WriteNextResponseByte('0' + BOOTLOADER_VERSION_MINOR);\r
+ }\r
+ else if (Command == 's')\r
+ {\r
+ WriteNextResponseByte(boot_signature_byte_get(4));\r
+ WriteNextResponseByte(boot_signature_byte_get(2));\r
+ WriteNextResponseByte(boot_signature_byte_get(0)); \r
+ }\r
+ else if (Command == 'b')\r
+ {\r
+ WriteNextResponseByte('Y');\r
+ \r
+ /* Send block size to the host */\r
+ WriteNextResponseByte(SPM_PAGESIZE >> 8);\r
+ WriteNextResponseByte(SPM_PAGESIZE & 0xFF); \r
+ }\r
+ else if (Command == 'e')\r
+ {\r
+ /* Clear the application section of flash */\r
+ for (uint32_t CurrFlashAddress = 0; CurrFlashAddress < BOOT_START_ADDR; CurrFlashAddress++)\r
+ {\r
+ boot_page_erase(CurrFlashAddress);\r
+ boot_spm_busy_wait();\r
+ boot_page_write(CurrFlashAddress);\r
+ boot_spm_busy_wait();\r
+\r
+ CurrFlashAddress += SPM_PAGESIZE;\r
+ }\r
+ \r
+ /* Send confirmation byte back to the host */\r
+ WriteNextResponseByte('\r'); \r
+ }\r
+ else if (Command == 'l')\r
+ {\r
+ /* Set the lock bits to those given by the host */\r
+ boot_lock_bits_set(FetchNextCommandByte());\r
+\r
+ /* Send confirmation byte back to the host */\r
+ WriteNextResponseByte('\r');\r
+ }\r
+ else if (Command == 'r')\r
+ {\r
+ WriteNextResponseByte(boot_lock_fuse_bits_get(GET_LOCK_BITS)); \r
+ }\r
+ else if (Command == 'F')\r
+ {\r
+ WriteNextResponseByte(boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS));\r
+ }\r
+ else if (Command == 'N')\r
+ {\r
+ WriteNextResponseByte(boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS)); \r
+ }\r
+ else if (Command == 'Q')\r
+ {\r
+ WriteNextResponseByte(boot_lock_fuse_bits_get(GET_EXTENDED_FUSE_BITS)); \r
+ }\r
+ else if ((Command == 'C') || (Command == 'c'))\r
+ {\r
+ if (Command == 'c')\r
+ {\r
+ /* Increment the address if the second byte is being written */\r
+ CurrAddress++;\r
+ }\r
+ \r
+ /* Write the high byte to the current flash page */\r
+ boot_page_fill(((uint32_t)CurrAddress << 1), FetchNextCommandByte());\r
+ \r
+ /* Send confirmation byte back to the host */\r
+ WriteNextResponseByte('\r'); \r
+ }\r
+ else if (Command == 'm')\r
+ {\r
+ /* Commit the flash page to memory */\r
+ boot_page_write((uint32_t)CurrAddress << 1);\r
+ \r
+ /* Wait until write operation has completed */\r
+ boot_spm_busy_wait();\r
+\r
+ /* Send confirmation byte back to the host */\r
+ WriteNextResponseByte('\r'); \r
+ }\r
+ else if ((Command == 'B') || (Command == 'g'))\r
+ {\r
+ /* Delegate the block write/read to a seperate function for clarity */\r
+ ProgramReadWriteMemoryBlock(Command);\r
+ }\r
+ else if (Command == 'R')\r
+ {\r
+ #if defined(RAMPZ)\r
+ uint16_t ProgramWord = pgm_read_word_far(((uint32_t)CurrAddress << 1));\r
+ #else\r
+ uint16_t ProgramWord = pgm_read_word(CurrAddress << 1); \r
+ #endif\r
+ \r
+ WriteNextResponseByte(ProgramWord >> 8);\r
+ WriteNextResponseByte(ProgramWord & 0xFF);\r
+ }\r
+ else if (Command == 'D')\r
+ {\r
+ /* Read the byte from the endpoint and write it to the EEPROM */\r
+ eeprom_write_byte((uint8_t*)CurrAddress, FetchNextCommandByte());\r
+ \r
+ /* Increment the address after use */ \r
+ CurrAddress++;\r
+ \r
+ /* Send confirmation byte back to the host */\r
+ WriteNextResponseByte('\r'); \r
+ }\r
+ else if (Command == 'd')\r
+ {\r
+ /* Read the EEPROM byte and write it to the endpoint */\r
+ WriteNextResponseByte(eeprom_read_byte((uint8_t*)CurrAddress));\r
+\r
+ /* Increment the address after use */\r
+ CurrAddress++;\r
+ }\r
+ else if (Command == 27)\r
+ {\r
+ /* Escape is sync, ignore */\r
+ }\r
+ else\r
+ {\r
+ /* Unknown command, return fail code */\r
+ WriteNextResponseByte('?');\r
+ }\r
+\r
+ /* Select the IN endpoint */\r
+ Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
+\r
+ /* Remember if the endpoint is completely full before clearing it */\r
+ bool IsEndpointFull = !(Endpoint_ReadWriteAllowed());\r
+\r
+ /* Send the endpoint data to the host */\r
+ Endpoint_ClearCurrentBank();\r
+ \r
+ /* If a full endpoint's worth of data was sent, we need to send an empty packet afterwards to signal end of transfer */\r
+ if (IsEndpointFull)\r
+ {\r
+ while (!(Endpoint_ReadWriteAllowed()));\r
+ Endpoint_ClearCurrentBank();\r
+ }\r
+ \r
+ /* Select the OUT endpoint */\r
+ Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
+\r
+ /* Acknowledge the command from the host */\r
+ Endpoint_ClearCurrentBank();\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Header file for BootloaderCDC.c.\r
+ */\r
+ \r
+#ifndef _CDC_H_\r
+#define _CDC_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <avr/wdt.h>\r
+ #include <avr/boot.h>\r
+ #include <avr/eeprom.h>\r
+ #include <stdbool.h>\r
+\r
+ #include "Descriptors.h"\r
+\r
+ #include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
+\r
+ /* Macros: */\r
+ /** CDC Class Specific request to get the line encoding on a CDC-ACM virtual serial port, including the\r
+ * baud rate, parity, stop bits and data bits.\r
+ */\r
+ #define REQ_GetLineEncoding 0x21\r
+\r
+ /** CDC Class Specific request to set the line encoding on a CDC-ACM virtual serial port, including the\r
+ * baud rate, parity, stop bits and data bits.\r
+ */\r
+ #define REQ_SetLineEncoding 0x20\r
+\r
+ /** CDC Class Specific request to set the state of the serial handshake lines (such as DCD and RTS) on\r
+ * a CDC-ACM virtual serial port.\r
+ */\r
+ #define REQ_SetControlLineState 0x22\r
+ \r
+ /** Version major of the CDC bootloader. */\r
+ #define BOOTLOADER_VERSION_MAJOR 0x01\r
+\r
+ /** Version minor of the CDC bootloader. */\r
+ #define BOOTLOADER_VERSION_MINOR 0x00\r
+ \r
+ /** Hardware version major of the CDC bootloader. */\r
+ #define BOOTLOADER_HWVERSION_MAJOR 0x01\r
+\r
+ /** Hardware version minor of the CDC bootloader. */\r
+ #define BOOTLOADER_HWVERSION_MINOR 0x00\r
+\r
+ /** Eight character bootloader firmware identifier reported to the host when requested */\r
+ #define SOFTWARE_IDENTIFIER "LUFA-CDC"\r
+\r
+ /* Event Handlers: */\r
+ /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */\r
+ HANDLES_EVENT(USB_Disconnect);\r
+\r
+ /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */\r
+ HANDLES_EVENT(USB_ConfigurationChanged);\r
+\r
+ /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */\r
+ HANDLES_EVENT(USB_UnhandledControlPacket);\r
+ \r
+ /* Type Defines: */\r
+ /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */\r
+ typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;\r
+\r
+ /** Type define for the CDC-ACM virtual serial port line encoding options, including baud rate, format, parity\r
+ * and size of each data chunk in bits.\r
+ */\r
+ typedef struct\r
+ {\r
+ uint32_t BaudRateBPS; /**< Baud rate in BPS */\r
+ uint8_t CharFormat; /**< Character format, an entry from the BootloaderCDC_CDC_LineCodingFormats_t enum */\r
+ uint8_t ParityType; /**< Parity mode, an entry from the BootloaderCDC_CDC_LineCodeingParity_t enum */\r
+ uint8_t DataBits; /**< Size of each data chunk, in bits */\r
+ } CDC_Line_Coding_t;\r
+ \r
+ /* Enums: */\r
+ /** Enum for the possible line encoding formats on a CDC-ACM virtual serial port */\r
+ enum BootloaderCDC_CDC_LineCodingFormats_t\r
+ {\r
+ OneStopBit = 0, /**< Single stop bit */\r
+ OneAndAHalfStopBits = 1, /**< 1.5 stop bits */\r
+ TwoStopBits = 2, /**< Two stop bits */\r
+ };\r
+ \r
+ /** Enum for the possible parity modes on a CDC-ACM virtual serial port */\r
+ enum BootloaderCDC_CDC_LineCodeingParity_t\r
+ {\r
+ Parity_None = 0, /**< No data parity checking */\r
+ Parity_Odd = 1, /**< Odd data parity checking */\r
+ Parity_Even = 2, /**< Even data parity checking */\r
+ Parity_Mark = 3, /**< Mark data parity checking */\r
+ Parity_Space = 4, /**< Space data parity checking */\r
+ };\r
+ \r
+ /* Tasks: */\r
+ TASK(CDC_Task);\r
+\r
+ /* Function Prototypes: */\r
+ #if defined(INCLUDE_FROM_BOOTLOADERCDC_C) || defined(__DOXYGEN__)\r
+ static void ProgramReadWriteMemoryBlock(const uint8_t Command);\r
+ static uint8_t FetchNextCommandByte(void);\r
+ static void WriteNextResponseByte(const uint8_t Response);\r
+ #endif\r
+\r
+#endif\r
--- /dev/null
+/** \file\r
+ *\r
+ * This file contains special DoxyGen information for the generation of the main page and other special\r
+ * documentation pages. It is not a project source file.\r
+ */\r
+ \r
+/** \mainpage CDC Class USB AVR Bootloader\r
+ * \r
+ * This bootloader enumerates to the host as a CDC Class device (virtual serial port), allowing for AVR109\r
+ * protocol compatible programming software to load firmware onto the AVR. \r
+ * \r
+ * Out of the box this bootloader builds for the USB1287, and will fit into 4KB of bootloader space. If\r
+ * you wish to enlarge this space and/or change the AVR model, you will need to edit the BOOT_START and MCU\r
+ * values in the accompanying makefile.\r
+ * \r
+ * This bootloader is compatible with the open source application AVRDUDE, or Atmel's AVRPROG.\r
+ *\r
+ * <table>\r
+ * <tr>\r
+ * <td><b>USB Mode:</b></td>\r
+ * <td>Device</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>USB Class:</b></td>\r
+ * <td>Communications Device Class (CDC)</td>\r
+ * </tr>\r
+ * <tr> \r
+ * <td><b>USB Subclass:</b></td>\r
+ * <td>Abstract Control Model (ACM)</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Relevant Standards:</b></td>\r
+ * <td>USBIF CDC Class Standard</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Usable Speeds:</b></td>\r
+ * <td>Full Speed Mode</td>\r
+ * </tr>\r
+ * </table>\r
+ */\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * USB Device Descriptors, for library use when in USB device mode. Descriptors are special \r
+ * computer-readable structures which the host requests upon device enumeration, to determine\r
+ * the device's capabilities and functions. \r
+ */\r
+\r
+#include "Descriptors.h"\r
+\r
+/** Device descriptor structure. This descriptor, located in SRAM memory, describes the overall\r
+ * device characteristics, including the supported USB version, control endpoint size and the\r
+ * number of device configurations. The descriptor is read out by the USB host when the enumeration\r
+ * process begins.\r
+ */\r
+USB_Descriptor_Device_t DeviceDescriptor =\r
+{\r
+ Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ \r
+ USBSpecification: VERSION_BCD(01.10),\r
+ Class: 0x02,\r
+ SubClass: 0x00,\r
+ Protocol: 0x00,\r
+ \r
+ Endpoint0Size: FIXED_CONTROL_ENDPOINT_SIZE,\r
+ \r
+ VendorID: 0x03EB,\r
+ ProductID: 0x204A,\r
+ ReleaseNumber: 0x0000,\r
+ \r
+ ManufacturerStrIndex: NO_DESCRIPTOR,\r
+ ProductStrIndex: 0x01,\r
+ SerialNumStrIndex: NO_DESCRIPTOR,\r
+ \r
+ NumberOfConfigurations: 1\r
+};\r
+\r
+/** Configuration descriptor structure. This descriptor, located in SRAM memory, describes the usage\r
+ * of the device in one of its supported configurations, including information about any device interfaces\r
+ * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting\r
+ * a configuration so that the host may correctly communicate with the USB device.\r
+ */\r
+USB_Descriptor_Configuration_t ConfigurationDescriptor =\r
+{\r
+ Config:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+\r
+ TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
+ TotalInterfaces: 2,\r
+ \r
+ ConfigurationNumber: 1,\r
+ ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ \r
+ ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ \r
+ MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ },\r
+ \r
+ CCI_Interface:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+\r
+ InterfaceNumber: 0,\r
+ AlternateSetting: 0,\r
+ \r
+ TotalEndpoints: 1,\r
+ \r
+ Class: 0x02,\r
+ SubClass: 0x02,\r
+ Protocol: 0x01,\r
+ \r
+ InterfaceStrIndex: NO_DESCRIPTOR\r
+ },\r
+\r
+ CDC_Functional_IntHeader:\r
+ {\r
+ Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
+ SubType: 0x00,\r
+ \r
+ Data: {0x10, 0x01}\r
+ },\r
+\r
+ CDC_Functional_CallManagement:\r
+ {\r
+ Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
+ SubType: 0x01,\r
+ \r
+ Data: {0x03, 0x01}\r
+ },\r
+\r
+ CDC_Functional_AbstractControlManagement:\r
+ {\r
+ Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},\r
+ SubType: 0x02,\r
+ \r
+ Data: {0x06}\r
+ },\r
+ \r
+ CDC_Functional_Union:\r
+ {\r
+ Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
+ SubType: 0x06,\r
+ \r
+ Data: {0x00, 0x01}\r
+ }, \r
+\r
+ ManagementEndpoint:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ \r
+ EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
+ Attributes: EP_TYPE_INTERRUPT,\r
+ EndpointSize: CDC_NOTIFICATION_EPSIZE,\r
+ PollingIntervalMS: 0x02\r
+ },\r
+\r
+ DCI_Interface:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+\r
+ InterfaceNumber: 1,\r
+ AlternateSetting: 0,\r
+ \r
+ TotalEndpoints: 2,\r
+ \r
+ Class: 0x0A,\r
+ SubClass: 0x00,\r
+ Protocol: 0x00,\r
+ \r
+ InterfaceStrIndex: NO_DESCRIPTOR\r
+ },\r
+\r
+ DataOutEndpoint:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ \r
+ EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
+ Attributes: EP_TYPE_BULK,\r
+ EndpointSize: CDC_TXRX_EPSIZE,\r
+ PollingIntervalMS: 0x00\r
+ },\r
+ \r
+ DataInEndpoint:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ \r
+ EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
+ Attributes: EP_TYPE_BULK,\r
+ EndpointSize: CDC_TXRX_EPSIZE,\r
+ PollingIntervalMS: 0x00\r
+ }\r
+};\r
+\r
+/** Language descriptor structure. This descriptor, located in SRAM memory, is returned when the host requests\r
+ * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate\r
+ * via the language ID table available at USB.org what languages the device supports for its string descriptors.\r
+ */\r
+USB_Descriptor_String_t LanguageString =\r
+{\r
+ Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ \r
+ UnicodeString: {LANGUAGE_ID_ENG}\r
+};\r
+\r
+/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
+ * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device\r
+ * Descriptor.\r
+ */\r
+USB_Descriptor_String_t ProductString =\r
+{\r
+ Header: {Size: USB_STRING_LEN(15), Type: DTYPE_String},\r
+ \r
+ UnicodeString: L"AVR CDC Bootloader"\r
+};\r
+\r
+/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
+ * documentation) by the application code so that the address and size of a requested descriptor can be given\r
+ * to the USB library. When the device recieves a Get Descriptor request on the control endpoint, this function\r
+ * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the\r
+ * USB host.\r
+ */\r
+uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+{\r
+ const uint8_t DescriptorType = (wValue >> 8);\r
+ const uint8_t DescriptorNumber = (wValue & 0xFF);\r
+\r
+ void* Address = NULL;\r
+ uint16_t Size = NO_DESCRIPTOR;\r
+\r
+ switch (DescriptorType)\r
+ {\r
+ case DTYPE_Device:\r
+ Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
+ Size = sizeof(USB_Descriptor_Device_t);\r
+ break;\r
+ case DTYPE_Configuration:\r
+ Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
+ Size = sizeof(USB_Descriptor_Configuration_t);\r
+ break;\r
+ case DTYPE_String:\r
+ if (!(DescriptorNumber))\r
+ {\r
+ Address = DESCRIPTOR_ADDRESS(LanguageString);\r
+ Size = LanguageString.Header.Size;\r
+ }\r
+ else\r
+ {\r
+ Address = DESCRIPTOR_ADDRESS(ProductString);\r
+ Size = ProductString.Header.Size;\r
+ }\r
+ \r
+ break;\r
+ }\r
+ \r
+ *DescriptorAddress = Address;\r
+ return Size;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Header file for Descriptors.c.\r
+ */\r
+\r
+#ifndef _DESCRIPTORS_H_\r
+#define _DESCRIPTORS_H_\r
+\r
+ /* Includes: */\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+\r
+ /* Macros: */\r
+ /** Structure for a CDC class Functional descriptor, with a given data size. This is used instead of a\r
+ * type define so that the same macro can be used for functional descriptors of varying data lengths,\r
+ * while allowing the sizeof() operator to return correct results.\r
+ *\r
+ * \param DataSize Size of the functional descriptor's data payload, in bytes\r
+ */\r
+ #define CDC_FUNCTIONAL_DESCRIPTOR(DataSize) \\r
+ struct \\r
+ { \\r
+ USB_Descriptor_Header_t Header; \\r
+ uint8_t SubType; \\r
+ uint8_t Data[DataSize]; \\r
+ }\r
+\r
+ /** Endpoint number for the CDC control interface event notification endpoint. */\r
+ #define CDC_NOTIFICATION_EPNUM 3\r
+\r
+ /** Size of the CDC control interface notification endpoint bank, in bytes */\r
+ #define CDC_NOTIFICATION_EPSIZE 8\r
+\r
+ /** Endpoint number for the CDC data interface TX (data IN) endpoint */\r
+ #define CDC_TX_EPNUM 1 \r
+\r
+ /** Endpoint number for the CDC data interface RX (data OUT) endpoint */\r
+ #define CDC_RX_EPNUM 2 \r
+\r
+ /** Size of the CDC data interface TX and RX data endpoint banks, in bytes */\r
+ #define CDC_TXRX_EPSIZE 16\r
+\r
+ /* Type Defines: */\r
+ /** Type define for the device configuration descriptor structure. This must be defined in the\r
+ * application code, as the configuration descriptor contains several sub-descriptors which\r
+ * vary between devices, and which describe the device's usage to the host.\r
+ */\r
+ typedef struct\r
+ {\r
+ USB_Descriptor_Configuration_Header_t Config;\r
+ USB_Descriptor_Interface_t CCI_Interface;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;\r
+ CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;\r
+ USB_Descriptor_Endpoint_t ManagementEndpoint;\r
+ USB_Descriptor_Interface_t DCI_Interface;\r
+ USB_Descriptor_Endpoint_t DataOutEndpoint;\r
+ USB_Descriptor_Endpoint_t DataInEndpoint;\r
+ } USB_Descriptor_Configuration_t;\r
+\r
+ /* Function Prototypes: */\r
+ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+ ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
+\r
+#endif\r
--- /dev/null
+# Doxyfile 1.5.7.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 a sequence of words surrounded \r
+# by quotes) that should identify the project.\r
+\r
+PROJECT_NAME = "LUFA Library - CDC 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 = 0.0.0\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 = YES\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, Farsi, Finnish, French, German, Greek, \r
+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), \r
+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, \r
+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, \r
+# Spanish, Swedish, and Ukrainian.\r
+\r
+OUTPUT_LANGUAGE = English\r
+\r
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \r
+# include brief member descriptions after the members that are listed in \r
+# the file and class documentation (similar to JavaDoc). \r
+# Set to NO to disable this.\r
+\r
+BRIEF_MEMBER_DESC = YES\r
+\r
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \r
+# the brief description of a member or function before the detailed description. \r
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \r
+# brief descriptions will be completely suppressed.\r
+\r
+REPEAT_BRIEF = YES\r
+\r
+# This tag implements a quasi-intelligent brief description abbreviator \r
+# that is used to form the text in various listings. Each string \r
+# in this list, if found as the leading text of the brief description, will be \r
+# stripped from the text and the result after processing the whole list, is \r
+# used as the annotated text. Otherwise, the brief description is used as-is. \r
+# If left blank, the following values are used ("$name" is automatically \r
+# replaced with the name of the entity): "The $name class" "The $name widget" \r
+# "The $name file" "is" "provides" "specifies" "contains" \r
+# "represents" "a" "an" "the"\r
+\r
+ABBREVIATE_BRIEF = "The $name class" \\r
+ "The $name widget" \\r
+ "The $name file" \\r
+ is \\r
+ provides \\r
+ specifies \\r
+ contains \\r
+ represents \\r
+ a \\r
+ an \\r
+ the\r
+\r
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \r
+# Doxygen will generate a detailed section even if there is only a brief \r
+# description.\r
+\r
+ALWAYS_DETAILED_SEC = NO\r
+\r
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all \r
+# inherited members of a class in the documentation of that class as if those \r
+# members were ordinary class members. Constructors, destructors and assignment \r
+# operators of the base classes will not be shown.\r
+\r
+INLINE_INHERITED_MEMB = NO\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \r
+# path before files name in the file list and in the header files. If set \r
+# to NO the shortest path that makes the file name unique will be used.\r
+\r
+FULL_PATH_NAMES = YES\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \r
+# can be used to strip a user-defined part of the path. Stripping is \r
+# only done if one of the specified strings matches the left-hand part of \r
+# the path. The tag can be used to show relative paths in the file list. \r
+# If left blank the directory from which doxygen is run is used as the \r
+# path to strip.\r
+\r
+STRIP_FROM_PATH = \r
+\r
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of \r
+# the path mentioned in the documentation of a class, which tells \r
+# the reader which header file to include in order to use a class. \r
+# If left blank only the name of the header file containing the class \r
+# definition is used. Otherwise one should specify the include paths that \r
+# are normally passed to the compiler using the -I flag.\r
+\r
+STRIP_FROM_INC_PATH = \r
+\r
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter \r
+# (but less readable) file names. This can be useful is your file systems \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
+# 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
+# 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 make the inheritance and collaboration \r
+# diagrams that involve STL classes more complete and accurate.\r
+\r
+BUILTIN_STL_SUPPORT = NO\r
+\r
+# If you use Microsoft's C++/CLI language, you should set this option to YES to\r
+# enable parsing support.\r
+\r
+CPP_CLI_SUPPORT = NO\r
+\r
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. \r
+# Doxygen will parse them like normal C++ but will assume all classes use public \r
+# instead of private inheritance when no explicit protection keyword is present.\r
+\r
+SIP_SUPPORT = NO\r
+\r
+# For Microsoft's IDL there are propget and propput attributes to indicate getter \r
+# and setter methods for a property. Setting this option to YES (the default) \r
+# will make doxygen to replace the get and set methods by a property in the \r
+# documentation. This will only work if the methods are indeed getting or \r
+# setting a simple type. If this is not the case, or you want to show the \r
+# methods anyway, you should set this option to NO.\r
+\r
+IDL_PROPERTY_SUPPORT = YES\r
+\r
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \r
+# tag is set to YES, then doxygen will reuse the documentation of the first \r
+# member in the group (if any) for the other members of the group. By default \r
+# all members of a group must be documented explicitly.\r
+\r
+DISTRIBUTE_GROUP_DOC = NO\r
+\r
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of \r
+# the same type (for instance a group of public functions) to be put as a \r
+# subgroup of that type (e.g. under the Public Functions section). Set it to \r
+# NO to prevent subgrouping. Alternatively, this can be done per class using \r
+# the \nosubgrouping command.\r
+\r
+SUBGROUPING = YES\r
+\r
+# When 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 penality. \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 rougly 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
+#---------------------------------------------------------------------------\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_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 namespace 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 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_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
+# The GENERATE_TODOLIST tag can be used to enable (YES) or \r
+# disable (NO) the todo list. This list is created by putting \todo \r
+# commands in the documentation.\r
+\r
+GENERATE_TODOLIST = NO\r
+\r
+# The GENERATE_TESTLIST tag can be used to enable (YES) or \r
+# disable (NO) the test list. This list is created by putting \test \r
+# commands in the documentation.\r
+\r
+GENERATE_TESTLIST = NO\r
+\r
+# The GENERATE_BUGLIST tag can be used to enable (YES) or \r
+# disable (NO) the bug list. This list is created by putting \bug \r
+# commands in the documentation.\r
+\r
+GENERATE_BUGLIST = NO\r
+\r
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or \r
+# disable (NO) the deprecated list. This list is created by putting \r
+# \deprecated commands in the documentation.\r
+\r
+GENERATE_DEPRECATEDLIST= YES\r
+\r
+# The ENABLED_SECTIONS tag can be used to enable conditional \r
+# documentation sections, marked by \if sectionname ... \endif.\r
+\r
+ENABLED_SECTIONS = \r
+\r
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines \r
+# the initial value of a variable or define 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 defines in the \r
+# documentation can be controlled using \showinitializer or \hideinitializer \r
+# command in the documentation regardless of this setting.\r
+\r
+MAX_INITIALIZER_LINES = 30\r
+\r
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated \r
+# at the bottom of the documentation of classes and structs. If set to YES the \r
+# list will mention the files that were used to generate the documentation.\r
+\r
+SHOW_USED_FILES = YES\r
+\r
+# If the sources in your project are distributed over multiple directories \r
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy \r
+# in the documentation. The default is NO.\r
+\r
+SHOW_DIRECTORIES = YES\r
+\r
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.\r
+# This will remove the Files entry from the Quick Index and from the \r
+# Folder Tree View (if specified). The default is YES.\r
+\r
+SHOW_FILES = YES\r
+\r
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the \r
+# Namespaces page. 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 by \r
+# doxygen. The layout file controls the global structure of the generated output files \r
+# in an output format independent way. The create the layout file that represents \r
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a \r
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name \r
+# of the layout file.\r
+\r
+LAYOUT_FILE = \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
+# This WARN_NO_PARAMDOC option can be abled 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++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx \r
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90\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 \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
+\r
+EXCLUDE = \r
+\r
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or \r
+# directories that are symbolic links (a Unix filesystem 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 = */LowLevel/USBMode.h\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
+\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. 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. Doxygen will compare the file name with each pattern and apply the \r
+# filter if there is a match. 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, INPUT_FILTER \r
+# is applied to all files.\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
+#---------------------------------------------------------------------------\r
+# configuration options related to source browsing\r
+#---------------------------------------------------------------------------\r
+\r
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will \r
+# be generated. Documented entities will be cross-referenced with these sources. \r
+# Note: To get rid of all source code in the generated output, make sure also \r
+# VERBATIM_HEADERS is set to NO.\r
+\r
+SOURCE_BROWSER = NO\r
+\r
+# Setting the INLINE_SOURCES tag to YES will include the body \r
+# of functions and classes directly in the documentation.\r
+\r
+INLINE_SOURCES = NO\r
+\r
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \r
+# doxygen to hide any special comment blocks from generated source code \r
+# fragments. Normal C and C++ comments will always remain visible.\r
+\r
+STRIP_CODE_COMMENTS = YES\r
+\r
+# If the REFERENCED_BY_RELATION tag is set to YES \r
+# then for each documented function all documented \r
+# functions referencing it will be listed.\r
+\r
+REFERENCED_BY_RELATION = NO\r
+\r
+# If the REFERENCES_RELATION tag is set to YES \r
+# then for each documented function all documented entities \r
+# called/used by that function will be listed.\r
+\r
+REFERENCES_RELATION = NO\r
+\r
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\r
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\r
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\r
+# link to the source code. Otherwise they will link to the documentstion.\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.\r
+\r
+HTML_HEADER = \r
+\r
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for \r
+# each generated HTML page. If it is left blank doxygen will generate a \r
+# standard footer.\r
+\r
+HTML_FOOTER = \r
+\r
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading \r
+# style sheet that is used by each HTML page. It can be used to \r
+# fine-tune the look of the HTML output. If the tag is left blank doxygen \r
+# will generate a default style sheet. Note that doxygen will try to copy \r
+# the style sheet file to the HTML output directory, so don't put your own \r
+# stylesheet in the HTML output directory as well, or it will be erased!\r
+\r
+HTML_STYLESHEET = \r
+\r
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \r
+# files or namespaces will be aligned in HTML using tables. If set to \r
+# NO a bullet list will be used.\r
+\r
+HTML_ALIGN_MEMBERS = YES\r
+\r
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML \r
+# documentation will contain sections that can be hidden and shown after the \r
+# page has loaded. For this to work a browser that supports \r
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox \r
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).\r
+\r
+HTML_DYNAMIC_SECTIONS = YES\r
+\r
+# If the GENERATE_DOCSET tag is set to YES, additional index files \r
+# will be generated that can be used as input for Apple's Xcode 3 \r
+# integrated development environment, introduced with OSX 10.5 (Leopard). \r
+# To create a documentation set, doxygen will generate a Makefile in the \r
+# HTML output directory. Running make will produce the docset in that \r
+# directory and running "make install" will install the docset in \r
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find \r
+# it at startup. \r
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 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
+# 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 QHP_VIRTUAL_FOLDER \r
+# are set, an additional index file will be generated that can be used as input for \r
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated \r
+# 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
+# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>.\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
+# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>.\r
+\r
+QHP_VIRTUAL_FOLDER = doc\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
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at \r
+# top of each HTML page. The value NO (the default) enables the index and \r
+# the value YES disables it.\r
+\r
+DISABLE_INDEX = NO\r
+\r
+# This tag can be used to set the number of enum values (range [1..20]) \r
+# that doxygen will group on one line in the generated HTML documentation.\r
+\r
+ENUM_VALUES_PER_LINE = 1\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 FRAME, 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 (for instance Mozilla 1.0+, \r
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are \r
+# probably better off using the HTML help feature. Other possible values \r
+# for this tag are: HIERARCHIES, which will generate the Groups, Directories,\r
+# and Class Hierarchy pages using a tree view instead of an ordered list;\r
+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which\r
+# disables this behavior completely. For backwards compatibility with previous\r
+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE\r
+# respectively.\r
+\r
+GENERATE_TREEVIEW = YES\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
+# 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
+#---------------------------------------------------------------------------\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
+\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, a4wide, 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
+# 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
+#---------------------------------------------------------------------------\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 stylesheet 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. This is useful \r
+# if you want to understand what is going on. 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
+# in the INCLUDE_PATH (see below) will be search if 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
+\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.\r
+\r
+EXPAND_AS_DEFINED = BUTTLOADTAG\r
+\r
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then \r
+# doxygen's preprocessor will remove all function-like macros that are alone \r
+# on a line, have an all uppercase name, and do not end with a semicolon. Such \r
+# function macros are typically used for boiler-plate code, and will confuse \r
+# 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. \r
+# Optionally an initial location of the external documentation \r
+# can be added for each tagfile. The format of a tag file without \r
+# this location is as follows: \r
+# TAGFILES = file1 file2 ... \r
+# Adding location for the tag files is done as follows: \r
+# TAGFILES = file1=loc1 "file2 = loc2" ... \r
+# where "loc1" and "loc2" can be relative or absolute paths or \r
+# URLs. If a location is present for each tag, the installdox tool \r
+# does not have to be run to correct the links.\r
+# Note that each tag file must have a unique name\r
+# (where the name does NOT include the path)\r
+# If a tag file is not located in the directory in which doxygen \r
+# 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 is superseded by the HAVE_DOT option below. This is only a \r
+# fallback. It is recommended to install and use dot, since it yields more \r
+# 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
+# By default doxygen will write a font called FreeSans.ttf to the output \r
+# directory and reference it in all dot files that doxygen generates. This \r
+# font does not include all possible unicode characters however, so when you need \r
+# these (or just want a differently looking font) you can specify the font name \r
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, \r
+# which can be done by putting it in a standard location or by setting the \r
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory \r
+# 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 output directory to look for the \r
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a \r
+# different font using DOT_FONTNAME you can set the path where dot \r
+# can find it using this tag.\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
+# the 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 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 graphical hierarchy of all classes instead of a textual one.\r
+\r
+GRAPHICAL_HIERARCHY = NO\r
+\r
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES \r
+# then doxygen will show the dependencies a directory has on other directories \r
+# in a graphical way. The dependency relations are determined by the #include\r
+# relations between the files in the directories.\r
+\r
+DIRECTORY_GRAPH = NO\r
+\r
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images \r
+# generated by dot. Possible values are png, jpg, or gif\r
+# If left blank png will be used.\r
+\r
+DOT_IMAGE_FORMAT = png\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 = "C:/Program Files/Graphviz2.18/bin"\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 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
+\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to the search engine \r
+#---------------------------------------------------------------------------\r
+\r
+# The SEARCHENGINE tag specifies whether or not a search engine should be \r
+# used. If set to NO the values of all tags below this one will be ignored.\r
+\r
+SEARCHENGINE = NO\r
--- /dev/null
+; Windows LUFA CDC Setup File\r
+; Copyright (c) 2000 Microsoft Corporation\r
+\r
+[Version] \r
+Signature="$Windows NT$" \r
+Class=Ports\r
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} \r
+Provider=%COMPANY% \r
+LayoutFile=layout.inf\r
+DriverVer=06/06/2006,1.0.0.0\r
+\r
+[Manufacturer] \r
+%MFGNAME% = ManufName\r
+\r
+[DestinationDirs] \r
+DefaultDestDir=12 \r
+\r
+[ManufName] \r
+%Modem3% = Modem3, USB\VID_03EB&PID_204A\r
+\r
+;------------------------------------------------------------------------------\r
+; Windows 2000/XP Sections\r
+;------------------------------------------------------------------------------\r
+\r
+[Modem3.nt]\r
+CopyFiles=USBModemCopyFileSection\r
+AddReg=Modem3.nt.AddReg \r
+\r
+[USBModemCopyFileSection]\r
+usbser.sys,,,0x20\r
+\r
+[Modem3.nt.AddReg] \r
+HKR,,DevLoader,,*ntkern \r
+HKR,,NTMPDriver,,usbser.sys \r
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" \r
+\r
+[Modem3.nt.Services] \r
+AddService=usbser, 0x00000002, DriverService\r
+\r
+[DriverService] \r
+DisplayName=%SERVICE%\r
+ServiceType=1\r
+StartType=3\r
+ErrorControl=1\r
+ServiceBinary=%12%\usbser.sys \r
+\r
+;------------------------------------------------------------------------------\r
+; String Definitions\r
+;------------------------------------------------------------------------------\r
+\r
+[Strings] \r
+COMPANY="LUFA Library"\r
+MFGNAME="Dean Camera"\r
+Modem3="USB AVR109 Bootloader" \r
+SERVICE="USB Virtual Serial Port CDC Driver"
\ No newline at end of file
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = at90usb1287\r
+\r
+\r
+# Target board (see library BoardTypes.h documentation, USER or blank for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
+# "Board" inside the application directory.\r
+BOARD = USBKEY\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the \r
+# processor frequency. You can then use this symbol in your source code to \r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+# Typical values are:\r
+# F_CPU = 1000000\r
+# F_CPU = 1843200\r
+# F_CPU = 2000000\r
+# F_CPU = 3686400\r
+# F_CPU = 4000000\r
+# F_CPU = 7372800\r
+# F_CPU = 8000000\r
+# F_CPU = 11059200\r
+# F_CPU = 14745600\r
+# F_CPU = 16000000\r
+# F_CPU = 18432000\r
+# F_CPU = 20000000\r
+F_CPU = 8000000\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = BootloaderCDC\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = $(TARGET).c \\r
+ Descriptors.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/LowLevel.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/Endpoint.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/DevChapter9.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/USBTask.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/USBInterrupt.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/Events.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/StdDescriptors.c \\r
+ \r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC =\r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s]. \r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = ../../\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Starting byte address of the bootloader\r
+BOOT_START = 0x1E000\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL -DBOARD=BOARD_$(BOARD) -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DSTATIC_ENDPOINT_CONFIGURATION\r
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DUSE_SINGLE_DEVICE_CONFIGURATION\r
+\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+#CPPDEFS += -D__STDC_LIMIT_MACROS\r
+#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
+\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -fno-inline-small-functions\r
+CFLAGS += -fno-reorder-blocks\r
+CFLAGS += -fno-reorder-blocks-and-partition\r
+CFLAGS += -fno-reorder-functions\r
+CFLAGS += -fno-toplevel-reorder\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+CFLAGS += -Wundef\r
+#CFLAGS += -fno-unit-at-a-time\r
+#CFLAGS += -Wunreachable-code\r
+#CFLAGS += -Wsign-compare\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CFLAGS += -Wundef\r
+#CPPFLAGS += -mshort-calls\r
+#CPPFLAGS += -fno-unit-at-a-time\r
+#CPPFLAGS += -Wstrict-prototypes\r
+#CPPFLAGS += -Wunreachable-code\r
+#CPPFLAGS += -Wsign-compare\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB = \r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB = \r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS = \r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax\r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += -Wl,--section-start=.text=$(BOOT_START)\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware: alf avr910 avrisp bascom bsd \r
+# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500\r
+#\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+#AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when \r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before: \r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build checkhooks checklibmode sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+checkhooks: build\r
+ @echo\r
+ @echo ------- Unhooked LUFA Events -------\r
+ @$(shell) (grep -s '^Event.*LUFA/.*\\.o' $(TARGET).map | \\r
+ cut -d' ' -f1 | cut -d'_' -f2- | grep ".*") || \\r
+ echo "(None)"\r
+ @echo ----- End Unhooked LUFA Events -----\r
+ \r
+checklibmode:\r
+ @echo\r
+ @echo ----------- Library Mode -----------\r
+ @$(shell) ($(CC) $(ALL_CFLAGS) -E -dM - < /dev/null \\r
+ | grep 'USB_\(DEVICE\|HOST\)_ONLY' | cut -d' ' -f2 | grep ".*") \\r
+ || echo "No specific mode (both device and host mode allowable)."\r
+ @echo ------------------------------------\r
+\r
+# Display compiler version information.\r
+gccversion : \r
+ @$(CC) --version\r
+\r
+\r
+\r
+# Program the device. \r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ copy $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set \r
+# a breakpoint at main().\r
+gdb-config: \r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -z -S $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
+ \r
+\r
+# Target: clean project.\r
+clean: begin clean_list clean_binary end\r
+\r
+clean_binary:\r
+ $(REMOVE) $(TARGET).hex\r
+\r
+clean_list:\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation...\r
+ @doxygen Doxygen.conf\r
+ @echo Documentation Generation Complete.\r
+ \r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all checkhooks checklibmode begin \\r
+finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff \\r
+clean clean_list clean_binary program debug \\r
+gdb-config doxygen\r
--- /dev/null
+<AVRStudio><MANAGEMENT><ProjectName>BootloaderDFU</ProjectName><Created>30-Sep-2008 14:20:47</Created><LastEdit>30-Sep-2008 14:21:00</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>30-Sep-2008 14:20:47</Created><Version>4</Version><Build>4, 14, 0, 589</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile></ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Users\Dean\Documents\Electronics\Projects\WORK\MyUSBWORK\Bootloaders\DFU\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM></COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>BootloaderDFU.c</SOURCEFILE><SOURCEFILE>Descriptors.c</SOURCEFILE><HEADERFILE>BootloaderDFU.h</HEADERFILE><HEADERFILE>Descriptors.h</HEADERFILE><OTHERFILE>makefile</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>YES</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE>makefile</EXTERNALMAKEFILE><PART>atmega128</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>BootloaderDFU.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20080512\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20080512\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Main source file for the DFU class bootloader. This file contains the complete bootloader logic.\r
+ */\r
+ \r
+/** Configuration define. Define this token to true to case the bootloader to reject all memory commands\r
+ * until a memory erase has been performed. When used in conjunction with the lockbits of the AVR, this\r
+ * can protect the AVR's firmware from being dumped from a secured AVR. When false, memory operations are\r
+ * allowed at any time.\r
+ */\r
+#define SECURE_MODE false\r
+\r
+#define INCLUDE_FROM_BOOTLOADER_C\r
+#include "BootloaderDFU.h"\r
+\r
+/** Flag to indicate if the bootloader is currently running in secure mode, disallowing memory operations\r
+ * other than erase. This is initially set to the value set by SECURE_MODE, and cleared by the bootloader\r
+ * once a memory erase has completed.\r
+ */\r
+bool IsSecure = SECURE_MODE;\r
+\r
+/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run\r
+ * via a soft reset. When cleared, the bootloader will abort, the USB interface will shut down and the application\r
+ * jumped to via an indirect jump to location 0x0000 (or other location specified by the host).\r
+ */\r
+bool RunBootloader = true;\r
+\r
+/** Flag to indicate if the bootloader is waiting to exit. When the host requests the bootloader to exit and\r
+ * jump to the application address it specifies, it sends two sequential commands which must be properly\r
+ * acknowedged. Upon reception of the first the RunBootloader flag is cleared and the WaitForExit flag is set,\r
+ * causing the bootloader to wait for the final exit command before shutting down.\r
+ */\r
+bool WaitForExit = false;\r
+\r
+/** Current DFU state machine state, one of the values in the DFU_State_t enum. */\r
+uint8_t DFU_State = dfuIDLE;\r
+\r
+/** Status code of the last executed DFU command. This is set to one of the values in the DFU_Status_t enum after\r
+ * each operation, and returned to the host when a Get Status DFU request is issued.\r
+ */\r
+uint8_t DFU_Status = OK;\r
+\r
+/** Data containing the DFU command sent from the host. */\r
+DFU_Command_t SentCommand;\r
+\r
+/** Response to the last issued Read Data DFU command. Unlike other DFU commands, the read command\r
+ * requires a single byte response from the bootloader containing the read data when the next DFU_UPLOAD command\r
+ * is issued by the host.\r
+ */\r
+uint8_t ResponseByte;\r
+\r
+/** Pointer to the start of the user application. By default this is 0x0000 (the reset vector), however the host\r
+ * may specify an alternate address when issuing the application soft-start command.\r
+ */\r
+AppPtr_t AppStartPtr = (AppPtr_t)0x0000;\r
+\r
+/** 64-bit flash page number. This is concatenated with the current 16-bit address on USB AVRs containing more than\r
+ * 64KB of flash memory.\r
+ */\r
+uint8_t Flash64KBPage = 0;\r
+\r
+/** Memory start address, indicating the current address in the memory being addressed (either FLASH or EEPROM\r
+ * depending on the issued command from the host).\r
+ */\r
+uint16_t StartAddr = 0x0000;\r
+\r
+/** Memory end address, indicating the end address to read to/write from in the memory being addressed (either FLASH\r
+ * of EEPROM depending on the issued command from the host).\r
+ */\r
+uint16_t EndAddr = 0x0000;\r
+\r
+/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously \r
+ * runs the bootloader processing routine until instructed to soft-exit, or hard-reset via the watchdog to start\r
+ * the loaded application code.\r
+ */\r
+int main (void)\r
+{\r
+ /* Disable watchdog if enabled by bootloader/fuses */\r
+ MCUSR &= ~(1 << WDRF);\r
+ wdt_disable();\r
+\r
+ /* Disable Clock Division */\r
+ SetSystemClockPrescaler(0);\r
+ \r
+ /* Relocate the interrupt vector table to the bootloader section */\r
+ MCUCR = (1 << IVCE);\r
+ MCUCR = (1 << IVSEL);\r
+\r
+ /* Initialize the USB subsystem */\r
+ USB_Init();\r
+\r
+ /* Run the USB management task while the bootloader is supposed to be running */\r
+ while (RunBootloader || WaitForExit)\r
+ USB_USBTask();\r
+ \r
+ /* Shut down the USB subsystem */\r
+ USB_ShutDown();\r
+ \r
+ /* Relocate the interrupt vector table back to the application section */\r
+ MCUCR = (1 << IVCE);\r
+ MCUCR = 0;\r
+\r
+ /* Reset any used hardware ports back to their defaults */\r
+ PORTD = 0;\r
+ DDRD = 0;\r
+ \r
+ #if defined(PORTE)\r
+ PORTE = 0;\r
+ DDRE = 0;\r
+ #endif\r
+ \r
+ /* Start the user application */\r
+ AppStartPtr();\r
+}\r
+\r
+/** Event handler for the USB_Disconnect event. This indicates that the bootloader should exit and the user\r
+ * application started.\r
+ */\r
+EVENT_HANDLER(USB_Disconnect)\r
+{\r
+ /* Upon disconnection, run user application */\r
+ RunBootloader = false;\r
+}\r
+\r
+/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific\r
+ * control requests that are not handled internally by the USB library (including the DFU commands, which are\r
+ * all issued via the control endpoint), so that they can be handled appropriately for the application.\r
+ */\r
+EVENT_HANDLER(USB_UnhandledControlPacket)\r
+{\r
+ /* Discard unused wIndex value */\r
+ Endpoint_Discard_Word();\r
+ \r
+ /* Discard unused wValue value */\r
+ Endpoint_Discard_Word();\r
+\r
+ /* Get the size of the command and data from the wLength value */\r
+ SentCommand.DataSize = Endpoint_Read_Word_LE();\r
+\r
+ switch (bRequest)\r
+ {\r
+ case DFU_DNLOAD:\r
+ Endpoint_ClearSetupReceived();\r
+ \r
+ /* Check if bootloader is waiting to terminate */\r
+ if (WaitForExit)\r
+ {\r
+ /* Bootloader is terminating - process last received command */\r
+ ProcessBootloaderCommand();\r
+ \r
+ /* Indicate that the last command has now been processed - free to exit bootloader */\r
+ WaitForExit = false;\r
+ }\r
+ \r
+ /* If the request has a data stage, load it into the command struct */\r
+ if (SentCommand.DataSize)\r
+ {\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+\r
+ /* First byte of the data stage is the DNLOAD request's command */\r
+ SentCommand.Command = Endpoint_Read_Byte();\r
+ \r
+ /* One byte of the data stage is the command, so subtract it from the total data bytes */\r
+ SentCommand.DataSize--;\r
+ \r
+ /* Load in the rest of the data stage as command parameters */\r
+ for (uint8_t DataByte = 0; (DataByte < sizeof(SentCommand.Data)) &&\r
+ Endpoint_BytesInEndpoint(); DataByte++)\r
+ {\r
+ SentCommand.Data[DataByte] = Endpoint_Read_Byte();\r
+ SentCommand.DataSize--;\r
+ }\r
+ \r
+ /* Process the command */\r
+ ProcessBootloaderCommand();\r
+ }\r
+ \r
+ /* Check if currently downloading firmware */\r
+ if (DFU_State == dfuDNLOAD_IDLE)\r
+ { \r
+ if (!(SentCommand.DataSize))\r
+ {\r
+ DFU_State = dfuIDLE;\r
+ }\r
+ else\r
+ {\r
+ /* Throw away the filler bytes before the start of the firmware */\r
+ DiscardFillerBytes(DFU_FILLER_BYTES_SIZE);\r
+\r
+ /* Throw away the page alignment filler bytes before the start of the firmware */\r
+ DiscardFillerBytes(StartAddr % SPM_PAGESIZE);\r
+ \r
+ /* Calculate the number of bytes remaining to be written */\r
+ uint16_t BytesRemaining = ((EndAddr - StartAddr) + 1);\r
+ \r
+ if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Write flash\r
+ {\r
+ /* Calculate the number of words to be written from the number of bytes to be written */\r
+ uint16_t WordsRemaining = (BytesRemaining >> 1);\r
+ \r
+ union\r
+ {\r
+ uint16_t Words[2];\r
+ uint32_t Long;\r
+ } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};\r
+ \r
+ uint32_t CurrFlashPageStartAddress = CurrFlashAddress.Long;\r
+ uint8_t WordsInFlashPage = 0;\r
+\r
+ while (WordsRemaining--)\r
+ {\r
+ /* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
+ if (!(Endpoint_BytesInEndpoint()))\r
+ {\r
+ Endpoint_ClearSetupOUT();\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ }\r
+\r
+ /* Write the next word into the current flash page */\r
+ boot_page_fill(CurrFlashAddress.Long, Endpoint_Read_Word_LE());\r
+\r
+ /* Adjust counters */\r
+ WordsInFlashPage += 1;\r
+ CurrFlashAddress.Long += 2;\r
+\r
+ /* See if an entire page has been written to the flash page buffer */\r
+ if ((WordsInFlashPage == (SPM_PAGESIZE >> 1)) || !(WordsRemaining))\r
+ {\r
+ /* Commit the flash page to memory */\r
+ boot_page_write(CurrFlashPageStartAddress);\r
+ boot_spm_busy_wait();\r
+ \r
+ /* Check if programming incomplete */\r
+ if (WordsRemaining)\r
+ {\r
+ CurrFlashPageStartAddress = CurrFlashAddress.Long;\r
+ WordsInFlashPage = 0;\r
+\r
+ /* Erase next page's temp buffer */\r
+ boot_page_erase(CurrFlashAddress.Long);\r
+ boot_spm_busy_wait();\r
+ }\r
+ }\r
+ }\r
+ \r
+ /* Once programming complete, start address equals the end address */\r
+ StartAddr = EndAddr;\r
+ \r
+ /* Re-enable the RWW section of flash */\r
+ boot_rww_enable();\r
+ }\r
+ else // Write EEPROM\r
+ {\r
+ while (BytesRemaining--)\r
+ {\r
+ /* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
+ if (!(Endpoint_BytesInEndpoint()))\r
+ {\r
+ Endpoint_ClearSetupOUT();\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ }\r
+\r
+ /* Read the byte from the USB interface and write to to the EEPROM */\r
+ eeprom_write_byte((uint8_t*)StartAddr, Endpoint_Read_Byte());\r
+ \r
+ /* Adjust counters */\r
+ StartAddr++;\r
+ }\r
+ }\r
+ \r
+ /* Throw away the currently unused DFU file suffix */\r
+ DiscardFillerBytes(DFU_FILE_SUFFIX_SIZE);\r
+ }\r
+ }\r
+\r
+ Endpoint_ClearSetupOUT();\r
+\r
+ /* Send ZLP to the host to acknowedge the request */\r
+ Endpoint_ClearSetupIN();\r
+ \r
+ break;\r
+ case DFU_UPLOAD:\r
+ Endpoint_ClearSetupReceived();\r
+\r
+ while (!(Endpoint_IsSetupINReady()));\r
+\r
+ if (DFU_State != dfuUPLOAD_IDLE)\r
+ {\r
+ if ((DFU_State == dfuERROR) && IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Blank Check\r
+ {\r
+ /* Blank checking is performed in the DFU_DNLOAD request - if we get here we've told the host\r
+ that the memory isn't blank, and the host is requesting the first non-blank address */\r
+ Endpoint_Write_Word_LE(StartAddr);\r
+ }\r
+ else\r
+ {\r
+ /* Idle state upload - send response to last issued command */\r
+ Endpoint_Write_Byte(ResponseByte);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ /* Determine the number of bytes remaining in the current block */\r
+ uint16_t BytesRemaining = ((EndAddr - StartAddr) + 1);\r
+\r
+ if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Read FLASH\r
+ {\r
+ /* Calculate the number of words to be written from the number of bytes to be written */\r
+ uint16_t WordsRemaining = (BytesRemaining >> 1);\r
+\r
+ union\r
+ {\r
+ uint16_t Words[2];\r
+ uint32_t Long;\r
+ } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};\r
+\r
+ while (WordsRemaining--)\r
+ {\r
+ /* Check if endpoint is full - if so clear it and wait until ready for next packet */\r
+ if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE)\r
+ {\r
+ Endpoint_ClearSetupIN();\r
+ while (!(Endpoint_IsSetupINReady()));\r
+ }\r
+\r
+ /* Read the flash word and send it via USB to the host */\r
+ #if defined(RAMPZ)\r
+ Endpoint_Write_Word_LE(pgm_read_word_far(CurrFlashAddress.Long));\r
+ #else\r
+ Endpoint_Write_Word_LE(pgm_read_word(CurrFlashAddress.Long)); \r
+ #endif\r
+\r
+ /* Adjust counters */\r
+ CurrFlashAddress.Long += 2;\r
+ }\r
+ \r
+ /* Once reading is complete, start address equals the end address */\r
+ StartAddr = EndAddr;\r
+ }\r
+ else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x02)) // Read EEPROM\r
+ {\r
+ while (BytesRemaining--)\r
+ {\r
+ /* Check if endpoint is full - if so clear it and wait until ready for next packet */\r
+ if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE)\r
+ {\r
+ Endpoint_ClearSetupIN();\r
+ while (!(Endpoint_IsSetupINReady()));\r
+ }\r
+\r
+ /* Read the EEPROM byte and send it via USB to the host */\r
+ Endpoint_Write_Byte(eeprom_read_byte((uint8_t*)StartAddr));\r
+\r
+ /* Adjust counters */\r
+ StartAddr++;\r
+ }\r
+ }\r
+\r
+ /* Return to idle state */\r
+ DFU_State = dfuIDLE;\r
+ }\r
+\r
+ Endpoint_ClearSetupIN();\r
+\r
+ /* Send ZLP to the host to acknowedge the request */\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ Endpoint_ClearSetupOUT();\r
+\r
+ break;\r
+ case DFU_GETSTATUS:\r
+ Endpoint_ClearSetupReceived();\r
+ \r
+ /* Write 8-bit status value */\r
+ Endpoint_Write_Byte(DFU_Status);\r
+ \r
+ /* Write 24-bit poll timeout value */\r
+ Endpoint_Write_Byte(0);\r
+ Endpoint_Write_Word_LE(0);\r
+ \r
+ /* Write 8-bit state value */\r
+ Endpoint_Write_Byte(DFU_State);\r
+\r
+ /* Write 8-bit state string ID number */\r
+ Endpoint_Write_Byte(0);\r
+\r
+ Endpoint_ClearSetupIN();\r
+ \r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ Endpoint_ClearSetupOUT();\r
+ \r
+ break; \r
+ case DFU_CLRSTATUS:\r
+ Endpoint_ClearSetupReceived();\r
+ \r
+ /* Reset the status value variable to the default OK status */\r
+ DFU_Status = OK;\r
+ \r
+ Endpoint_ClearSetupIN();\r
+\r
+ break;\r
+ case DFU_GETSTATE:\r
+ Endpoint_ClearSetupReceived();\r
+ \r
+ /* Write the current device state to the endpoint */\r
+ Endpoint_Write_Byte(DFU_State);\r
+ \r
+ Endpoint_ClearSetupIN();\r
+ \r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ Endpoint_ClearSetupOUT();\r
+\r
+ break;\r
+ case DFU_ABORT:\r
+ Endpoint_ClearSetupReceived();\r
+ \r
+ /* Reset the current state variable to the default idle state */\r
+ DFU_State = dfuIDLE;\r
+ \r
+ Endpoint_ClearSetupIN();\r
+\r
+ break;\r
+ }\r
+}\r
+\r
+/** Routine to discard the specified number of bytes from the control endpoint stream. This is used to\r
+ * discard unused bytes in the stream from the host, including the memory program block suffix.\r
+ *\r
+ * \param NumberOfBytes Number of bytes to discard from the host from the control endpoint\r
+ */\r
+static void DiscardFillerBytes(uint8_t NumberOfBytes)\r
+{\r
+ while (NumberOfBytes--)\r
+ {\r
+ if (!(Endpoint_BytesInEndpoint()))\r
+ {\r
+ Endpoint_ClearSetupOUT();\r
+\r
+ /* Wait until next data packet received */\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ }\r
+\r
+ Endpoint_Discard_Byte(); \r
+ }\r
+}\r
+\r
+/** Routine to process an issued command from the host, via a DFU_DNLOAD request wrapper. This routine ensures\r
+ * that the command is allowed based on the current secure mode flag value, and passes the command off to the\r
+ * appropriate handler function.\r
+ */\r
+static void ProcessBootloaderCommand(void)\r
+{\r
+ /* Check if device is in secure mode */\r
+ if (IsSecure)\r
+ {\r
+ /* Don't process command unless it is a READ or chip erase command */\r
+ if (!(((SentCommand.Command == COMMAND_WRITE) &&\r
+ IS_TWOBYTE_COMMAND(SentCommand.Data, 0x00, 0xFF)) ||\r
+ (SentCommand.Command == COMMAND_READ)))\r
+ {\r
+ /* Set the state and status variables to indicate the error */\r
+ DFU_State = dfuERROR;\r
+ DFU_Status = errWRITE;\r
+ \r
+ /* Stall command */\r
+ Endpoint_StallTransaction();\r
+ \r
+ /* Don't process the command */\r
+ return;\r
+ }\r
+ }\r
+\r
+ /* Dispatch the required command processing routine based on the command type */\r
+ switch (SentCommand.Command)\r
+ {\r
+ case COMMAND_PROG_START:\r
+ ProcessMemProgCommand();\r
+ break;\r
+ case COMMAND_DISP_DATA:\r
+ ProcessMemReadCommand();\r
+ break;\r
+ case COMMAND_WRITE:\r
+ ProcessWriteCommand();\r
+ break;\r
+ case COMMAND_READ:\r
+ ProcessReadCommand();\r
+ break;\r
+ case COMMAND_CHANGE_BASE_ADDR:\r
+ if (IS_TWOBYTE_COMMAND(SentCommand.Data, 0x03, 0x00)) // Set 64KB flash page command\r
+ Flash64KBPage = SentCommand.Data[2];\r
+\r
+ break;\r
+ }\r
+}\r
+\r
+/** Routine to concatenate the given pair of 16-bit memory start and end addresses from the host, and store them\r
+ * in the StartAddr and EndAddr global variables.\r
+ */\r
+static void LoadStartEndAddresses(void)\r
+{\r
+ union\r
+ {\r
+ uint8_t Bytes[2];\r
+ uint16_t Word;\r
+ } Address[2] = {{Bytes: {SentCommand.Data[2], SentCommand.Data[1]}},\r
+ {Bytes: {SentCommand.Data[4], SentCommand.Data[3]}}};\r
+ \r
+ /* Load in the start and ending read addresses from the sent data packet */\r
+ StartAddr = Address[0].Word;\r
+ EndAddr = Address[1].Word;\r
+}\r
+\r
+/** Handler for a Memory Program command issued by the host. This routine handles the preperations needed\r
+ * to write subsequent data from the host into the specified memory.\r
+ */\r
+static void ProcessMemProgCommand(void)\r
+{\r
+ if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00) || // Write FLASH command\r
+ IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Write EEPROM command\r
+ {\r
+ /* Load in the start and ending read addresses */\r
+ LoadStartEndAddresses();\r
+ \r
+ /* If FLASH is being written to, we need to pre-erase the first page to write to */\r
+ if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00))\r
+ {\r
+ union\r
+ {\r
+ uint16_t Words[2];\r
+ uint32_t Long;\r
+ } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};\r
+ \r
+ /* Erase the current page's temp buffer */\r
+ boot_page_erase(CurrFlashAddress.Long);\r
+ boot_spm_busy_wait();\r
+ }\r
+ \r
+ /* Set the state so that the next DNLOAD requests reads in the firmware */\r
+ DFU_State = dfuDNLOAD_IDLE;\r
+ }\r
+}\r
+\r
+/** Handler for a Memory Read command issued by the host. This routine handles the preperations needed\r
+ * to read subsequent data from the specified memory out to the host, as well as implementing the memory\r
+ * blank check command.\r
+ */\r
+static void ProcessMemReadCommand(void)\r
+{\r
+ if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00) || // Read FLASH command\r
+ IS_ONEBYTE_COMMAND(SentCommand.Data, 0x02)) // Read EEPROM command\r
+ {\r
+ /* Load in the start and ending read addresses */\r
+ LoadStartEndAddresses();\r
+\r
+ /* Set the state so that the next UPLOAD requests read out the firmware */\r
+ DFU_State = dfuUPLOAD_IDLE;\r
+ }\r
+ else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Blank check FLASH command\r
+ {\r
+ uint32_t CurrFlashAddress = 0;\r
+\r
+ while (CurrFlashAddress < BOOT_START_ADDR)\r
+ {\r
+ /* Check if the current byte is not blank */\r
+ #if defined(RAMPZ)\r
+ if (pgm_read_byte_far(CurrFlashAddress) != 0xFF)\r
+ #else\r
+ if (pgm_read_byte(CurrFlashAddress) != 0xFF)\r
+ #endif\r
+ {\r
+ /* Save the location of the first non-blank byte for response back to the host */\r
+ Flash64KBPage = (CurrFlashAddress >> 16);\r
+ StartAddr = CurrFlashAddress;\r
+ \r
+ /* Set state and status variables to the appropriate error values */\r
+ DFU_State = dfuERROR;\r
+ DFU_Status = errCHECK_ERASED;\r
+\r
+ break;\r
+ }\r
+\r
+ CurrFlashAddress++;\r
+ }\r
+ }\r
+}\r
+\r
+/** Handler for a Data Write command issued by the host. This routine handles non-programming commands such as\r
+ * bootloader exit (both via software jumps and hardware watchdog resets) and flash memory erasure.\r
+ */\r
+static void ProcessWriteCommand(void)\r
+{\r
+ if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x03)) // Start application\r
+ {\r
+ /* Indicate that the bootloader is terminating */\r
+ WaitForExit = true;\r
+\r
+ /* Check if empty request data array - an empty request after a filled request retains the\r
+ previous valid request data, but initializes the reset */\r
+ if (!(SentCommand.DataSize))\r
+ {\r
+ if (SentCommand.Data[1] == 0x00) // Start via watchdog\r
+ {\r
+ /* Start the watchdog to reset the AVR once the communications are finalized */\r
+ wdt_enable(WDTO_250MS);\r
+ }\r
+ else // Start via jump\r
+ {\r
+ /* Load in the jump address into the application start address pointer */\r
+ union\r
+ {\r
+ uint8_t Bytes[2];\r
+ AppPtr_t FuncPtr;\r
+ } Address = {Bytes: {SentCommand.Data[4], SentCommand.Data[3]}};\r
+\r
+ AppStartPtr = Address.FuncPtr;\r
+ \r
+ /* Set the flag to terminate the bootloader at next opportunity */\r
+ RunBootloader = false;\r
+ }\r
+ }\r
+ }\r
+ else if (IS_TWOBYTE_COMMAND(SentCommand.Data, 0x00, 0xFF)) // Erase flash\r
+ {\r
+ uint32_t CurrFlashAddress = 0;\r
+\r
+ /* Clear the application section of flash */\r
+ while (CurrFlashAddress < BOOT_START_ADDR)\r
+ {\r
+ boot_page_erase(CurrFlashAddress);\r
+ boot_spm_busy_wait();\r
+ boot_page_write(CurrFlashAddress);\r
+ boot_spm_busy_wait();\r
+\r
+ CurrFlashAddress += SPM_PAGESIZE;\r
+ }\r
+\r
+ /* Re-enable the RWW section of flash as writing to the flash locks it out */\r
+ boot_rww_enable();\r
+ \r
+ /* Memory has been erased, reset the security bit so that programming/reading is allowed */\r
+ IsSecure = false;\r
+ }\r
+}\r
+\r
+/** Handler for a Data Read command issued by the host. This routine handles bootloader information retrieval\r
+ * commands such as device signature and bootloader version retrieval.\r
+ */\r
+static void ProcessReadCommand(void)\r
+{\r
+ const uint8_t BootloaderInfo[3] = {BOOTLOADER_VERSION, BOOTLOADER_ID_BYTE1, BOOTLOADER_ID_BYTE2};\r
+ const uint8_t SignatureInfo[3] = {SIGNATURE_BYTE_1, SIGNATURE_BYTE_2, SIGNATURE_BYTE_3};\r
+\r
+ uint8_t DataIndexToRead = SentCommand.Data[1];\r
+\r
+ if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Read bootloader info\r
+ {\r
+ ResponseByte = BootloaderInfo[DataIndexToRead];\r
+ }\r
+ else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Read signature byte\r
+ {\r
+ ResponseByte = SignatureInfo[DataIndexToRead - 0x30];\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Header file for BootloaderDFU.c.\r
+ */\r
+\r
+#ifndef _BOOTLOADER_H_\r
+#define _BOOTLOADER_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <avr/wdt.h>\r
+ #include <avr/boot.h>\r
+ #include <avr/eeprom.h>\r
+ #include <stdbool.h>\r
+ \r
+ #include "Descriptors.h"\r
+ \r
+ #include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
+ \r
+ /* Macros: */\r
+ /** Major bootloader version number. */\r
+ #define BOOTLOADER_VERSION_MINOR 2\r
+\r
+ /** Minor bootloader version number. */\r
+ #define BOOTLOADER_VERSION_REV 0\r
+\r
+ /** Complete bootloder version number expressed as a packed byte, constructed from the \r
+ * two individual bootloader version macros.\r
+ */\r
+ #define BOOTLOADER_VERSION ((BOOTLOADER_VERSION_MINOR << 4) | BOOTLOADER_VERSION_REV)\r
+\r
+ /** First byte of the bootloader identification bytes, used to identify a device's bootloader. */\r
+ #define BOOTLOADER_ID_BYTE1 0xDC\r
+\r
+ /** Second byte of the bootloader identification bytes, used to identify a device's bootloader. */\r
+ #define BOOTLOADER_ID_BYTE2 0xFB\r
+ \r
+ /** Convenience macro, used to determine if the issued command is the given one-byte long command.\r
+ *\r
+ * \param dataarr Command byte array to check against\r
+ * \param cb1 First command byte to check\r
+ */\r
+ #define IS_ONEBYTE_COMMAND(dataarr, cb1) (dataarr[0] == cb1)\r
+\r
+ /** Convenience macro, used to determine if the issued command is the given two-byte long command.\r
+ *\r
+ * \param dataarr Command byte array to check against\r
+ * \param cb1 First command byte to check\r
+ * \param cb2 Second command byte to check\r
+ */\r
+ #define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == cb1) && (dataarr[1] == cb2))\r
+ \r
+ /** Length of the DFU file suffix block, appended to the end of each complete memory write command.\r
+ * The DFU file suffix is currently unused (but is designed to give extra file information, such as\r
+ * a CRC of the complete firmware for error checking) and so is discarded.\r
+ */\r
+ #define DFU_FILE_SUFFIX_SIZE 16\r
+\r
+ /** Length of the DFU file filler block, appended to the start of each complete memory write command.\r
+ * Filler bytes are added to the start of each complete memory write command, and must be discarded.\r
+ */\r
+ #define DFU_FILLER_BYTES_SIZE 26\r
+ \r
+ /** DFU class command request to detatch from the host. */\r
+ #define DFU_DETATCH 0x00\r
+\r
+ /** DFU class command request to send data from the host to the bootloader. */\r
+ #define DFU_DNLOAD 0x01\r
+\r
+ /** DFU class command request to send data from the bootloader to the host. */\r
+ #define DFU_UPLOAD 0x02\r
+\r
+ /** DFU class command request to get the current DFU status and state from the bootloader. */\r
+ #define DFU_GETSTATUS 0x03\r
+\r
+ /** DFU class command request to reset the current DFU status and state variables to their defaults. */\r
+ #define DFU_CLRSTATUS 0x04\r
+\r
+ /** DFU class command request to get the current DFU state of the bootloader. */\r
+ #define DFU_GETSTATE 0x05\r
+\r
+ /** DFU class command request to abort the current multi-request transfer and return to the dfuIDLE state. */\r
+ #define DFU_ABORT 0x06\r
+\r
+ /** DFU command to begin programming the device's memory. */\r
+ #define COMMAND_PROG_START 0x01\r
+\r
+ /** DFU command to begin reading the device's memory. */\r
+ #define COMMAND_DISP_DATA 0x03\r
+\r
+ /** DFU command to issue a write command. */\r
+ #define COMMAND_WRITE 0x04\r
+\r
+ /** DFU command to issue a read command. */\r
+ #define COMMAND_READ 0x05\r
+\r
+ /** DFU command to issue a memory base address change command, to set the current 64KB flash page\r
+ * that subsequent flash operations should use. */\r
+ #define COMMAND_CHANGE_BASE_ADDR 0x06\r
+\r
+ /* Type Defines: */\r
+ /** Type define for a non-returning function pointer to the loaded application. */\r
+ typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;\r
+ \r
+ /** Type define for a strucuture containing a complete DFU command issued by the host. */\r
+ typedef struct\r
+ {\r
+ uint8_t Command; /**< Single byte command to perform, one of the COMMAND_* macro values */\r
+ uint8_t Data[5]; /**< Command parameters */\r
+ uint16_t DataSize; /**< Size of the command parameters */\r
+ } DFU_Command_t;\r
+\r
+ /* Enums: */\r
+ /** DFU bootloader states. Refer to the DFU class specification for information on each state. */\r
+ enum DFU_State_t\r
+ {\r
+ appIDLE = 0,\r
+ appDETACH = 1,\r
+ dfuIDLE = 2,\r
+ dfuDNLOAD_SYNC = 3,\r
+ dfuDNBUSY = 4,\r
+ dfuDNLOAD_IDLE = 5,\r
+ dfuMANIFEST_SYNC = 6,\r
+ dfuMANIFEST = 7,\r
+ dfuMANIFEST_WAIT_RESET = 8,\r
+ dfuUPLOAD_IDLE = 9,\r
+ dfuERROR = 10\r
+ };\r
+\r
+ /** DFU command status error codes. Refer to the DFU class specification for information on each error code. */\r
+ enum DFU_Status_t\r
+ {\r
+ OK = 0,\r
+ errTARGET = 1,\r
+ errFILE = 2,\r
+ errWRITE = 3,\r
+ errERASE = 4,\r
+ errCHECK_ERASED = 5,\r
+ errPROG = 6,\r
+ errVERIFY = 7,\r
+ errADDRESS = 8,\r
+ errNOTDONE = 9,\r
+ errFIRMWARE = 10,\r
+ errVENDOR = 11,\r
+ errUSBR = 12,\r
+ errPOR = 13,\r
+ errUNKNOWN = 14,\r
+ errSTALLEDPKT = 15\r
+ };\r
+ \r
+ /* Event Handlers: */\r
+ /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */\r
+ HANDLES_EVENT(USB_Disconnect);\r
+\r
+ /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */\r
+ HANDLES_EVENT(USB_UnhandledControlPacket);\r
+ \r
+ /* Function Prototypes: */\r
+ #if defined(INCLUDE_FROM_BOOTLOADER_C)\r
+ static void DiscardFillerBytes(uint8_t NumberOfBytes);\r
+ static void ProcessBootloaderCommand(void);\r
+ static void LoadStartEndAddresses(void);\r
+ static void ProcessMemProgCommand(void);\r
+ static void ProcessMemReadCommand(void);\r
+ static void ProcessWriteCommand(void);\r
+ static void ProcessReadCommand(void);\r
+ #endif\r
+ \r
+#endif\r
--- /dev/null
+/** \file\r
+ *\r
+ * This file contains special DoxyGen information for the generation of the main page and other special\r
+ * documentation pages. It is not a project source file.\r
+ */\r
+ \r
+/** \mainpage DFU Class USB AVR Bootloader\r
+ * \r
+ * This bootloader enumerates to the host as a DFU Class device, allowing for DFU-compatible programming\r
+ * software to load firmware onto the AVR.\r
+ * \r
+ * This bootloader is compatible with Atmel's FLIP application. However, it requires the use of Atmel's\r
+ * DFU drivers. You will need to install Atmel's DFU drivers prior to using this bootloader.\r
+ * \r
+ * As an open-source option, this bootloader is also compatible with the Linux Atmel USB DFU Programmer\r
+ * software, available for download at http://sourceforge.net/projects/dfu-programmer/.\r
+ * \r
+ * If SECURE_MODE is defined as true, upon startup the bootloader will be locked, with only the chip erase\r
+ * function available (similar to Atmel's DFU bootloader). If SECURE_MODE is defined as false, all functions \r
+ * are usable on startup without the prerequisite firmware erase.\r
+ * \r
+ * Out of the box this bootloader builds for the USB1287, and should fit into 4KB of bootloader space. If\r
+ * you wish to enlarge this space and/or change the AVR model, you will need to edit the BOOT_START and MCU\r
+ * values in the accompanying makefile.\r
+ * \r
+ * <b>NOTE:</b> This device spoofs Atmel's DFU Bootloader USB VID and PID so that the Atmel DFU bootloader\r
+ * drivers included with FLIP will work. If you do not wish to use Atmel's ID codes, please\r
+ * manually change them in Descriptors.c and alter your driver's INF file accordingly.\r
+ *\r
+ * <table>\r
+ * <tr>\r
+ * <td><b>USB Mode:</b></td>\r
+ * <td>Device</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>USB Class:</b></td>\r
+ * <td>Device Firmware Update Class (DFU)</td>\r
+ * </tr>\r
+ * <tr> \r
+ * <td><b>USB Subclass:</b></td>\r
+ * <td>None</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Relevant Standards:</b></td>\r
+ * <td>USBIF DFU Class Standard, Atmel USB Bootloader Datasheet</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Usable Speeds:</b></td>\r
+ * <td>Full Speed Mode</td>\r
+ * </tr>\r
+ * </table>\r
+ */\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * USB Device Descriptors, for library use when in USB device mode. Descriptors are special \r
+ * computer-readable structures which the host requests upon device enumeration, to determine\r
+ * the device's capabilities and functions. \r
+ */\r
+\r
+#include "Descriptors.h"\r
+\r
+/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
+ * device characteristics, including the supported USB version, control endpoint size and the\r
+ * number of device configurations. The descriptor is read out by the USB host when the enumeration\r
+ * process begins.\r
+ */\r
+USB_Descriptor_Device_t DeviceDescriptor =\r
+{\r
+ Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ \r
+ USBSpecification: VERSION_BCD(01.10),\r
+ Class: 0x00,\r
+ SubClass: 0x00,\r
+ Protocol: 0x00,\r
+ \r
+ Endpoint0Size: FIXED_CONTROL_ENDPOINT_SIZE,\r
+ \r
+ VendorID: 0x03EB,\r
+ ProductID: PRODUCT_ID_CODE,\r
+ ReleaseNumber: 0x0000,\r
+ \r
+ ManufacturerStrIndex: NO_DESCRIPTOR,\r
+ ProductStrIndex: 0x01,\r
+ SerialNumStrIndex: NO_DESCRIPTOR,\r
+ \r
+ NumberOfConfigurations: 1\r
+};\r
+\r
+/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
+ * of the device in one of its supported configurations, including information about any device interfaces\r
+ * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting\r
+ * a configuration so that the host may correctly communicate with the USB device.\r
+ */\r
+USB_Descriptor_Configuration_t ConfigurationDescriptor =\r
+{\r
+ Config:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+\r
+ TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
+ TotalInterfaces: 1,\r
+\r
+ ConfigurationNumber: 1,\r
+ ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ \r
+ ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ \r
+ MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ },\r
+ \r
+ DFUInterface:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+\r
+ InterfaceNumber: 0,\r
+ AlternateSetting: 0,\r
+ \r
+ TotalEndpoints: 0,\r
+ \r
+ Class: 0xFE,\r
+ SubClass: 0x01,\r
+ Protocol: 0x02,\r
+\r
+ InterfaceStrIndex: NO_DESCRIPTOR\r
+ },\r
+ \r
+ DFUFunctional:\r
+ {\r
+ Header: {Size: sizeof(USB_DFU_Functional_Descriptor_t), Type: DTYPE_DFUFunctional},\r
+ \r
+ Attributes: (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD),\r
+\r
+ DetatchTimeout: 0x0000,\r
+ TransferSize: 0x0c00,\r
+ \r
+ DFUSpecification: VERSION_BCD(01.01)\r
+ }\r
+};\r
+\r
+/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests\r
+ * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate\r
+ * via the language ID table available at USB.org what languages the device supports for its string descriptors.\r
+ */ \r
+USB_Descriptor_String_t LanguageString =\r
+{\r
+ Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ \r
+ UnicodeString: {LANGUAGE_ID_ENG}\r
+};\r
+\r
+/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
+ * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device\r
+ * Descriptor.\r
+ */\r
+USB_Descriptor_String_t ProductString =\r
+{\r
+ Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},\r
+ \r
+ UnicodeString: L"AVR DFU Bootloader"\r
+};\r
+\r
+/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
+ * documentation) by the application code so that the address and size of a requested descriptor can be given\r
+ * to the USB library. When the device recieves a Get Descriptor request on the control endpoint, this function\r
+ * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the\r
+ * USB host.\r
+ */\r
+uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+{\r
+ const uint8_t DescriptorType = (wValue >> 8);\r
+ const uint8_t DescriptorNumber = (wValue & 0xFF);\r
+\r
+ void* Address = NULL;\r
+ uint16_t Size = NO_DESCRIPTOR;\r
+\r
+ switch (DescriptorType)\r
+ {\r
+ case DTYPE_Device:\r
+ Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
+ Size = sizeof(USB_Descriptor_Device_t);\r
+ break;\r
+ case DTYPE_Configuration:\r
+ Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
+ Size = sizeof(USB_Descriptor_Configuration_t);\r
+ break;\r
+ case DTYPE_String:\r
+ if (!(DescriptorNumber))\r
+ {\r
+ Address = DESCRIPTOR_ADDRESS(LanguageString);\r
+ Size = LanguageString.Header.Size;\r
+ }\r
+ else\r
+ {\r
+ Address = DESCRIPTOR_ADDRESS(ProductString);\r
+ Size = ProductString.Header.Size;\r
+ }\r
+ \r
+ break;\r
+ }\r
+ \r
+ *DescriptorAddress = Address;\r
+ return Size;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Header file for Descriptors.c.\r
+ */\r
+\r
+#ifndef _DESCRIPTORS_H_\r
+#define _DESCRIPTORS_H_\r
+\r
+ /* Includes: */\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+\r
+ /* Macros: */\r
+ /** Descriptor type value for a DFU class functional descriptor. */\r
+ #define DTYPE_DFUFunctional 0x21\r
+ \r
+ /** DFU attribute mask, indicating that the DFU device will detach and re-attach when a DFU_DETACH\r
+ * command is issued, rather than the host issing a USB Reset.\r
+ */\r
+ #define ATTR_WILL_DETATCH (1 << 3)\r
+\r
+ /** DFU attribute mask, indicating that the DFU device can communicate during the manefestation phase\r
+ * (memory programming phase).\r
+ */\r
+ #define ATTR_MANEFESTATION_TOLLERANT (1 << 2)\r
+ \r
+ /** DFU attribute mask, indicating that the DFU device can accept DFU_UPLOAD requests to send data from\r
+ * the device to the host.\r
+ */ \r
+ #define ATTR_CAN_UPLOAD (1 << 1)\r
+\r
+ /** DFU attribute mask, indicating that the DFU device can accept DFU_DNLOAD requests to send data from\r
+ * the host to the device.\r
+ */ \r
+ #define ATTR_CAN_DOWNLOAD (1 << 0)\r
+\r
+ #if defined(__AVR_AT90USB1286__)\r
+ #define PRODUCT_ID_CODE 0x2FFB\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x97\r
+ #define SIGNATURE_BYTE_3 0x82\r
+ #elif defined(__AVR_AT90USB1287__)\r
+ #define PRODUCT_ID_CODE 0x2FFB\r
+ \r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x97\r
+ #define SIGNATURE_BYTE_3 0x82\r
+ #elif defined(__AVR_AT90USB646__)\r
+ #define PRODUCT_ID_CODE 0x2FF9\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x96\r
+ #define SIGNATURE_BYTE_3 0x82\r
+ #elif defined(__AVR_AT90USB647__)\r
+ #define PRODUCT_ID_CODE 0x2FF9\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x96\r
+ #define SIGNATURE_BYTE_3 0x82\r
+ #elif defined(__AVR_AT90USB162__)\r
+ #define PRODUCT_ID_CODE 0x2FFA\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x94\r
+ #define SIGNATURE_BYTE_3 0x82\r
+ #elif defined(__AVR_AT90USB82__)\r
+ #define PRODUCT_ID_CODE 0x2FF7\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x94\r
+ #define SIGNATURE_BYTE_3 0x82\r
+ #elif defined(__AVR_ATmega32U6__)\r
+ #define PRODUCT_ID_CODE 0x2FFB\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x95\r
+ #define SIGNATURE_BYTE_3 0x88\r
+ #elif defined(__AVR_ATmega32U4__)\r
+ #define PRODUCT_ID_CODE 0x2FF4\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x95\r
+ #define SIGNATURE_BYTE_3 0x87 \r
+ #elif defined(__AVR_ATmega16U4__)\r
+ #define PRODUCT_ID_CODE 0x2FF3\r
+\r
+ #define SIGNATURE_BYTE_1 0x1E\r
+ #define SIGNATURE_BYTE_2 0x94\r
+ #define SIGNATURE_BYTE_3 0x88\r
+ #else\r
+ #error The selected AVR part is not currently supported by this bootloader.\r
+ #endif\r
+ \r
+ #if !defined(PRODUCT_ID_CODE)\r
+ #error Current AVR model is not supported by this bootloader.\r
+ #endif\r
+ \r
+ /* Type Defines: */\r
+ /** Type define for a DFU class function descriptor. This descriptor gives DFU class information\r
+ * to the host when read, indicating the DFU device's capabilities.\r
+ */\r
+ typedef struct\r
+ {\r
+ USB_Descriptor_Header_t Header; /**< Standard descriptor header structure */\r
+ \r
+ uint8_t Attributes; /**< DFU device attributes, a mask comprising of the\r
+ * ATTR_* macros listed in this source file\r
+ */\r
+ uint16_t DetatchTimeout; /**< Timeout in milliseconds between a USB_DETACH\r
+ * command being issued and the device detaching\r
+ * from the USB bus\r
+ */ \r
+ uint16_t TransferSize; /**< Maximum number of bytes the DFU device can accept\r
+ * from the host in a transaction\r
+ */ \r
+ uint16_t DFUSpecification; /**< BCD packed DFU specification number this DFU\r
+ * device complies with\r
+ */\r
+ } USB_DFU_Functional_Descriptor_t;\r
+ \r
+ /** Type define for the device configuration descriptor structure. This must be defined in the\r
+ * application code, as the configuration descriptor contains several sub-descriptors which\r
+ * vary between devices, and which describe the device's usage to the host.\r
+ */\r
+ typedef struct\r
+ {\r
+ USB_Descriptor_Configuration_Header_t Config;\r
+ USB_Descriptor_Interface_t DFUInterface;\r
+ USB_DFU_Functional_Descriptor_t DFUFunctional;\r
+ } USB_Descriptor_Configuration_t;\r
+ \r
+ /* Function Prototypes: */\r
+ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+ ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
+\r
+#endif\r
--- /dev/null
+# Doxyfile 1.5.7.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 a sequence of words surrounded \r
+# by quotes) that should identify the project.\r
+\r
+PROJECT_NAME = "LUFA Library - DFU 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 = 0.0.0\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 = YES\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, Farsi, Finnish, French, German, Greek, \r
+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), \r
+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, \r
+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, \r
+# Spanish, Swedish, and Ukrainian.\r
+\r
+OUTPUT_LANGUAGE = English\r
+\r
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \r
+# include brief member descriptions after the members that are listed in \r
+# the file and class documentation (similar to JavaDoc). \r
+# Set to NO to disable this.\r
+\r
+BRIEF_MEMBER_DESC = YES\r
+\r
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \r
+# the brief description of a member or function before the detailed description. \r
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \r
+# brief descriptions will be completely suppressed.\r
+\r
+REPEAT_BRIEF = YES\r
+\r
+# This tag implements a quasi-intelligent brief description abbreviator \r
+# that is used to form the text in various listings. Each string \r
+# in this list, if found as the leading text of the brief description, will be \r
+# stripped from the text and the result after processing the whole list, is \r
+# used as the annotated text. Otherwise, the brief description is used as-is. \r
+# If left blank, the following values are used ("$name" is automatically \r
+# replaced with the name of the entity): "The $name class" "The $name widget" \r
+# "The $name file" "is" "provides" "specifies" "contains" \r
+# "represents" "a" "an" "the"\r
+\r
+ABBREVIATE_BRIEF = "The $name class" \\r
+ "The $name widget" \\r
+ "The $name file" \\r
+ is \\r
+ provides \\r
+ specifies \\r
+ contains \\r
+ represents \\r
+ a \\r
+ an \\r
+ the\r
+\r
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \r
+# Doxygen will generate a detailed section even if there is only a brief \r
+# description.\r
+\r
+ALWAYS_DETAILED_SEC = NO\r
+\r
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all \r
+# inherited members of a class in the documentation of that class as if those \r
+# members were ordinary class members. Constructors, destructors and assignment \r
+# operators of the base classes will not be shown.\r
+\r
+INLINE_INHERITED_MEMB = NO\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \r
+# path before files name in the file list and in the header files. If set \r
+# to NO the shortest path that makes the file name unique will be used.\r
+\r
+FULL_PATH_NAMES = YES\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \r
+# can be used to strip a user-defined part of the path. Stripping is \r
+# only done if one of the specified strings matches the left-hand part of \r
+# the path. The tag can be used to show relative paths in the file list. \r
+# If left blank the directory from which doxygen is run is used as the \r
+# path to strip.\r
+\r
+STRIP_FROM_PATH = \r
+\r
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of \r
+# the path mentioned in the documentation of a class, which tells \r
+# the reader which header file to include in order to use a class. \r
+# If left blank only the name of the header file containing the class \r
+# definition is used. Otherwise one should specify the include paths that \r
+# are normally passed to the compiler using the -I flag.\r
+\r
+STRIP_FROM_INC_PATH = \r
+\r
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter \r
+# (but less readable) file names. This can be useful is your file systems \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
+# 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
+# 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 make the inheritance and collaboration \r
+# diagrams that involve STL classes more complete and accurate.\r
+\r
+BUILTIN_STL_SUPPORT = NO\r
+\r
+# If you use Microsoft's C++/CLI language, you should set this option to YES to\r
+# enable parsing support.\r
+\r
+CPP_CLI_SUPPORT = NO\r
+\r
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. \r
+# Doxygen will parse them like normal C++ but will assume all classes use public \r
+# instead of private inheritance when no explicit protection keyword is present.\r
+\r
+SIP_SUPPORT = NO\r
+\r
+# For Microsoft's IDL there are propget and propput attributes to indicate getter \r
+# and setter methods for a property. Setting this option to YES (the default) \r
+# will make doxygen to replace the get and set methods by a property in the \r
+# documentation. This will only work if the methods are indeed getting or \r
+# setting a simple type. If this is not the case, or you want to show the \r
+# methods anyway, you should set this option to NO.\r
+\r
+IDL_PROPERTY_SUPPORT = YES\r
+\r
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \r
+# tag is set to YES, then doxygen will reuse the documentation of the first \r
+# member in the group (if any) for the other members of the group. By default \r
+# all members of a group must be documented explicitly.\r
+\r
+DISTRIBUTE_GROUP_DOC = NO\r
+\r
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of \r
+# the same type (for instance a group of public functions) to be put as a \r
+# subgroup of that type (e.g. under the Public Functions section). Set it to \r
+# NO to prevent subgrouping. Alternatively, this can be done per class using \r
+# the \nosubgrouping command.\r
+\r
+SUBGROUPING = YES\r
+\r
+# When 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 penality. \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 rougly 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
+#---------------------------------------------------------------------------\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_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 namespace 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 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_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
+# The GENERATE_TODOLIST tag can be used to enable (YES) or \r
+# disable (NO) the todo list. This list is created by putting \todo \r
+# commands in the documentation.\r
+\r
+GENERATE_TODOLIST = NO\r
+\r
+# The GENERATE_TESTLIST tag can be used to enable (YES) or \r
+# disable (NO) the test list. This list is created by putting \test \r
+# commands in the documentation.\r
+\r
+GENERATE_TESTLIST = NO\r
+\r
+# The GENERATE_BUGLIST tag can be used to enable (YES) or \r
+# disable (NO) the bug list. This list is created by putting \bug \r
+# commands in the documentation.\r
+\r
+GENERATE_BUGLIST = NO\r
+\r
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or \r
+# disable (NO) the deprecated list. This list is created by putting \r
+# \deprecated commands in the documentation.\r
+\r
+GENERATE_DEPRECATEDLIST= YES\r
+\r
+# The ENABLED_SECTIONS tag can be used to enable conditional \r
+# documentation sections, marked by \if sectionname ... \endif.\r
+\r
+ENABLED_SECTIONS = \r
+\r
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines \r
+# the initial value of a variable or define 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 defines in the \r
+# documentation can be controlled using \showinitializer or \hideinitializer \r
+# command in the documentation regardless of this setting.\r
+\r
+MAX_INITIALIZER_LINES = 30\r
+\r
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated \r
+# at the bottom of the documentation of classes and structs. If set to YES the \r
+# list will mention the files that were used to generate the documentation.\r
+\r
+SHOW_USED_FILES = YES\r
+\r
+# If the sources in your project are distributed over multiple directories \r
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy \r
+# in the documentation. The default is NO.\r
+\r
+SHOW_DIRECTORIES = YES\r
+\r
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.\r
+# This will remove the Files entry from the Quick Index and from the \r
+# Folder Tree View (if specified). The default is YES.\r
+\r
+SHOW_FILES = YES\r
+\r
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the \r
+# Namespaces page. 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 by \r
+# doxygen. The layout file controls the global structure of the generated output files \r
+# in an output format independent way. The create the layout file that represents \r
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a \r
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name \r
+# of the layout file.\r
+\r
+LAYOUT_FILE = \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
+# This WARN_NO_PARAMDOC option can be abled 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++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx \r
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90\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 \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
+\r
+EXCLUDE = \r
+\r
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or \r
+# directories that are symbolic links (a Unix filesystem 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 = */LowLevel/USBMode.h\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
+\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. 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. Doxygen will compare the file name with each pattern and apply the \r
+# filter if there is a match. 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, INPUT_FILTER \r
+# is applied to all files.\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
+#---------------------------------------------------------------------------\r
+# configuration options related to source browsing\r
+#---------------------------------------------------------------------------\r
+\r
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will \r
+# be generated. Documented entities will be cross-referenced with these sources. \r
+# Note: To get rid of all source code in the generated output, make sure also \r
+# VERBATIM_HEADERS is set to NO.\r
+\r
+SOURCE_BROWSER = NO\r
+\r
+# Setting the INLINE_SOURCES tag to YES will include the body \r
+# of functions and classes directly in the documentation.\r
+\r
+INLINE_SOURCES = NO\r
+\r
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \r
+# doxygen to hide any special comment blocks from generated source code \r
+# fragments. Normal C and C++ comments will always remain visible.\r
+\r
+STRIP_CODE_COMMENTS = YES\r
+\r
+# If the REFERENCED_BY_RELATION tag is set to YES \r
+# then for each documented function all documented \r
+# functions referencing it will be listed.\r
+\r
+REFERENCED_BY_RELATION = NO\r
+\r
+# If the REFERENCES_RELATION tag is set to YES \r
+# then for each documented function all documented entities \r
+# called/used by that function will be listed.\r
+\r
+REFERENCES_RELATION = NO\r
+\r
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\r
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\r
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\r
+# link to the source code. Otherwise they will link to the documentstion.\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.\r
+\r
+HTML_HEADER = \r
+\r
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for \r
+# each generated HTML page. If it is left blank doxygen will generate a \r
+# standard footer.\r
+\r
+HTML_FOOTER = \r
+\r
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading \r
+# style sheet that is used by each HTML page. It can be used to \r
+# fine-tune the look of the HTML output. If the tag is left blank doxygen \r
+# will generate a default style sheet. Note that doxygen will try to copy \r
+# the style sheet file to the HTML output directory, so don't put your own \r
+# stylesheet in the HTML output directory as well, or it will be erased!\r
+\r
+HTML_STYLESHEET = \r
+\r
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \r
+# files or namespaces will be aligned in HTML using tables. If set to \r
+# NO a bullet list will be used.\r
+\r
+HTML_ALIGN_MEMBERS = YES\r
+\r
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML \r
+# documentation will contain sections that can be hidden and shown after the \r
+# page has loaded. For this to work a browser that supports \r
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox \r
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).\r
+\r
+HTML_DYNAMIC_SECTIONS = YES\r
+\r
+# If the GENERATE_DOCSET tag is set to YES, additional index files \r
+# will be generated that can be used as input for Apple's Xcode 3 \r
+# integrated development environment, introduced with OSX 10.5 (Leopard). \r
+# To create a documentation set, doxygen will generate a Makefile in the \r
+# HTML output directory. Running make will produce the docset in that \r
+# directory and running "make install" will install the docset in \r
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find \r
+# it at startup. \r
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 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
+# 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 QHP_VIRTUAL_FOLDER \r
+# are set, an additional index file will be generated that can be used as input for \r
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated \r
+# 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
+# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>.\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
+# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>.\r
+\r
+QHP_VIRTUAL_FOLDER = doc\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
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at \r
+# top of each HTML page. The value NO (the default) enables the index and \r
+# the value YES disables it.\r
+\r
+DISABLE_INDEX = NO\r
+\r
+# This tag can be used to set the number of enum values (range [1..20]) \r
+# that doxygen will group on one line in the generated HTML documentation.\r
+\r
+ENUM_VALUES_PER_LINE = 1\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 FRAME, 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 (for instance Mozilla 1.0+, \r
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are \r
+# probably better off using the HTML help feature. Other possible values \r
+# for this tag are: HIERARCHIES, which will generate the Groups, Directories,\r
+# and Class Hierarchy pages using a tree view instead of an ordered list;\r
+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which\r
+# disables this behavior completely. For backwards compatibility with previous\r
+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE\r
+# respectively.\r
+\r
+GENERATE_TREEVIEW = YES\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
+# 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
+#---------------------------------------------------------------------------\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
+\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, a4wide, 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
+# 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
+#---------------------------------------------------------------------------\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 stylesheet 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. This is useful \r
+# if you want to understand what is going on. 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
+# in the INCLUDE_PATH (see below) will be search if 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
+\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.\r
+\r
+EXPAND_AS_DEFINED = BUTTLOADTAG\r
+\r
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then \r
+# doxygen's preprocessor will remove all function-like macros that are alone \r
+# on a line, have an all uppercase name, and do not end with a semicolon. Such \r
+# function macros are typically used for boiler-plate code, and will confuse \r
+# 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. \r
+# Optionally an initial location of the external documentation \r
+# can be added for each tagfile. The format of a tag file without \r
+# this location is as follows: \r
+# TAGFILES = file1 file2 ... \r
+# Adding location for the tag files is done as follows: \r
+# TAGFILES = file1=loc1 "file2 = loc2" ... \r
+# where "loc1" and "loc2" can be relative or absolute paths or \r
+# URLs. If a location is present for each tag, the installdox tool \r
+# does not have to be run to correct the links.\r
+# Note that each tag file must have a unique name\r
+# (where the name does NOT include the path)\r
+# If a tag file is not located in the directory in which doxygen \r
+# 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 is superseded by the HAVE_DOT option below. This is only a \r
+# fallback. It is recommended to install and use dot, since it yields more \r
+# 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
+# By default doxygen will write a font called FreeSans.ttf to the output \r
+# directory and reference it in all dot files that doxygen generates. This \r
+# font does not include all possible unicode characters however, so when you need \r
+# these (or just want a differently looking font) you can specify the font name \r
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, \r
+# which can be done by putting it in a standard location or by setting the \r
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory \r
+# 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 output directory to look for the \r
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a \r
+# different font using DOT_FONTNAME you can set the path where dot \r
+# can find it using this tag.\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
+# the 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 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 graphical hierarchy of all classes instead of a textual one.\r
+\r
+GRAPHICAL_HIERARCHY = NO\r
+\r
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES \r
+# then doxygen will show the dependencies a directory has on other directories \r
+# in a graphical way. The dependency relations are determined by the #include\r
+# relations between the files in the directories.\r
+\r
+DIRECTORY_GRAPH = NO\r
+\r
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images \r
+# generated by dot. Possible values are png, jpg, or gif\r
+# If left blank png will be used.\r
+\r
+DOT_IMAGE_FORMAT = png\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 = "C:/Program Files/Graphviz2.18/bin"\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 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
+\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to the search engine \r
+#---------------------------------------------------------------------------\r
+\r
+# The SEARCHENGINE tag specifies whether or not a search engine should be \r
+# used. If set to NO the values of all tags below this one will be ignored.\r
+\r
+SEARCHENGINE = NO\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = at90usb1287\r
+\r
+\r
+# Target board (see library BoardTypes.h documentation, USER or blank for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
+# "Board" inside the application directory.\r
+BOARD = USBKEY\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the \r
+# processor frequency. You can then use this symbol in your source code to \r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+# Typical values are:\r
+# F_CPU = 1000000\r
+# F_CPU = 1843200\r
+# F_CPU = 2000000\r
+# F_CPU = 3686400\r
+# F_CPU = 4000000\r
+# F_CPU = 7372800\r
+# F_CPU = 8000000\r
+# F_CPU = 11059200\r
+# F_CPU = 14745600\r
+# F_CPU = 16000000\r
+# F_CPU = 18432000\r
+# F_CPU = 20000000\r
+F_CPU = 8000000\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = BootloaderDFU\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = $(TARGET).c \\r
+ Descriptors.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/LowLevel.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/Endpoint.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/DevChapter9.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/USBTask.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/USBInterrupt.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/Events.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/StdDescriptors.c \\r
+ \r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC = \r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s]. \r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = ../../\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Starting byte address of the bootloader\r
+BOOT_START = 0x1E000\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL -DBOARD=BOARD_$(BOARD) -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DSTATIC_ENDPOINT_CONFIGURATION\r
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DFIXED_CONTROL_ENDPOINT_SIZE=32 -DUSE_SINGLE_DEVICE_CONFIGURATION\r
+CDEFS += -DNO_CLEARSET_FEATURE_REQUEST\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+#CPPDEFS += -D__STDC_LIMIT_MACROS\r
+#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
+\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fdata-sections\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -fno-inline-small-functions\r
+CFLAGS += -fno-reorder-blocks\r
+CFLAGS += -fno-reorder-blocks-and-partition\r
+CFLAGS += -fno-reorder-functions\r
+CFLAGS += -fno-toplevel-reorder\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+CFLAGS += -Wundef\r
+#CFLAGS += -fno-unit-at-a-time\r
+#CFLAGS += -Wunreachable-code\r
+#CFLAGS += -Wsign-compare\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CFLAGS += -Wundef\r
+#CPPFLAGS += -mshort-calls\r
+#CPPFLAGS += -fno-unit-at-a-time\r
+#CPPFLAGS += -Wstrict-prototypes\r
+#CPPFLAGS += -Wunreachable-code\r
+#CPPFLAGS += -Wsign-compare\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB = \r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB = \r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS = \r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax\r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += -Wl,--section-start=.text=$(BOOT_START)\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware: alf avr910 avrisp bascom bsd \r
+# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500\r
+#\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when \r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before: \r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build checkhooks checklibmode sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+checkhooks: build\r
+ @echo\r
+ @echo ------- Unhooked LUFA Events -------\r
+ @$(shell) (grep -s '^Event.*LUFA/.*\\.o' $(TARGET).map | \\r
+ cut -d' ' -f1 | cut -d'_' -f2- | grep ".*") || \\r
+ echo "(None)"\r
+ @echo ----- End Unhooked LUFA Events -----\r
+ \r
+checklibmode:\r
+ @echo\r
+ @echo ----------- Library Mode -----------\r
+ @$(shell) ($(CC) $(ALL_CFLAGS) -E -dM - < /dev/null \\r
+ | grep 'USB_\(DEVICE\|HOST\)_ONLY' | cut -d' ' -f2 | grep ".*") \\r
+ || echo "No specific mode (both device and host mode allowable)."\r
+ @echo ------------------------------------\r
+\r
+# Display compiler version information.\r
+gccversion : \r
+ @$(CC) --version\r
+\r
+\r
+\r
+# Program the device. \r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ copy $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set \r
+# a breakpoint at main().\r
+gdb-config: \r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -z -S $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
+ \r
+\r
+# Target: clean project.\r
+clean: begin clean_list clean_binary end\r
+\r
+clean_binary:\r
+ $(REMOVE) $(TARGET).hex\r
+\r
+clean_list:\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(ASRC:%.S=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(ASRC:%.S=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation...\r
+ @doxygen Doxygen.conf\r
+ @echo Documentation Generation Complete.\r
+ \r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all checkhooks checklibmode begin \\r
+finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff \\r
+clean clean_list clean_binary program debug \\r
+gdb-config doxygen clean_doxygen\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+ \r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * USB Device Descriptors, for library use when in USB device mode. Descriptors are special \r
+ * computer-readable structures which the host requests upon device enumeration, to determine\r
+ * the device's capabilities and functions. \r
+ */\r
+\r
+#include "Descriptors.h"\r
+\r
+/** HID class report descriptor. This is a special descriptor constructed with values from the\r
+ * USBIF HID class specification to describe the reports and capabilities of the HID device. This\r
+ * descriptor is parsed by the host and its contents used to determine what data (and in what encoding)\r
+ * the device will send, and what it may be sent back from the host. Refer to the HID specification for\r
+ * more details on HID report descriptors.\r
+ */\r
+USB_Descriptor_HIDReport_Datatype_t HIDReport[] =\r
+{\r
+ 0x06, 0x9c, 0xff, /* Usage Page (Vendor Defined) */\r
+ 0x09, 0x19, /* Usage (Vendor Defined) */\r
+ 0xa1, 0x01, /* Collection (Vendor Defined) */\r
+ 0x0a, 0x19, 0x00, /* Usage (Vendor Defined) */\r
+ 0x75, 0x08, /* Report Size (8) */\r
+ 0x95, 0x82, /* Report Count (130) */\r
+ 0x15, 0x00, /* Logical Minimum (0) */\r
+ 0x25, 0xff, /* Logical Maximum (255) */\r
+ 0x91, 0x02, /* Output (Data, Variable, Absolute) */\r
+ 0xc0 /* End Collection */\r
+};\r
+\r
+/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall\r
+ * device characteristics, including the supported USB version, control endpoint size and the\r
+ * number of device configurations. The descriptor is read out by the USB host when the enumeration\r
+ * process begins.\r
+ */\r
+USB_Descriptor_Device_t DeviceDescriptor =\r
+{\r
+ Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ \r
+ USBSpecification: VERSION_BCD(01.10),\r
+ Class: 0x00,\r
+ SubClass: 0x00,\r
+ Protocol: 0x00,\r
+ \r
+ Endpoint0Size: 8,\r
+ \r
+ VendorID: 0x16C0,\r
+ ProductID: 0x0478,\r
+ ReleaseNumber: 0x0010,\r
+ \r
+ ManufacturerStrIndex: NO_DESCRIPTOR,\r
+ ProductStrIndex: 0x01,\r
+ SerialNumStrIndex: NO_DESCRIPTOR,\r
+ \r
+ NumberOfConfigurations: 1\r
+};\r
+\r
+/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
+ * of the device in one of its supported configurations, including information about any device interfaces\r
+ * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting\r
+ * a configuration so that the host may correctly communicate with the USB device.\r
+ */\r
+USB_Descriptor_Configuration_t ConfigurationDescriptor =\r
+{\r
+ Config:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+\r
+ TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
+ TotalInterfaces: 1,\r
+ \r
+ ConfigurationNumber: 1,\r
+ ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ \r
+ ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ \r
+ MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ },\r
+ \r
+ Interface:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+\r
+ InterfaceNumber: 0x00,\r
+ AlternateSetting: 0x00,\r
+ \r
+ TotalEndpoints: 1,\r
+ \r
+ Class: 0x03,\r
+ SubClass: 0x00,\r
+ Protocol: 0x00,\r
+ \r
+ InterfaceStrIndex: NO_DESCRIPTOR\r
+ },\r
+\r
+ HIDDescriptor:\r
+ { \r
+ Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ \r
+ HIDSpec: VERSION_BCD(01.11),\r
+ CountryCode: 0x00,\r
+ TotalHIDReports: 0x01,\r
+ HIDReportType: DTYPE_Report,\r
+ HIDReportLength: sizeof(HIDReport)\r
+ },\r
+ \r
+ HIDEndpoint:\r
+ {\r
+ Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+\r
+ EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | HID_EPNUM),\r
+ Attributes: EP_TYPE_INTERRUPT,\r
+ EndpointSize: HID_EPSIZE,\r
+ PollingIntervalMS: 0x40\r
+ },\r
+};\r
+\r
+/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests\r
+ * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate\r
+ * via the language ID table available at USB.org what languages the device supports for its string descriptors.\r
+ */\r
+USB_Descriptor_String_t LanguageString =\r
+{\r
+ Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ \r
+ UnicodeString: {LANGUAGE_ID_ENG}\r
+};\r
+\r
+/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
+ * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device\r
+ * Descriptor.\r
+ */\r
+USB_Descriptor_String_t ProductString =\r
+{\r
+ Header: {Size: USB_STRING_LEN(21), Type: DTYPE_String},\r
+ \r
+ UnicodeString: L"AVR Teensy Bootloader"\r
+};\r
+\r
+/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
+ * documentation) by the application code so that the address and size of a requested descriptor can be given\r
+ * to the USB library. When the device recieves a Get Descriptor request on the control endpoint, this function\r
+ * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the\r
+ * USB host.\r
+ */\r
+uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+{\r
+ const uint8_t DescriptorType = (wValue >> 8);\r
+ const uint8_t DescriptorNumber = (wValue & 0xFF);\r
+\r
+ void* Address = NULL;\r
+ uint16_t Size = NO_DESCRIPTOR;\r
+\r
+ switch (DescriptorType)\r
+ {\r
+ case DTYPE_Device:\r
+ Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
+ Size = sizeof(USB_Descriptor_Device_t);\r
+ break;\r
+ case DTYPE_Configuration:\r
+ Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
+ Size = sizeof(USB_Descriptor_Configuration_t);\r
+ break;\r
+ case DTYPE_String:\r
+ if (!(DescriptorNumber))\r
+ {\r
+ Address = DESCRIPTOR_ADDRESS(LanguageString);\r
+ Size = LanguageString.Header.Size;\r
+ }\r
+ else\r
+ {\r
+ Address = DESCRIPTOR_ADDRESS(ProductString);\r
+ Size = ProductString.Header.Size;\r
+ }\r
+ \r
+ break;\r
+ case DTYPE_HID:\r
+ Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.HIDDescriptor);\r
+ Size = sizeof(USB_Descriptor_HID_t);\r
+ break;\r
+ case DTYPE_Report:\r
+ Address = DESCRIPTOR_ADDRESS(HIDReport);\r
+ Size = sizeof(HIDReport);\r
+ break;\r
+ }\r
+ \r
+ *DescriptorAddress = Address;\r
+ return Size;\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+ \r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Header file for Descriptors.c.\r
+ */\r
+\r
+#ifndef _DESCRIPTORS_H_\r
+#define _DESCRIPTORS_H_\r
+\r
+ /* Includes: */\r
+ #include <LUFA/Drivers/USB/USB.h>\r
+\r
+ /* Type Defines: */\r
+ /** Type define for the HID class specific HID descriptor, to describe the HID device's specifications. Refer to the HID\r
+ * specification for details on the structure elements.\r
+ */ \r
+ typedef struct\r
+ {\r
+ USB_Descriptor_Header_t Header;\r
+ \r
+ uint16_t HIDSpec;\r
+ uint8_t CountryCode;\r
+ \r
+ uint8_t TotalHIDReports;\r
+\r
+ uint8_t HIDReportType;\r
+ uint16_t HIDReportLength;\r
+ } USB_Descriptor_HID_t;\r
+ \r
+ /** Type define for the data type used to store HID report descriptor elements. */\r
+ typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;\r
+\r
+ /** Type define for the device configuration descriptor structure. This must be defined in the\r
+ * application code, as the configuration descriptor contains several sub-descriptors which\r
+ * vary between devices, and which describe the device's usage to the host.\r
+ */\r
+ typedef struct\r
+ {\r
+ USB_Descriptor_Configuration_Header_t Config;\r
+ USB_Descriptor_Interface_t Interface;\r
+ USB_Descriptor_HID_t HIDDescriptor;\r
+ USB_Descriptor_Endpoint_t HIDEndpoint;\r
+ } USB_Descriptor_Configuration_t;\r
+ \r
+ /* Macros: */\r
+ /** Endpoint number of the HID data IN endpoint. */\r
+ #define HID_EPNUM 1\r
+\r
+ /** Size in bytes of the HID reporting IN endpoint. */ \r
+ #define HID_EPSIZE 64\r
+\r
+ /** Descriptor header type value, to indicate a HID class HID descriptor. */\r
+ #define DTYPE_HID 0x21\r
+ \r
+ /** Descriptor header type value, to indicate a HID class HID report descriptor. */\r
+ #define DTYPE_Report 0x22\r
+\r
+ /* Function Prototypes: */\r
+ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
+ ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);\r
+\r
+#endif\r
--- /dev/null
+# Doxyfile 1.5.7.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 a sequence of words surrounded \r
+# by quotes) that should identify the project.\r
+\r
+PROJECT_NAME = "LUFA Library - Teensy HID 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 = 0.0.0\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 = YES\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, Farsi, Finnish, French, German, Greek, \r
+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), \r
+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, \r
+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, \r
+# Spanish, Swedish, and Ukrainian.\r
+\r
+OUTPUT_LANGUAGE = English\r
+\r
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \r
+# include brief member descriptions after the members that are listed in \r
+# the file and class documentation (similar to JavaDoc). \r
+# Set to NO to disable this.\r
+\r
+BRIEF_MEMBER_DESC = YES\r
+\r
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \r
+# the brief description of a member or function before the detailed description. \r
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \r
+# brief descriptions will be completely suppressed.\r
+\r
+REPEAT_BRIEF = YES\r
+\r
+# This tag implements a quasi-intelligent brief description abbreviator \r
+# that is used to form the text in various listings. Each string \r
+# in this list, if found as the leading text of the brief description, will be \r
+# stripped from the text and the result after processing the whole list, is \r
+# used as the annotated text. Otherwise, the brief description is used as-is. \r
+# If left blank, the following values are used ("$name" is automatically \r
+# replaced with the name of the entity): "The $name class" "The $name widget" \r
+# "The $name file" "is" "provides" "specifies" "contains" \r
+# "represents" "a" "an" "the"\r
+\r
+ABBREVIATE_BRIEF = "The $name class" \\r
+ "The $name widget" \\r
+ "The $name file" \\r
+ is \\r
+ provides \\r
+ specifies \\r
+ contains \\r
+ represents \\r
+ a \\r
+ an \\r
+ the\r
+\r
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \r
+# Doxygen will generate a detailed section even if there is only a brief \r
+# description.\r
+\r
+ALWAYS_DETAILED_SEC = NO\r
+\r
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all \r
+# inherited members of a class in the documentation of that class as if those \r
+# members were ordinary class members. Constructors, destructors and assignment \r
+# operators of the base classes will not be shown.\r
+\r
+INLINE_INHERITED_MEMB = NO\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \r
+# path before files name in the file list and in the header files. If set \r
+# to NO the shortest path that makes the file name unique will be used.\r
+\r
+FULL_PATH_NAMES = YES\r
+\r
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \r
+# can be used to strip a user-defined part of the path. Stripping is \r
+# only done if one of the specified strings matches the left-hand part of \r
+# the path. The tag can be used to show relative paths in the file list. \r
+# If left blank the directory from which doxygen is run is used as the \r
+# path to strip.\r
+\r
+STRIP_FROM_PATH = \r
+\r
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of \r
+# the path mentioned in the documentation of a class, which tells \r
+# the reader which header file to include in order to use a class. \r
+# If left blank only the name of the header file containing the class \r
+# definition is used. Otherwise one should specify the include paths that \r
+# are normally passed to the compiler using the -I flag.\r
+\r
+STRIP_FROM_INC_PATH = \r
+\r
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter \r
+# (but less readable) file names. This can be useful is your file systems \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
+# 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
+# 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 make the inheritance and collaboration \r
+# diagrams that involve STL classes more complete and accurate.\r
+\r
+BUILTIN_STL_SUPPORT = NO\r
+\r
+# If you use Microsoft's C++/CLI language, you should set this option to YES to\r
+# enable parsing support.\r
+\r
+CPP_CLI_SUPPORT = NO\r
+\r
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. \r
+# Doxygen will parse them like normal C++ but will assume all classes use public \r
+# instead of private inheritance when no explicit protection keyword is present.\r
+\r
+SIP_SUPPORT = NO\r
+\r
+# For Microsoft's IDL there are propget and propput attributes to indicate getter \r
+# and setter methods for a property. Setting this option to YES (the default) \r
+# will make doxygen to replace the get and set methods by a property in the \r
+# documentation. This will only work if the methods are indeed getting or \r
+# setting a simple type. If this is not the case, or you want to show the \r
+# methods anyway, you should set this option to NO.\r
+\r
+IDL_PROPERTY_SUPPORT = YES\r
+\r
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \r
+# tag is set to YES, then doxygen will reuse the documentation of the first \r
+# member in the group (if any) for the other members of the group. By default \r
+# all members of a group must be documented explicitly.\r
+\r
+DISTRIBUTE_GROUP_DOC = NO\r
+\r
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of \r
+# the same type (for instance a group of public functions) to be put as a \r
+# subgroup of that type (e.g. under the Public Functions section). Set it to \r
+# NO to prevent subgrouping. Alternatively, this can be done per class using \r
+# the \nosubgrouping command.\r
+\r
+SUBGROUPING = YES\r
+\r
+# When 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 penality. \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 rougly 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
+#---------------------------------------------------------------------------\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_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 namespace 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 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_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
+# The GENERATE_TODOLIST tag can be used to enable (YES) or \r
+# disable (NO) the todo list. This list is created by putting \todo \r
+# commands in the documentation.\r
+\r
+GENERATE_TODOLIST = NO\r
+\r
+# The GENERATE_TESTLIST tag can be used to enable (YES) or \r
+# disable (NO) the test list. This list is created by putting \test \r
+# commands in the documentation.\r
+\r
+GENERATE_TESTLIST = NO\r
+\r
+# The GENERATE_BUGLIST tag can be used to enable (YES) or \r
+# disable (NO) the bug list. This list is created by putting \bug \r
+# commands in the documentation.\r
+\r
+GENERATE_BUGLIST = NO\r
+\r
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or \r
+# disable (NO) the deprecated list. This list is created by putting \r
+# \deprecated commands in the documentation.\r
+\r
+GENERATE_DEPRECATEDLIST= YES\r
+\r
+# The ENABLED_SECTIONS tag can be used to enable conditional \r
+# documentation sections, marked by \if sectionname ... \endif.\r
+\r
+ENABLED_SECTIONS = \r
+\r
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines \r
+# the initial value of a variable or define 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 defines in the \r
+# documentation can be controlled using \showinitializer or \hideinitializer \r
+# command in the documentation regardless of this setting.\r
+\r
+MAX_INITIALIZER_LINES = 30\r
+\r
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated \r
+# at the bottom of the documentation of classes and structs. If set to YES the \r
+# list will mention the files that were used to generate the documentation.\r
+\r
+SHOW_USED_FILES = YES\r
+\r
+# If the sources in your project are distributed over multiple directories \r
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy \r
+# in the documentation. The default is NO.\r
+\r
+SHOW_DIRECTORIES = YES\r
+\r
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.\r
+# This will remove the Files entry from the Quick Index and from the \r
+# Folder Tree View (if specified). The default is YES.\r
+\r
+SHOW_FILES = YES\r
+\r
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the \r
+# Namespaces page. 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 by \r
+# doxygen. The layout file controls the global structure of the generated output files \r
+# in an output format independent way. The create the layout file that represents \r
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a \r
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name \r
+# of the layout file.\r
+\r
+LAYOUT_FILE = \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
+# This WARN_NO_PARAMDOC option can be abled 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++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx \r
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90\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 \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
+\r
+EXCLUDE = \r
+\r
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or \r
+# directories that are symbolic links (a Unix filesystem 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 = */LowLevel/USBMode.h\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
+\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. 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. Doxygen will compare the file name with each pattern and apply the \r
+# filter if there is a match. 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, INPUT_FILTER \r
+# is applied to all files.\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
+#---------------------------------------------------------------------------\r
+# configuration options related to source browsing\r
+#---------------------------------------------------------------------------\r
+\r
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will \r
+# be generated. Documented entities will be cross-referenced with these sources. \r
+# Note: To get rid of all source code in the generated output, make sure also \r
+# VERBATIM_HEADERS is set to NO.\r
+\r
+SOURCE_BROWSER = NO\r
+\r
+# Setting the INLINE_SOURCES tag to YES will include the body \r
+# of functions and classes directly in the documentation.\r
+\r
+INLINE_SOURCES = NO\r
+\r
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \r
+# doxygen to hide any special comment blocks from generated source code \r
+# fragments. Normal C and C++ comments will always remain visible.\r
+\r
+STRIP_CODE_COMMENTS = YES\r
+\r
+# If the REFERENCED_BY_RELATION tag is set to YES \r
+# then for each documented function all documented \r
+# functions referencing it will be listed.\r
+\r
+REFERENCED_BY_RELATION = NO\r
+\r
+# If the REFERENCES_RELATION tag is set to YES \r
+# then for each documented function all documented entities \r
+# called/used by that function will be listed.\r
+\r
+REFERENCES_RELATION = NO\r
+\r
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\r
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\r
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\r
+# link to the source code. Otherwise they will link to the documentstion.\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.\r
+\r
+HTML_HEADER = \r
+\r
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for \r
+# each generated HTML page. If it is left blank doxygen will generate a \r
+# standard footer.\r
+\r
+HTML_FOOTER = \r
+\r
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading \r
+# style sheet that is used by each HTML page. It can be used to \r
+# fine-tune the look of the HTML output. If the tag is left blank doxygen \r
+# will generate a default style sheet. Note that doxygen will try to copy \r
+# the style sheet file to the HTML output directory, so don't put your own \r
+# stylesheet in the HTML output directory as well, or it will be erased!\r
+\r
+HTML_STYLESHEET = \r
+\r
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \r
+# files or namespaces will be aligned in HTML using tables. If set to \r
+# NO a bullet list will be used.\r
+\r
+HTML_ALIGN_MEMBERS = YES\r
+\r
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML \r
+# documentation will contain sections that can be hidden and shown after the \r
+# page has loaded. For this to work a browser that supports \r
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox \r
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).\r
+\r
+HTML_DYNAMIC_SECTIONS = YES\r
+\r
+# If the GENERATE_DOCSET tag is set to YES, additional index files \r
+# will be generated that can be used as input for Apple's Xcode 3 \r
+# integrated development environment, introduced with OSX 10.5 (Leopard). \r
+# To create a documentation set, doxygen will generate a Makefile in the \r
+# HTML output directory. Running make will produce the docset in that \r
+# directory and running "make install" will install the docset in \r
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find \r
+# it at startup. \r
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 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
+# 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 QHP_VIRTUAL_FOLDER \r
+# are set, an additional index file will be generated that can be used as input for \r
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated \r
+# 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
+# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>.\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
+# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>.\r
+\r
+QHP_VIRTUAL_FOLDER = doc\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
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at \r
+# top of each HTML page. The value NO (the default) enables the index and \r
+# the value YES disables it.\r
+\r
+DISABLE_INDEX = NO\r
+\r
+# This tag can be used to set the number of enum values (range [1..20]) \r
+# that doxygen will group on one line in the generated HTML documentation.\r
+\r
+ENUM_VALUES_PER_LINE = 1\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 FRAME, 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 (for instance Mozilla 1.0+, \r
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are \r
+# probably better off using the HTML help feature. Other possible values \r
+# for this tag are: HIERARCHIES, which will generate the Groups, Directories,\r
+# and Class Hierarchy pages using a tree view instead of an ordered list;\r
+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which\r
+# disables this behavior completely. For backwards compatibility with previous\r
+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE\r
+# respectively.\r
+\r
+GENERATE_TREEVIEW = YES\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
+# 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
+#---------------------------------------------------------------------------\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
+\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, a4wide, 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
+# 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
+#---------------------------------------------------------------------------\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 stylesheet 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. This is useful \r
+# if you want to understand what is going on. 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
+# in the INCLUDE_PATH (see below) will be search if 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
+\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.\r
+\r
+EXPAND_AS_DEFINED = BUTTLOADTAG\r
+\r
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then \r
+# doxygen's preprocessor will remove all function-like macros that are alone \r
+# on a line, have an all uppercase name, and do not end with a semicolon. Such \r
+# function macros are typically used for boiler-plate code, and will confuse \r
+# 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. \r
+# Optionally an initial location of the external documentation \r
+# can be added for each tagfile. The format of a tag file without \r
+# this location is as follows: \r
+# TAGFILES = file1 file2 ... \r
+# Adding location for the tag files is done as follows: \r
+# TAGFILES = file1=loc1 "file2 = loc2" ... \r
+# where "loc1" and "loc2" can be relative or absolute paths or \r
+# URLs. If a location is present for each tag, the installdox tool \r
+# does not have to be run to correct the links.\r
+# Note that each tag file must have a unique name\r
+# (where the name does NOT include the path)\r
+# If a tag file is not located in the directory in which doxygen \r
+# 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 is superseded by the HAVE_DOT option below. This is only a \r
+# fallback. It is recommended to install and use dot, since it yields more \r
+# 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
+# By default doxygen will write a font called FreeSans.ttf to the output \r
+# directory and reference it in all dot files that doxygen generates. This \r
+# font does not include all possible unicode characters however, so when you need \r
+# these (or just want a differently looking font) you can specify the font name \r
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, \r
+# which can be done by putting it in a standard location or by setting the \r
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory \r
+# 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 output directory to look for the \r
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a \r
+# different font using DOT_FONTNAME you can set the path where dot \r
+# can find it using this tag.\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
+# the 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 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 graphical hierarchy of all classes instead of a textual one.\r
+\r
+GRAPHICAL_HIERARCHY = NO\r
+\r
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES \r
+# then doxygen will show the dependencies a directory has on other directories \r
+# in a graphical way. The dependency relations are determined by the #include\r
+# relations between the files in the directories.\r
+\r
+DIRECTORY_GRAPH = NO\r
+\r
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images \r
+# generated by dot. Possible values are png, jpg, or gif\r
+# If left blank png will be used.\r
+\r
+DOT_IMAGE_FORMAT = png\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 = "C:/Program Files/Graphviz2.18/bin"\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 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
+\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to the search engine \r
+#---------------------------------------------------------------------------\r
+\r
+# The SEARCHENGINE tag specifies whether or not a search engine should be \r
+# used. If set to NO the values of all tags below this one will be ignored.\r
+\r
+SEARCHENGINE = NO\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Main source file for the TeensyHID bootloader. This file contains the complete bootloader logic.\r
+ */\r
+ \r
+#define INCLUDE_FROM_TEENSYHID_C\r
+#include "TeensyHID.h"\r
+\r
+/* Global Variables: */\r
+/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run\r
+ * via a soft reset. When cleared, the bootloader will abort, the USB interface will shut down and the application\r
+ * started via a forced watchdog reset.\r
+ */\r
+bool RunBootloader = true;\r
+\r
+\r
+/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously \r
+ * runs the bootloader processing routine until instructed to soft-exit.\r
+ */\r
+int main(void)\r
+{\r
+ /* Disable watchdog if enabled by bootloader/fuses */\r
+ MCUSR &= ~(1 << WDRF);\r
+ wdt_disable();\r
+\r
+ /* Disable Clock Division */\r
+ SetSystemClockPrescaler(0);\r
+\r
+ /* Relocate the interrupt vector table to the bootloader section */\r
+ MCUCR = (1 << IVCE);\r
+ MCUCR = (1 << IVSEL);\r
+\r
+ /* Initialize USB subsystem */\r
+ USB_Init();\r
+ \r
+ while (RunBootloader)\r
+ USB_USBTask();\r
+ \r
+ /* Shut down the USB interface, so that the host will register the disconnection */\r
+ USB_ShutDown();\r
+\r
+ /* Wait 100ms to give the host time to register the disconnection */\r
+ _delay_ms(100);\r
+\r
+ /* Enable the watchdog and force a timeout to reset the AVR */\r
+ wdt_enable(WDTO_250MS);\r
+ \r
+ for (;;);\r
+}\r
+\r
+/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready\r
+ * to relay data to and from the attached USB host.\r
+ */\r
+EVENT_HANDLER(USB_ConfigurationChanged)\r
+{\r
+ /* Setup HID Report Endpoint */\r
+ Endpoint_ConfigureEndpoint(HID_EPNUM, EP_TYPE_INTERRUPT,\r
+ ENDPOINT_DIR_IN, HID_EPSIZE,\r
+ ENDPOINT_BANK_SINGLE);\r
+}\r
+\r
+/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific\r
+ * control requests that are not handled internally by the USB library (including the HID commands, which are\r
+ * all issued via the control endpoint), so that they can be handled appropriately for the application.\r
+ */\r
+EVENT_HANDLER(USB_UnhandledControlPacket)\r
+{\r
+ /* Handle HID Class specific requests */\r
+ switch (bRequest)\r
+ {\r
+ case REQ_SetReport:\r
+ if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+ {\r
+ Endpoint_ClearSetupReceived();\r
+ \r
+ /* Wait until the command (report) has been sent by the host */\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+\r
+ /* Read in the write destination address */\r
+ uint16_t PageAddress = Endpoint_Read_Word_LE();\r
+ \r
+ /* Check if the command is a program page command, or a start application command */\r
+ if (PageAddress == TEENSY_STARTAPPLICATION)\r
+ {\r
+ RunBootloader = false;\r
+ }\r
+ else\r
+ {\r
+ /* Erase the given FLASH page, ready to be programmed */\r
+ boot_page_erase(PageAddress);\r
+ boot_spm_busy_wait();\r
+ \r
+ /* Write each of the FLASH page's bytes in sequence */\r
+ for (uint8_t PageByte = 0; PageByte < 128; PageByte += 2)\r
+ {\r
+ /* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
+ if (!(Endpoint_BytesInEndpoint()))\r
+ {\r
+ Endpoint_ClearSetupOUT();\r
+ while (!(Endpoint_IsSetupOUTReceived()));\r
+ }\r
+\r
+ /* Write the next data word to the FLASH page */\r
+ boot_page_fill(PageAddress + PageByte, Endpoint_Read_Word_LE());\r
+ }\r
+\r
+ /* Write the filled FLASH page to memory */\r
+ boot_page_write(PageAddress);\r
+ boot_spm_busy_wait();\r
+\r
+ /* Re-enable RWW section */\r
+ boot_rww_enable();\r
+ }\r
+\r
+ Endpoint_ClearSetupOUT();\r
+\r
+ /* Wait until the host is ready to receive the request confirmation */\r
+ while (!(Endpoint_IsSetupINReady()));\r
+ \r
+ /* Handshake the request by sending an empty IN packet */\r
+ Endpoint_ClearSetupIN();\r
+ }\r
+ \r
+ break;\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ LUFA Library\r
+ Copyright (C) Dean Camera, 2009.\r
+ \r
+ dean [at] fourwalledcubicle [dot] com\r
+ www.fourwalledcubicle.com\r
+*/\r
+\r
+/*\r
+ Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+ \r
+ Permission to use, copy, modify, and distribute this software\r
+ and its documentation for any purpose and without fee is hereby\r
+ granted, provided that the above copyright notice appear in all\r
+ 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 disclaim 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
+/** \file\r
+ *\r
+ * Header file for TeensyHID.c.\r
+ */\r
+ \r
+#ifndef _TEENSYHID_H_\r
+#define _TEENSYHID_H_\r
+\r
+ /* Includes: */\r
+ #include <avr/io.h>\r
+ #include <avr/wdt.h>\r
+ #include <avr/boot.h>\r
+ #include <avr/wdt.h>\r
+ #include <util/delay.h>\r
+ #include <stdbool.h>\r
+\r
+ #include "Descriptors.h"\r
+\r
+ #include <LUFA/Version.h> // Library Version Information\r
+ #include <LUFA/Drivers/USB/USB.h> // USB Functionality\r
+ \r
+ /* Preprocessor Checks: */\r
+ #if !defined(__AVR_AT90USB162__)\r
+ #error This bootloader is not compatible with the selected AVR model.\r
+ #endif\r
+\r
+ /* Macros: */\r
+ /** HID Class specific request to send the next HID report to the device. */\r
+ #define REQ_SetReport 0x09\r
+ \r
+ #define TEENSY_STARTAPPLICATION 0xFFFF\r
+\r
+ /* Event Handlers: */\r
+ /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */\r
+ HANDLES_EVENT(USB_Disconnect);\r
+\r
+ /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */\r
+ HANDLES_EVENT(USB_ConfigurationChanged);\r
+\r
+ /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */\r
+ HANDLES_EVENT(USB_UnhandledControlPacket);\r
+ \r
+#endif\r
--- /dev/null
+/** \file\r
+ *\r
+ * This file contains special DoxyGen information for the generation of the main page and other special\r
+ * documentation pages. It is not a project source file.\r
+ */\r
+ \r
+/** \mainpage Teensy HID Class USB AVR Bootloader\r
+ * \r
+ * This bootloader enumerates to the host as a HID Class device, allowing for Teensy compatible programming\r
+ * software to load firmware onto the AVR, such as the official software at http://www.pjrc.com/teensy/.\r
+ * \r
+ * Out of the box this bootloader builds for the USB162, and will fit into 2KB of bootloader space.\r
+ *\r
+ * This spoofs (with permission) the offical Teensy bootloader's VID and PID, so that the software remains\r
+ * compatible with no changes.\r
+ * \r
+ * <table>\r
+ * <tr>\r
+ * <td><b>USB Mode:</b></td>\r
+ * <td>Device</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>USB Class:</b></td>\r
+ * <td>Human Interface Device Class (HID)</td>\r
+ * </tr>\r
+ * <tr> \r
+ * <td><b>USB Subclass:</b></td>\r
+ * <td>N/A</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Relevant Standards:</b></td>\r
+ * <td>USBIF HID Class Standard</td>\r
+ * <td>Teensy Programming Protocol Details</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td><b>Usable Speeds:</b></td>\r
+ * <td>Low Speed Mode</td>\r
+ * <td>Full Speed Mode</td>\r
+ * </tr>\r
+ * </table>\r
+ */\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-\r
+#----------------------------------------------------------------------------\r
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.\r
+# >> Modified for use with the LUFA project. <<\r
+#\r
+# Released to the Public Domain\r
+#\r
+# Additional material for this makefile was written by:\r
+# Peter Fleury\r
+# Tim Henigan\r
+# Colin O'Flynn\r
+# Reiner Patommel\r
+# Markus Pfaff\r
+# Sander Pool\r
+# Frederik Rouleau\r
+# Carlos Lamas\r
+# Dean Camera\r
+# Opendous Inc.\r
+# Denver Gingerich\r
+#\r
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device, using avrdude.\r
+# Please customize the avrdude settings below first!\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make doxygen = Generate DoxyGen documentation for the project (must have\r
+# DoxyGen installed)\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+\r
+# MCU name\r
+MCU = at90usb162\r
+\r
+\r
+# Target board (see library BoardTypes.h documentation, USER or blank for projects not requiring\r
+# LUFA board drivers). If USER is selected, put custom board drivers in a directory called \r
+# "Board" inside the application directory.\r
+BOARD = USBKEY\r
+\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the \r
+# processor frequency. You can then use this symbol in your source code to \r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+# Typical values are:\r
+# F_CPU = 1000000\r
+# F_CPU = 1843200\r
+# F_CPU = 2000000\r
+# F_CPU = 3686400\r
+# F_CPU = 4000000\r
+# F_CPU = 7372800\r
+# F_CPU = 8000000\r
+# F_CPU = 11059200\r
+# F_CPU = 14745600\r
+# F_CPU = 16000000\r
+# F_CPU = 18432000\r
+# F_CPU = 20000000\r
+F_CPU = 8000000\r
+\r
+\r
+# Output format. (can be srec, ihex, binary)\r
+FORMAT = ihex\r
+\r
+\r
+# Target file name (without extension).\r
+TARGET = TeensyHID\r
+\r
+\r
+# Object files directory\r
+# To put object files in current directory, use a dot (.), do NOT make\r
+# this an empty or blank macro!\r
+OBJDIR = .\r
+\r
+\r
+# List C source files here. (C dependencies are automatically generated.)\r
+SRC = $(TARGET).c \\r
+ Descriptors.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/LowLevel.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/Endpoint.c \\r
+ ../../LUFA/Drivers/USB/LowLevel/DevChapter9.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/USBTask.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/USBInterrupt.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/Events.c \\r
+ ../../LUFA/Drivers/USB/HighLevel/StdDescriptors.c \\r
+ \r
+# List C++ source files here. (C dependencies are automatically generated.)\r
+CPPSRC = \r
+\r
+\r
+# List Assembler source files here.\r
+# Make them always end in a capital .S. Files ending in a lowercase .s\r
+# will not be considered source files but generated files (assembler\r
+# output from the compiler), and will be deleted upon "make clean"!\r
+# Even though the DOS/Win* filesystem matches both .s and .S the same,\r
+# it will preserve the spelling of the filenames, and gcc itself does\r
+# care about how the name is spelled on its command-line.\r
+ASRC =\r
+\r
+\r
+# Optimization level, can be [0, 1, 2, 3, s]. \r
+# 0 = turn off optimization. s = optimize for size.\r
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)\r
+OPT = s\r
+\r
+\r
+# Debugging format.\r
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+# AVR Studio 4.10 requires dwarf-2.\r
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
+\r
+# List any extra directories to look for include files here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRAINCDIRS = ../../\r
+\r
+\r
+# Compiler flag to set the C Standard level.\r
+# c89 = "ANSI" C\r
+# gnu89 = c89 plus GCC extensions\r
+# c99 = ISO C99 standard (not yet fully implemented)\r
+# gnu99 = c99 plus GCC extensions\r
+CSTANDARD = -std=gnu99\r
+\r
+\r
+# Starting byte address of the bootloader\r
+BOOT_START = 0xC000\r
+\r
+\r
+# Place -D or -U options here for C sources\r
+CDEFS = -DF_CPU=$(F_CPU)UL -DBOARD=BOARD_$(BOARD) -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DSTATIC_ENDPOINT_CONFIGURATION\r
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DUSE_SINGLE_DEVICE_CONFIGURATION\r
+CDEFS += -DNO_CLEARSET_FEATURE_REQUEST\r
+\r
+# Place -D or -U options here for ASM sources\r
+ADEFS = -DF_CPU=$(F_CPU)\r
+\r
+\r
+# Place -D or -U options here for C++ sources\r
+CPPDEFS = -DF_CPU=$(F_CPU)UL\r
+#CPPDEFS += -D__STDC_LIMIT_MACROS\r
+#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
+\r
+\r
+\r
+#---------------- Compiler Options C ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CFLAGS = -g$(DEBUG)\r
+CFLAGS += $(CDEFS)\r
+CFLAGS += -O$(OPT)\r
+CFLAGS += -funsigned-char\r
+CFLAGS += -funsigned-bitfields\r
+CFLAGS += -ffunction-sections\r
+CFLAGS += -fpack-struct\r
+CFLAGS += -fshort-enums\r
+CFLAGS += -fno-inline-small-functions\r
+CFLAGS += -fno-reorder-blocks\r
+CFLAGS += -fno-reorder-blocks-and-partition\r
+CFLAGS += -fno-reorder-functions\r
+CFLAGS += -fno-toplevel-reorder\r
+CFLAGS += -Wall\r
+CFLAGS += -Wstrict-prototypes\r
+CFLAGS += -Wundef\r
+#CFLAGS += -fno-unit-at-a-time\r
+#CFLAGS += -Wunreachable-code\r
+#CFLAGS += -Wsign-compare\r
+CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+CFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Compiler Options C++ ----------------\r
+# -g*: generate debugging information\r
+# -O*: optimization level\r
+# -f...: tuning, see GCC manual and avr-libc documentation\r
+# -Wall...: warning level\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns...: create assembler listing\r
+CPPFLAGS = -g$(DEBUG)\r
+CPPFLAGS += $(CPPDEFS)\r
+CPPFLAGS += -O$(OPT)\r
+CPPFLAGS += -funsigned-char\r
+CPPFLAGS += -funsigned-bitfields\r
+CPPFLAGS += -fpack-struct\r
+CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -fno-exceptions\r
+CPPFLAGS += -Wall\r
+CFLAGS += -Wundef\r
+#CPPFLAGS += -mshort-calls\r
+#CPPFLAGS += -fno-unit-at-a-time\r
+#CPPFLAGS += -Wstrict-prototypes\r
+#CPPFLAGS += -Wunreachable-code\r
+#CPPFLAGS += -Wsign-compare\r
+CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
+#CPPFLAGS += $(CSTANDARD)\r
+\r
+\r
+#---------------- Assembler Options ----------------\r
+# -Wa,...: tell GCC to pass this to the assembler.\r
+# -adhlns: create listing\r
+# -gstabs: have the assembler create line number information; note that\r
+# for use in COFF files, additional information about filenames\r
+# and function names needs to be present in the assembler source\r
+# files -- see avr-libc docs [FIXME: not yet described there]\r
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex \r
+# dump that will be displayed for a given single line of source input.\r
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100\r
+\r
+\r
+#---------------- Library Options ----------------\r
+# Minimalistic printf version\r
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min\r
+\r
+# Floating point printf version (requires MATH_LIB = -lm below)\r
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt\r
+\r
+# If this is left blank, then it will use the Standard printf version.\r
+PRINTF_LIB = \r
+#PRINTF_LIB = $(PRINTF_LIB_MIN)\r
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)\r
+\r
+\r
+# Minimalistic scanf version\r
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min\r
+\r
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)\r
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt\r
+\r
+# If this is left blank, then it will use the Standard scanf version.\r
+SCANF_LIB = \r
+#SCANF_LIB = $(SCANF_LIB_MIN)\r
+#SCANF_LIB = $(SCANF_LIB_FLOAT)\r
+\r
+\r
+MATH_LIB = -lm\r
+\r
+\r
+# List any extra directories to look for libraries here.\r
+# Each directory must be seperated by a space.\r
+# Use forward slashes for directory separators.\r
+# For a directory that has spaces, enclose it in quotes.\r
+EXTRALIBDIRS = \r
+\r
+\r
+\r
+#---------------- External Memory Options ----------------\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# used for variables (.data/.bss) and heap (malloc()).\r
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),\r
+# only used for heap (malloc()).\r
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff\r
+\r
+EXTMEMOPTS =\r
+\r
+\r
+\r
+#---------------- Linker Options ----------------\r
+# -Wl,...: tell GCC to pass this to linker.\r
+# -Map: create map file\r
+# --cref: add cross reference to map file\r
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref\r
+LDFLAGS += -Wl,--relax \r
+LDFLAGS += -Wl,--gc-sections\r
+LDFLAGS += -Wl,--section-start=.text=$(BOOT_START)\r
+LDFLAGS += $(EXTMEMOPTS)\r
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))\r
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)\r
+#LDFLAGS += -T linker_script.x\r
+\r
+\r
+\r
+#---------------- Programming Options (avrdude) ----------------\r
+\r
+# Programming hardware: alf avr910 avrisp bascom bsd \r
+# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500\r
+#\r
+# Type: avrdude -c ?\r
+# to get a full listing.\r
+#\r
+AVRDUDE_PROGRAMMER = jtagmkII\r
+\r
+# com1 = serial port. Use lpt1 to connect to parallel port.\r
+AVRDUDE_PORT = usb\r
+\r
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex\r
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep\r
+\r
+\r
+# Uncomment the following if you want avrdude's erase cycle counter.\r
+# Note that this counter needs to be initialized first using -Yn,\r
+# see avrdude manual.\r
+#AVRDUDE_ERASE_COUNTER = -y\r
+\r
+# Uncomment the following if you do /not/ wish a verification to be\r
+# performed after programming the device.\r
+#AVRDUDE_NO_VERIFY = -V\r
+\r
+# Increase verbosity level. Please use this when submitting bug\r
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> \r
+# to submit bug reports.\r
+#AVRDUDE_VERBOSE = -v -v\r
+\r
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)\r
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)\r
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)\r
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)\r
+\r
+\r
+\r
+#---------------- Debugging Options ----------------\r
+\r
+# For simulavr only - target MCU frequency.\r
+DEBUG_MFREQ = $(F_CPU)\r
+\r
+# Set the DEBUG_UI to either gdb or insight.\r
+# DEBUG_UI = gdb\r
+DEBUG_UI = insight\r
+\r
+# Set the debugging back-end to either avarice, simulavr.\r
+DEBUG_BACKEND = avarice\r
+#DEBUG_BACKEND = simulavr\r
+\r
+# GDB Init Filename.\r
+GDBINIT_FILE = __avr_gdbinit\r
+\r
+# When using avarice settings for the JTAG\r
+JTAG_DEV = /dev/com1\r
+\r
+# Debugging port used to communicate between GDB / avarice / simulavr.\r
+DEBUG_PORT = 4242\r
+\r
+# Debugging host used to communicate between GDB / avarice / simulavr, normally\r
+# just set to localhost unless doing some sort of crazy debugging when \r
+# avarice is running on a different computer.\r
+DEBUG_HOST = localhost\r
+\r
+\r
+\r
+#============================================================================\r
+\r
+\r
+# Define programs and commands.\r
+SHELL = sh\r
+CC = avr-gcc\r
+OBJCOPY = avr-objcopy\r
+OBJDUMP = avr-objdump\r
+SIZE = avr-size\r
+AR = avr-ar rcs\r
+NM = avr-nm\r
+AVRDUDE = avrdude\r
+REMOVE = rm -f\r
+REMOVEDIR = rm -rf\r
+COPY = cp\r
+WINSHELL = cmd\r
+\r
+# Define Messages\r
+# English\r
+MSG_ERRORS_NONE = Errors: none\r
+MSG_BEGIN = -------- begin --------\r
+MSG_END = -------- end --------\r
+MSG_SIZE_BEFORE = Size before: \r
+MSG_SIZE_AFTER = Size after:\r
+MSG_COFF = Converting to AVR COFF:\r
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:\r
+MSG_FLASH = Creating load file for Flash:\r
+MSG_EEPROM = Creating load file for EEPROM:\r
+MSG_EXTENDED_LISTING = Creating Extended Listing:\r
+MSG_SYMBOL_TABLE = Creating Symbol Table:\r
+MSG_LINKING = Linking:\r
+MSG_COMPILING = Compiling C:\r
+MSG_COMPILING_CPP = Compiling C++:\r
+MSG_ASSEMBLING = Assembling:\r
+MSG_CLEANING = Cleaning project:\r
+MSG_CREATING_LIBRARY = Creating library:\r
+\r
+\r
+\r
+\r
+# Define all object files.\r
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) \r
+\r
+# Define all listing files.\r
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) \r
+\r
+\r
+# Compiler flags to generate dependency files.\r
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d\r
+\r
+\r
+# Combine all necessary flags and optional flags.\r
+# Add target processor to flags.\r
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)\r
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)\r
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)\r
+\r
+\r
+\r
+\r
+\r
+# Default target.\r
+all: begin gccversion sizebefore build checkhooks checklibmode sizeafter end\r
+\r
+# Change the build target to build a HEX file or a library.\r
+build: elf hex eep lss sym\r
+#build: lib\r
+\r
+\r
+elf: $(TARGET).elf\r
+hex: $(TARGET).hex\r
+eep: $(TARGET).eep\r
+lss: $(TARGET).lss\r
+sym: $(TARGET).sym\r
+LIBNAME=lib$(TARGET).a\r
+lib: $(LIBNAME)\r
+\r
+\r
+\r
+# Eye candy.\r
+# AVR Studio 3.x does not check make's exit code but relies on\r
+# the following magic strings to be generated by the compile job.\r
+begin:\r
+ @echo\r
+ @echo $(MSG_BEGIN)\r
+\r
+end:\r
+ @echo $(MSG_END)\r
+ @echo\r
+\r
+\r
+# Display size of file.\r
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex\r
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf\r
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+\r
+sizebefore:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+sizeafter:\r
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \\r
+ 2>/dev/null; echo; fi\r
+\r
+checkhooks: build\r
+ @echo\r
+ @echo ------- Unhooked LUFA Events -------\r
+ @$(shell) (grep -s '^Event.*LUFA/.*\\.o' $(TARGET).map | \\r
+ cut -d' ' -f1 | cut -d'_' -f2- | grep ".*") || \\r
+ echo "(None)"\r
+ @echo ----- End Unhooked LUFA Events -----\r
+\r
+checklibmode:\r
+ @echo\r
+ @echo ----------- Library Mode -----------\r
+ @$(shell) ($(CC) $(ALL_CFLAGS) -E -dM - < /dev/null \\r
+ | grep 'USB_\(DEVICE\|HOST\)_ONLY' | cut -d' ' -f2 | grep ".*") \\r
+ || echo "No specific mode (both device and host mode allowable)."\r
+ @echo ------------------------------------\r
+\r
+# Display compiler version information.\r
+gccversion : \r
+ @$(CC) --version\r
+\r
+\r
+\r
+# Program the device. \r
+program: $(TARGET).hex $(TARGET).eep\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
+\r
+flip: $(TARGET).hex\r
+ batchisp -hardware usb -device $(MCU) -operation erase f\r
+ batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu: $(TARGET).hex\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
+ dfu-programmer $(MCU) reset\r
+\r
+flip-ee: $(TARGET).hex $(TARGET).eep\r
+ copy $(TARGET).eep $(TARGET)eep.hex\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
+ batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
+ batchisp -hardware usb -device $(MCU) -operation start reset 0\r
+\r
+dfu-ee: $(TARGET).hex $(TARGET).eep\r
+ dfu-programmer $(MCU) erase\r
+ dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) reset\r
+\r
+# Generate avr-gdb config/init file which does the following:\r
+# define the reset signal, load the target file, connect to target, and set \r
+# a breakpoint at main().\r
+gdb-config: \r
+ @$(REMOVE) $(GDBINIT_FILE)\r
+ @echo define reset >> $(GDBINIT_FILE)\r
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)\r
+ @echo end >> $(GDBINIT_FILE)\r
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)\r
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)\r
+ifeq ($(DEBUG_BACKEND),simulavr)\r
+ @echo load >> $(GDBINIT_FILE)\r
+endif\r
+ @echo break main >> $(GDBINIT_FILE)\r
+\r
+debug: gdb-config $(TARGET).elf\r
+ifeq ($(DEBUG_BACKEND), avarice)\r
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.\r
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \\r
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)\r
+ @$(WINSHELL) /c pause\r
+\r
+else\r
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \\r
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)\r
+endif\r
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)\r
+\r
+\r
+\r
+\r
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.\r
+COFFCONVERT = $(OBJCOPY) --debugging\r
+COFFCONVERT += --change-section-address .data-0x800000\r
+COFFCONVERT += --change-section-address .bss-0x800000\r
+COFFCONVERT += --change-section-address .noinit-0x800000\r
+COFFCONVERT += --change-section-address .eeprom-0x810000\r
+\r
+\r
+\r
+coff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof\r
+\r
+\r
+extcoff: $(TARGET).elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof\r
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof\r
+\r
+\r
+\r
+# Create final output files (.hex, .eep) from ELF output file.\r
+%.hex: %.elf\r
+ @echo\r
+ @echo $(MSG_FLASH) $@\r
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@\r
+\r
+%.eep: %.elf\r
+ @echo\r
+ @echo $(MSG_EEPROM) $@\r
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \\r
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0\r
+\r
+# Create extended listing file from ELF output file.\r
+%.lss: %.elf\r
+ @echo\r
+ @echo $(MSG_EXTENDED_LISTING) $@\r
+ $(OBJDUMP) -h -z -S $< > $@\r
+\r
+# Create a symbol table from ELF output file.\r
+%.sym: %.elf\r
+ @echo\r
+ @echo $(MSG_SYMBOL_TABLE) $@\r
+ $(NM) -n $< > $@\r
+\r
+\r
+\r
+# Create library from object files.\r
+.SECONDARY : $(TARGET).a\r
+.PRECIOUS : $(OBJ)\r
+%.a: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_CREATING_LIBRARY) $@\r
+ $(AR) $@ $(OBJ)\r
+\r
+\r
+# Link: create ELF output file from object files.\r
+.SECONDARY : $(TARGET).elf\r
+.PRECIOUS : $(OBJ)\r
+%.elf: $(OBJ)\r
+ @echo\r
+ @echo $(MSG_LINKING) $@\r
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)\r
+\r
+\r
+# Compile: create object files from C source files.\r
+$(OBJDIR)/%.o : %.c\r
+ @echo\r
+ @echo $(MSG_COMPILING) $<\r
+ $(CC) -c $(ALL_CFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create object files from C++ source files.\r
+$(OBJDIR)/%.o : %.cpp\r
+ @echo\r
+ @echo $(MSG_COMPILING_CPP) $<\r
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@ \r
+\r
+\r
+# Compile: create assembler files from C source files.\r
+%.s : %.c\r
+ $(CC) -S $(ALL_CFLAGS) $< -o $@\r
+\r
+\r
+# Compile: create assembler files from C++ source files.\r
+%.s : %.cpp\r
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@\r
+\r
+\r
+# Assemble: create object files from assembler source files.\r
+$(OBJDIR)/%.o : %.S\r
+ @echo\r
+ @echo $(MSG_ASSEMBLING) $<\r
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@\r
+\r
+\r
+# Create preprocessed source for use in sending a bug report.\r
+%.i : %.c\r
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
+ \r
+\r
+# Target: clean project.\r
+clean: begin clean_list clean_binary end\r
+\r
+clean_binary:\r
+ $(REMOVE) $(TARGET).hex\r
+\r
+clean_list:\r
+ @echo $(MSG_CLEANING)\r
+ $(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET).cof\r
+ $(REMOVE) $(TARGET).elf\r
+ $(REMOVE) $(TARGET).map\r
+ $(REMOVE) $(TARGET).sym\r
+ $(REMOVE) $(TARGET).lss\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)\r
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)\r
+ $(REMOVE) $(SRC:.c=.s)\r
+ $(REMOVE) $(SRC:.c=.d)\r
+ $(REMOVE) $(SRC:.c=.i)\r
+ $(REMOVEDIR) .dep\r
+\r
+\r
+doxygen:\r
+ @echo Generating Project Documentation...\r
+ @doxygen Doxygen.conf\r
+ @echo Documentation Generation Complete.\r
+\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
+# Create object files directory\r
+$(shell mkdir $(OBJDIR) 2>/dev/null)\r
+\r
+\r
+# Include the dependency files.\r
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)\r
+\r
+\r
+# Listing of phony targets.\r
+.PHONY : all checkhooks checklibmode begin \\r
+finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff \\r
+clean clean_list clean_binary program debug \\r
+gdb-config doxygen\r
--- /dev/null
+#\r
+# LUFA Library\r
+# Copyright (C) Dean Camera, 2009.\r
+# \r
+# dean [at] fourwalledcubicle [dot] com\r
+# www.fourwalledcubicle.com\r
+#\r
+\r
+# Makefile to build all the LUFA USB Bootloaders. Call with "make all" to\r
+# rebuild all bootloaders.\r
+\r
+# Bootloaders are pre-cleaned before each one is built, to ensure any\r
+# custom LUFA library build options are reflected in the compiled\r
+# code.\r
+\r
+all:\r
+ make -C 'DFU/' clean\r
+ make -C 'DFU/' all\r
+\r
+ make -C 'CDC/' clean\r
+ make -C 'CDC/' all\r
+\r
+ make -C 'TeensyHID/' clean\r
+ make -C 'TeensyHID/' all\r
+\r
+%:\r
+ make -C 'DFU/' $@\r
+ make -C 'CDC/' $@\r
+ make -C 'TeensyHID/' $@\r