Blame | Last modification | View Log | RSS feed
main.elf: file format elf32-avrSections:Idx Name Size VMA LMA File off Algn0 .text 00000976 00000000 00000000 000000b4 2**1CONTENTS, ALLOC, LOAD, READONLY, CODE1 .data 00000002 00800060 00000976 00000a2a 2**0CONTENTS, ALLOC, LOAD, DATA2 .bss 00000039 00800062 00800062 00000a2c 2**0ALLOC3 .fuse 00000003 00820000 00820000 00000a2c 2**0CONTENTS, ALLOC, LOAD, DATA4 .stab 000019c8 00000000 00000000 00000a30 2**2CONTENTS, READONLY, DEBUGGING5 .stabstr 00000145 00000000 00000000 000023f8 2**0CONTENTS, READONLY, DEBUGGING6 .debug_aranges 00000040 00000000 00000000 0000253d 2**0CONTENTS, READONLY, DEBUGGING7 .debug_pubnames 00000207 00000000 00000000 0000257d 2**0CONTENTS, READONLY, DEBUGGING8 .debug_info 000012e3 00000000 00000000 00002784 2**0CONTENTS, READONLY, DEBUGGING9 .debug_abbrev 00000549 00000000 00000000 00003a67 2**0CONTENTS, READONLY, DEBUGGING10 .debug_line 00000976 00000000 00000000 00003fb0 2**0CONTENTS, READONLY, DEBUGGING11 .debug_frame 00000080 00000000 00000000 00004928 2**2CONTENTS, READONLY, DEBUGGING12 .debug_str 0000050f 00000000 00000000 000049a8 2**0CONTENTS, READONLY, DEBUGGING13 .debug_loc 000008c0 00000000 00000000 00004eb7 2**0CONTENTS, READONLY, DEBUGGING14 .debug_pubtypes 0000013a 00000000 00000000 00005777 2**0CONTENTS, READONLY, DEBUGGING15 .debug_ranges 000002b0 00000000 00000000 000058b1 2**0CONTENTS, READONLY, DEBUGGINGDisassembly of section .text:00000000 <__vectors>:0: 5e c0 rjmp .+188 ; 0xbe <__ctors_end>2: 43 c3 rjmp .+1670 ; 0x68a <__vector_1>4: 77 c0 rjmp .+238 ; 0xf4 <__bad_interrupt>6: 76 c0 rjmp .+236 ; 0xf4 <__bad_interrupt>8: 75 c0 rjmp .+234 ; 0xf4 <__bad_interrupt>a: 74 c0 rjmp .+232 ; 0xf4 <__bad_interrupt>c: 73 c0 rjmp .+230 ; 0xf4 <__bad_interrupt>e: 72 c0 rjmp .+228 ; 0xf4 <__bad_interrupt>10: 71 c0 rjmp .+226 ; 0xf4 <__bad_interrupt>12: 70 c0 rjmp .+224 ; 0xf4 <__bad_interrupt>14: 6f c0 rjmp .+222 ; 0xf4 <__bad_interrupt>16: 6e c0 rjmp .+220 ; 0xf4 <__bad_interrupt>18: 6d c0 rjmp .+218 ; 0xf4 <__bad_interrupt>1a: 6c c0 rjmp .+216 ; 0xf4 <__bad_interrupt>1c: 6b c0 rjmp .+214 ; 0xf4 <__bad_interrupt>0000001e <usbDescriptorHidReport>:1e: 05 01 09 05 a1 01 09 01 a1 00 09 30 09 31 15 00 ...........0.1..2e: 25 02 75 02 95 02 81 02 c0 05 09 19 01 29 04 15 %.u..........)..3e: 00 25 01 75 01 95 04 81 02 c0 .%.u......00000048 <usbDescriptorString0>:48: 04 03 09 04 ....0000004c <usbDescriptorStringVendor>:4c: 16 03 76 00 69 00 6b 00 69 00 74 00 73 00 2e 00 ..v.i.k.i.t.s...5c: 63 00 6f 00 6d 00 c.o.m.00000062 <usbDescriptorStringDevice>:62: 28 03 55 00 53 00 42 00 20 00 4e 00 45 00 53 00 (.U.S.B. .N.E.S.72: 20 00 50 00 61 00 64 00 20 00 61 00 64 00 61 00 .P.a.d. .a.d.a.82: 70 00 74 00 65 00 72 00 p.t.e.r.0000008a <usbDescriptorDevice>:8a: 12 01 10 01 00 00 00 08 ea 1d 07 10 00 01 01 02 ................9a: 00 01 ..0000009c <usbDescriptorConfiguration>:9c: 09 02 22 00 01 01 00 80 32 09 04 00 00 01 03 00 ..".....2.......ac: 00 00 09 21 01 01 00 01 22 2a 00 07 05 81 03 08 ...!...."*......bc: 00 0a ..000000be <__ctors_end>:be: 11 24 eor r1, r1c0: 1f be out 0x3f, r1 ; 63c2: cf e5 ldi r28, 0x5F ; 95c4: d2 e0 ldi r29, 0x02 ; 2c6: de bf out 0x3e, r29 ; 62c8: cd bf out 0x3d, r28 ; 61000000ca <__do_copy_data>:ca: 10 e0 ldi r17, 0x00 ; 0cc: a0 e6 ldi r26, 0x60 ; 96ce: b0 e0 ldi r27, 0x00 ; 0d0: e6 e7 ldi r30, 0x76 ; 118d2: f9 e0 ldi r31, 0x09 ; 9d4: 02 c0 rjmp .+4 ; 0xda <__do_copy_data+0x10>d6: 05 90 lpm r0, Z+d8: 0d 92 st X+, r0da: a2 36 cpi r26, 0x62 ; 98dc: b1 07 cpc r27, r17de: d9 f7 brne .-10 ; 0xd6 <__do_copy_data+0xc>000000e0 <__do_clear_bss>:e0: 10 e0 ldi r17, 0x00 ; 0e2: a2 e6 ldi r26, 0x62 ; 98e4: b0 e0 ldi r27, 0x00 ; 0e6: 01 c0 rjmp .+2 ; 0xea <.do_clear_bss_start>000000e8 <.do_clear_bss_loop>:e8: 1d 92 st X+, r1000000ea <.do_clear_bss_start>:ea: ab 39 cpi r26, 0x9B ; 155ec: b1 07 cpc r27, r17ee: e1 f7 brne .-8 ; 0xe8 <.do_clear_bss_loop>f0: 56 d0 rcall .+172 ; 0x19e <main>f2: 3f c4 rjmp .+2174 ; 0x972 <_exit>000000f4 <__bad_interrupt>:f4: 85 cf rjmp .-246 ; 0x0 <__vectors>000000f6 <usbFunctionSetup>:usbMsgLen_t usbFunctionSetup(uchar data[8]) {usbRequest_t *req = (void *)data;return 0; // Nothing implemented}f6: 80 e0 ldi r24, 0x00 ; 0f8: 08 95 ret000000fa <hadUsbReset>:For version 5.x RC oscillators (those with a split range of 2x128 steps, e.g.ATTiny25, ATTiny45, ATTiny85), it may be useful to search for the optimum inboth regions.*/void hadUsbReset(void) {fa: af 92 push r10fc: bf 92 push r11fe: df 92 push r13100: ef 92 push r14102: ff 92 push r15104: 0f 93 push r16106: 1f 93 push r17108: cf 93 push r2810a: df 93 push r2910c: 08 e0 ldi r16, 0x08 ; 810e: 10 e0 ldi r17, 0x00 ; 0* experimental purposes only!*/static void calibrateOscillator(void){uchar step = 128;uchar trialValue = 0, optimumValue;110: ee 24 eor r14, r14* the 12 MHz clock! Use the RC oscillator calibrated to 12 MHz for* experimental purposes only!*/static void calibrateOscillator(void){uchar step = 128;112: 80 e8 ldi r24, 0x80 ; 128114: f8 2e mov r15, r24uchar trialValue = 0, optimumValue;int x, optimumDev, targetValue = (unsigned)(1499 * (double)F_CPU / 10.5e6 + 0.5);/* do a binary search: */do{OSCCAL = trialValue + step;116: df 2c mov r13, r15118: de 0c add r13, r1411a: d1 be out 0x31, r13 ; 49x = usbMeasureFrameLength(); /* proportional to current real frequency */11c: a3 d2 rcall .+1350 ; 0x664 <usbMeasureFrameLength>11e: a8 2e mov r10, r24120: e5 01 movw r28, r10122: 5e 01 movw r10, r28124: b9 2e mov r11, r25126: e5 01 movw r28, r10if(x < targetValue) /* frequency still too low */128: 99 e0 ldi r25, 0x09 ; 912a: c4 33 cpi r28, 0x34 ; 5212c: d9 07 cpc r29, r2512e: 0c f4 brge .+2 ; 0x132 <hadUsbReset+0x38>trialValue += step;130: ed 2c mov r14, r13step >>= 1;132: f6 94 lsr r15134: 01 50 subi r16, 0x01 ; 1136: 10 40 sbci r17, 0x00 ; 0}while(step > 0);138: 71 f7 brne .-36 ; 0x116 <hadUsbReset+0x1c>/* We have a precision of +/- 1 for optimum OSCCAL here *//* now do a neighborhood search for optimum value */optimumValue = trialValue;optimumDev = x; /* this is certainly far away from optimum */for(OSCCAL = trialValue - 1; OSCCAL <= trialValue + 1; OSCCAL++){13a: 8e 2d mov r24, r1413c: 81 50 subi r24, 0x01 ; 113e: 81 bf out 0x31, r24 ; 49140: 81 b7 in r24, 0x31 ; 49142: 0e 2d mov r16, r14144: 10 e0 ldi r17, 0x00 ; 0146: 0f 5f subi r16, 0xFF ; 255148: 1f 4f sbci r17, 0xFF ; 25514a: 90 e0 ldi r25, 0x00 ; 014c: 08 17 cp r16, r2414e: 19 07 cpc r17, r25150: 74 f4 brge .+28 ; 0x16e <hadUsbReset+0x74>152: 16 c0 rjmp .+44 ; 0x180 <hadUsbReset+0x86>x = usbMeasureFrameLength() - targetValue;if(x < 0)x = -x;if(x < optimumDev){154: 8c 17 cp r24, r28156: 9d 07 cpc r25, r29158: 14 f4 brge .+4 ; 0x15e <hadUsbReset+0x64>optimumDev = x;optimumValue = OSCCAL;15a: e1 b6 in r14, 0x31 ; 4915c: ec 01 movw r28, r24}while(step > 0);/* We have a precision of +/- 1 for optimum OSCCAL here *//* now do a neighborhood search for optimum value */optimumValue = trialValue;optimumDev = x; /* this is certainly far away from optimum */for(OSCCAL = trialValue - 1; OSCCAL <= trialValue + 1; OSCCAL++){15e: 81 b7 in r24, 0x31 ; 49160: 8f 5f subi r24, 0xFF ; 255162: 81 bf out 0x31, r24 ; 49164: 81 b7 in r24, 0x31 ; 49166: 90 e0 ldi r25, 0x00 ; 0168: 08 17 cp r16, r2416a: 19 07 cpc r17, r2516c: 4c f0 brlt .+18 ; 0x180 <hadUsbReset+0x86>x = usbMeasureFrameLength() - targetValue;16e: 7a d2 rcall .+1268 ; 0x664 <usbMeasureFrameLength>170: 84 53 subi r24, 0x34 ; 52172: 99 40 sbci r25, 0x09 ; 9174: 97 ff sbrs r25, 7176: ee cf rjmp .-36 ; 0x154 <hadUsbReset+0x5a>178: 90 95 com r2517a: 81 95 neg r2417c: 9f 4f sbci r25, 0xFF ; 25517e: ea cf rjmp .-44 ; 0x154 <hadUsbReset+0x5a>if(x < optimumDev){optimumDev = x;optimumValue = OSCCAL;}}OSCCAL = optimumValue;180: e1 be out 0x31, r14 ; 49both regions.*/void hadUsbReset(void) {calibrateOscillator();eeprom_write_byte(0, OSCCAL); /* store the calibrated value in EEPROM */182: 61 b7 in r22, 0x31 ; 49184: 80 e0 ldi r24, 0x00 ; 0186: 90 e0 ldi r25, 0x00 ; 0188: e6 d3 rcall .+1996 ; 0x956 <__eewr_byte_tn85>}18a: df 91 pop r2918c: cf 91 pop r2818e: 1f 91 pop r17190: 0f 91 pop r16192: ff 90 pop r15194: ef 90 pop r14196: df 90 pop r13198: bf 90 pop r1119a: af 90 pop r1019c: 08 95 ret0000019e <main>:#define STROBE_CLK() sbi(NES_PORT, CLK); \_delay_us(1); \cbi(NES_PORT, CLK); \_delay_us(1);int main(void) {19e: 0f 93 push r161a0: 1f 93 push r17uchar calibrationValue;while (!eeprom_is_ready());1a2: e1 99 sbic 0x1c, 1 ; 281a4: fe cf rjmp .-4 ; 0x1a2 <main+0x4>calibrationValue = eeprom_read_byte(0); /* calibration value from last time */1a6: 80 e0 ldi r24, 0x00 ; 01a8: 90 e0 ldi r25, 0x00 ; 01aa: cd d3 rcall .+1946 ; 0x946 <__eerd_byte_tn85>if(calibrationValue != 0xff) {1ac: 8f 3f cpi r24, 0xFF ; 2551ae: 09 f0 breq .+2 ; 0x1b2 <main+0x14>OSCCAL = calibrationValue;1b0: 81 bf out 0x31, r24 ; 49#else//round up by default__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));#endif__builtin_avr_delay_cycles(__ticks_dc);1b2: 81 e2 ldi r24, 0x21 ; 331b4: 91 ea ldi r25, 0xA1 ; 1611b6: 01 97 sbiw r24, 0x01 ; 11b8: f1 f7 brne .-4 ; 0x1b6 <main+0x18>1ba: 00 c0 rjmp .+0 ; 0x1bc <main+0x1e>1bc: 00 00 nop}_delay_ms(10);ACSR |= (1<<ACD); // Disable analog comparator1be: 47 9a sbi 0x08, 7 ; 8usbDeviceDisconnect(); /* enforce re-enumeration, do this while interrupts are disabled! */1c0: b8 9a sbi 0x17, 0 ; 231c2: 8f e4 ldi r24, 0x4F ; 791c4: 9d e2 ldi r25, 0x2D ; 451c6: a9 e1 ldi r26, 0x19 ; 251c8: 81 50 subi r24, 0x01 ; 11ca: 90 40 sbci r25, 0x00 ; 01cc: a0 40 sbci r26, 0x00 ; 01ce: e1 f7 brne .-8 ; 0x1c8 <main+0x2a>1d0: 00 c0 rjmp .+0 ; 0x1d2 <main+0x34>1d2: 00 00 nop_delay_ms(500);usbDeviceConnect();1d4: b8 98 cbi 0x17, 0 ; 23wdt_enable(WDTO_1S);1d6: 2e e0 ldi r18, 0x0E ; 141d8: 88 e1 ldi r24, 0x18 ; 241da: 90 e0 ldi r25, 0x00 ; 01dc: 0f b6 in r0, 0x3f ; 631de: f8 94 cli1e0: a8 95 wdr1e2: 81 bd out 0x21, r24 ; 331e4: 0f be out 0x3f, r0 ; 631e6: 21 bd out 0x21, r18 ; 33usbInit();1e8: 17 d2 rcall .+1070 ; 0x618 <usbInit>sei();1ea: 78 94 seisbi(NES_DDR, CLK);1ec: bb 9a sbi 0x17, 3 ; 23cbi(NES_DDR, OUT);1ee: b9 98 cbi 0x17, 1 ; 23sbi(NES_DDR, LATCH);1f0: bc 9a sbi 0x17, 4 ; 23cbi(NES_PORT, CLK);1f2: c3 98 cbi 0x18, 3 ; 24cbi(NES_PORT, LATCH);1f4: c4 98 cbi 0x18, 4 ; 24for(;;) {wdt_reset();usbPoll();if(usbInterruptIsReady()){reportBuffer.data = 0x05; // Center pad, little endian1f6: 15 e0 ldi r17, 0x05 ; 5_delay_us(1); // Latch pulse width >= 500nscbi(NES_PORT, LATCH);_delay_us(1); // Propagation time <= 1000nsif(bit_is_clear(NES_PIN, OUT))reportBuffer.A = 1;1f8: 05 e2 ldi r16, 0x25 ; 37cbi(NES_PORT, CLK);cbi(NES_PORT, LATCH);for(;;) {wdt_reset();1fa: a8 95 wdrusbPoll();1fc: cf d0 rcall .+414 ; 0x39c <usbPoll>if(usbInterruptIsReady()){1fe: 80 91 70 00 lds r24, 0x0070202: 84 ff sbrs r24, 4204: fa cf rjmp .-12 ; 0x1fa <main+0x5c>reportBuffer.data = 0x05; // Center pad, little endian206: 10 93 64 00 sts 0x0064, r17sbi(NES_PORT, LATCH);20a: c4 9a sbi 0x18, 4 ; 24#else//round up by default__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));#endif__builtin_avr_delay_cycles(__ticks_dc);20c: 95 e0 ldi r25, 0x05 ; 520e: 9a 95 dec r25210: f1 f7 brne .-4 ; 0x20e <main+0x70>212: 00 c0 rjmp .+0 ; 0x214 <main+0x76>_delay_us(1); // Latch pulse width >= 500nscbi(NES_PORT, LATCH);214: c4 98 cbi 0x18, 4 ; 24216: a5 e0 ldi r26, 0x05 ; 5218: aa 95 dec r2621a: f1 f7 brne .-4 ; 0x218 <main+0x7a>21c: 00 c0 rjmp .+0 ; 0x21e <main+0x80>_delay_us(1); // Propagation time <= 1000nsif(bit_is_clear(NES_PIN, OUT))21e: b1 99 sbic 0x16, 1 ; 22220: 02 c0 rjmp .+4 ; 0x226 <main+0x88>reportBuffer.A = 1;222: 00 93 64 00 sts 0x0064, r16STROBE_CLK();226: c3 9a sbi 0x18, 3 ; 24228: b5 e0 ldi r27, 0x05 ; 522a: ba 95 dec r2722c: f1 f7 brne .-4 ; 0x22a <main+0x8c>22e: 00 c0 rjmp .+0 ; 0x230 <main+0x92>230: c3 98 cbi 0x18, 3 ; 24232: 85 e0 ldi r24, 0x05 ; 5234: 8a 95 dec r24236: f1 f7 brne .-4 ; 0x234 <main+0x96>238: 00 c0 rjmp .+0 ; 0x23a <main+0x9c>if(bit_is_clear(NES_PIN, OUT))23a: b1 99 sbic 0x16, 1 ; 2223c: 05 c0 rjmp .+10 ; 0x248 <main+0xaa>reportBuffer.B = 1;23e: 80 91 64 00 lds r24, 0x0064242: 80 61 ori r24, 0x10 ; 16244: 80 93 64 00 sts 0x0064, r24STROBE_CLK();248: c3 9a sbi 0x18, 3 ; 2424a: 95 e0 ldi r25, 0x05 ; 524c: 9a 95 dec r2524e: f1 f7 brne .-4 ; 0x24c <main+0xae>250: 00 c0 rjmp .+0 ; 0x252 <main+0xb4>252: c3 98 cbi 0x18, 3 ; 24254: a5 e0 ldi r26, 0x05 ; 5256: aa 95 dec r26258: f1 f7 brne .-4 ; 0x256 <main+0xb8>25a: 00 c0 rjmp .+0 ; 0x25c <main+0xbe>if(bit_is_clear(NES_PIN, OUT))25c: b1 99 sbic 0x16, 1 ; 2225e: 05 c0 rjmp .+10 ; 0x26a <__stack+0xb>reportBuffer.SELECT = 1;260: 80 91 64 00 lds r24, 0x0064264: 80 64 ori r24, 0x40 ; 64266: 80 93 64 00 sts 0x0064, r24STROBE_CLK();26a: c3 9a sbi 0x18, 3 ; 2426c: b5 e0 ldi r27, 0x05 ; 526e: ba 95 dec r27270: f1 f7 brne .-4 ; 0x26e <__stack+0xf>272: 00 c0 rjmp .+0 ; 0x274 <__stack+0x15>274: c3 98 cbi 0x18, 3 ; 24276: 85 e0 ldi r24, 0x05 ; 5278: 8a 95 dec r2427a: f1 f7 brne .-4 ; 0x278 <__stack+0x19>27c: 00 c0 rjmp .+0 ; 0x27e <__stack+0x1f>if(bit_is_clear(NES_PIN, OUT))27e: b1 99 sbic 0x16, 1 ; 22280: 05 c0 rjmp .+10 ; 0x28c <__stack+0x2d>reportBuffer.START = 1;282: 80 91 64 00 lds r24, 0x0064286: 80 68 ori r24, 0x80 ; 128288: 80 93 64 00 sts 0x0064, r24STROBE_CLK();28c: c3 9a sbi 0x18, 3 ; 2428e: 95 e0 ldi r25, 0x05 ; 5290: 9a 95 dec r25292: f1 f7 brne .-4 ; 0x290 <__stack+0x31>294: 00 c0 rjmp .+0 ; 0x296 <__stack+0x37>296: c3 98 cbi 0x18, 3 ; 24298: a5 e0 ldi r26, 0x05 ; 529a: aa 95 dec r2629c: f1 f7 brne .-4 ; 0x29a <__stack+0x3b>29e: 00 c0 rjmp .+0 ; 0x2a0 <__stack+0x41>if(bit_is_clear(NES_PIN, OUT))2a0: b1 99 sbic 0x16, 1 ; 222a2: 0d c0 rjmp .+26 ; 0x2be <__stack+0x5f>reportBuffer.Y--;2a4: 90 91 64 00 lds r25, 0x00642a8: 89 2f mov r24, r252aa: 86 95 lsr r242ac: 86 95 lsr r242ae: 8d 5f subi r24, 0xFD ; 2532b0: 83 70 andi r24, 0x03 ; 32b2: 88 0f add r24, r242b4: 88 0f add r24, r242b6: 93 7f andi r25, 0xF3 ; 2432b8: 98 2b or r25, r242ba: 90 93 64 00 sts 0x0064, r25STROBE_CLK();2be: c3 9a sbi 0x18, 3 ; 242c0: b5 e0 ldi r27, 0x05 ; 52c2: ba 95 dec r272c4: f1 f7 brne .-4 ; 0x2c2 <__stack+0x63>2c6: 00 c0 rjmp .+0 ; 0x2c8 <__stack+0x69>2c8: c3 98 cbi 0x18, 3 ; 242ca: 85 e0 ldi r24, 0x05 ; 52cc: 8a 95 dec r242ce: f1 f7 brne .-4 ; 0x2cc <__stack+0x6d>2d0: 00 c0 rjmp .+0 ; 0x2d2 <__stack+0x73>if(bit_is_clear(NES_PIN, OUT))2d2: b1 99 sbic 0x16, 1 ; 222d4: 0d c0 rjmp .+26 ; 0x2f0 <__stack+0x91>reportBuffer.Y++;2d6: 90 91 64 00 lds r25, 0x00642da: 89 2f mov r24, r252dc: 86 95 lsr r242de: 86 95 lsr r242e0: 8f 5f subi r24, 0xFF ; 2552e2: 83 70 andi r24, 0x03 ; 32e4: 88 0f add r24, r242e6: 88 0f add r24, r242e8: 93 7f andi r25, 0xF3 ; 2432ea: 98 2b or r25, r242ec: 90 93 64 00 sts 0x0064, r25STROBE_CLK();2f0: c3 9a sbi 0x18, 3 ; 242f2: 95 e0 ldi r25, 0x05 ; 52f4: 9a 95 dec r252f6: f1 f7 brne .-4 ; 0x2f4 <__stack+0x95>2f8: 00 c0 rjmp .+0 ; 0x2fa <__stack+0x9b>2fa: c3 98 cbi 0x18, 3 ; 242fc: a5 e0 ldi r26, 0x05 ; 52fe: aa 95 dec r26300: f1 f7 brne .-4 ; 0x2fe <__stack+0x9f>302: 00 c0 rjmp .+0 ; 0x304 <__stack+0xa5>if(bit_is_clear(NES_PIN, OUT))304: b1 99 sbic 0x16, 1 ; 22306: 09 c0 rjmp .+18 ; 0x31a <__stack+0xbb>reportBuffer.X--;308: 80 91 64 00 lds r24, 0x006430c: 98 2f mov r25, r2430e: 9d 5f subi r25, 0xFD ; 253310: 93 70 andi r25, 0x03 ; 3312: 8c 7f andi r24, 0xFC ; 252314: 89 2b or r24, r25316: 80 93 64 00 sts 0x0064, r24STROBE_CLK();31a: c3 9a sbi 0x18, 3 ; 2431c: b5 e0 ldi r27, 0x05 ; 531e: ba 95 dec r27320: f1 f7 brne .-4 ; 0x31e <__stack+0xbf>322: 00 c0 rjmp .+0 ; 0x324 <__stack+0xc5>324: c3 98 cbi 0x18, 3 ; 24326: 85 e0 ldi r24, 0x05 ; 5328: 8a 95 dec r2432a: f1 f7 brne .-4 ; 0x328 <__stack+0xc9>32c: 00 c0 rjmp .+0 ; 0x32e <__stack+0xcf>if(bit_is_clear(NES_PIN, OUT))32e: b1 99 sbic 0x16, 1 ; 22330: 09 c0 rjmp .+18 ; 0x344 <__stack+0xe5>reportBuffer.X++;332: 80 91 64 00 lds r24, 0x0064336: 98 2f mov r25, r24338: 9f 5f subi r25, 0xFF ; 25533a: 93 70 andi r25, 0x03 ; 333c: 8c 7f andi r24, 0xFC ; 25233e: 89 2b or r24, r25340: 80 93 64 00 sts 0x0064, r24/* called after every poll of the interrupt endpoint */usbSetInterrupt(&reportBuffer, sizeof(reportBuffer));344: 84 e6 ldi r24, 0x64 ; 100346: 90 e0 ldi r25, 0x00 ; 0348: 61 e0 ldi r22, 0x01 ; 134a: 01 d0 rcall .+2 ; 0x34e <usbSetInterrupt>34c: 56 cf rjmp .-340 ; 0x1fa <main+0x5c>0000034e <usbSetInterrupt>:txStatus->len = len + 4; /* len must be given including sync byte */DBG2(0x21 + (((int)txStatus >> 3) & 3), txStatus->buffer, len + 3);}USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len){34e: 1f 93 push r17350: 16 2f mov r17, r22#if USB_CFG_IMPLEMENT_HALTif(usbTxLen1 == USBPID_STALL)return;#endifif(txStatus->len & 0x10){ /* packet buffer was empty */352: 20 91 70 00 lds r18, 0x0070356: 24 ff sbrs r18, 4358: 1d c0 rjmp .+58 ; 0x394 <usbSetInterrupt+0x46>txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */35a: 20 91 71 00 lds r18, 0x007135e: 38 e8 ldi r19, 0x88 ; 136360: 23 27 eor r18, r19362: 20 93 71 00 sts 0x0071, r18}else{txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */366: a8 2f mov r26, r24368: b9 2f mov r27, r25usbCrc16Append(&txStatus->buffer[1], len);txStatus->len = len + 4; /* len must be given including sync byte */DBG2(0x21 + (((int)txStatus >> 3) & 3), txStatus->buffer, len + 3);}USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len)36a: 81 2f mov r24, r1736c: 81 50 subi r24, 0x01 ; 136e: 90 e0 ldi r25, 0x00 ; 0370: 8d 58 subi r24, 0x8D ; 141372: 9f 4f sbci r25, 0xFF ; 255374: e2 e7 ldi r30, 0x72 ; 114376: f0 e0 ldi r31, 0x00 ; 0txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */}p = txStatus->buffer + 1;i = len;do{ /* if len == 0, we still copy 1 byte, but that's no problem */*p++ = *data++;378: 2d 91 ld r18, X+37a: 21 93 st Z+, r18}while(--i > 0); /* loop control at the end is 2 bytes shorter than at beginning */37c: e8 17 cp r30, r2437e: f9 07 cpc r31, r25380: d9 f7 brne .-10 ; 0x378 <usbSetInterrupt+0x2a>usbCrc16Append(&txStatus->buffer[1], len);382: 82 e7 ldi r24, 0x72 ; 114384: 90 e0 ldi r25, 0x00 ; 0386: 61 2f mov r22, r17388: 69 d1 rcall .+722 ; 0x65c <usbCrc16Append>txStatus->len = len + 4; /* len must be given including sync byte */38a: 1c 5f subi r17, 0xFC ; 25238c: 10 93 70 00 sts 0x0070, r17}USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len){usbGenericSetInterrupt(data, len, &usbTxStatus1);}390: 1f 91 pop r17392: 08 95 retreturn;#endifif(txStatus->len & 0x10){ /* packet buffer was empty */txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */}else{txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */394: 2a e5 ldi r18, 0x5A ; 90396: 20 93 70 00 sts 0x0070, r1839a: e5 cf rjmp .-54 ; 0x366 <usbSetInterrupt+0x18>0000039c <usbPoll>:}/* ------------------------------------------------------------------------- */USB_PUBLIC void usbPoll(void){39c: 1f 93 push r1739e: cf 93 push r283a0: df 93 push r29schar len;uchar i;len = usbRxLen - 3;3a2: 80 91 81 00 lds r24, 0x00813a6: 83 50 subi r24, 0x03 ; 3if(len >= 0){3a8: 87 fd sbrc r24, 73aa: 09 c0 rjmp .+18 ; 0x3be <usbPoll+0x22>* need data integrity checks with this driver, check the CRC in your app* code and report errors back to the host. Since the ACK was already sent,* retries must be handled on application level.* unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3);*/usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len);3ac: 20 91 7e 00 lds r18, 0x007Eif(usbRxToken < 0x10){ /* OUT to endpoint != 0: endpoint number in usbRxToken */usbFunctionWriteOut(data, len);return;}#endifif(usbRxToken == (uchar)USBPID_SETUP){3b0: 90 91 7d 00 lds r25, 0x007D3b4: 9d 32 cpi r25, 0x2D ; 453b6: 09 f4 brne .+2 ; 0x3ba <usbPoll+0x1e>3b8: 5d c0 rjmp .+186 ; 0x474 <usbPoll+0xd8>usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len);#if USB_CFG_HAVE_FLOWCONTROLif(usbRxLen > 0) /* only mark as available if not inactivated */usbRxLen = 0;#elseusbRxLen = 0; /* mark rx buffer as available */3ba: 10 92 81 00 sts 0x0081, r1#endif}if(usbTxLen & 0x10){ /* transmit system idle */3be: 80 91 60 00 lds r24, 0x00603c2: 84 ff sbrs r24, 43c4: 39 c0 rjmp .+114 ; 0x438 <usbPoll+0x9c>if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */3c6: 60 91 61 00 lds r22, 0x00613ca: 6f 3f cpi r22, 0xFF ; 2553cc: a9 f1 breq .+106 ; 0x438 <usbPoll+0x9c>{usbMsgLen_t wantLen;uchar len;wantLen = usbMsgLen;if(wantLen > 8)3ce: 69 30 cpi r22, 0x09 ; 93d0: 08 f4 brcc .+2 ; 0x3d4 <usbPoll+0x38>3d2: 7d c0 rjmp .+250 ; 0x4ce <usbPoll+0x132>wantLen = 8;usbMsgLen -= wantLen;3d4: 68 50 subi r22, 0x08 ; 83d6: 60 93 61 00 sts 0x0061, r22usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */3da: 80 91 65 00 lds r24, 0x00653de: 98 e8 ldi r25, 0x88 ; 1363e0: 89 27 eor r24, r253e2: 80 93 65 00 sts 0x0065, r243e6: 1c e0 ldi r17, 0x0C ; 12usbMsgLen_t wantLen;uchar len;wantLen = usbMsgLen;if(wantLen > 8)wantLen = 8;3e8: 68 e0 ldi r22, 0x08 ; 8if(usbMsgFlags & USB_FLG_USE_USER_RW){len = usbFunctionRead(data, len);}else#endif{uchar i = len, *r = usbMsgPtr;3ea: 20 91 7f 00 lds r18, 0x007F3ee: 30 91 80 00 lds r19, 0x0080if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){ /* ROM data */3f2: 80 91 62 00 lds r24, 0x00623f6: 86 ff sbrs r24, 63f8: 80 c0 rjmp .+256 ; 0x4fa <usbPoll+0x15e>#endif}/* ------------------------------------------------------------------------- */USB_PUBLIC void usbPoll(void)3fa: 46 2f mov r20, r223fc: 41 50 subi r20, 0x01 ; 13fe: 50 e0 ldi r21, 0x00 ; 0400: ca 01 movw r24, r20402: 89 59 subi r24, 0x99 ; 153404: 9f 4f sbci r25, 0xFF ; 255406: f9 01 movw r30, r18408: a6 e6 ldi r26, 0x66 ; 10240a: b0 e0 ldi r27, 0x00 ; 0#endif{uchar i = len, *r = usbMsgPtr;if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){ /* ROM data */do{uchar c = USB_READ_FLASH(r); /* assign to char size variable to enforce byte ops */40c: 74 91 lpm r23, Z+*data++ = c;40e: 7d 93 st X+, r23r++;410: 31 96 adiw r30, 0x01 ; 1}while(--i);412: a8 17 cp r26, r24414: b9 07 cpc r27, r25416: d1 f7 brne .-12 ; 0x40c <usbPoll+0x70>#endif}/* ------------------------------------------------------------------------- */USB_PUBLIC void usbPoll(void)418: 4f 5f subi r20, 0xFF ; 25541a: 5f 4f sbci r21, 0xFF ; 255r++;}while(--i);}else{ /* RAM data */do{*data++ = *r++;}while(--i);41c: 42 0f add r20, r1841e: 53 1f adc r21, r19}usbMsgPtr = r;420: 50 93 80 00 sts 0x0080, r21424: 40 93 7f 00 sts 0x007F, r20wantLen = 8;usbMsgLen -= wantLen;usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */len = usbDeviceRead(usbTxBuf + 1, wantLen);if(len <= 8){ /* valid data packet */usbCrc16Append(&usbTxBuf[1], len);428: 86 e6 ldi r24, 0x66 ; 10242a: 90 e0 ldi r25, 0x00 ; 042c: 17 d1 rcall .+558 ; 0x65c <usbCrc16Append>len += 4; /* length including sync byte */if(len < 12) /* a partial package identifies end of message */42e: 1c 30 cpi r17, 0x0C ; 12430: 09 f0 breq .+2 ; 0x434 <usbPoll+0x98>432: 5d c0 rjmp .+186 ; 0x4ee <usbPoll+0x152>usbMsgLen = USB_NO_MSG;}else{len = USBPID_STALL; /* stall the endpoint */usbMsgLen = USB_NO_MSG;}usbTxLen = len;434: 10 93 60 00 sts 0x0060, r17if(usbTxLen & 0x10){ /* transmit system idle */if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */usbBuildTxBlock();}}for(i = 20; i > 0; i--){438: 94 e1 ldi r25, 0x14 ; 20uchar usbLineStatus = USBIN & USBMASK;43a: 86 b3 in r24, 0x16 ; 2243c: 85 70 andi r24, 0x05 ; 5if(usbLineStatus != 0) /* SE0 has ended */43e: 99 f4 brne .+38 ; 0x466 <usbPoll+0xca>if(usbTxLen & 0x10){ /* transmit system idle */if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */usbBuildTxBlock();}}for(i = 20; i > 0; i--){440: 91 50 subi r25, 0x01 ; 1442: d9 f7 brne .-10 ; 0x43a <usbPoll+0x9e>uchar usbLineStatus = USBIN & USBMASK;if(usbLineStatus != 0) /* SE0 has ended */goto isNotReset;}/* RESET condition, called multiple times during reset */usbNewDeviceAddr = 0;444: 10 92 82 00 sts 0x0082, r1usbDeviceAddr = 0;448: 10 92 7c 00 sts 0x007C, r144c: 11 e0 ldi r17, 0x01 ; 1{#ifdef USB_RESET_HOOKstatic uchar wasReset;uchar isReset = !notResetState;if(wasReset != isReset){44e: 80 91 63 00 lds r24, 0x0063452: 18 17 cp r17, r24454: 21 f0 breq .+8 ; 0x45e <usbPoll+0xc2>USB_RESET_HOOK(isReset);456: 11 23 and r17, r17458: 59 f0 breq .+22 ; 0x470 <usbPoll+0xd4>wasReset = isReset;45a: 10 93 63 00 sts 0x0063, r17usbDeviceAddr = 0;usbResetStall();DBG1(0xff, 0, 0);isNotReset:usbHandleResetHook(i);}45e: df 91 pop r29460: cf 91 pop r28462: 1f 91 pop r17464: 08 95 retusbBuildTxBlock();}}for(i = 20; i > 0; i--){uchar usbLineStatus = USBIN & USBMASK;if(usbLineStatus != 0) /* SE0 has ended */466: 11 e0 ldi r17, 0x01 ; 1468: 99 23 and r25, r2546a: 89 f3 breq .-30 ; 0x44e <usbPoll+0xb2>46c: 10 e0 ldi r17, 0x00 ; 046e: ef cf rjmp .-34 ; 0x44e <usbPoll+0xb2>#ifdef USB_RESET_HOOKstatic uchar wasReset;uchar isReset = !notResetState;if(wasReset != isReset){USB_RESET_HOOK(isReset);470: 44 de rcall .-888 ; 0xfa <hadUsbReset>472: f3 cf rjmp .-26 ; 0x45a <usbPoll+0xbe>usbFunctionWriteOut(data, len);return;}#endifif(usbRxToken == (uchar)USBPID_SETUP){if(len != 8) /* Setup size must be always 8 bytes. Ignore otherwise. */474: 88 30 cpi r24, 0x08 ; 8476: 09 f0 breq .+2 ; 0x47a <usbPoll+0xde>478: a0 cf rjmp .-192 ; 0x3ba <usbPoll+0x1e>* need data integrity checks with this driver, check the CRC in your app* code and report errors back to the host. Since the ACK was already sent,* retries must be handled on application level.* unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3);*/usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len);47a: cc e0 ldi r28, 0x0C ; 1247c: d0 e0 ldi r29, 0x00 ; 047e: c2 1b sub r28, r18480: d1 09 sbc r29, r1482: cb 57 subi r28, 0x7B ; 123484: df 4f sbci r29, 0xFF ; 255#endifif(usbRxToken == (uchar)USBPID_SETUP){if(len != 8) /* Setup size must be always 8 bytes. Ignore otherwise. */return;usbMsgLen_t replyLen;usbTxBuf[0] = USBPID_DATA0; /* initialize data toggling */486: 83 ec ldi r24, 0xC3 ; 195488: 80 93 65 00 sts 0x0065, r24usbTxLen = USBPID_NAK; /* abort pending transmit */48c: 8a e5 ldi r24, 0x5A ; 9048e: 80 93 60 00 sts 0x0060, r24usbMsgFlags = 0;492: 10 92 62 00 sts 0x0062, r1uchar type = rq->bmRequestType & USBRQ_TYPE_MASK;496: 88 81 ld r24, Y498: 80 76 andi r24, 0x60 ; 96if(type != USBRQ_TYPE_STANDARD){ /* standard requests are handled by driver */49a: f1 f5 brne .+124 ; 0x518 <usbPoll+0x17c>*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;uchar *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */uchar value = rq->wValue.bytes[0];49c: 9a 81 ldd r25, Y+2 ; 0x02#if USB_CFG_IMPLEMENT_HALTuchar index = rq->wIndex.bytes[0];#endifdataPtr[0] = 0; /* default reply common to USBRQ_GET_STATUS and USBRQ_GET_INTERFACE */49e: 10 92 6e 00 sts 0x006E, r1SWITCH_START(rq->bRequest)4a2: 89 81 ldd r24, Y+1 ; 0x01SWITCH_CASE(USBRQ_GET_STATUS) /* 0 */4a4: 88 23 and r24, r244a6: d9 f5 brne .+118 ; 0x51e <usbPoll+0x182>dataPtr[0] = USB_CFG_IS_SELF_POWERED;#if USB_CFG_IMPLEMENT_HALTif(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81) /* request status for endpoint 1 */dataPtr[0] = usbTxLen1 == USBPID_STALL;#endifdataPtr[1] = 0;4a8: 10 92 6f 00 sts 0x006F, r1* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;uchar *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */4ac: 2e e6 ldi r18, 0x6E ; 1104ae: 30 e0 ldi r19, 0x00 ; 0#if USB_CFG_IMPLEMENT_HALTif(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81) /* request status for endpoint 1 */dataPtr[0] = usbTxLen1 == USBPID_STALL;#endifdataPtr[1] = 0;len = 2;4b0: 82 e0 ldi r24, 0x02 ; 2usbResetStall();#endifSWITCH_DEFAULT /* 7=SET_DESCRIPTOR, 12=SYNC_FRAME *//* Should we add an optional hook here? */SWITCH_ENDusbMsgPtr = dataPtr;4b2: 30 93 80 00 sts 0x0080, r194b6: 20 93 7f 00 sts 0x007F, r18}usbMsgFlags = USB_FLG_USE_USER_RW;}else /* The 'else' prevents that we limit a replyLen of USB_NO_MSG to the maximum transfer len. */#endifif(sizeof(replyLen) < sizeof(rq->wLength.word)){ /* help compiler with optimizing */if(!rq->wLength.bytes[1] && replyLen > rq->wLength.bytes[0]) /* limit length to max */4ba: 9f 81 ldd r25, Y+7 ; 0x074bc: 99 23 and r25, r254be: 21 f4 brne .+8 ; 0x4c8 <usbPoll+0x12c>4c0: 9e 81 ldd r25, Y+6 ; 0x064c2: 98 17 cp r25, r244c4: 08 f4 brcc .+2 ; 0x4c8 <usbPoll+0x12c>4c6: 89 2f mov r24, r25replyLen = rq->wLength.bytes[0];}else{if(replyLen > rq->wLength.word) /* limit length to max */replyLen = rq->wLength.word;}usbMsgLen = replyLen;4c8: 80 93 61 00 sts 0x0061, r244cc: 76 cf rjmp .-276 ; 0x3ba <usbPoll+0x1e>uchar len;wantLen = usbMsgLen;if(wantLen > 8)wantLen = 8;usbMsgLen -= wantLen;4ce: 10 92 61 00 sts 0x0061, r1usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */4d2: 80 91 65 00 lds r24, 0x00654d6: 98 e8 ldi r25, 0x88 ; 1364d8: 89 27 eor r24, r254da: 80 93 65 00 sts 0x0065, r24/* This function is similar to usbFunctionRead(), but it's also called for* data handled automatically by the driver (e.g. descriptor reads).*/static uchar usbDeviceRead(uchar *data, uchar len){if(len > 0){ /* don't bother app with 0 sized reads */4de: 66 23 and r22, r224e0: 09 f0 breq .+2 ; 0x4e4 <usbPoll+0x148>4e2: 82 c0 rjmp .+260 ; 0x5e8 <usbPoll+0x24c>wantLen = 8;usbMsgLen -= wantLen;usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */len = usbDeviceRead(usbTxBuf + 1, wantLen);if(len <= 8){ /* valid data packet */usbCrc16Append(&usbTxBuf[1], len);4e4: 86 e6 ldi r24, 0x66 ; 1024e6: 90 e0 ldi r25, 0x00 ; 04e8: 60 e0 ldi r22, 0x00 ; 04ea: b8 d0 rcall .+368 ; 0x65c <usbCrc16Append>len += 4; /* length including sync byte */4ec: 14 e0 ldi r17, 0x04 ; 4if(len < 12) /* a partial package identifies end of message */usbMsgLen = USB_NO_MSG;4ee: 8f ef ldi r24, 0xFF ; 2554f0: 80 93 61 00 sts 0x0061, r24}else{len = USBPID_STALL; /* stall the endpoint */usbMsgLen = USB_NO_MSG;}usbTxLen = len;4f4: 10 93 60 00 sts 0x0060, r174f8: 9f cf rjmp .-194 ; 0x438 <usbPoll+0x9c>if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){ /* ROM data */do{uchar c = USB_READ_FLASH(r); /* assign to char size variable to enforce byte ops */*data++ = c;r++;}while(--i);4fa: d9 01 movw r26, r18#endif}/* ------------------------------------------------------------------------- */USB_PUBLIC void usbPoll(void)4fc: 46 2f mov r20, r224fe: 41 50 subi r20, 0x01 ; 1500: 50 e0 ldi r21, 0x00 ; 0502: ca 01 movw r24, r20504: 89 59 subi r24, 0x99 ; 153506: 9f 4f sbci r25, 0xFF ; 255508: e6 e6 ldi r30, 0x66 ; 10250a: f0 e0 ldi r31, 0x00 ; 0*data++ = c;r++;}while(--i);}else{ /* RAM data */do{*data++ = *r++;50c: 7d 91 ld r23, X+50e: 71 93 st Z+, r23}while(--i);510: e8 17 cp r30, r24512: f9 07 cpc r31, r25514: d9 f7 brne .-10 ; 0x50c <usbPoll+0x170>516: 80 cf rjmp .-256 ; 0x418 <usbPoll+0x7c>usbTxBuf[0] = USBPID_DATA0; /* initialize data toggling */usbTxLen = USBPID_NAK; /* abort pending transmit */usbMsgFlags = 0;uchar type = rq->bmRequestType & USBRQ_TYPE_MASK;if(type != USBRQ_TYPE_STANDARD){ /* standard requests are handled by driver */replyLen = usbFunctionSetup(data);518: ce 01 movw r24, r2851a: ed dd rcall .-1062 ; 0xf6 <usbFunctionSetup>51c: ce cf rjmp .-100 ; 0x4ba <usbPoll+0x11e>if(value == 0 && index == 0x81){ /* feature 0 == HALT for endpoint == 1 */usbTxLen1 = rq->bRequest == USBRQ_CLEAR_FEATURE ? USBPID_NAK : USBPID_STALL;usbResetDataToggling();}#endifSWITCH_CASE(USBRQ_SET_ADDRESS) /* 5 */51e: 85 30 cpi r24, 0x05 ; 5520: 71 f0 breq .+28 ; 0x53e <usbPoll+0x1a2>usbNewDeviceAddr = value;USB_SET_ADDRESS_HOOK();SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */522: 86 30 cpi r24, 0x06 ; 6524: 91 f0 breq .+36 ; 0x54a <usbPoll+0x1ae>len = usbDriverDescriptor(rq);goto skipMsgPtrAssignment;SWITCH_CASE(USBRQ_GET_CONFIGURATION) /* 8 */526: 88 30 cpi r24, 0x08 ; 8528: 01 f1 breq .+64 ; 0x56a <usbPoll+0x1ce>dataPtr = &usbConfiguration; /* send current configuration value */len = 1;SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */52a: 89 30 cpi r24, 0x09 ; 952c: 11 f1 breq .+68 ; 0x572 <usbPoll+0x1d6>usbConfiguration = value;usbResetStall();SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */52e: 8a 30 cpi r24, 0x0A ; 10530: 71 f1 breq .+92 ; 0x58e <usbPoll+0x1f2>len = 1;#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODESWITCH_CASE(USBRQ_SET_INTERFACE) /* 11 */532: 8b 30 cpi r24, 0x0B ; 11534: 81 f1 breq .+96 ; 0x596 <usbPoll+0x1fa>* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;uchar *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */536: 2e e6 ldi r18, 0x6E ; 110538: 30 e0 ldi r19, 0x00 ; 0/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;53a: 80 e0 ldi r24, 0x00 ; 053c: ba cf rjmp .-140 ; 0x4b2 <usbPoll+0x116>usbTxLen1 = rq->bRequest == USBRQ_CLEAR_FEATURE ? USBPID_NAK : USBPID_STALL;usbResetDataToggling();}#endifSWITCH_CASE(USBRQ_SET_ADDRESS) /* 5 */usbNewDeviceAddr = value;53e: 90 93 82 00 sts 0x0082, r25* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;uchar *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */542: 2e e6 ldi r18, 0x6E ; 110544: 30 e0 ldi r19, 0x00 ; 0/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;546: 80 e0 ldi r24, 0x00 ; 0548: b4 cf rjmp .-152 ; 0x4b2 <usbPoll+0x116>usbTxLen1 = USBPID_NAK;#if USB_CFG_HAVE_INTRIN_ENDPOINT3usbTxLen3 = USBPID_NAK;#endif#endif}54a: 8b 81 ldd r24, Y+3 ; 0x03{usbMsgLen_t len = 0;uchar flags = USB_FLG_MSGPTR_IS_ROM;SWITCH_START(rq->wValue.bytes[1])SWITCH_CASE(USBDESCR_DEVICE) /* 1 */54c: 81 30 cpi r24, 0x01 ; 154e: b9 f0 breq .+46 ; 0x57e <usbPoll+0x1e2>GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_DEVICE, usbDescriptorDevice)SWITCH_CASE(USBDESCR_CONFIG) /* 2 */550: 82 30 cpi r24, 0x02 ; 2552: 91 f1 breq .+100 ; 0x5b8 <usbPoll+0x21c>GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_CONFIGURATION, usbDescriptorConfiguration)SWITCH_CASE(USBDESCR_STRING) /* 3 */554: 83 30 cpi r24, 0x03 ; 3556: 31 f1 breq .+76 ; 0x5a4 <usbPoll+0x208>len = usbFunctionDescriptor(rq);}SWITCH_END#endif /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */#if USB_CFG_DESCR_PROPS_HID_REPORT /* only support HID descriptors if enabled */SWITCH_CASE(USBDESCR_HID) /* 0x21 */558: 81 32 cpi r24, 0x21 ; 3355a: f1 f1 breq .+124 ; 0x5d8 <usbPoll+0x23c>GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_HID, usbDescriptorConfiguration + 18)SWITCH_CASE(USBDESCR_HID_REPORT)/* 0x22 */55c: 82 32 cpi r24, 0x22 ; 3455e: a1 f1 breq .+104 ; 0x5c8 <usbPoll+0x22c>/* usbDriverDescriptor() is similar to usbFunctionDescriptor(), but used* internally for all types of descriptors.*/static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq){usbMsgLen_t len = 0;560: 80 e0 ldi r24, 0x00 ; 0SWITCH_DEFAULTif(USB_CFG_DESCR_PROPS_UNKNOWN & USB_PROP_IS_DYNAMIC){len = usbFunctionDescriptor(rq);}SWITCH_ENDusbMsgFlags = flags;562: 90 e4 ldi r25, 0x40 ; 64564: 90 93 62 00 sts 0x0062, r25568: a8 cf rjmp .-176 ; 0x4ba <usbPoll+0x11e>USB_SET_ADDRESS_HOOK();SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */len = usbDriverDescriptor(rq);goto skipMsgPtrAssignment;SWITCH_CASE(USBRQ_GET_CONFIGURATION) /* 8 */dataPtr = &usbConfiguration; /* send current configuration value */56a: 24 e8 ldi r18, 0x84 ; 13256c: 30 e0 ldi r19, 0x00 ; 0len = 1;56e: 81 e0 ldi r24, 0x01 ; 1570: a0 cf rjmp .-192 ; 0x4b2 <usbPoll+0x116>SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */usbConfiguration = value;572: 90 93 84 00 sts 0x0084, r25* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;uchar *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */576: 2e e6 ldi r18, 0x6E ; 110578: 30 e0 ldi r19, 0x00 ; 0/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;57a: 80 e0 ldi r24, 0x00 ; 057c: 9a cf rjmp .-204 ; 0x4b2 <usbPoll+0x116>usbMsgLen_t len = 0;uchar flags = USB_FLG_MSGPTR_IS_ROM;SWITCH_START(rq->wValue.bytes[1])SWITCH_CASE(USBDESCR_DEVICE) /* 1 */GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_DEVICE, usbDescriptorDevice)57e: 8a e8 ldi r24, 0x8A ; 138580: 90 e0 ldi r25, 0x00 ; 0582: 90 93 80 00 sts 0x0080, r25586: 80 93 7f 00 sts 0x007F, r2458a: 82 e1 ldi r24, 0x12 ; 1858c: ea cf rjmp .-44 ; 0x562 <usbPoll+0x1c6>* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;uchar *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */58e: 2e e6 ldi r18, 0x6E ; 110590: 30 e0 ldi r19, 0x00 ; 0len = 1;SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */usbConfiguration = value;usbResetStall();SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */len = 1;592: 81 e0 ldi r24, 0x01 ; 1594: 8e cf rjmp .-228 ; 0x4b2 <usbPoll+0x116>/* ------------------------------------------------------------------------- */static inline void usbResetDataToggling(void){#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODEUSB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */596: 8b e4 ldi r24, 0x4B ; 75598: 80 93 71 00 sts 0x0071, r24* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;uchar *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */59c: 2e e6 ldi r18, 0x6E ; 11059e: 30 e0 ldi r19, 0x00 ; 0/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for* standard requests instead of class and custom requests.*/static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq){usbMsgLen_t len = 0;5a0: 80 e0 ldi r24, 0x00 ; 05a2: 87 cf rjmp .-242 ; 0x4b2 <usbPoll+0x116>if(USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_RAM)flags = 0;len = usbFunctionDescriptor(rq);#else /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */SWITCH_START(rq->wValue.bytes[0])SWITCH_CASE(0)5a4: 99 23 and r25, r255a6: 19 f5 brne .+70 ; 0x5ee <usbPoll+0x252>GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_0, usbDescriptorString0)5a8: 88 e4 ldi r24, 0x48 ; 725aa: 90 e0 ldi r25, 0x00 ; 05ac: 90 93 80 00 sts 0x0080, r255b0: 80 93 7f 00 sts 0x007F, r245b4: 84 e0 ldi r24, 0x04 ; 45b6: d5 cf rjmp .-86 ; 0x562 <usbPoll+0x1c6>SWITCH_START(rq->wValue.bytes[1])SWITCH_CASE(USBDESCR_DEVICE) /* 1 */GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_DEVICE, usbDescriptorDevice)SWITCH_CASE(USBDESCR_CONFIG) /* 2 */GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_CONFIGURATION, usbDescriptorConfiguration)5b8: 8c e9 ldi r24, 0x9C ; 1565ba: 90 e0 ldi r25, 0x00 ; 05bc: 90 93 80 00 sts 0x0080, r255c0: 80 93 7f 00 sts 0x007F, r245c4: 82 e2 ldi r24, 0x22 ; 345c6: cd cf rjmp .-102 ; 0x562 <usbPoll+0x1c6>#endif /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */#if USB_CFG_DESCR_PROPS_HID_REPORT /* only support HID descriptors if enabled */SWITCH_CASE(USBDESCR_HID) /* 0x21 */GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_HID, usbDescriptorConfiguration + 18)SWITCH_CASE(USBDESCR_HID_REPORT)/* 0x22 */GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_HID_REPORT, usbDescriptorHidReport)5c8: 8e e1 ldi r24, 0x1E ; 305ca: 90 e0 ldi r25, 0x00 ; 05cc: 90 93 80 00 sts 0x0080, r255d0: 80 93 7f 00 sts 0x007F, r245d4: 8a e2 ldi r24, 0x2A ; 425d6: c5 cf rjmp .-118 ; 0x562 <usbPoll+0x1c6>}SWITCH_END#endif /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */#if USB_CFG_DESCR_PROPS_HID_REPORT /* only support HID descriptors if enabled */SWITCH_CASE(USBDESCR_HID) /* 0x21 */GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_HID, usbDescriptorConfiguration + 18)5d8: 8e ea ldi r24, 0xAE ; 1745da: 90 e0 ldi r25, 0x00 ; 05dc: 90 93 80 00 sts 0x0080, r255e0: 80 93 7f 00 sts 0x007F, r245e4: 89 e0 ldi r24, 0x09 ; 95e6: bd cf rjmp .-134 ; 0x562 <usbPoll+0x1c6>/* This function is similar to usbFunctionRead(), but it's also called for* data handled automatically by the driver (e.g. descriptor reads).*/static uchar usbDeviceRead(uchar *data, uchar len){if(len > 0){ /* don't bother app with 0 sized reads */5e8: 16 2f mov r17, r225ea: 1c 5f subi r17, 0xFC ; 2525ec: fe ce rjmp .-516 ; 0x3ea <usbPoll+0x4e>len = usbFunctionDescriptor(rq);#else /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */SWITCH_START(rq->wValue.bytes[0])SWITCH_CASE(0)GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_0, usbDescriptorString0)SWITCH_CASE(1)5ee: 91 30 cpi r25, 0x01 ; 15f0: 59 f0 breq .+22 ; 0x608 <usbPoll+0x26c>GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_VENDOR, usbDescriptorStringVendor)SWITCH_CASE(2)5f2: 92 30 cpi r25, 0x02 ; 25f4: 09 f0 breq .+2 ; 0x5f8 <usbPoll+0x25c>5f6: b4 cf rjmp .-152 ; 0x560 <usbPoll+0x1c4>GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_PRODUCT, usbDescriptorStringDevice)5f8: 82 e6 ldi r24, 0x62 ; 985fa: 90 e0 ldi r25, 0x00 ; 05fc: 90 93 80 00 sts 0x0080, r25600: 80 93 7f 00 sts 0x007F, r24604: 88 e2 ldi r24, 0x28 ; 40606: ad cf rjmp .-166 ; 0x562 <usbPoll+0x1c6>#else /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */SWITCH_START(rq->wValue.bytes[0])SWITCH_CASE(0)GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_0, usbDescriptorString0)SWITCH_CASE(1)GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_VENDOR, usbDescriptorStringVendor)608: 8c e4 ldi r24, 0x4C ; 7660a: 90 e0 ldi r25, 0x00 ; 060c: 90 93 80 00 sts 0x0080, r25610: 80 93 7f 00 sts 0x007F, r24614: 86 e1 ldi r24, 0x16 ; 22616: a5 cf rjmp .-182 ; 0x562 <usbPoll+0x1c6>00000618 <usbInit>:/* ------------------------------------------------------------------------- */USB_PUBLIC void usbInit(void){#if USB_INTR_CFG_SET != 0USB_INTR_CFG |= USB_INTR_CFG_SET;618: 85 b7 in r24, 0x35 ; 5361a: 83 60 ori r24, 0x03 ; 361c: 85 bf out 0x35, r24 ; 53#endif#if USB_INTR_CFG_CLR != 0USB_INTR_CFG &= ~(USB_INTR_CFG_CLR);#endifUSB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT);61e: 8b b7 in r24, 0x3b ; 59620: 80 64 ori r24, 0x40 ; 64622: 8b bf out 0x3b, r24 ; 59/* ------------------------------------------------------------------------- */static inline void usbResetDataToggling(void){#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODEUSB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */624: 8b e4 ldi r24, 0x4B ; 75626: 80 93 71 00 sts 0x0071, r24USB_INTR_CFG &= ~(USB_INTR_CFG_CLR);#endifUSB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT);usbResetDataToggling();#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODEusbTxLen1 = USBPID_NAK;62a: 8a e5 ldi r24, 0x5A ; 9062c: 80 93 70 00 sts 0x0070, r24#if USB_CFG_HAVE_INTRIN_ENDPOINT3usbTxLen3 = USBPID_NAK;#endif#endif}630: 08 95 ret00000632 <usbCrc16>:632: a8 2f mov r26, r24634: b9 2f mov r27, r25636: 80 e0 ldi r24, 0x00 ; 0638: 90 e0 ldi r25, 0x00 ; 063a: 41 e0 ldi r20, 0x01 ; 163c: 50 ea ldi r21, 0xA0 ; 16063e: 60 95 com r22640: 30 e0 ldi r19, 0x00 ; 0642: 09 c0 rjmp .+18 ; 0x656 <usbCrcLoopEntry>00000644 <usbCrcByteLoop>:644: 2d 91 ld r18, X+646: 82 27 eor r24, r1800000648 <usbCrcBitLoop>:648: 97 95 ror r2564a: 87 95 ror r2464c: 10 f0 brcs .+4 ; 0x652 <usbCrcNoXor>64e: 84 27 eor r24, r20650: 95 27 eor r25, r2100000652 <usbCrcNoXor>:652: 30 5e subi r19, 0xE0 ; 224654: c8 f3 brcs .-14 ; 0x648 <usbCrcBitLoop>00000656 <usbCrcLoopEntry>:656: 6f 5f subi r22, 0xFF ; 255658: a8 f3 brcs .-22 ; 0x644 <usbCrcByteLoop>0000065a <usbCrcReady>:65a: 08 95 ret0000065c <usbCrc16Append>:65c: ea df rcall .-44 ; 0x632 <usbCrc16>65e: 8d 93 st X+, r24660: 9d 93 st X+, r25662: 08 95 ret00000664 <usbMeasureFrameLength>:664: a6 e0 ldi r26, 0x06 ; 6666: 88 27 eor r24, r24668: 99 27 eor r25, r250000066a <usbMFTime16>:66a: aa 95 dec r2666c: 69 f0 breq .+26 ; 0x688 <usbMFTimeout>0000066e <usbMFWaitStrobe>:66e: 01 97 sbiw r24, 0x01 ; 1670: e1 f3 breq .-8 ; 0x66a <usbMFTime16>672: b0 99 sbic 0x16, 0 ; 22674: fc cf rjmp .-8 ; 0x66e <usbMFWaitStrobe>00000676 <usbMFWaitIdle>:676: b0 9b sbis 0x16, 0 ; 22678: fe cf rjmp .-4 ; 0x676 <usbMFWaitIdle>67a: 81 e0 ldi r24, 0x01 ; 167c: 99 27 eor r25, r250000067e <usbMFWaitLoop>:67e: a6 b3 in r26, 0x16 ; 22680: 01 96 adiw r24, 0x01 ; 1682: 11 f0 breq .+4 ; 0x688 <usbMFTimeout>684: a5 70 andi r26, 0x05 ; 5686: d9 f7 brne .-10 ; 0x67e <usbMFWaitLoop>00000688 <usbMFTimeout>:688: 08 95 ret0000068a <__vector_1>:68a: cf 93 push r2868c: cf b7 in r28, 0x3f ; 6368e: cf 93 push r2800000690 <waitForJ>:690: c3 95 inc r28692: b0 9b sbis 0x16, 0 ; 22694: e9 f7 brne .-6 ; 0x690 <waitForJ>00000696 <waitForK>:696: b0 9b sbis 0x16, 0 ; 22698: 0b c0 rjmp .+22 ; 0x6b0 <foundK>69a: b0 9b sbis 0x16, 0 ; 2269c: 09 c0 rjmp .+18 ; 0x6b0 <foundK>69e: b0 9b sbis 0x16, 0 ; 226a0: 07 c0 rjmp .+14 ; 0x6b0 <foundK>6a2: b0 9b sbis 0x16, 0 ; 226a4: 05 c0 rjmp .+10 ; 0x6b0 <foundK>6a6: b0 9b sbis 0x16, 0 ; 226a8: 03 c0 rjmp .+6 ; 0x6b0 <foundK>6aa: b0 9b sbis 0x16, 0 ; 226ac: 01 c0 rjmp .+2 ; 0x6b0 <foundK>6ae: d5 c0 rjmp .+426 ; 0x85a <sofError>000006b0 <foundK>:6b0: 0f 92 push r06b2: df 93 push r296b4: c0 91 7e 00 lds r28, 0x007E6b8: dd 27 eor r29, r296ba: cb 57 subi r28, 0x7B ; 1236bc: df 4f sbci r29, 0xFF ; 2556be: 01 2e mov r0, r176c0: b0 9b sbis 0x16, 0 ; 226c2: 03 c0 rjmp .+6 ; 0x6ca <haveTwoBitsK>6c4: df 91 pop r296c6: 0f 90 pop r06c8: e6 cf rjmp .-52 ; 0x696 <waitForK>000006ca <haveTwoBitsK>:6ca: 2f 93 push r186cc: 0f 93 push r166ce: 1f 93 push r176d0: 4f 93 push r206d2: 2f ef ldi r18, 0xFF ; 2556d4: 4f 6f ori r20, 0xFF ; 2556d6: 06 b3 in r16, 0x16 ; 226d8: 00 fb bst r16, 06da: 20 f9 bld r18, 06dc: 5f 93 push r216de: 3f 93 push r196e0: 50 e0 ldi r21, 0x00 ; 06e2: 3b e0 ldi r19, 0x0B ; 116e4: 65 c0 rjmp .+202 ; 0x7b0 <rxbit1>000006e6 <continueWithBit5>:6e6: 16 b3 in r17, 0x16 ; 226e8: 01 26 eor r0, r176ea: 50 29 or r21, r06ec: 50 fd sbrc r21, 06ee: c8 95 lpm6f0: 56 b3 in r21, 0x16 ; 226f2: 01 27 eor r16, r176f4: 00 fb bst r16, 06f6: 25 f9 bld r18, 56f8: 2f 73 andi r18, 0x3F ; 636fa: 06 b3 in r16, 0x16 ; 226fc: b1 f0 breq .+44 ; 0x72a <unstuff5>6fe: 50 27 eor r21, r16700: 10 27 eor r17, r16702: 10 fb bst r17, 0704: 26 f9 bld r18, 600000706 <didUnstuff6>:706: 06 b2 in r0, 0x16 ; 22708: 22 30 cpi r18, 0x02 ; 270a: f0 f0 brcs .+60 ; 0x748 <unstuff6>0000070c <didUnstuff5>:70c: 00 c0 rjmp .+0 ; 0x70e <didUnstuff5+0x2>70e: 16 b3 in r17, 0x16 ; 22710: 01 27 eor r16, r17712: 00 fb bst r16, 0714: 27 f9 bld r18, 700000716 <didUnstuff7>:716: 01 26 eor r0, r17718: 50 29 or r21, r071a: 06 b2 in r0, 0x16 ; 2271c: 24 30 cpi r18, 0x04 ; 471e: e8 f5 brcc .+122 ; 0x79a <rxLoop>00000720 <unstuff7>:720: 4f 77 andi r20, 0x7F ; 127722: 20 68 ori r18, 0x80 ; 128724: 16 b3 in r17, 0x16 ; 22726: 00 00 nop728: f6 cf rjmp .-20 ; 0x716 <didUnstuff7>0000072a <unstuff5>:72a: 50 27 eor r21, r1672c: 4f 7d andi r20, 0xDF ; 22372e: 20 62 ori r18, 0x20 ; 32730: 06 b2 in r0, 0x16 ; 22732: 10 2f mov r17, r16734: 00 00 nop736: 00 c0 rjmp .+0 ; 0x738 <unstuff5+0xe>738: 06 b3 in r16, 0x16 ; 2273a: 00 26 eor r0, r1673c: 50 29 or r21, r073e: 10 27 eor r17, r16740: 10 fb bst r17, 0742: 26 f9 bld r18, 6744: 06 b2 in r0, 0x16 ; 22746: e2 cf rjmp .-60 ; 0x70c <didUnstuff5>00000748 <unstuff6>:748: 4f 7b andi r20, 0xBF ; 19174a: 06 b3 in r16, 0x16 ; 2274c: 20 64 ori r18, 0x40 ; 6474e: 00 c0 rjmp .+0 ; 0x750 <unstuff6+0x8>750: da cf rjmp .-76 ; 0x706 <didUnstuff6>00000752 <unstuff0>:752: 01 26 eor r0, r17754: 50 29 or r21, r0756: 15 70 andi r17, 0x05 ; 5758: 06 b2 in r0, 0x16 ; 2275a: 69 f1 breq .+90 ; 0x7b6 <didUnstuff0>75c: 4e 7f andi r20, 0xFE ; 25475e: 21 60 ori r18, 0x01 ; 1760: 01 2f mov r16, r17762: 16 b3 in r17, 0x16 ; 22764: 28 c0 rjmp .+80 ; 0x7b6 <didUnstuff0>00000766 <unstuff1>:766: 00 26 eor r0, r16768: 50 29 or r21, r076a: 4d 7f andi r20, 0xFD ; 25376c: 06 b2 in r0, 0x16 ; 2276e: 22 60 ori r18, 0x02 ; 2770: 10 2f mov r17, r16772: 29 c0 rjmp .+82 ; 0x7c6 <didUnstuff1>00000774 <unstuff2>:774: 01 26 eor r0, r17776: 50 29 or r21, r0778: 4b 7f andi r20, 0xFB ; 25177a: 06 b2 in r0, 0x16 ; 2277c: 24 60 ori r18, 0x04 ; 477e: 01 2f mov r16, r17780: 2d c0 rjmp .+90 ; 0x7dc <didUnstuff2>00000782 <unstuff3>:782: 16 b3 in r17, 0x16 ; 22784: 01 26 eor r0, r17786: 50 29 or r21, r0788: 47 7f andi r20, 0xF7 ; 24778a: 28 60 ori r18, 0x08 ; 878c: 00 00 nop78e: 06 b2 in r0, 0x16 ; 22790: 2e c0 rjmp .+92 ; 0x7ee <didUnstuff3>00000792 <unstuff4>:792: 4f 7e andi r20, 0xEF ; 239794: 06 b3 in r16, 0x16 ; 22796: 20 61 ori r18, 0x10 ; 16798: 30 c0 rjmp .+96 ; 0x7fa <didUnstuff4>0000079a <rxLoop>:79a: 42 27 eor r20, r1879c: 06 b3 in r16, 0x16 ; 2279e: 49 93 st Y+, r207a0: 00 26 eor r0, r167a2: 50 29 or r21, r07a4: 10 27 eor r17, r167a6: 06 b2 in r0, 0x16 ; 227a8: 4f ef ldi r20, 0xFF ; 2557aa: 10 fb bst r17, 07ac: 20 f9 bld r18, 07ae: 29 7f andi r18, 0xF9 ; 249000007b0 <rxbit1>:7b0: 16 b3 in r17, 0x16 ; 227b2: 79 f2 breq .-98 ; 0x752 <unstuff0>7b4: 15 70 andi r17, 0x05 ; 5000007b6 <didUnstuff0>:7b6: 59 f1 breq .+86 ; 0x80e <se0>7b8: 01 26 eor r0, r177ba: 50 29 or r21, r07bc: 06 b2 in r0, 0x16 ; 227be: 01 27 eor r16, r177c0: 00 fb bst r16, 07c2: 21 f9 bld r18, 17c4: 23 7f andi r18, 0xF3 ; 243000007c6 <didUnstuff1>:7c6: 06 b3 in r16, 0x16 ; 227c8: 71 f2 breq .-100 ; 0x766 <unstuff1>7ca: 00 26 eor r0, r167cc: 50 29 or r21, r07ce: 31 50 subi r19, 0x01 ; 17d0: d0 f0 brcs .+52 ; 0x806 <overflow>7d2: 06 b2 in r0, 0x16 ; 227d4: 10 27 eor r17, r167d6: 10 fb bst r17, 07d8: 22 f9 bld r18, 27da: 27 7e andi r18, 0xE7 ; 231000007dc <didUnstuff2>:7dc: 16 b3 in r17, 0x16 ; 227de: 51 f2 breq .-108 ; 0x774 <unstuff2>7e0: 01 26 eor r0, r177e2: 50 29 or r21, r07e4: 01 27 eor r16, r177e6: 00 fb bst r16, 07e8: 06 b2 in r0, 0x16 ; 227ea: 23 f9 bld r18, 37ec: 2f 7c andi r18, 0xCF ; 207000007ee <didUnstuff3>:7ee: 49 f2 breq .-110 ; 0x782 <unstuff3>7f0: 00 00 nop7f2: 06 b3 in r16, 0x16 ; 227f4: 10 27 eor r17, r167f6: 10 fb bst r17, 07f8: 24 f9 bld r18, 4000007fa <didUnstuff4>:7fa: 00 26 eor r0, r167fc: 50 29 or r21, r07fe: 06 b2 in r0, 0x16 ; 22800: 2f 79 andi r18, 0x9F ; 159802: 39 f2 breq .-114 ; 0x792 <unstuff4>804: 70 cf rjmp .-288 ; 0x6e6 <continueWithBit5>00000806 <overflow>:806: 10 e4 ldi r17, 0x40 ; 64808: 1a bf out 0x3a, r17 ; 580000080a <ignorePacket>:80a: 00 27 eor r16, r1680c: 19 c0 rjmp .+50 ; 0x840 <handleSetupOrOut>0000080e <se0>:80e: 3b 50 subi r19, 0x0B ; 11810: 31 95 neg r19812: c3 1b sub r28, r19814: d0 40 sbci r29, 0x00 ; 0816: 10 e4 ldi r17, 0x40 ; 64818: 1a bf out 0x3a, r17 ; 5881a: 08 81 ld r16, Y81c: 03 3c cpi r16, 0xC3 ; 19581e: 09 f1 breq .+66 ; 0x862 <handleData>820: 0b 34 cpi r16, 0x4B ; 75822: f9 f0 breq .+62 ; 0x862 <handleData>824: 20 91 7c 00 lds r18, 0x007C828: 19 81 ldd r17, Y+1 ; 0x0182a: 11 0f add r17, r1782c: 12 13 cpse r17, r1882e: ed cf rjmp .-38 ; 0x80a <ignorePacket>830: 4a 81 ldd r20, Y+2 ; 0x02832: 44 1f adc r20, r20834: 09 36 cpi r16, 0x69 ; 105836: 51 f1 breq .+84 ; 0x88c <handleIn>838: 0d 32 cpi r16, 0x2D ; 4583a: 11 f0 breq .+4 ; 0x840 <handleSetupOrOut>83c: 01 3e cpi r16, 0xE1 ; 22583e: 29 f7 brne .-54 ; 0x80a <ignorePacket>00000840 <handleSetupOrOut>:840: 00 93 83 00 sts 0x0083, r1600000844 <doReturn>:844: 3f 91 pop r19846: 5f 91 pop r21848: 4f 91 pop r2084a: 1f 91 pop r1784c: 0f 91 pop r1684e: 2f 91 pop r18850: df 91 pop r29852: 0f 90 pop r0854: ca b7 in r28, 0x3a ; 58856: c6 fd sbrc r28, 6858: 1b cf rjmp .-458 ; 0x690 <waitForJ>0000085a <sofError>:85a: cf 91 pop r2885c: cf bf out 0x3f, r28 ; 6385e: cf 91 pop r28860: 18 95 reti00000862 <handleData>:862: 20 91 83 00 lds r18, 0x0083866: 22 23 and r18, r18868: 69 f3 breq .-38 ; 0x844 <doReturn>86a: 10 91 81 00 lds r17, 0x008186e: 11 23 and r17, r17870: 79 f5 brne .+94 ; 0x8d0 <sendNakAndReti>872: 34 30 cpi r19, 0x04 ; 4874: 7a f1 brmi .+94 ; 0x8d4 <sendAckAndReti>876: 30 93 81 00 sts 0x0081, r1987a: 20 93 7d 00 sts 0x007D, r1887e: 10 91 7e 00 lds r17, 0x007E882: 3b e0 ldi r19, 0x0B ; 11884: 31 1b sub r19, r17886: 30 93 7e 00 sts 0x007E, r1988a: 24 c0 rjmp .+72 ; 0x8d4 <sendAckAndReti>0000088c <handleIn>:88c: 00 91 81 00 lds r16, 0x0081890: 01 30 cpi r16, 0x01 ; 1892: f4 f4 brge .+60 ; 0x8d0 <sendNakAndReti>894: 0a e5 ldi r16, 0x5A ; 90896: 4f 70 andi r20, 0x0F ; 15898: 49 f4 brne .+18 ; 0x8ac <handleIn1>89a: 30 91 60 00 lds r19, 0x006089e: 34 fd sbrc r19, 48a0: 1a c0 rjmp .+52 ; 0x8d6 <sendCntAndReti>8a2: 00 93 60 00 sts 0x0060, r168a6: c5 e6 ldi r28, 0x65 ; 1018a8: d0 e0 ldi r29, 0x00 ; 08aa: 19 c0 rjmp .+50 ; 0x8de <usbSendAndReti>000008ac <handleIn1>:8ac: 30 91 70 00 lds r19, 0x00708b0: 34 fd sbrc r19, 48b2: 11 c0 rjmp .+34 ; 0x8d6 <sendCntAndReti>8b4: 00 93 70 00 sts 0x0070, r168b8: c1 e7 ldi r28, 0x71 ; 1138ba: d0 e0 ldi r29, 0x00 ; 08bc: 10 c0 rjmp .+32 ; 0x8de <usbSendAndReti>000008be <bitstuff7>:8be: 05 27 eor r16, r218c0: 10 e0 ldi r17, 0x00 ; 08c2: 00 c0 rjmp .+0 ; 0x8c4 <bitstuff7+0x6>8c4: 21 c0 rjmp .+66 ; 0x908 <didStuff7>000008c6 <bitstuffN>:8c6: 05 27 eor r16, r218c8: 10 e0 ldi r17, 0x00 ; 08ca: c8 95 lpm8cc: 08 bb out 0x18, r16 ; 248ce: 14 c0 rjmp .+40 ; 0x8f8 <didStuffN>000008d0 <sendNakAndReti>:8d0: 3a e5 ldi r19, 0x5A ; 908d2: 01 c0 rjmp .+2 ; 0x8d6 <sendCntAndReti>000008d4 <sendAckAndReti>:8d4: 32 ed ldi r19, 0xD2 ; 210000008d6 <sendCntAndReti>:8d6: 03 2e mov r0, r198d8: c0 e0 ldi r28, 0x00 ; 08da: d0 e0 ldi r29, 0x00 ; 08dc: 32 e0 ldi r19, 0x02 ; 2000008de <usbSendAndReti>:8de: 17 b3 in r17, 0x17 ; 238e0: 15 60 ori r17, 0x05 ; 58e2: c0 9a sbi 0x18, 0 ; 248e4: 08 b3 in r16, 0x18 ; 248e6: 17 bb out 0x17, r17 ; 238e8: 55 e0 ldi r21, 0x05 ; 58ea: 20 e8 ldi r18, 0x80 ; 1288ec: 4f ef ldi r20, 0xFF ; 255000008ee <bitloop>:8ee: 20 ff sbrs r18, 08f0: 05 27 eor r16, r218f2: 08 bb out 0x18, r16 ; 248f4: 27 95 ror r188f6: 17 95 ror r17000008f8 <didStuffN>:8f8: 1c 3f cpi r17, 0xFC ; 2528fa: 28 f7 brcc .-54 ; 0x8c6 <bitstuffN>8fc: 00 00 nop8fe: 45 52 subi r20, 0x25 ; 37900: b0 f7 brcc .-20 ; 0x8ee <bitloop>902: 20 ff sbrs r18, 0904: 05 27 eor r16, r21906: 27 95 ror r1800000908 <didStuff7>:908: 08 bb out 0x18, r16 ; 2490a: 17 95 ror r1790c: 1c 3f cpi r17, 0xFC ; 25290e: b8 f6 brcc .-82 ; 0x8be <bitstuff7>910: 29 91 ld r18, Y+912: 3a 95 dec r19914: 61 f7 brne .-40 ; 0x8ee <bitloop>916: 0a 7f andi r16, 0xFA ; 250918: 10 91 82 00 lds r17, 0x008291c: 11 0f add r17, r1791e: 08 bb out 0x18, r16 ; 24920: c2 50 subi r28, 0x02 ; 2922: d0 40 sbci r29, 0x00 ; 0924: 11 f0 breq .+4 ; 0x92a <skipAddrAssign>926: 10 93 7c 00 sts 0x007C, r170000092a <skipAddrAssign>:92a: 10 e4 ldi r17, 0x40 ; 6492c: 1a bf out 0x3a, r17 ; 5892e: 01 60 ori r16, 0x01 ; 1930: 17 b3 in r17, 0x17 ; 23932: 1a 7f andi r17, 0xFA ; 250934: 40 2f mov r20, r16936: 4a 7f andi r20, 0xFA ; 250938: 54 e0 ldi r21, 0x04 ; 40000093a <se0Delay>:93a: 5a 95 dec r2193c: f1 f7 brne .-4 ; 0x93a <se0Delay>93e: 08 bb out 0x18, r16 ; 24940: 17 bb out 0x17, r17 ; 23942: 48 bb out 0x18, r20 ; 24944: 7f cf rjmp .-258 ; 0x844 <doReturn>00000946 <__eerd_byte_tn85>:946: e1 99 sbic 0x1c, 1 ; 28948: fe cf rjmp .-4 ; 0x946 <__eerd_byte_tn85>94a: 9f bb out 0x1f, r25 ; 3194c: 8e bb out 0x1e, r24 ; 3094e: e0 9a sbi 0x1c, 0 ; 28950: 99 27 eor r25, r25952: 8d b3 in r24, 0x1d ; 29954: 08 95 ret00000956 <__eewr_byte_tn85>:956: 26 2f mov r18, r2200000958 <__eewr_r18_tn85>:958: e1 99 sbic 0x1c, 1 ; 2895a: fe cf rjmp .-4 ; 0x958 <__eewr_r18_tn85>95c: 1c ba out 0x1c, r1 ; 2895e: 9f bb out 0x1f, r25 ; 31960: 8e bb out 0x1e, r24 ; 30962: 2d bb out 0x1d, r18 ; 29964: 0f b6 in r0, 0x3f ; 63966: f8 94 cli968: e2 9a sbi 0x1c, 2 ; 2896a: e1 9a sbi 0x1c, 1 ; 2896c: 0f be out 0x3f, r0 ; 6396e: 01 96 adiw r24, 0x01 ; 1970: 08 95 ret00000972 <_exit>:972: f8 94 cli00000974 <__stop_program>:974: ff cf rjmp .-2 ; 0x974 <__stop_program>