📄 usbprinterdriverdescriptors.lst
字号:
\ configurationDescriptors:
\ 00000000 0902 DC8 9, 2
\ 00000002 2000 DC16 32
\ 00000004 010100C03209 DC8 1, 1, 0, 192, 50, 9, 4, 0, 0, 2, 7, 1, 2, 0, 7, 5, 1, 2
\ 040000020701
\ 020007050102
\ 00000016 4000 DC16 64
\ 00000018 0007058202 DC8 0, 7, 5, 130, 2
\ 0000001D 4000 DC16 64
\ 0000001F 00 DC8 0
115
116 // Standard configuration descriptor
117 {
118 sizeof(USBConfigurationDescriptor),
119 USBGenericDescriptor_CONFIGURATION,
120 sizeof(USBPrinterDriverConfigurationDescriptors),
121 1, // There are one interfaces in this configuration
122 1, // This is configuration #1
123 0, // No string descriptor for this configuration
124 BOARD_USB_BMATTRIBUTES,
125 USBConfigurationDescriptor_POWER(100)
126 },
127 // Data class interface standard descriptor
128 {
129 sizeof(USBInterfaceDescriptor),
130 USBGenericDescriptor_INTERFACE,
131 0, // This is interface #0
132 0, // This is alternate setting #0 for this interface
133 2, // This interface uses 2 endpoints
134 USBPrintDataInterfaceDescriptor_CLASS,
135 USBPrintDataInterfaceDescriptor_SUBCLASS,
136 USBPrintDataInterfaceDescriptor_PROTOCOL,
137 0 // No string descriptor for this interface
138 },
139 // Bulk-OUT endpoint standard descriptor
140 {
141 sizeof(USBEndpointDescriptor),
142 USBGenericDescriptor_ENDPOINT,
143 USBEndpointADDR_OUT,
144 USBEndpointDescriptor_BULK,
145 MIN(BOARD_USB_ENDPOINTS_MAXPACKETSIZE(USBPrinterDriverDescriptors_DATAOUT),
146 USBEndpointDescriptor_MAXBULKSIZE_FS),
147 0 // Must be 0 for full-speed bulk endpoints
148 },
149 // Bulk-IN endpoint descriptor
150 {
151 sizeof(USBEndpointDescriptor),
152 USBGenericDescriptor_ENDPOINT,
153 USBEndpointADDR_IN,
154 USBEndpointDescriptor_BULK,
155 MIN(BOARD_USB_ENDPOINTS_MAXPACKETSIZE(USBPrinterDriverDescriptors_DATAIN),
156 USBEndpointDescriptor_MAXBULKSIZE_FS),
157 0 // Must be 0 for full-speed bulk endpoints
158 },
159 };
160
161 /// Language ID string descriptor
\ In section .rodata, align 4
162 const unsigned char languageIdStringDescriptor[] = {
\ languageIdStringDescriptor:
\ 00000000 04030904 DC8 4, 3, 9, 4
163
164 USBStringDescriptor_LENGTH(1),
165 USBGenericDescriptor_STRING,
166 USBStringDescriptor_ENGLISH_US
167 };
168 /// Product string descriptor
\ In section .rodata, align 4
169 const unsigned char productStringDescriptor[] = {
\ productStringDescriptor:
\ 00000000 1A0353005400 DC8 26, 3, 83, 0, 84, 0, 65, 0, 82, 0, 95, 0, 80, 0, 82, 0, 73, 0, 78
\ 410052005F00
\ 500052004900
\ 4E
\ 00000013 005400450052 DC8 0, 84, 0, 69, 0, 82, 0, 0, 0
\ 000000
170
171 USBStringDescriptor_LENGTH(12),
172 USBGenericDescriptor_STRING,
173 USBStringDescriptor_UNICODE('S'),
174 USBStringDescriptor_UNICODE('T'),
175 USBStringDescriptor_UNICODE('A'),
176 USBStringDescriptor_UNICODE('R'),
177 USBStringDescriptor_UNICODE('_'),
178 USBStringDescriptor_UNICODE('P'),
179 USBStringDescriptor_UNICODE('R'),
180 USBStringDescriptor_UNICODE('I'),
181 USBStringDescriptor_UNICODE('N'),
182 USBStringDescriptor_UNICODE('T'),
183 USBStringDescriptor_UNICODE('E'),
184 USBStringDescriptor_UNICODE('R'),
185 };
186
187 /// List of string descriptors used by the device
\ In section .data, align 4
188 const unsigned char *stringDescriptors[] = {
\ stringDescriptors:
\ 00000000 ............ DC32 languageIdStringDescriptor, productStringDescriptor
\ ....
189
190 languageIdStringDescriptor,
191 productStringDescriptor,
192 };
193
194 /// List of standard descriptors for the serial driver.
\ In section .data, align 4
195 USBDDriverDescriptors usbPrinterDriverDescriptors = {
\ usbPrinterDriverDescriptors:
\ 00000000 ............ DC32 deviceDescriptor, configurationDescriptors, 0H, 0H, 0H, 0H, 0H, 0H
\ ....00000000
\ 000000000000
\ 000000000000
\ 000000000000
\ 0000
\ 00000020 ........ DC32 stringDescriptors
\ 00000024 02000000 DC8 2, 0, 0, 0
196
197 &deviceDescriptor,
198 (USBConfigurationDescriptor *) &(configurationDescriptors),
199 #ifdef BOARD_USB_UDPHS
200 &qualifierDescriptor,
201 (USBConfigurationDescriptor *) &(otherSpeedDescriptorsFS),
202 &deviceDescriptor,
203 (USBConfigurationDescriptor *) &(configurationDescriptorsHS),
204 &qualifierDescriptor,
205 (USBConfigurationDescriptor *) &(otherSpeedDescriptorsHS),
206 #else
207 0, // No full-speed device qualifier descriptor
208 0, // No full-speed other speed configuration
209 0, // No high-speed device descriptor
210 0, // No high-speed configuration descriptor
211 0, // No high-speed device qualifier descriptor
212 0, // No high-speed other speed configuration descriptor
213
214 #endif
215 stringDescriptors,
216 2 // 2 string descriptors in list
217 };
218
Section sizes:
Function/Label Bytes
-------------- -----
deviceDescriptor 20
configurationDescriptors 32
languageIdStringDescriptor 4
productStringDescriptor 28
stringDescriptors 8
usbPrinterDriverDescriptors 40
48 bytes in section .data
84 bytes in section .rodata
84 bytes of CONST memory
48 bytes of DATA memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -