rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Variables
usbdescriptors.h File Reference

Detailed Description

USB Descriptors File

History:

Definition in file usbdescriptors.h.

Variables

const uint8_t au8DeviceDescriptor [18]
 
const uint8_t au8ConfigDescriptor [53]
 
const uint8_t au8ReportDescriptor0 [1] = { 0 }
 
const uint8_t au8ReportDescriptor1 [1] = { 0 }
 
const uint8_t au8ReportDescriptor2 [1] = { 0 }
 
const stc_usbdevice_stringdescriptor_t pstcStringDescriptors []
 
const stc_usbdevice_reportdescriptor_t astcReportDescriptors [3]
 

Variable Documentation

◆ astcReportDescriptors

const stc_usbdevice_reportdescriptor_t astcReportDescriptors[3]
Initial value:
=
{
}
const uint8_t au8ReportDescriptor0[1]
const uint8_t au8ReportDescriptor2[1]
const uint8_t au8ReportDescriptor1[1]

Definition at line 175 of file usbdescriptors.h.

176{
177 {(uint8_t*)au8ReportDescriptor0,sizeof(au8ReportDescriptor0)},
178 {(uint8_t*)au8ReportDescriptor1,sizeof(au8ReportDescriptor1)},
179 {(uint8_t*)au8ReportDescriptor2,sizeof(au8ReportDescriptor2)},
180};

Referenced by UsbConfig_UsbInit().

◆ au8ConfigDescriptor

const uint8_t au8ConfigDescriptor[53]

Definition at line 99 of file usbdescriptors.h.

100{ ///NEW CONFIG DESCRIPTOR(1)
101 0x09, ///bLength: Length of this descriptor
102 0x02, ///bDescriptorType: Config Descriptor Type
103 0x35, ///wTotalLength: Total Length with all interface- and endpoint descriptors
104 0x00, ///wTotalLength: Total Length with all interface- and endpoint descriptors
105 0x02, ///bNumInterfaces: Number of interfaces
106 0x01, ///iConfigurationValue: Number of this configuration
107 0x00, ///iConfiguration: String index of this configuration
108 0xC0, ///bmAttributes: Bus-Powered, Remote-Wakeup not supported
109 0xFA, ///MaxPower: (in 2mA)
110 ///NEW INTERFACE DESCRIPTOR(0)
111 0x09, ///bLength: Length of this descriptor
112 0x04, ///bDescriptorType: Interface Descriptor Type
113 0x00, ///bInterfaceNumber: Interface Number
114 0x00, ///bAlternateSetting: Alternate setting for this interface
115 0x01, ///bNumEndpoints: Number of endpoints in this interface excluding endpoint 0
116 0x02, ///iInterfaceClass: Class Code: COMMUNICATIONS_AND_CDC_CONTROL
117 0x02, ///iInterfaceSubClass: SubClass Code
118 0x01, ///bInterfaceProtocol: Protocol Code
119 0x00, ///iInterface: String index
120 ///NEW FUNCTION DESCRIPTOR(0)
121 0x05, ///bLength: Length of this descriptor
122 0x24, ///bDescriptorType: Class Specific Interface Descriptor Type
123 0x06, ///bDescriptorSubtype: Union Functional descriptor
124 0x00, ///Master Interface (Control)
125 0x01, ///Slave Interface (Data)
126 ///NEW ENDPOINT DESCRIPTOR(1)
127 0x07, ///bLength: Length of this descriptor
128 0x05, ///bDescriptorType: Endpoint Descriptor Type
129 0x82, ///bEndpointAddress: Endpoint address (IN,EP2)
130 0x03, ///bmAttributes: Transfer Type: INTERRUPT_TRANSFER
131 0x40, ///wMaxPacketSize: Endpoint Size
132 0x00, ///wMaxPacketSize: Endpoint Size
133 0xFF, ///bIntervall: Polling Intervall
134 ///NEW INTERFACE DESCRIPTOR(1)
135 0x09, ///bLength: Length of this descriptor
136 0x04, ///bDescriptorType: Interface Descriptor Type
137 0x01, ///bInterfaceNumber: Interface Number
138 0x00, ///bAlternateSetting: Alternate setting for this interface
139 0x02, ///bNumEndpoints: Number of endpoints in this interface excluding endpoint 0
140 0x0A, ///iInterfaceClass: Class Code: CDC_DATA
141 0x00, ///iInterfaceSubClass: SubClass Code
142 0x00, ///bInterfaceProtocol: Protocol Code
143 0x00, ///iInterface: String index
144 ///NEW ENDPOINT DESCRIPTOR(0)
145 0x07, ///bLength: Length of this descriptor
146 0x05, ///bDescriptorType: Endpoint Descriptor Type
147 0x03, ///bEndpointAddress: Endpoint address (OUT,EP3)
148 0x02, ///bmAttributes: Transfer Type: BULK_TRANSFER
149 0x40, ///wMaxPacketSize: Endpoint Size
150 0x00, ///wMaxPacketSize: Endpoint Size
151 0x00, ///bIntervall: Polling Intervall
152 ///NEW ENDPOINT DESCRIPTOR(1)
153 0x07, ///bLength: Length of this descriptor
154 0x05, ///bDescriptorType: Endpoint Descriptor Type
155 0x81, ///bEndpointAddress: Endpoint address (IN,EP1)
156 0x02, ///bmAttributes: Transfer Type: BULK_TRANSFER
157 0x40, ///wMaxPacketSize: Endpoint Size
158 0x00, ///wMaxPacketSize: Endpoint Size
159 0x00 ///bIntervall: Polling Intervall
160};

Referenced by UsbConfig_UsbInit().

◆ au8DeviceDescriptor

const uint8_t au8DeviceDescriptor[18]
Initial value:
=
{
0x12,
0x01,
0x10,
0x01,
0x02,
0x00,
0x00,
0x40,
0x83,
0x04,
0x40,
0x57,
0x00,
0x02,
0x01,
0x02,
0x03,
0x01
}

Definition at line 76 of file usbdescriptors.h.

77{
78 ///DEVICE DESCRIPTOR
79 0x12, ///bLength: Length of this descriptor
80 0x01, ///bDescriptorType: Device Descriptor Type
81 0x10, ///bcdUSB: USB Version
82 0x01, ///bcdUSB: USB Version
83 0x02, ///bDeviceClass: Class Code: COMMUNICATIONS_AND_CDC_CONTROL
84 0x00, ///bDeviceSubClass: Sub Class Code
85 0x00, ///bDeviceProtocol: Protocol Code
86 0x40, ///bMaxPacketSize0: Maximum size of endpoint 0
87 0x83, ///idVendor: Vendor ID
88 0x04, ///idVendor: Vendor ID
89 0x40, ///idProduct: Product ID
90 0x57, ///idProduct: Product ID
91 0x00, ///bcdDevice: Release Number
92 0x02, ///bcdDevice: Release Number
93 0x01, ///iManufacture: String-Index of Manufacture
94 0x02, ///iProduct: String-Index of Product
95 0x03, ///iSerialNumber: String-Index of Serial Number
96 0x01 ///bNumConfigurations: Number of possible configurations
97};

Referenced by UsbConfig_UsbInit().

◆ au8ReportDescriptor0

const uint8_t au8ReportDescriptor0[1] = { 0 }

Definition at line 162 of file usbdescriptors.h.

162{ 0 }; // Not used

◆ au8ReportDescriptor1

const uint8_t au8ReportDescriptor1[1] = { 0 }

Definition at line 163 of file usbdescriptors.h.

163{ 0 }; // Not used

◆ au8ReportDescriptor2

const uint8_t au8ReportDescriptor2[1] = { 0 }

Definition at line 164 of file usbdescriptors.h.

164{ 0 }; // Not used

◆ pstcStringDescriptors

const stc_usbdevice_stringdescriptor_t pstcStringDescriptors[]
Initial value:
=
{
{(uint8_t*)"Spansion International Inc.",NULL},
{(uint8_t*)"rusEFI ECU Comm Port",NULL},
{(uint8_t*)"1.0",NULL},
}

Definition at line 167 of file usbdescriptors.h.

168{
169{(uint8_t*)"Spansion International Inc.",NULL}, //Manufacturer String
170{(uint8_t*)"rusEFI ECU Comm Port",NULL}, //Product String
171{(uint8_t*)"1.0",NULL}, //Serial Number String
172};

Referenced by UsbConfig_UsbInit().

Go to the source code of this file.