Commit c1a1b6ee authored by Dean Camera's avatar Dean Camera

Moved all source to the trunk directory.

parent 4bc7e909
<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>
This diff is collapsed.
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
*/
/** \file
*
* Header file for BootloaderCDC.c.
*/
#ifndef _CDC_H_
#define _CDC_H_
/* Includes: */
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/boot.h>
#include <avr/eeprom.h>
#include <stdbool.h>
#include "Descriptors.h"
#include <LUFA/Drivers/USB/USB.h> // USB Functionality
/* Macros: */
/** CDC Class Specific request to get the line encoding on a CDC-ACM virtual serial port, including the
* baud rate, parity, stop bits and data bits.
*/
#define REQ_GetLineEncoding 0x21
/** CDC Class Specific request to set the line encoding on a CDC-ACM virtual serial port, including the
* baud rate, parity, stop bits and data bits.
*/
#define REQ_SetLineEncoding 0x20
/** CDC Class Specific request to set the state of the serial handshake lines (such as DCD and RTS) on
* a CDC-ACM virtual serial port.
*/
#define REQ_SetControlLineState 0x22
/** Version major of the CDC bootloader. */
#define BOOTLOADER_VERSION_MAJOR 0x01
/** Version minor of the CDC bootloader. */
#define BOOTLOADER_VERSION_MINOR 0x00
/** Hardware version major of the CDC bootloader. */
#define BOOTLOADER_HWVERSION_MAJOR 0x01
/** Hardware version minor of the CDC bootloader. */
#define BOOTLOADER_HWVERSION_MINOR 0x00
/** Eight character bootloader firmware identifier reported to the host when requested */
#define SOFTWARE_IDENTIFIER "LUFA-CDC"
/* Event Handlers: */
/** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */
HANDLES_EVENT(USB_Disconnect);
/** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */
HANDLES_EVENT(USB_ConfigurationChanged);
/** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */
HANDLES_EVENT(USB_UnhandledControlPacket);
/* Type Defines: */
/** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;
/** Type define for the CDC-ACM virtual serial port line encoding options, including baud rate, format, parity
* and size of each data chunk in bits.
*/
typedef struct
{
uint32_t BaudRateBPS; /**< Baud rate in BPS */
uint8_t CharFormat; /**< Character format, an entry from the BootloaderCDC_CDC_LineCodingFormats_t enum */
uint8_t ParityType; /**< Parity mode, an entry from the BootloaderCDC_CDC_LineCodeingParity_t enum */
uint8_t DataBits; /**< Size of each data chunk, in bits */
} CDC_Line_Coding_t;
/* Enums: */
/** Enum for the possible line encoding formats on a CDC-ACM virtual serial port */
enum BootloaderCDC_CDC_LineCodingFormats_t
{
OneStopBit = 0, /**< Single stop bit */
OneAndAHalfStopBits = 1, /**< 1.5 stop bits */
TwoStopBits = 2, /**< Two stop bits */
};
/** Enum for the possible parity modes on a CDC-ACM virtual serial port */
enum BootloaderCDC_CDC_LineCodeingParity_t
{
Parity_None = 0, /**< No data parity checking */
Parity_Odd = 1, /**< Odd data parity checking */
Parity_Even = 2, /**< Even data parity checking */
Parity_Mark = 3, /**< Mark data parity checking */
Parity_Space = 4, /**< Space data parity checking */
};
/* Tasks: */
TASK(CDC_Task);
/* Function Prototypes: */
#if defined(INCLUDE_FROM_BOOTLOADERCDC_C) || defined(__DOXYGEN__)
static void ProgramReadWriteMemoryBlock(const uint8_t Command);
static uint8_t FetchNextCommandByte(void);
static void WriteNextResponseByte(const uint8_t Response);
#endif
#endif
/** \file
*
* This file contains special DoxyGen information for the generation of the main page and other special
* documentation pages. It is not a project source file.
*/
/** \mainpage CDC Class USB AVR Bootloader
*
* This bootloader enumerates to the host as a CDC Class device (virtual serial port), allowing for AVR109
* protocol compatible programming software to load firmware onto the AVR.
*
* Out of the box this bootloader builds for the USB1287, and will fit into 4KB of bootloader space. If
* you wish to enlarge this space and/or change the AVR model, you will need to edit the BOOT_START and MCU
* values in the accompanying makefile.
*
* This bootloader is compatible with the open source application AVRDUDE, or Atmel's AVRPROG.
*
* <table>
* <tr>
* <td><b>USB Mode:</b></td>
* <td>Device</td>
* </tr>
* <tr>
* <td><b>USB Class:</b></td>
* <td>Communications Device Class (CDC)</td>
* </tr>
* <tr>
* <td><b>USB Subclass:</b></td>
* <td>Abstract Control Model (ACM)</td>
* </tr>
* <tr>
* <td><b>Relevant Standards:</b></td>
* <td>USBIF CDC Class Standard</td>
* </tr>
* <tr>
* <td><b>Usable Speeds:</b></td>
* <td>Full Speed Mode</td>
* </tr>
* </table>
*/
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
*/
/** \file
*
* USB Device Descriptors, for library use when in USB device mode. Descriptors are special
* computer-readable structures which the host requests upon device enumeration, to determine
* the device's capabilities and functions.
*/
#include "Descriptors.h"
/** Device descriptor structure. This descriptor, located in SRAM memory, describes the overall
* device characteristics, including the supported USB version, control endpoint size and the
* number of device configurations. The descriptor is read out by the USB host when the enumeration
* process begins.
*/
USB_Descriptor_Device_t DeviceDescriptor =
{
Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
USBSpecification: VERSION_BCD(01.10),
Class: 0x02,
SubClass: 0x00,
Protocol: 0x00,
Endpoint0Size: FIXED_CONTROL_ENDPOINT_SIZE,
VendorID: 0x03EB,
ProductID: 0x204A,
ReleaseNumber: 0x0000,
ManufacturerStrIndex: NO_DESCRIPTOR,
ProductStrIndex: 0x01,
SerialNumStrIndex: NO_DESCRIPTOR,
NumberOfConfigurations: 1
};
/** Configuration descriptor structure. This descriptor, located in SRAM memory, describes the usage
* of the device in one of its supported configurations, including information about any device interfaces
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
* a configuration so that the host may correctly communicate with the USB device.
*/
USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
Config:
{
Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
TotalInterfaces: 2,
ConfigurationNumber: 1,
ConfigurationStrIndex: NO_DESCRIPTOR,
ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
},
CCI_Interface:
{
Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
InterfaceNumber: 0,
AlternateSetting: 0,
TotalEndpoints: 1,
Class: 0x02,
SubClass: 0x02,
Protocol: 0x01,
InterfaceStrIndex: NO_DESCRIPTOR
},
CDC_Functional_IntHeader:
{
Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
SubType: 0x00,
Data: {0x10, 0x01}
},
CDC_Functional_CallManagement:
{
Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
SubType: 0x01,
Data: {0x03, 0x01}
},
CDC_Functional_AbstractControlManagement:
{
Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},
SubType: 0x02,
Data: {0x06}
},
CDC_Functional_Union:
{
Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
SubType: 0x06,
Data: {0x00, 0x01}
},
ManagementEndpoint:
{
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
Attributes: EP_TYPE_INTERRUPT,
EndpointSize: CDC_NOTIFICATION_EPSIZE,
PollingIntervalMS: 0x02
},
DCI_Interface:
{
Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
InterfaceNumber: 1,
AlternateSetting: 0,
TotalEndpoints: 2,
Class: 0x0A,
SubClass: 0x00,
Protocol: 0x00,
InterfaceStrIndex: NO_DESCRIPTOR
},
DataOutEndpoint:
{
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
Attributes: EP_TYPE_BULK,
EndpointSize: CDC_TXRX_EPSIZE,
PollingIntervalMS: 0x00
},
DataInEndpoint:
{
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
Attributes: EP_TYPE_BULK,
EndpointSize: CDC_TXRX_EPSIZE,
PollingIntervalMS: 0x00
}
};
/** Language descriptor structure. This descriptor, located in SRAM memory, is returned when the host requests
* the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
*/
USB_Descriptor_String_t LanguageString =
{
Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
UnicodeString: {LANGUAGE_ID_ENG}
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
USB_Descriptor_String_t ProductString =
{
Header: {Size: USB_STRING_LEN(15), Type: DTYPE_String},
UnicodeString: L"AVR CDC Bootloader"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
* documentation) by the application code so that the address and size of a requested descriptor can be given
* to the USB library. When the device recieves a Get Descriptor request on the control endpoint, this function
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
* USB host.
*/
uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
{
const uint8_t DescriptorType = (wValue >> 8);
const uint8_t DescriptorNumber = (wValue & 0xFF);
void* Address = NULL;
uint16_t Size = NO_DESCRIPTOR;
switch (DescriptorType)
{
case DTYPE_Device:
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
if (!(DescriptorNumber))
{
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = LanguageString.Header.Size;
}
else
{
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = ProductString.Header.Size;
}
break;
}
*DescriptorAddress = Address;
return Size;
}
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
*/
/** \file
*
* Header file for Descriptors.c.
*/
#ifndef _DESCRIPTORS_H_
#define _DESCRIPTORS_H_
/* Includes: */
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
/** Structure for a CDC class Functional descriptor, with a given data size. This is used instead of a
* type define so that the same macro can be used for functional descriptors of varying data lengths,
* while allowing the sizeof() operator to return correct results.
*
* \param DataSize Size of the functional descriptor's data payload, in bytes
*/
#define CDC_FUNCTIONAL_DESCRIPTOR(DataSize) \
struct \
{ \
USB_Descriptor_Header_t Header; \
uint8_t SubType; \
uint8_t Data[DataSize]; \
}
/** Endpoint number for the CDC control interface event notification endpoint. */
#define CDC_NOTIFICATION_EPNUM 3
/** Size of the CDC control interface notification endpoint bank, in bytes */
#define CDC_NOTIFICATION_EPSIZE 8
/** Endpoint number for the CDC data interface TX (data IN) endpoint */
#define CDC_TX_EPNUM 1
/** Endpoint number for the CDC data interface RX (data OUT) endpoint */
#define CDC_RX_EPNUM 2
/** Size of the CDC data interface TX and RX data endpoint banks, in bytes */
#define CDC_TXRX_EPSIZE 16
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
* application code, as the configuration descriptor contains several sub-descriptors which
* vary between devices, and which describe the device's usage to the host.
*/
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t CCI_Interface;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
USB_Descriptor_Endpoint_t ManagementEndpoint;
USB_Descriptor_Interface_t DCI_Interface;
USB_Descriptor_Endpoint_t DataOutEndpoint;
USB_Descriptor_Endpoint_t DataInEndpoint;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
This diff is collapsed.
; Windows LUFA CDC Setup File
; Copyright (c) 2000 Microsoft Corporation
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%COMPANY%
LayoutFile=layout.inf
DriverVer=06/06/2006,1.0.0.0
[Manufacturer]
%MFGNAME% = ManufName
[DestinationDirs]
DefaultDestDir=12
[ManufName]
%Modem3% = Modem3, USB\VID_03EB&PID_204A
;------------------------------------------------------------------------------
; Windows 2000/XP Sections
;------------------------------------------------------------------------------
[Modem3.nt]
CopyFiles=USBModemCopyFileSection
AddReg=Modem3.nt.AddReg
[USBModemCopyFileSection]
usbser.sys,,,0x20
[Modem3.nt.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[Modem3.nt.Services]
AddService=usbser, 0x00000002, DriverService
[DriverService]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys
;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------
[Strings]
COMPANY="LUFA Library"
MFGNAME="Dean Camera"
Modem3="USB AVR109 Bootloader"
SERVICE="USB Virtual Serial Port CDC Driver"
\ No newline at end of file
This diff is collapsed.
<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>
This diff is collapsed.
/*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
*/
/** \file
*
* Header file for BootloaderDFU.c.
*/
#ifndef _BOOTLOADER_H_
#define _BOOTLOADER_H_
/* Includes: */
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/boot.h>
#include <avr/eeprom.h>
#include <stdbool.h>
#include "Descriptors.h"
#include <LUFA/Drivers/USB/USB.h> // USB Functionality
/* Macros: */
/** Major bootloader version number. */
#define BOOTLOADER_VERSION_MINOR 2
/** Minor bootloader version number. */
#define BOOTLOADER_VERSION_REV 0
/** Complete bootloder version number expressed as a packed byte, constructed from the
* two individual bootloader version macros.
*/
#define BOOTLOADER_VERSION ((BOOTLOADER_VERSION_MINOR << 4) | BOOTLOADER_VERSION_REV)