Manette.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .data 00000010 00800100 0000103e 000010d2 2**0 CONTENTS, ALLOC, LOAD, DATA 1 .text 0000103e 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .bss 00000011 00800110 00800110 000010e2 2**0 ALLOC 3 .comment 00000011 00000000 00000000 000010e2 2**0 CONTENTS, READONLY 4 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 000010f4 2**2 CONTENTS, READONLY 5 .debug_aranges 00000270 00000000 00000000 00001134 2**0 CONTENTS, READONLY, DEBUGGING 6 .debug_info 000057bc 00000000 00000000 000013a4 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_abbrev 00001b70 00000000 00000000 00006b60 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_line 00003573 00000000 00000000 000086d0 2**0 CONTENTS, READONLY, DEBUGGING 9 .debug_frame 0000075c 00000000 00000000 0000bc44 2**2 CONTENTS, READONLY, DEBUGGING 10 .debug_str 00002478 00000000 00000000 0000c3a0 2**0 CONTENTS, READONLY, DEBUGGING 11 .debug_loc 00003125 00000000 00000000 0000e818 2**0 CONTENTS, READONLY, DEBUGGING 12 .debug_ranges 00000388 00000000 00000000 0001193d 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: 0: b2 c0 rjmp .+356 ; 0x166 <__ctors_end> 2: 00 00 nop 4: cb c0 rjmp .+406 ; 0x19c <__bad_interrupt> 6: 00 00 nop 8: c9 c0 rjmp .+402 ; 0x19c <__bad_interrupt> a: 00 00 nop c: c7 c0 rjmp .+398 ; 0x19c <__bad_interrupt> e: 00 00 nop 10: c5 c0 rjmp .+394 ; 0x19c <__bad_interrupt> 12: 00 00 nop 14: c3 c0 rjmp .+390 ; 0x19c <__bad_interrupt> 16: 00 00 nop 18: c1 c0 rjmp .+386 ; 0x19c <__bad_interrupt> 1a: 00 00 nop 1c: bf c0 rjmp .+382 ; 0x19c <__bad_interrupt> 1e: 00 00 nop 20: bd c0 rjmp .+378 ; 0x19c <__bad_interrupt> 22: 00 00 nop 24: bb c0 rjmp .+374 ; 0x19c <__bad_interrupt> 26: 00 00 nop 28: aa c3 rjmp .+1876 ; 0x77e <__vector_10> 2a: 00 00 nop 2c: b7 c0 rjmp .+366 ; 0x19c <__bad_interrupt> 2e: 00 00 nop 30: b5 c0 rjmp .+362 ; 0x19c <__bad_interrupt> 32: 00 00 nop 34: b3 c0 rjmp .+358 ; 0x19c <__bad_interrupt> 36: 00 00 nop 38: b1 c0 rjmp .+354 ; 0x19c <__bad_interrupt> 3a: 00 00 nop 3c: af c0 rjmp .+350 ; 0x19c <__bad_interrupt> 3e: 00 00 nop 40: ad c0 rjmp .+346 ; 0x19c <__bad_interrupt> 42: 00 00 nop 44: ab c0 rjmp .+342 ; 0x19c <__bad_interrupt> 46: 00 00 nop 48: a9 c0 rjmp .+338 ; 0x19c <__bad_interrupt> 4a: 00 00 nop 4c: a7 c0 rjmp .+334 ; 0x19c <__bad_interrupt> 4e: 00 00 nop 50: a5 c0 rjmp .+330 ; 0x19c <__bad_interrupt> 52: 00 00 nop 54: a3 c0 rjmp .+326 ; 0x19c <__bad_interrupt> 56: 00 00 nop 58: a1 c0 rjmp .+322 ; 0x19c <__bad_interrupt> 5a: 00 00 nop 5c: 9f c0 rjmp .+318 ; 0x19c <__bad_interrupt> 5e: 00 00 nop 60: 9d c0 rjmp .+314 ; 0x19c <__bad_interrupt> 62: 00 00 nop 64: 9b c0 rjmp .+310 ; 0x19c <__bad_interrupt> 66: 00 00 nop 68: 99 c0 rjmp .+306 ; 0x19c <__bad_interrupt> 6a: 00 00 nop 6c: 97 c0 rjmp .+302 ; 0x19c <__bad_interrupt> 6e: 00 00 nop 70: 95 c0 rjmp .+298 ; 0x19c <__bad_interrupt> 72: 00 00 nop 74: 93 c0 rjmp .+294 ; 0x19c <__bad_interrupt> 76: 00 00 nop 78: 91 c0 rjmp .+290 ; 0x19c <__bad_interrupt> 7a: 00 00 nop 7c: 8f c0 rjmp .+286 ; 0x19c <__bad_interrupt> 7e: 00 00 nop 80: 8d c0 rjmp .+282 ; 0x19c <__bad_interrupt> 82: 00 00 nop 84: 8b c0 rjmp .+278 ; 0x19c <__bad_interrupt> 86: 00 00 nop 88: 89 c0 rjmp .+274 ; 0x19c <__bad_interrupt> 8a: 00 00 nop 8c: 87 c0 rjmp .+270 ; 0x19c <__bad_interrupt> 8e: 00 00 nop 90: 85 c0 rjmp .+266 ; 0x19c <__bad_interrupt> 92: 00 00 nop 94: 83 c0 rjmp .+262 ; 0x19c <__bad_interrupt> 96: 00 00 nop 98: 81 c0 rjmp .+258 ; 0x19c <__bad_interrupt> 9a: 00 00 nop 9c: 7f c0 rjmp .+254 ; 0x19c <__bad_interrupt> 9e: 00 00 nop a0: 7d c0 rjmp .+250 ; 0x19c <__bad_interrupt> a2: 00 00 nop a4: 7b c0 rjmp .+246 ; 0x19c <__bad_interrupt> a6: 00 00 nop a8: 79 c0 rjmp .+242 ; 0x19c <__bad_interrupt> aa: 00 00 nop 000000ac : ac: 1a 03 4c 00 55 00 46 00 41 00 20 00 43 00 48 00 ..L.U.F.A. .C.H. bc: 41 00 4e 00 47 00 45 00 44 00 00 00 A.N.G.E.D... 000000c8 : c8: 2a 03 44 00 65 00 61 00 6e 00 20 00 43 00 61 00 *.D.e.a.n. .C.a. d8: 6d 00 65 00 52 00 41 00 20 00 43 00 48 00 41 00 m.e.R.A. .C.H.A. e8: 4e 00 47 00 45 00 44 00 20 00 00 00 N.G.E.D. ... 000000f4 : f4: 04 03 09 04 .... 000000f8 : f8: 09 02 22 00 01 01 00 c0 32 09 04 00 00 01 03 00 ..".....2....... 108: 00 00 09 21 11 01 00 01 22 3a 00 07 05 81 03 08 ...!....":...... 118: 00 05 .. 0000011a : 11a: 12 01 10 01 00 00 00 08 eb 03 43 20 01 00 01 02 ..........C .... 12a: 00 01 .. 0000012c : 12c: 05 01 09 04 a1 01 09 01 a1 00 09 30 09 31 09 32 ...........0.1.2 13c: 16 9c ff 26 64 00 36 ff ff 46 01 00 95 03 75 08 ...&d.6..F....u. 14c: 81 02 c0 05 09 19 01 29 02 15 00 25 01 75 01 95 .......)...%.u.. 15c: 02 81 02 75 06 95 01 81 01 c0 ...u...... 00000166 <__ctors_end>: 166: 11 24 eor r1, r1 168: 1f be out 0x3f, r1 ; 63 16a: cf ef ldi r28, 0xFF ; 255 16c: da e0 ldi r29, 0x0A ; 10 16e: de bf out 0x3e, r29 ; 62 170: cd bf out 0x3d, r28 ; 61 00000172 <__do_copy_data>: 172: 11 e0 ldi r17, 0x01 ; 1 174: a0 e0 ldi r26, 0x00 ; 0 176: b1 e0 ldi r27, 0x01 ; 1 178: ee e3 ldi r30, 0x3E ; 62 17a: f0 e1 ldi r31, 0x10 ; 16 17c: 02 c0 rjmp .+4 ; 0x182 <__do_copy_data+0x10> 17e: 05 90 lpm r0, Z+ 180: 0d 92 st X+, r0 182: a0 31 cpi r26, 0x10 ; 16 184: b1 07 cpc r27, r17 186: d9 f7 brne .-10 ; 0x17e <__do_copy_data+0xc> 00000188 <__do_clear_bss>: 188: 21 e0 ldi r18, 0x01 ; 1 18a: a0 e1 ldi r26, 0x10 ; 16 18c: b1 e0 ldi r27, 0x01 ; 1 18e: 01 c0 rjmp .+2 ; 0x192 <.do_clear_bss_start> 00000190 <.do_clear_bss_loop>: 190: 1d 92 st X+, r1 00000192 <.do_clear_bss_start>: 192: a1 32 cpi r26, 0x21 ; 33 194: b2 07 cpc r27, r18 196: e1 f7 brne .-8 ; 0x190 <.do_clear_bss_loop> 198: 1a d0 rcall .+52 ; 0x1ce
19a: 4f c7 rjmp .+3742 ; 0x103a <_exit> 0000019c <__bad_interrupt>: 19c: 31 cf rjmp .-414 ; 0x0 <__vectors> 0000019e : /** Configures the board hardware and chip peripherals for the demo's functionality. */ void SetupHardware(void) { #if (ARCH == ARCH_AVR8) /* Disable watchdog if enabled by bootloader/fuses */ MCUSR &= ~(1 << WDRF); 19e: 84 b7 in r24, 0x34 ; 52 1a0: 87 7f andi r24, 0xF7 ; 247 1a2: 84 bf out 0x34, r24 ; 52 ); } else { uint8_t register temp_reg; __asm__ __volatile__ ( 1a4: 0f b6 in r0, 0x3f ; 63 1a6: f8 94 cli 1a8: a8 95 wdr 1aa: 80 91 60 00 lds r24, 0x0060 ; 0x800060 <__TEXT_REGION_LENGTH__+0x7e0060> 1ae: 88 61 ori r24, 0x18 ; 24 1b0: 80 93 60 00 sts 0x0060, r24 ; 0x800060 <__TEXT_REGION_LENGTH__+0x7e0060> 1b4: 10 92 60 00 sts 0x0060, r1 ; 0x800060 <__TEXT_REGION_LENGTH__+0x7e0060> 1b8: 0f be out 0x3f, r0 ; 63 from 1 to 129. Thus, one does not need to use \c clock_div_t type as argument. */ void clock_prescale_set(clock_div_t __x) { uint8_t __tmp = _BV(CLKPCE); __asm__ __volatile__ ( 1ba: 90 e0 ldi r25, 0x00 ; 0 1bc: 80 e8 ldi r24, 0x80 ; 128 1be: 0f b6 in r0, 0x3f ; 63 1c0: f8 94 cli 1c2: 80 93 61 00 sts 0x0061, r24 ; 0x800061 <__TEXT_REGION_LENGTH__+0x7e0061> 1c6: 90 93 61 00 sts 0x0061, r25 ; 0x800061 <__TEXT_REGION_LENGTH__+0x7e0061> 1ca: 0f be out 0x3f, r0 ; 63 /* Hardware Initialization */ Joystick_Init(); LEDs_Init(); Buttons_Init(); USB_Init(); 1cc: bb c2 rjmp .+1398 ; 0x744 000001ce
: /** Main program entry point. This routine contains the overall program flow, including initial * setup of all components and the main program loop. */ int main(void) { SetupHardware(); 1ce: e7 df rcall .-50 ; 0x19e static inline void GlobalInterruptEnable(void) { GCC_MEMORY_BARRIER(); #if (ARCH == ARCH_AVR8) sei(); 1d0: 78 94 sei LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); GlobalInterruptEnable(); for (;;) { HID_Device_USBTask(&Joystick_HID_Interface); 1d2: 80 e0 ldi r24, 0x00 ; 0 1d4: 91 e0 ldi r25, 0x01 ; 1 USB_USBTask(); 1d6: 5b d6 rcall .+3254 ; 0xe8e 1d8: fa d4 rcall .+2548 ; 0xbce 1da: fb cf rjmp .-10 ; 0x1d2 000001dc : 1dc: 08 95 ret 000001de : LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING); } /** Event handler for the library USB Disconnection event. */ void EVENT_USB_Device_Disconnect(void) { 1de: 08 95 ret 000001e0 : /** Event handler for the library USB Configuration Changed event. */ void EVENT_USB_Device_ConfigurationChanged(void) { bool ConfigSuccess = true; ConfigSuccess &= HID_Device_ConfigureEndpoints(&Joystick_HID_Interface); 1e0: 80 e0 ldi r24, 0x00 ; 0 1e2: 91 e0 ldi r25, 0x01 ; 1 1e4: 41 d6 rcall .+3202 ; 0xe68 break; case USB_INT_EORSTI: UDIEN |= (1 << EORSTE); break; case USB_INT_SOFI: UDIEN |= (1 << SOFE); 1e6: e2 ee ldi r30, 0xE2 ; 226 1e8: f0 e0 ldi r31, 0x00 ; 0 1ea: 80 81 ld r24, Z 1ec: 84 60 ori r24, 0x04 ; 4 1ee: 80 83 st Z, r24 1f0: 08 95 ret 000001f2 : } /** Event handler for the library USB Control Request reception event. */ void EVENT_USB_Device_ControlRequest(void) { HID_Device_ProcessControlRequest(&Joystick_HID_Interface); 1f2: 80 e0 ldi r24, 0x00 ; 0 1f4: 91 e0 ldi r25, 0x01 ; 1 1f6: 05 c5 rjmp .+2570 ; 0xc02 000001f8 : * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class configuration and state. */ static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) ATTR_ALWAYS_INLINE ATTR_NON_NULL_PTR_ARG(1); static inline void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) { if (HIDInterfaceInfo->State.IdleMSRemaining) 1f8: 80 91 0e 01 lds r24, 0x010E ; 0x80010e 1fc: 90 91 0f 01 lds r25, 0x010F ; 0x80010f 200: 00 97 sbiw r24, 0x00 ; 0 202: 29 f0 breq .+10 ; 0x20e HIDInterfaceInfo->State.IdleMSRemaining--; 204: 01 97 sbiw r24, 0x01 ; 1 206: 90 93 0f 01 sts 0x010F, r25 ; 0x80010f 20a: 80 93 0e 01 sts 0x010E, r24 ; 0x80010e 20e: 08 95 ret 00000210 : bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize) { 210: 0f 93 push r16 212: 1f 93 push r17 JoystickReport->Button |= (1 << 1); if (ButtonStatus_LCL & BUTTONS_BUTTON1) JoystickReport->Button |= (1 << 0); *ReportSize = sizeof(USB_JoystickReport_Data_t); 214: 84 e0 ldi r24, 0x04 ; 4 216: 90 e0 ldi r25, 0x00 ; 0 218: f8 01 movw r30, r16 21a: 91 83 std Z+1, r25 ; 0x01 21c: 80 83 st Z, r24 return false; } 21e: 80 e0 ldi r24, 0x00 ; 0 220: 1f 91 pop r17 222: 0f 91 pop r16 224: 08 95 ret 00000226 : void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize) { 226: 08 95 ret 00000228 : const uint8_t DescriptorNumber = (wValue & 0xFF); const void* Address = NULL; uint16_t Size = NO_DESCRIPTOR; switch (DescriptorType) 228: 29 2f mov r18, r25 22a: 33 27 eor r19, r19 22c: 23 30 cpi r18, 0x03 ; 3 22e: 31 05 cpc r19, r1 230: e1 f0 breq .+56 ; 0x26a 232: 58 f4 brcc .+22 ; 0x24a 234: 21 30 cpi r18, 0x01 ; 1 236: 31 05 cpc r19, r1 238: 99 f0 breq .+38 ; 0x260 23a: 22 30 cpi r18, 0x02 ; 2 23c: 31 05 cpc r19, r1 23e: 69 f5 brne .+90 ; 0x29a Address = &DeviceDescriptor; Size = sizeof(USB_Descriptor_Device_t); break; case DTYPE_Configuration: Address = &ConfigurationDescriptor; Size = sizeof(USB_Descriptor_Configuration_t); 240: 82 e2 ldi r24, 0x22 ; 34 242: 90 e0 ldi r25, 0x00 ; 0 case DTYPE_Device: Address = &DeviceDescriptor; Size = sizeof(USB_Descriptor_Device_t); break; case DTYPE_Configuration: Address = &ConfigurationDescriptor; 244: 28 ef ldi r18, 0xF8 ; 248 246: 30 e0 ldi r19, 0x00 ; 0 Size = sizeof(USB_Descriptor_Configuration_t); break; 248: 2c c0 rjmp .+88 ; 0x2a2 const uint8_t DescriptorNumber = (wValue & 0xFF); const void* Address = NULL; uint16_t Size = NO_DESCRIPTOR; switch (DescriptorType) 24a: 21 32 cpi r18, 0x21 ; 33 24c: 31 05 cpc r19, r1 24e: 01 f1 breq .+64 ; 0x290 250: 22 32 cpi r18, 0x22 ; 34 252: 31 05 cpc r19, r1 254: 11 f5 brne .+68 ; 0x29a Address = &ConfigurationDescriptor.HID_JoystickHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; case HID_DTYPE_Report: Address = &JoystickReport; Size = sizeof(JoystickReport); 256: 8a e3 ldi r24, 0x3A ; 58 258: 90 e0 ldi r25, 0x00 ; 0 case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_JoystickHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; case HID_DTYPE_Report: Address = &JoystickReport; 25a: 2c e2 ldi r18, 0x2C ; 44 25c: 31 e0 ldi r19, 0x01 ; 1 Size = sizeof(JoystickReport); break; 25e: 21 c0 rjmp .+66 ; 0x2a2 switch (DescriptorType) { case DTYPE_Device: Address = &DeviceDescriptor; Size = sizeof(USB_Descriptor_Device_t); 260: 82 e1 ldi r24, 0x12 ; 18 262: 90 e0 ldi r25, 0x00 ; 0 uint16_t Size = NO_DESCRIPTOR; switch (DescriptorType) { case DTYPE_Device: Address = &DeviceDescriptor; 264: 2a e1 ldi r18, 0x1A ; 26 266: 31 e0 ldi r19, 0x01 ; 1 268: 1c c0 rjmp .+56 ; 0x2a2 case DTYPE_Configuration: Address = &ConfigurationDescriptor; Size = sizeof(USB_Descriptor_Configuration_t); break; case DTYPE_String: switch (DescriptorNumber) 26a: 99 27 eor r25, r25 26c: 81 30 cpi r24, 0x01 ; 1 26e: 91 05 cpc r25, r1 270: 49 f0 breq .+18 ; 0x284 272: 28 f0 brcs .+10 ; 0x27e 274: 02 97 sbiw r24, 0x02 ; 2 276: 89 f4 brne .+34 ; 0x29a Address = &ManufacturerString; Size = pgm_read_byte(&ManufacturerString.Header.Size); break; case STRING_ID_Product: Address = &ProductString; Size = pgm_read_byte(&ProductString.Header.Size); 278: ec ea ldi r30, 0xAC ; 172 27a: f0 e0 ldi r31, 0x00 ; 0 27c: 05 c0 rjmp .+10 ; 0x288 case DTYPE_String: switch (DescriptorNumber) { case STRING_ID_Language: Address = &LanguageString; Size = pgm_read_byte(&LanguageString.Header.Size); 27e: e4 ef ldi r30, 0xF4 ; 244 280: f0 e0 ldi r31, 0x00 ; 0 282: 02 c0 rjmp .+4 ; 0x288 break; case STRING_ID_Manufacturer: Address = &ManufacturerString; Size = pgm_read_byte(&ManufacturerString.Header.Size); 284: e8 ec ldi r30, 0xC8 ; 200 286: f0 e0 ldi r31, 0x00 ; 0 break; case STRING_ID_Product: Address = &ProductString; Size = pgm_read_byte(&ProductString.Header.Size); 288: 84 91 lpm r24, Z 28a: 90 e0 ldi r25, 0x00 ; 0 case STRING_ID_Manufacturer: Address = &ManufacturerString; Size = pgm_read_byte(&ManufacturerString.Header.Size); break; case STRING_ID_Product: Address = &ProductString; 28c: 9f 01 movw r18, r30 Size = pgm_read_byte(&ProductString.Header.Size); break; 28e: 09 c0 rjmp .+18 ; 0x2a2 } break; case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_JoystickHID; Size = sizeof(USB_HID_Descriptor_HID_t); 290: 89 e0 ldi r24, 0x09 ; 9 292: 90 e0 ldi r25, 0x00 ; 0 break; } break; case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_JoystickHID; 294: 2a e0 ldi r18, 0x0A ; 10 296: 31 e0 ldi r19, 0x01 ; 1 Size = sizeof(USB_HID_Descriptor_HID_t); break; 298: 04 c0 rjmp .+8 ; 0x2a2 { const uint8_t DescriptorType = (wValue >> 8); const uint8_t DescriptorNumber = (wValue & 0xFF); const void* Address = NULL; uint16_t Size = NO_DESCRIPTOR; 29a: 80 e0 ldi r24, 0x00 ; 0 29c: 90 e0 ldi r25, 0x00 ; 0 const void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); const uint8_t DescriptorNumber = (wValue & 0xFF); const void* Address = NULL; 29e: 20 e0 ldi r18, 0x00 ; 0 2a0: 30 e0 ldi r19, 0x00 ; 0 Address = &JoystickReport; Size = sizeof(JoystickReport); break; } *DescriptorAddress = Address; 2a2: fa 01 movw r30, r20 2a4: 31 83 std Z+1, r19 ; 0x01 2a6: 20 83 st Z, r18 return Size; } 2a8: 08 95 ret 000002aa : else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) return ENDPOINT_RWCSTREAM_BusSuspended; } return ENDPOINT_RWCSTREAM_NoError; } 2aa: cf 92 push r12 2ac: df 92 push r13 2ae: ef 92 push r14 2b0: ff 92 push r15 2b2: 0f 93 push r16 2b4: 1f 93 push r17 2b6: cf 93 push r28 2b8: df 93 push r29 2ba: ec 01 movw r28, r24 2bc: 8b 01 movw r16, r22 2be: 7a 01 movw r14, r20 2c0: ce d1 rcall .+924 ; 0x65e 2c2: 81 11 cpse r24, r1 2c4: 33 c0 rjmp .+102 ; 0x32c 2c6: e1 14 cp r14, r1 2c8: f1 04 cpc r15, r1 2ca: 39 f0 breq .+14 ; 0x2da 2cc: f7 01 movw r30, r14 2ce: 80 81 ld r24, Z 2d0: 91 81 ldd r25, Z+1 ; 0x01 2d2: 08 1b sub r16, r24 2d4: 19 0b sbc r17, r25 2d6: c8 0f add r28, r24 2d8: d9 1f adc r29, r25 2da: c1 2c mov r12, r1 2dc: d1 2c mov r13, r1 2de: 01 15 cp r16, r1 2e0: 11 05 cpc r17, r1 2e2: 19 f1 breq .+70 ; 0x32a 2e4: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 2e8: 85 fd sbrc r24, 5 2ea: 16 c0 rjmp .+44 ; 0x318 2ec: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 2f0: 8e 77 andi r24, 0x7E ; 126 2f2: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 2f6: 6b d4 rcall .+2262 ; 0xbce 2f8: e1 14 cp r14, r1 2fa: f1 04 cpc r15, r1 2fc: 49 f0 breq .+18 ; 0x310 2fe: f7 01 movw r30, r14 300: 80 81 ld r24, Z 302: 91 81 ldd r25, Z+1 ; 0x01 304: c8 0e add r12, r24 306: d9 1e adc r13, r25 308: d1 82 std Z+1, r13 ; 0x01 30a: c0 82 st Z, r12 30c: 85 e0 ldi r24, 0x05 ; 5 30e: 0e c0 rjmp .+28 ; 0x32c 310: a6 d1 rcall .+844 ; 0x65e 312: 88 23 and r24, r24 314: 21 f3 breq .-56 ; 0x2de 316: 0a c0 rjmp .+20 ; 0x32c 318: 89 91 ld r24, Y+ 31a: 80 93 f1 00 sts 0x00F1, r24 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> 31e: 01 50 subi r16, 0x01 ; 1 320: 11 09 sbc r17, r1 322: ff ef ldi r31, 0xFF ; 255 324: cf 1a sub r12, r31 326: df 0a sbc r13, r31 328: da cf rjmp .-76 ; 0x2de 32a: 80 e0 ldi r24, 0x00 ; 0 32c: df 91 pop r29 32e: cf 91 pop r28 330: 1f 91 pop r17 332: 0f 91 pop r16 334: ff 90 pop r15 336: ef 90 pop r14 338: df 90 pop r13 33a: cf 90 pop r12 33c: 08 95 ret 0000033e : 33e: 20 91 1f 01 lds r18, 0x011F ; 0x80011f 342: 30 91 20 01 lds r19, 0x0120 ; 0x800120 346: 26 17 cp r18, r22 348: 37 07 cpc r19, r23 34a: 48 f0 brcs .+18 ; 0x35e 34c: 61 15 cp r22, r1 34e: 71 05 cpc r23, r1 350: 39 f4 brne .+14 ; 0x360 352: 20 91 e8 00 lds r18, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 356: 2e 77 andi r18, 0x7E ; 126 358: 20 93 e8 00 sts 0x00E8, r18 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 35c: 01 c0 rjmp .+2 ; 0x360 35e: b9 01 movw r22, r18 360: fc 01 movw r30, r24 362: 20 e0 ldi r18, 0x00 ; 0 364: 61 15 cp r22, r1 366: 71 05 cpc r23, r1 368: 79 f1 breq .+94 ; 0x3c8 36a: 80 91 18 01 lds r24, 0x0118 ; 0x800118 36e: 88 23 and r24, r24 370: f1 f1 breq .+124 ; 0x3ee 372: 85 30 cpi r24, 0x05 ; 5 374: f1 f1 breq .+124 ; 0x3f2 376: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 37a: 83 fd sbrc r24, 3 37c: 3c c0 rjmp .+120 ; 0x3f6 37e: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 382: 82 fd sbrc r24, 2 384: 2e c0 rjmp .+92 ; 0x3e2 386: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 38a: 80 ff sbrs r24, 0 38c: eb cf rjmp .-42 ; 0x364 38e: 20 91 f3 00 lds r18, 0x00F3 ; 0x8000f3 <__TEXT_REGION_LENGTH__+0x7e00f3> 392: 80 91 f2 00 lds r24, 0x00F2 ; 0x8000f2 <__TEXT_REGION_LENGTH__+0x7e00f2> 396: 90 e0 ldi r25, 0x00 ; 0 398: 92 2b or r25, r18 39a: 61 15 cp r22, r1 39c: 71 05 cpc r23, r1 39e: 51 f0 breq .+20 ; 0x3b4 3a0: 88 30 cpi r24, 0x08 ; 8 3a2: 91 05 cpc r25, r1 3a4: 38 f4 brcc .+14 ; 0x3b4 3a6: 21 91 ld r18, Z+ 3a8: 20 93 f1 00 sts 0x00F1, r18 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> 3ac: 61 50 subi r22, 0x01 ; 1 3ae: 71 09 sbc r23, r1 3b0: 01 96 adiw r24, 0x01 ; 1 3b2: f3 cf rjmp .-26 ; 0x39a 3b4: 21 e0 ldi r18, 0x01 ; 1 3b6: 08 97 sbiw r24, 0x08 ; 8 3b8: 09 f0 breq .+2 ; 0x3bc 3ba: 20 e0 ldi r18, 0x00 ; 0 3bc: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 3c0: 8e 77 andi r24, 0x7E ; 126 3c2: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 3c6: ce cf rjmp .-100 ; 0x364 3c8: 21 11 cpse r18, r1 3ca: cf cf rjmp .-98 ; 0x36a 3cc: 0a c0 rjmp .+20 ; 0x3e2 3ce: 80 91 18 01 lds r24, 0x0118 ; 0x800118 3d2: 88 23 and r24, r24 3d4: 61 f0 breq .+24 ; 0x3ee 3d6: 85 30 cpi r24, 0x05 ; 5 3d8: 61 f0 breq .+24 ; 0x3f2 3da: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 3de: 83 fd sbrc r24, 3 3e0: 0a c0 rjmp .+20 ; 0x3f6 3e2: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 3e6: 82 ff sbrs r24, 2 3e8: f2 cf rjmp .-28 ; 0x3ce 3ea: 80 e0 ldi r24, 0x00 ; 0 3ec: 08 95 ret 3ee: 82 e0 ldi r24, 0x02 ; 2 3f0: 08 95 ret 3f2: 83 e0 ldi r24, 0x03 ; 3 3f4: 08 95 ret 3f6: 81 e0 ldi r24, 0x01 ; 1 3f8: 08 95 ret 000003fa : 3fa: 61 15 cp r22, r1 3fc: 71 05 cpc r23, r1 3fe: 29 f4 brne .+10 ; 0x40a <__LOCK_REGION_LENGTH__+0xa> 400: 20 91 e8 00 lds r18, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 404: 2b 77 andi r18, 0x7B ; 123 406: 20 93 e8 00 sts 0x00E8, r18 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 40a: fc 01 movw r30, r24 40c: 61 15 cp r22, r1 40e: 71 05 cpc r23, r1 410: 41 f1 breq .+80 ; 0x462 <__LOCK_REGION_LENGTH__+0x62> 412: 80 91 18 01 lds r24, 0x0118 ; 0x800118 416: 88 23 and r24, r24 418: 61 f1 breq .+88 ; 0x472 <__LOCK_REGION_LENGTH__+0x72> 41a: 85 30 cpi r24, 0x05 ; 5 41c: 61 f1 breq .+88 ; 0x476 <__LOCK_REGION_LENGTH__+0x76> 41e: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 422: 83 fd sbrc r24, 3 424: 24 c0 rjmp .+72 ; 0x46e <__LOCK_REGION_LENGTH__+0x6e> 426: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 42a: 82 ff sbrs r24, 2 42c: ef cf rjmp .-34 ; 0x40c <__LOCK_REGION_LENGTH__+0xc> 42e: 20 91 f3 00 lds r18, 0x00F3 ; 0x8000f3 <__TEXT_REGION_LENGTH__+0x7e00f3> 432: 80 91 f2 00 lds r24, 0x00F2 ; 0x8000f2 <__TEXT_REGION_LENGTH__+0x7e00f2> 436: 90 e0 ldi r25, 0x00 ; 0 438: 92 2b or r25, r18 43a: 89 2b or r24, r25 43c: 31 f0 breq .+12 ; 0x44a <__LOCK_REGION_LENGTH__+0x4a> 43e: 80 91 f1 00 lds r24, 0x00F1 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> 442: 81 93 st Z+, r24 444: 61 50 subi r22, 0x01 ; 1 446: 71 09 sbc r23, r1 448: 91 f7 brne .-28 ; 0x42e <__LOCK_REGION_LENGTH__+0x2e> 44a: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 44e: 8b 77 andi r24, 0x7B ; 123 450: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 454: db cf rjmp .-74 ; 0x40c <__LOCK_REGION_LENGTH__+0xc> 456: 80 91 18 01 lds r24, 0x0118 ; 0x800118 45a: 88 23 and r24, r24 45c: 51 f0 breq .+20 ; 0x472 <__LOCK_REGION_LENGTH__+0x72> 45e: 85 30 cpi r24, 0x05 ; 5 460: 51 f0 breq .+20 ; 0x476 <__LOCK_REGION_LENGTH__+0x76> 462: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 466: 80 ff sbrs r24, 0 468: f6 cf rjmp .-20 ; 0x456 <__LOCK_REGION_LENGTH__+0x56> 46a: 80 e0 ldi r24, 0x00 ; 0 46c: 08 95 ret 46e: 81 e0 ldi r24, 0x01 ; 1 470: 08 95 ret 472: 82 e0 ldi r24, 0x02 ; 2 474: 08 95 ret 476: 83 e0 ldi r24, 0x03 ; 3 478: 08 95 ret 0000047a : uint16_t Length) { uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); bool LastPacketFull = false; if (Length > USB_ControlRequest.wLength) 47a: 20 91 1f 01 lds r18, 0x011F ; 0x80011f 47e: 30 91 20 01 lds r19, 0x0120 ; 0x800120 482: 26 17 cp r18, r22 484: 37 07 cpc r19, r23 486: 48 f0 brcs .+18 ; 0x49a Length = USB_ControlRequest.wLength; else if (!(Length)) 488: 61 15 cp r22, r1 48a: 71 05 cpc r23, r1 48c: 39 f4 brne .+14 ; 0x49c */ static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearIN(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << TXINI) | (1 << FIFOCON)); 48e: 20 91 e8 00 lds r18, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 492: 2e 77 andi r18, 0x7E ; 126 494: 20 93 e8 00 sts 0x00E8, r18 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 498: 01 c0 rjmp .+2 ; 0x49c 49a: b9 01 movw r22, r18 49c: fc 01 movw r30, r24 49e: 20 e0 ldi r18, 0x00 ; 0 Endpoint_ClearIN(); while (Length || LastPacketFull) 4a0: 61 15 cp r22, r1 4a2: 71 05 cpc r23, r1 4a4: 91 f1 breq .+100 ; 0x50a { uint8_t USB_DeviceState_LCL = USB_DeviceState; 4a6: 80 91 18 01 lds r24, 0x0118 ; 0x800118 if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 4aa: 88 23 and r24, r24 4ac: 09 f4 brne .+2 ; 0x4b0 4ae: 40 c0 rjmp .+128 ; 0x530 return ENDPOINT_RWCSTREAM_DeviceDisconnected; else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 4b0: 85 30 cpi r24, 0x05 ; 5 4b2: 09 f4 brne .+2 ; 0x4b6 4b4: 3f c0 rjmp .+126 ; 0x534 * \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise. */ static inline bool Endpoint_IsSETUPReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsSETUPReceived(void) { return ((UEINTX & (1 << RXSTPI)) ? true : false); 4b6: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> return ENDPOINT_RWCSTREAM_BusSuspended; else if (Endpoint_IsSETUPReceived()) 4ba: 83 fd sbrc r24, 3 4bc: 3d c0 rjmp .+122 ; 0x538 * \return Boolean \c true if current endpoint is has received an OUT packet, \c false otherwise. */ static inline bool Endpoint_IsOUTReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsOUTReceived(void) { return ((UEINTX & (1 << RXOUTI)) ? true : false); 4be: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> return ENDPOINT_RWCSTREAM_HostAborted; else if (Endpoint_IsOUTReceived()) 4c2: 82 fd sbrc r24, 2 4c4: 2f c0 rjmp .+94 ; 0x524 * \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise. */ static inline bool Endpoint_IsINReady(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsINReady(void) { return ((UEINTX & (1 << TXINI)) ? true : false); 4c6: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> break; if (Endpoint_IsINReady()) 4ca: 80 ff sbrs r24, 0 4cc: e9 cf rjmp .-46 ; 0x4a0 static inline uint16_t Endpoint_BytesInEndpoint(void) { #if (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)) return UEBCX; #elif defined(USB_SERIES_4_AVR) return (((uint16_t)UEBCHX << 8) | UEBCLX); 4ce: 20 91 f3 00 lds r18, 0x00F3 ; 0x8000f3 <__TEXT_REGION_LENGTH__+0x7e00f3> 4d2: 80 91 f2 00 lds r24, 0x00F2 ; 0x8000f2 <__TEXT_REGION_LENGTH__+0x7e00f2> 4d6: 90 e0 ldi r25, 0x00 ; 0 4d8: 92 2b or r25, r18 { uint16_t BytesInEndpoint = Endpoint_BytesInEndpoint(); while (Length && (BytesInEndpoint < USB_Device_ControlEndpointSize)) 4da: 61 15 cp r22, r1 4dc: 71 05 cpc r23, r1 4de: 59 f0 breq .+22 ; 0x4f6 4e0: 88 30 cpi r24, 0x08 ; 8 4e2: 91 05 cpc r25, r1 4e4: 40 f4 brcc .+16 ; 0x4f6 { TEMPLATE_TRANSFER_BYTE(DataStream); 4e6: 24 91 lpm r18, Z * \param[in] Data Data to write into the the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_8(const uint8_t Data) { UEDATX = Data; 4e8: 20 93 f1 00 sts 0x00F1, r18 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> TEMPLATE_BUFFER_MOVE(DataStream, 1); 4ec: 31 96 adiw r30, 0x01 ; 1 Length--; 4ee: 61 50 subi r22, 0x01 ; 1 4f0: 71 09 sbc r23, r1 BytesInEndpoint++; 4f2: 01 96 adiw r24, 0x01 ; 1 4f4: f2 cf rjmp .-28 ; 0x4da } LastPacketFull = (BytesInEndpoint == USB_Device_ControlEndpointSize); 4f6: 21 e0 ldi r18, 0x01 ; 1 4f8: 08 97 sbiw r24, 0x08 ; 8 4fa: 09 f0 breq .+2 ; 0x4fe 4fc: 20 e0 ldi r18, 0x00 ; 0 */ static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearIN(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << TXINI) | (1 << FIFOCON)); 4fe: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 502: 8e 77 andi r24, 0x7E ; 126 504: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 508: cb cf rjmp .-106 ; 0x4a0 if (Length > USB_ControlRequest.wLength) Length = USB_ControlRequest.wLength; else if (!(Length)) Endpoint_ClearIN(); while (Length || LastPacketFull) 50a: 21 11 cpse r18, r1 50c: cc cf rjmp .-104 ; 0x4a6 50e: 0a c0 rjmp .+20 ; 0x524 } } while (!(Endpoint_IsOUTReceived())) { uint8_t USB_DeviceState_LCL = USB_DeviceState; 510: 80 91 18 01 lds r24, 0x0118 ; 0x800118 if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 514: 88 23 and r24, r24 516: 61 f0 breq .+24 ; 0x530 return ENDPOINT_RWCSTREAM_DeviceDisconnected; else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 518: 85 30 cpi r24, 0x05 ; 5 51a: 61 f0 breq .+24 ; 0x534 * \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise. */ static inline bool Endpoint_IsSETUPReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsSETUPReceived(void) { return ((UEINTX & (1 << RXSTPI)) ? true : false); 51c: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> return ENDPOINT_RWCSTREAM_BusSuspended; else if (Endpoint_IsSETUPReceived()) 520: 83 fd sbrc r24, 3 522: 0a c0 rjmp .+20 ; 0x538 * \return Boolean \c true if current endpoint is has received an OUT packet, \c false otherwise. */ static inline bool Endpoint_IsOUTReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsOUTReceived(void) { return ((UEINTX & (1 << RXOUTI)) ? true : false); 524: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> LastPacketFull = (BytesInEndpoint == USB_Device_ControlEndpointSize); Endpoint_ClearIN(); } } while (!(Endpoint_IsOUTReceived())) 528: 82 ff sbrs r24, 2 52a: f2 cf rjmp .-28 ; 0x510 return ENDPOINT_RWCSTREAM_BusSuspended; else if (Endpoint_IsSETUPReceived()) return ENDPOINT_RWCSTREAM_HostAborted; } return ENDPOINT_RWCSTREAM_NoError; 52c: 80 e0 ldi r24, 0x00 ; 0 52e: 08 95 ret while (Length || LastPacketFull) { uint8_t USB_DeviceState_LCL = USB_DeviceState; if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) return ENDPOINT_RWCSTREAM_DeviceDisconnected; 530: 82 e0 ldi r24, 0x02 ; 2 532: 08 95 ret else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) return ENDPOINT_RWCSTREAM_BusSuspended; 534: 83 e0 ldi r24, 0x03 ; 3 536: 08 95 ret else if (Endpoint_IsSETUPReceived()) return ENDPOINT_RWCSTREAM_HostAborted; 538: 81 e0 ldi r24, 0x01 ; 1 else if (Endpoint_IsSETUPReceived()) return ENDPOINT_RWCSTREAM_HostAborted; } return ENDPOINT_RWCSTREAM_NoError; } 53a: 08 95 ret 0000053c : UEIENX = 0; UEINTX = 0; UECFG1X = 0; Endpoint_DisableEndpoint(); } } 53c: 98 2f mov r25, r24 53e: 97 30 cpi r25, 0x07 ; 7 540: 68 f5 brcc .+90 ; 0x59c 542: 90 93 e9 00 sts 0x00E9, r25 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> 546: 98 17 cp r25, r24 548: 39 f0 breq .+14 ; 0x558 54a: 70 91 ec 00 lds r23, 0x00EC ; 0x8000ec <__TEXT_REGION_LENGTH__+0x7e00ec> 54e: 20 91 ed 00 lds r18, 0x00ED ; 0x8000ed <__TEXT_REGION_LENGTH__+0x7e00ed> 552: 50 91 f0 00 lds r21, 0x00F0 ; 0x8000f0 <__TEXT_REGION_LENGTH__+0x7e00f0> 556: 03 c0 rjmp .+6 ; 0x55e 558: 24 2f mov r18, r20 55a: 76 2f mov r23, r22 55c: 50 e0 ldi r21, 0x00 ; 0 55e: 21 fd sbrc r18, 1 560: 02 c0 rjmp .+4 ; 0x566 562: 9f 5f subi r25, 0xFF ; 255 564: ec cf rjmp .-40 ; 0x53e 566: 30 91 eb 00 lds r19, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> 56a: 3e 7f andi r19, 0xFE ; 254 56c: 30 93 eb 00 sts 0x00EB, r19 ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> 570: 30 91 ed 00 lds r19, 0x00ED ; 0x8000ed <__TEXT_REGION_LENGTH__+0x7e00ed> 574: 3d 7f andi r19, 0xFD ; 253 576: 30 93 ed 00 sts 0x00ED, r19 ; 0x8000ed <__TEXT_REGION_LENGTH__+0x7e00ed> 57a: 30 91 eb 00 lds r19, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> 57e: 31 60 ori r19, 0x01 ; 1 580: 30 93 eb 00 sts 0x00EB, r19 ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> 584: 70 93 ec 00 sts 0x00EC, r23 ; 0x8000ec <__TEXT_REGION_LENGTH__+0x7e00ec> 588: 20 93 ed 00 sts 0x00ED, r18 ; 0x8000ed <__TEXT_REGION_LENGTH__+0x7e00ed> 58c: 50 93 f0 00 sts 0x00F0, r21 ; 0x8000f0 <__TEXT_REGION_LENGTH__+0x7e00f0> 590: 20 91 ee 00 lds r18, 0x00EE ; 0x8000ee <__TEXT_REGION_LENGTH__+0x7e00ee> 594: 27 fd sbrc r18, 7 596: e5 cf rjmp .-54 ; 0x562 598: 80 e0 ldi r24, 0x00 ; 0 59a: 08 95 ret 59c: 8f 70 andi r24, 0x0F ; 15 59e: 80 93 e9 00 sts 0x00E9, r24 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> 5a2: 81 e0 ldi r24, 0x01 ; 1 5a4: 08 95 ret 000005a6 : 5a6: 0f 93 push r16 5a8: 1f 93 push r17 5aa: cf 93 push r28 5ac: df 93 push r29 5ae: 06 2f mov r16, r22 5b0: ec 01 movw r28, r24 5b2: 10 e0 ldi r17, 0x00 ; 0 5b4: 10 17 cp r17, r16 5b6: 71 f1 breq .+92 ; 0x614 5b8: 68 81 ld r22, Y 5ba: 61 11 cpse r22, r1 5bc: 03 c0 rjmp .+6 ; 0x5c4 5be: 1f 5f subi r17, 0xFF ; 255 5c0: 25 96 adiw r28, 0x05 ; 5 5c2: f8 cf rjmp .-16 ; 0x5b4 5c4: 2c 81 ldd r18, Y+4 ; 0x04 5c6: a9 81 ldd r26, Y+1 ; 0x01 5c8: ba 81 ldd r27, Y+2 ; 0x02 5ca: 9b 81 ldd r25, Y+3 ; 0x03 5cc: 86 2f mov r24, r22 5ce: 8f 70 andi r24, 0x0F ; 15 5d0: 87 30 cpi r24, 0x07 ; 7 5d2: 10 f0 brcs .+4 ; 0x5d8 5d4: 80 e0 ldi r24, 0x00 ; 0 5d6: 1f c0 rjmp .+62 ; 0x616 5d8: 22 30 cpi r18, 0x02 ; 2 5da: 10 f4 brcc .+4 ; 0x5e0 5dc: 42 e0 ldi r20, 0x02 ; 2 5de: 01 c0 rjmp .+2 ; 0x5e2 5e0: 46 e0 ldi r20, 0x06 ; 6 5e2: e8 e0 ldi r30, 0x08 ; 8 5e4: f0 e0 ldi r31, 0x00 ; 0 5e6: 20 e0 ldi r18, 0x00 ; 0 5e8: ea 17 cp r30, r26 5ea: fb 07 cpc r31, r27 5ec: 20 f4 brcc .+8 ; 0x5f6 5ee: 2f 5f subi r18, 0xFF ; 255 5f0: ee 0f add r30, r30 5f2: ff 1f adc r31, r31 5f4: f9 cf rjmp .-14 ; 0x5e8 5f6: 22 95 swap r18 5f8: 20 7f andi r18, 0xF0 ; 240 5fa: 42 2b or r20, r18 5fc: 50 e4 ldi r21, 0x40 ; 64 5fe: 95 9f mul r25, r21 600: 90 01 movw r18, r0 602: 11 24 eor r1, r1 604: 66 1f adc r22, r22 606: 66 27 eor r22, r22 608: 66 1f adc r22, r22 60a: 62 2b or r22, r18 60c: 97 df rcall .-210 ; 0x53c 60e: 81 11 cpse r24, r1 610: d6 cf rjmp .-84 ; 0x5be 612: e0 cf rjmp .-64 ; 0x5d4 614: 81 e0 ldi r24, 0x01 ; 1 616: df 91 pop r29 618: cf 91 pop r28 61a: 1f 91 pop r17 61c: 0f 91 pop r16 61e: 08 95 ret 00000620 : void Endpoint_ClearStatusStage(void) { if (USB_ControlRequest.bmRequestType & REQDIR_DEVICETOHOST) 620: 80 91 19 01 lds r24, 0x0119 ; 0x800119 624: 87 ff sbrs r24, 7 626: 11 c0 rjmp .+34 ; 0x64a * \return Boolean \c true if current endpoint is has received an OUT packet, \c false otherwise. */ static inline bool Endpoint_IsOUTReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsOUTReceived(void) { return ((UEINTX & (1 << RXOUTI)) ? true : false); 628: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> { while (!(Endpoint_IsOUTReceived())) 62c: 82 fd sbrc r24, 2 62e: 05 c0 rjmp .+10 ; 0x63a { if (USB_DeviceState == DEVICE_STATE_Unattached) 630: 80 91 18 01 lds r24, 0x0118 ; 0x800118 634: 81 11 cpse r24, r1 636: f8 cf rjmp .-16 ; 0x628 638: 11 c0 rjmp .+34 ; 0x65c */ static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearOUT(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << RXOUTI) | (1 << FIFOCON)); 63a: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 63e: 8b 77 andi r24, 0x7B ; 123 640: 0b c0 rjmp .+22 ; 0x658 } else { while (!(Endpoint_IsINReady())) { if (USB_DeviceState == DEVICE_STATE_Unattached) 642: 80 91 18 01 lds r24, 0x0118 ; 0x800118 646: 88 23 and r24, r24 648: 49 f0 breq .+18 ; 0x65c * \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise. */ static inline bool Endpoint_IsINReady(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsINReady(void) { return ((UEINTX & (1 << TXINI)) ? true : false); 64a: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> Endpoint_ClearOUT(); } else { while (!(Endpoint_IsINReady())) 64e: 80 ff sbrs r24, 0 650: f8 cf rjmp .-16 ; 0x642 */ static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearIN(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << TXINI) | (1 << FIFOCON)); 652: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 656: 8e 77 andi r24, 0x7E ; 126 658: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 65c: 08 95 ret 0000065e : * \return Current USB frame number from the USB controller. */ static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; static inline uint16_t USB_Device_GetFrameNumber(void) { return UDFNUM; 65e: 20 91 e4 00 lds r18, 0x00E4 ; 0x8000e4 <__TEXT_REGION_LENGTH__+0x7e00e4> 662: 30 91 e5 00 lds r19, 0x00E5 ; 0x8000e5 <__TEXT_REGION_LENGTH__+0x7e00e5> 666: 95 e6 ldi r25, 0x65 ; 101 * \return The currently selected endpoint's direction, as a \c ENDPOINT_DIR_* mask. */ static inline uint8_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_GetEndpointDirection(void) { return (UECFG0X & (1 << EPDIR)) ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT; 668: 40 91 ec 00 lds r20, 0x00EC ; 0x8000ec <__TEXT_REGION_LENGTH__+0x7e00ec> 66c: 84 2f mov r24, r20 66e: 81 70 andi r24, 0x01 ; 1 670: 40 ff sbrs r20, 0 672: 23 c0 rjmp .+70 ; 0x6ba * \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise. */ static inline bool Endpoint_IsINReady(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsINReady(void) { return ((UEINTX & (1 << TXINI)) ? true : false); 674: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> for (;;) { if (Endpoint_GetEndpointDirection() == ENDPOINT_DIR_IN) { if (Endpoint_IsINReady()) 678: 80 fd sbrc r24, 0 67a: 1d c0 rjmp .+58 ; 0x6b6 { if (Endpoint_IsOUTReceived()) return ENDPOINT_READYWAIT_NoError; } uint8_t USB_DeviceState_LCL = USB_DeviceState; 67c: 80 91 18 01 lds r24, 0x0118 ; 0x800118 if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) 680: 88 23 and r24, r24 682: 99 f0 breq .+38 ; 0x6aa return ENDPOINT_READYWAIT_DeviceDisconnected; else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) 684: 85 30 cpi r24, 0x05 ; 5 686: 99 f0 breq .+38 ; 0x6ae * \return Boolean \c true if the currently selected endpoint is stalled, \c false otherwise. */ static inline bool Endpoint_IsStalled(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsStalled(void) { return ((UECONX & (1 << STALLRQ)) ? true : false); 688: 80 91 eb 00 lds r24, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> return ENDPOINT_READYWAIT_BusSuspended; else if (Endpoint_IsStalled()) 68c: 85 fd sbrc r24, 5 68e: 11 c0 rjmp .+34 ; 0x6b2 690: 40 91 e4 00 lds r20, 0x00E4 ; 0x8000e4 <__TEXT_REGION_LENGTH__+0x7e00e4> 694: 50 91 e5 00 lds r21, 0x00E5 ; 0x8000e5 <__TEXT_REGION_LENGTH__+0x7e00e5> return ENDPOINT_READYWAIT_EndpointStalled; uint16_t CurrentFrameNumber = USB_Device_GetFrameNumber(); if (CurrentFrameNumber != PreviousFrameNumber) 698: 24 17 cp r18, r20 69a: 35 07 cpc r19, r21 69c: 29 f3 breq .-54 ; 0x668 69e: 91 50 subi r25, 0x01 ; 1 { PreviousFrameNumber = CurrentFrameNumber; if (!(TimeoutMSRem--)) 6a0: 11 f0 breq .+4 ; 0x6a6 6a2: 9a 01 movw r18, r20 6a4: e1 cf rjmp .-62 ; 0x668 return ENDPOINT_READYWAIT_Timeout; 6a6: 84 e0 ldi r24, 0x04 ; 4 6a8: 08 95 ret } uint8_t USB_DeviceState_LCL = USB_DeviceState; if (USB_DeviceState_LCL == DEVICE_STATE_Unattached) return ENDPOINT_READYWAIT_DeviceDisconnected; 6aa: 82 e0 ldi r24, 0x02 ; 2 6ac: 08 95 ret else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended) return ENDPOINT_READYWAIT_BusSuspended; 6ae: 83 e0 ldi r24, 0x03 ; 3 6b0: 08 95 ret else if (Endpoint_IsStalled()) return ENDPOINT_READYWAIT_EndpointStalled; 6b2: 81 e0 ldi r24, 0x01 ; 1 6b4: 08 95 ret for (;;) { if (Endpoint_GetEndpointDirection() == ENDPOINT_DIR_IN) { if (Endpoint_IsINReady()) return ENDPOINT_READYWAIT_NoError; 6b6: 80 e0 ldi r24, 0x00 ; 0 6b8: 08 95 ret * \return Boolean \c true if current endpoint is has received an OUT packet, \c false otherwise. */ static inline bool Endpoint_IsOUTReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsOUTReceived(void) { return ((UEINTX & (1 << RXOUTI)) ? true : false); 6ba: 40 91 e8 00 lds r20, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> } else { if (Endpoint_IsOUTReceived()) 6be: 42 ff sbrs r20, 2 6c0: dd cf rjmp .-70 ; 0x67c if (!(TimeoutMSRem--)) return ENDPOINT_READYWAIT_Timeout; } } } 6c2: 08 95 ret 000006c4 : USB_IsInitialized = false; } void USB_ResetInterface(void) { 6c4: 0f 93 push r16 6c6: 1f 93 push r17 6c8: cf 93 push r28 6ca: df 93 push r29 #if defined(USB_CAN_BE_BOTH) bool UIDModeSelectEnabled = ((UHWCON & (1 << UIDE)) != 0); #endif USB_INT_DisableAllInterrupts(); 6cc: 4b d0 rcall .+150 ; 0x764 USB_INT_ClearAllInterrupts(); 6ce: 52 d0 rcall .+164 ; 0x774 6d0: c8 ed ldi r28, 0xD8 ; 216 } static inline void USB_Controller_Reset(void) ATTR_ALWAYS_INLINE; static inline void USB_Controller_Reset(void) { USBCON &= ~(1 << USBE); 6d2: d0 e0 ldi r29, 0x00 ; 0 6d4: 88 81 ld r24, Y 6d6: 8f 77 andi r24, 0x7F ; 127 6d8: 88 83 st Y, r24 6da: 88 81 ld r24, Y USBCON |= (1 << USBE); 6dc: 80 68 ori r24, 0x80 ; 128 6de: 88 83 st Y, r24 6e0: 88 81 ld r24, Y } static inline void USB_CLK_Unfreeze(void) ATTR_ALWAYS_INLINE; static inline void USB_CLK_Unfreeze(void) { USBCON &= ~(1 << FRZCLK); 6e2: 8f 7d andi r24, 0xDF ; 223 6e4: 88 83 st Y, r24 6e6: 19 bc out 0x29, r1 ; 41 } static inline void USB_PLL_Off(void) ATTR_ALWAYS_INLINE; static inline void USB_PLL_Off(void) { PLLCSR = 0; 6e8: 10 92 18 01 sts 0x0118, r1 ; 0x800118 } #if defined(USB_CAN_BE_DEVICE) static void USB_Init_Device(void) { USB_DeviceState = DEVICE_STATE_Unattached; 6ec: 10 92 14 01 sts 0x0114, r1 ; 0x800114 USB_Device_ConfigurationNumber = 0; 6f0: 10 92 16 01 sts 0x0116, r1 ; 0x800116 #if !defined(NO_DEVICE_REMOTE_WAKEUP) USB_Device_RemoteWakeupEnabled = false; 6f4: 10 92 15 01 sts 0x0115, r1 ; 0x800115 #endif #if !defined(NO_DEVICE_SELF_POWER) USB_Device_CurrentlySelfPowered = false; 6f8: 00 ee ldi r16, 0xE0 ; 224 } static inline void USB_Device_SetFullSpeed(void) ATTR_ALWAYS_INLINE; static inline void USB_Device_SetFullSpeed(void) { UDCON &= ~(1 << LSM); 6fa: 10 e0 ldi r17, 0x00 ; 0 6fc: f8 01 movw r30, r16 6fe: 80 81 ld r24, Z 700: 8b 7f andi r24, 0xFB ; 251 702: 80 83 st Z, r24 704: 88 81 ld r24, Y { switch (Interrupt) { #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)) case USB_INT_VBUSTI: USBCON |= (1 << VBUSTE); 706: 81 60 ori r24, 0x01 ; 1 708: 88 83 st Y, r24 70a: 42 e0 ldi r20, 0x02 ; 2 uint8_t Number = (Address & ENDPOINT_EPNUM_MASK); if (Number >= ENDPOINT_TOTAL_ENDPOINTS) return false; return Endpoint_ConfigureEndpoint_Prv(Number, 70c: 60 e0 ldi r22, 0x00 ; 0 70e: 80 e0 ldi r24, 0x00 ; 0 710: 15 df rcall .-470 ; 0x53c 712: e1 ee ldi r30, 0xE1 ; 225 #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDINT &= ~(1 << WAKEUPI); break; case USB_INT_SUSPI: UDINT &= ~(1 << SUSPI); 714: f0 e0 ldi r31, 0x00 ; 0 716: 80 81 ld r24, Z 718: 8e 7f andi r24, 0xFE ; 254 71a: 80 83 st Z, r24 71c: e2 ee ldi r30, 0xE2 ; 226 #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDIEN |= (1 << WAKEUPE); break; case USB_INT_SUSPI: UDIEN |= (1 << SUSPE); 71e: f0 e0 ldi r31, 0x00 ; 0 720: 80 81 ld r24, Z 722: 81 60 ori r24, 0x01 ; 1 724: 80 83 st Z, r24 726: 80 81 ld r24, Z break; case USB_INT_EORSTI: UDIEN |= (1 << EORSTE); 728: 88 60 ori r24, 0x08 ; 8 72a: 80 83 st Z, r24 72c: f8 01 movw r30, r16 * register and despite the datasheet making no mention of its requirement in host mode. */ static inline void USB_Attach(void) ATTR_ALWAYS_INLINE; static inline void USB_Attach(void) { UDCON &= ~(1 << DETACH); 72e: 80 81 ld r24, Z 730: 8e 7f andi r24, 0xFE ; 254 732: 80 83 st Z, r24 734: 88 81 ld r24, Y #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) static inline void USB_OTGPAD_On(void) ATTR_ALWAYS_INLINE; static inline void USB_OTGPAD_On(void) { USBCON |= (1 << OTGPADE); 736: 80 61 ori r24, 0x10 ; 16 738: 88 83 st Y, r24 73a: df 91 pop r29 } #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)) USB_OTGPAD_On(); #endif } 73c: cf 91 pop r28 73e: 1f 91 pop r17 740: 0f 91 pop r16 742: 08 95 ret 00000744 : 744: e8 ed ldi r30, 0xD8 ; 216 } static inline void USB_OTGPAD_Off(void) ATTR_ALWAYS_INLINE; static inline void USB_OTGPAD_Off(void) { USBCON &= ~(1 << OTGPADE); 746: f0 e0 ldi r31, 0x00 ; 0 748: 80 81 ld r24, Z 74a: 8f 7e andi r24, 0xEF ; 239 74c: 80 83 st Z, r24 static inline void USB_REG_On(void) ATTR_ALWAYS_INLINE; static inline void USB_REG_On(void) { #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) UHWCON |= (1 << UVREGE); 74e: e7 ed ldi r30, 0xD7 ; 215 750: f0 e0 ldi r31, 0x00 ; 0 752: 80 81 ld r24, Z 754: 81 60 ori r24, 0x01 ; 1 756: 80 83 st Z, r24 USB_REG_Off(); if (!(USB_Options & USB_OPT_MANUAL_PLL)) { #if defined(USB_SERIES_4_AVR) PLLFRQ = (1 << PDIV2); 758: 84 e0 ldi r24, 0x04 ; 4 75a: 82 bf out 0x32, r24 ; 50 UHWCON &= ~(1 << UIDE); USB_CurrentMode = Mode; } #endif USB_IsInitialized = true; 75c: 81 e0 ldi r24, 0x01 ; 1 75e: 80 93 17 01 sts 0x0117, r24 ; 0x800117 USB_ResetInterface(); 762: b0 cf rjmp .-160 ; 0x6c4 00000764 : void USB_INT_DisableAllInterrupts(void) { #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) USBCON &= ~((1 << VBUSTE) | (1 << IDTE)); #elif defined(USB_SERIES_4_AVR) USBCON &= ~(1 << VBUSTE); 764: e8 ed ldi r30, 0xD8 ; 216 766: f0 e0 ldi r31, 0x00 ; 0 768: 80 81 ld r24, Z 76a: 8e 7f andi r24, 0xFE ; 254 76c: 80 83 st Z, r24 #if defined(USB_CAN_BE_HOST) UHIEN = 0; #endif #if defined(USB_CAN_BE_DEVICE) UDIEN = 0; 76e: 10 92 e2 00 sts 0x00E2, r1 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 772: 08 95 ret 00000774 : } void USB_INT_ClearAllInterrupts(void) { #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) USBINT = 0; 774: 10 92 da 00 sts 0x00DA, r1 ; 0x8000da <__TEXT_REGION_LENGTH__+0x7e00da> #if defined(USB_CAN_BE_HOST) UHINT = 0; #endif #if defined(USB_CAN_BE_DEVICE) UDINT = 0; 778: 10 92 e1 00 sts 0x00E1, r1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> 77c: 08 95 ret 0000077e <__vector_10>: #endif } ISR(USB_GEN_vect, ISR_BLOCK) { 77e: 1f 92 push r1 780: 0f 92 push r0 782: 0f b6 in r0, 0x3f ; 63 784: 0f 92 push r0 786: 11 24 eor r1, r1 788: 2f 93 push r18 78a: 3f 93 push r19 78c: 4f 93 push r20 78e: 5f 93 push r21 790: 6f 93 push r22 792: 7f 93 push r23 794: 8f 93 push r24 796: 9f 93 push r25 798: af 93 push r26 79a: bf 93 push r27 79c: ef 93 push r30 79e: ff 93 push r31 case USB_INT_SUSPI: return (UDINT & (1 << SUSPI)); case USB_INT_EORSTI: return (UDINT & (1 << EORSTI)); case USB_INT_SOFI: return (UDINT & (1 << SOFI)); 7a0: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> #if defined(USB_CAN_BE_DEVICE) #if !defined(NO_SOF_EVENTS) if (USB_INT_HasOccurred(USB_INT_SOFI) && USB_INT_IsEnabled(USB_INT_SOFI)) 7a4: 82 ff sbrs r24, 2 7a6: 0a c0 rjmp .+20 ; 0x7bc <__vector_10+0x3e> case USB_INT_SUSPI: return (UDIEN & (1 << SUSPE)); case USB_INT_EORSTI: return (UDIEN & (1 << EORSTE)); case USB_INT_SOFI: return (UDIEN & (1 << SOFE)); 7a8: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 7ac: 82 ff sbrs r24, 2 7ae: 06 c0 rjmp .+12 ; 0x7bc <__vector_10+0x3e> break; case USB_INT_EORSTI: UDINT &= ~(1 << EORSTI); break; case USB_INT_SOFI: UDINT &= ~(1 << SOFI); 7b0: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> 7b4: 8b 7f andi r24, 0xFB ; 251 7b6: 80 93 e1 00 sts 0x00E1, r24 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> { USB_INT_Clear(USB_INT_SOFI); EVENT_USB_Device_StartOfFrame(); 7ba: 1e dd rcall .-1476 ; 0x1f8 { switch (Interrupt) { #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)) case USB_INT_VBUSTI: return (USBINT & (1 << VBUSTI)); 7bc: 80 91 da 00 lds r24, 0x00DA ; 0x8000da <__TEXT_REGION_LENGTH__+0x7e00da> } #endif #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) if (USB_INT_HasOccurred(USB_INT_VBUSTI) && USB_INT_IsEnabled(USB_INT_VBUSTI)) 7c0: 80 ff sbrs r24, 0 7c2: 1d c0 rjmp .+58 ; 0x7fe <__vector_10+0x80> { switch (Interrupt) { #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)) case USB_INT_VBUSTI: return (USBCON & (1 << VBUSTE)); 7c4: 80 91 d8 00 lds r24, 0x00D8 ; 0x8000d8 <__TEXT_REGION_LENGTH__+0x7e00d8> 7c8: 80 ff sbrs r24, 0 7ca: 19 c0 rjmp .+50 ; 0x7fe <__vector_10+0x80> { switch (Interrupt) { #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)) case USB_INT_VBUSTI: USBINT &= ~(1 << VBUSTI); 7cc: 80 91 da 00 lds r24, 0x00DA ; 0x8000da <__TEXT_REGION_LENGTH__+0x7e00da> 7d0: 8e 7f andi r24, 0xFE ; 254 7d2: 80 93 da 00 sts 0x00DA, r24 ; 0x8000da <__TEXT_REGION_LENGTH__+0x7e00da> * \return Boolean \c true if the VBUS line is currently detecting power from a host, \c false otherwise. */ static inline bool USB_VBUS_GetStatus(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool USB_VBUS_GetStatus(void) { return ((USBSTA & (1 << VBUS)) ? true : false); 7d6: 80 91 d9 00 lds r24, 0x00D9 ; 0x8000d9 <__TEXT_REGION_LENGTH__+0x7e00d9> { USB_INT_Clear(USB_INT_VBUSTI); if (USB_VBUS_GetStatus()) 7da: 80 ff sbrs r24, 0 7dc: 0c c0 rjmp .+24 ; 0x7f6 <__vector_10+0x78> /* Inline Functions: */ static inline void USB_PLL_On(void) ATTR_ALWAYS_INLINE; static inline void USB_PLL_On(void) { PLLCSR = USB_PLL_PSC; 7de: 80 e1 ldi r24, 0x10 ; 16 7e0: 89 bd out 0x29, r24 ; 41 PLLCSR = (USB_PLL_PSC | (1 << PLLE)); 7e2: 82 e1 ldi r24, 0x12 ; 18 7e4: 89 bd out 0x29, r24 ; 41 { if (!(USB_Options & USB_OPT_MANUAL_PLL)) { USB_PLL_On(); while (!(USB_PLL_IsReady())); 7e6: 09 b4 in r0, 0x29 ; 41 7e8: 00 fe sbrs r0, 0 7ea: fd cf rjmp .-6 ; 0x7e6 <__vector_10+0x68> } USB_DeviceState = DEVICE_STATE_Powered; 7ec: 81 e0 ldi r24, 0x01 ; 1 7ee: 80 93 18 01 sts 0x0118, r24 ; 0x800118 EVENT_USB_Device_Connect(); 7f2: f4 dc rcall .-1560 ; 0x1dc 7f4: 04 c0 rjmp .+8 ; 0x7fe <__vector_10+0x80> } static inline void USB_PLL_Off(void) ATTR_ALWAYS_INLINE; static inline void USB_PLL_Off(void) { PLLCSR = 0; 7f6: 19 bc out 0x29, r1 ; 41 else { if (!(USB_Options & USB_OPT_MANUAL_PLL)) USB_PLL_Off(); USB_DeviceState = DEVICE_STATE_Unattached; 7f8: 10 92 18 01 sts 0x0118, r1 ; 0x800118 EVENT_USB_Device_Disconnect(); 7fc: f0 dc rcall .-1568 ; 0x1de #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: return (UDINT & (1 << WAKEUPI)); case USB_INT_SUSPI: return (UDINT & (1 << SUSPI)); 7fe: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> } } #endif if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI)) 802: 80 ff sbrs r24, 0 804: 18 c0 rjmp .+48 ; 0x836 <__vector_10+0xb8> #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: return (UDIEN & (1 << WAKEUPE)); case USB_INT_SUSPI: return (UDIEN & (1 << SUSPE)); 806: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 80a: 80 ff sbrs r24, 0 80c: 14 c0 rjmp .+40 ; 0x836 <__vector_10+0xb8> #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDIEN &= ~(1 << WAKEUPE); break; case USB_INT_SUSPI: UDIEN &= ~(1 << SUSPE); 80e: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 812: 8e 7f andi r24, 0xFE ; 254 814: 80 93 e2 00 sts 0x00E2, r24 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> USBCON |= (1 << IDTE); break; #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDIEN |= (1 << WAKEUPE); 818: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 81c: 80 61 ori r24, 0x10 ; 16 81e: 80 93 e2 00 sts 0x00E2, r24 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> #endif static inline void USB_CLK_Freeze(void) ATTR_ALWAYS_INLINE; static inline void USB_CLK_Freeze(void) { USBCON |= (1 << FRZCLK); 822: 80 91 d8 00 lds r24, 0x00D8 ; 0x8000d8 <__TEXT_REGION_LENGTH__+0x7e00d8> 826: 80 62 ori r24, 0x20 ; 32 828: 80 93 d8 00 sts 0x00D8, r24 ; 0x8000d8 <__TEXT_REGION_LENGTH__+0x7e00d8> } static inline void USB_PLL_Off(void) ATTR_ALWAYS_INLINE; static inline void USB_PLL_Off(void) { PLLCSR = 0; 82c: 19 bc out 0x29, r1 ; 41 #if defined(USB_SERIES_2_AVR) && !defined(NO_LIMITED_CONTROLLER_CONNECT) USB_DeviceState = DEVICE_STATE_Unattached; EVENT_USB_Device_Disconnect(); #else USB_DeviceState = DEVICE_STATE_Suspended; 82e: 85 e0 ldi r24, 0x05 ; 5 830: 80 93 18 01 sts 0x0118, r24 ; 0x800118 EVENT_USB_Device_Suspend(); 834: cb d1 rcall .+918 ; 0xbcc case USB_INT_IDTI: return (USBINT & (1 << IDTI)); #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: return (UDINT & (1 << WAKEUPI)); 836: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> #endif } if (USB_INT_HasOccurred(USB_INT_WAKEUPI) && USB_INT_IsEnabled(USB_INT_WAKEUPI)) 83a: 84 ff sbrs r24, 4 83c: 2f c0 rjmp .+94 ; 0x89c <__vector_10+0x11e> case USB_INT_IDTI: return (USBCON & (1 << IDTE)); #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: return (UDIEN & (1 << WAKEUPE)); 83e: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 842: 84 ff sbrs r24, 4 844: 2b c0 rjmp .+86 ; 0x89c <__vector_10+0x11e> /* Inline Functions: */ static inline void USB_PLL_On(void) ATTR_ALWAYS_INLINE; static inline void USB_PLL_On(void) { PLLCSR = USB_PLL_PSC; 846: 80 e1 ldi r24, 0x10 ; 16 848: 89 bd out 0x29, r24 ; 41 PLLCSR = (USB_PLL_PSC | (1 << PLLE)); 84a: 82 e1 ldi r24, 0x12 ; 18 84c: 89 bd out 0x29, r24 ; 41 { if (!(USB_Options & USB_OPT_MANUAL_PLL)) { USB_PLL_On(); while (!(USB_PLL_IsReady())); 84e: 09 b4 in r0, 0x29 ; 41 850: 00 fe sbrs r0, 0 852: fd cf rjmp .-6 ; 0x84e <__vector_10+0xd0> } static inline void USB_CLK_Unfreeze(void) ATTR_ALWAYS_INLINE; static inline void USB_CLK_Unfreeze(void) { USBCON &= ~(1 << FRZCLK); 854: 80 91 d8 00 lds r24, 0x00D8 ; 0x8000d8 <__TEXT_REGION_LENGTH__+0x7e00d8> 858: 8f 7d andi r24, 0xDF ; 223 85a: 80 93 d8 00 sts 0x00D8, r24 ; 0x8000d8 <__TEXT_REGION_LENGTH__+0x7e00d8> USBINT &= ~(1 << IDTI); break; #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDINT &= ~(1 << WAKEUPI); 85e: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> 862: 8f 7e andi r24, 0xEF ; 239 864: 80 93 e1 00 sts 0x00E1, r24 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> USBCON &= ~(1 << IDTE); break; #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDIEN &= ~(1 << WAKEUPE); 868: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 86c: 8f 7e andi r24, 0xEF ; 239 86e: 80 93 e2 00 sts 0x00E2, r24 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDIEN |= (1 << WAKEUPE); break; case USB_INT_SUSPI: UDIEN |= (1 << SUSPE); 872: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 876: 81 60 ori r24, 0x01 ; 1 878: 80 93 e2 00 sts 0x00E2, r24 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> USB_INT_Clear(USB_INT_WAKEUPI); USB_INT_Disable(USB_INT_WAKEUPI); USB_INT_Enable(USB_INT_SUSPI); if (USB_Device_ConfigurationNumber) 87c: 80 91 14 01 lds r24, 0x0114 ; 0x800114 880: 88 23 and r24, r24 882: 11 f0 breq .+4 ; 0x888 <__vector_10+0x10a> USB_DeviceState = DEVICE_STATE_Configured; 884: 84 e0 ldi r24, 0x04 ; 4 886: 07 c0 rjmp .+14 ; 0x896 <__vector_10+0x118> } static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; static inline bool USB_Device_IsAddressSet(void) { return (UDADDR & (1 << ADDEN)); 888: 80 91 e3 00 lds r24, 0x00E3 ; 0x8000e3 <__TEXT_REGION_LENGTH__+0x7e00e3> else USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Addressed : DEVICE_STATE_Powered; 88c: 87 fd sbrc r24, 7 88e: 02 c0 rjmp .+4 ; 0x894 <__vector_10+0x116> 890: 81 e0 ldi r24, 0x01 ; 1 892: 01 c0 rjmp .+2 ; 0x896 <__vector_10+0x118> 894: 83 e0 ldi r24, 0x03 ; 3 896: 80 93 18 01 sts 0x0118, r24 ; 0x800118 #if defined(USB_SERIES_2_AVR) && !defined(NO_LIMITED_CONTROLLER_CONNECT) EVENT_USB_Device_Connect(); #else EVENT_USB_Device_WakeUp(); 89a: 98 d1 rcall .+816 ; 0xbcc case USB_INT_WAKEUPI: return (UDINT & (1 << WAKEUPI)); case USB_INT_SUSPI: return (UDINT & (1 << SUSPI)); case USB_INT_EORSTI: return (UDINT & (1 << EORSTI)); 89c: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> #endif } if (USB_INT_HasOccurred(USB_INT_EORSTI) && USB_INT_IsEnabled(USB_INT_EORSTI)) 8a0: 83 ff sbrs r24, 3 8a2: 22 c0 rjmp .+68 ; 0x8e8 <__vector_10+0x16a> case USB_INT_WAKEUPI: return (UDIEN & (1 << WAKEUPE)); case USB_INT_SUSPI: return (UDIEN & (1 << SUSPE)); case USB_INT_EORSTI: return (UDIEN & (1 << EORSTE)); 8a4: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 8a8: 83 ff sbrs r24, 3 8aa: 1e c0 rjmp .+60 ; 0x8e8 <__vector_10+0x16a> break; case USB_INT_SUSPI: UDINT &= ~(1 << SUSPI); break; case USB_INT_EORSTI: UDINT &= ~(1 << EORSTI); 8ac: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> 8b0: 87 7f andi r24, 0xF7 ; 247 8b2: 80 93 e1 00 sts 0x00E1, r24 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> { USB_INT_Clear(USB_INT_EORSTI); USB_DeviceState = DEVICE_STATE_Default; 8b6: 82 e0 ldi r24, 0x02 ; 2 8b8: 80 93 18 01 sts 0x0118, r24 ; 0x800118 USB_Device_ConfigurationNumber = 0; 8bc: 10 92 14 01 sts 0x0114, r1 ; 0x800114 #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDINT &= ~(1 << WAKEUPI); break; case USB_INT_SUSPI: UDINT &= ~(1 << SUSPI); 8c0: 80 91 e1 00 lds r24, 0x00E1 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> 8c4: 8e 7f andi r24, 0xFE ; 254 8c6: 80 93 e1 00 sts 0x00E1, r24 ; 0x8000e1 <__TEXT_REGION_LENGTH__+0x7e00e1> #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDIEN &= ~(1 << WAKEUPE); break; case USB_INT_SUSPI: UDIEN &= ~(1 << SUSPE); 8ca: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 8ce: 8e 7f andi r24, 0xFE ; 254 8d0: 80 93 e2 00 sts 0x00E2, r24 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> USBCON |= (1 << IDTE); break; #endif #if defined(USB_CAN_BE_DEVICE) case USB_INT_WAKEUPI: UDIEN |= (1 << WAKEUPE); 8d4: 80 91 e2 00 lds r24, 0x00E2 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> 8d8: 80 61 ori r24, 0x10 ; 16 8da: 80 93 e2 00 sts 0x00E2, r24 ; 0x8000e2 <__TEXT_REGION_LENGTH__+0x7e00e2> uint8_t Number = (Address & ENDPOINT_EPNUM_MASK); if (Number >= ENDPOINT_TOTAL_ENDPOINTS) return false; return Endpoint_ConfigureEndpoint_Prv(Number, 8de: 42 e0 ldi r20, 0x02 ; 2 8e0: 60 e0 ldi r22, 0x00 ; 0 8e2: 80 e0 ldi r24, 0x00 ; 0 8e4: 2b de rcall .-938 ; 0x53c #if defined(INTERRUPT_CONTROL_ENDPOINT) USB_INT_Enable(USB_INT_RXSTPI); #endif EVENT_USB_Device_Reset(); 8e6: 72 d1 rcall .+740 ; 0xbcc 8e8: ff 91 pop r31 USB_ResetInterface(); EVENT_USB_UIDChange(); } #endif } 8ea: ef 91 pop r30 8ec: bf 91 pop r27 8ee: af 91 pop r26 8f0: 9f 91 pop r25 8f2: 8f 91 pop r24 8f4: 7f 91 pop r23 8f6: 6f 91 pop r22 8f8: 5f 91 pop r21 8fa: 4f 91 pop r20 8fc: 3f 91 pop r19 8fe: 2f 91 pop r18 900: 0f 90 pop r0 902: 0f be out 0x3f, r0 ; 63 904: 0f 90 pop r0 906: 1f 90 pop r1 908: 18 95 reti 0000090a : 90a: 1f 93 push r17 #if !defined(NO_DEVICE_REMOTE_WAKEUP) bool USB_Device_RemoteWakeupEnabled; #endif void USB_Device_ProcessControlRequest(void) { 90c: cf 93 push r28 90e: df 93 push r29 910: cd b7 in r28, 0x3d ; 61 912: de b7 in r29, 0x3e ; 62 914: aa 97 sbiw r28, 0x2a ; 42 916: 0f b6 in r0, 0x3f ; 63 918: f8 94 cli 91a: de bf out 0x3e, r29 ; 62 91c: 0f be out 0x3f, r0 ; 63 91e: cd bf out 0x3d, r28 ; 61 920: e9 e1 ldi r30, 0x19 ; 25 922: f1 e0 ldi r31, 0x01 ; 1 * \return Next byte in the currently selected endpoint's FIFO buffer. */ static inline uint8_t Endpoint_Read_8(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_Read_8(void) { return UEDATX; 924: 80 91 f1 00 lds r24, 0x00F1 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> USB_ControlRequest.wLength = Endpoint_Read_16_LE(); #else uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest; for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++) *(RequestHeader++) = Endpoint_Read_8(); 928: 81 93 st Z+, r24 USB_ControlRequest.wIndex = Endpoint_Read_16_LE(); USB_ControlRequest.wLength = Endpoint_Read_16_LE(); #else uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest; for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++) 92a: 21 e0 ldi r18, 0x01 ; 1 92c: e1 32 cpi r30, 0x21 ; 33 92e: f2 07 cpc r31, r18 930: c9 f7 brne .-14 ; 0x924 *(RequestHeader++) = Endpoint_Read_8(); #endif EVENT_USB_Device_ControlRequest(); 932: 5f dc rcall .-1858 ; 0x1f2 * \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise. */ static inline bool Endpoint_IsSETUPReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsSETUPReceived(void) { return ((UEINTX & (1 << RXSTPI)) ? true : false); 934: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> if (Endpoint_IsSETUPReceived()) 938: 83 ff sbrs r24, 3 93a: 30 c1 rjmp .+608 ; 0xb9c <__stack+0x9d> { uint8_t bmRequestType = USB_ControlRequest.bmRequestType; 93c: 80 91 19 01 lds r24, 0x0119 ; 0x800119 switch (USB_ControlRequest.bRequest) 940: 90 91 1a 01 lds r25, 0x011A ; 0x80011a 944: 95 30 cpi r25, 0x05 ; 5 946: 09 f4 brne .+2 ; 0x94a 948: 83 c0 rjmp .+262 ; 0xa50 94a: 30 f4 brcc .+12 ; 0x958 94c: 91 30 cpi r25, 0x01 ; 1 94e: a9 f1 breq .+106 ; 0x9ba 950: 68 f0 brcs .+26 ; 0x96c 952: 93 30 cpi r25, 0x03 ; 3 954: 91 f1 breq .+100 ; 0x9ba 956: 22 c1 rjmp .+580 ; 0xb9c <__stack+0x9d> 958: 98 30 cpi r25, 0x08 ; 8 95a: 09 f4 brne .+2 ; 0x95e 95c: ef c0 rjmp .+478 ; 0xb3c <__stack+0x3d> 95e: 99 30 cpi r25, 0x09 ; 9 960: 09 f4 brne .+2 ; 0x964 962: fb c0 rjmp .+502 ; 0xb5a <__stack+0x5b> 964: 96 30 cpi r25, 0x06 ; 6 966: 09 f0 breq .+2 ; 0x96a 968: 19 c1 rjmp .+562 ; 0xb9c <__stack+0x9d> 96a: 94 c0 rjmp .+296 ; 0xa94 { case REQ_GetStatus: if ((bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) || 96c: 80 38 cpi r24, 0x80 ; 128 96e: 21 f0 breq .+8 ; 0x978 970: 82 38 cpi r24, 0x82 ; 130 972: 09 f0 breq .+2 ; 0x976 974: 13 c1 rjmp .+550 ; 0xb9c <__stack+0x9d> 976: 08 c0 rjmp .+16 ; 0x988 Endpoint_ClearOUT(); } static void USB_Device_GetStatus(void) { uint8_t CurrentStatus = 0; 978: 80 91 15 01 lds r24, 0x0115 ; 0x800115 if (USB_Device_CurrentlySelfPowered) CurrentStatus |= FEATURE_SELFPOWERED_ENABLED; #endif #if !defined(NO_DEVICE_REMOTE_WAKEUP) if (USB_Device_RemoteWakeupEnabled) 97c: 90 91 16 01 lds r25, 0x0116 ; 0x800116 980: 99 23 and r25, r25 982: 89 f0 breq .+34 ; 0x9a6 CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED; 984: 82 60 ori r24, 0x02 ; 2 986: 0f c0 rjmp .+30 ; 0x9a6 break; } case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT): { #if !defined(CONTROL_ONLY_DEVICE) uint8_t EndpointIndex = ((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK); 988: 80 91 1d 01 lds r24, 0x011D ; 0x80011d 98c: 8f 70 andi r24, 0x0F ; 15 if (EndpointIndex >= ENDPOINT_TOTAL_ENDPOINTS) 98e: 87 30 cpi r24, 0x07 ; 7 990: 08 f0 brcs .+2 ; 0x994 992: 04 c1 rjmp .+520 ; 0xb9c <__stack+0x9d> */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); 994: 80 93 e9 00 sts 0x00E9, r24 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> * \return Boolean \c true if the currently selected endpoint is stalled, \c false otherwise. */ static inline bool Endpoint_IsStalled(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsStalled(void) { return ((UECONX & (1 << STALLRQ)) ? true : false); 998: 80 91 eb 00 lds r24, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> return; Endpoint_SelectEndpoint(EndpointIndex); CurrentStatus = Endpoint_IsStalled(); 99c: 85 fb bst r24, 5 99e: 88 27 eor r24, r24 9a0: 80 f9 bld r24, 0 */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); 9a2: 10 92 e9 00 sts 0x00E9, r1 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); 9a6: 90 91 e8 00 lds r25, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> 9aa: 97 7f andi r25, 0xF7 ; 247 9ac: 90 93 e8 00 sts 0x00E8, r25 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> * \param[in] Data Data to write to the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_16_LE(const uint16_t Data) { UEDATX = (Data & 0xFF); 9b0: 80 93 f1 00 sts 0x00F1, r24 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> UEDATX = (Data >> 8); 9b4: 10 92 f1 00 sts 0x00F1, r1 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> 9b8: cc c0 rjmp .+408 ; 0xb52 <__stack+0x53> } break; case REQ_ClearFeature: case REQ_SetFeature: if ((bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE)) || 9ba: 28 2f mov r18, r24 9bc: 2d 7f andi r18, 0xFD ; 253 9be: 09 f0 breq .+2 ; 0x9c2 9c0: ed c0 rjmp .+474 ; 0xb9c <__stack+0x9d> Endpoint_ClearStatusStage(); } static void USB_Device_ClearSetFeature(void) { switch (USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) 9c2: 88 23 and r24, r24 9c4: 19 f0 breq .+6 ; 0x9cc 9c6: 82 30 cpi r24, 0x02 ; 2 9c8: 61 f0 breq .+24 ; 0x9e2 9ca: e8 c0 rjmp .+464 ; 0xb9c <__stack+0x9d> { #if !defined(NO_DEVICE_REMOTE_WAKEUP) case REQREC_DEVICE: { if ((uint8_t)USB_ControlRequest.wValue == FEATURE_SEL_DeviceRemoteWakeup) 9cc: 80 91 1b 01 lds r24, 0x011B ; 0x80011b 9d0: 81 30 cpi r24, 0x01 ; 1 9d2: 09 f0 breq .+2 ; 0x9d6 9d4: e3 c0 rjmp .+454 ; 0xb9c <__stack+0x9d> USB_Device_RemoteWakeupEnabled = (USB_ControlRequest.bRequest == REQ_SetFeature); 9d6: 93 30 cpi r25, 0x03 ; 3 9d8: 09 f0 breq .+2 ; 0x9dc 9da: 80 e0 ldi r24, 0x00 ; 0 9dc: 80 93 16 01 sts 0x0116, r24 ; 0x800116 9e0: 2e c0 rjmp .+92 ; 0xa3e } #endif #if !defined(CONTROL_ONLY_DEVICE) case REQREC_ENDPOINT: { if ((uint8_t)USB_ControlRequest.wValue == FEATURE_SEL_EndpointHalt) 9e2: 80 91 1b 01 lds r24, 0x011B ; 0x80011b 9e6: 81 11 cpse r24, r1 9e8: 2a c0 rjmp .+84 ; 0xa3e { uint8_t EndpointIndex = ((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK); 9ea: 80 91 1d 01 lds r24, 0x011D ; 0x80011d 9ee: 8f 70 andi r24, 0x0F ; 15 if (EndpointIndex == ENDPOINT_CONTROLEP || EndpointIndex >= ENDPOINT_TOTAL_ENDPOINTS) 9f0: 2f ef ldi r18, 0xFF ; 255 9f2: 28 0f add r18, r24 9f4: 26 30 cpi r18, 0x06 ; 6 9f6: 08 f0 brcs .+2 ; 0x9fa 9f8: d1 c0 rjmp .+418 ; 0xb9c <__stack+0x9d> */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); 9fa: 80 93 e9 00 sts 0x00E9, r24 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> * \return Boolean \c true if the currently selected endpoint is enabled, \c false otherwise. */ static inline bool Endpoint_IsEnabled(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsEnabled(void) { return ((UECONX & (1 << EPEN)) ? true : false); 9fe: 20 91 eb 00 lds r18, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> return; Endpoint_SelectEndpoint(EndpointIndex); if (Endpoint_IsEnabled()) a02: 20 ff sbrs r18, 0 a04: 1c c0 rjmp .+56 ; 0xa3e { if (USB_ControlRequest.bRequest == REQ_SetFeature) a06: 93 30 cpi r25, 0x03 ; 3 a08: 21 f4 brne .+8 ; 0xa12 * \ingroup Group_EndpointPacketManagement_AVR8 */ static inline void Endpoint_StallTransaction(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_StallTransaction(void) { UECONX |= (1 << STALLRQ); a0a: 80 91 eb 00 lds r24, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> a0e: 80 62 ori r24, 0x20 ; 32 a10: 14 c0 rjmp .+40 ; 0xa3a * \ingroup Group_EndpointPacketManagement_AVR8 */ static inline void Endpoint_ClearStall(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearStall(void) { UECONX |= (1 << STALLRQC); a12: 90 91 eb 00 lds r25, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> a16: 90 61 ori r25, 0x10 ; 16 a18: 90 93 eb 00 sts 0x00EB, r25 ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> * \param[in] Address Endpoint address whose FIFO buffers are to be reset. */ static inline void Endpoint_ResetEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_ResetEndpoint(const uint8_t Address) { UERST = (1 << (Address & ENDPOINT_EPNUM_MASK)); a1c: 21 e0 ldi r18, 0x01 ; 1 a1e: 30 e0 ldi r19, 0x00 ; 0 a20: a9 01 movw r20, r18 a22: 02 c0 rjmp .+4 ; 0xa28 a24: 44 0f add r20, r20 a26: 55 1f adc r21, r21 a28: 8a 95 dec r24 a2a: e2 f7 brpl .-8 ; 0xa24 a2c: 40 93 ea 00 sts 0x00EA, r20 ; 0x8000ea <__TEXT_REGION_LENGTH__+0x7e00ea> UERST = 0; a30: 10 92 ea 00 sts 0x00EA, r1 ; 0x8000ea <__TEXT_REGION_LENGTH__+0x7e00ea> /** Resets the data toggle of the currently selected endpoint. */ static inline void Endpoint_ResetDataToggle(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ResetDataToggle(void) { UECONX |= (1 << RSTDT); a34: 80 91 eb 00 lds r24, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> a38: 88 60 ori r24, 0x08 ; 8 a3a: 80 93 eb 00 sts 0x00EB, r24 ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); a3e: 10 92 e9 00 sts 0x00E9, r1 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); a42: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> a46: 87 7f andi r24, 0xF7 ; 247 a48: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); Endpoint_ClearSETUP(); Endpoint_ClearStatusStage(); a4c: e9 dd rcall .-1070 ; 0x620 a4e: a6 c0 rjmp .+332 ; 0xb9c <__stack+0x9d> USB_Device_ClearSetFeature(); } break; case REQ_SetAddress: if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE)) a50: 81 11 cpse r24, r1 a52: a4 c0 rjmp .+328 ; 0xb9c <__stack+0x9d> } } static void USB_Device_SetAddress(void) { uint8_t DeviceAddress = (USB_ControlRequest.wValue & 0x7F); a54: 10 91 1b 01 lds r17, 0x011B ; 0x80011b a58: 1f 77 andi r17, 0x7F ; 127 #endif static inline void USB_Device_SetDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void USB_Device_SetDeviceAddress(const uint8_t Address) { UDADDR = (UDADDR & (1 << ADDEN)) | (Address & 0x7F); a5a: 80 91 e3 00 lds r24, 0x00E3 ; 0x8000e3 <__TEXT_REGION_LENGTH__+0x7e00e3> a5e: 80 78 andi r24, 0x80 ; 128 a60: 81 2b or r24, r17 a62: 80 93 e3 00 sts 0x00E3, r24 ; 0x8000e3 <__TEXT_REGION_LENGTH__+0x7e00e3> a66: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> a6a: 87 7f andi r24, 0xF7 ; 247 a6c: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> USB_Device_SetDeviceAddress(DeviceAddress); Endpoint_ClearSETUP(); Endpoint_ClearStatusStage(); a70: d7 dd rcall .-1106 ; 0x620 * \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise. */ static inline bool Endpoint_IsINReady(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsINReady(void) { return ((UEINTX & (1 << TXINI)) ? true : false); a72: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> while (!(Endpoint_IsINReady())); a76: 80 ff sbrs r24, 0 a78: fc cf rjmp .-8 ; 0xa72 static inline void USB_Device_EnableDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void USB_Device_EnableDeviceAddress(const uint8_t Address) { (void)Address; UDADDR |= (1 << ADDEN); a7a: 80 91 e3 00 lds r24, 0x00E3 ; 0x8000e3 <__TEXT_REGION_LENGTH__+0x7e00e3> a7e: 80 68 ori r24, 0x80 ; 128 a80: 80 93 e3 00 sts 0x00E3, r24 ; 0x8000e3 <__TEXT_REGION_LENGTH__+0x7e00e3> USB_Device_EnableDeviceAddress(DeviceAddress); USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default; a84: 11 11 cpse r17, r1 a86: 02 c0 rjmp .+4 ; 0xa8c a88: 82 e0 ldi r24, 0x02 ; 2 a8a: 01 c0 rjmp .+2 ; 0xa8e a8c: 83 e0 ldi r24, 0x03 ; 3 a8e: 80 93 18 01 sts 0x0118, r24 ; 0x800118 a92: 84 c0 rjmp .+264 ; 0xb9c <__stack+0x9d> if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE)) USB_Device_SetAddress(); break; case REQ_GetDescriptor: if ((bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) || a94: 80 58 subi r24, 0x80 ; 128 a96: 82 30 cpi r24, 0x02 ; 2 a98: 08 f0 brcs .+2 ; 0xa9c a9a: 80 c0 rjmp .+256 ; 0xb9c <__stack+0x9d> !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS)) uint8_t DescriptorAddressSpace; #endif #if !defined(NO_INTERNAL_SERIAL) && (USE_INTERNAL_SERIAL != NO_DESCRIPTOR) if (USB_ControlRequest.wValue == ((DTYPE_String << 8) | USE_INTERNAL_SERIAL)) a9c: 80 91 1b 01 lds r24, 0x011B ; 0x80011b aa0: 90 91 1c 01 lds r25, 0x011C ; 0x80011c aa4: 8c 3d cpi r24, 0xDC ; 220 aa6: 53 e0 ldi r21, 0x03 ; 3 aa8: 95 07 cpc r25, r21 aaa: 71 f5 brne .+92 ; 0xb08 <__stack+0x9> { USB_Descriptor_Header_t Header; uint16_t UnicodeString[INTERNAL_SERIAL_LENGTH_BITS / 4]; } SignatureDescriptor; SignatureDescriptor.Header.Type = DTYPE_String; aac: 83 e0 ldi r24, 0x03 ; 3 aae: 8a 83 std Y+2, r24 ; 0x02 SignatureDescriptor.Header.Size = USB_STRING_LEN(INTERNAL_SERIAL_LENGTH_BITS / 4); ab0: 8a e2 ldi r24, 0x2A ; 42 ab2: 89 83 std Y+1, r24 ; 0x01 static inline uint_reg_t GetGlobalInterruptMask(void) { GCC_MEMORY_BARRIER(); #if (ARCH == ARCH_AVR8) return SREG; ab4: 4f b7 in r20, 0x3f ; 63 static inline void GlobalInterruptDisable(void) { GCC_MEMORY_BARRIER(); #if (ARCH == ARCH_AVR8) cli(); ab6: f8 94 cli __builtin_ssrf(AVR32_SR_GM_OFFSET); #elif (ARCH == ARCH_XMEGA) cli(); #endif GCC_MEMORY_BARRIER(); ab8: de 01 movw r26, r28 aba: 13 96 adiw r26, 0x03 ; 3 uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); GlobalInterruptDisable(); uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS; for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++) abc: 20 e0 ldi r18, 0x00 ; 0 static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) { uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); GlobalInterruptDisable(); uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS; abe: 3e e0 ldi r19, 0x0E ; 14 for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++) { uint8_t SerialByte = boot_signature_byte_get(SigReadAddress); ac0: 51 e2 ldi r21, 0x21 ; 33 ac2: e3 2f mov r30, r19 ac4: f0 e0 ldi r31, 0x00 ; 0 ac6: 50 93 57 00 sts 0x0057, r21 ; 0x800057 <__TEXT_REGION_LENGTH__+0x7e0057> aca: e4 91 lpm r30, Z if (SerialCharNum & 0x01) acc: 20 ff sbrs r18, 0 ace: 03 c0 rjmp .+6 ; 0xad6 { SerialByte >>= 4; ad0: e2 95 swap r30 ad2: ef 70 andi r30, 0x0F ; 15 SigReadAddress++; ad4: 3f 5f subi r19, 0xFF ; 255 } SerialByte &= 0x0F; ad6: ef 70 andi r30, 0x0F ; 15 ad8: 8e 2f mov r24, r30 ada: 90 e0 ldi r25, 0x00 ; 0 UnicodeString[SerialCharNum] = cpu_to_le16((SerialByte >= 10) ? adc: ea 30 cpi r30, 0x0A ; 10 ade: 10 f0 brcs .+4 ; 0xae4 ae0: c7 96 adiw r24, 0x37 ; 55 ae2: 01 c0 rjmp .+2 ; 0xae6 ae4: c0 96 adiw r24, 0x30 ; 48 ae6: 8d 93 st X+, r24 ae8: 9d 93 st X+, r25 uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); GlobalInterruptDisable(); uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS; for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++) aea: 2f 5f subi r18, 0xFF ; 255 aec: 24 31 cpi r18, 0x14 ; 20 aee: 49 f7 brne .-46 ; 0xac2 static inline void SetGlobalInterruptMask(const uint_reg_t GlobalIntState) { GCC_MEMORY_BARRIER(); #if (ARCH == ARCH_AVR8) SREG = GlobalIntState; af0: 4f bf out 0x3f, r20 ; 63 * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); af2: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> af6: 87 7f andi r24, 0xF7 ; 247 af8: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> USB_Device_GetSerialString(SignatureDescriptor.UnicodeString); Endpoint_ClearSETUP(); Endpoint_Write_Control_Stream_LE(&SignatureDescriptor, sizeof(SignatureDescriptor)); afc: 6a e2 ldi r22, 0x2A ; 42 afe: 70 e0 ldi r23, 0x00 ; 0 b00: ce 01 movw r24, r28 b02: 01 96 adiw r24, 0x01 ; 1 b04: 1c dc rcall .-1992 ; 0x33e b06: 14 c0 rjmp .+40 ; 0xb30 <__stack+0x31> USB_Device_GetInternalSerialDescriptor(); return; } #endif if ((DescriptorSize = CALLBACK_USB_GetDescriptor(USB_ControlRequest.wValue, USB_ControlRequest.wIndex, b08: 60 91 1d 01 lds r22, 0x011D ; 0x80011d b0c: 70 91 1e 01 lds r23, 0x011E ; 0x80011e b10: ae 01 movw r20, r28 b12: 4f 5f subi r20, 0xFF ; 255 b14: 5f 4f sbci r21, 0xFF ; 255 b16: 88 db rcall .-2288 ; 0x228 b18: bc 01 movw r22, r24 b1a: 89 2b or r24, r25 b1c: 09 f4 brne .+2 ; 0xb20 <__stack+0x21> b1e: 3e c0 rjmp .+124 ; 0xb9c <__stack+0x9d> b20: 90 91 e8 00 lds r25, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> b24: 97 7f andi r25, 0xF7 ; 247 b26: 90 93 e8 00 sts 0x00E8, r25 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> #if defined(USE_RAM_DESCRIPTORS) || !defined(ARCH_HAS_MULTI_ADDRESS_SPACE) Endpoint_Write_Control_Stream_LE(DescriptorPointer, DescriptorSize); #elif defined(USE_EEPROM_DESCRIPTORS) Endpoint_Write_Control_EStream_LE(DescriptorPointer, DescriptorSize); #elif defined(USE_FLASH_DESCRIPTORS) Endpoint_Write_Control_PStream_LE(DescriptorPointer, DescriptorSize); b2a: 89 81 ldd r24, Y+1 ; 0x01 b2c: 9a 81 ldd r25, Y+2 ; 0x02 b2e: a5 dc rcall .-1718 ; 0x47a */ static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearOUT(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << RXOUTI) | (1 << FIFOCON)); b30: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> b34: 8b 77 andi r24, 0x7B ; 123 b36: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> b3a: 30 c0 rjmp .+96 ; 0xb9c <__stack+0x9d> USB_Device_GetDescriptor(); } break; case REQ_GetConfiguration: if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) b3c: 80 38 cpi r24, 0x80 ; 128 b3e: 71 f5 brne .+92 ; 0xb9c <__stack+0x9d> * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); b40: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> b44: 87 7f andi r24, 0xF7 ; 247 b46: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> static void USB_Device_GetConfiguration(void) { Endpoint_ClearSETUP(); Endpoint_Write_8(USB_Device_ConfigurationNumber); b4a: 80 91 14 01 lds r24, 0x0114 ; 0x800114 * \param[in] Data Data to write into the the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_8(const uint8_t Data) { UEDATX = Data; b4e: 80 93 f1 00 sts 0x00F1, r24 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> */ static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearIN(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << TXINI) | (1 << FIFOCON)); b52: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> b56: 8e 77 andi r24, 0x7E ; 126 b58: 77 cf rjmp .-274 ; 0xa48 if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) USB_Device_GetConfiguration(); break; case REQ_SetConfiguration: if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE)) b5a: 81 11 cpse r24, r1 b5c: 1f c0 rjmp .+62 ; 0xb9c <__stack+0x9d> } static void USB_Device_SetConfiguration(void) { #if defined(FIXED_NUM_CONFIGURATIONS) if ((uint8_t)USB_ControlRequest.wValue > FIXED_NUM_CONFIGURATIONS) b5e: 80 91 1b 01 lds r24, 0x011B ; 0x80011b b62: 90 91 1c 01 lds r25, 0x011C ; 0x80011c b66: 99 27 eor r25, r25 b68: 02 97 sbiw r24, 0x02 ; 2 b6a: c4 f4 brge .+48 ; 0xb9c <__stack+0x9d> * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); b6c: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> b70: 87 7f andi r24, 0xF7 ; 247 b72: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> #endif #endif Endpoint_ClearSETUP(); USB_Device_ConfigurationNumber = (uint8_t)USB_ControlRequest.wValue; b76: 80 91 1b 01 lds r24, 0x011B ; 0x80011b b7a: 80 93 14 01 sts 0x0114, r24 ; 0x800114 Endpoint_ClearStatusStage(); b7e: 50 dd rcall .-1376 ; 0x620 if (USB_Device_ConfigurationNumber) b80: 80 91 14 01 lds r24, 0x0114 ; 0x800114 b84: 81 11 cpse r24, r1 b86: 06 c0 rjmp .+12 ; 0xb94 <__stack+0x95> } static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; static inline bool USB_Device_IsAddressSet(void) { return (UDADDR & (1 << ADDEN)); b88: 80 91 e3 00 lds r24, 0x00E3 ; 0x8000e3 <__TEXT_REGION_LENGTH__+0x7e00e3> USB_DeviceState = DEVICE_STATE_Configured; else USB_DeviceState = (USB_Device_IsAddressSet()) ? DEVICE_STATE_Configured : DEVICE_STATE_Powered; b8c: 87 fd sbrc r24, 7 b8e: 02 c0 rjmp .+4 ; 0xb94 <__stack+0x95> b90: 81 e0 ldi r24, 0x01 ; 1 b92: 01 c0 rjmp .+2 ; 0xb96 <__stack+0x97> b94: 84 e0 ldi r24, 0x04 ; 4 b96: 80 93 18 01 sts 0x0118, r24 ; 0x800118 EVENT_USB_Device_ConfigurationChanged(); b9a: 22 db rcall .-2492 ; 0x1e0 * \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise. */ static inline bool Endpoint_IsSETUPReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsSETUPReceived(void) { return ((UEINTX & (1 << RXSTPI)) ? true : false); b9c: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> default: break; } } if (Endpoint_IsSETUPReceived()) ba0: 83 ff sbrs r24, 3 ba2: 0a c0 rjmp .+20 ; 0xbb8 <__stack+0xb9> * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); ba4: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> ba8: 87 7f andi r24, 0xF7 ; 247 baa: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> * \ingroup Group_EndpointPacketManagement_AVR8 */ static inline void Endpoint_StallTransaction(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_StallTransaction(void) { UECONX |= (1 << STALLRQ); bae: 80 91 eb 00 lds r24, 0x00EB ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> bb2: 80 62 ori r24, 0x20 ; 32 bb4: 80 93 eb 00 sts 0x00EB, r24 ; 0x8000eb <__TEXT_REGION_LENGTH__+0x7e00eb> { Endpoint_ClearSETUP(); Endpoint_StallTransaction(); } } bb8: aa 96 adiw r28, 0x2a ; 42 bba: 0f b6 in r0, 0x3f ; 63 bbc: f8 94 cli bbe: de bf out 0x3e, r29 ; 62 bc0: 0f be out 0x3f, r0 ; 63 bc2: cd bf out 0x3d, r28 ; 61 bc4: df 91 pop r29 bc6: cf 91 pop r28 bc8: 1f 91 pop r17 bca: 08 95 ret 00000bcc : #define __INCLUDE_FROM_EVENTS_C #define __INCLUDE_FROM_USB_DRIVER #include "Events.h" void USB_Event_Stub(void) { bcc: 08 95 ret 00000bce : #if defined(USB_CAN_BE_DEVICE) && !defined(DEVICE_STATE_AS_GPIOR) volatile uint8_t USB_DeviceState; #endif void USB_USBTask(void) { bce: cf 93 push r28 } #if defined(USB_CAN_BE_DEVICE) static void USB_DeviceTask(void) { if (USB_DeviceState == DEVICE_STATE_Unattached) bd0: 80 91 18 01 lds r24, 0x0118 ; 0x800118 bd4: 88 23 and r24, r24 bd6: 99 f0 breq .+38 ; 0xbfe */ static inline uint8_t Endpoint_GetCurrentEndpoint(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_GetCurrentEndpoint(void) { #if !defined(CONTROL_ONLY_DEVICE) return ((UENUM & ENDPOINT_EPNUM_MASK) | Endpoint_GetEndpointDirection()); bd8: c0 91 e9 00 lds r28, 0x00E9 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> bdc: cf 70 andi r28, 0x0F ; 15 * \return The currently selected endpoint's direction, as a \c ENDPOINT_DIR_* mask. */ static inline uint8_t Endpoint_GetEndpointDirection(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_GetEndpointDirection(void) { return (UECFG0X & (1 << EPDIR)) ? ENDPOINT_DIR_IN : ENDPOINT_DIR_OUT; bde: 90 91 ec 00 lds r25, 0x00EC ; 0x8000ec <__TEXT_REGION_LENGTH__+0x7e00ec> be2: 89 2f mov r24, r25 be4: 81 70 andi r24, 0x01 ; 1 be6: 90 fd sbrc r25, 0 be8: 80 e8 ldi r24, 0x80 ; 128 */ static inline uint8_t Endpoint_GetCurrentEndpoint(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline uint8_t Endpoint_GetCurrentEndpoint(void) { #if !defined(CONTROL_ONLY_DEVICE) return ((UENUM & ENDPOINT_EPNUM_MASK) | Endpoint_GetEndpointDirection()); bea: c8 2b or r28, r24 */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); bec: 10 92 e9 00 sts 0x00E9, r1 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> * \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise. */ static inline bool Endpoint_IsSETUPReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsSETUPReceived(void) { return ((UEINTX & (1 << RXSTPI)) ? true : false); bf0: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); if (Endpoint_IsSETUPReceived()) bf4: 83 fd sbrc r24, 3 USB_Device_ProcessControlRequest(); bf6: 89 de rcall .-750 ; 0x90a */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); bf8: cf 70 andi r28, 0x0F ; 15 bfa: c0 93 e9 00 sts 0x00E9, r28 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> #elif defined(USB_CAN_BE_HOST) USB_HostTask(); #elif defined(USB_CAN_BE_DEVICE) USB_DeviceTask(); #endif } bfe: cf 91 pop r28 c00: 08 95 ret 00000c02 : #define __INCLUDE_FROM_HID_DRIVER #define __INCLUDE_FROM_HID_DEVICE_C #include "HIDClassDevice.h" void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) { c02: 6f 92 push r6 c04: 7f 92 push r7 c06: 8f 92 push r8 c08: 9f 92 push r9 c0a: af 92 push r10 c0c: bf 92 push r11 c0e: cf 92 push r12 c10: df 92 push r13 c12: ef 92 push r14 c14: ff 92 push r15 c16: 0f 93 push r16 c18: 1f 93 push r17 c1a: cf 93 push r28 c1c: df 93 push r29 c1e: 00 d0 rcall .+0 ; 0xc20 c20: 1f 92 push r1 c22: cd b7 in r28, 0x3d ; 61 c24: de b7 in r29, 0x3e ; 62 c26: 7c 01 movw r14, r24 Endpoint_ClearStatusStage(); } break; } } c28: ad b6 in r10, 0x3d ; 61 c2a: be b6 in r11, 0x3e ; 62 * \return Boolean \c true if the selected endpoint has received a SETUP packet, \c false otherwise. */ static inline bool Endpoint_IsSETUPReceived(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsSETUPReceived(void) { return ((UEINTX & (1 << RXSTPI)) ? true : false); c2c: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> #define __INCLUDE_FROM_HID_DEVICE_C #include "HIDClassDevice.h" void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) { if (!(Endpoint_IsSETUPReceived())) c30: 83 ff sbrs r24, 3 c32: 03 c1 rjmp .+518 ; 0xe3a return; if (USB_ControlRequest.wIndex != HIDInterfaceInfo->Config.InterfaceNumber) c34: f7 01 movw r30, r14 c36: 80 81 ld r24, Z c38: 90 e0 ldi r25, 0x00 ; 0 c3a: 20 91 1d 01 lds r18, 0x011D ; 0x80011d c3e: 30 91 1e 01 lds r19, 0x011E ; 0x80011e c42: 28 17 cp r18, r24 c44: 39 07 cpc r19, r25 c46: 09 f0 breq .+2 ; 0xc4a c48: f8 c0 rjmp .+496 ; 0xe3a return; switch (USB_ControlRequest.bRequest) c4a: 80 91 1a 01 lds r24, 0x011A ; 0x80011a c4e: 83 30 cpi r24, 0x03 ; 3 c50: 09 f4 brne .+2 ; 0xc54 c52: 9a c0 rjmp .+308 ; 0xd88 c54: 30 f4 brcc .+12 ; 0xc62 c56: 81 30 cpi r24, 0x01 ; 1 c58: 71 f0 breq .+28 ; 0xc76 c5a: 82 30 cpi r24, 0x02 ; 2 c5c: 09 f4 brne .+2 ; 0xc60 c5e: d1 c0 rjmp .+418 ; 0xe02 c60: ec c0 rjmp .+472 ; 0xe3a c62: 8a 30 cpi r24, 0x0A ; 10 c64: 09 f4 brne .+2 ; 0xc68 c66: b5 c0 rjmp .+362 ; 0xdd2 c68: 8b 30 cpi r24, 0x0B ; 11 c6a: 09 f4 brne .+2 ; 0xc6e c6c: 9e c0 rjmp .+316 ; 0xdaa c6e: 89 30 cpi r24, 0x09 ; 9 c70: 09 f0 breq .+2 ; 0xc74 c72: e3 c0 rjmp .+454 ; 0xe3a c74: 4c c0 rjmp .+152 ; 0xd0e { case HID_REQ_GetReport: if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) c76: 80 91 19 01 lds r24, 0x0119 ; 0x800119 c7a: 81 3a cpi r24, 0xA1 ; 161 c7c: 09 f0 breq .+2 ; 0xc80 c7e: dd c0 rjmp .+442 ; 0xe3a { c80: 8d b6 in r8, 0x3d ; 61 c82: 9e b6 in r9, 0x3e ; 62 uint16_t ReportSize = 0; c84: 1a 82 std Y+2, r1 ; 0x02 c86: 19 82 std Y+1, r1 ; 0x01 uint8_t ReportID = (USB_ControlRequest.wValue & 0xFF); c88: 80 91 1b 01 lds r24, 0x011B ; 0x80011b c8c: 10 91 1c 01 lds r17, 0x011C ; 0x80011c c90: 8b 83 std Y+3, r24 ; 0x03 uint8_t ReportType = (USB_ControlRequest.wValue >> 8) - 1; uint8_t ReportData[HIDInterfaceInfo->Config.PrevReportINBufferSize]; c92: f7 01 movw r30, r14 c94: 80 85 ldd r24, Z+8 ; 0x08 c96: 48 2f mov r20, r24 c98: 50 e0 ldi r21, 0x00 ; 0 c9a: 8d b7 in r24, 0x3d ; 61 c9c: 9e b7 in r25, 0x3e ; 62 c9e: 84 1b sub r24, r20 ca0: 95 0b sbc r25, r21 ca2: 0f b6 in r0, 0x3f ; 63 ca4: f8 94 cli ca6: 9e bf out 0x3e, r25 ; 62 ca8: 0f be out 0x3f, r0 ; 63 caa: 8d bf out 0x3d, r24 ; 61 cac: ed b7 in r30, 0x3d ; 61 cae: fe b7 in r31, 0x3e ; 62 cb0: 31 96 adiw r30, 0x01 ; 1 cb2: 6f 01 movw r12, r30 memset(ReportData, 0, sizeof(ReportData)); cb4: 60 e0 ldi r22, 0x00 ; 0 cb6: 70 e0 ldi r23, 0x00 ; 0 cb8: cf 01 movw r24, r30 cba: b8 d1 rcall .+880 ; 0x102c CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, ReportType, ReportData, &ReportSize); cbc: 4f ef ldi r20, 0xFF ; 255 cbe: 41 0f add r20, r17 cc0: 8e 01 movw r16, r28 cc2: 0f 5f subi r16, 0xFF ; 255 cc4: 1f 4f sbci r17, 0xFF ; 255 cc6: 96 01 movw r18, r12 cc8: be 01 movw r22, r28 cca: 6d 5f subi r22, 0xFD ; 253 ccc: 7f 4f sbci r23, 0xFF ; 255 cce: c7 01 movw r24, r14 cd0: 9f da rcall .-2754 ; 0x210 if (HIDInterfaceInfo->Config.PrevReportINBuffer != NULL) cd2: f7 01 movw r30, r14 cd4: 86 81 ldd r24, Z+6 ; 0x06 cd6: 97 81 ldd r25, Z+7 ; 0x07 cd8: 00 97 sbiw r24, 0x00 ; 0 cda: 21 f0 breq .+8 ; 0xce4 { memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportData, cdc: 40 85 ldd r20, Z+8 ; 0x08 cde: 50 e0 ldi r21, 0x00 ; 0 ce0: b6 01 movw r22, r12 ce2: 9b d1 rcall .+822 ; 0x101a */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); ce4: 10 92 e9 00 sts 0x00E9, r1 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); ce8: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> cec: 87 7f andi r24, 0xF7 ; 247 cee: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); Endpoint_ClearSETUP(); if (ReportID) cf2: 8b 81 ldd r24, Y+3 ; 0x03 cf4: 81 11 cpse r24, r1 * \param[in] Data Data to write into the the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_8(const uint8_t Data) { UEDATX = Data; cf6: 80 93 f1 00 sts 0x00F1, r24 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> Endpoint_Write_8(ReportID); Endpoint_Write_Control_Stream_LE(ReportData, ReportSize); cfa: 69 81 ldd r22, Y+1 ; 0x01 cfc: 7a 81 ldd r23, Y+2 ; 0x02 cfe: c6 01 movw r24, r12 d00: 1e db rcall .-2500 ; 0x33e */ static inline void Endpoint_ClearOUT(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearOUT(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << RXOUTI) | (1 << FIFOCON)); d02: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> d06: 8b 77 andi r24, 0x7B ; 123 d08: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> d0c: 37 c0 rjmp .+110 ; 0xd7c Endpoint_ClearOUT(); } break; case HID_REQ_SetReport: if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) d0e: 80 91 19 01 lds r24, 0x0119 ; 0x800119 d12: 81 32 cpi r24, 0x21 ; 33 d14: 09 f0 breq .+2 ; 0xd18 d16: 91 c0 rjmp .+290 ; 0xe3a { d18: 8d b6 in r8, 0x3d ; 61 d1a: 9e b6 in r9, 0x3e ; 62 uint16_t ReportSize = USB_ControlRequest.wLength; d1c: 00 91 1f 01 lds r16, 0x011F ; 0x80011f d20: 10 91 20 01 lds r17, 0x0120 ; 0x800120 uint8_t ReportID = (USB_ControlRequest.wValue & 0xFF); d24: 70 90 1b 01 lds r7, 0x011B ; 0x80011b d28: 60 90 1c 01 lds r6, 0x011C ; 0x80011c uint8_t ReportType = (USB_ControlRequest.wValue >> 8) - 1; uint8_t ReportData[ReportSize]; d2c: 8d b7 in r24, 0x3d ; 61 d2e: 9e b7 in r25, 0x3e ; 62 d30: 80 1b sub r24, r16 d32: 91 0b sbc r25, r17 d34: 0f b6 in r0, 0x3f ; 63 d36: f8 94 cli d38: 9e bf out 0x3e, r25 ; 62 d3a: 0f be out 0x3f, r0 ; 63 d3c: 8d bf out 0x3d, r24 ; 61 d3e: ed b7 in r30, 0x3d ; 61 d40: fe b7 in r31, 0x3e ; 62 d42: 31 96 adiw r30, 0x01 ; 1 d44: 6f 01 movw r12, r30 * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); d46: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> d4a: 87 7f andi r24, 0xF7 ; 247 d4c: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> Endpoint_ClearSETUP(); Endpoint_Read_Control_Stream_LE(ReportData, ReportSize); d50: b8 01 movw r22, r16 d52: cf 01 movw r24, r30 d54: 52 db rcall .-2396 ; 0x3fa */ static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearIN(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << TXINI) | (1 << FIFOCON)); d56: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> d5a: 8e 77 andi r24, 0x7E ; 126 d5c: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> Endpoint_ClearIN(); CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType, d60: 21 e0 ldi r18, 0x01 ; 1 d62: 71 10 cpse r7, r1 d64: 01 c0 rjmp .+2 ; 0xd68 d66: 20 e0 ldi r18, 0x00 ; 0 d68: 30 e0 ldi r19, 0x00 ; 0 d6a: 02 1b sub r16, r18 d6c: 13 0b sbc r17, r19 &ReportData[ReportID ? 1 : 0], ReportSize - (ReportID ? 1 : 0)); d6e: 2c 0d add r18, r12 Endpoint_ClearSETUP(); Endpoint_Read_Control_Stream_LE(ReportData, ReportSize); Endpoint_ClearIN(); CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType, d70: 3d 1d adc r19, r13 d72: 4f ef ldi r20, 0xFF ; 255 d74: 46 0d add r20, r6 d76: 67 2d mov r22, r7 d78: c7 01 movw r24, r14 d7a: 55 da rcall .-2902 ; 0x226 d7c: 0f b6 in r0, 0x3f ; 63 d7e: f8 94 cli d80: 9e be out 0x3e, r9 ; 62 d82: 0f be out 0x3f, r0 ; 63 d84: 8d be out 0x3d, r8 ; 61 d86: 59 c0 rjmp .+178 ; 0xe3a &ReportData[ReportID ? 1 : 0], ReportSize - (ReportID ? 1 : 0)); } break; case HID_REQ_GetProtocol: if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) d88: 80 91 19 01 lds r24, 0x0119 ; 0x800119 d8c: 81 3a cpi r24, 0xA1 ; 161 d8e: 09 f0 breq .+2 ; 0xd92 d90: 54 c0 rjmp .+168 ; 0xe3a * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); d92: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> d96: 87 7f andi r24, 0xF7 ; 247 d98: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> * \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise. */ static inline bool Endpoint_IsINReady(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsINReady(void) { return ((UEINTX & (1 << TXINI)) ? true : false); d9c: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> { Endpoint_ClearSETUP(); while (!(Endpoint_IsINReady())); da0: 80 ff sbrs r24, 0 da2: fc cf rjmp .-8 ; 0xd9c Endpoint_Write_8(HIDInterfaceInfo->State.UsingReportProtocol); da4: f7 01 movw r30, r14 da6: 81 85 ldd r24, Z+9 ; 0x09 da8: 40 c0 rjmp .+128 ; 0xe2a Endpoint_ClearStatusStage(); } break; case HID_REQ_SetProtocol: if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) daa: 80 91 19 01 lds r24, 0x0119 ; 0x800119 dae: 81 32 cpi r24, 0x21 ; 33 db0: 09 f0 breq .+2 ; 0xdb4 * \note This is not applicable for non CONTROL type endpoints. */ static inline void Endpoint_ClearSETUP(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearSETUP(void) { UEINTX &= ~(1 << RXSTPI); db2: 43 c0 rjmp .+134 ; 0xe3a db4: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> db8: 87 7f andi r24, 0xF7 ; 247 dba: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> { Endpoint_ClearSETUP(); Endpoint_ClearStatusStage(); dbe: 30 dc rcall .-1952 ; 0x620 HIDInterfaceInfo->State.UsingReportProtocol = ((USB_ControlRequest.wValue & 0xFF) != 0x00); dc0: 90 91 1b 01 lds r25, 0x011B ; 0x80011b dc4: 81 e0 ldi r24, 0x01 ; 1 dc6: 91 11 cpse r25, r1 dc8: 01 c0 rjmp .+2 ; 0xdcc dca: 80 e0 ldi r24, 0x00 ; 0 dcc: f7 01 movw r30, r14 dce: 81 87 std Z+9, r24 ; 0x09 dd0: 34 c0 rjmp .+104 ; 0xe3a } break; case HID_REQ_SetIdle: if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) dd2: 80 91 19 01 lds r24, 0x0119 ; 0x800119 dd6: 81 32 cpi r24, 0x21 ; 33 dd8: 81 f5 brne .+96 ; 0xe3a dda: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> dde: 87 7f andi r24, 0xF7 ; 247 de0: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> { Endpoint_ClearSETUP(); Endpoint_ClearStatusStage(); de4: 1d dc rcall .-1990 ; 0x620 HIDInterfaceInfo->State.IdleCount = ((USB_ControlRequest.wValue & 0xFF00) >> 6); de6: 80 91 1b 01 lds r24, 0x011B ; 0x80011b dea: 90 91 1c 01 lds r25, 0x011C ; 0x80011c dee: 88 27 eor r24, r24 df0: 36 e0 ldi r19, 0x06 ; 6 df2: 96 95 lsr r25 df4: 87 95 ror r24 df6: 3a 95 dec r19 df8: e1 f7 brne .-8 ; 0xdf2 dfa: f7 01 movw r30, r14 dfc: 95 87 std Z+13, r25 ; 0x0d dfe: 84 87 std Z+12, r24 ; 0x0c e00: 1c c0 rjmp .+56 ; 0xe3a } break; case HID_REQ_GetIdle: if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) e02: 80 91 19 01 lds r24, 0x0119 ; 0x800119 e06: 81 3a cpi r24, 0xA1 ; 161 e08: c1 f4 brne .+48 ; 0xe3a e0a: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> e0e: 87 7f andi r24, 0xF7 ; 247 e10: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> * \return Boolean \c true if the current endpoint is ready for an IN packet, \c false otherwise. */ static inline bool Endpoint_IsINReady(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsINReady(void) { return ((UEINTX & (1 << TXINI)) ? true : false); e14: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> { Endpoint_ClearSETUP(); while (!(Endpoint_IsINReady())); e18: 80 ff sbrs r24, 0 e1a: fc cf rjmp .-8 ; 0xe14 Endpoint_Write_8(HIDInterfaceInfo->State.IdleCount >> 2); e1c: f7 01 movw r30, r14 e1e: 84 85 ldd r24, Z+12 ; 0x0c e20: 95 85 ldd r25, Z+13 ; 0x0d e22: 96 95 lsr r25 e24: 87 95 ror r24 e26: 96 95 lsr r25 * \param[in] Data Data to write into the the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_8(const uint8_t Data) { UEDATX = Data; e28: 87 95 ror r24 e2a: 80 93 f1 00 sts 0x00F1, r24 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> */ static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearIN(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << TXINI) | (1 << FIFOCON)); e2e: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> e32: 8e 77 andi r24, 0x7E ; 126 e34: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> Endpoint_ClearIN(); Endpoint_ClearStatusStage(); e38: f3 db rcall .-2074 ; 0x620 } break; } } e3a: 0f b6 in r0, 0x3f ; 63 e3c: f8 94 cli e3e: be be out 0x3e, r11 ; 62 e40: 0f be out 0x3f, r0 ; 63 e42: ad be out 0x3d, r10 ; 61 e44: 0f 90 pop r0 e46: 0f 90 pop r0 e48: 0f 90 pop r0 e4a: df 91 pop r29 e4c: cf 91 pop r28 e4e: 1f 91 pop r17 e50: 0f 91 pop r16 e52: ff 90 pop r15 e54: ef 90 pop r14 e56: df 90 pop r13 e58: cf 90 pop r12 e5a: bf 90 pop r11 e5c: af 90 pop r10 e5e: 9f 90 pop r9 e60: 8f 90 pop r8 e62: 7f 90 pop r7 e64: 6f 90 pop r6 e66: 08 95 ret 00000e68 : bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) { memset(&HIDInterfaceInfo->State, 0x00, sizeof(HIDInterfaceInfo->State)); e68: fc 01 movw r30, r24 e6a: 39 96 adiw r30, 0x09 ; 9 e6c: 27 e0 ldi r18, 0x07 ; 7 e6e: df 01 movw r26, r30 e70: 1d 92 st X+, r1 e72: 2a 95 dec r18 e74: e9 f7 brne .-6 ; 0xe70 HIDInterfaceInfo->State.UsingReportProtocol = true; e76: 21 e0 ldi r18, 0x01 ; 1 e78: fc 01 movw r30, r24 e7a: 21 87 std Z+9, r18 ; 0x09 HIDInterfaceInfo->State.IdleCount = 500; e7c: 24 ef ldi r18, 0xF4 ; 244 e7e: 31 e0 ldi r19, 0x01 ; 1 e80: 35 87 std Z+13, r19 ; 0x0d e82: 24 87 std Z+12, r18 ; 0x0c HIDInterfaceInfo->Config.ReportINEndpoint.Type = EP_TYPE_INTERRUPT; e84: 23 e0 ldi r18, 0x03 ; 3 e86: 24 83 std Z+4, r18 ; 0x04 if (!(Endpoint_ConfigureEndpointTable(&HIDInterfaceInfo->Config.ReportINEndpoint, 1))) e88: 61 e0 ldi r22, 0x01 ; 1 e8a: 01 96 adiw r24, 0x01 ; 1 e8c: 8c cb rjmp .-2280 ; 0x5a6 00000e8e : return true; } void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) { e8e: 5f 92 push r5 e90: 6f 92 push r6 e92: 7f 92 push r7 e94: 8f 92 push r8 e96: 9f 92 push r9 e98: af 92 push r10 e9a: bf 92 push r11 e9c: cf 92 push r12 e9e: df 92 push r13 ea0: ef 92 push r14 ea2: ff 92 push r15 ea4: 0f 93 push r16 ea6: 1f 93 push r17 ea8: cf 93 push r28 eaa: df 93 push r29 eac: 00 d0 rcall .+0 ; 0xeae eae: 1f 92 push r1 eb0: cd b7 in r28, 0x3d ; 61 eb2: de b7 in r29, 0x3e ; 62 eb4: 7c 01 movw r14, r24 Endpoint_ClearIN(); } HIDInterfaceInfo->State.PrevFrameNum = USB_Device_GetFrameNumber(); } } eb6: ad b6 in r10, 0x3d ; 61 eb8: be b6 in r11, 0x3e ; 62 return true; } void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) { if (USB_DeviceState != DEVICE_STATE_Configured) eba: 80 91 18 01 lds r24, 0x0118 ; 0x800118 ebe: 84 30 cpi r24, 0x04 ; 4 ec0: 09 f0 breq .+2 ; 0xec4 ec2: 86 c0 rjmp .+268 ; 0xfd0 * \return Current USB frame number from the USB controller. */ static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; static inline uint16_t USB_Device_GetFrameNumber(void) { return UDFNUM; ec4: 80 91 e4 00 lds r24, 0x00E4 ; 0x8000e4 <__TEXT_REGION_LENGTH__+0x7e00e4> ec8: 90 91 e5 00 lds r25, 0x00E5 ; 0x8000e5 <__TEXT_REGION_LENGTH__+0x7e00e5> return; if (HIDInterfaceInfo->State.PrevFrameNum == USB_Device_GetFrameNumber()) ecc: f7 01 movw r30, r14 ece: 22 85 ldd r18, Z+10 ; 0x0a ed0: 33 85 ldd r19, Z+11 ; 0x0b ed2: 28 17 cp r18, r24 ed4: 39 07 cpc r19, r25 ed6: 09 f4 brne .+2 ; 0xeda ed8: 7b c0 rjmp .+246 ; 0xfd0 */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); eda: 81 81 ldd r24, Z+1 ; 0x01 edc: 8f 70 andi r24, 0x0F ; 15 ede: 80 93 e9 00 sts 0x00E9, r24 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> * on its direction. */ static inline bool Endpoint_IsReadWriteAllowed(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline bool Endpoint_IsReadWriteAllowed(void) { return ((UEINTX & (1 << RWAL)) ? true : false); ee2: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> #endif } Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpoint.Address); if (Endpoint_IsReadWriteAllowed()) ee6: 85 ff sbrs r24, 5 ee8: 73 c0 rjmp .+230 ; 0xfd0 { eea: 8d b6 in r8, 0x3d ; 61 eec: 9e b6 in r9, 0x3e ; 62 uint8_t ReportINData[HIDInterfaceInfo->Config.PrevReportINBufferSize]; eee: 40 85 ldd r20, Z+8 ; 0x08 ef0: 50 e0 ldi r21, 0x00 ; 0 ef2: 8d b7 in r24, 0x3d ; 61 ef4: 9e b7 in r25, 0x3e ; 62 ef6: 84 1b sub r24, r20 ef8: 95 0b sbc r25, r21 efa: 0f b6 in r0, 0x3f ; 63 efc: f8 94 cli efe: 9e bf out 0x3e, r25 ; 62 f00: 0f be out 0x3f, r0 ; 63 f02: 8d bf out 0x3d, r24 ; 61 f04: ed b7 in r30, 0x3d ; 61 f06: fe b7 in r31, 0x3e ; 62 f08: 31 96 adiw r30, 0x01 ; 1 f0a: 6f 01 movw r12, r30 uint8_t ReportID = 0; f0c: 1b 82 std Y+3, r1 ; 0x03 uint16_t ReportINSize = 0; f0e: 1a 82 std Y+2, r1 ; 0x02 f10: 19 82 std Y+1, r1 ; 0x01 memset(ReportINData, 0, sizeof(ReportINData)); f12: 60 e0 ldi r22, 0x00 ; 0 f14: 70 e0 ldi r23, 0x00 ; 0 f16: cf 01 movw r24, r30 f18: 89 d0 rcall .+274 ; 0x102c bool ForceSend = CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, HID_REPORT_ITEM_In, f1a: 8e 01 movw r16, r28 f1c: 0f 5f subi r16, 0xFF ; 255 f1e: 1f 4f sbci r17, 0xFF ; 255 f20: 96 01 movw r18, r12 f22: 40 e0 ldi r20, 0x00 ; 0 f24: be 01 movw r22, r28 f26: 6d 5f subi r22, 0xFD ; 253 f28: 7f 4f sbci r23, 0xFF ; 255 f2a: c7 01 movw r24, r14 f2c: 71 d9 rcall .-3358 ; 0x210 f2e: 58 2e mov r5, r24 ReportINData, &ReportINSize); bool StatesChanged = false; bool IdlePeriodElapsed = (HIDInterfaceInfo->State.IdleCount && !(HIDInterfaceInfo->State.IdleMSRemaining)); f30: f7 01 movw r30, r14 f32: 84 85 ldd r24, Z+12 ; 0x0c f34: 95 85 ldd r25, Z+13 ; 0x0d f36: 89 2b or r24, r25 f38: 29 f0 breq .+10 ; 0xf44 f3a: 11 e0 ldi r17, 0x01 ; 1 f3c: 86 85 ldd r24, Z+14 ; 0x0e f3e: 97 85 ldd r25, Z+15 ; 0x0f f40: 89 2b or r24, r25 f42: 09 f0 breq .+2 ; 0xf46 f44: 10 e0 ldi r17, 0x00 ; 0 if (HIDInterfaceInfo->Config.PrevReportINBuffer != NULL) f46: f7 01 movw r30, r14 f48: 66 80 ldd r6, Z+6 ; 0x06 f4a: 77 80 ldd r7, Z+7 ; 0x07 f4c: 61 14 cp r6, r1 f4e: 71 04 cpc r7, r1 f50: 81 f0 breq .+32 ; 0xf72 { StatesChanged = (memcmp(ReportINData, HIDInterfaceInfo->Config.PrevReportINBuffer, ReportINSize) != 0); f52: 49 81 ldd r20, Y+1 ; 0x01 f54: 5a 81 ldd r21, Y+2 ; 0x02 f56: b3 01 movw r22, r6 f58: c6 01 movw r24, r12 f5a: 52 d0 rcall .+164 ; 0x1000 f5c: 01 e0 ldi r16, 0x01 ; 1 f5e: 89 2b or r24, r25 f60: 09 f4 brne .+2 ; 0xf64 f62: 00 e0 ldi r16, 0x00 ; 0 memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportINData, HIDInterfaceInfo->Config.PrevReportINBufferSize); f64: f7 01 movw r30, r14 f66: 40 85 ldd r20, Z+8 ; 0x08 f68: 50 e0 ldi r21, 0x00 ; 0 f6a: b6 01 movw r22, r12 f6c: c3 01 movw r24, r6 f6e: 55 d0 rcall .+170 ; 0x101a f70: 01 c0 rjmp .+2 ; 0xf74 memset(ReportINData, 0, sizeof(ReportINData)); bool ForceSend = CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, HID_REPORT_ITEM_In, ReportINData, &ReportINSize); bool StatesChanged = false; f72: 00 e0 ldi r16, 0x00 ; 0 { StatesChanged = (memcmp(ReportINData, HIDInterfaceInfo->Config.PrevReportINBuffer, ReportINSize) != 0); memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportINData, HIDInterfaceInfo->Config.PrevReportINBufferSize); } if (ReportINSize && (ForceSend || StatesChanged || IdlePeriodElapsed)) f74: 89 81 ldd r24, Y+1 ; 0x01 f76: 9a 81 ldd r25, Y+2 ; 0x02 f78: 89 2b or r24, r25 f7a: f1 f0 breq .+60 ; 0xfb8 f7c: 51 10 cpse r5, r1 f7e: 04 c0 rjmp .+8 ; 0xf88 f80: 01 11 cpse r16, r1 f82: 02 c0 rjmp .+4 ; 0xf88 f84: 10 ff sbrs r17, 0 f86: 18 c0 rjmp .+48 ; 0xfb8 { HIDInterfaceInfo->State.IdleMSRemaining = HIDInterfaceInfo->State.IdleCount; f88: f7 01 movw r30, r14 f8a: 84 85 ldd r24, Z+12 ; 0x0c f8c: 95 85 ldd r25, Z+13 ; 0x0d f8e: 97 87 std Z+15, r25 ; 0x0f f90: 86 87 std Z+14, r24 ; 0x0e */ static inline void Endpoint_SelectEndpoint(const uint8_t Address) ATTR_ALWAYS_INLINE; static inline void Endpoint_SelectEndpoint(const uint8_t Address) { #if !defined(CONTROL_ONLY_DEVICE) UENUM = (Address & ENDPOINT_EPNUM_MASK); f92: 81 81 ldd r24, Z+1 ; 0x01 f94: 8f 70 andi r24, 0x0F ; 15 f96: 80 93 e9 00 sts 0x00E9, r24 ; 0x8000e9 <__TEXT_REGION_LENGTH__+0x7e00e9> Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpoint.Address); if (ReportID) f9a: 8b 81 ldd r24, Y+3 ; 0x03 f9c: 81 11 cpse r24, r1 * \param[in] Data Data to write into the the currently selected endpoint's FIFO buffer. */ static inline void Endpoint_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE; static inline void Endpoint_Write_8(const uint8_t Data) { UEDATX = Data; f9e: 80 93 f1 00 sts 0x00F1, r24 ; 0x8000f1 <__TEXT_REGION_LENGTH__+0x7e00f1> Endpoint_Write_8(ReportID); Endpoint_Write_Stream_LE(ReportINData, ReportINSize, NULL); fa2: 69 81 ldd r22, Y+1 ; 0x01 fa4: 7a 81 ldd r23, Y+2 ; 0x02 fa6: 40 e0 ldi r20, 0x00 ; 0 fa8: 50 e0 ldi r21, 0x00 ; 0 faa: c6 01 movw r24, r12 fac: 7e d9 rcall .-3332 ; 0x2aa */ static inline void Endpoint_ClearIN(void) ATTR_ALWAYS_INLINE; static inline void Endpoint_ClearIN(void) { #if !defined(CONTROL_ONLY_DEVICE) UEINTX &= ~((1 << TXINI) | (1 << FIFOCON)); fae: 80 91 e8 00 lds r24, 0x00E8 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> fb2: 8e 77 andi r24, 0x7E ; 126 fb4: 80 93 e8 00 sts 0x00E8, r24 ; 0x8000e8 <__TEXT_REGION_LENGTH__+0x7e00e8> fb8: 80 91 e4 00 lds r24, 0x00E4 ; 0x8000e4 <__TEXT_REGION_LENGTH__+0x7e00e4> fbc: 90 91 e5 00 lds r25, 0x00E5 ; 0x8000e5 <__TEXT_REGION_LENGTH__+0x7e00e5> Endpoint_ClearIN(); } HIDInterfaceInfo->State.PrevFrameNum = USB_Device_GetFrameNumber(); fc0: f7 01 movw r30, r14 fc2: 93 87 std Z+11, r25 ; 0x0b fc4: 82 87 std Z+10, r24 ; 0x0a fc6: 0f b6 in r0, 0x3f ; 63 fc8: f8 94 cli fca: 9e be out 0x3e, r9 ; 62 fcc: 0f be out 0x3f, r0 ; 63 fce: 8d be out 0x3d, r8 ; 61 } } fd0: 0f b6 in r0, 0x3f ; 63 fd2: f8 94 cli fd4: be be out 0x3e, r11 ; 62 fd6: 0f be out 0x3f, r0 ; 63 fd8: ad be out 0x3d, r10 ; 61 fda: 0f 90 pop r0 fdc: 0f 90 pop r0 fde: 0f 90 pop r0 fe0: df 91 pop r29 fe2: cf 91 pop r28 fe4: 1f 91 pop r17 fe6: 0f 91 pop r16 fe8: ff 90 pop r15 fea: ef 90 pop r14 fec: df 90 pop r13 fee: cf 90 pop r12 ff0: bf 90 pop r11 ff2: af 90 pop r10 ff4: 9f 90 pop r9 ff6: 8f 90 pop r8 ff8: 7f 90 pop r7 ffa: 6f 90 pop r6 ffc: 5f 90 pop r5 ffe: 08 95 ret 00001000 : 1000: fb 01 movw r30, r22 1002: dc 01 movw r26, r24 1004: 04 c0 rjmp .+8 ; 0x100e 1006: 8d 91 ld r24, X+ 1008: 01 90 ld r0, Z+ 100a: 80 19 sub r24, r0 100c: 21 f4 brne .+8 ; 0x1016 100e: 41 50 subi r20, 0x01 ; 1 1010: 50 40 sbci r21, 0x00 ; 0 1012: c8 f7 brcc .-14 ; 0x1006 1014: 88 1b sub r24, r24 1016: 99 0b sbc r25, r25 1018: 08 95 ret 0000101a : 101a: fb 01 movw r30, r22 101c: dc 01 movw r26, r24 101e: 02 c0 rjmp .+4 ; 0x1024 1020: 01 90 ld r0, Z+ 1022: 0d 92 st X+, r0 1024: 41 50 subi r20, 0x01 ; 1 1026: 50 40 sbci r21, 0x00 ; 0 1028: d8 f7 brcc .-10 ; 0x1020 102a: 08 95 ret 0000102c : 102c: dc 01 movw r26, r24 102e: 01 c0 rjmp .+2 ; 0x1032 1030: 6d 93 st X+, r22 1032: 41 50 subi r20, 0x01 ; 1 1034: 50 40 sbci r21, 0x00 ; 0 1036: e0 f7 brcc .-8 ; 0x1030 1038: 08 95 ret 0000103a <_exit>: 103a: f8 94 cli 0000103c <__stop_program>: 103c: ff cf rjmp .-2 ; 0x103c <__stop_program>