2 AudioInputHost.elf: file format elf32-avr
5 Idx Name Size VMA LMA File off Algn
6 0 .data 0000001c 00800100 000018fa 0000198e 2**0
7 CONTENTS, ALLOC, LOAD, DATA
8 1 .text 000018fa 00000000 00000000 00000094 2**1
9 CONTENTS, ALLOC, LOAD, READONLY, CODE
10 2 .bss 00000024 0080011c 0080011c 000019aa 2**0
12 3 .stab 00000e28 00000000 00000000 000019ac 2**2
13 CONTENTS, READONLY, DEBUGGING
14 4 .stabstr 0000026b 00000000 00000000 000027d4 2**0
15 CONTENTS, READONLY, DEBUGGING
16 5 .debug_aranges 000003b0 00000000 00000000 00002a3f 2**0
17 CONTENTS, READONLY, DEBUGGING
18 6 .debug_pubnames 0000089a 00000000 00000000 00002def 2**0
19 CONTENTS, READONLY, DEBUGGING
20 7 .debug_info 000056c7 00000000 00000000 00003689 2**0
21 CONTENTS, READONLY, DEBUGGING
22 8 .debug_abbrev 00001b65 00000000 00000000 00008d50 2**0
23 CONTENTS, READONLY, DEBUGGING
24 9 .debug_line 000053bf 00000000 00000000 0000a8b5 2**0
25 CONTENTS, READONLY, DEBUGGING
26 10 .debug_frame 00000540 00000000 00000000 0000fc74 2**2
27 CONTENTS, READONLY, DEBUGGING
28 11 .debug_str 000026bf 00000000 00000000 000101b4 2**0
29 CONTENTS, READONLY, DEBUGGING
30 12 .debug_loc 00003422 00000000 00000000 00012873 2**0
31 CONTENTS, READONLY, DEBUGGING
32 13 .debug_pubtypes 00000a86 00000000 00000000 00015c95 2**0
33 CONTENTS, READONLY, DEBUGGING
34 14 .debug_ranges 00000490 00000000 00000000 0001671b 2**0
35 CONTENTS, READONLY, DEBUGGING
37 Disassembly of section .text:
40 0: 51 c1 rjmp .+674 ; 0x2a4 <__ctors_end>
42 4: 6d c1 rjmp .+730 ; 0x2e0 <__bad_interrupt>
44 8: 6b c1 rjmp .+726 ; 0x2e0 <__bad_interrupt>
46 c: 69 c1 rjmp .+722 ; 0x2e0 <__bad_interrupt>
48 10: 67 c1 rjmp .+718 ; 0x2e0 <__bad_interrupt>
50 14: 65 c1 rjmp .+714 ; 0x2e0 <__bad_interrupt>
52 18: 63 c1 rjmp .+710 ; 0x2e0 <__bad_interrupt>
54 1c: 61 c1 rjmp .+706 ; 0x2e0 <__bad_interrupt>
56 20: 5f c1 rjmp .+702 ; 0x2e0 <__bad_interrupt>
58 24: 5d c1 rjmp .+698 ; 0x2e0 <__bad_interrupt>
60 28: d5 c6 rjmp .+3498 ; 0xdd4 <__vector_10>
62 2c: 59 c1 rjmp .+690 ; 0x2e0 <__bad_interrupt>
64 30: 57 c1 rjmp .+686 ; 0x2e0 <__bad_interrupt>
66 34: 55 c1 rjmp .+682 ; 0x2e0 <__bad_interrupt>
68 38: 53 c1 rjmp .+678 ; 0x2e0 <__bad_interrupt>
70 3c: 51 c1 rjmp .+674 ; 0x2e0 <__bad_interrupt>
72 40: 4f c1 rjmp .+670 ; 0x2e0 <__bad_interrupt>
74 44: 4d c1 rjmp .+666 ; 0x2e0 <__bad_interrupt>
76 48: 4b c1 rjmp .+662 ; 0x2e0 <__bad_interrupt>
78 4c: 49 c1 rjmp .+658 ; 0x2e0 <__bad_interrupt>
80 50: 47 c1 rjmp .+654 ; 0x2e0 <__bad_interrupt>
82 54: 8b c2 rjmp .+1302 ; 0x56c <__vector_21>
84 58: 43 c1 rjmp .+646 ; 0x2e0 <__bad_interrupt>
86 5c: 41 c1 rjmp .+642 ; 0x2e0 <__bad_interrupt>
88 60: 3f c1 rjmp .+638 ; 0x2e0 <__bad_interrupt>
90 64: 3d c1 rjmp .+634 ; 0x2e0 <__bad_interrupt>
92 68: 3b c1 rjmp .+630 ; 0x2e0 <__bad_interrupt>
94 6c: 39 c1 rjmp .+626 ; 0x2e0 <__bad_interrupt>
96 70: 37 c1 rjmp .+622 ; 0x2e0 <__bad_interrupt>
98 74: 35 c1 rjmp .+618 ; 0x2e0 <__bad_interrupt>
100 78: 33 c1 rjmp .+614 ; 0x2e0 <__bad_interrupt>
102 7c: 31 c1 rjmp .+610 ; 0x2e0 <__bad_interrupt>
104 80: 2f c1 rjmp .+606 ; 0x2e0 <__bad_interrupt>
106 84: 2d c1 rjmp .+602 ; 0x2e0 <__bad_interrupt>
108 88: 2b c1 rjmp .+598 ; 0x2e0 <__bad_interrupt>
110 8c: 29 c1 rjmp .+594 ; 0x2e0 <__bad_interrupt>
112 90: 27 c1 rjmp .+590 ; 0x2e0 <__bad_interrupt>
114 94: 25 c1 rjmp .+586 ; 0x2e0 <__bad_interrupt>
118 98: 4d 69 63 72 6f 70 68 6f 6e 65 20 45 6e 75 6d 65 Microphone Enume
119 a8: 72 61 74 65 64 2e 0d 0a 00 rated....
122 b1: 1b 5b 33 31 6d 43 6f 75 6c 64 20 6e 6f 74 20 73 .[31mCould not s
123 c1: 65 74 20 61 6c 74 65 72 6e 61 74 69 76 65 20 73 et alternative s
124 d1: 74 72 65 61 6d 69 6e 67 20 69 6e 74 65 72 66 61 treaming interfa
125 e1: 63 65 20 73 65 74 74 69 6e 67 2e 0d 0a 20 2d 2d ce setting... --
126 f1: 20 45 72 72 6f 72 20 43 6f 64 65 3a 20 25 64 0d Error Code: %d.
127 101: 0a 1b 5b 33 37 6d 00 ..[37m.
130 108: 1b 5b 33 31 6d 43 6f 6e 74 72 6f 6c 20 45 72 72 .[31mControl Err
131 118: 6f 72 20 28 53 65 74 20 43 6f 6e 66 69 67 75 72 or (Set Configur
132 128: 61 74 69 6f 6e 29 2e 0d 0a 20 2d 2d 20 45 72 72 ation)... -- Err
133 138: 6f 72 20 43 6f 64 65 3a 20 25 64 0d 0a 1b 5b 33 or Code: %d...[3
137 14b: 20 2d 2d 20 45 72 72 6f 72 20 43 6f 64 65 3a 20 -- Error Code:
138 15b: 25 64 0d 0a 1b 5b 33 37 6d 00 %d...[37m.
141 165: 1b 5b 33 31 6d 49 6e 76 61 6c 69 64 20 44 65 76 .[31mInvalid Dev
142 175: 69 63 65 2e 0d 0a 00 ice....
145 17c: 1b 5b 33 31 6d 43 6f 6e 74 72 6f 6c 20 45 72 72 .[31mControl Err
146 18c: 6f 72 20 28 47 65 74 20 43 6f 6e 66 69 67 75 72 or (Get Configur
147 19c: 61 74 69 6f 6e 29 2e 0d 0a 00 ation)....
150 1a6: 47 65 74 74 69 6e 67 20 43 6f 6e 66 69 67 20 44 Getting Config D
151 1b6: 61 74 61 2e 0d 0a 00 ata....
154 1bd: 1b 5b 33 31 6d 44 65 76 20 45 6e 75 6d 20 45 72 .[31mDev Enum Er
155 1cd: 72 6f 72 0d 0a 20 2d 2d 20 45 72 72 6f 72 20 43 ror.. -- Error C
156 1dd: 6f 64 65 20 25 64 0d 0a 20 2d 2d 20 53 75 62 20 ode %d.. -- Sub
157 1ed: 45 72 72 6f 72 20 43 6f 64 65 20 25 64 0d 0a 20 Error Code %d..
158 1fd: 2d 2d 20 49 6e 20 53 74 61 74 65 20 25 64 0d 0a -- In State %d..
159 20d: 1b 5b 33 37 6d 00 .[37m.
162 213: 1b 5b 33 31 6d 48 6f 73 74 20 4d 6f 64 65 20 45 .[31mHost Mode E
163 223: 72 72 6f 72 0d 0a 20 2d 2d 20 45 72 72 6f 72 20 rror.. -- Error
164 233: 43 6f 64 65 20 25 64 0d 0a 1b 5b 33 37 6d 00 Code %d...[37m.
167 242: 1b 5b 33 32 6d 44 65 76 69 63 65 20 55 6e 61 74 .[32mDevice Unat
168 252: 74 61 63 68 65 64 2e 0d 0a 1b 5b 33 37 6d 00 tached....[37m.
171 261: 1b 5b 33 32 6d 44 65 76 69 63 65 20 41 74 74 61 .[32mDevice Atta
172 271: 63 68 65 64 2e 0d 0a 1b 5b 33 37 6d 00 ched....[37m.
175 27e: 1b 5b 33 36 6d 41 75 64 69 6f 20 48 6f 73 74 20 .[36mAudio Host
176 28e: 44 65 6d 6f 20 72 75 6e 6e 69 6e 67 2e 0d 0a 1b Demo running....
177 29e: 5b 33 37 6d 00 00 [37m..
179 000002a4 <__ctors_end>:
180 2a4: 11 24 eor r1, r1
181 2a6: 1f be out 0x3f, r1 ; 63
182 2a8: cf ef ldi r28, 0xFF ; 255
183 2aa: d0 e2 ldi r29, 0x20 ; 32
184 2ac: de bf out 0x3e, r29 ; 62
185 2ae: cd bf out 0x3d, r28 ; 61
187 000002b0 <__do_copy_data>:
188 2b0: 11 e0 ldi r17, 0x01 ; 1
189 2b2: a0 e0 ldi r26, 0x00 ; 0
190 2b4: b1 e0 ldi r27, 0x01 ; 1
191 2b6: ea ef ldi r30, 0xFA ; 250
192 2b8: f8 e1 ldi r31, 0x18 ; 24
193 2ba: 00 e0 ldi r16, 0x00 ; 0
194 2bc: 0b bf out 0x3b, r16 ; 59
195 2be: 02 c0 rjmp .+4 ; 0x2c4 <__do_copy_data+0x14>
196 2c0: 07 90 elpm r0, Z+
198 2c4: ac 31 cpi r26, 0x1C ; 28
199 2c6: b1 07 cpc r27, r17
200 2c8: d9 f7 brne .-10 ; 0x2c0 <__do_copy_data+0x10>
202 000002ca <__do_clear_bss>:
203 2ca: 11 e0 ldi r17, 0x01 ; 1
204 2cc: ac e1 ldi r26, 0x1C ; 28
205 2ce: b1 e0 ldi r27, 0x01 ; 1
206 2d0: 01 c0 rjmp .+2 ; 0x2d4 <.do_clear_bss_start>
208 000002d2 <.do_clear_bss_loop>:
211 000002d4 <.do_clear_bss_start>:
212 2d4: a0 34 cpi r26, 0x40 ; 64
213 2d6: b1 07 cpc r27, r17
214 2d8: e1 f7 brne .-8 ; 0x2d2 <.do_clear_bss_loop>
215 2da: 3e d1 rcall .+636 ; 0x558 <main>
216 2dc: 0c 94 7b 0c jmp 0x18f6 ; 0x18f6 <_exit>
218 000002e0 <__bad_interrupt>:
219 2e0: 8f ce rjmp .-738 ; 0x0 <__vectors>
221 000002e2 <LEDs_SetAllLEDs>:
225 static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
227 PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
228 2e2: 9b b1 in r25, 0x0b ; 11
229 2e4: 9f 70 andi r25, 0x0F ; 15
230 2e6: 98 2b or r25, r24
231 2e8: 9b b9 out 0x0b, r25 ; 11
235 000002ec <SetupHardware>:
237 /** Configures the board hardware and chip peripherals for the demo's functionality. */
238 void SetupHardware(void)
240 /* Disable watchdog if enabled by bootloader/fuses */
241 MCUSR &= ~(1 << WDRF);
242 2ec: 84 b7 in r24, 0x34 ; 52
243 2ee: 87 7f andi r24, 0xF7 ; 247
244 2f0: 84 bf out 0x34, r24 ; 52
246 2f2: 28 e1 ldi r18, 0x18 ; 24
247 2f4: 0f b6 in r0, 0x3f ; 63
249 2f8: 20 93 60 00 sts 0x0060, r18
250 2fc: 10 92 60 00 sts 0x0060, r1
251 300: 0f be out 0x3f, r0 ; 63
252 The type of x is clock_div_t.
254 void clock_prescale_set(clock_div_t __x)
256 uint8_t __tmp = _BV(CLKPCE);
257 __asm__ __volatile__ (
258 302: 90 e0 ldi r25, 0x00 ; 0
259 304: 80 e8 ldi r24, 0x80 ; 128
260 306: 0f b6 in r0, 0x3f ; 63
262 30a: 80 93 61 00 sts 0x0061, r24
263 30e: 90 93 61 00 sts 0x0061, r25
264 312: 0f be out 0x3f, r0 ; 63
265 * \param[in] DoubleSpeed Enables double speed mode when set, halving the sample time to double the baud rate.
267 static inline void Serial_Init(const uint32_t BaudRate,
268 const bool DoubleSpeed)
270 UBRR1 = (DoubleSpeed ? SERIAL_2X_UBBRVAL(BaudRate) : SERIAL_UBBRVAL(BaudRate));
271 314: 83 e3 ldi r24, 0x33 ; 51
272 316: 90 e0 ldi r25, 0x00 ; 0
273 318: 90 93 cd 00 sts 0x00CD, r25
274 31c: 80 93 cc 00 sts 0x00CC, r24
276 UCSR1C = ((1 << UCSZ11) | (1 << UCSZ10));
277 320: 86 e0 ldi r24, 0x06 ; 6
278 322: 80 93 ca 00 sts 0x00CA, r24
279 UCSR1A = (DoubleSpeed ? (1 << U2X1) : 0);
280 326: 10 92 c8 00 sts 0x00C8, r1
281 UCSR1B = ((1 << TXEN1) | (1 << RXEN1));
282 32a: 20 93 c9 00 sts 0x00C9, r18
285 32e: 53 9a sbi 0x0a, 3 ; 10
287 330: 5a 9a sbi 0x0b, 2 ; 11
289 /* Inline Functions: */
290 #if !defined(__DOXYGEN__)
291 static inline void LEDs_Init(void)
293 DDRD |= LEDS_ALL_LEDS;
294 332: 8a b1 in r24, 0x0a ; 10
295 334: 80 6f ori r24, 0xF0 ; 240
296 336: 8a b9 out 0x0a, r24 ; 10
297 PORTD &= ~LEDS_ALL_LEDS;
298 338: 8b b1 in r24, 0x0b ; 11
299 33a: 8f 70 andi r24, 0x0F ; 15
300 33c: 8b b9 out 0x0b, r24 ; 11
301 clock_prescale_set(clock_div_1);
303 /* Hardware Initialization */
304 Serial_Init(9600, false);
307 33e: 34 d5 rcall .+2664 ; 0xda8 <USB_Init>
308 static inline void Serial_CreateStream(FILE* Stream)
312 Stream = &USARTSerialStream;
314 340: ec e2 ldi r30, 0x2C ; 44
315 342: f1 e0 ldi r31, 0x01 ; 1
316 344: f0 93 3b 01 sts 0x013B, r31
317 348: e0 93 3a 01 sts 0x013A, r30
319 34c: f0 93 3d 01 sts 0x013D, r31
320 350: e0 93 3c 01 sts 0x013C, r30
323 *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar, _FDEV_SETUP_RW);
324 354: 8e e0 ldi r24, 0x0E ; 14
325 356: df 01 movw r26, r30
328 35c: e9 f7 brne .-6 ; 0x358 <SetupHardware+0x6c>
329 35e: 83 e0 ldi r24, 0x03 ; 3
330 360: 80 93 2f 01 sts 0x012F, r24
331 364: 85 e6 ldi r24, 0x65 ; 101
332 366: 99 e0 ldi r25, 0x09 ; 9
333 368: 90 93 35 01 sts 0x0135, r25
334 36c: 80 93 34 01 sts 0x0134, r24
335 370: 8e e6 ldi r24, 0x6E ; 110
336 372: 99 e0 ldi r25, 0x09 ; 9
337 374: 90 93 37 01 sts 0x0137, r25
338 378: 80 93 36 01 sts 0x0136, r24
340 /* Create a stdio stream for the serial port for stdin and stdout */
341 Serial_CreateStream(NULL);
345 0000037e <EVENT_USB_Host_DeviceAttached>:
346 /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
347 * starts the library USB task to begin the enumeration and USB management process.
349 void EVENT_USB_Host_DeviceAttached(void)
351 puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
352 37e: 81 e6 ldi r24, 0x61 ; 97
353 380: 92 e0 ldi r25, 0x02 ; 2
354 382: de d7 rcall .+4028 ; 0x1340 <puts_P>
355 LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
356 384: 80 ea ldi r24, 0xA0 ; 160
358 386: ad cf rjmp .-166 ; 0x2e2 <LEDs_SetAllLEDs>
360 00000388 <EVENT_USB_Host_DeviceUnattached>:
361 /** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
362 * stops the library USB task management process.
364 void EVENT_USB_Host_DeviceUnattached(void)
366 puts_P(PSTR(ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE));
367 388: 82 e4 ldi r24, 0x42 ; 66
368 38a: 92 e0 ldi r25, 0x02 ; 2
369 38c: d9 d7 rcall .+4018 ; 0x1340 <puts_P>
370 LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
371 38e: 80 e1 ldi r24, 0x10 ; 16
373 390: a8 cf rjmp .-176 ; 0x2e2 <LEDs_SetAllLEDs>
375 00000392 <EVENT_USB_Host_DeviceEnumerationComplete>:
376 /** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
377 * enumerated by the host and is now ready to be used by the application.
379 void EVENT_USB_Host_DeviceEnumerationComplete(void)
381 LEDs_SetAllLEDs(LEDMASK_USB_READY);
382 392: 80 e6 ldi r24, 0x60 ; 96
384 394: a6 cf rjmp .-180 ; 0x2e2 <LEDs_SetAllLEDs>
386 00000396 <EVENT_USB_Host_HostError>:
388 /** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
389 void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
394 39c: cd b7 in r28, 0x3d ; 61
395 39e: de b7 in r29, 0x3e ; 62
397 3a0: 89 83 std Y+1, r24 ; 0x01
398 3a2: 9c d4 rcall .+2360 ; 0xcdc <USB_Disable>
400 printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"
401 3a4: 00 d0 rcall .+0 ; 0x3a6 <EVENT_USB_Host_HostError+0x10>
402 3a6: 00 d0 rcall .+0 ; 0x3a8 <EVENT_USB_Host_HostError+0x12>
403 3a8: ed b7 in r30, 0x3d ; 61
404 3aa: fe b7 in r31, 0x3e ; 62
405 3ac: 31 96 adiw r30, 0x01 ; 1
406 3ae: 23 e1 ldi r18, 0x13 ; 19
407 3b0: 32 e0 ldi r19, 0x02 ; 2
408 3b2: ad b7 in r26, 0x3d ; 61
409 3b4: be b7 in r27, 0x3e ; 62
410 3b6: 12 96 adiw r26, 0x02 ; 2
412 3ba: 2e 93 st -X, r18
413 3bc: 11 97 sbiw r26, 0x01 ; 1
414 3be: 89 81 ldd r24, Y+1 ; 0x01
415 3c0: 82 83 std Z+2, r24 ; 0x02
416 3c2: 13 82 std Z+3, r1 ; 0x03
417 3c4: 9e d7 rcall .+3900 ; 0x1302 <printf_P>
418 " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);
420 LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
425 3ce: 80 e9 ldi r24, 0x90 ; 144
426 3d0: 88 df rcall .-240 ; 0x2e2 <LEDs_SetAllLEDs>
427 3d2: ff cf rjmp .-2 ; 0x3d2 <EVENT_USB_Host_HostError+0x3c>
429 000003d4 <EVENT_USB_Host_DeviceEnumerationFailed>:
430 * enumerating an attached USB device.
432 void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
433 const uint8_t SubErrorCode)
435 printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"
436 3d4: 90 91 2b 01 lds r25, 0x012B
437 3d8: 2d b7 in r18, 0x3d ; 61
438 3da: 3e b7 in r19, 0x3e ; 62
439 3dc: 28 50 subi r18, 0x08 ; 8
440 3de: 30 40 sbci r19, 0x00 ; 0
441 3e0: 0f b6 in r0, 0x3f ; 63
443 3e4: 3e bf out 0x3e, r19 ; 62
444 3e6: 0f be out 0x3f, r0 ; 63
445 3e8: 2d bf out 0x3d, r18 ; 61
446 3ea: ed b7 in r30, 0x3d ; 61
447 3ec: fe b7 in r31, 0x3e ; 62
448 3ee: 31 96 adiw r30, 0x01 ; 1
449 3f0: 2d eb ldi r18, 0xBD ; 189
450 3f2: 31 e0 ldi r19, 0x01 ; 1
451 3f4: ad b7 in r26, 0x3d ; 61
452 3f6: be b7 in r27, 0x3e ; 62
453 3f8: 12 96 adiw r26, 0x02 ; 2
455 3fc: 2e 93 st -X, r18
456 3fe: 11 97 sbiw r26, 0x01 ; 1
457 400: 82 83 std Z+2, r24 ; 0x02
458 402: 13 82 std Z+3, r1 ; 0x03
459 404: 64 83 std Z+4, r22 ; 0x04
460 406: 15 82 std Z+5, r1 ; 0x05
461 408: 96 83 std Z+6, r25 ; 0x06
462 40a: 17 82 std Z+7, r1 ; 0x07
463 40c: 7a d7 rcall .+3828 ; 0x1302 <printf_P>
464 " -- Error Code %d\r\n"
465 " -- Sub Error Code %d\r\n"
466 " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);
468 LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
469 40e: 2d b7 in r18, 0x3d ; 61
470 410: 3e b7 in r19, 0x3e ; 62
471 412: 28 5f subi r18, 0xF8 ; 248
472 414: 3f 4f sbci r19, 0xFF ; 255
473 416: 0f b6 in r0, 0x3f ; 63
475 41a: 3e bf out 0x3e, r19 ; 62
476 41c: 0f be out 0x3f, r0 ; 63
477 41e: 2d bf out 0x3d, r18 ; 61
478 420: 80 e9 ldi r24, 0x90 ; 144
480 422: 5f cf rjmp .-322 ; 0x2e2 <LEDs_SetAllLEDs>
482 00000424 <Audio_Task>:
484 void Audio_Task(void)
489 42a: 00 d0 rcall .+0 ; 0x42c <Audio_Task+0x8>
491 42e: cd b7 in r28, 0x3d ; 61
492 430: de b7 in r29, 0x3e ; 62
495 switch (USB_HostState)
496 432: 80 91 2b 01 lds r24, 0x012B
497 436: 8b 30 cpi r24, 0x0B ; 11
498 438: 09 f0 breq .+2 ; 0x43c <Audio_Task+0x18>
499 43a: 87 c0 rjmp .+270 ; 0x54a <Audio_Task+0x126>
501 case HOST_STATE_Addressed:
502 puts_P(PSTR("Getting Config Data.\r\n"));
503 43c: 86 ea ldi r24, 0xA6 ; 166
504 43e: 91 e0 ldi r25, 0x01 ; 1
505 440: 7f d7 rcall .+3838 ; 0x1340 <puts_P>
507 /* Get and process the configuration descriptor data */
508 if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
509 442: 30 d1 rcall .+608 ; 0x6a4 <ProcessConfigurationDescriptor>
510 444: 18 2f mov r17, r24
511 446: 88 23 and r24, r24
512 448: e9 f0 breq .+58 ; 0x484 <Audio_Task+0x60>
514 if (ErrorCode == ControlError)
515 44a: 81 30 cpi r24, 0x01 ; 1
516 44c: 19 f4 brne .+6 ; 0x454 <Audio_Task+0x30>
517 puts_P(PSTR(ESC_FG_RED "Control Error (Get Configuration).\r\n"));
518 44e: 8c e7 ldi r24, 0x7C ; 124
519 450: 91 e0 ldi r25, 0x01 ; 1
520 452: 02 c0 rjmp .+4 ; 0x458 <Audio_Task+0x34>
522 puts_P(PSTR(ESC_FG_RED "Invalid Device.\r\n"));
523 454: 85 e6 ldi r24, 0x65 ; 101
524 456: 91 e0 ldi r25, 0x01 ; 1
525 458: 73 d7 rcall .+3814 ; 0x1340 <puts_P>
527 printf_P(PSTR(" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);
528 45a: 00 d0 rcall .+0 ; 0x45c <Audio_Task+0x38>
529 45c: 00 d0 rcall .+0 ; 0x45e <Audio_Task+0x3a>
530 45e: ed b7 in r30, 0x3d ; 61
531 460: fe b7 in r31, 0x3e ; 62
532 462: 31 96 adiw r30, 0x01 ; 1
533 464: 2b e4 ldi r18, 0x4B ; 75
534 466: 31 e0 ldi r19, 0x01 ; 1
535 468: ad b7 in r26, 0x3d ; 61
536 46a: be b7 in r27, 0x3e ; 62
537 46c: 12 96 adiw r26, 0x02 ; 2
539 470: 2e 93 st -X, r18
540 472: 11 97 sbiw r26, 0x01 ; 1
541 474: 12 83 std Z+2, r17 ; 0x02
542 476: 13 82 std Z+3, r1 ; 0x03
543 478: 44 d7 rcall .+3720 ; 0x1302 <printf_P>
545 /* Indicate error status */
546 LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
551 482: 4a c0 rjmp .+148 ; 0x518 <Audio_Task+0xf4>
552 USB_HostState = HOST_STATE_WaitForDeviceRemoval;
556 /* Set the device configuration to the first configuration (rarely do devices use multiple configurations) */
557 if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)
558 484: 81 e0 ldi r24, 0x01 ; 1
559 486: 82 d3 rcall .+1796 ; 0xb8c <USB_Host_SetDeviceConfiguration>
560 488: 88 23 and r24, r24
561 48a: 41 f0 breq .+16 ; 0x49c <Audio_Task+0x78>
563 printf_P(PSTR(ESC_FG_RED "Control Error (Set Configuration).\r\n"
564 48c: 00 d0 rcall .+0 ; 0x48e <Audio_Task+0x6a>
565 48e: 00 d0 rcall .+0 ; 0x490 <Audio_Task+0x6c>
566 490: ed b7 in r30, 0x3d ; 61
567 492: fe b7 in r31, 0x3e ; 62
568 494: 31 96 adiw r30, 0x01 ; 1
569 496: 28 e0 ldi r18, 0x08 ; 8
570 498: 31 e0 ldi r19, 0x01 ; 1
571 49a: 0e c0 rjmp .+28 ; 0x4b8 <Audio_Task+0x94>
572 /* Wait until USB device disconnected */
573 USB_HostState = HOST_STATE_WaitForDeviceRemoval;
577 if ((ErrorCode = USB_Host_SetInterfaceAltSetting(StreamingInterfaceIndex,
578 49c: 80 91 1c 01 lds r24, 0x011C
579 4a0: 60 91 1d 01 lds r22, 0x011D
580 4a4: 89 d3 rcall .+1810 ; 0xbb8 <USB_Host_SetInterfaceAltSetting>
581 4a6: 88 23 and r24, r24
582 4a8: 79 f0 breq .+30 ; 0x4c8 <Audio_Task+0xa4>
583 StreamingInterfaceAltSetting)) != HOST_SENDCONTROL_Successful)
585 printf_P(PSTR(ESC_FG_RED "Could not set alternative streaming interface setting.\r\n"
586 4aa: 00 d0 rcall .+0 ; 0x4ac <Audio_Task+0x88>
587 4ac: 00 d0 rcall .+0 ; 0x4ae <Audio_Task+0x8a>
588 4ae: ed b7 in r30, 0x3d ; 61
589 4b0: fe b7 in r31, 0x3e ; 62
590 4b2: 31 96 adiw r30, 0x01 ; 1
591 4b4: 21 eb ldi r18, 0xB1 ; 177
592 4b6: 30 e0 ldi r19, 0x00 ; 0
593 4b8: ad b7 in r26, 0x3d ; 61
594 4ba: be b7 in r27, 0x3e ; 62
595 4bc: 12 96 adiw r26, 0x02 ; 2
597 4c0: 2e 93 st -X, r18
598 4c2: 11 97 sbiw r26, 0x01 ; 1
599 4c4: 82 83 std Z+2, r24 ; 0x02
600 4c6: d7 cf rjmp .-82 ; 0x476 <Audio_Task+0x52>
601 /* Wait until USB device disconnected */
602 USB_HostState = HOST_STATE_WaitForDeviceRemoval;
606 USB_ControlRequest = (USB_Request_Header_t)
607 4c8: 20 91 1e 01 lds r18, 0x011E
608 4cc: 82 e2 ldi r24, 0x22 ; 34
609 4ce: 80 93 23 01 sts 0x0123, r24
610 4d2: 81 e0 ldi r24, 0x01 ; 1
611 4d4: 80 93 24 01 sts 0x0124, r24
612 4d8: 80 e0 ldi r24, 0x00 ; 0
613 4da: 91 e0 ldi r25, 0x01 ; 1
614 4dc: 90 93 26 01 sts 0x0126, r25
615 4e0: 80 93 25 01 sts 0x0125, r24
616 4e4: 20 93 27 01 sts 0x0127, r18
617 4e8: 10 92 28 01 sts 0x0128, r1
618 4ec: 83 e0 ldi r24, 0x03 ; 3
619 4ee: 90 e0 ldi r25, 0x00 ; 0
620 4f0: 90 93 2a 01 sts 0x012A, r25
621 4f4: 80 93 29 01 sts 0x0129, r24
623 .wIndex = StreamingEndpointAddress,
624 .wLength = sizeof(USB_Audio_SampleFreq_t),
627 USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
628 4f8: de 01 movw r26, r28
629 4fa: 11 96 adiw r26, 0x01 ; 1
630 4fc: e0 e0 ldi r30, 0x00 ; 0
631 4fe: f1 e0 ldi r31, 0x01 ; 1
632 500: 83 e0 ldi r24, 0x03 ; 3
635 506: 81 50 subi r24, 0x01 ; 1
636 508: e1 f7 brne .-8 ; 0x502 <Audio_Task+0xde>
637 * \param[in] PipeNumber Index of the pipe to select.
639 static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
640 static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
643 50a: 10 92 a7 00 sts 0x00A7, r1
645 /* Select the control pipe for the request transfer */
646 Pipe_SelectPipe(PIPE_CONTROLPIPE);
648 /* Set the sample rate on the streaming interface endpoint */
649 if ((ErrorCode = USB_Host_SendControlRequest(&SampleRate)) != HOST_SENDCONTROL_Successful)
650 50e: ce 01 movw r24, r28
651 510: 01 96 adiw r24, 0x01 ; 1
652 512: b7 d5 rcall .+2926 ; 0x1082 <USB_Host_SendControlRequest>
653 514: 88 23 and r24, r24
654 516: 29 f0 breq .+10 ; 0x522 <Audio_Task+0xfe>
656 /* Indicate error status */
657 LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
658 518: 80 e9 ldi r24, 0x90 ; 144
659 51a: e3 de rcall .-570 ; 0x2e2 <LEDs_SetAllLEDs>
661 /* Wait until USB device disconnected */
662 USB_HostState = HOST_STATE_WaitForDeviceRemoval;
663 51c: 10 92 2b 01 sts 0x012B, r1
665 520: 14 c0 rjmp .+40 ; 0x54a <Audio_Task+0x126>
668 /* Sample reload timer initialization */
669 TIMSK0 = (1 << OCIE0A);
670 522: 82 e0 ldi r24, 0x02 ; 2
671 524: 80 93 6e 00 sts 0x006E, r24
672 OCR0A = ((F_CPU / 8 / 8000) - 1);
673 528: 9c e7 ldi r25, 0x7C ; 124
674 52a: 97 bd out 0x27, r25 ; 39
675 TCCR0A = (1 << WGM01); // CTC mode
676 52c: 84 bd out 0x24, r24 ; 36
677 TCCR0B = (1 << CS01); // Fcpu/8 speed
678 52e: 85 bd out 0x25, r24 ; 37
680 /* Set speaker as output */
682 530: 3e 9a sbi 0x07, 6 ; 7
684 /* PWM speaker timer initialization */
685 TCCR3A = ((1 << WGM30) | (1 << COM3A1) | (1 << COM3A0)
686 532: 81 ef ldi r24, 0xF1 ; 241
687 534: 80 93 90 00 sts 0x0090, r24
688 | (1 << COM3B1) | (1 << COM3B0)); // Set on match, clear on TOP
689 TCCR3B = ((1 << WGM32) | (1 << CS30)); // Fast 8-Bit PWM, F_CPU speed
690 538: 89 e0 ldi r24, 0x09 ; 9
691 53a: 80 93 91 00 sts 0x0091, r24
693 puts_P(PSTR("Microphone Enumerated.\r\n"));
694 53e: 88 e9 ldi r24, 0x98 ; 152
695 540: 90 e0 ldi r25, 0x00 ; 0
696 542: fe d6 rcall .+3580 ; 0x1340 <puts_P>
698 USB_HostState = HOST_STATE_Configured;
699 544: 8c e0 ldi r24, 0x0C ; 12
700 546: 80 93 2b 01 sts 0x012B, r24
702 case HOST_STATE_Configured:
715 /** Main program entry point. This routine configures the hardware required by the application, then
716 * enters a loop to run the application tasks in sequence.
721 558: c9 de rcall .-622 ; 0x2ec <SetupHardware>
723 puts_P(PSTR(ESC_FG_CYAN "Audio Host Demo running.\r\n" ESC_FG_WHITE));
724 55a: 8e e7 ldi r24, 0x7E ; 126
725 55c: 92 e0 ldi r25, 0x02 ; 2
726 55e: f0 d6 rcall .+3552 ; 0x1340 <puts_P>
728 LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
729 560: 80 e1 ldi r24, 0x10 ; 16
730 562: bf de rcall .-642 ; 0x2e2 <LEDs_SetAllLEDs>
737 566: 5e df rcall .-324 ; 0x424 <Audio_Task>
739 568: a2 d6 rcall .+3396 ; 0x12ae <USB_USBTask>
740 56a: fd cf rjmp .-6 ; 0x566 <main+0xe>
742 0000056c <__vector_21>:
746 /** ISR to handle the reloading of the PWM timer with the next sample. */
747 ISR(TIMER0_COMPA_vect, ISR_BLOCK)
751 570: 0f b6 in r0, 0x3f ; 63
753 574: 0b b6 in r0, 0x3b ; 59
755 578: 11 24 eor r1, r1
769 * \return Index of the currently selected pipe.
771 static inline uint8_t Pipe_GetCurrentPipe(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
772 static inline uint8_t Pipe_GetCurrentPipe(void)
774 return (UPNUM & PIPE_PIPENUM_MASK);
775 594: 10 91 a7 00 lds r17, 0x00A7
776 598: 17 70 andi r17, 0x07 ; 7
777 * \param[in] PipeNumber Index of the pipe to select.
779 static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
780 static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
783 59a: 81 e0 ldi r24, 0x01 ; 1
784 59c: 80 93 a7 00 sts 0x00A7, r24
786 /** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
787 static inline void Pipe_Unfreeze(void) ATTR_ALWAYS_INLINE;
788 static inline void Pipe_Unfreeze(void)
790 UPCONX &= ~(1 << PFREEZE);
791 5a0: 80 91 a9 00 lds r24, 0x00A9
792 5a4: 8f 7b andi r24, 0xBF ; 191
793 5a6: 80 93 a9 00 sts 0x00A9, r24
794 * \return Boolean \c true if the current pipe has received an IN packet, \c false otherwise.
796 static inline bool Pipe_IsINReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
797 static inline bool Pipe_IsINReceived(void)
799 return ((UPINTX & (1 << RXINI)) ? true : false);
800 5aa: 80 91 a6 00 lds r24, 0x00A6
802 Pipe_SelectPipe(AUDIO_DATA_IN_PIPE);
805 /* Check if the current pipe can be read from (contains a packet) and the device is sending data */
806 if (Pipe_IsINReceived())
807 5ae: 80 ff sbrs r24, 0
808 5b0: 2b c0 rjmp .+86 ; 0x608 <__vector_21+0x9c>
814 Data.Bytes[0] = UPDATX;
815 5b2: 80 91 af 00 lds r24, 0x00AF
816 Data.Bytes[1] = UPDATX;
817 5b6: 40 91 af 00 lds r20, 0x00AF
820 static inline bool Pipe_IsReadWriteAllowed(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
821 static inline bool Pipe_IsReadWriteAllowed(void)
823 return ((UPINTX & (1 << RWAL)) ? true : false);
824 5ba: 80 91 a6 00 lds r24, 0x00A6
826 /* Retrieve the signed 16-bit audio sample, convert to 8-bit */
827 int8_t Sample_8Bit = (Pipe_Read_16_LE() >> 8);
829 /* Check to see if the bank is now empty */
830 if (!(Pipe_IsReadWriteAllowed()))
831 5be: 85 fd sbrc r24, 5
832 5c0: 05 c0 rjmp .+10 ; 0x5cc <__vector_21+0x60>
833 * \ingroup Group_PipePacketManagement_AVR8
835 static inline void Pipe_ClearIN(void) ATTR_ALWAYS_INLINE;
836 static inline void Pipe_ClearIN(void)
838 UPINTX &= ~((1 << RXINI) | (1 << FIFOCON));
839 5c2: 80 91 a6 00 lds r24, 0x00A6
840 5c6: 8e 77 andi r24, 0x7E ; 126
841 5c8: 80 93 a6 00 sts 0x00A6, r24
842 /* Acknowledge the packet, clear the bank ready for the next packet */
846 /* Load the sample into the PWM timer channel */
847 OCR3A = (Sample_8Bit ^ (1 << 7));
848 5cc: 84 2f mov r24, r20
849 5ce: 99 27 eor r25, r25
850 5d0: 87 fd sbrc r24, 7
852 5d4: 20 e8 ldi r18, 0x80 ; 128
853 5d6: 30 e0 ldi r19, 0x00 ; 0
854 5d8: 82 27 eor r24, r18
855 5da: 93 27 eor r25, r19
856 5dc: 90 93 99 00 sts 0x0099, r25
857 5e0: 80 93 98 00 sts 0x0098, r24
859 uint8_t LEDMask = LEDS_NO_LEDS;
861 /* Turn on LEDs as the sample amplitude increases */
862 if (Sample_8Bit > 16)
863 5e4: 41 31 cpi r20, 0x11 ; 17
864 5e6: 44 f4 brge .+16 ; 0x5f8 <__vector_21+0x8c>
865 LEDMask = (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4);
866 else if (Sample_8Bit > 8)
867 5e8: 49 30 cpi r20, 0x09 ; 9
868 5ea: 44 f4 brge .+16 ; 0x5fc <__vector_21+0x90>
869 LEDMask = (LEDS_LED1 | LEDS_LED2 | LEDS_LED3);
870 else if (Sample_8Bit > 4)
871 5ec: 45 30 cpi r20, 0x05 ; 5
872 5ee: 44 f4 brge .+16 ; 0x600 <__vector_21+0x94>
873 LEDMask = (LEDS_LED1 | LEDS_LED2);
874 else if (Sample_8Bit > 2)
875 5f0: 43 30 cpi r20, 0x03 ; 3
876 5f2: 44 f4 brge .+16 ; 0x604 <__vector_21+0x98>
879 /* Load the sample into the PWM timer channel */
880 OCR3A = (Sample_8Bit ^ (1 << 7));
882 uint8_t LEDMask = LEDS_NO_LEDS;
883 5f4: 80 e0 ldi r24, 0x00 ; 0
884 5f6: 07 c0 rjmp .+14 ; 0x606 <__vector_21+0x9a>
886 /* Turn on LEDs as the sample amplitude increases */
887 if (Sample_8Bit > 16)
888 LEDMask = (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4);
889 5f8: 80 ef ldi r24, 0xF0 ; 240
890 5fa: 05 c0 rjmp .+10 ; 0x606 <__vector_21+0x9a>
891 else if (Sample_8Bit > 8)
892 LEDMask = (LEDS_LED1 | LEDS_LED2 | LEDS_LED3);
893 5fc: 80 eb ldi r24, 0xB0 ; 176
894 5fe: 03 c0 rjmp .+6 ; 0x606 <__vector_21+0x9a>
895 else if (Sample_8Bit > 4)
896 LEDMask = (LEDS_LED1 | LEDS_LED2);
897 600: 80 e3 ldi r24, 0x30 ; 48
898 602: 01 c0 rjmp .+2 ; 0x606 <__vector_21+0x9a>
899 else if (Sample_8Bit > 2)
900 LEDMask = (LEDS_LED1);
901 604: 80 e1 ldi r24, 0x10 ; 16
903 LEDs_SetAllLEDs(LEDMask);
904 606: 6d de rcall .-806 ; 0x2e2 <LEDs_SetAllLEDs>
906 /** Freezes the selected pipe, preventing it from communicating with an attached device. */
907 static inline void Pipe_Freeze(void) ATTR_ALWAYS_INLINE;
908 static inline void Pipe_Freeze(void)
910 UPCONX |= (1 << PFREEZE);
911 608: 80 91 a9 00 lds r24, 0x00A9
912 60c: 80 64 ori r24, 0x40 ; 64
913 60e: 80 93 a9 00 sts 0x00A9, r24
914 * \param[in] PipeNumber Index of the pipe to select.
916 static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
917 static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
920 612: 10 93 a7 00 sts 0x00A7, r17
925 Pipe_SelectPipe(PrevPipe);
941 632: 0b be out 0x3b, r0 ; 59
943 636: 0f be out 0x3f, r0 ; 63
948 0000063e <DComp_NextAudioControlInterface>:
949 /* Valid data found, return success */
950 return SuccessfulConfigRead;
953 uint8_t DComp_NextAudioControlInterface(void* CurrentDescriptor)
955 63e: fc 01 movw r30, r24
956 USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
958 if (Header->Type == DTYPE_Interface)
959 640: 81 81 ldd r24, Z+1 ; 0x01
960 642: 84 30 cpi r24, 0x04 ; 4
961 644: 49 f4 brne .+18 ; 0x658 <DComp_NextAudioControlInterface+0x1a>
963 USB_Descriptor_Interface_t* Interface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t);
965 if ((Interface->Class == AUDIO_CSCP_AudioClass) &&
966 646: 85 81 ldd r24, Z+5 ; 0x05
967 648: 81 30 cpi r24, 0x01 ; 1
968 64a: 31 f4 brne .+12 ; 0x658 <DComp_NextAudioControlInterface+0x1a>
969 64c: 86 81 ldd r24, Z+6 ; 0x06
970 64e: 81 30 cpi r24, 0x01 ; 1
971 650: 19 f4 brne .+6 ; 0x658 <DComp_NextAudioControlInterface+0x1a>
972 (Interface->SubClass == AUDIO_CSCP_ControlSubclass) &&
973 652: 87 81 ldd r24, Z+7 ; 0x07
974 654: 88 23 and r24, r24
975 656: 11 f0 breq .+4 ; 0x65c <DComp_NextAudioControlInterface+0x1e>
977 return DESCRIPTOR_SEARCH_Found;
981 return DESCRIPTOR_SEARCH_NotFound;
982 658: 82 e0 ldi r24, 0x02 ; 2
985 if ((Interface->Class == AUDIO_CSCP_AudioClass) &&
986 (Interface->SubClass == AUDIO_CSCP_ControlSubclass) &&
987 (Interface->Protocol == AUDIO_CSCP_ControlProtocol))
989 return DESCRIPTOR_SEARCH_Found;
990 65c: 80 e0 ldi r24, 0x00 ; 0
994 return DESCRIPTOR_SEARCH_NotFound;
998 00000660 <DComp_NextAudioStreamInterface>:
1000 uint8_t DComp_NextAudioStreamInterface(void* CurrentDescriptor)
1002 660: fc 01 movw r30, r24
1003 USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
1005 if (Header->Type == DTYPE_Interface)
1006 662: 81 81 ldd r24, Z+1 ; 0x01
1007 664: 84 30 cpi r24, 0x04 ; 4
1008 666: 49 f4 brne .+18 ; 0x67a <DComp_NextAudioStreamInterface+0x1a>
1010 USB_Descriptor_Interface_t* Interface = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Interface_t);
1012 if ((Interface->Class == AUDIO_CSCP_AudioClass) &&
1013 668: 85 81 ldd r24, Z+5 ; 0x05
1014 66a: 81 30 cpi r24, 0x01 ; 1
1015 66c: 31 f4 brne .+12 ; 0x67a <DComp_NextAudioStreamInterface+0x1a>
1016 66e: 86 81 ldd r24, Z+6 ; 0x06
1017 670: 82 30 cpi r24, 0x02 ; 2
1018 672: 19 f4 brne .+6 ; 0x67a <DComp_NextAudioStreamInterface+0x1a>
1019 (Interface->SubClass == AUDIO_CSCP_AudioStreamingSubclass) &&
1020 674: 87 81 ldd r24, Z+7 ; 0x07
1021 676: 88 23 and r24, r24
1022 678: 11 f0 breq .+4 ; 0x67e <DComp_NextAudioStreamInterface+0x1e>
1024 return DESCRIPTOR_SEARCH_Found;
1028 return DESCRIPTOR_SEARCH_NotFound;
1029 67a: 82 e0 ldi r24, 0x02 ; 2
1032 if ((Interface->Class == AUDIO_CSCP_AudioClass) &&
1033 (Interface->SubClass == AUDIO_CSCP_AudioStreamingSubclass) &&
1034 (Interface->Protocol == AUDIO_CSCP_StreamingProtocol))
1036 return DESCRIPTOR_SEARCH_Found;
1037 67e: 80 e0 ldi r24, 0x00 ; 0
1041 return DESCRIPTOR_SEARCH_NotFound;
1045 00000682 <DComp_NextAudioInterfaceDataEndpoint>:
1047 uint8_t DComp_NextAudioInterfaceDataEndpoint(void* CurrentDescriptor)
1049 682: fc 01 movw r30, r24
1050 USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
1052 if (Header->Type == DTYPE_Endpoint)
1053 684: 81 81 ldd r24, Z+1 ; 0x01
1054 686: 85 30 cpi r24, 0x05 ; 5
1055 688: 29 f4 brne .+10 ; 0x694 <DComp_NextAudioInterfaceDataEndpoint+0x12>
1057 USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
1059 if ((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_ISOCHRONOUS)
1060 68a: 83 81 ldd r24, Z+3 ; 0x03
1061 68c: 83 70 andi r24, 0x03 ; 3
1062 68e: 81 30 cpi r24, 0x01 ; 1
1063 690: 19 f4 brne .+6 ; 0x698 <DComp_NextAudioInterfaceDataEndpoint+0x16>
1064 692: 04 c0 rjmp .+8 ; 0x69c <DComp_NextAudioInterfaceDataEndpoint+0x1a>
1065 return DESCRIPTOR_SEARCH_Found;
1067 else if (Header->Type == DTYPE_Interface)
1068 694: 84 30 cpi r24, 0x04 ; 4
1069 696: 21 f0 breq .+8 ; 0x6a0 <DComp_NextAudioInterfaceDataEndpoint+0x1e>
1071 return DESCRIPTOR_SEARCH_Fail;
1074 return DESCRIPTOR_SEARCH_NotFound;
1075 698: 82 e0 ldi r24, 0x02 ; 2
1077 if (Header->Type == DTYPE_Endpoint)
1079 USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
1081 if ((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_ISOCHRONOUS)
1082 return DESCRIPTOR_SEARCH_Found;
1083 69c: 80 e0 ldi r24, 0x00 ; 0
1086 else if (Header->Type == DTYPE_Interface)
1088 return DESCRIPTOR_SEARCH_Fail;
1089 6a0: 81 e0 ldi r24, 0x01 ; 1
1092 return DESCRIPTOR_SEARCH_NotFound;
1096 000006a4 <ProcessConfigurationDescriptor>:
1097 uint8_t StreamingInterfaceIndex = 0;
1098 uint8_t StreamingInterfaceAltSetting = 0;
1099 uint8_t StreamingEndpointAddress = 0;
1101 uint8_t ProcessConfigurationDescriptor(void)
1113 6b8: cd b7 in r28, 0x3d ; 61
1114 6ba: de b7 in r29, 0x3e ; 62
1115 6bc: c4 50 subi r28, 0x04 ; 4
1116 6be: d2 40 sbci r29, 0x02 ; 2
1117 6c0: 0f b6 in r0, 0x3f ; 63
1119 6c4: de bf out 0x3e, r29 ; 62
1120 6c6: 0f be out 0x3f, r0 ; 63
1121 6c8: cd bf out 0x3d, r28 ; 61
1122 uint8_t ConfigDescriptorData[512];
1123 void* CurrConfigLocation = ConfigDescriptorData;
1124 6ca: ae 01 movw r20, r28
1125 6cc: 4b 5f subi r20, 0xFB ; 251
1126 6ce: 5f 4f sbci r21, 0xFF ; 255
1127 6d0: 5a 83 std Y+2, r21 ; 0x02
1128 6d2: 49 83 std Y+1, r20 ; 0x01
1129 USB_Descriptor_Interface_t* AudioControlInterface = NULL;
1130 USB_Descriptor_Interface_t* AudioStreamingInterface = NULL;
1131 USB_Descriptor_Endpoint_t* DataINEndpoint = NULL;
1133 /* Retrieve the entire configuration descriptor into the allocated buffer */
1134 switch (USB_Host_GetDeviceConfigDescriptor(1, &CurrConfigBytesRem, ConfigDescriptorData, sizeof(ConfigDescriptorData)))
1135 6d4: 23 e0 ldi r18, 0x03 ; 3
1136 6d6: e2 2e mov r14, r18
1137 6d8: f1 2c mov r15, r1
1138 6da: ec 0e add r14, r28
1139 6dc: fd 1e adc r15, r29
1140 6de: 81 e0 ldi r24, 0x01 ; 1
1141 6e0: b7 01 movw r22, r14
1142 6e2: 20 e0 ldi r18, 0x00 ; 0
1143 6e4: 32 e0 ldi r19, 0x02 ; 2
1144 6e6: 09 d4 rcall .+2066 ; 0xefa <USB_Host_GetDeviceConfigDescriptor>
1145 6e8: 85 30 cpi r24, 0x05 ; 5
1146 6ea: 09 f4 brne .+2 ; 0x6ee <ProcessConfigurationDescriptor+0x4a>
1147 6ec: 5c c0 rjmp .+184 ; 0x7a6 <ProcessConfigurationDescriptor+0x102>
1148 6ee: 86 30 cpi r24, 0x06 ; 6
1149 6f0: 61 f0 breq .+24 ; 0x70a <ProcessConfigurationDescriptor+0x66>
1150 6f2: 88 23 and r24, r24
1151 6f4: 61 f4 brne .+24 ; 0x70e <ProcessConfigurationDescriptor+0x6a>
1152 6f6: 00 e0 ldi r16, 0x00 ; 0
1153 6f8: 10 e0 ldi r17, 0x00 ; 0
1154 6fa: cc 24 eor r12, r12
1155 6fc: dd 24 eor r13, r13
1156 6fe: 57 01 movw r10, r14
1157 700: 7e 01 movw r14, r28
1159 704: e1 1c adc r14, r1
1160 706: f1 1c adc r15, r1
1161 708: 07 c0 rjmp .+14 ; 0x718 <ProcessConfigurationDescriptor+0x74>
1163 case HOST_GETCONFIG_Successful:
1165 case HOST_GETCONFIG_InvalidData:
1166 return InvalidConfigDataReturned;
1167 70a: 83 e0 ldi r24, 0x03 ; 3
1168 70c: 4f c0 rjmp .+158 ; 0x7ac <ProcessConfigurationDescriptor+0x108>
1169 case HOST_GETCONFIG_BuffOverflow:
1170 return DescriptorTooLarge;
1172 return ControlError;
1173 70e: 81 e0 ldi r24, 0x01 ; 1
1174 710: 4d c0 rjmp .+154 ; 0x7ac <ProcessConfigurationDescriptor+0x108>
1175 USB_Descriptor_Interface_t* AudioControlInterface = NULL;
1176 USB_Descriptor_Interface_t* AudioStreamingInterface = NULL;
1177 USB_Descriptor_Endpoint_t* DataINEndpoint = NULL;
1179 /* Retrieve the entire configuration descriptor into the allocated buffer */
1180 switch (USB_Host_GetDeviceConfigDescriptor(1, &CurrConfigBytesRem, ConfigDescriptorData, sizeof(ConfigDescriptorData)))
1181 712: 9c 01 movw r18, r24
1182 714: 03 2f mov r16, r19
1183 716: 18 2f mov r17, r24
1184 return ControlError;
1187 while (!(DataINEndpoint))
1189 if (!(AudioControlInterface) ||
1190 718: c1 14 cp r12, r1
1191 71a: d1 04 cpc r13, r1
1192 71c: 41 f0 breq .+16 ; 0x72e <ProcessConfigurationDescriptor+0x8a>
1193 USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
1194 71e: c5 01 movw r24, r10
1195 720: b7 01 movw r22, r14
1196 722: 41 e4 ldi r20, 0x41 ; 65
1197 724: 53 e0 ldi r21, 0x03 ; 3
1198 726: 40 d4 rcall .+2176 ; 0xfa8 <USB_GetNextDescriptorComp>
1199 return ControlError;
1202 while (!(DataINEndpoint))
1204 if (!(AudioControlInterface) ||
1205 728: 88 23 and r24, r24
1206 72a: 51 f4 brne .+20 ; 0x740 <ProcessConfigurationDescriptor+0x9c>
1207 72c: 1c c0 rjmp .+56 ; 0x766 <ProcessConfigurationDescriptor+0xc2>
1208 USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
1209 DComp_NextAudioInterfaceDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
1211 if (!(AudioControlInterface))
1213 if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
1214 72e: c5 01 movw r24, r10
1215 730: b7 01 movw r22, r14
1216 732: 4f e1 ldi r20, 0x1F ; 31
1217 734: 53 e0 ldi r21, 0x03 ; 3
1218 736: 38 d4 rcall .+2160 ; 0xfa8 <USB_GetNextDescriptorComp>
1219 738: 88 23 and r24, r24
1220 73a: b9 f5 brne .+110 ; 0x7aa <ProcessConfigurationDescriptor+0x106>
1221 /* Descriptor not found, error out */
1222 return NoCompatibleInterfaceFound;
1225 /* Save the interface in case we need to refer back to it later */
1226 AudioControlInterface = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Interface_t);
1227 73c: c9 80 ldd r12, Y+1 ; 0x01
1228 73e: da 80 ldd r13, Y+2 ; 0x02
1231 if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
1232 740: c5 01 movw r24, r10
1233 742: b7 01 movw r22, r14
1234 744: 40 e3 ldi r20, 0x30 ; 48
1235 746: 53 e0 ldi r21, 0x03 ; 3
1236 748: 2f d4 rcall .+2142 ; 0xfa8 <USB_GetNextDescriptorComp>
1237 74a: 88 23 and r24, r24
1238 74c: 49 f0 breq .+18 ; 0x760 <ProcessConfigurationDescriptor+0xbc>
1239 DComp_NextAudioStreamInterface) != DESCRIPTOR_SEARCH_COMP_Found)
1241 if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
1242 74e: c5 01 movw r24, r10
1243 750: b7 01 movw r22, r14
1244 752: 4f e1 ldi r20, 0x1F ; 31
1245 754: 53 e0 ldi r21, 0x03 ; 3
1246 756: 28 d4 rcall .+2128 ; 0xfa8 <USB_GetNextDescriptorComp>
1247 758: 88 23 and r24, r24
1248 75a: 39 f5 brne .+78 ; 0x7aa <ProcessConfigurationDescriptor+0x106>
1249 /* Descriptor not found, error out */
1250 return NoCompatibleInterfaceFound;
1253 /* Save the interface in case we need to refer back to it later */
1254 AudioControlInterface = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Interface_t);
1255 75c: c9 80 ldd r12, Y+1 ; 0x01
1256 75e: da 80 ldd r13, Y+2 ; 0x02
1259 /* Save the interface in case we need to refer back to it later */
1260 AudioStreamingInterface = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Interface_t);
1261 760: 09 81 ldd r16, Y+1 ; 0x01
1262 762: 1a 81 ldd r17, Y+2 ; 0x02
1264 /* Skip the remainder of the loop as we have not found an endpoint yet */
1266 764: 35 c0 rjmp .+106 ; 0x7d0 <ProcessConfigurationDescriptor+0x12c>
1269 /* Retrieve the endpoint address from the endpoint descriptor */
1270 USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(CurrConfigLocation, USB_Descriptor_Endpoint_t);
1271 766: e9 81 ldd r30, Y+1 ; 0x01
1272 768: fa 81 ldd r31, Y+2 ; 0x02
1274 /* If the endpoint is a IN type endpoint */
1275 if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
1276 76a: 82 81 ldd r24, Z+2 ; 0x02
1277 76c: 87 ff sbrs r24, 7
1278 76e: 30 c0 rjmp .+96 ; 0x7d0 <ProcessConfigurationDescriptor+0x12c>
1279 770: 90 2f mov r25, r16
1280 772: 81 2f mov r24, r17
1281 return DescriptorTooLarge;
1283 return ControlError;
1286 while (!(DataINEndpoint))
1287 774: 30 97 sbiw r30, 0x00 ; 0
1288 776: 69 f2 breq .-102 ; 0x712 <ProcessConfigurationDescriptor+0x6e>
1289 /* If the endpoint is a IN type endpoint */
1290 if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
1291 DataINEndpoint = EndpointData;
1294 StreamingInterfaceIndex = AudioStreamingInterface->InterfaceNumber;
1295 778: d8 01 movw r26, r16
1296 77a: 12 96 adiw r26, 0x02 ; 2
1297 77c: 8c 91 ld r24, X
1298 77e: 12 97 sbiw r26, 0x02 ; 2
1299 780: 80 93 1c 01 sts 0x011C, r24
1300 StreamingInterfaceAltSetting = AudioStreamingInterface->AlternateSetting;
1301 784: 13 96 adiw r26, 0x03 ; 3
1302 786: 8c 91 ld r24, X
1303 788: 80 93 1d 01 sts 0x011D, r24
1304 StreamingEndpointAddress = DataINEndpoint->EndpointAddress;
1305 78c: 22 81 ldd r18, Z+2 ; 0x02
1306 78e: 20 93 1e 01 sts 0x011E, r18
1308 /* Configure the HID data IN pipe */
1309 Pipe_ConfigurePipe(AUDIO_DATA_IN_PIPE, EP_TYPE_ISOCHRONOUS, PIPE_TOKEN_IN,
1310 792: 04 81 ldd r16, Z+4 ; 0x04
1311 794: 15 81 ldd r17, Z+5 ; 0x05
1312 796: 81 e0 ldi r24, 0x01 ; 1
1313 798: 61 e0 ldi r22, 0x01 ; 1
1314 79a: 40 e1 ldi r20, 0x10 ; 16
1315 79c: 94 e0 ldi r25, 0x04 ; 4
1316 79e: e9 2e mov r14, r25
1317 7a0: 22 d2 rcall .+1092 ; 0xbe6 <Pipe_ConfigurePipe>
1318 DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_DOUBLE);
1320 /* Valid data found, return success */
1321 return SuccessfulConfigRead;
1322 7a2: 80 e0 ldi r24, 0x00 ; 0
1323 7a4: 03 c0 rjmp .+6 ; 0x7ac <ProcessConfigurationDescriptor+0x108>
1324 case HOST_GETCONFIG_Successful:
1326 case HOST_GETCONFIG_InvalidData:
1327 return InvalidConfigDataReturned;
1328 case HOST_GETCONFIG_BuffOverflow:
1329 return DescriptorTooLarge;
1330 7a6: 82 e0 ldi r24, 0x02 ; 2
1331 7a8: 01 c0 rjmp .+2 ; 0x7ac <ProcessConfigurationDescriptor+0x108>
1333 if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
1334 DComp_NextAudioControlInterface) != DESCRIPTOR_SEARCH_COMP_Found)
1336 /* Descriptor not found, error out */
1337 return NoCompatibleInterfaceFound;
1338 7aa: 84 e0 ldi r24, 0x04 ; 4
1339 Pipe_ConfigurePipe(AUDIO_DATA_IN_PIPE, EP_TYPE_ISOCHRONOUS, PIPE_TOKEN_IN,
1340 DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_DOUBLE);
1342 /* Valid data found, return success */
1343 return SuccessfulConfigRead;
1345 7ac: cc 5f subi r28, 0xFC ; 252
1346 7ae: dd 4f sbci r29, 0xFD ; 253
1347 7b0: 0f b6 in r0, 0x3f ; 63
1349 7b4: de bf out 0x3e, r29 ; 62
1350 7b6: 0f be out 0x3f, r0 ; 63
1351 7b8: cd bf out 0x3d, r28 ; 61
1363 USB_Descriptor_Interface_t* AudioControlInterface = NULL;
1364 USB_Descriptor_Interface_t* AudioStreamingInterface = NULL;
1365 USB_Descriptor_Endpoint_t* DataINEndpoint = NULL;
1367 /* Retrieve the entire configuration descriptor into the allocated buffer */
1368 switch (USB_Host_GetDeviceConfigDescriptor(1, &CurrConfigBytesRem, ConfigDescriptorData, sizeof(ConfigDescriptorData)))
1369 7d0: 90 2f mov r25, r16
1370 7d2: 81 2f mov r24, r17
1371 7d4: 9e cf rjmp .-196 ; 0x712 <ProcessConfigurationDescriptor+0x6e>
1373 000007d6 <USB_Host_ResetDevice>:
1374 * \return Boolean \c true if the bus is currently suspended, \c false otherwise.
1376 static inline bool USB_Host_IsBusSuspended(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
1377 static inline bool USB_Host_IsBusSuspended(void)
1379 return ((UHCON & (1 << SOFEN)) ? false : true);
1380 7d6: 80 91 9e 00 lds r24, 0x009E
1381 7da: 90 e0 ldi r25, 0x00 ; 0
1382 7dc: 81 70 andi r24, 0x01 ; 1
1383 7de: 90 70 andi r25, 0x00 ; 0
1385 case USB_INT_DCONNI:
1386 UHIEN &= ~(1 << DCONNE);
1388 case USB_INT_DDISCI:
1389 UHIEN &= ~(1 << DDISCE);
1390 7e0: 20 91 a0 00 lds r18, 0x00A0
1391 7e4: 2d 7f andi r18, 0xFD ; 253
1392 7e6: 20 93 a0 00 sts 0x00A0, r18
1393 * woken up automatically and the bus resumed after the reset has been correctly issued.
1395 static inline void USB_Host_ResetBus(void) ATTR_ALWAYS_INLINE;
1396 static inline void USB_Host_ResetBus(void)
1398 UHCON |= (1 << RESET);
1399 7ea: 20 91 9e 00 lds r18, 0x009E
1400 7ee: 22 60 ori r18, 0x02 ; 2
1401 7f0: 20 93 9e 00 sts 0x009E, r18
1402 * \return Boolean \c true if no bus reset is currently being sent, \c false otherwise.
1404 static inline bool USB_Host_IsBusResetComplete(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
1405 static inline bool USB_Host_IsBusResetComplete(void)
1407 return ((UHCON & (1 << RESET)) ? false : true);
1408 7f4: 20 91 9e 00 lds r18, 0x009E
1409 bool BusSuspended = USB_Host_IsBusSuspended();
1411 USB_INT_Disable(USB_INT_DDISCI);
1413 USB_Host_ResetBus();
1414 while (!(USB_Host_IsBusResetComplete()));
1415 7f8: 21 fd sbrc r18, 1
1416 7fa: fc cf rjmp .-8 ; 0x7f4 <USB_Host_ResetDevice+0x1e>
1417 * host and attached device may occur.
1419 static inline void USB_Host_ResumeBus(void) ATTR_ALWAYS_INLINE;
1420 static inline void USB_Host_ResumeBus(void)
1422 UHCON |= (1 << SOFEN);
1423 7fc: 20 91 9e 00 lds r18, 0x009E
1424 800: 21 60 ori r18, 0x01 ; 1
1425 802: 20 93 9e 00 sts 0x009E, r18
1426 case USB_INT_RXSTPI:
1427 return (UEIENX & (1 << RXSTPE));
1429 #if defined(USB_CAN_BE_HOST)
1431 return (UHIEN & (1 << HSOFE));
1432 806: 20 91 a0 00 lds r18, 0x00A0
1433 80a: 30 e0 ldi r19, 0x00 ; 0
1434 80c: 20 72 andi r18, 0x20 ; 32
1435 80e: 30 70 andi r19, 0x00 ; 0
1436 UEIENX &= ~(1 << RXSTPE);
1439 #if defined(USB_CAN_BE_HOST)
1441 UHIEN &= ~(1 << HSOFE);
1442 810: 40 91 a0 00 lds r20, 0x00A0
1443 814: 4f 7d andi r20, 0xDF ; 223
1444 816: 40 93 a0 00 sts 0x00A0, r20
1445 UEINTX &= ~(1 << RXSTPI);
1448 #if defined(USB_CAN_BE_HOST)
1450 UHINT &= ~(1 << HSOFI);
1451 81a: 40 91 9f 00 lds r20, 0x009F
1452 81e: 4f 7d andi r20, 0xDF ; 223
1453 820: 40 93 9f 00 sts 0x009F, r20
1454 824: 4a e0 ldi r20, 0x0A ; 10
1455 case USB_INT_RXSTPI:
1456 return (UEINTX & (1 << RXSTPI));
1458 #if defined(USB_CAN_BE_HOST)
1460 return (UHINT & (1 << HSOFI));
1461 826: 50 91 9f 00 lds r21, 0x009F
1462 /* Workaround for powerless-pull-up devices. After a USB bus reset,
1463 all disconnection interrupts are suppressed while a USB frame is
1464 looked for - if it is found within 10ms, the device is still
1467 if (USB_INT_HasOccurred(USB_INT_HSOFI))
1468 82a: 55 ff sbrs r21, 5
1469 82c: 0b c0 rjmp .+22 ; 0x844 <USB_Host_ResetDevice+0x6e>
1470 UEINTX &= ~(1 << RXSTPI);
1473 #if defined(USB_CAN_BE_HOST)
1475 UHINT &= ~(1 << HSOFI);
1476 82e: 40 91 9f 00 lds r20, 0x009F
1477 832: 4f 7d andi r20, 0xDF ; 223
1478 834: 40 93 9f 00 sts 0x009F, r20
1480 case USB_INT_DCONNI:
1481 UHINT &= ~(1 << DCONNI);
1483 case USB_INT_DDISCI:
1484 UHINT &= ~(1 << DDISCI);
1485 838: 40 91 9f 00 lds r20, 0x009F
1486 83c: 4d 7f andi r20, 0xFD ; 253
1487 83e: 40 93 9f 00 sts 0x009F, r20
1488 842: 08 c0 rjmp .+16 ; 0x854 <USB_Host_ResetDevice+0x7e>
1490 //round up by default
1491 __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
1494 __builtin_avr_delay_cycles(__ticks_dc);
1495 844: ef ec ldi r30, 0xCF ; 207
1496 846: f7 e0 ldi r31, 0x07 ; 7
1497 848: 31 97 sbiw r30, 0x01 ; 1
1498 84a: f1 f7 brne .-4 ; 0x848 <USB_Host_ResetDevice+0x72>
1499 84c: 00 c0 rjmp .+0 ; 0x84e <USB_Host_ResetDevice+0x78>
1501 850: 41 50 subi r20, 0x01 ; 1
1502 bool HSOFIEnabled = USB_INT_IsEnabled(USB_INT_HSOFI);
1504 USB_INT_Disable(USB_INT_HSOFI);
1505 USB_INT_Clear(USB_INT_HSOFI);
1507 for (uint8_t MSRem = 10; MSRem != 0; MSRem--)
1508 852: 49 f7 brne .-46 ; 0x826 <USB_Host_ResetDevice+0x50>
1515 854: 21 15 cp r18, r1
1516 856: 31 05 cpc r19, r1
1517 858: 29 f0 breq .+10 ; 0x864 <USB_Host_ResetDevice+0x8e>
1518 UEIENX |= (1 << RXSTPE);
1521 #if defined(USB_CAN_BE_HOST)
1523 UHIEN |= (1 << HSOFE);
1524 85a: 20 91 a0 00 lds r18, 0x00A0
1525 85e: 20 62 ori r18, 0x20 ; 32
1526 860: 20 93 a0 00 sts 0x00A0, r18
1527 USB_INT_Enable(USB_INT_HSOFI);
1530 864: 00 97 sbiw r24, 0x00 ; 0
1531 866: 29 f4 brne .+10 ; 0x872 <USB_Host_ResetDevice+0x9c>
1532 * messages to the device.
1534 static inline void USB_Host_SuspendBus(void) ATTR_ALWAYS_INLINE;
1535 static inline void USB_Host_SuspendBus(void)
1537 UHCON &= ~(1 << SOFEN);
1538 868: 80 91 9e 00 lds r24, 0x009E
1539 86c: 8e 7f andi r24, 0xFE ; 254
1540 86e: 80 93 9e 00 sts 0x009E, r24
1542 case USB_INT_DCONNI:
1543 UHIEN |= (1 << DCONNE);
1545 case USB_INT_DDISCI:
1546 UHIEN |= (1 << DDISCE);
1547 872: 80 91 a0 00 lds r24, 0x00A0
1548 876: 82 60 ori r24, 0x02 ; 2
1549 878: 80 93 a0 00 sts 0x00A0, r24
1550 USB_Host_SuspendBus();
1552 USB_INT_Enable(USB_INT_DDISCI);
1556 0000087e <USB_Host_WaitMS>:
1557 * \return Boolean \c true if the bus is currently suspended, \c false otherwise.
1559 static inline bool USB_Host_IsBusSuspended(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
1560 static inline bool USB_Host_IsBusSuspended(void)
1562 return ((UHCON & (1 << SOFEN)) ? false : true);
1563 87e: 40 91 9e 00 lds r20, 0x009E
1564 882: 50 e0 ldi r21, 0x00 ; 0
1565 884: 41 70 andi r20, 0x01 ; 1
1566 886: 50 70 andi r21, 0x00 ; 0
1567 case USB_INT_RXSTPI:
1568 return (UEIENX & (1 << RXSTPE));
1570 #if defined(USB_CAN_BE_HOST)
1572 return (UHIEN & (1 << HSOFE));
1573 888: 20 91 a0 00 lds r18, 0x00A0
1574 88c: 30 e0 ldi r19, 0x00 ; 0
1575 88e: 20 72 andi r18, 0x20 ; 32
1576 890: 30 70 andi r19, 0x00 ; 0
1577 UEIENX &= ~(1 << RXSTPE);
1580 #if defined(USB_CAN_BE_HOST)
1582 UHIEN &= ~(1 << HSOFE);
1583 892: 90 91 a0 00 lds r25, 0x00A0
1584 896: 9f 7d andi r25, 0xDF ; 223
1585 898: 90 93 a0 00 sts 0x00A0, r25
1586 UEINTX &= ~(1 << RXSTPI);
1589 #if defined(USB_CAN_BE_HOST)
1591 UHINT &= ~(1 << HSOFI);
1592 89c: 90 91 9f 00 lds r25, 0x009F
1593 8a0: 9f 7d andi r25, 0xDF ; 223
1594 8a2: 90 93 9f 00 sts 0x009F, r25
1595 * host and attached device may occur.
1597 static inline void USB_Host_ResumeBus(void) ATTR_ALWAYS_INLINE;
1598 static inline void USB_Host_ResumeBus(void)
1600 UHCON |= (1 << SOFEN);
1601 8a6: 90 91 9e 00 lds r25, 0x009E
1602 8aa: 91 60 ori r25, 0x01 ; 1
1603 8ac: 90 93 9e 00 sts 0x009E, r25
1604 USB_INT_Disable(USB_INT_HSOFI);
1605 USB_INT_Clear(USB_INT_HSOFI);
1607 USB_Host_ResumeBus();
1610 8b0: 26 c0 rjmp .+76 ; 0x8fe <USB_Host_WaitMS+0x80>
1611 case USB_INT_RXSTPI:
1612 return (UEINTX & (1 << RXSTPI));
1614 #if defined(USB_CAN_BE_HOST)
1616 return (UHINT & (1 << HSOFI));
1617 8b2: 90 91 9f 00 lds r25, 0x009F
1619 if (USB_INT_HasOccurred(USB_INT_HSOFI))
1620 8b6: 95 ff sbrs r25, 5
1621 8b8: 06 c0 rjmp .+12 ; 0x8c6 <USB_Host_WaitMS+0x48>
1622 UEINTX &= ~(1 << RXSTPI);
1625 #if defined(USB_CAN_BE_HOST)
1627 UHINT &= ~(1 << HSOFI);
1628 8ba: 90 91 9f 00 lds r25, 0x009F
1629 8be: 9f 7d andi r25, 0xDF ; 223
1630 8c0: 90 93 9f 00 sts 0x009F, r25
1632 USB_INT_Clear(USB_INT_HSOFI);
1634 8c4: 81 50 subi r24, 0x01 ; 1
1637 if ((USB_HostState == HOST_STATE_Unattached) || (USB_CurrentMode != USB_MODE_Host))
1638 8c6: 90 91 2b 01 lds r25, 0x012B
1639 8ca: 92 30 cpi r25, 0x02 ; 2
1640 8cc: d9 f0 breq .+54 ; 0x904 <USB_Host_WaitMS+0x86>
1641 * \return Boolean \c true if an error has occurred on the selected pipe, \c false otherwise.
1643 static inline bool Pipe_IsError(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
1644 static inline bool Pipe_IsError(void)
1646 return ((UPINTX & (1 << PERRI)) ? true : false);
1647 8ce: 90 91 a6 00 lds r25, 0x00A6
1648 ErrorCode = HOST_WAITERROR_DeviceDisconnect;
1653 if (Pipe_IsError() == true)
1654 8d2: 94 ff sbrs r25, 4
1655 8d4: 09 c0 rjmp .+18 ; 0x8e8 <USB_Host_WaitMS+0x6a>
1657 /** Clears the error flags for the currently selected pipe. */
1658 static inline void Pipe_ClearError(void) ATTR_ALWAYS_INLINE;
1659 static inline void Pipe_ClearError(void)
1662 8d6: 10 92 f5 00 sts 0x00F5, r1
1663 UPINTX &= ~(1 << PERRI);
1664 8da: 80 91 a6 00 lds r24, 0x00A6
1665 8de: 8f 7e andi r24, 0xEF ; 239
1666 8e0: 80 93 a6 00 sts 0x00A6, r24
1669 ErrorCode = HOST_WAITERROR_PipeError;
1670 8e4: 82 e0 ldi r24, 0x02 ; 2
1673 8e6: 0f c0 rjmp .+30 ; 0x906 <USB_Host_WaitMS+0x88>
1674 * \return Boolean \c true if the current pipe has been stalled by the attached device, \c false otherwise.
1676 static inline bool Pipe_IsStalled(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
1677 static inline bool Pipe_IsStalled(void)
1679 return ((UPINTX & (1 << RXSTALLI)) ? true : false);
1680 8e8: 90 91 a6 00 lds r25, 0x00A6
1683 if (Pipe_IsStalled() == true)
1684 8ec: 91 ff sbrs r25, 1
1685 8ee: 07 c0 rjmp .+14 ; 0x8fe <USB_Host_WaitMS+0x80>
1686 * \ingroup Group_PipePacketManagement_AVR8
1688 static inline void Pipe_ClearStall(void) ATTR_ALWAYS_INLINE;
1689 static inline void Pipe_ClearStall(void)
1691 UPINTX &= ~(1 << RXSTALLI);
1692 8f0: 80 91 a6 00 lds r24, 0x00A6
1693 8f4: 8d 7f andi r24, 0xFD ; 253
1694 8f6: 80 93 a6 00 sts 0x00A6, r24
1697 ErrorCode = HOST_WAITERROR_SetupStalled;
1698 8fa: 83 e0 ldi r24, 0x03 ; 3
1701 8fc: 04 c0 rjmp .+8 ; 0x906 <USB_Host_WaitMS+0x88>
1702 USB_INT_Disable(USB_INT_HSOFI);
1703 USB_INT_Clear(USB_INT_HSOFI);
1705 USB_Host_ResumeBus();
1708 8fe: 88 23 and r24, r24
1709 900: c1 f6 brne .-80 ; 0x8b2 <USB_Host_WaitMS+0x34>
1710 902: 01 c0 rjmp .+2 ; 0x906 <USB_Host_WaitMS+0x88>
1714 if ((USB_HostState == HOST_STATE_Unattached) || (USB_CurrentMode != USB_MODE_Host))
1716 ErrorCode = HOST_WAITERROR_DeviceDisconnect;
1717 904: 81 e0 ldi r24, 0x01 ; 1
1724 906: 41 15 cp r20, r1
1725 908: 51 05 cpc r21, r1
1726 90a: 29 f4 brne .+10 ; 0x916 <USB_Host_WaitMS+0x98>
1727 * messages to the device.
1729 static inline void USB_Host_SuspendBus(void) ATTR_ALWAYS_INLINE;
1730 static inline void USB_Host_SuspendBus(void)
1732 UHCON &= ~(1 << SOFEN);
1733 90c: 90 91 9e 00 lds r25, 0x009E
1734 910: 9e 7f andi r25, 0xFE ; 254
1735 912: 90 93 9e 00 sts 0x009E, r25
1736 USB_Host_SuspendBus();
1739 916: 21 15 cp r18, r1
1740 918: 31 05 cpc r19, r1
1741 91a: 29 f0 breq .+10 ; 0x926 <USB_Host_WaitMS+0xa8>
1742 UEIENX |= (1 << RXSTPE);
1745 #if defined(USB_CAN_BE_HOST)
1747 UHIEN |= (1 << HSOFE);
1748 91c: 90 91 a0 00 lds r25, 0x00A0
1749 920: 90 62 ori r25, 0x20 ; 32
1750 922: 90 93 a0 00 sts 0x00A0, r25
1751 USB_INT_Enable(USB_INT_HSOFI);
1757 00000928 <USB_Host_ProcessNextHostState>:
1759 #define __INCLUDE_FROM_HOST_C
1760 #include "../Host.h"
1762 void USB_Host_ProcessNextHostState(void)
1769 932: cd b7 in r28, 0x3d ; 61
1770 934: de b7 in r29, 0x3e ; 62
1771 936: 28 97 sbiw r28, 0x08 ; 8
1772 938: 0f b6 in r0, 0x3f ; 63
1774 93c: de bf out 0x3e, r29 ; 62
1775 93e: 0f be out 0x3f, r0 ; 63
1776 940: cd bf out 0x3d, r28 ; 61
1777 uint8_t SubErrorCode = HOST_ENUMERROR_NoError;
1779 static uint16_t WaitMSRemaining;
1780 static uint8_t PostWaitState;
1782 switch (USB_HostState)
1783 942: 80 91 2b 01 lds r24, 0x012B
1784 946: 86 30 cpi r24, 0x06 ; 6
1785 948: 09 f4 brne .+2 ; 0x94c <USB_Host_ProcessNextHostState+0x24>
1786 94a: 99 c0 rjmp .+306 ; 0xa7e <USB_Host_ProcessNextHostState+0x156>
1787 94c: 87 30 cpi r24, 0x07 ; 7
1788 94e: 70 f4 brcc .+28 ; 0x96c <USB_Host_ProcessNextHostState+0x44>
1789 950: 83 30 cpi r24, 0x03 ; 3
1790 952: c9 f1 breq .+114 ; 0x9c6 <USB_Host_ProcessNextHostState+0x9e>
1791 954: 84 30 cpi r24, 0x04 ; 4
1792 956: 20 f4 brcc .+8 ; 0x960 <USB_Host_ProcessNextHostState+0x38>
1793 958: 81 30 cpi r24, 0x01 ; 1
1794 95a: 09 f0 breq .+2 ; 0x95e <USB_Host_ProcessNextHostState+0x36>
1795 95c: 0b c1 rjmp .+534 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
1796 95e: 13 c0 rjmp .+38 ; 0x986 <USB_Host_ProcessNextHostState+0x5e>
1797 960: 84 30 cpi r24, 0x04 ; 4
1798 962: c9 f1 breq .+114 ; 0x9d6 <USB_Host_ProcessNextHostState+0xae>
1799 964: 85 30 cpi r24, 0x05 ; 5
1800 966: 09 f0 breq .+2 ; 0x96a <USB_Host_ProcessNextHostState+0x42>
1801 968: 05 c1 rjmp .+522 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
1802 96a: 60 c0 rjmp .+192 ; 0xa2c <USB_Host_ProcessNextHostState+0x104>
1803 96c: 88 30 cpi r24, 0x08 ; 8
1804 96e: 09 f4 brne .+2 ; 0x972 <USB_Host_ProcessNextHostState+0x4a>
1805 970: a0 c0 rjmp .+320 ; 0xab2 <USB_Host_ProcessNextHostState+0x18a>
1806 972: 88 30 cpi r24, 0x08 ; 8
1807 974: 08 f4 brcc .+2 ; 0x978 <USB_Host_ProcessNextHostState+0x50>
1808 976: 8f c0 rjmp .+286 ; 0xa96 <USB_Host_ProcessNextHostState+0x16e>
1809 978: 89 30 cpi r24, 0x09 ; 9
1810 97a: 09 f4 brne .+2 ; 0x97e <USB_Host_ProcessNextHostState+0x56>
1811 97c: b9 c0 rjmp .+370 ; 0xaf0 <USB_Host_ProcessNextHostState+0x1c8>
1812 97e: 8a 30 cpi r24, 0x0A ; 10
1813 980: 09 f0 breq .+2 ; 0x984 <USB_Host_ProcessNextHostState+0x5c>
1814 982: f8 c0 rjmp .+496 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
1815 984: de c0 rjmp .+444 ; 0xb42 <USB_Host_ProcessNextHostState+0x21a>
1817 case HOST_STATE_WaitForDevice:
1818 if (WaitMSRemaining)
1819 986: 00 91 20 01 lds r16, 0x0120
1820 98a: 10 91 21 01 lds r17, 0x0121
1821 98e: 01 15 cp r16, r1
1822 990: 11 05 cpc r17, r1
1823 992: 09 f4 brne .+2 ; 0x996 <USB_Host_ProcessNextHostState+0x6e>
1824 994: ef c0 rjmp .+478 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
1826 if ((SubErrorCode = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful)
1827 996: 81 e0 ldi r24, 0x01 ; 1
1828 998: 72 df rcall .-284 ; 0x87e <USB_Host_WaitMS>
1829 99a: 68 2f mov r22, r24
1830 99c: 88 23 and r24, r24
1831 99e: 31 f0 breq .+12 ; 0x9ac <USB_Host_ProcessNextHostState+0x84>
1833 USB_HostState = PostWaitState;
1834 9a0: 80 91 1f 01 lds r24, 0x011F
1835 9a4: 80 93 2b 01 sts 0x012B, r24
1836 ErrorCode = HOST_ENUMERROR_WaitStage;
1837 9a8: 81 e0 ldi r24, 0x01 ; 1
1839 9aa: e0 c0 rjmp .+448 ; 0xb6c <USB_Host_ProcessNextHostState+0x244>
1842 if (!(--WaitMSRemaining))
1843 9ac: 01 50 subi r16, 0x01 ; 1
1844 9ae: 10 40 sbci r17, 0x00 ; 0
1845 9b0: 10 93 21 01 sts 0x0121, r17
1846 9b4: 00 93 20 01 sts 0x0120, r16
1847 9b8: 01 15 cp r16, r1
1848 9ba: 11 05 cpc r17, r1
1849 9bc: 09 f0 breq .+2 ; 0x9c0 <USB_Host_ProcessNextHostState+0x98>
1850 9be: da c0 rjmp .+436 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
1851 USB_HostState = PostWaitState;
1852 9c0: 80 91 1f 01 lds r24, 0x011F
1853 9c4: c3 c0 rjmp .+390 ; 0xb4c <USB_Host_ProcessNextHostState+0x224>
1857 case HOST_STATE_Powered:
1858 WaitMSRemaining = HOST_DEVICE_SETTLE_DELAY_MS;
1859 9c6: 88 ee ldi r24, 0xE8 ; 232
1860 9c8: 93 e0 ldi r25, 0x03 ; 3
1861 9ca: 90 93 21 01 sts 0x0121, r25
1862 9ce: 80 93 20 01 sts 0x0120, r24
1864 USB_HostState = HOST_STATE_Powered_WaitForDeviceSettle;
1865 9d2: 84 e0 ldi r24, 0x04 ; 4
1866 9d4: bb c0 rjmp .+374 ; 0xb4c <USB_Host_ProcessNextHostState+0x224>
1868 case HOST_STATE_Powered_WaitForDeviceSettle:
1869 if (WaitMSRemaining--)
1870 9d6: 80 91 20 01 lds r24, 0x0120
1871 9da: 90 91 21 01 lds r25, 0x0121
1872 9de: 9c 01 movw r18, r24
1873 9e0: 21 50 subi r18, 0x01 ; 1
1874 9e2: 30 40 sbci r19, 0x00 ; 0
1875 9e4: 30 93 21 01 sts 0x0121, r19
1876 9e8: 20 93 20 01 sts 0x0120, r18
1877 9ec: 00 97 sbiw r24, 0x00 ; 0
1878 9ee: 39 f0 breq .+14 ; 0x9fe <USB_Host_ProcessNextHostState+0xd6>
1879 9f0: 8f ec ldi r24, 0xCF ; 207
1880 9f2: 97 e0 ldi r25, 0x07 ; 7
1881 9f4: 01 97 sbiw r24, 0x01 ; 1
1882 9f6: f1 f7 brne .-4 ; 0x9f4 <USB_Host_ProcessNextHostState+0xcc>
1883 9f8: 00 c0 rjmp .+0 ; 0x9fa <USB_Host_ProcessNextHostState+0xd2>
1885 9fc: bb c0 rjmp .+374 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
1888 static inline void USB_Host_VBUS_Manual_Off(void) ATTR_ALWAYS_INLINE;
1889 static inline void USB_Host_VBUS_Manual_Off(void)
1892 9fe: 77 98 cbi 0x0e, 7 ; 14
1894 #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
1895 static inline void USB_OTGPAD_On(void) ATTR_ALWAYS_INLINE;
1896 static inline void USB_OTGPAD_On(void)
1898 USBCON |= (1 << OTGPADE);
1899 a00: 80 91 d8 00 lds r24, 0x00D8
1900 a04: 80 61 ori r24, 0x10 ; 16
1901 a06: 80 93 d8 00 sts 0x00D8, r24
1904 static inline void USB_Host_VBUS_Auto_Enable(void) ATTR_ALWAYS_INLINE;
1905 static inline void USB_Host_VBUS_Auto_Enable(void)
1907 OTGCON &= ~(1 << VBUSHWC);
1908 a0a: 80 91 dd 00 lds r24, 0x00DD
1909 a0e: 8b 7f andi r24, 0xFB ; 251
1910 a10: 80 93 dd 00 sts 0x00DD, r24
1911 UHWCON |= (1 << UVCONE);
1912 a14: 80 91 d7 00 lds r24, 0x00D7
1913 a18: 80 61 ori r24, 0x10 ; 16
1914 a1a: 80 93 d7 00 sts 0x00D7, r24
1917 static inline void USB_Host_VBUS_Auto_On(void) ATTR_ALWAYS_INLINE;
1918 static inline void USB_Host_VBUS_Auto_On(void)
1920 OTGCON |= (1 << VBUSREQ);
1921 a1e: 80 91 dd 00 lds r24, 0x00DD
1922 a22: 82 60 ori r24, 0x02 ; 2
1923 a24: 80 93 dd 00 sts 0x00DD, r24
1926 USB_Host_VBUS_Auto_Enable();
1927 USB_Host_VBUS_Auto_On();
1929 USB_HostState = HOST_STATE_Powered_WaitForConnect;
1930 a28: 85 e0 ldi r24, 0x05 ; 5
1931 a2a: 90 c0 rjmp .+288 ; 0xb4c <USB_Host_ProcessNextHostState+0x224>
1933 #if defined(USB_CAN_BE_HOST)
1935 return (UHINT & (1 << HSOFI));
1936 case USB_INT_DCONNI:
1937 return (UHINT & (1 << DCONNI));
1938 a2c: 80 91 9f 00 lds r24, 0x009F
1942 case HOST_STATE_Powered_WaitForConnect:
1943 if (USB_INT_HasOccurred(USB_INT_DCONNI))
1944 a30: 80 ff sbrs r24, 0
1945 a32: a0 c0 rjmp .+320 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
1946 #if defined(USB_CAN_BE_HOST)
1948 UHINT &= ~(1 << HSOFI);
1950 case USB_INT_DCONNI:
1951 UHINT &= ~(1 << DCONNI);
1952 a34: 80 91 9f 00 lds r24, 0x009F
1953 a38: 8e 7f andi r24, 0xFE ; 254
1954 a3a: 80 93 9f 00 sts 0x009F, r24
1956 case USB_INT_DDISCI:
1957 UHINT &= ~(1 << DDISCI);
1958 a3e: 80 91 9f 00 lds r24, 0x009F
1959 a42: 8d 7f andi r24, 0xFD ; 253
1960 a44: 80 93 9f 00 sts 0x009F, r24
1962 case USB_INT_BCERRI:
1963 OTGINT &= ~(1 << BCERRI);
1965 case USB_INT_VBERRI:
1966 OTGINT &= ~(1 << VBERRI);
1967 a48: 80 91 df 00 lds r24, 0x00DF
1968 a4c: 8d 7f andi r24, 0xFD ; 253
1969 a4e: 80 93 df 00 sts 0x00DF, r24
1971 case USB_INT_BCERRI:
1972 OTGIEN |= (1 << BCERRE);
1974 case USB_INT_VBERRI:
1975 OTGIEN |= (1 << VBERRE);
1976 a52: 80 91 de 00 lds r24, 0x00DE
1977 a56: 82 60 ori r24, 0x02 ; 2
1978 a58: 80 93 de 00 sts 0x00DE, r24
1979 * host and attached device may occur.
1981 static inline void USB_Host_ResumeBus(void) ATTR_ALWAYS_INLINE;
1982 static inline void USB_Host_ResumeBus(void)
1984 UHCON |= (1 << SOFEN);
1985 a5c: 80 91 9e 00 lds r24, 0x009E
1986 a60: 81 60 ori r24, 0x01 ; 1
1987 a62: 80 93 9e 00 sts 0x009E, r24
1989 USB_INT_Clear(USB_INT_VBERRI);
1990 USB_INT_Enable(USB_INT_VBERRI);
1992 USB_Host_ResumeBus();
1994 a66: 26 d1 rcall .+588 ; 0xcb4 <Pipe_ClearPipes>
1996 HOST_TASK_NONBLOCK_WAIT(100, HOST_STATE_Powered_DoReset);
1997 a68: 81 e0 ldi r24, 0x01 ; 1
1998 a6a: 80 93 2b 01 sts 0x012B, r24
1999 a6e: 84 e6 ldi r24, 0x64 ; 100
2000 a70: 90 e0 ldi r25, 0x00 ; 0
2001 a72: 90 93 21 01 sts 0x0121, r25
2002 a76: 80 93 20 01 sts 0x0120, r24
2003 a7a: 86 e0 ldi r24, 0x06 ; 6
2004 a7c: 5f c0 rjmp .+190 ; 0xb3c <USB_Host_ProcessNextHostState+0x214>
2008 case HOST_STATE_Powered_DoReset:
2009 USB_Host_ResetDevice();
2010 a7e: ab de rcall .-682 ; 0x7d6 <USB_Host_ResetDevice>
2012 HOST_TASK_NONBLOCK_WAIT(200, HOST_STATE_Powered_ConfigPipe);
2013 a80: 81 e0 ldi r24, 0x01 ; 1
2014 a82: 80 93 2b 01 sts 0x012B, r24
2015 a86: 88 ec ldi r24, 0xC8 ; 200
2016 a88: 90 e0 ldi r25, 0x00 ; 0
2017 a8a: 90 93 21 01 sts 0x0121, r25
2018 a8e: 80 93 20 01 sts 0x0120, r24
2019 a92: 87 e0 ldi r24, 0x07 ; 7
2020 a94: 53 c0 rjmp .+166 ; 0xb3c <USB_Host_ProcessNextHostState+0x214>
2022 case HOST_STATE_Powered_ConfigPipe:
2023 Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
2024 a96: 80 e0 ldi r24, 0x00 ; 0
2025 a98: 60 e0 ldi r22, 0x00 ; 0
2026 a9a: 40 e0 ldi r20, 0x00 ; 0
2027 a9c: 20 e0 ldi r18, 0x00 ; 0
2028 a9e: 00 e4 ldi r16, 0x40 ; 64
2029 aa0: 10 e0 ldi r17, 0x00 ; 0
2030 aa2: ee 24 eor r14, r14
2031 aa4: a0 d0 rcall .+320 ; 0xbe6 <Pipe_ConfigurePipe>
2032 * \return Boolean \c true if the selected pipe is configured, \c false otherwise.
2034 static inline bool Pipe_IsConfigured(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
2035 static inline bool Pipe_IsConfigured(void)
2037 return ((UPSTAX & (1 << CFGOK)) ? true : false);
2038 aa6: 80 91 ac 00 lds r24, 0x00AC
2039 PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
2040 PIPE_CONTROLPIPE_DEFAULT_SIZE, PIPE_BANK_SINGLE);
2042 if (!(Pipe_IsConfigured()))
2043 aaa: 87 ff sbrs r24, 7
2044 aac: 5b c0 rjmp .+182 ; 0xb64 <USB_Host_ProcessNextHostState+0x23c>
2045 ErrorCode = HOST_ENUMERROR_PipeConfigError;
2050 USB_HostState = HOST_STATE_Default;
2051 aae: 88 e0 ldi r24, 0x08 ; 8
2052 ab0: 4d c0 rjmp .+154 ; 0xb4c <USB_Host_ProcessNextHostState+0x224>
2054 case HOST_STATE_Default:
2055 USB_ControlRequest = (USB_Request_Header_t)
2056 ab2: a3 e2 ldi r26, 0x23 ; 35
2057 ab4: b1 e0 ldi r27, 0x01 ; 1
2058 ab6: e3 e1 ldi r30, 0x13 ; 19
2059 ab8: f1 e0 ldi r31, 0x01 ; 1
2060 aba: 88 e0 ldi r24, 0x08 ; 8
2061 abc: 01 90 ld r0, Z+
2062 abe: 0d 92 st X+, r0
2063 ac0: 81 50 subi r24, 0x01 ; 1
2064 ac2: e1 f7 brne .-8 ; 0xabc <USB_Host_ProcessNextHostState+0x194>
2068 uint8_t DataBuffer[8];
2070 if ((SubErrorCode = USB_Host_SendControlRequest(DataBuffer)) != HOST_SENDCONTROL_Successful)
2071 ac4: ce 01 movw r24, r28
2072 ac6: 01 96 adiw r24, 0x01 ; 1
2073 ac8: dc d2 rcall .+1464 ; 0x1082 <USB_Host_SendControlRequest>
2074 aca: 68 2f mov r22, r24
2075 acc: 88 23 and r24, r24
2076 ace: 09 f0 breq .+2 ; 0xad2 <USB_Host_ProcessNextHostState+0x1aa>
2077 ad0: 4c c0 rjmp .+152 ; 0xb6a <USB_Host_ProcessNextHostState+0x242>
2079 ErrorCode = HOST_ENUMERROR_ControlError;
2083 USB_ControlPipeSize = DataBuffer[offsetof(USB_Descriptor_Device_t, Endpoint0Size)];
2084 ad2: 88 85 ldd r24, Y+8 ; 0x08
2085 ad4: 80 93 1b 01 sts 0x011B, r24
2087 USB_Host_ResetDevice();
2088 ad8: 7e de rcall .-772 ; 0x7d6 <USB_Host_ResetDevice>
2090 HOST_TASK_NONBLOCK_WAIT(200, HOST_STATE_Default_PostReset);
2091 ada: 81 e0 ldi r24, 0x01 ; 1
2092 adc: 80 93 2b 01 sts 0x012B, r24
2093 ae0: 88 ec ldi r24, 0xC8 ; 200
2094 ae2: 90 e0 ldi r25, 0x00 ; 0
2095 ae4: 90 93 21 01 sts 0x0121, r25
2096 ae8: 80 93 20 01 sts 0x0120, r24
2097 aec: 89 e0 ldi r24, 0x09 ; 9
2098 aee: 26 c0 rjmp .+76 ; 0xb3c <USB_Host_ProcessNextHostState+0x214>
2100 case HOST_STATE_Default_PostReset:
2101 Pipe_ConfigurePipe(PIPE_CONTROLPIPE, EP_TYPE_CONTROL,
2102 af0: 00 91 1b 01 lds r16, 0x011B
2103 af4: 80 e0 ldi r24, 0x00 ; 0
2104 af6: 60 e0 ldi r22, 0x00 ; 0
2105 af8: 40 e0 ldi r20, 0x00 ; 0
2106 afa: 20 e0 ldi r18, 0x00 ; 0
2107 afc: 10 e0 ldi r17, 0x00 ; 0
2108 afe: ee 24 eor r14, r14
2109 b00: 72 d0 rcall .+228 ; 0xbe6 <Pipe_ConfigurePipe>
2110 b02: 80 91 ac 00 lds r24, 0x00AC
2111 PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
2112 USB_ControlPipeSize, PIPE_BANK_SINGLE);
2114 if (!(Pipe_IsConfigured()))
2115 b06: 87 ff sbrs r24, 7
2116 b08: 2d c0 rjmp .+90 ; 0xb64 <USB_Host_ProcessNextHostState+0x23c>
2117 ErrorCode = HOST_ENUMERROR_PipeConfigError;
2122 USB_ControlRequest = (USB_Request_Header_t)
2123 b0a: a3 e2 ldi r26, 0x23 ; 35
2124 b0c: b1 e0 ldi r27, 0x01 ; 1
2125 b0e: eb e0 ldi r30, 0x0B ; 11
2126 b10: f1 e0 ldi r31, 0x01 ; 1
2127 b12: 88 e0 ldi r24, 0x08 ; 8
2128 b14: 01 90 ld r0, Z+
2129 b16: 0d 92 st X+, r0
2130 b18: 81 50 subi r24, 0x01 ; 1
2131 b1a: e1 f7 brne .-8 ; 0xb14 <USB_Host_ProcessNextHostState+0x1ec>
2132 .wValue = USB_HOST_DEVICEADDRESS,
2137 if ((SubErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
2138 b1c: 80 e0 ldi r24, 0x00 ; 0
2139 b1e: 90 e0 ldi r25, 0x00 ; 0
2140 b20: b0 d2 rcall .+1376 ; 0x1082 <USB_Host_SendControlRequest>
2141 b22: 68 2f mov r22, r24
2142 b24: 88 23 and r24, r24
2143 b26: 09 f5 brne .+66 ; 0xb6a <USB_Host_ProcessNextHostState+0x242>
2145 ErrorCode = HOST_ENUMERROR_ControlError;
2149 HOST_TASK_NONBLOCK_WAIT(100, HOST_STATE_Default_PostAddressSet);
2150 b28: 81 e0 ldi r24, 0x01 ; 1
2151 b2a: 80 93 2b 01 sts 0x012B, r24
2152 b2e: 84 e6 ldi r24, 0x64 ; 100
2153 b30: 90 e0 ldi r25, 0x00 ; 0
2154 b32: 90 93 21 01 sts 0x0121, r25
2155 b36: 80 93 20 01 sts 0x0120, r24
2156 b3a: 8a e0 ldi r24, 0x0A ; 10
2157 b3c: 80 93 1f 01 sts 0x011F, r24
2159 b40: 19 c0 rjmp .+50 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
2162 static inline void USB_Host_SetDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE;
2163 static inline void USB_Host_SetDeviceAddress(const uint8_t Address)
2165 UHADDR = (Address & 0x7F);
2166 b42: 81 e0 ldi r24, 0x01 ; 1
2167 b44: 80 93 a1 00 sts 0x00A1, r24
2168 case HOST_STATE_Default_PostAddressSet:
2169 USB_Host_SetDeviceAddress(USB_HOST_DEVICEADDRESS);
2171 EVENT_USB_Host_DeviceEnumerationComplete();
2172 b48: 24 dc rcall .-1976 ; 0x392 <EVENT_USB_Host_DeviceEnumerationComplete>
2173 USB_HostState = HOST_STATE_Addressed;
2174 b4a: 8b e0 ldi r24, 0x0B ; 11
2175 b4c: 80 93 2b 01 sts 0x012B, r24
2177 b50: 11 c0 rjmp .+34 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
2180 if ((ErrorCode != HOST_ENUMERROR_NoError) && (USB_HostState != HOST_STATE_Unattached))
2182 EVENT_USB_Host_DeviceEnumerationFailed(ErrorCode, SubErrorCode);
2183 b52: 40 dc rcall .-1920 ; 0x3d4 <EVENT_USB_Host_DeviceEnumerationFailed>
2186 static inline void USB_Host_VBUS_Auto_Off(void) ATTR_ALWAYS_INLINE;
2187 static inline void USB_Host_VBUS_Auto_Off(void)
2189 OTGCON |= (1 << VBUSRQC);
2190 b54: 80 91 dd 00 lds r24, 0x00DD
2191 b58: 81 60 ori r24, 0x01 ; 1
2192 b5a: 80 93 dd 00 sts 0x00DD, r24
2194 USB_Host_VBUS_Auto_Off();
2196 EVENT_USB_Host_DeviceUnattached();
2197 b5e: 14 dc rcall .-2008 ; 0x388 <EVENT_USB_Host_DeviceUnattached>
2199 USB_ResetInterface();
2200 b60: d5 d0 rcall .+426 ; 0xd0c <USB_ResetInterface>
2201 b62: 08 c0 rjmp .+16 ; 0xb74 <USB_Host_ProcessNextHostState+0x24c>
2202 USB_ControlPipeSize, PIPE_BANK_SINGLE);
2204 if (!(Pipe_IsConfigured()))
2206 ErrorCode = HOST_ENUMERROR_PipeConfigError;
2208 b64: 60 e0 ldi r22, 0x00 ; 0
2209 PIPE_TOKEN_SETUP, ENDPOINT_CONTROLEP,
2210 USB_ControlPipeSize, PIPE_BANK_SINGLE);
2212 if (!(Pipe_IsConfigured()))
2214 ErrorCode = HOST_ENUMERROR_PipeConfigError;
2215 b66: 84 e0 ldi r24, 0x04 ; 4
2216 b68: 01 c0 rjmp .+2 ; 0xb6c <USB_Host_ProcessNextHostState+0x244>
2220 if ((SubErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
2222 ErrorCode = HOST_ENUMERROR_ControlError;
2223 b6a: 83 e0 ldi r24, 0x03 ; 3
2224 EVENT_USB_Host_DeviceEnumerationComplete();
2225 USB_HostState = HOST_STATE_Addressed;
2229 if ((ErrorCode != HOST_ENUMERROR_NoError) && (USB_HostState != HOST_STATE_Unattached))
2230 b6c: 90 91 2b 01 lds r25, 0x012B
2231 b70: 92 30 cpi r25, 0x02 ; 2
2232 b72: 79 f7 brne .-34 ; 0xb52 <USB_Host_ProcessNextHostState+0x22a>
2234 EVENT_USB_Host_DeviceUnattached();
2236 USB_ResetInterface();
2239 b74: 28 96 adiw r28, 0x08 ; 8
2240 b76: 0f b6 in r0, 0x3f ; 63
2242 b7a: de bf out 0x3e, r29 ; 62
2243 b7c: 0f be out 0x3f, r0 ; 63
2244 b7e: cd bf out 0x3d, r28 ; 61
2252 00000b8c <USB_Host_SetDeviceConfiguration>:
2253 USB_INT_Enable(USB_INT_DDISCI);
2256 uint8_t USB_Host_SetDeviceConfiguration(const uint8_t ConfigNumber)
2258 USB_ControlRequest = (USB_Request_Header_t)
2259 b8c: 10 92 23 01 sts 0x0123, r1
2260 b90: 99 e0 ldi r25, 0x09 ; 9
2261 b92: 90 93 24 01 sts 0x0124, r25
2262 b96: 80 93 25 01 sts 0x0125, r24
2263 b9a: 10 92 26 01 sts 0x0126, r1
2264 b9e: 10 92 28 01 sts 0x0128, r1
2265 ba2: 10 92 27 01 sts 0x0127, r1
2266 ba6: 10 92 2a 01 sts 0x012A, r1
2267 baa: 10 92 29 01 sts 0x0129, r1
2268 * \param[in] PipeNumber Index of the pipe to select.
2270 static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
2271 static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
2274 bae: 10 92 a7 00 sts 0x00A7, r1
2278 Pipe_SelectPipe(PIPE_CONTROLPIPE);
2280 return USB_Host_SendControlRequest(NULL);
2281 bb2: 80 e0 ldi r24, 0x00 ; 0
2282 bb4: 90 e0 ldi r25, 0x00 ; 0
2284 bb6: 65 c2 rjmp .+1226 ; 0x1082 <USB_Host_SendControlRequest>
2286 00000bb8 <USB_Host_SetInterfaceAltSetting>:
2289 uint8_t USB_Host_SetInterfaceAltSetting(const uint8_t InterfaceNum,
2290 const uint8_t AltSetting)
2292 USB_ControlRequest = (USB_Request_Header_t)
2293 bb8: e3 e2 ldi r30, 0x23 ; 35
2294 bba: f1 e0 ldi r31, 0x01 ; 1
2295 bbc: 91 e0 ldi r25, 0x01 ; 1
2296 bbe: 90 93 23 01 sts 0x0123, r25
2297 bc2: 9b e0 ldi r25, 0x0B ; 11
2298 bc4: 90 93 24 01 sts 0x0124, r25
2299 bc8: 60 93 25 01 sts 0x0125, r22
2300 bcc: 13 82 std Z+3, r1 ; 0x03
2301 bce: 80 93 27 01 sts 0x0127, r24
2302 bd2: 15 82 std Z+5, r1 ; 0x05
2303 bd4: 10 92 2a 01 sts 0x012A, r1
2304 bd8: 10 92 29 01 sts 0x0129, r1
2305 bdc: 10 92 a7 00 sts 0x00A7, r1
2309 Pipe_SelectPipe(PIPE_CONTROLPIPE);
2311 return USB_Host_SendControlRequest(NULL);
2312 be0: 80 e0 ldi r24, 0x00 ; 0
2313 be2: 90 e0 ldi r25, 0x00 ; 0
2315 be4: 4e c2 rjmp .+1180 ; 0x1082 <USB_Host_SendControlRequest>
2317 00000be6 <Pipe_ConfigurePipe>:
2319 const uint8_t Token,
2320 const uint8_t EndpointNumber,
2321 const uint16_t Size,
2322 const uint8_t Banks)
2327 bec: 5e 2d mov r21, r14
2329 Pipe_SelectPipe(PNum);
2333 UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
2335 bf0: 66 0f add r22, r22
2336 bf2: 66 0f add r22, r22
2337 bf4: 60 7c andi r22, 0xC0 ; 192
2338 bf6: 64 2b or r22, r20
2339 bf8: 2f 70 andi r18, 0x0F ; 15
2340 bfa: 62 2b or r22, r18
2342 Pipe_SetInfiniteINRequests();
2344 return Pipe_IsConfigured();
2346 for (uint8_t PNum = Number; PNum < PIPE_TOTAL_PIPES; PNum++)
2347 bfc: 98 2f mov r25, r24
2348 Pipe_SelectPipe(PNum);
2352 UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
2353 UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
2354 bfe: 52 60 ori r21, 0x02 ; 2
2356 Pipe_SetInfiniteINRequests();
2358 return Pipe_IsConfigured();
2360 for (uint8_t PNum = Number; PNum < PIPE_TOTAL_PIPES; PNum++)
2361 c00: 4d c0 rjmp .+154 ; 0xc9c <Pipe_ConfigurePipe+0xb6>
2362 * \param[in] PipeNumber Index of the pipe to select.
2364 static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
2365 static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
2368 c02: 90 93 a7 00 sts 0x00A7, r25
2369 uint8_t UPINRQXTemp;
2372 Pipe_SelectPipe(PNum);
2375 c06: 98 17 cp r25, r24
2376 c08: b1 f4 brne .+44 ; 0xc36 <Pipe_ConfigurePipe+0x50>
2377 c0a: 28 e0 ldi r18, 0x08 ; 8
2378 c0c: 30 e0 ldi r19, 0x00 ; 0
2379 c0e: 40 e0 ldi r20, 0x00 ; 0
2380 c10: 03 c0 rjmp .+6 ; 0xc18 <Pipe_ConfigurePipe+0x32>
2381 uint8_t MaskVal = 0;
2382 uint16_t CheckBytes = 8;
2384 while ((CheckBytes < Bytes) && (CheckBytes < PIPE_MAX_SIZE))
2387 c12: 4f 5f subi r20, 0xFF ; 255
2389 c14: 22 0f add r18, r18
2390 c16: 33 1f adc r19, r19
2391 static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes)
2393 uint8_t MaskVal = 0;
2394 uint16_t CheckBytes = 8;
2396 while ((CheckBytes < Bytes) && (CheckBytes < PIPE_MAX_SIZE))
2397 c18: 20 17 cp r18, r16
2398 c1a: 31 07 cpc r19, r17
2399 c1c: 10 f4 brcc .+4 ; 0xc22 <Pipe_ConfigurePipe+0x3c>
2400 c1e: 45 30 cpi r20, 0x05 ; 5
2401 c20: c1 f7 brne .-16 ; 0xc12 <Pipe_ConfigurePipe+0x2c>
2407 return (MaskVal << EPSIZE0);
2408 c22: 24 2f mov r18, r20
2410 c26: 20 7f andi r18, 0xF0 ; 240
2412 UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
2413 UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
2414 c28: 25 2b or r18, r21
2416 Pipe_SelectPipe(PNum);
2420 UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
2421 c2a: a6 2f mov r26, r22
2422 UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
2424 UPCONXTemp = ((1 << PEN) | (1 << INMODE));
2427 c2c: 40 e0 ldi r20, 0x00 ; 0
2429 UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
2430 UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
2432 UPCONXTemp = ((1 << PEN) | (1 << INMODE));
2434 c2e: 70 e0 ldi r23, 0x00 ; 0
2437 UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
2438 UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
2440 UPCONXTemp = ((1 << PEN) | (1 << INMODE));
2441 c30: e1 e2 ldi r30, 0x21 ; 33
2445 UPCFG0XTemp = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
2446 UPCFG1XTemp = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
2448 c32: f0 e0 ldi r31, 0x00 ; 0
2449 c34: 0c c0 rjmp .+24 ; 0xc4e <Pipe_ConfigurePipe+0x68>
2455 UPCFG0XTemp = UPCFG0X;
2456 c36: a0 91 aa 00 lds r26, 0x00AA
2457 UPCFG1XTemp = UPCFG1X;
2458 c3a: 20 91 ab 00 lds r18, 0x00AB
2459 UPCFG2XTemp = UPCFG2X;
2460 c3e: f0 91 ad 00 lds r31, 0x00AD
2461 UPCONXTemp = UPCONX;
2462 c42: e0 91 a9 00 lds r30, 0x00A9
2463 UPINRQXTemp = UPINRQX;
2464 c46: 70 91 a5 00 lds r23, 0x00A5
2465 UPIENXTemp = UPIENX;
2466 c4a: 40 91 ae 00 lds r20, 0x00AE
2468 /** Configures the currently selected pipe to allow for an unlimited number of IN requests. */
2469 static inline void Pipe_SetInfiniteINRequests(void) ATTR_ALWAYS_INLINE;
2470 static inline void Pipe_SetInfiniteINRequests(void)
2472 UPCONX |= (1 << INMODE);
2473 c4e: 30 91 a9 00 lds r19, 0x00A9
2474 c52: 30 62 ori r19, 0x20 ; 32
2475 c54: 30 93 a9 00 sts 0x00A9, r19
2478 Pipe_SetInfiniteINRequests();
2480 if (!(UPCFG1XTemp & (1 << ALLOC)))
2481 c58: 21 ff sbrs r18, 1
2482 c5a: 1f c0 rjmp .+62 ; 0xc9a <Pipe_ConfigurePipe+0xb4>
2483 * from an attached device.
2485 static inline void Pipe_DisablePipe(void) ATTR_ALWAYS_INLINE;
2486 static inline void Pipe_DisablePipe(void)
2488 UPCONX &= ~(1 << PEN);
2489 c5c: 30 91 a9 00 lds r19, 0x00A9
2490 c60: 3e 7f andi r19, 0xFE ; 254
2491 c62: 30 93 a9 00 sts 0x00A9, r19
2495 UPCFG1X &= (1 << ALLOC);
2496 c66: 30 91 ab 00 lds r19, 0x00AB
2497 c6a: 32 70 andi r19, 0x02 ; 2
2498 c6c: 30 93 ab 00 sts 0x00AB, r19
2499 * \pre The currently selected pipe must first be configured properly via \ref Pipe_ConfigurePipe().
2501 static inline void Pipe_EnablePipe(void) ATTR_ALWAYS_INLINE;
2502 static inline void Pipe_EnablePipe(void)
2504 UPCONX |= (1 << PEN);
2505 c70: 30 91 a9 00 lds r19, 0x00A9
2506 c74: 31 60 ori r19, 0x01 ; 1
2507 c76: 30 93 a9 00 sts 0x00A9, r19
2510 UPCFG0X = UPCFG0XTemp;
2511 c7a: a0 93 aa 00 sts 0x00AA, r26
2512 UPCFG1X = UPCFG1XTemp;
2513 c7e: 20 93 ab 00 sts 0x00AB, r18
2514 UPCFG2X = UPCFG2XTemp;
2515 c82: f0 93 ad 00 sts 0x00AD, r31
2516 UPCONX = UPCONXTemp;
2517 c86: e0 93 a9 00 sts 0x00A9, r30
2518 UPINRQX = UPINRQXTemp;
2519 c8a: 70 93 a5 00 sts 0x00A5, r23
2520 UPIENX = UPIENXTemp;
2521 c8e: 40 93 ae 00 sts 0x00AE, r20
2522 * \return Boolean \c true if the selected pipe is configured, \c false otherwise.
2524 static inline bool Pipe_IsConfigured(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
2525 static inline bool Pipe_IsConfigured(void)
2527 return ((UPSTAX & (1 << CFGOK)) ? true : false);
2528 c92: 20 91 ac 00 lds r18, 0x00AC
2530 if (!(Pipe_IsConfigured()))
2531 c96: 27 ff sbrs r18, 7
2532 c98: 08 c0 rjmp .+16 ; 0xcaa <Pipe_ConfigurePipe+0xc4>
2534 Pipe_SetInfiniteINRequests();
2536 return Pipe_IsConfigured();
2538 for (uint8_t PNum = Number; PNum < PIPE_TOTAL_PIPES; PNum++)
2539 c9a: 9f 5f subi r25, 0xFF ; 255
2540 c9c: 97 30 cpi r25, 0x07 ; 7
2541 c9e: 08 f4 brcc .+2 ; 0xca2 <Pipe_ConfigurePipe+0xbc>
2542 ca0: b0 cf rjmp .-160 ; 0xc02 <Pipe_ConfigurePipe+0x1c>
2543 * \param[in] PipeNumber Index of the pipe to select.
2545 static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
2546 static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
2549 ca2: 80 93 a7 00 sts 0x00A7, r24
2550 if (!(Pipe_IsConfigured()))
2554 Pipe_SelectPipe(Number);
2556 ca6: 81 e0 ldi r24, 0x01 ; 1
2557 ca8: 01 c0 rjmp .+2 ; 0xcac <Pipe_ConfigurePipe+0xc6>
2558 UPCONX = UPCONXTemp;
2559 UPINRQX = UPINRQXTemp;
2560 UPIENX = UPIENXTemp;
2562 if (!(Pipe_IsConfigured()))
2564 caa: 80 e0 ldi r24, 0x00 ; 0
2567 Pipe_SelectPipe(Number);
2576 00000cb4 <Pipe_ClearPipes>:
2578 void Pipe_ClearPipes(void)
2581 cb4: 10 92 f8 00 sts 0x00F8, r1
2583 for (uint8_t PNum = 0; PNum < PIPE_TOTAL_PIPES; PNum++)
2584 cb8: 80 e0 ldi r24, 0x00 ; 0
2585 cba: 80 93 a7 00 sts 0x00A7, r24
2587 Pipe_SelectPipe(PNum);
2589 cbe: 10 92 ae 00 sts 0x00AE, r1
2591 cc2: 10 92 a6 00 sts 0x00A6, r1
2593 cc6: 10 92 ab 00 sts 0x00AB, r1
2594 * from an attached device.
2596 static inline void Pipe_DisablePipe(void) ATTR_ALWAYS_INLINE;
2597 static inline void Pipe_DisablePipe(void)
2599 UPCONX &= ~(1 << PEN);
2600 cca: 90 91 a9 00 lds r25, 0x00A9
2601 cce: 9e 7f andi r25, 0xFE ; 254
2602 cd0: 90 93 a9 00 sts 0x00A9, r25
2604 void Pipe_ClearPipes(void)
2608 for (uint8_t PNum = 0; PNum < PIPE_TOTAL_PIPES; PNum++)
2609 cd4: 8f 5f subi r24, 0xFF ; 255
2610 cd6: 87 30 cpi r24, 0x07 ; 7
2611 cd8: 81 f7 brne .-32 ; 0xcba <Pipe_ClearPipes+0x6>
2620 00000cdc <USB_Disable>:
2621 USB_ResetInterface();
2624 void USB_Disable(void)
2626 USB_INT_DisableAllInterrupts();
2627 cdc: 6e d0 rcall .+220 ; 0xdba <USB_INT_DisableAllInterrupts>
2628 USB_INT_ClearAllInterrupts();
2629 cde: 75 d0 rcall .+234 ; 0xdca <USB_INT_ClearAllInterrupts>
2630 * enumerating the device once attached until \ref USB_Attach() is called.
2632 static inline void USB_Detach(void) ATTR_ALWAYS_INLINE;
2633 static inline void USB_Detach(void)
2635 UDCON |= (1 << DETACH);
2636 ce0: e0 ee ldi r30, 0xE0 ; 224
2637 ce2: f0 e0 ldi r31, 0x00 ; 0
2638 ce4: 80 81 ld r24, Z
2639 ce6: 81 60 ori r24, 0x01 ; 1
2640 ce8: 80 83 st Z, r24
2643 static inline void USB_Controller_Disable(void) ATTR_ALWAYS_INLINE;
2644 static inline void USB_Controller_Disable(void)
2646 USBCON &= ~(1 << USBE);
2647 cea: e8 ed ldi r30, 0xD8 ; 216
2648 cec: f0 e0 ldi r31, 0x00 ; 0
2649 cee: 80 81 ld r24, Z
2650 cf0: 8f 77 andi r24, 0x7F ; 127
2651 cf2: 80 83 st Z, r24
2654 static inline void USB_PLL_Off(void) ATTR_ALWAYS_INLINE;
2655 static inline void USB_PLL_Off(void)
2658 cf4: 19 bc out 0x29, r1 ; 41
2660 static inline void USB_REG_Off(void) ATTR_ALWAYS_INLINE;
2661 static inline void USB_REG_Off(void)
2663 #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
2664 UHWCON &= ~(1 << UVREGE);
2665 cf6: a7 ed ldi r26, 0xD7 ; 215
2666 cf8: b0 e0 ldi r27, 0x00 ; 0
2667 cfa: 8c 91 ld r24, X
2668 cfc: 8e 7f andi r24, 0xFE ; 254
2669 cfe: 8c 93 st X, r24
2672 static inline void USB_OTGPAD_Off(void) ATTR_ALWAYS_INLINE;
2673 static inline void USB_OTGPAD_Off(void)
2675 USBCON &= ~(1 << OTGPADE);
2676 d00: 80 81 ld r24, Z
2677 d02: 8f 7e andi r24, 0xEF ; 239
2678 d04: 80 83 st Z, r24
2680 #if defined(USB_CAN_BE_BOTH)
2681 USB_CurrentMode = USB_MODE_None;
2684 USB_IsInitialized = false;
2685 d06: 10 92 22 01 sts 0x0122, r1
2689 00000d0c <USB_ResetInterface>:
2691 #if defined(USB_CAN_BE_BOTH)
2692 bool UIDModeSelectEnabled = ((UHWCON & (1 << UIDE)) != 0);
2695 USB_INT_DisableAllInterrupts();
2696 d0c: 56 d0 rcall .+172 ; 0xdba <USB_INT_DisableAllInterrupts>
2697 USB_INT_ClearAllInterrupts();
2698 d0e: 5d d0 rcall .+186 ; 0xdca <USB_INT_ClearAllInterrupts>
2701 static inline void USB_Controller_Reset(void) ATTR_ALWAYS_INLINE;
2702 static inline void USB_Controller_Reset(void)
2704 const uint8_t Temp = USBCON;
2705 d10: 80 91 d8 00 lds r24, 0x00D8
2707 USBCON = (Temp & ~(1 << USBE));
2708 d14: 98 2f mov r25, r24
2709 d16: 9f 77 andi r25, 0x7F ; 127
2710 d18: 90 93 d8 00 sts 0x00D8, r25
2711 USBCON = (Temp | (1 << USBE));
2712 d1c: 80 68 ori r24, 0x80 ; 128
2713 d1e: 80 93 d8 00 sts 0x00D8, r24
2716 static inline void USB_CLK_Unfreeze(void) ATTR_ALWAYS_INLINE;
2717 static inline void USB_CLK_Unfreeze(void)
2719 USBCON &= ~(1 << FRZCLK);
2720 d22: 80 91 d8 00 lds r24, 0x00D8
2721 d26: 8f 7d andi r24, 0xDF ; 223
2722 d28: 80 93 d8 00 sts 0x00D8, r24
2725 else if (USB_CurrentMode == USB_MODE_Host)
2727 #if defined(USB_CAN_BE_HOST)
2728 UHWCON &= ~(1 << UIMOD);
2729 d2c: 80 91 d7 00 lds r24, 0x00D7
2730 d30: 8f 77 andi r24, 0x7F ; 127
2731 d32: 80 93 d7 00 sts 0x00D7, r24
2733 /* Inline Functions: */
2734 static inline void USB_PLL_On(void) ATTR_ALWAYS_INLINE;
2735 static inline void USB_PLL_On(void)
2737 PLLCSR = USB_PLL_PSC;
2738 d36: 8c e0 ldi r24, 0x0C ; 12
2739 d38: 89 bd out 0x29, r24 ; 41
2740 PLLCSR |= (1 << PLLE);
2741 d3a: 89 b5 in r24, 0x29 ; 41
2742 d3c: 82 60 ori r24, 0x02 ; 2
2743 d3e: 89 bd out 0x29, r24 ; 41
2745 if (!(USB_Options & USB_OPT_MANUAL_PLL))
2747 #if defined(USB_CAN_BE_HOST)
2749 while (!(USB_PLL_IsReady()));
2750 d40: 09 b4 in r0, 0x29 ; 41
2751 d42: 00 fe sbrs r0, 0
2752 d44: fd cf rjmp .-6 ; 0xd40 <USB_ResetInterface+0x34>
2755 #if defined(USB_CAN_BE_HOST)
2756 static void USB_Init_Host(void)
2758 USB_HostState = HOST_STATE_Unattached;
2759 d46: 82 e0 ldi r24, 0x02 ; 2
2760 d48: 80 93 2b 01 sts 0x012B, r24
2761 USB_ControlPipeSize = PIPE_CONTROLPIPE_DEFAULT_SIZE;
2762 d4c: 80 e4 ldi r24, 0x40 ; 64
2763 d4e: 80 93 1b 01 sts 0x011B, r24
2764 #if !defined(__DOXYGEN__)
2766 static inline void USB_Host_HostMode_On(void) ATTR_ALWAYS_INLINE;
2767 static inline void USB_Host_HostMode_On(void)
2769 USBCON |= (1 << HOST);
2770 d52: 80 91 d8 00 lds r24, 0x00D8
2771 d56: 80 64 ori r24, 0x40 ; 64
2772 d58: 80 93 d8 00 sts 0x00D8, r24
2775 static inline void USB_Host_VBUS_Auto_Off(void) ATTR_ALWAYS_INLINE;
2776 static inline void USB_Host_VBUS_Auto_Off(void)
2778 OTGCON |= (1 << VBUSRQC);
2779 d5c: 80 91 dd 00 lds r24, 0x00DD
2780 d60: 81 60 ori r24, 0x01 ; 1
2781 d62: 80 93 dd 00 sts 0x00DD, r24
2784 static inline void USB_Host_VBUS_Manual_Enable(void) ATTR_ALWAYS_INLINE;
2785 static inline void USB_Host_VBUS_Manual_Enable(void)
2787 OTGCON |= (1 << VBUSHWC);
2788 d66: 80 91 dd 00 lds r24, 0x00DD
2789 d6a: 84 60 ori r24, 0x04 ; 4
2790 d6c: 80 93 dd 00 sts 0x00DD, r24
2791 UHWCON &= ~(1 << UVCONE);
2792 d70: 80 91 d7 00 lds r24, 0x00D7
2793 d74: 8f 7e andi r24, 0xEF ; 239
2794 d76: 80 93 d7 00 sts 0x00D7, r24
2797 d7a: 6f 9a sbi 0x0d, 7 ; 13
2800 static inline void USB_Host_VBUS_Manual_On(void) ATTR_ALWAYS_INLINE;
2801 static inline void USB_Host_VBUS_Manual_On(void)
2804 d7c: 77 9a sbi 0x0e, 7 ; 14
2806 case USB_INT_VBERRI:
2807 OTGIEN |= (1 << VBERRE);
2810 OTGIEN |= (1 << SRPE);
2811 d7e: 80 91 de 00 lds r24, 0x00DE
2812 d82: 81 60 ori r24, 0x01 ; 1
2813 d84: 80 93 de 00 sts 0x00DE, r24
2816 UHIEN |= (1 << RSTE);
2818 case USB_INT_BCERRI:
2819 OTGIEN |= (1 << BCERRE);
2820 d88: 80 91 de 00 lds r24, 0x00DE
2821 d8c: 84 60 ori r24, 0x04 ; 4
2822 d8e: 80 93 de 00 sts 0x00DE, r24
2823 * register and despite the datasheet making no mention of its requirement in host mode.
2825 static inline void USB_Attach(void) ATTR_ALWAYS_INLINE;
2826 static inline void USB_Attach(void)
2828 UDCON &= ~(1 << DETACH);
2829 d92: 80 91 e0 00 lds r24, 0x00E0
2830 d96: 8e 7f andi r24, 0xFE ; 254
2831 d98: 80 93 e0 00 sts 0x00E0, r24
2833 #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
2834 static inline void USB_OTGPAD_On(void) ATTR_ALWAYS_INLINE;
2835 static inline void USB_OTGPAD_On(void)
2837 USBCON |= (1 << OTGPADE);
2838 d9c: 80 91 d8 00 lds r24, 0x00D8
2839 da0: 80 61 ori r24, 0x10 ; 16
2840 da2: 80 93 d8 00 sts 0x00D8, r24
2843 #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
2849 00000da8 <USB_Init>:
2851 static inline void USB_REG_On(void) ATTR_ALWAYS_INLINE;
2852 static inline void USB_REG_On(void)
2854 #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
2855 UHWCON |= (1 << UVREGE);
2856 da8: e7 ed ldi r30, 0xD7 ; 215
2857 daa: f0 e0 ldi r31, 0x00 ; 0
2858 dac: 80 81 ld r24, Z
2859 dae: 81 60 ori r24, 0x01 ; 1
2860 db0: 80 83 st Z, r24
2861 UHWCON &= ~(1 << UIDE);
2862 USB_CurrentMode = Mode;
2866 USB_IsInitialized = true;
2867 db2: 81 e0 ldi r24, 0x01 ; 1
2868 db4: 80 93 22 01 sts 0x0122, r24
2870 USB_ResetInterface();
2872 db8: a9 cf rjmp .-174 ; 0xd0c <USB_ResetInterface>
2874 00000dba <USB_INT_DisableAllInterrupts>:
2875 #include "../USBInterrupt.h"
2877 void USB_INT_DisableAllInterrupts(void)
2879 #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
2880 USBCON &= ~((1 << VBUSTE) | (1 << IDTE));
2881 dba: e8 ed ldi r30, 0xD8 ; 216
2882 dbc: f0 e0 ldi r31, 0x00 ; 0
2883 dbe: 80 81 ld r24, Z
2884 dc0: 8c 7f andi r24, 0xFC ; 252
2885 dc2: 80 83 st Z, r24
2886 #if defined(USB_CAN_BE_BOTH)
2890 #if defined(USB_CAN_BE_HOST)
2892 dc4: 10 92 a0 00 sts 0x00A0, r1
2895 #if defined(USB_CAN_BE_DEVICE)
2901 00000dca <USB_INT_ClearAllInterrupts>:
2903 void USB_INT_ClearAllInterrupts(void)
2905 #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
2907 dca: 10 92 da 00 sts 0x00DA, r1
2908 #if defined(USB_CAN_BE_BOTH)
2912 #if defined(USB_CAN_BE_HOST)
2914 dce: 10 92 9f 00 sts 0x009F, r1
2917 #if defined(USB_CAN_BE_DEVICE)
2923 00000dd4 <__vector_10>:
2925 ISR(USB_GEN_vect, ISR_BLOCK)
2929 dd8: 0f b6 in r0, 0x3f ; 63
2931 ddc: 0b b6 in r0, 0x3b ; 59
2933 de0: 11 24 eor r1, r1
2946 case USB_INT_RXSTPI:
2947 return (UEINTX & (1 << RXSTPI));
2949 #if defined(USB_CAN_BE_HOST)
2951 return (UHINT & (1 << HSOFI));
2952 dfa: 80 91 9f 00 lds r24, 0x009F
2956 #if defined(USB_CAN_BE_HOST)
2957 #if !defined(NO_SOF_EVENTS)
2958 if (USB_INT_HasOccurred(USB_INT_HSOFI) && USB_INT_IsEnabled(USB_INT_HSOFI))
2959 dfe: 85 ff sbrs r24, 5
2960 e00: 0a c0 rjmp .+20 ; 0xe16 <__vector_10+0x42>
2961 case USB_INT_RXSTPI:
2962 return (UEIENX & (1 << RXSTPE));
2964 #if defined(USB_CAN_BE_HOST)
2966 return (UHIEN & (1 << HSOFE));
2967 e02: 80 91 a0 00 lds r24, 0x00A0
2968 e06: 85 ff sbrs r24, 5
2969 e08: 06 c0 rjmp .+12 ; 0xe16 <__vector_10+0x42>
2970 UEINTX &= ~(1 << RXSTPI);
2973 #if defined(USB_CAN_BE_HOST)
2975 UHINT &= ~(1 << HSOFI);
2976 e0a: 80 91 9f 00 lds r24, 0x009F
2977 e0e: 8f 7d andi r24, 0xDF ; 223
2978 e10: 80 93 9f 00 sts 0x009F, r24
2980 USB_INT_Clear(USB_INT_HSOFI);
2982 EVENT_USB_Host_StartOfFrame();
2983 e14: 0c d1 rcall .+536 ; 0x102e <USB_Event_Stub>
2985 return (UHINT & (1 << HSOFI));
2986 case USB_INT_DCONNI:
2987 return (UHINT & (1 << DCONNI));
2988 case USB_INT_DDISCI:
2989 return (UHINT & (1 << DDISCI));
2990 e16: 80 91 9f 00 lds r24, 0x009F
2994 if (USB_INT_HasOccurred(USB_INT_DDISCI) && USB_INT_IsEnabled(USB_INT_DDISCI))
2995 e1a: 81 ff sbrs r24, 1
2996 e1c: 15 c0 rjmp .+42 ; 0xe48 <__vector_10+0x74>
2998 return (UHIEN & (1 << HSOFE));
2999 case USB_INT_DCONNI:
3000 return (UHIEN & (1 << DCONNE));
3001 case USB_INT_DDISCI:
3002 return (UHIEN & (1 << DDISCE));
3003 e1e: 80 91 a0 00 lds r24, 0x00A0
3004 e22: 81 ff sbrs r24, 1
3005 e24: 11 c0 rjmp .+34 ; 0xe48 <__vector_10+0x74>
3007 case USB_INT_DCONNI:
3008 UHINT &= ~(1 << DCONNI);
3010 case USB_INT_DDISCI:
3011 UHINT &= ~(1 << DDISCI);
3012 e26: 80 91 9f 00 lds r24, 0x009F
3013 e2a: 8d 7f andi r24, 0xFD ; 253
3014 e2c: 80 93 9f 00 sts 0x009F, r24
3015 #if defined(USB_CAN_BE_HOST)
3017 UHINT &= ~(1 << HSOFI);
3019 case USB_INT_DCONNI:
3020 UHINT &= ~(1 << DCONNI);
3021 e30: 80 91 9f 00 lds r24, 0x009F
3022 e34: 8e 7f andi r24, 0xFE ; 254
3023 e36: 80 93 9f 00 sts 0x009F, r24
3025 case USB_INT_DCONNI:
3026 UHIEN &= ~(1 << DCONNE);
3028 case USB_INT_DDISCI:
3029 UHIEN &= ~(1 << DDISCE);
3030 e3a: 80 91 a0 00 lds r24, 0x00A0
3031 e3e: 8d 7f andi r24, 0xFD ; 253
3032 e40: 80 93 a0 00 sts 0x00A0, r24
3034 USB_INT_Clear(USB_INT_DDISCI);
3035 USB_INT_Clear(USB_INT_DCONNI);
3036 USB_INT_Disable(USB_INT_DDISCI);
3038 EVENT_USB_Host_DeviceUnattached();
3039 e44: a1 da rcall .-2750 ; 0x388 <EVENT_USB_Host_DeviceUnattached>
3041 USB_ResetInterface();
3042 e46: 62 df rcall .-316 ; 0xd0c <USB_ResetInterface>
3044 return (UHINT & (1 << RSTI));
3045 case USB_INT_BCERRI:
3046 return (OTGINT & (1 << BCERRI));
3047 case USB_INT_VBERRI:
3048 return (OTGINT & (1 << VBERRI));
3049 e48: 80 91 df 00 lds r24, 0x00DF
3052 if (USB_INT_HasOccurred(USB_INT_VBERRI) && USB_INT_IsEnabled(USB_INT_VBERRI))
3053 e4c: 81 ff sbrs r24, 1
3054 e4e: 15 c0 rjmp .+42 ; 0xe7a <__vector_10+0xa6>
3056 return (UHIEN & (1 << RSTE));
3057 case USB_INT_BCERRI:
3058 return (OTGIEN & (1 << BCERRE));
3059 case USB_INT_VBERRI:
3060 return (OTGIEN & (1 << VBERRE));
3061 e50: 80 91 de 00 lds r24, 0x00DE
3062 e54: 81 ff sbrs r24, 1
3063 e56: 11 c0 rjmp .+34 ; 0xe7a <__vector_10+0xa6>
3065 case USB_INT_BCERRI:
3066 OTGINT &= ~(1 << BCERRI);
3068 case USB_INT_VBERRI:
3069 OTGINT &= ~(1 << VBERRI);
3070 e58: 80 91 df 00 lds r24, 0x00DF
3071 e5c: 8d 7f andi r24, 0xFD ; 253
3072 e5e: 80 93 df 00 sts 0x00DF, r24
3075 static inline void USB_Host_VBUS_Manual_Off(void) ATTR_ALWAYS_INLINE;
3076 static inline void USB_Host_VBUS_Manual_Off(void)
3079 e62: 77 98 cbi 0x0e, 7 ; 14
3082 static inline void USB_Host_VBUS_Auto_Off(void) ATTR_ALWAYS_INLINE;
3083 static inline void USB_Host_VBUS_Auto_Off(void)
3085 OTGCON |= (1 << VBUSRQC);
3086 e64: 80 91 dd 00 lds r24, 0x00DD
3087 e68: 81 60 ori r24, 0x01 ; 1
3088 e6a: 80 93 dd 00 sts 0x00DD, r24
3089 USB_INT_Clear(USB_INT_VBERRI);
3091 USB_Host_VBUS_Manual_Off();
3092 USB_Host_VBUS_Auto_Off();
3094 EVENT_USB_Host_HostError(HOST_ERROR_VBusVoltageDip);
3095 e6e: 80 e0 ldi r24, 0x00 ; 0
3096 e70: 92 da rcall .-2780 ; 0x396 <EVENT_USB_Host_HostError>
3097 EVENT_USB_Host_DeviceUnattached();
3098 e72: 8a da rcall .-2796 ; 0x388 <EVENT_USB_Host_DeviceUnattached>
3100 USB_HostState = HOST_STATE_Unattached;
3101 e74: 82 e0 ldi r24, 0x02 ; 2
3102 e76: 80 93 2b 01 sts 0x012B, r24
3103 case USB_INT_BCERRI:
3104 return (OTGINT & (1 << BCERRI));
3105 case USB_INT_VBERRI:
3106 return (OTGINT & (1 << VBERRI));
3108 return (OTGINT & (1 << SRPI));
3109 e7a: 80 91 df 00 lds r24, 0x00DF
3112 if (USB_INT_HasOccurred(USB_INT_SRPI) && USB_INT_IsEnabled(USB_INT_SRPI))
3113 e7e: 80 ff sbrs r24, 0
3114 e80: 17 c0 rjmp .+46 ; 0xeb0 <__vector_10+0xdc>
3115 case USB_INT_BCERRI:
3116 return (OTGIEN & (1 << BCERRE));
3117 case USB_INT_VBERRI:
3118 return (OTGIEN & (1 << VBERRE));
3120 return (OTGIEN & (1 << SRPE));
3121 e82: 80 91 de 00 lds r24, 0x00DE
3122 e86: 80 ff sbrs r24, 0
3123 e88: 13 c0 rjmp .+38 ; 0xeb0 <__vector_10+0xdc>
3125 case USB_INT_VBERRI:
3126 OTGINT &= ~(1 << VBERRI);
3129 OTGINT &= ~(1 << SRPI);
3130 e8a: 80 91 df 00 lds r24, 0x00DF
3131 e8e: 8e 7f andi r24, 0xFE ; 254
3132 e90: 80 93 df 00 sts 0x00DF, r24
3134 case USB_INT_VBERRI:
3135 OTGIEN &= ~(1 << VBERRE);
3138 OTGIEN &= ~(1 << SRPE);
3139 e94: 80 91 de 00 lds r24, 0x00DE
3140 e98: 8e 7f andi r24, 0xFE ; 254
3141 e9a: 80 93 de 00 sts 0x00DE, r24
3143 USB_INT_Clear(USB_INT_SRPI);
3144 USB_INT_Disable(USB_INT_SRPI);
3146 EVENT_USB_Host_DeviceAttached();
3147 e9e: 6f da rcall .-2850 ; 0x37e <EVENT_USB_Host_DeviceAttached>
3149 case USB_INT_DCONNI:
3150 UHIEN |= (1 << DCONNE);
3152 case USB_INT_DDISCI:
3153 UHIEN |= (1 << DDISCE);
3154 ea0: 80 91 a0 00 lds r24, 0x00A0
3155 ea4: 82 60 ori r24, 0x02 ; 2
3156 ea6: 80 93 a0 00 sts 0x00A0, r24
3158 USB_INT_Enable(USB_INT_DDISCI);
3160 USB_HostState = HOST_STATE_Powered;
3161 eaa: 83 e0 ldi r24, 0x03 ; 3
3162 eac: 80 93 2b 01 sts 0x012B, r24
3163 case USB_INT_DDISCI:
3164 return (UHINT & (1 << DDISCI));
3166 return (UHINT & (1 << RSTI));
3167 case USB_INT_BCERRI:
3168 return (OTGINT & (1 << BCERRI));
3169 eb0: 80 91 df 00 lds r24, 0x00DF
3172 if (USB_INT_HasOccurred(USB_INT_BCERRI) && USB_INT_IsEnabled(USB_INT_BCERRI))
3173 eb4: 82 ff sbrs r24, 2
3174 eb6: 0e c0 rjmp .+28 ; 0xed4 <__vector_10+0x100>
3175 case USB_INT_DDISCI:
3176 return (UHIEN & (1 << DDISCE));
3178 return (UHIEN & (1 << RSTE));
3179 case USB_INT_BCERRI:
3180 return (OTGIEN & (1 << BCERRE));
3181 eb8: 80 91 de 00 lds r24, 0x00DE
3182 ebc: 82 ff sbrs r24, 2
3183 ebe: 0a c0 rjmp .+20 ; 0xed4 <__vector_10+0x100>
3186 UHINT &= ~(1 << RSTI);
3188 case USB_INT_BCERRI:
3189 OTGINT &= ~(1 << BCERRI);
3190 ec0: 80 91 df 00 lds r24, 0x00DF
3191 ec4: 8b 7f andi r24, 0xFB ; 251
3192 ec6: 80 93 df 00 sts 0x00DF, r24
3194 USB_INT_Clear(USB_INT_BCERRI);
3196 EVENT_USB_Host_DeviceEnumerationFailed(HOST_ENUMERROR_NoDeviceDetected, 0);
3197 eca: 82 e0 ldi r24, 0x02 ; 2
3198 ecc: 60 e0 ldi r22, 0x00 ; 0
3199 ece: 82 da rcall .-2812 ; 0x3d4 <EVENT_USB_Host_DeviceEnumerationFailed>
3200 EVENT_USB_Host_DeviceUnattached();
3201 ed0: 5b da rcall .-2890 ; 0x388 <EVENT_USB_Host_DeviceUnattached>
3203 USB_ResetInterface();
3204 ed2: 1c df rcall .-456 ; 0xd0c <USB_ResetInterface>
3205 USB_ResetInterface();
3207 EVENT_USB_UIDChange();
3224 eee: 0b be out 0x3b, r0 ; 59
3226 ef2: 0f be out 0x3f, r0 ; 63
3231 00000efa <USB_Host_GetDeviceConfigDescriptor>:
3232 #if defined(USB_CAN_BE_HOST)
3233 uint8_t USB_Host_GetDeviceConfigDescriptor(const uint8_t ConfigNumber,
3234 uint16_t* const ConfigSizePtr,
3235 void* const BufferPtr,
3236 const uint16_t BufferSize)
3246 f0a: cd b7 in r28, 0x3d ; 61
3247 f0c: de b7 in r29, 0x3e ; 62
3248 f0e: 29 97 sbiw r28, 0x09 ; 9
3249 f10: 0f b6 in r0, 0x3f ; 63
3251 f14: de bf out 0x3e, r29 ; 62
3252 f16: 0f be out 0x3f, r0 ; 63
3253 f18: cd bf out 0x3d, r28 ; 61
3254 f1a: 6b 01 movw r12, r22
3255 f1c: 8a 01 movw r16, r20
3256 f1e: 79 01 movw r14, r18
3258 uint8_t ConfigHeader[sizeof(USB_Descriptor_Configuration_Header_t)];
3260 USB_ControlRequest = (USB_Request_Header_t)
3261 f20: 90 e8 ldi r25, 0x80 ; 128
3262 f22: 90 93 23 01 sts 0x0123, r25
3263 f26: 96 e0 ldi r25, 0x06 ; 6
3264 f28: 90 93 24 01 sts 0x0124, r25
3266 .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
3267 .bRequest = REQ_GetDescriptor,
3268 .wValue = ((DTYPE_Configuration << 8) | (ConfigNumber - 1)),
3269 f2c: 90 e0 ldi r25, 0x00 ; 0
3270 f2e: 01 97 sbiw r24, 0x01 ; 1
3271 f30: 92 60 ori r25, 0x02 ; 2
3272 const uint16_t BufferSize)
3275 uint8_t ConfigHeader[sizeof(USB_Descriptor_Configuration_Header_t)];
3277 USB_ControlRequest = (USB_Request_Header_t)
3278 f32: 90 93 26 01 sts 0x0126, r25
3279 f36: 80 93 25 01 sts 0x0125, r24
3280 f3a: 10 92 28 01 sts 0x0128, r1
3281 f3e: 10 92 27 01 sts 0x0127, r1
3282 f42: 89 e0 ldi r24, 0x09 ; 9
3283 f44: 90 e0 ldi r25, 0x00 ; 0
3284 f46: 90 93 2a 01 sts 0x012A, r25
3285 f4a: 80 93 29 01 sts 0x0129, r24
3286 f4e: 10 92 a7 00 sts 0x00A7, r1
3287 .wLength = sizeof(USB_Descriptor_Configuration_Header_t),
3290 Pipe_SelectPipe(PIPE_CONTROLPIPE);
3292 if ((ErrorCode = USB_Host_SendControlRequest(ConfigHeader)) != HOST_SENDCONTROL_Successful)
3293 f52: ce 01 movw r24, r28
3294 f54: 01 96 adiw r24, 0x01 ; 1
3295 f56: 95 d0 rcall .+298 ; 0x1082 <USB_Host_SendControlRequest>
3296 f58: 88 23 and r24, r24
3297 f5a: b9 f4 brne .+46 ; 0xf8a <USB_Host_GetDeviceConfigDescriptor+0x90>
3300 *ConfigSizePtr = DESCRIPTOR_PCAST(ConfigHeader, USB_Descriptor_Configuration_Header_t)->TotalConfigurationSize;
3301 f5c: 8b 81 ldd r24, Y+3 ; 0x03
3302 f5e: 9c 81 ldd r25, Y+4 ; 0x04
3303 f60: f6 01 movw r30, r12
3304 f62: 91 83 std Z+1, r25 ; 0x01
3305 f64: 80 83 st Z, r24
3307 if (*ConfigSizePtr > BufferSize)
3308 f66: e8 16 cp r14, r24
3309 f68: f9 06 cpc r15, r25
3310 f6a: 70 f0 brcs .+28 ; 0xf88 <USB_Host_GetDeviceConfigDescriptor+0x8e>
3311 return HOST_GETCONFIG_BuffOverflow;
3313 USB_ControlRequest.wLength = *ConfigSizePtr;
3314 f6c: 90 93 2a 01 sts 0x012A, r25
3315 f70: 80 93 29 01 sts 0x0129, r24
3317 if ((ErrorCode = USB_Host_SendControlRequest(BufferPtr)) != HOST_SENDCONTROL_Successful)
3318 f74: c8 01 movw r24, r16
3319 f76: 85 d0 rcall .+266 ; 0x1082 <USB_Host_SendControlRequest>
3320 f78: 88 23 and r24, r24
3321 f7a: 39 f4 brne .+14 ; 0xf8a <USB_Host_GetDeviceConfigDescriptor+0x90>
3324 if (DESCRIPTOR_TYPE(BufferPtr) != DTYPE_Configuration)
3325 f7c: f8 01 movw r30, r16
3326 f7e: 91 81 ldd r25, Z+1 ; 0x01
3327 f80: 92 30 cpi r25, 0x02 ; 2
3328 f82: 19 f0 breq .+6 ; 0xf8a <USB_Host_GetDeviceConfigDescriptor+0x90>
3329 return HOST_GETCONFIG_InvalidData;
3330 f84: 86 e0 ldi r24, 0x06 ; 6
3331 f86: 01 c0 rjmp .+2 ; 0xf8a <USB_Host_GetDeviceConfigDescriptor+0x90>
3334 *ConfigSizePtr = DESCRIPTOR_PCAST(ConfigHeader, USB_Descriptor_Configuration_Header_t)->TotalConfigurationSize;
3336 if (*ConfigSizePtr > BufferSize)
3337 return HOST_GETCONFIG_BuffOverflow;
3338 f88: 85 e0 ldi r24, 0x05 ; 5
3340 if (DESCRIPTOR_TYPE(BufferPtr) != DTYPE_Configuration)
3341 return HOST_GETCONFIG_InvalidData;
3343 return HOST_GETCONFIG_Successful;
3345 f8a: 29 96 adiw r28, 0x09 ; 9
3346 f8c: 0f b6 in r0, 0x3f ; 63
3348 f90: de bf out 0x3e, r29 ; 62
3349 f92: 0f be out 0x3f, r0 ; 63
3350 f94: cd bf out 0x3d, r28 ; 61
3361 00000fa8 <USB_GetNextDescriptorComp>:
3364 uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
3365 void** const CurrConfigLoc,
3366 const ConfigComparatorPtr_t const ComparatorRoutine)
3378 fbc: 8c 01 movw r16, r24
3379 fbe: eb 01 movw r28, r22
3380 fc0: 6a 01 movw r12, r20
3384 fc2: 23 c0 rjmp .+70 ; 0x100a <USB_GetNextDescriptorComp+0x62>
3386 uint8_t* PrevDescLoc = *CurrConfigLoc;
3387 fc4: e8 81 ld r30, Y
3388 fc6: f9 81 ldd r31, Y+1 ; 0x01
3389 fc8: 5f 01 movw r10, r30
3390 static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
3391 void** CurrConfigLoc) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
3392 static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
3393 void** CurrConfigLoc)
3395 uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
3396 fca: 20 81 ld r18, Z
3397 fcc: 30 e0 ldi r19, 0x00 ; 0
3398 fce: c7 01 movw r24, r14
3399 fd0: 2e 15 cp r18, r14
3400 fd2: 3f 05 cpc r19, r15
3401 fd4: 08 f4 brcc .+2 ; 0xfd8 <USB_GetNextDescriptorComp+0x30>
3402 fd6: c9 01 movw r24, r18
3404 if (*BytesRem < CurrDescriptorSize)
3405 CurrDescriptorSize = *BytesRem;
3407 *CurrConfigLoc = (void*)((uintptr_t)*CurrConfigLoc + CurrDescriptorSize);
3408 fd8: e8 0f add r30, r24
3409 fda: f9 1f adc r31, r25
3410 fdc: f9 83 std Y+1, r31 ; 0x01
3411 fde: e8 83 st Y, r30
3412 *BytesRem -= CurrDescriptorSize;
3413 fe0: f8 01 movw r30, r16
3414 fe2: 20 81 ld r18, Z
3415 fe4: 31 81 ldd r19, Z+1 ; 0x01
3416 fe6: 28 1b sub r18, r24
3417 fe8: 39 0b sbc r19, r25
3418 fea: 31 83 std Z+1, r19 ; 0x01
3419 fec: 20 83 st Z, r18
3420 uint16_t PrevBytesRem = *BytesRem;
3422 USB_GetNextDescriptor(BytesRem, CurrConfigLoc);
3424 if ((ErrorCode = ComparatorRoutine(*CurrConfigLoc)) != DESCRIPTOR_SEARCH_NotFound)
3425 fee: 88 81 ld r24, Y
3426 ff0: 99 81 ldd r25, Y+1 ; 0x01
3427 ff2: f6 01 movw r30, r12
3429 ff6: 82 30 cpi r24, 0x02 ; 2
3430 ff8: 41 f0 breq .+16 ; 0x100a <USB_GetNextDescriptorComp+0x62>
3432 if (ErrorCode == DESCRIPTOR_SEARCH_Fail)
3433 ffa: 81 30 cpi r24, 0x01 ; 1
3434 ffc: 69 f4 brne .+26 ; 0x1018 <USB_GetNextDescriptorComp+0x70>
3436 *CurrConfigLoc = PrevDescLoc;
3437 ffe: a8 82 st Y, r10
3438 1000: b9 82 std Y+1, r11 ; 0x01
3439 *BytesRem = PrevBytesRem;
3440 1002: f8 01 movw r30, r16
3441 1004: f1 82 std Z+1, r15 ; 0x01
3442 1006: e0 82 st Z, r14
3443 1008: 07 c0 rjmp .+14 ; 0x1018 <USB_GetNextDescriptorComp+0x70>
3444 void** const CurrConfigLoc,
3445 const ConfigComparatorPtr_t const ComparatorRoutine)
3450 100a: f8 01 movw r30, r16
3451 100c: e0 80 ld r14, Z
3452 100e: f1 80 ldd r15, Z+1 ; 0x01
3453 1010: e1 14 cp r14, r1
3454 1012: f1 04 cpc r15, r1
3455 1014: b9 f6 brne .-82 ; 0xfc4 <USB_GetNextDescriptorComp+0x1c>
3461 return DESCRIPTOR_SEARCH_COMP_EndOfDescriptor;
3462 1016: 82 e0 ldi r24, 0x02 ; 2
3476 0000102e <USB_Event_Stub>:
3479 void USB_Event_Stub(void)
3485 00001030 <USB_Host_WaitForIOS>:
3487 return ReturnStatus;
3490 static uint8_t USB_Host_WaitForIOS(const uint8_t WaitType)
3492 1030: 1f 93 push r17
3493 1032: cf 93 push r28
3494 1034: df 93 push r29
3495 1036: 18 2f mov r17, r24
3496 #if (USB_HOST_TIMEOUT_MS < 0xFF)
3497 uint8_t TimeoutCounter = USB_HOST_TIMEOUT_MS;
3499 uint16_t TimeoutCounter = USB_HOST_TIMEOUT_MS;
3500 1038: c8 ee ldi r28, 0xE8 ; 232
3501 103a: d3 e0 ldi r29, 0x03 ; 3
3504 while (!(((WaitType == USB_HOST_WAITFOR_SetupSent) && Pipe_IsSETUPSent()) ||
3505 103c: 07 c0 rjmp .+14 ; 0x104c <USB_Host_WaitForIOS+0x1c>
3506 ((WaitType == USB_HOST_WAITFOR_InReceived) && Pipe_IsINReceived()) ||
3507 ((WaitType == USB_HOST_WAITFOR_OutReady) && Pipe_IsOUTReady())))
3511 if ((ErrorCode = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful)
3512 103e: 81 e0 ldi r24, 0x01 ; 1
3513 1040: 1e dc rcall .-1988 ; 0x87e <USB_Host_WaitMS>
3514 1042: 88 23 and r24, r24
3515 1044: d1 f4 brne .+52 ; 0x107a <USB_Host_WaitForIOS+0x4a>
3518 if (!(TimeoutCounter--))
3519 1046: 20 97 sbiw r28, 0x00 ; 0
3520 1048: b9 f0 breq .+46 ; 0x1078 <USB_Host_WaitForIOS+0x48>
3521 104a: 21 97 sbiw r28, 0x01 ; 1
3522 uint8_t TimeoutCounter = USB_HOST_TIMEOUT_MS;
3524 uint16_t TimeoutCounter = USB_HOST_TIMEOUT_MS;
3527 while (!(((WaitType == USB_HOST_WAITFOR_SetupSent) && Pipe_IsSETUPSent()) ||
3528 104c: 11 23 and r17, r17
3529 104e: 29 f4 brne .+10 ; 0x105a <USB_Host_WaitForIOS+0x2a>
3530 * \return Boolean \c true if the current pipe is ready for a SETUP packet, \c false otherwise.
3532 static inline bool Pipe_IsSETUPSent(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
3533 static inline bool Pipe_IsSETUPSent(void)
3535 return ((UPINTX & (1 << TXSTPI)) ? true : false);
3536 1050: 80 91 a6 00 lds r24, 0x00A6
3537 1054: 83 ff sbrs r24, 3
3538 1056: f3 cf rjmp .-26 ; 0x103e <USB_Host_WaitForIOS+0xe>
3539 1058: 0d c0 rjmp .+26 ; 0x1074 <USB_Host_WaitForIOS+0x44>
3540 105a: 11 30 cpi r17, 0x01 ; 1
3541 105c: 29 f4 brne .+10 ; 0x1068 <USB_Host_WaitForIOS+0x38>
3542 * \return Boolean \c true if the current pipe has received an IN packet, \c false otherwise.
3544 static inline bool Pipe_IsINReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
3545 static inline bool Pipe_IsINReceived(void)
3547 return ((UPINTX & (1 << RXINI)) ? true : false);
3548 105e: 80 91 a6 00 lds r24, 0x00A6
3549 ((WaitType == USB_HOST_WAITFOR_InReceived) && Pipe_IsINReceived()) ||
3550 1062: 80 ff sbrs r24, 0
3551 1064: ec cf rjmp .-40 ; 0x103e <USB_Host_WaitForIOS+0xe>
3552 1066: 06 c0 rjmp .+12 ; 0x1074 <USB_Host_WaitForIOS+0x44>
3553 uint8_t TimeoutCounter = USB_HOST_TIMEOUT_MS;
3555 uint16_t TimeoutCounter = USB_HOST_TIMEOUT_MS;
3558 while (!(((WaitType == USB_HOST_WAITFOR_SetupSent) && Pipe_IsSETUPSent()) ||
3559 1068: 12 30 cpi r17, 0x02 ; 2
3560 106a: 49 f7 brne .-46 ; 0x103e <USB_Host_WaitForIOS+0xe>
3561 * \return Boolean \c true if the current pipe is ready for an OUT packet, \c false otherwise.
3563 static inline bool Pipe_IsOUTReady(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
3564 static inline bool Pipe_IsOUTReady(void)
3566 return ((UPINTX & (1 << TXOUTI)) ? true : false);
3567 106c: 80 91 a6 00 lds r24, 0x00A6
3568 ((WaitType == USB_HOST_WAITFOR_InReceived) && Pipe_IsINReceived()) ||
3569 ((WaitType == USB_HOST_WAITFOR_OutReady) && Pipe_IsOUTReady())))
3570 1070: 82 ff sbrs r24, 2
3571 1072: e5 cf rjmp .-54 ; 0x103e <USB_Host_WaitForIOS+0xe>
3573 if (!(TimeoutCounter--))
3574 return HOST_SENDCONTROL_SoftwareTimeOut;
3577 return HOST_SENDCONTROL_Successful;
3578 1074: 80 e0 ldi r24, 0x00 ; 0
3579 1076: 01 c0 rjmp .+2 ; 0x107a <USB_Host_WaitForIOS+0x4a>
3581 if ((ErrorCode = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful)
3584 if (!(TimeoutCounter--))
3585 return HOST_SENDCONTROL_SoftwareTimeOut;
3586 1078: 84 e0 ldi r24, 0x04 ; 4
3589 return HOST_SENDCONTROL_Successful;
3596 00001082 <USB_Host_SendControlRequest>:
3598 #define __INCLUDE_FROM_HOSTSTDREQ_C
3599 #include "HostStandardReq.h"
3601 uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
3603 1082: ef 92 push r14
3604 1084: ff 92 push r15
3605 1086: 0f 93 push r16
3606 1088: 1f 93 push r17
3607 108a: cf 93 push r28
3608 108c: df 93 push r29
3609 108e: 8c 01 movw r16, r24
3610 * \return Boolean \c true if the bus is currently suspended, \c false otherwise.
3612 static inline bool USB_Host_IsBusSuspended(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
3613 static inline bool USB_Host_IsBusSuspended(void)
3615 return ((UHCON & (1 << SOFEN)) ? false : true);
3616 1090: e0 90 9e 00 lds r14, 0x009E
3617 1094: ff 24 eor r15, r15
3618 1096: 81 e0 ldi r24, 0x01 ; 1
3619 1098: e8 22 and r14, r24
3620 109a: ff 24 eor r15, r15
3621 uint8_t* DataStream = (uint8_t*)BufferPtr;
3622 bool BusSuspended = USB_Host_IsBusSuspended();
3623 uint8_t ReturnStatus = HOST_SENDCONTROL_Successful;
3624 uint16_t DataLen = USB_ControlRequest.wLength;
3625 109c: c0 91 29 01 lds r28, 0x0129
3626 10a0: d0 91 2a 01 lds r29, 0x012A
3627 * host and attached device may occur.
3629 static inline void USB_Host_ResumeBus(void) ATTR_ALWAYS_INLINE;
3630 static inline void USB_Host_ResumeBus(void)
3632 UHCON |= (1 << SOFEN);
3633 10a4: 80 91 9e 00 lds r24, 0x009E
3634 10a8: 81 60 ori r24, 0x01 ; 1
3635 10aa: 80 93 9e 00 sts 0x009E, r24
3637 USB_Host_ResumeBus();
3639 if ((ReturnStatus = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful)
3640 10ae: 81 e0 ldi r24, 0x01 ; 1
3641 10b0: e6 db rcall .-2100 ; 0x87e <USB_Host_WaitMS>
3642 10b2: 88 23 and r24, r24
3643 10b4: 09 f0 breq .+2 ; 0x10b8 <USB_Host_SendControlRequest+0x36>
3644 10b6: e2 c0 rjmp .+452 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
3645 * \param[in] Token New pipe token to set the selected pipe to, as a \c PIPE_TOKEN_* mask.
3647 static inline void Pipe_SetPipeToken(const uint8_t Token) ATTR_ALWAYS_INLINE;
3648 static inline void Pipe_SetPipeToken(const uint8_t Token)
3650 UPCFG0X = ((UPCFG0X & ~(0x03 << PTOKEN0)) | Token);
3651 10b8: 80 91 aa 00 lds r24, 0x00AA
3652 10bc: 8f 7c andi r24, 0xCF ; 207
3653 10be: 80 93 aa 00 sts 0x00AA, r24
3655 /** Clears the error flags for the currently selected pipe. */
3656 static inline void Pipe_ClearError(void) ATTR_ALWAYS_INLINE;
3657 static inline void Pipe_ClearError(void)
3660 10c2: 10 92 f5 00 sts 0x00F5, r1
3661 UPINTX &= ~(1 << PERRI);
3662 10c6: 80 91 a6 00 lds r24, 0x00A6
3663 10ca: 8f 7e andi r24, 0xEF ; 239
3664 10cc: 80 93 a6 00 sts 0x00A6, r24
3666 /** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
3667 static inline void Pipe_Unfreeze(void) ATTR_ALWAYS_INLINE;
3668 static inline void Pipe_Unfreeze(void)
3670 UPCONX &= ~(1 << PFREEZE);
3671 10d0: 80 91 a9 00 lds r24, 0x00A9
3672 10d4: 8f 7b andi r24, 0xBF ; 191
3673 10d6: 80 93 a9 00 sts 0x00A9, r24
3674 Pipe_SetPipeToken(PIPE_TOKEN_SETUP);
3679 Pipe_Write_8(USB_ControlRequest.bmRequestType);
3680 10da: 80 91 23 01 lds r24, 0x0123
3681 * \param[in] Data Data to write into the the currently selected pipe's FIFO buffer.
3683 static inline void Pipe_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE;
3684 static inline void Pipe_Write_8(const uint8_t Data)
3687 10de: 80 93 af 00 sts 0x00AF, r24
3688 Pipe_Write_8(USB_ControlRequest.bRequest);
3689 10e2: 80 91 24 01 lds r24, 0x0124
3690 10e6: 80 93 af 00 sts 0x00AF, r24
3691 Pipe_Write_16_LE(USB_ControlRequest.wValue);
3692 10ea: 90 91 25 01 lds r25, 0x0125
3693 10ee: 80 91 26 01 lds r24, 0x0126
3694 * \param[in] Data Data to write to the currently selected pipe's FIFO buffer.
3696 static inline void Pipe_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE;
3697 static inline void Pipe_Write_16_LE(const uint16_t Data)
3699 UPDATX = (Data & 0xFF);
3700 10f2: 90 93 af 00 sts 0x00AF, r25
3701 UPDATX = (Data >> 8);
3702 10f6: 80 93 af 00 sts 0x00AF, r24
3703 Pipe_Write_16_LE(USB_ControlRequest.wIndex);
3704 10fa: 90 91 27 01 lds r25, 0x0127
3705 10fe: 80 91 28 01 lds r24, 0x0128
3706 * \param[in] Data Data to write to the currently selected pipe's FIFO buffer.
3708 static inline void Pipe_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE;
3709 static inline void Pipe_Write_16_LE(const uint16_t Data)
3711 UPDATX = (Data & 0xFF);
3712 1102: 90 93 af 00 sts 0x00AF, r25
3713 UPDATX = (Data >> 8);
3714 1106: 80 93 af 00 sts 0x00AF, r24
3715 Pipe_Write_16_LE(USB_ControlRequest.wLength);
3716 110a: 90 91 29 01 lds r25, 0x0129
3717 110e: 80 91 2a 01 lds r24, 0x012A
3718 * \param[in] Data Data to write to the currently selected pipe's FIFO buffer.
3720 static inline void Pipe_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE;
3721 static inline void Pipe_Write_16_LE(const uint16_t Data)
3723 UPDATX = (Data & 0xFF);
3724 1112: 90 93 af 00 sts 0x00AF, r25
3725 UPDATX = (Data >> 8);
3726 1116: 80 93 af 00 sts 0x00AF, r24
3727 * \ingroup Group_PipePacketManagement_AVR8
3729 static inline void Pipe_ClearSETUP(void) ATTR_ALWAYS_INLINE;
3730 static inline void Pipe_ClearSETUP(void)
3732 UPINTX &= ~((1 << TXSTPI) | (1 << FIFOCON));
3733 111a: 80 91 a6 00 lds r24, 0x00A6
3734 111e: 87 77 andi r24, 0x77 ; 119
3735 1120: 80 93 a6 00 sts 0x00A6, r24
3739 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_SetupSent)) != HOST_SENDCONTROL_Successful)
3740 1124: 80 e0 ldi r24, 0x00 ; 0
3741 1126: 84 df rcall .-248 ; 0x1030 <USB_Host_WaitForIOS>
3742 1128: 88 23 and r24, r24
3743 112a: 09 f0 breq .+2 ; 0x112e <USB_Host_SendControlRequest+0xac>
3744 112c: a7 c0 rjmp .+334 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
3746 /** Freezes the selected pipe, preventing it from communicating with an attached device. */
3747 static inline void Pipe_Freeze(void) ATTR_ALWAYS_INLINE;
3748 static inline void Pipe_Freeze(void)
3750 UPCONX |= (1 << PFREEZE);
3751 112e: 80 91 a9 00 lds r24, 0x00A9
3752 1132: 80 64 ori r24, 0x40 ; 64
3753 1134: 80 93 a9 00 sts 0x00A9, r24
3754 goto End_Of_Control_Send;
3758 if ((ReturnStatus = USB_Host_WaitMS(1)) != HOST_WAITERROR_Successful)
3759 1138: 81 e0 ldi r24, 0x01 ; 1
3760 113a: a1 db rcall .-2238 ; 0x87e <USB_Host_WaitMS>
3761 113c: 88 23 and r24, r24
3762 113e: 09 f0 breq .+2 ; 0x1142 <USB_Host_SendControlRequest+0xc0>
3763 1140: 9d c0 rjmp .+314 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
3764 goto End_Of_Control_Send;
3766 if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_DIRECTION) == REQDIR_DEVICETOHOST)
3767 1142: 80 91 23 01 lds r24, 0x0123
3768 1146: 87 ff sbrs r24, 7
3769 1148: 4f c0 rjmp .+158 ; 0x11e8 <USB_Host_SendControlRequest+0x166>
3770 * \param[in] Token New pipe token to set the selected pipe to, as a \c PIPE_TOKEN_* mask.
3772 static inline void Pipe_SetPipeToken(const uint8_t Token) ATTR_ALWAYS_INLINE;
3773 static inline void Pipe_SetPipeToken(const uint8_t Token)
3775 UPCFG0X = ((UPCFG0X & ~(0x03 << PTOKEN0)) | Token);
3776 114a: 80 91 aa 00 lds r24, 0x00AA
3777 114e: 8f 7c andi r24, 0xCF ; 207
3778 1150: 80 61 ori r24, 0x10 ; 16
3779 1152: 80 93 aa 00 sts 0x00AA, r24
3781 Pipe_SetPipeToken(PIPE_TOKEN_IN);
3783 if (DataStream != NULL)
3784 1156: 01 15 cp r16, r1
3785 1158: 11 05 cpc r17, r1
3786 115a: 61 f5 brne .+88 ; 0x11b4 <USB_Host_SendControlRequest+0x132>
3787 115c: 2d c0 rjmp .+90 ; 0x11b8 <USB_Host_SendControlRequest+0x136>
3789 /** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
3790 static inline void Pipe_Unfreeze(void) ATTR_ALWAYS_INLINE;
3791 static inline void Pipe_Unfreeze(void)
3793 UPCONX &= ~(1 << PFREEZE);
3794 115e: 80 91 a9 00 lds r24, 0x00A9
3795 1162: 8f 7b andi r24, 0xBF ; 191
3796 1164: 80 93 a9 00 sts 0x00A9, r24
3802 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_InReceived)) != HOST_SENDCONTROL_Successful)
3803 1168: 81 e0 ldi r24, 0x01 ; 1
3804 116a: 62 df rcall .-316 ; 0x1030 <USB_Host_WaitForIOS>
3805 116c: 88 23 and r24, r24
3806 116e: 09 f0 breq .+2 ; 0x1172 <USB_Host_SendControlRequest+0xf0>
3807 1170: 85 c0 rjmp .+266 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
3808 * \return Total number of bytes in the currently selected pipe's FIFO buffer.
3810 static inline uint16_t Pipe_BytesInPipe(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
3811 static inline uint16_t Pipe_BytesInPipe(void)
3814 1172: 80 91 f6 00 lds r24, 0x00F6
3815 1176: 90 91 f7 00 lds r25, 0x00F7
3816 goto End_Of_Control_Send;
3818 if (!(Pipe_BytesInPipe()))
3819 117a: 00 97 sbiw r24, 0x00 ; 0
3820 117c: 49 f4 brne .+18 ; 0x1190 <USB_Host_SendControlRequest+0x10e>
3822 117e: c0 e0 ldi r28, 0x00 ; 0
3823 1180: d0 e0 ldi r29, 0x00 ; 0
3824 1182: 06 c0 rjmp .+12 ; 0x1190 <USB_Host_SendControlRequest+0x10e>
3825 * \return Next byte in the currently selected pipe's FIFO buffer.
3827 static inline uint8_t Pipe_Read_8(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
3828 static inline uint8_t Pipe_Read_8(void)
3831 1184: 80 91 af 00 lds r24, 0x00AF
3833 while (Pipe_BytesInPipe() && DataLen)
3835 *(DataStream++) = Pipe_Read_8();
3836 1188: f8 01 movw r30, r16
3837 118a: 81 93 st Z+, r24
3838 118c: 8f 01 movw r16, r30
3840 118e: 21 97 sbiw r28, 0x01 ; 1
3841 * \return Total number of bytes in the currently selected pipe's FIFO buffer.
3843 static inline uint16_t Pipe_BytesInPipe(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
3844 static inline uint16_t Pipe_BytesInPipe(void)
3847 1190: 80 91 f6 00 lds r24, 0x00F6
3848 1194: 90 91 f7 00 lds r25, 0x00F7
3849 goto End_Of_Control_Send;
3851 if (!(Pipe_BytesInPipe()))
3854 while (Pipe_BytesInPipe() && DataLen)
3855 1198: 00 97 sbiw r24, 0x00 ; 0
3856 119a: 11 f0 breq .+4 ; 0x11a0 <USB_Host_SendControlRequest+0x11e>
3857 119c: 20 97 sbiw r28, 0x00 ; 0
3858 119e: 91 f7 brne .-28 ; 0x1184 <USB_Host_SendControlRequest+0x102>
3860 /** Freezes the selected pipe, preventing it from communicating with an attached device. */
3861 static inline void Pipe_Freeze(void) ATTR_ALWAYS_INLINE;
3862 static inline void Pipe_Freeze(void)
3864 UPCONX |= (1 << PFREEZE);
3865 11a0: 80 91 a9 00 lds r24, 0x00A9
3866 11a4: 80 64 ori r24, 0x40 ; 64
3867 11a6: 80 93 a9 00 sts 0x00A9, r24
3868 * \ingroup Group_PipePacketManagement_AVR8
3870 static inline void Pipe_ClearIN(void) ATTR_ALWAYS_INLINE;
3871 static inline void Pipe_ClearIN(void)
3873 UPINTX &= ~((1 << RXINI) | (1 << FIFOCON));
3874 11aa: 80 91 a6 00 lds r24, 0x00A6
3875 11ae: 8e 77 andi r24, 0x7E ; 126
3876 11b0: 80 93 a6 00 sts 0x00A6, r24
3878 Pipe_SetPipeToken(PIPE_TOKEN_IN);
3880 if (DataStream != NULL)
3883 11b4: 20 97 sbiw r28, 0x00 ; 0
3884 11b6: 99 f6 brne .-90 ; 0x115e <USB_Host_SendControlRequest+0xdc>
3885 * \param[in] Token New pipe token to set the selected pipe to, as a \c PIPE_TOKEN_* mask.
3887 static inline void Pipe_SetPipeToken(const uint8_t Token) ATTR_ALWAYS_INLINE;
3888 static inline void Pipe_SetPipeToken(const uint8_t Token)
3890 UPCFG0X = ((UPCFG0X & ~(0x03 << PTOKEN0)) | Token);
3891 11b8: 80 91 aa 00 lds r24, 0x00AA
3892 11bc: 8f 7c andi r24, 0xCF ; 207
3893 11be: 80 62 ori r24, 0x20 ; 32
3894 11c0: 80 93 aa 00 sts 0x00AA, r24
3896 /** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
3897 static inline void Pipe_Unfreeze(void) ATTR_ALWAYS_INLINE;
3898 static inline void Pipe_Unfreeze(void)
3900 UPCONX &= ~(1 << PFREEZE);
3901 11c4: 80 91 a9 00 lds r24, 0x00A9
3902 11c8: 8f 7b andi r24, 0xBF ; 191
3903 11ca: 80 93 a9 00 sts 0x00A9, r24
3906 Pipe_SetPipeToken(PIPE_TOKEN_OUT);
3909 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
3910 11ce: 82 e0 ldi r24, 0x02 ; 2
3911 11d0: 2f df rcall .-418 ; 0x1030 <USB_Host_WaitForIOS>
3912 11d2: 88 23 and r24, r24
3913 11d4: 09 f0 breq .+2 ; 0x11d8 <USB_Host_SendControlRequest+0x156>
3914 11d6: 52 c0 rjmp .+164 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
3915 * \ingroup Group_PipePacketManagement_AVR8
3917 static inline void Pipe_ClearOUT(void) ATTR_ALWAYS_INLINE;
3918 static inline void Pipe_ClearOUT(void)
3920 UPINTX &= ~((1 << TXOUTI) | (1 << FIFOCON));
3921 11d8: 80 91 a6 00 lds r24, 0x00A6
3922 11dc: 8b 77 andi r24, 0x7B ; 123
3923 11de: 80 93 a6 00 sts 0x00A6, r24
3924 goto End_Of_Control_Send;
3928 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
3929 11e2: 82 e0 ldi r24, 0x02 ; 2
3930 11e4: 25 df rcall .-438 ; 0x1030 <USB_Host_WaitForIOS>
3931 11e6: 4a c0 rjmp .+148 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
3932 goto End_Of_Control_Send;
3936 if (DataStream != NULL)
3937 11e8: 01 15 cp r16, r1
3938 11ea: 11 05 cpc r17, r1
3939 11ec: 99 f1 breq .+102 ; 0x1254 <USB_Host_SendControlRequest+0x1d2>
3940 * \param[in] Token New pipe token to set the selected pipe to, as a \c PIPE_TOKEN_* mask.
3942 static inline void Pipe_SetPipeToken(const uint8_t Token) ATTR_ALWAYS_INLINE;
3943 static inline void Pipe_SetPipeToken(const uint8_t Token)
3945 UPCFG0X = ((UPCFG0X & ~(0x03 << PTOKEN0)) | Token);
3946 11ee: 80 91 aa 00 lds r24, 0x00AA
3947 11f2: 8f 7c andi r24, 0xCF ; 207
3948 11f4: 80 62 ori r24, 0x20 ; 32
3949 11f6: 80 93 aa 00 sts 0x00AA, r24
3951 /** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
3952 static inline void Pipe_Unfreeze(void) ATTR_ALWAYS_INLINE;
3953 static inline void Pipe_Unfreeze(void)
3955 UPCONX &= ~(1 << PFREEZE);
3956 11fa: 80 91 a9 00 lds r24, 0x00A9
3957 11fe: 8f 7b andi r24, 0xBF ; 191
3958 1200: 80 93 a9 00 sts 0x00A9, r24
3960 Pipe_SetPipeToken(PIPE_TOKEN_OUT);
3964 1204: 1c c0 rjmp .+56 ; 0x123e <USB_Host_SendControlRequest+0x1bc>
3966 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
3967 1206: 82 e0 ldi r24, 0x02 ; 2
3968 1208: 13 df rcall .-474 ; 0x1030 <USB_Host_WaitForIOS>
3969 120a: 88 23 and r24, r24
3970 120c: b9 f5 brne .+110 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
3971 120e: f8 01 movw r30, r16
3972 1210: 06 c0 rjmp .+12 ; 0x121e <USB_Host_SendControlRequest+0x19c>
3973 goto End_Of_Control_Send;
3975 while (DataLen && (Pipe_BytesInPipe() < USB_ControlPipeSize))
3977 Pipe_Write_8(*(DataStream++));
3978 1212: 81 91 ld r24, Z+
3979 1214: 8f 01 movw r16, r30
3980 * \param[in] Data Data to write into the the currently selected pipe's FIFO buffer.
3982 static inline void Pipe_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE;
3983 static inline void Pipe_Write_8(const uint8_t Data)
3986 1216: 80 93 af 00 sts 0x00AF, r24
3988 121a: 21 97 sbiw r28, 0x01 ; 1
3991 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
3992 goto End_Of_Control_Send;
3994 while (DataLen && (Pipe_BytesInPipe() < USB_ControlPipeSize))
3995 121c: 59 f0 breq .+22 ; 0x1234 <USB_Host_SendControlRequest+0x1b2>
3996 121e: 8f 01 movw r16, r30
3997 * \return Total number of bytes in the currently selected pipe's FIFO buffer.
3999 static inline uint16_t Pipe_BytesInPipe(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
4000 static inline uint16_t Pipe_BytesInPipe(void)
4003 1220: 20 91 f6 00 lds r18, 0x00F6
4004 1224: 30 91 f7 00 lds r19, 0x00F7
4005 1228: 80 91 1b 01 lds r24, 0x011B
4006 122c: 90 e0 ldi r25, 0x00 ; 0
4007 122e: 28 17 cp r18, r24
4008 1230: 39 07 cpc r19, r25
4009 1232: 78 f3 brcs .-34 ; 0x1212 <USB_Host_SendControlRequest+0x190>
4010 * \ingroup Group_PipePacketManagement_AVR8
4012 static inline void Pipe_ClearOUT(void) ATTR_ALWAYS_INLINE;
4013 static inline void Pipe_ClearOUT(void)
4015 UPINTX &= ~((1 << TXOUTI) | (1 << FIFOCON));
4016 1234: 80 91 a6 00 lds r24, 0x00A6
4017 1238: 8b 77 andi r24, 0x7B ; 123
4018 123a: 80 93 a6 00 sts 0x00A6, r24
4019 if (DataStream != NULL)
4021 Pipe_SetPipeToken(PIPE_TOKEN_OUT);
4025 123e: 20 97 sbiw r28, 0x00 ; 0
4026 1240: 11 f7 brne .-60 ; 0x1206 <USB_Host_SendControlRequest+0x184>
4032 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_OutReady)) != HOST_SENDCONTROL_Successful)
4033 1242: 82 e0 ldi r24, 0x02 ; 2
4034 1244: f5 de rcall .-534 ; 0x1030 <USB_Host_WaitForIOS>
4035 1246: 88 23 and r24, r24
4036 1248: c9 f4 brne .+50 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
4038 /** Freezes the selected pipe, preventing it from communicating with an attached device. */
4039 static inline void Pipe_Freeze(void) ATTR_ALWAYS_INLINE;
4040 static inline void Pipe_Freeze(void)
4042 UPCONX |= (1 << PFREEZE);
4043 124a: 80 91 a9 00 lds r24, 0x00A9
4044 124e: 80 64 ori r24, 0x40 ; 64
4045 1250: 80 93 a9 00 sts 0x00A9, r24
4046 * \param[in] Token New pipe token to set the selected pipe to, as a \c PIPE_TOKEN_* mask.
4048 static inline void Pipe_SetPipeToken(const uint8_t Token) ATTR_ALWAYS_INLINE;
4049 static inline void Pipe_SetPipeToken(const uint8_t Token)
4051 UPCFG0X = ((UPCFG0X & ~(0x03 << PTOKEN0)) | Token);
4052 1254: 80 91 aa 00 lds r24, 0x00AA
4053 1258: 8f 7c andi r24, 0xCF ; 207
4054 125a: 80 61 ori r24, 0x10 ; 16
4055 125c: 80 93 aa 00 sts 0x00AA, r24
4057 /** Unfreezes the selected pipe, allowing it to communicate with an attached device. */
4058 static inline void Pipe_Unfreeze(void) ATTR_ALWAYS_INLINE;
4059 static inline void Pipe_Unfreeze(void)
4061 UPCONX &= ~(1 << PFREEZE);
4062 1260: 80 91 a9 00 lds r24, 0x00A9
4063 1264: 8f 7b andi r24, 0xBF ; 191
4064 1266: 80 93 a9 00 sts 0x00A9, r24
4067 Pipe_SetPipeToken(PIPE_TOKEN_IN);
4070 if ((ReturnStatus = USB_Host_WaitForIOS(USB_HOST_WAITFOR_InReceived)) != HOST_SENDCONTROL_Successful)
4071 126a: 81 e0 ldi r24, 0x01 ; 1
4072 126c: e1 de rcall .-574 ; 0x1030 <USB_Host_WaitForIOS>
4073 126e: 88 23 and r24, r24
4074 1270: 29 f4 brne .+10 ; 0x127c <USB_Host_SendControlRequest+0x1fa>
4075 * \ingroup Group_PipePacketManagement_AVR8
4077 static inline void Pipe_ClearIN(void) ATTR_ALWAYS_INLINE;
4078 static inline void Pipe_ClearIN(void)
4080 UPINTX &= ~((1 << RXINI) | (1 << FIFOCON));
4081 1272: 90 91 a6 00 lds r25, 0x00A6
4082 1276: 9e 77 andi r25, 0x7E ; 126
4083 1278: 90 93 a6 00 sts 0x00A6, r25
4085 /** Freezes the selected pipe, preventing it from communicating with an attached device. */
4086 static inline void Pipe_Freeze(void) ATTR_ALWAYS_INLINE;
4087 static inline void Pipe_Freeze(void)
4089 UPCONX |= (1 << PFREEZE);
4090 127c: 90 91 a9 00 lds r25, 0x00A9
4091 1280: 90 64 ori r25, 0x40 ; 64
4092 1282: 90 93 a9 00 sts 0x00A9, r25
4095 End_Of_Control_Send:
4099 1286: e1 14 cp r14, r1
4100 1288: f1 04 cpc r15, r1
4101 128a: 29 f4 brne .+10 ; 0x1296 <USB_Host_SendControlRequest+0x214>
4102 * messages to the device.
4104 static inline void USB_Host_SuspendBus(void) ATTR_ALWAYS_INLINE;
4105 static inline void USB_Host_SuspendBus(void)
4107 UHCON &= ~(1 << SOFEN);
4108 128c: 90 91 9e 00 lds r25, 0x009E
4109 1290: 9e 7f andi r25, 0xFE ; 254
4110 1292: 90 93 9e 00 sts 0x009E, r25
4111 * \param[in] PipeNumber Index of the pipe to reset.
4113 static inline void Pipe_ResetPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
4114 static inline void Pipe_ResetPipe(const uint8_t PipeNumber)
4116 UPRST = (1 << PipeNumber);
4117 1296: 91 e0 ldi r25, 0x01 ; 1
4118 1298: 90 93 a8 00 sts 0x00A8, r25
4120 129c: 10 92 a8 00 sts 0x00A8, r1
4121 USB_Host_SuspendBus();
4123 Pipe_ResetPipe(PIPE_CONTROLPIPE);
4125 return ReturnStatus;
4135 000012ae <USB_USBTask>:
4136 #if defined(USB_CAN_BE_DEVICE) && !defined(DEVICE_STATE_AS_GPIOR)
4137 volatile uint8_t USB_DeviceState;
4140 void USB_USBTask(void)
4142 12ae: 1f 93 push r17
4143 12b0: cf 93 push r28
4144 12b2: df 93 push r29
4145 * \return Index of the currently selected pipe.
4147 static inline uint8_t Pipe_GetCurrentPipe(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
4148 static inline uint8_t Pipe_GetCurrentPipe(void)
4150 return (UPNUM & PIPE_PIPENUM_MASK);
4151 12b4: c7 ea ldi r28, 0xA7 ; 167
4152 12b6: d0 e0 ldi r29, 0x00 ; 0
4153 12b8: 18 81 ld r17, Y
4154 12ba: 17 70 andi r17, 0x07 ; 7
4155 * \param[in] PipeNumber Index of the pipe to select.
4157 static inline void Pipe_SelectPipe(const uint8_t PipeNumber) ATTR_ALWAYS_INLINE;
4158 static inline void Pipe_SelectPipe(const uint8_t PipeNumber)
4161 12bc: 18 82 st Y, r1
4163 uint8_t PrevPipe = Pipe_GetCurrentPipe();
4165 Pipe_SelectPipe(PIPE_CONTROLPIPE);
4167 USB_Host_ProcessNextHostState();
4168 12be: 34 db rcall .-2456 ; 0x928 <USB_Host_ProcessNextHostState>
4169 12c0: 18 83 st Y, r17
4170 if (USB_CurrentMode == USB_MODE_Device)
4172 else if (USB_CurrentMode == USB_MODE_Host)
4181 000012ca <Serial_putchar>:
4182 * \param[in] DataByte Byte to transmit through the USART.
4184 static inline void Serial_SendByte(const char DataByte) ATTR_ALWAYS_INLINE;
4185 static inline void Serial_SendByte(const char DataByte)
4187 while (!(UCSR1A & (1 << UDRE1)));
4188 12ca: 90 91 c8 00 lds r25, 0x00C8
4189 12ce: 95 ff sbrs r25, 5
4190 12d0: fc cf rjmp .-8 ; 0x12ca <Serial_putchar>
4192 12d2: 80 93 ce 00 sts 0x00CE, r24
4196 Serial_SendByte(DataByte);
4199 12d6: 80 e0 ldi r24, 0x00 ; 0
4200 12d8: 90 e0 ldi r25, 0x00 ; 0
4203 000012dc <Serial_getchar>:
4204 * \return Boolean \c true if a character has been received, \c false otherwise.
4206 static inline bool Serial_IsCharReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
4207 static inline bool Serial_IsCharReceived(void)
4209 return ((UCSR1A & (1 << RXC1)) ? true : false);
4210 12dc: 80 91 c8 00 lds r24, 0x00C8
4212 int Serial_getchar(FILE *Stream)
4216 if (!(Serial_IsCharReceived()))
4217 12e0: 87 ff sbrs r24, 7
4218 12e2: 08 c0 rjmp .+16 ; 0x12f4 <Serial_getchar+0x18>
4219 12e4: 80 91 c8 00 lds r24, 0x00C8
4220 * \return Next byte received from the USART, or a negative value if no byte has been received.
4222 static inline int16_t Serial_ReceiveByte(void) ATTR_ALWAYS_INLINE;
4223 static inline int16_t Serial_ReceiveByte(void)
4225 if (!(Serial_IsCharReceived()))
4226 12e8: 87 ff sbrs r24, 7
4227 12ea: 07 c0 rjmp .+14 ; 0x12fa <Serial_getchar+0x1e>
4231 12ec: 20 91 ce 00 lds r18, 0x00CE
4232 12f0: 30 e0 ldi r19, 0x00 ; 0
4233 12f2: 05 c0 rjmp .+10 ; 0x12fe <Serial_getchar+0x22>
4235 12f4: 2e ef ldi r18, 0xFE ; 254
4236 12f6: 3f ef ldi r19, 0xFF ; 255
4237 12f8: 02 c0 rjmp .+4 ; 0x12fe <Serial_getchar+0x22>
4239 static inline int16_t Serial_ReceiveByte(void) ATTR_ALWAYS_INLINE;
4240 static inline int16_t Serial_ReceiveByte(void)
4242 if (!(Serial_IsCharReceived()))
4244 12fa: 2f ef ldi r18, 0xFF ; 255
4245 12fc: 3f ef ldi r19, 0xFF ; 255
4247 return Serial_ReceiveByte();
4249 12fe: c9 01 movw r24, r18
4252 00001302 <printf_P>:
4253 1302: df 93 push r29
4254 1304: cf 93 push r28
4255 1306: cd b7 in r28, 0x3d ; 61
4256 1308: de b7 in r29, 0x3e ; 62
4257 130a: fe 01 movw r30, r28
4258 130c: 35 96 adiw r30, 0x05 ; 5
4259 130e: 61 91 ld r22, Z+
4260 1310: 71 91 ld r23, Z+
4261 1312: 80 91 3c 01 lds r24, 0x013C
4262 1316: 90 91 3d 01 lds r25, 0x013D
4263 131a: dc 01 movw r26, r24
4264 131c: 13 96 adiw r26, 0x03 ; 3
4265 131e: 2c 91 ld r18, X
4266 1320: 13 97 sbiw r26, 0x03 ; 3
4267 1322: 28 60 ori r18, 0x08 ; 8
4268 1324: 13 96 adiw r26, 0x03 ; 3
4269 1326: 2c 93 st X, r18
4270 1328: af 01 movw r20, r30
4271 132a: 42 d0 rcall .+132 ; 0x13b0 <vfprintf>
4272 132c: e0 91 3c 01 lds r30, 0x013C
4273 1330: f0 91 3d 01 lds r31, 0x013D
4274 1334: 23 81 ldd r18, Z+3 ; 0x03
4275 1336: 27 7f andi r18, 0xF7 ; 247
4276 1338: 23 83 std Z+3, r18 ; 0x03
4282 1340: ef 92 push r14
4283 1342: ff 92 push r15
4284 1344: 0f 93 push r16
4285 1346: 1f 93 push r17
4286 1348: cf 93 push r28
4287 134a: df 93 push r29
4288 134c: 8c 01 movw r16, r24
4289 134e: e0 91 3c 01 lds r30, 0x013C
4290 1352: f0 91 3d 01 lds r31, 0x013D
4291 1356: 83 81 ldd r24, Z+3 ; 0x03
4292 1358: 81 ff sbrs r24, 1
4293 135a: 20 c0 rjmp .+64 ; 0x139c <puts_P+0x5c>
4294 135c: c0 e0 ldi r28, 0x00 ; 0
4295 135e: d0 e0 ldi r29, 0x00 ; 0
4296 1360: 0c c0 rjmp .+24 ; 0x137a <puts_P+0x3a>
4297 1362: db 01 movw r26, r22
4298 1364: 18 96 adiw r26, 0x08 ; 8
4299 1366: ed 91 ld r30, X+
4300 1368: fc 91 ld r31, X
4301 136a: 19 97 sbiw r26, 0x09 ; 9
4303 136e: 00 97 sbiw r24, 0x00 ; 0
4304 1370: 11 f0 breq .+4 ; 0x1376 <puts_P+0x36>
4305 1372: cf ef ldi r28, 0xFF ; 255
4306 1374: df ef ldi r29, 0xFF ; 255
4307 1376: 0f 5f subi r16, 0xFF ; 255
4308 1378: 1f 4f sbci r17, 0xFF ; 255
4309 137a: f8 01 movw r30, r16
4310 137c: 84 91 lpm r24, Z+
4311 137e: 60 91 3c 01 lds r22, 0x013C
4312 1382: 70 91 3d 01 lds r23, 0x013D
4313 1386: 88 23 and r24, r24
4314 1388: 61 f7 brne .-40 ; 0x1362 <puts_P+0x22>
4315 138a: db 01 movw r26, r22
4316 138c: 18 96 adiw r26, 0x08 ; 8
4317 138e: ed 91 ld r30, X+
4318 1390: fc 91 ld r31, X
4319 1392: 19 97 sbiw r26, 0x09 ; 9
4320 1394: 8a e0 ldi r24, 0x0A ; 10
4322 1398: 00 97 sbiw r24, 0x00 ; 0
4323 139a: 11 f0 breq .+4 ; 0x13a0 <puts_P+0x60>
4324 139c: cf ef ldi r28, 0xFF ; 255
4325 139e: df ef ldi r29, 0xFF ; 255
4326 13a0: ce 01 movw r24, r28
4335 000013b0 <vfprintf>:
4344 13c0: af 92 push r10
4345 13c2: bf 92 push r11
4346 13c4: cf 92 push r12
4347 13c6: df 92 push r13
4348 13c8: ef 92 push r14
4349 13ca: ff 92 push r15
4350 13cc: 0f 93 push r16
4351 13ce: 1f 93 push r17
4352 13d0: df 93 push r29
4353 13d2: cf 93 push r28
4354 13d4: cd b7 in r28, 0x3d ; 61
4355 13d6: de b7 in r29, 0x3e ; 62
4356 13d8: 2c 97 sbiw r28, 0x0c ; 12
4357 13da: 0f b6 in r0, 0x3f ; 63
4359 13de: de bf out 0x3e, r29 ; 62
4360 13e0: 0f be out 0x3f, r0 ; 63
4361 13e2: cd bf out 0x3d, r28 ; 61
4362 13e4: 6c 01 movw r12, r24
4363 13e6: 1b 01 movw r2, r22
4364 13e8: 8a 01 movw r16, r20
4365 13ea: fc 01 movw r30, r24
4366 13ec: 17 82 std Z+7, r1 ; 0x07
4367 13ee: 16 82 std Z+6, r1 ; 0x06
4368 13f0: 83 81 ldd r24, Z+3 ; 0x03
4369 13f2: 81 ff sbrs r24, 1
4370 13f4: c4 c1 rjmp .+904 ; 0x177e <vfprintf+0x3ce>
4371 13f6: 2e 01 movw r4, r28
4373 13fa: 41 1c adc r4, r1
4374 13fc: 51 1c adc r5, r1
4375 13fe: f6 01 movw r30, r12
4376 1400: 93 81 ldd r25, Z+3 ; 0x03
4377 1402: f1 01 movw r30, r2
4378 1404: 93 fd sbrc r25, 3
4379 1406: 85 91 lpm r24, Z+
4380 1408: 93 ff sbrs r25, 3
4381 140a: 81 91 ld r24, Z+
4382 140c: 1f 01 movw r2, r30
4383 140e: 88 23 and r24, r24
4384 1410: 09 f4 brne .+2 ; 0x1414 <vfprintf+0x64>
4385 1412: b1 c1 rjmp .+866 ; 0x1776 <vfprintf+0x3c6>
4386 1414: 85 32 cpi r24, 0x25 ; 37
4387 1416: 39 f4 brne .+14 ; 0x1426 <vfprintf+0x76>
4388 1418: 93 fd sbrc r25, 3
4389 141a: 85 91 lpm r24, Z+
4390 141c: 93 ff sbrs r25, 3
4391 141e: 81 91 ld r24, Z+
4392 1420: 1f 01 movw r2, r30
4393 1422: 85 32 cpi r24, 0x25 ; 37
4394 1424: 21 f4 brne .+8 ; 0x142e <vfprintf+0x7e>
4395 1426: 90 e0 ldi r25, 0x00 ; 0
4396 1428: b6 01 movw r22, r12
4397 142a: db d1 rcall .+950 ; 0x17e2 <fputc>
4398 142c: e8 cf rjmp .-48 ; 0x13fe <vfprintf+0x4e>
4399 142e: ee 24 eor r14, r14
4400 1430: ff 24 eor r15, r15
4401 1432: 20 e0 ldi r18, 0x00 ; 0
4402 1434: 20 32 cpi r18, 0x20 ; 32
4403 1436: b0 f4 brcc .+44 ; 0x1464 <vfprintf+0xb4>
4404 1438: 8b 32 cpi r24, 0x2B ; 43
4405 143a: 69 f0 breq .+26 ; 0x1456 <vfprintf+0xa6>
4406 143c: 8c 32 cpi r24, 0x2C ; 44
4407 143e: 28 f4 brcc .+10 ; 0x144a <vfprintf+0x9a>
4408 1440: 80 32 cpi r24, 0x20 ; 32
4409 1442: 51 f0 breq .+20 ; 0x1458 <vfprintf+0xa8>
4410 1444: 83 32 cpi r24, 0x23 ; 35
4411 1446: 71 f4 brne .+28 ; 0x1464 <vfprintf+0xb4>
4412 1448: 0b c0 rjmp .+22 ; 0x1460 <vfprintf+0xb0>
4413 144a: 8d 32 cpi r24, 0x2D ; 45
4414 144c: 39 f0 breq .+14 ; 0x145c <vfprintf+0xac>
4415 144e: 80 33 cpi r24, 0x30 ; 48
4416 1450: 49 f4 brne .+18 ; 0x1464 <vfprintf+0xb4>
4417 1452: 21 60 ori r18, 0x01 ; 1
4418 1454: 2c c0 rjmp .+88 ; 0x14ae <vfprintf+0xfe>
4419 1456: 22 60 ori r18, 0x02 ; 2
4420 1458: 24 60 ori r18, 0x04 ; 4
4421 145a: 29 c0 rjmp .+82 ; 0x14ae <vfprintf+0xfe>
4422 145c: 28 60 ori r18, 0x08 ; 8
4423 145e: 27 c0 rjmp .+78 ; 0x14ae <vfprintf+0xfe>
4424 1460: 20 61 ori r18, 0x10 ; 16
4425 1462: 25 c0 rjmp .+74 ; 0x14ae <vfprintf+0xfe>
4426 1464: 27 fd sbrc r18, 7
4427 1466: 2c c0 rjmp .+88 ; 0x14c0 <vfprintf+0x110>
4428 1468: 38 2f mov r19, r24
4429 146a: 30 53 subi r19, 0x30 ; 48
4430 146c: 3a 30 cpi r19, 0x0A ; 10
4431 146e: 98 f4 brcc .+38 ; 0x1496 <vfprintf+0xe6>
4432 1470: 26 ff sbrs r18, 6
4433 1472: 08 c0 rjmp .+16 ; 0x1484 <vfprintf+0xd4>
4434 1474: 8e 2d mov r24, r14
4435 1476: 88 0f add r24, r24
4436 1478: e8 2e mov r14, r24
4437 147a: ee 0c add r14, r14
4438 147c: ee 0c add r14, r14
4439 147e: e8 0e add r14, r24
4440 1480: e3 0e add r14, r19
4441 1482: 15 c0 rjmp .+42 ; 0x14ae <vfprintf+0xfe>
4442 1484: 8f 2d mov r24, r15
4443 1486: 88 0f add r24, r24
4444 1488: f8 2e mov r15, r24
4445 148a: ff 0c add r15, r15
4446 148c: ff 0c add r15, r15
4447 148e: f8 0e add r15, r24
4448 1490: f3 0e add r15, r19
4449 1492: 20 62 ori r18, 0x20 ; 32
4450 1494: 0c c0 rjmp .+24 ; 0x14ae <vfprintf+0xfe>
4451 1496: 8e 32 cpi r24, 0x2E ; 46
4452 1498: 21 f4 brne .+8 ; 0x14a2 <vfprintf+0xf2>
4453 149a: 26 fd sbrc r18, 6
4454 149c: 6c c1 rjmp .+728 ; 0x1776 <vfprintf+0x3c6>
4455 149e: 20 64 ori r18, 0x40 ; 64
4456 14a0: 06 c0 rjmp .+12 ; 0x14ae <vfprintf+0xfe>
4457 14a2: 8c 36 cpi r24, 0x6C ; 108
4458 14a4: 11 f4 brne .+4 ; 0x14aa <vfprintf+0xfa>
4459 14a6: 20 68 ori r18, 0x80 ; 128
4460 14a8: 02 c0 rjmp .+4 ; 0x14ae <vfprintf+0xfe>
4461 14aa: 88 36 cpi r24, 0x68 ; 104
4462 14ac: 49 f4 brne .+18 ; 0x14c0 <vfprintf+0x110>
4463 14ae: f1 01 movw r30, r2
4464 14b0: 93 fd sbrc r25, 3
4465 14b2: 85 91 lpm r24, Z+
4466 14b4: 93 ff sbrs r25, 3
4467 14b6: 81 91 ld r24, Z+
4468 14b8: 1f 01 movw r2, r30
4469 14ba: 88 23 and r24, r24
4470 14bc: 09 f0 breq .+2 ; 0x14c0 <vfprintf+0x110>
4471 14be: ba cf rjmp .-140 ; 0x1434 <vfprintf+0x84>
4472 14c0: 98 2f mov r25, r24
4473 14c2: 95 54 subi r25, 0x45 ; 69
4474 14c4: 93 30 cpi r25, 0x03 ; 3
4475 14c6: 18 f0 brcs .+6 ; 0x14ce <vfprintf+0x11e>
4476 14c8: 90 52 subi r25, 0x20 ; 32
4477 14ca: 93 30 cpi r25, 0x03 ; 3
4478 14cc: 28 f4 brcc .+10 ; 0x14d8 <vfprintf+0x128>
4479 14ce: 0c 5f subi r16, 0xFC ; 252
4480 14d0: 1f 4f sbci r17, 0xFF ; 255
4481 14d2: ff e3 ldi r31, 0x3F ; 63
4482 14d4: f9 83 std Y+1, r31 ; 0x01
4483 14d6: 0d c0 rjmp .+26 ; 0x14f2 <vfprintf+0x142>
4484 14d8: 83 36 cpi r24, 0x63 ; 99
4485 14da: 31 f0 breq .+12 ; 0x14e8 <vfprintf+0x138>
4486 14dc: 83 37 cpi r24, 0x73 ; 115
4487 14de: 71 f0 breq .+28 ; 0x14fc <vfprintf+0x14c>
4488 14e0: 83 35 cpi r24, 0x53 ; 83
4489 14e2: 09 f0 breq .+2 ; 0x14e6 <vfprintf+0x136>
4490 14e4: 5c c0 rjmp .+184 ; 0x159e <vfprintf+0x1ee>
4491 14e6: 21 c0 rjmp .+66 ; 0x152a <vfprintf+0x17a>
4492 14e8: f8 01 movw r30, r16
4493 14ea: 80 81 ld r24, Z
4494 14ec: 89 83 std Y+1, r24 ; 0x01
4495 14ee: 0e 5f subi r16, 0xFE ; 254
4496 14f0: 1f 4f sbci r17, 0xFF ; 255
4497 14f2: 42 01 movw r8, r4
4498 14f4: 71 e0 ldi r23, 0x01 ; 1
4499 14f6: a7 2e mov r10, r23
4500 14f8: b1 2c mov r11, r1
4501 14fa: 15 c0 rjmp .+42 ; 0x1526 <vfprintf+0x176>
4502 14fc: 62 e0 ldi r22, 0x02 ; 2
4503 14fe: 66 2e mov r6, r22
4504 1500: 71 2c mov r7, r1
4505 1502: 60 0e add r6, r16
4506 1504: 71 1e adc r7, r17
4507 1506: f8 01 movw r30, r16
4508 1508: 80 80 ld r8, Z
4509 150a: 91 80 ldd r9, Z+1 ; 0x01
4510 150c: 26 ff sbrs r18, 6
4511 150e: 03 c0 rjmp .+6 ; 0x1516 <vfprintf+0x166>
4512 1510: 6e 2d mov r22, r14
4513 1512: 70 e0 ldi r23, 0x00 ; 0
4514 1514: 02 c0 rjmp .+4 ; 0x151a <vfprintf+0x16a>
4515 1516: 6f ef ldi r22, 0xFF ; 255
4516 1518: 7f ef ldi r23, 0xFF ; 255
4517 151a: c4 01 movw r24, r8
4518 151c: 2c 87 std Y+12, r18 ; 0x0c
4519 151e: 56 d1 rcall .+684 ; 0x17cc <strnlen>
4520 1520: 5c 01 movw r10, r24
4521 1522: 83 01 movw r16, r6
4522 1524: 2c 85 ldd r18, Y+12 ; 0x0c
4523 1526: 2f 77 andi r18, 0x7F ; 127
4524 1528: 16 c0 rjmp .+44 ; 0x1556 <vfprintf+0x1a6>
4525 152a: 52 e0 ldi r21, 0x02 ; 2
4526 152c: 65 2e mov r6, r21
4527 152e: 71 2c mov r7, r1
4528 1530: 60 0e add r6, r16
4529 1532: 71 1e adc r7, r17
4530 1534: f8 01 movw r30, r16
4531 1536: 80 80 ld r8, Z
4532 1538: 91 80 ldd r9, Z+1 ; 0x01
4533 153a: 26 ff sbrs r18, 6
4534 153c: 03 c0 rjmp .+6 ; 0x1544 <vfprintf+0x194>
4535 153e: 6e 2d mov r22, r14
4536 1540: 70 e0 ldi r23, 0x00 ; 0
4537 1542: 02 c0 rjmp .+4 ; 0x1548 <vfprintf+0x198>
4538 1544: 6f ef ldi r22, 0xFF ; 255
4539 1546: 7f ef ldi r23, 0xFF ; 255
4540 1548: c4 01 movw r24, r8
4541 154a: 2c 87 std Y+12, r18 ; 0x0c
4542 154c: 34 d1 rcall .+616 ; 0x17b6 <strnlen_P>
4543 154e: 5c 01 movw r10, r24
4544 1550: 2c 85 ldd r18, Y+12 ; 0x0c
4545 1552: 20 68 ori r18, 0x80 ; 128
4546 1554: 83 01 movw r16, r6
4547 1556: 23 fd sbrc r18, 3
4548 1558: 1e c0 rjmp .+60 ; 0x1596 <vfprintf+0x1e6>
4549 155a: 07 c0 rjmp .+14 ; 0x156a <vfprintf+0x1ba>
4550 155c: 80 e2 ldi r24, 0x20 ; 32
4551 155e: 90 e0 ldi r25, 0x00 ; 0
4552 1560: b6 01 movw r22, r12
4553 1562: 2c 87 std Y+12, r18 ; 0x0c
4554 1564: 3e d1 rcall .+636 ; 0x17e2 <fputc>
4556 1568: 2c 85 ldd r18, Y+12 ; 0x0c
4557 156a: 8f 2d mov r24, r15
4558 156c: 90 e0 ldi r25, 0x00 ; 0
4559 156e: a8 16 cp r10, r24
4560 1570: b9 06 cpc r11, r25
4561 1572: a0 f3 brcs .-24 ; 0x155c <vfprintf+0x1ac>
4562 1574: 10 c0 rjmp .+32 ; 0x1596 <vfprintf+0x1e6>
4563 1576: f4 01 movw r30, r8
4564 1578: 27 fd sbrc r18, 7
4565 157a: 85 91 lpm r24, Z+
4566 157c: 27 ff sbrs r18, 7
4567 157e: 81 91 ld r24, Z+
4568 1580: 4f 01 movw r8, r30
4569 1582: 90 e0 ldi r25, 0x00 ; 0
4570 1584: b6 01 movw r22, r12
4571 1586: 2c 87 std Y+12, r18 ; 0x0c
4572 1588: 2c d1 rcall .+600 ; 0x17e2 <fputc>
4573 158a: 2c 85 ldd r18, Y+12 ; 0x0c
4574 158c: f1 10 cpse r15, r1
4577 1592: a1 08 sbc r10, r1
4578 1594: b1 08 sbc r11, r1
4579 1596: a1 14 cp r10, r1
4580 1598: b1 04 cpc r11, r1
4581 159a: 69 f7 brne .-38 ; 0x1576 <vfprintf+0x1c6>
4582 159c: e9 c0 rjmp .+466 ; 0x1770 <vfprintf+0x3c0>
4583 159e: 84 36 cpi r24, 0x64 ; 100
4584 15a0: 11 f0 breq .+4 ; 0x15a6 <vfprintf+0x1f6>
4585 15a2: 89 36 cpi r24, 0x69 ; 105
4586 15a4: 41 f5 brne .+80 ; 0x15f6 <vfprintf+0x246>
4587 15a6: 27 ff sbrs r18, 7
4588 15a8: 08 c0 rjmp .+16 ; 0x15ba <vfprintf+0x20a>
4589 15aa: f8 01 movw r30, r16
4590 15ac: 60 81 ld r22, Z
4591 15ae: 71 81 ldd r23, Z+1 ; 0x01
4592 15b0: 82 81 ldd r24, Z+2 ; 0x02
4593 15b2: 93 81 ldd r25, Z+3 ; 0x03
4594 15b4: 0c 5f subi r16, 0xFC ; 252
4595 15b6: 1f 4f sbci r17, 0xFF ; 255
4596 15b8: 09 c0 rjmp .+18 ; 0x15cc <vfprintf+0x21c>
4597 15ba: f8 01 movw r30, r16
4598 15bc: 60 81 ld r22, Z
4599 15be: 71 81 ldd r23, Z+1 ; 0x01
4600 15c0: 88 27 eor r24, r24
4601 15c2: 77 fd sbrc r23, 7
4603 15c6: 98 2f mov r25, r24
4604 15c8: 0e 5f subi r16, 0xFE ; 254
4605 15ca: 1f 4f sbci r17, 0xFF ; 255
4606 15cc: 4f e6 ldi r20, 0x6F ; 111
4607 15ce: b4 2e mov r11, r20
4608 15d0: b2 22 and r11, r18
4609 15d2: 97 ff sbrs r25, 7
4610 15d4: 09 c0 rjmp .+18 ; 0x15e8 <vfprintf+0x238>
4615 15de: 7f 4f sbci r23, 0xFF ; 255
4616 15e0: 8f 4f sbci r24, 0xFF ; 255
4617 15e2: 9f 4f sbci r25, 0xFF ; 255
4618 15e4: f0 e8 ldi r31, 0x80 ; 128
4619 15e6: bf 2a or r11, r31
4620 15e8: a2 01 movw r20, r4
4621 15ea: 2a e0 ldi r18, 0x0A ; 10
4622 15ec: 30 e0 ldi r19, 0x00 ; 0
4623 15ee: 25 d1 rcall .+586 ; 0x183a <__ultoa_invert>
4624 15f0: 78 2e mov r7, r24
4625 15f2: 74 18 sub r7, r4
4626 15f4: 44 c0 rjmp .+136 ; 0x167e <vfprintf+0x2ce>
4627 15f6: 85 37 cpi r24, 0x75 ; 117
4628 15f8: 31 f4 brne .+12 ; 0x1606 <vfprintf+0x256>
4629 15fa: 3f ee ldi r19, 0xEF ; 239
4630 15fc: b3 2e mov r11, r19
4631 15fe: b2 22 and r11, r18
4632 1600: 2a e0 ldi r18, 0x0A ; 10
4633 1602: 30 e0 ldi r19, 0x00 ; 0
4634 1604: 25 c0 rjmp .+74 ; 0x1650 <vfprintf+0x2a0>
4635 1606: 99 ef ldi r25, 0xF9 ; 249
4636 1608: b9 2e mov r11, r25
4637 160a: b2 22 and r11, r18
4638 160c: 8f 36 cpi r24, 0x6F ; 111
4639 160e: c1 f0 breq .+48 ; 0x1640 <vfprintf+0x290>
4640 1610: 80 37 cpi r24, 0x70 ; 112
4641 1612: 20 f4 brcc .+8 ; 0x161c <vfprintf+0x26c>
4642 1614: 88 35 cpi r24, 0x58 ; 88
4643 1616: 09 f0 breq .+2 ; 0x161a <vfprintf+0x26a>
4644 1618: ae c0 rjmp .+348 ; 0x1776 <vfprintf+0x3c6>
4645 161a: 0d c0 rjmp .+26 ; 0x1636 <vfprintf+0x286>
4646 161c: 80 37 cpi r24, 0x70 ; 112
4647 161e: 21 f0 breq .+8 ; 0x1628 <vfprintf+0x278>
4648 1620: 88 37 cpi r24, 0x78 ; 120
4649 1622: 09 f0 breq .+2 ; 0x1626 <vfprintf+0x276>
4650 1624: a8 c0 rjmp .+336 ; 0x1776 <vfprintf+0x3c6>
4651 1626: 02 c0 rjmp .+4 ; 0x162c <vfprintf+0x27c>
4652 1628: 20 e1 ldi r18, 0x10 ; 16
4653 162a: b2 2a or r11, r18
4654 162c: b4 fe sbrs r11, 4
4655 162e: 0b c0 rjmp .+22 ; 0x1646 <vfprintf+0x296>
4656 1630: 84 e0 ldi r24, 0x04 ; 4
4657 1632: b8 2a or r11, r24
4658 1634: 08 c0 rjmp .+16 ; 0x1646 <vfprintf+0x296>
4659 1636: b4 fe sbrs r11, 4
4660 1638: 09 c0 rjmp .+18 ; 0x164c <vfprintf+0x29c>
4661 163a: e6 e0 ldi r30, 0x06 ; 6
4662 163c: be 2a or r11, r30
4663 163e: 06 c0 rjmp .+12 ; 0x164c <vfprintf+0x29c>
4664 1640: 28 e0 ldi r18, 0x08 ; 8
4665 1642: 30 e0 ldi r19, 0x00 ; 0
4666 1644: 05 c0 rjmp .+10 ; 0x1650 <vfprintf+0x2a0>
4667 1646: 20 e1 ldi r18, 0x10 ; 16
4668 1648: 30 e0 ldi r19, 0x00 ; 0
4669 164a: 02 c0 rjmp .+4 ; 0x1650 <vfprintf+0x2a0>
4670 164c: 20 e1 ldi r18, 0x10 ; 16
4671 164e: 32 e0 ldi r19, 0x02 ; 2
4672 1650: b7 fe sbrs r11, 7
4673 1652: 08 c0 rjmp .+16 ; 0x1664 <vfprintf+0x2b4>
4674 1654: f8 01 movw r30, r16
4675 1656: 60 81 ld r22, Z
4676 1658: 71 81 ldd r23, Z+1 ; 0x01
4677 165a: 82 81 ldd r24, Z+2 ; 0x02
4678 165c: 93 81 ldd r25, Z+3 ; 0x03
4679 165e: 0c 5f subi r16, 0xFC ; 252
4680 1660: 1f 4f sbci r17, 0xFF ; 255
4681 1662: 07 c0 rjmp .+14 ; 0x1672 <vfprintf+0x2c2>
4682 1664: f8 01 movw r30, r16
4683 1666: 60 81 ld r22, Z
4684 1668: 71 81 ldd r23, Z+1 ; 0x01
4685 166a: 80 e0 ldi r24, 0x00 ; 0
4686 166c: 90 e0 ldi r25, 0x00 ; 0
4687 166e: 0e 5f subi r16, 0xFE ; 254
4688 1670: 1f 4f sbci r17, 0xFF ; 255
4689 1672: a2 01 movw r20, r4
4690 1674: e2 d0 rcall .+452 ; 0x183a <__ultoa_invert>
4691 1676: 78 2e mov r7, r24
4692 1678: 74 18 sub r7, r4
4693 167a: ff e7 ldi r31, 0x7F ; 127
4694 167c: bf 22 and r11, r31
4695 167e: b6 fe sbrs r11, 6
4696 1680: 0b c0 rjmp .+22 ; 0x1698 <vfprintf+0x2e8>
4697 1682: 2e ef ldi r18, 0xFE ; 254
4698 1684: b2 22 and r11, r18
4699 1686: 7e 14 cp r7, r14
4700 1688: 38 f4 brcc .+14 ; 0x1698 <vfprintf+0x2e8>
4701 168a: b4 fe sbrs r11, 4
4702 168c: 07 c0 rjmp .+14 ; 0x169c <vfprintf+0x2ec>
4703 168e: b2 fc sbrc r11, 2
4704 1690: 05 c0 rjmp .+10 ; 0x169c <vfprintf+0x2ec>
4705 1692: 8f ee ldi r24, 0xEF ; 239
4706 1694: b8 22 and r11, r24
4707 1696: 02 c0 rjmp .+4 ; 0x169c <vfprintf+0x2ec>
4708 1698: a7 2c mov r10, r7
4709 169a: 01 c0 rjmp .+2 ; 0x169e <vfprintf+0x2ee>
4710 169c: ae 2c mov r10, r14
4711 169e: 8b 2d mov r24, r11
4712 16a0: 90 e0 ldi r25, 0x00 ; 0
4713 16a2: b4 fe sbrs r11, 4
4714 16a4: 0d c0 rjmp .+26 ; 0x16c0 <vfprintf+0x310>
4715 16a6: fe 01 movw r30, r28
4716 16a8: e7 0d add r30, r7
4717 16aa: f1 1d adc r31, r1
4718 16ac: 20 81 ld r18, Z
4719 16ae: 20 33 cpi r18, 0x30 ; 48
4720 16b0: 19 f4 brne .+6 ; 0x16b8 <vfprintf+0x308>
4721 16b2: e9 ee ldi r30, 0xE9 ; 233
4722 16b4: be 22 and r11, r30
4723 16b6: 09 c0 rjmp .+18 ; 0x16ca <vfprintf+0x31a>
4725 16ba: b2 fe sbrs r11, 2
4726 16bc: 06 c0 rjmp .+12 ; 0x16ca <vfprintf+0x31a>
4727 16be: 04 c0 rjmp .+8 ; 0x16c8 <vfprintf+0x318>
4728 16c0: 86 78 andi r24, 0x86 ; 134
4729 16c2: 90 70 andi r25, 0x00 ; 0
4730 16c4: 00 97 sbiw r24, 0x00 ; 0
4731 16c6: 09 f0 breq .+2 ; 0x16ca <vfprintf+0x31a>
4733 16ca: 8b 2c mov r8, r11
4734 16cc: 99 24 eor r9, r9
4735 16ce: b3 fc sbrc r11, 3
4736 16d0: 13 c0 rjmp .+38 ; 0x16f8 <vfprintf+0x348>
4737 16d2: b0 fe sbrs r11, 0
4738 16d4: 0e c0 rjmp .+28 ; 0x16f2 <vfprintf+0x342>
4739 16d6: af 14 cp r10, r15
4740 16d8: 28 f4 brcc .+10 ; 0x16e4 <vfprintf+0x334>
4741 16da: e7 2c mov r14, r7
4742 16dc: ef 0c add r14, r15
4743 16de: ea 18 sub r14, r10
4744 16e0: af 2c mov r10, r15
4745 16e2: 07 c0 rjmp .+14 ; 0x16f2 <vfprintf+0x342>
4746 16e4: e7 2c mov r14, r7
4747 16e6: 05 c0 rjmp .+10 ; 0x16f2 <vfprintf+0x342>
4748 16e8: 80 e2 ldi r24, 0x20 ; 32
4749 16ea: 90 e0 ldi r25, 0x00 ; 0
4750 16ec: b6 01 movw r22, r12
4751 16ee: 79 d0 rcall .+242 ; 0x17e2 <fputc>
4753 16f2: af 14 cp r10, r15
4754 16f4: c8 f3 brcs .-14 ; 0x16e8 <vfprintf+0x338>
4755 16f6: 04 c0 rjmp .+8 ; 0x1700 <vfprintf+0x350>
4756 16f8: af 14 cp r10, r15
4757 16fa: 10 f4 brcc .+4 ; 0x1700 <vfprintf+0x350>
4758 16fc: fa 18 sub r15, r10
4759 16fe: 01 c0 rjmp .+2 ; 0x1702 <vfprintf+0x352>
4760 1700: ff 24 eor r15, r15
4761 1702: 84 fe sbrs r8, 4
4762 1704: 0e c0 rjmp .+28 ; 0x1722 <vfprintf+0x372>
4763 1706: 80 e3 ldi r24, 0x30 ; 48
4764 1708: 90 e0 ldi r25, 0x00 ; 0
4765 170a: b6 01 movw r22, r12
4766 170c: 6a d0 rcall .+212 ; 0x17e2 <fputc>
4767 170e: 82 fe sbrs r8, 2
4768 1710: 1d c0 rjmp .+58 ; 0x174c <vfprintf+0x39c>
4769 1712: 81 fe sbrs r8, 1
4770 1714: 03 c0 rjmp .+6 ; 0x171c <vfprintf+0x36c>
4771 1716: 88 e5 ldi r24, 0x58 ; 88
4772 1718: 90 e0 ldi r25, 0x00 ; 0
4773 171a: 10 c0 rjmp .+32 ; 0x173c <vfprintf+0x38c>
4774 171c: 88 e7 ldi r24, 0x78 ; 120
4775 171e: 90 e0 ldi r25, 0x00 ; 0
4776 1720: 0d c0 rjmp .+26 ; 0x173c <vfprintf+0x38c>
4777 1722: c4 01 movw r24, r8
4778 1724: 86 78 andi r24, 0x86 ; 134
4779 1726: 90 70 andi r25, 0x00 ; 0
4780 1728: 00 97 sbiw r24, 0x00 ; 0
4781 172a: 81 f0 breq .+32 ; 0x174c <vfprintf+0x39c>
4782 172c: 81 fc sbrc r8, 1
4783 172e: 02 c0 rjmp .+4 ; 0x1734 <vfprintf+0x384>
4784 1730: 80 e2 ldi r24, 0x20 ; 32
4785 1732: 01 c0 rjmp .+2 ; 0x1736 <vfprintf+0x386>
4786 1734: 8b e2 ldi r24, 0x2B ; 43
4787 1736: b7 fc sbrc r11, 7
4788 1738: 8d e2 ldi r24, 0x2D ; 45
4789 173a: 90 e0 ldi r25, 0x00 ; 0
4790 173c: b6 01 movw r22, r12
4791 173e: 51 d0 rcall .+162 ; 0x17e2 <fputc>
4792 1740: 05 c0 rjmp .+10 ; 0x174c <vfprintf+0x39c>
4793 1742: 80 e3 ldi r24, 0x30 ; 48
4794 1744: 90 e0 ldi r25, 0x00 ; 0
4795 1746: b6 01 movw r22, r12
4796 1748: 4c d0 rcall .+152 ; 0x17e2 <fputc>
4798 174c: 7e 14 cp r7, r14
4799 174e: c8 f3 brcs .-14 ; 0x1742 <vfprintf+0x392>
4801 1752: f2 01 movw r30, r4
4802 1754: e7 0d add r30, r7
4803 1756: f1 1d adc r31, r1
4804 1758: 80 81 ld r24, Z
4805 175a: 90 e0 ldi r25, 0x00 ; 0
4806 175c: b6 01 movw r22, r12
4807 175e: 41 d0 rcall .+130 ; 0x17e2 <fputc>
4808 1760: 77 20 and r7, r7
4809 1762: b1 f7 brne .-20 ; 0x1750 <vfprintf+0x3a0>
4810 1764: 05 c0 rjmp .+10 ; 0x1770 <vfprintf+0x3c0>
4811 1766: 80 e2 ldi r24, 0x20 ; 32
4812 1768: 90 e0 ldi r25, 0x00 ; 0
4813 176a: b6 01 movw r22, r12
4814 176c: 3a d0 rcall .+116 ; 0x17e2 <fputc>
4816 1770: ff 20 and r15, r15
4817 1772: c9 f7 brne .-14 ; 0x1766 <vfprintf+0x3b6>
4818 1774: 44 ce rjmp .-888 ; 0x13fe <vfprintf+0x4e>
4819 1776: f6 01 movw r30, r12
4820 1778: 26 81 ldd r18, Z+6 ; 0x06
4821 177a: 37 81 ldd r19, Z+7 ; 0x07
4822 177c: 02 c0 rjmp .+4 ; 0x1782 <vfprintf+0x3d2>
4823 177e: 2f ef ldi r18, 0xFF ; 255
4824 1780: 3f ef ldi r19, 0xFF ; 255
4825 1782: c9 01 movw r24, r18
4826 1784: 2c 96 adiw r28, 0x0c ; 12
4827 1786: 0f b6 in r0, 0x3f ; 63
4829 178a: de bf out 0x3e, r29 ; 62
4830 178c: 0f be out 0x3f, r0 ; 63
4831 178e: cd bf out 0x3d, r28 ; 61
4852 000017b6 <strnlen_P>:
4853 17b6: fc 01 movw r30, r24
4854 17b8: 05 90 lpm r0, Z+
4855 17ba: 61 50 subi r22, 0x01 ; 1
4856 17bc: 70 40 sbci r23, 0x00 ; 0
4857 17be: 01 10 cpse r0, r1
4858 17c0: d8 f7 brcc .-10 ; 0x17b8 <strnlen_P+0x2>
4861 17c6: 8e 0f add r24, r30
4862 17c8: 9f 1f adc r25, r31
4866 17cc: fc 01 movw r30, r24
4867 17ce: 61 50 subi r22, 0x01 ; 1
4868 17d0: 70 40 sbci r23, 0x00 ; 0
4869 17d2: 01 90 ld r0, Z+
4870 17d4: 01 10 cpse r0, r1
4871 17d6: d8 f7 brcc .-10 ; 0x17ce <strnlen+0x2>
4874 17dc: 8e 0f add r24, r30
4875 17de: 9f 1f adc r25, r31
4879 17e2: 0f 93 push r16
4880 17e4: 1f 93 push r17
4881 17e6: cf 93 push r28
4882 17e8: df 93 push r29
4883 17ea: 8c 01 movw r16, r24
4884 17ec: eb 01 movw r28, r22
4885 17ee: 8b 81 ldd r24, Y+3 ; 0x03
4886 17f0: 81 ff sbrs r24, 1
4887 17f2: 1b c0 rjmp .+54 ; 0x182a <fputc+0x48>
4888 17f4: 82 ff sbrs r24, 2
4889 17f6: 0d c0 rjmp .+26 ; 0x1812 <fputc+0x30>
4890 17f8: 2e 81 ldd r18, Y+6 ; 0x06
4891 17fa: 3f 81 ldd r19, Y+7 ; 0x07
4892 17fc: 8c 81 ldd r24, Y+4 ; 0x04
4893 17fe: 9d 81 ldd r25, Y+5 ; 0x05
4894 1800: 28 17 cp r18, r24
4895 1802: 39 07 cpc r19, r25
4896 1804: 64 f4 brge .+24 ; 0x181e <fputc+0x3c>
4897 1806: e8 81 ld r30, Y
4898 1808: f9 81 ldd r31, Y+1 ; 0x01
4899 180a: 01 93 st Z+, r16
4900 180c: f9 83 std Y+1, r31 ; 0x01
4901 180e: e8 83 st Y, r30
4902 1810: 06 c0 rjmp .+12 ; 0x181e <fputc+0x3c>
4903 1812: e8 85 ldd r30, Y+8 ; 0x08
4904 1814: f9 85 ldd r31, Y+9 ; 0x09
4905 1816: 80 2f mov r24, r16
4907 181a: 00 97 sbiw r24, 0x00 ; 0
4908 181c: 31 f4 brne .+12 ; 0x182a <fputc+0x48>
4909 181e: 8e 81 ldd r24, Y+6 ; 0x06
4910 1820: 9f 81 ldd r25, Y+7 ; 0x07
4911 1822: 01 96 adiw r24, 0x01 ; 1
4912 1824: 9f 83 std Y+7, r25 ; 0x07
4913 1826: 8e 83 std Y+6, r24 ; 0x06
4914 1828: 02 c0 rjmp .+4 ; 0x182e <fputc+0x4c>
4915 182a: 0f ef ldi r16, 0xFF ; 255
4916 182c: 1f ef ldi r17, 0xFF ; 255
4917 182e: c8 01 movw r24, r16
4924 0000183a <__ultoa_invert>:
4925 183a: fa 01 movw r30, r20
4926 183c: aa 27 eor r26, r26
4927 183e: 28 30 cpi r18, 0x08 ; 8
4928 1840: 51 f1 breq .+84 ; 0x1896 <__ultoa_invert+0x5c>
4929 1842: 20 31 cpi r18, 0x10 ; 16
4930 1844: 81 f1 breq .+96 ; 0x18a6 <__ultoa_invert+0x6c>
4932 1848: 6f 93 push r22
4933 184a: 6e 7f andi r22, 0xFE ; 254
4934 184c: 6e 5f subi r22, 0xFE ; 254
4935 184e: 7f 4f sbci r23, 0xFF ; 255
4936 1850: 8f 4f sbci r24, 0xFF ; 255
4937 1852: 9f 4f sbci r25, 0xFF ; 255
4938 1854: af 4f sbci r26, 0xFF ; 255
4939 1856: b1 e0 ldi r27, 0x01 ; 1
4940 1858: 3e d0 rcall .+124 ; 0x18d6 <__ultoa_invert+0x9c>
4941 185a: b4 e0 ldi r27, 0x04 ; 4
4942 185c: 3c d0 rcall .+120 ; 0x18d6 <__ultoa_invert+0x9c>
4943 185e: 67 0f add r22, r23
4944 1860: 78 1f adc r23, r24
4945 1862: 89 1f adc r24, r25
4946 1864: 9a 1f adc r25, r26
4947 1866: a1 1d adc r26, r1
4948 1868: 68 0f add r22, r24
4949 186a: 79 1f adc r23, r25
4950 186c: 8a 1f adc r24, r26
4951 186e: 91 1d adc r25, r1
4952 1870: a1 1d adc r26, r1
4953 1872: 6a 0f add r22, r26
4954 1874: 71 1d adc r23, r1
4955 1876: 81 1d adc r24, r1
4956 1878: 91 1d adc r25, r1
4957 187a: a1 1d adc r26, r1
4958 187c: 20 d0 rcall .+64 ; 0x18be <__ultoa_invert+0x84>
4959 187e: 09 f4 brne .+2 ; 0x1882 <__ultoa_invert+0x48>
4962 1884: 2a e0 ldi r18, 0x0A ; 10
4963 1886: 26 9f mul r18, r22
4964 1888: 11 24 eor r1, r1
4965 188a: 30 19 sub r19, r0
4966 188c: 30 5d subi r19, 0xD0 ; 208
4967 188e: 31 93 st Z+, r19
4968 1890: de f6 brtc .-74 ; 0x1848 <__ultoa_invert+0xe>
4969 1892: cf 01 movw r24, r30
4971 1896: 46 2f mov r20, r22
4972 1898: 47 70 andi r20, 0x07 ; 7
4973 189a: 40 5d subi r20, 0xD0 ; 208
4974 189c: 41 93 st Z+, r20
4975 189e: b3 e0 ldi r27, 0x03 ; 3
4976 18a0: 0f d0 rcall .+30 ; 0x18c0 <__ultoa_invert+0x86>
4977 18a2: c9 f7 brne .-14 ; 0x1896 <__ultoa_invert+0x5c>
4978 18a4: f6 cf rjmp .-20 ; 0x1892 <__ultoa_invert+0x58>
4979 18a6: 46 2f mov r20, r22
4980 18a8: 4f 70 andi r20, 0x0F ; 15
4981 18aa: 40 5d subi r20, 0xD0 ; 208
4982 18ac: 4a 33 cpi r20, 0x3A ; 58
4983 18ae: 18 f0 brcs .+6 ; 0x18b6 <__ultoa_invert+0x7c>
4984 18b0: 49 5d subi r20, 0xD9 ; 217
4985 18b2: 31 fd sbrc r19, 1
4986 18b4: 40 52 subi r20, 0x20 ; 32
4987 18b6: 41 93 st Z+, r20
4988 18b8: 02 d0 rcall .+4 ; 0x18be <__ultoa_invert+0x84>
4989 18ba: a9 f7 brne .-22 ; 0x18a6 <__ultoa_invert+0x6c>
4990 18bc: ea cf rjmp .-44 ; 0x1892 <__ultoa_invert+0x58>
4991 18be: b4 e0 ldi r27, 0x04 ; 4
4998 18cc: c9 f7 brne .-14 ; 0x18c0 <__ultoa_invert+0x86>
4999 18ce: 00 97 sbiw r24, 0x00 ; 0
5000 18d0: 61 05 cpc r22, r1
5001 18d2: 71 05 cpc r23, r1
5003 18d6: 9b 01 movw r18, r22
5004 18d8: ac 01 movw r20, r24
5005 18da: 0a 2e mov r0, r26
5012 18e8: c9 f7 brne .-14 ; 0x18dc <__ultoa_invert+0xa2>
5013 18ea: 62 0f add r22, r18
5014 18ec: 73 1f adc r23, r19
5015 18ee: 84 1f adc r24, r20
5016 18f0: 95 1f adc r25, r21
5017 18f2: a0 1d adc r26, r0
5023 000018f8 <__stop_program>:
5024 18f8: ff cf rjmp .-2 ; 0x18f8 <__stop_program>