Skip to content
Snippets Groups Projects
Commit 837be5f0 authored by Urs Graf's avatar Urs Graf
Browse files

Improve comments, CDC class is choosen in interface configuration

parent e450da80
No related branches found
No related tags found
No related merge requests found
7.July 2019
28.June 2022
Urs Graf
/src/USBLib contains necessary sources to build a USB library for the
......@@ -16,6 +16,6 @@ Urs Graf
acts as a serial converter from USB to UART (in both
directions).
USB contains the compiled USB library in 2 versions
USB contains the compiled USB library in 3 versions
(for AT90USB1287, ATmega16U4, and ATmega32U4) and the necessary
header file.
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -2,7 +2,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>6.2</ProjectVersion>
<ProjectVersion>7.0</ProjectVersion>
<ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
<ProjectGuid>{2e811222-9a66-4134-86f5-0ab104bf1f6d}</ProjectGuid>
<avrdevice>ATmega16U4</avrdevice>
......@@ -26,96 +26,121 @@
<BootSegment>2</BootSegment>
<eraseonlaunchrule>0</eraseonlaunchrule>
<AsfFrameworkConfig>
<framework-data xmlns="">
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.11.0" />
</dependencies>
</framework-data>
<framework-data>
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.39.0" />
</dependencies>
</framework-data>
</AsfFrameworkConfig>
<avrtool>com.atmel.avrdbg.tool.jtagice3plus</avrtool>
<com_atmel_avrdbg_tool_jtagice3plus>
<ToolOptions>
<InterfaceProperties>
<JtagEnableExtResetOnStartSession>false</JtagEnableExtResetOnStartSession>
<JtagDbgClock>732740</JtagDbgClock>
<JtagDbgClock>1198846</JtagDbgClock>
</InterfaceProperties>
<InterfaceName>JTAG</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.jtagice3plus</ToolType>
<ToolNumber>J30200015468</ToolNumber>
<ToolNumber>J30200020481</ToolNumber>
<ToolName>JTAGICE3</ToolName>
</com_atmel_avrdbg_tool_jtagice3plus>
<avrtoolinterface>JTAG</avrtoolinterface>
<preserveEEPROM>true</preserveEEPROM>
<ResetRule>0</ResetRule>
<EraseKey />
<avrtoolserialnumber>J30200020481</avrtoolserialnumber>
<avrdeviceexpectedsignature>0x1E9488</avrdeviceexpectedsignature>
<avrtoolinterfaceclock>1198846</avrtoolinterfaceclock>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
</AvrGcc>
<avrgcc.common.Device>-mmcu=atmega16u4 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega16u4"</avrgcc.common.Device>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>../../USB/inc</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
<Value>libUSB16U4</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.linker.libraries.LibrarySearchPaths>
<ListValues>
<Value>../../USB/lib</Value>
</ListValues>
</avrgcc.linker.libraries.LibrarySearchPaths>
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
</AvrGcc>
<avrgcc.common.Device>-mmcu=atmega16u4 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega16u4"</avrgcc.common.Device>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>../../../USB/inc</Value>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
<Value>libmega16U4</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.linker.libraries.LibrarySearchPaths>
<ListValues>
<Value>../../../USB/lib</Value>
</ListValues>
</avrgcc.linker.libraries.LibrarySearchPaths>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<ItemGroup>
......
......@@ -5,7 +5,7 @@
<ProjectVersion>7.0</ProjectVersion>
<ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
<ProjectGuid>{f5fd77c4-18fb-498a-bf44-ae4549ff40dd}</ProjectGuid>
<avrdevice>AT90USB1287</avrdevice>
<avrdevice>ATmega32U4</avrdevice>
<avrdeviceseries>none</avrdeviceseries>
<OutputType>StaticLibrary</OutputType>
<Language>C</Language>
......@@ -31,98 +31,98 @@
<eraseonlaunchrule>0</eraseonlaunchrule>
<EraseKey />
<AsfFrameworkConfig>
<framework-data xmlns="">
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.35.1" />
</dependencies>
</framework-data>
<framework-data>
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.39.0" />
</dependencies>
</framework-data>
</AsfFrameworkConfig>
<avrtool />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=at90usb1287 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\gcc\dev\at90usb1287"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
<avrgcc.common.Device>-mmcu=at90usb1287 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\gcc\dev\at90usb1287"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=at90usb1287 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\gcc\dev\at90usb1287"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
<Value>F_CPU=8000000UL</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
</AvrGcc>
<avrgcc.common.Device>-mmcu=at90usb1287 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\gcc\dev\at90usb1287"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
<Value>F_CPU=8000000UL</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.150\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<ItemGroup>
......
......@@ -4,7 +4,10 @@
/*
* Contains complete USB descriptors (device / configuration, interface, endpoint).
* Configures the AVR to work as a CDC device with custom vendor and product id
* 6.4.2016, Urs Graf
* Windows 10 will load the standard usbser.sys driver when detecting a CDC device,
* Linux will enumerate it as ttyACMx.
* Class specification is determined at the interface level!
* 28.6.2022, Urs Graf
*/
#include <inttypes.h>
......@@ -19,16 +22,16 @@
//********** USB device descriptor values **********//
#define USB_DD_bcdUSB 0x0200 // USB specification number
#define USB_DD_bDeviceClass 0x02 // Device class (vendor specific)
#define USB_DD_bDeviceSubClass 0x02 // Device subclass (vendor specific)
#define USB_DD_bDeviceProtocol 0x01 // Device protocol (vendor specific)
#define USB_DD_bDeviceClass 2 // Device class (communications and CDC control)
#define USB_DD_bDeviceSubClass 0 // Device subclass (vendor specific)
#define USB_DD_bDeviceProtocol 0 // Device protocol (vendor specific)
#define USB_DD_bMaxPacketSize0 64 // Maximum packet size for endpoint zero
#define USB_DD_idVendor 0x03EB // Vendor ID (NTB)
#define USB_DD_idProduct 0xAFFE // Product ID (inf SEA-board)
#define USB_DD_idVendor 0x03EB // Vendor ID (Atmel Corporation)
#define USB_DD_idProduct 0xAFFE // Product ID (SEA-board)
#define USB_DD_bcdDevice 0x0600 // Device release number
#define USB_DD_iManufacturer 0x01 // Index of manufacturer string descriptor
#define USB_DD_iProduct 0x02 // Index of product string descriptor
#define USB_DD_iSerialNumber 0x03 // Index of serial number string descriptor
#define USB_DD_iManufacturer 1 // Index of manufacturer string descriptor
#define USB_DD_iProduct 2 // Index of product string descriptor
#define USB_DD_iSerialNumber 3 // Index of serial number string descriptor
#define USB_DD_bNumConfigurations 1 // Number of possible configurations
//********** Configuration definitions **********//
......@@ -44,46 +47,46 @@
#define USB_INT1_bInteraceNumber 0 // Number (identifier) of interface
#define USB_INT1_bAlternateSetting 0 // Value to select alternate setting
#define USB_INT1_bNumEndpoints 3 // Number of endpoints
#define USB_INT1_bInterfaceClass 0x2 // Interface class
#define USB_INT1_bInterfaceSubClass 0x2 // Interface sub class
#define USB_INT1_bInterfaceProtocol 0x1 // Interface protocol
#define USB_INT1_bInterfaceClass 2 // Device class (communications and CDC control)
#define USB_INT1_bInterfaceSubClass 2 // Device subclass (vendor specific)
#define USB_INT1_bInterfaceProtocol 1 // Device protocol (vendor specific)
#define USB_INT1_iInterface 0 // Index of String descriptor
//********** Endpoint definitions **********//
#define USB_EP_TOTAL_NUM 3 // Total number of endpoints (excluding ep zero)
#define USB_EP_TOTAL_NUM 3 // Total number of endpoints (excluding ep zero)
// Device values
#define USB_EP1_NUM EP_1 // Endpoint number (identifier)
#define USB_EP1_TYPE USB_EP_TYPE_INTERRUPT // Endpoint Type
#define USB_EP1_NUM EP_1 // Endpoint number (identifier)
#define USB_EP1_TYPE USB_EP_TYPE_INTERRUPT // Endpoint type
#define USB_EP1_DIR USB_EP_DIR_IN
#define USB_EP1_SIZE EP_SIZE_8
// Descriptor values
#define USB_EP1_bEndpointAddress (USB_EP1_NUM | USB_EP_DIR_INbm) // EP1 is input
#define USB_EP1_bmAttributes USB_EP1_TYPE // Interrupt
#define USB_EP1_wMaxPacketSize 16 // Maximum packet size
#define USB_EP1_bInterval 0x02 // Interval (every second frame)
#define USB_EP1_bmAttributes USB_EP1_TYPE // Interrupt
#define USB_EP1_wMaxPacketSize 16 // Maximum packet size
#define USB_EP1_bInterval 0x02 // Interval (every second frame)
// Device values
#define USB_EP2_NUM EP_2 // Endpoint number (identifier)
#define USB_EP2_TYPE USB_EP_TYPE_BULK // Endpoint Type
#define USB_EP2_NUM EP_2 // Endpoint number (identifier)
#define USB_EP2_TYPE USB_EP_TYPE_BULK // Endpoint Type
#define USB_EP2_DIR USB_EP_DIR_IN
#define USB_EP2_SIZE EP_SIZE_64
// Descriptor values
#define USB_EP2_bEndpointAddress (USB_EP2_NUM | USB_EP_DIR_INbm) // EP2 is input
#define USB_EP2_bmAttributes USB_EP2_TYPE // bulk
#define USB_EP2_wMaxPacketSize 64 // Maximum packet size
#define USB_EP2_bInterval 0x00 // No interval
#define USB_EP2_bmAttributes USB_EP2_TYPE // bulk
#define USB_EP2_wMaxPacketSize 64 // Maximum packet size
#define USB_EP2_bInterval 0x00 // No interval
// Device values
#define USB_EP3_NUM EP_3 // Endpoint number (identifier)
#define USB_EP3_TYPE USB_EP_TYPE_BULK // Endpoint Type
#define USB_EP3_NUM EP_3 // Endpoint number (identifier)
#define USB_EP3_TYPE USB_EP_TYPE_BULK // Endpoint Type
#define USB_EP3_DIR USB_EP_DIR_OUT
#define USB_EP3_SIZE EP_SIZE_64
// Descriptor values
#define USB_EP3_bEndpointAddress USB_EP3_NUM // EP3 is output
#define USB_EP3_bmAttributes USB_EP3_TYPE // bulk
#define USB_EP3_wMaxPacketSize 64 // Maximum packet size
#define USB_EP3_bInterval 0x00 // No interval
#define USB_EP3_bEndpointAddress USB_EP3_NUM // EP3 is output
#define USB_EP3_bmAttributes USB_EP3_TYPE // bulk
#define USB_EP3_wMaxPacketSize 64 // Maximum packet size
#define USB_EP3_bInterval 0x00 // No interval
//********** Get Status definitions **********//
// USB Spec 9.4.5 (Get Status)
......@@ -97,18 +100,15 @@
//********** USB string descriptor values **********//
#define USB_SD_MANUFACTURER_NAME_LENGTH 10
#define USB_SD_MANUFACTURER_NAME_LENGTH 7
#define USB_SD_MANUFACTURER_NAME \
{ USB_unicode('i') \
, USB_unicode('n') \
, USB_unicode('f') \
, USB_unicode('.') \
, USB_unicode('n') \
, USB_unicode('t') \
, USB_unicode('b') \
, USB_unicode('.') \
, USB_unicode('c') \
, USB_unicode('h') \
{ USB_unicode('O') \
, USB_unicode('S') \
, USB_unicode('T') \
, USB_unicode(' ') \
, USB_unicode('I') \
, USB_unicode('N') \
, USB_unicode('F') \
}
#define USB_SD_PRODUCT_NAME_LENGTH 12
......
......@@ -3,7 +3,7 @@
/*
* Definitions for USB descriptors.
* 15.4.2015, Urs Graf
* 28.6.2022, Urs Graf
*/
#include "typedefs.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment