Manette.lss
146 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
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 <ProductString>:
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 <ManufacturerString>:
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 <LanguageString>:
f4: 04 03 09 04 ....
000000f8 <ConfigurationDescriptor>:
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 <DeviceDescriptor>:
11a: 12 01 10 01 00 00 00 08 eb 03 43 20 01 00 01 02 ..........C ....
12a: 00 01 ..
0000012c <JoystickReport>:
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 <main>
19a: 4f c7 rjmp .+3742 ; 0x103a <_exit>
0000019c <__bad_interrupt>:
19c: 31 cf rjmp .-414 ; 0x0 <__vectors>
0000019e <SetupHardware>:
/** 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 <USB_Init>
000001ce <main>:
/** 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 <SetupHardware>
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 <HID_Device_USBTask>
1d8: fa d4 rcall .+2548 ; 0xbce <USB_USBTask>
1da: fb cf rjmp .-10 ; 0x1d2 <main+0x4>
000001dc <EVENT_USB_Device_Connect>:
1dc: 08 95 ret
000001de <EVENT_USB_Device_Disconnect>:
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_USB_Device_ConfigurationChanged>:
/** 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 <HID_Device_ConfigureEndpoints>
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_USB_Device_ControlRequest>:
}
/** 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 <HID_Device_ProcessControlRequest>
000001f8 <EVENT_USB_Device_StartOfFrame>:
* \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 <Joystick_HID_Interface+0xe>
1fc: 90 91 0f 01 lds r25, 0x010F ; 0x80010f <Joystick_HID_Interface+0xf>
200: 00 97 sbiw r24, 0x00 ; 0
202: 29 f0 breq .+10 ; 0x20e <EVENT_USB_Device_StartOfFrame+0x16>
HIDInterfaceInfo->State.IdleMSRemaining--;
204: 01 97 sbiw r24, 0x01 ; 1
206: 90 93 0f 01 sts 0x010F, r25 ; 0x80010f <Joystick_HID_Interface+0xf>
20a: 80 93 0e 01 sts 0x010E, r24 ; 0x80010e <Joystick_HID_Interface+0xe>
20e: 08 95 ret
00000210 <CALLBACK_HID_Device_CreateHIDReport>:
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 <CALLBACK_HID_Device_ProcessHIDReport>:
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 <CALLBACK_USB_GetDescriptor>:
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 <CALLBACK_USB_GetDescriptor+0x42>
232: 58 f4 brcc .+22 ; 0x24a <CALLBACK_USB_GetDescriptor+0x22>
234: 21 30 cpi r18, 0x01 ; 1
236: 31 05 cpc r19, r1
238: 99 f0 breq .+38 ; 0x260 <CALLBACK_USB_GetDescriptor+0x38>
23a: 22 30 cpi r18, 0x02 ; 2
23c: 31 05 cpc r19, r1
23e: 69 f5 brne .+90 ; 0x29a <CALLBACK_USB_GetDescriptor+0x72>
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 <CALLBACK_USB_GetDescriptor+0x7a>
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 <CALLBACK_USB_GetDescriptor+0x68>
250: 22 32 cpi r18, 0x22 ; 34
252: 31 05 cpc r19, r1
254: 11 f5 brne .+68 ; 0x29a <CALLBACK_USB_GetDescriptor+0x72>
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 <CALLBACK_USB_GetDescriptor+0x7a>
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 <CALLBACK_USB_GetDescriptor+0x7a>
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 <CALLBACK_USB_GetDescriptor+0x5c>
272: 28 f0 brcs .+10 ; 0x27e <CALLBACK_USB_GetDescriptor+0x56>
274: 02 97 sbiw r24, 0x02 ; 2
276: 89 f4 brne .+34 ; 0x29a <CALLBACK_USB_GetDescriptor+0x72>
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 <CALLBACK_USB_GetDescriptor+0x60>
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 <CALLBACK_USB_GetDescriptor+0x60>
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 <CALLBACK_USB_GetDescriptor+0x7a>
}
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 <CALLBACK_USB_GetDescriptor+0x7a>
{
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 <Endpoint_Write_Stream_LE>:
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 <Endpoint_WaitUntilReady>
2c2: 81 11 cpse r24, r1
2c4: 33 c0 rjmp .+102 ; 0x32c <Endpoint_Write_Stream_LE+0x82>
2c6: e1 14 cp r14, r1
2c8: f1 04 cpc r15, r1
2ca: 39 f0 breq .+14 ; 0x2da <Endpoint_Write_Stream_LE+0x30>
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 <Endpoint_Write_Stream_LE+0x80>
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 <Endpoint_Write_Stream_LE+0x6e>
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 <USB_USBTask>
2f8: e1 14 cp r14, r1
2fa: f1 04 cpc r15, r1
2fc: 49 f0 breq .+18 ; 0x310 <Endpoint_Write_Stream_LE+0x66>
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 <Endpoint_Write_Stream_LE+0x82>
310: a6 d1 rcall .+844 ; 0x65e <Endpoint_WaitUntilReady>
312: 88 23 and r24, r24
314: 21 f3 breq .-56 ; 0x2de <Endpoint_Write_Stream_LE+0x34>
316: 0a c0 rjmp .+20 ; 0x32c <Endpoint_Write_Stream_LE+0x82>
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 <Endpoint_Write_Stream_LE+0x34>
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 <Endpoint_Write_Control_Stream_LE>:
33e: 20 91 1f 01 lds r18, 0x011F ; 0x80011f <USB_ControlRequest+0x6>
342: 30 91 20 01 lds r19, 0x0120 ; 0x800120 <USB_ControlRequest+0x7>
346: 26 17 cp r18, r22
348: 37 07 cpc r19, r23
34a: 48 f0 brcs .+18 ; 0x35e <Endpoint_Write_Control_Stream_LE+0x20>
34c: 61 15 cp r22, r1
34e: 71 05 cpc r23, r1
350: 39 f4 brne .+14 ; 0x360 <Endpoint_Write_Control_Stream_LE+0x22>
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 <Endpoint_Write_Control_Stream_LE+0x22>
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 <Endpoint_Write_Control_Stream_LE+0x8a>
36a: 80 91 18 01 lds r24, 0x0118 ; 0x800118 <USB_DeviceState>
36e: 88 23 and r24, r24
370: f1 f1 breq .+124 ; 0x3ee <Endpoint_Write_Control_Stream_LE+0xb0>
372: 85 30 cpi r24, 0x05 ; 5
374: f1 f1 breq .+124 ; 0x3f2 <Endpoint_Write_Control_Stream_LE+0xb4>
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 <Endpoint_Write_Control_Stream_LE+0xb8>
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 <Endpoint_Write_Control_Stream_LE+0xa4>
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 <Endpoint_Write_Control_Stream_LE+0x26>
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 <Endpoint_Write_Control_Stream_LE+0x76>
3a0: 88 30 cpi r24, 0x08 ; 8
3a2: 91 05 cpc r25, r1
3a4: 38 f4 brcc .+14 ; 0x3b4 <Endpoint_Write_Control_Stream_LE+0x76>
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 <Endpoint_Write_Control_Stream_LE+0x5c>
3b4: 21 e0 ldi r18, 0x01 ; 1
3b6: 08 97 sbiw r24, 0x08 ; 8
3b8: 09 f0 breq .+2 ; 0x3bc <Endpoint_Write_Control_Stream_LE+0x7e>
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 <Endpoint_Write_Control_Stream_LE+0x26>
3c8: 21 11 cpse r18, r1
3ca: cf cf rjmp .-98 ; 0x36a <Endpoint_Write_Control_Stream_LE+0x2c>
3cc: 0a c0 rjmp .+20 ; 0x3e2 <Endpoint_Write_Control_Stream_LE+0xa4>
3ce: 80 91 18 01 lds r24, 0x0118 ; 0x800118 <USB_DeviceState>
3d2: 88 23 and r24, r24
3d4: 61 f0 breq .+24 ; 0x3ee <Endpoint_Write_Control_Stream_LE+0xb0>
3d6: 85 30 cpi r24, 0x05 ; 5
3d8: 61 f0 breq .+24 ; 0x3f2 <Endpoint_Write_Control_Stream_LE+0xb4>
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 <Endpoint_Write_Control_Stream_LE+0xb8>
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 <Endpoint_Write_Control_Stream_LE+0x90>
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 <Endpoint_Read_Control_Stream_LE>:
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 <USB_DeviceState>
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 <USB_DeviceState>
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 <Endpoint_Write_Control_PStream_LE>:
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 <USB_ControlRequest+0x6>
47e: 30 91 20 01 lds r19, 0x0120 ; 0x800120 <USB_ControlRequest+0x7>
482: 26 17 cp r18, r22
484: 37 07 cpc r19, r23
486: 48 f0 brcs .+18 ; 0x49a <Endpoint_Write_Control_PStream_LE+0x20>
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 <Endpoint_Write_Control_PStream_LE+0x22>
*/
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 <Endpoint_Write_Control_PStream_LE+0x22>
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 <Endpoint_Write_Control_PStream_LE+0x90>
{
uint8_t USB_DeviceState_LCL = USB_DeviceState;
4a6: 80 91 18 01 lds r24, 0x0118 ; 0x800118 <USB_DeviceState>
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
4aa: 88 23 and r24, r24
4ac: 09 f4 brne .+2 ; 0x4b0 <Endpoint_Write_Control_PStream_LE+0x36>
4ae: 40 c0 rjmp .+128 ; 0x530 <Endpoint_Write_Control_PStream_LE+0xb6>
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 <Endpoint_Write_Control_PStream_LE+0x3c>
4b4: 3f c0 rjmp .+126 ; 0x534 <Endpoint_Write_Control_PStream_LE+0xba>
* \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 <Endpoint_Write_Control_PStream_LE+0xbe>
* \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 <Endpoint_Write_Control_PStream_LE+0xaa>
* \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 <Endpoint_Write_Control_PStream_LE+0x26>
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 <Endpoint_Write_Control_PStream_LE+0x7c>
4e0: 88 30 cpi r24, 0x08 ; 8
4e2: 91 05 cpc r25, r1
4e4: 40 f4 brcc .+16 ; 0x4f6 <Endpoint_Write_Control_PStream_LE+0x7c>
{
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 <Endpoint_Write_Control_PStream_LE+0x60>
}
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 <Endpoint_Write_Control_PStream_LE+0x84>
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 <Endpoint_Write_Control_PStream_LE+0x26>
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 <Endpoint_Write_Control_PStream_LE+0x2c>
50e: 0a c0 rjmp .+20 ; 0x524 <Endpoint_Write_Control_PStream_LE+0xaa>
}
}
while (!(Endpoint_IsOUTReceived()))
{
uint8_t USB_DeviceState_LCL = USB_DeviceState;
510: 80 91 18 01 lds r24, 0x0118 ; 0x800118 <USB_DeviceState>
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
514: 88 23 and r24, r24
516: 61 f0 breq .+24 ; 0x530 <Endpoint_Write_Control_PStream_LE+0xb6>
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 <Endpoint_Write_Control_PStream_LE+0xba>
* \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 <Endpoint_Write_Control_PStream_LE+0xbe>
* \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 <Endpoint_Write_Control_PStream_LE+0x96>
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 <Endpoint_ConfigureEndpoint_Prv>:
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 <Endpoint_ConfigureEndpoint_Prv+0x60>
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 <Endpoint_ConfigureEndpoint_Prv+0x1c>
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 <Endpoint_ConfigureEndpoint_Prv+0x22>
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 <Endpoint_ConfigureEndpoint_Prv+0x2a>
562: 9f 5f subi r25, 0xFF ; 255
564: ec cf rjmp .-40 ; 0x53e <Endpoint_ConfigureEndpoint_Prv+0x2>
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 <Endpoint_ConfigureEndpoint_Prv+0x26>
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 <Endpoint_ConfigureEndpointTable>:
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 <Endpoint_ConfigureEndpointTable+0x6e>
5b8: 68 81 ld r22, Y
5ba: 61 11 cpse r22, r1
5bc: 03 c0 rjmp .+6 ; 0x5c4 <Endpoint_ConfigureEndpointTable+0x1e>
5be: 1f 5f subi r17, 0xFF ; 255
5c0: 25 96 adiw r28, 0x05 ; 5
5c2: f8 cf rjmp .-16 ; 0x5b4 <Endpoint_ConfigureEndpointTable+0xe>
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 <Endpoint_ConfigureEndpointTable+0x32>
5d4: 80 e0 ldi r24, 0x00 ; 0
5d6: 1f c0 rjmp .+62 ; 0x616 <Endpoint_ConfigureEndpointTable+0x70>
5d8: 22 30 cpi r18, 0x02 ; 2
5da: 10 f4 brcc .+4 ; 0x5e0 <Endpoint_ConfigureEndpointTable+0x3a>
5dc: 42 e0 ldi r20, 0x02 ; 2
5de: 01 c0 rjmp .+2 ; 0x5e2 <Endpoint_ConfigureEndpointTable+0x3c>
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 <Endpoint_ConfigureEndpointTable+0x50>
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 <Endpoint_ConfigureEndpointTable+0x42>
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 <Endpoint_ConfigureEndpoint_Prv>
60e: 81 11 cpse r24, r1
610: d6 cf rjmp .-84 ; 0x5be <Endpoint_ConfigureEndpointTable+0x18>
612: e0 cf rjmp .-64 ; 0x5d4 <Endpoint_ConfigureEndpointTable+0x2e>
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 <Endpoint_ClearStatusStage>:
void Endpoint_ClearStatusStage(void)
{
if (USB_ControlRequest.bmRequestType & REQDIR_DEVICETOHOST)
620: 80 91 19 01 lds r24, 0x0119 ; 0x800119 <USB_ControlRequest>
624: 87 ff sbrs r24, 7
626: 11 c0 rjmp .+34 ; 0x64a <Endpoint_ClearStatusStage+0x2a>
* \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 <Endpoint_ClearStatusStage+0x1a>
{
if (USB_DeviceState == DEVICE_STATE_Unattached)
630: 80 91 18 01 lds r24, 0x0118 ; 0x800118 <USB_DeviceState>
634: 81 11 cpse r24, r1
636: f8 cf rjmp .-16 ; 0x628 <Endpoint_ClearStatusStage+0x8>
638: 11 c0 rjmp .+34 ; 0x65c <Endpoint_ClearStatusStage+0x3c>
*/
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 <Endpoint_ClearStatusStage+0x38>
}
else
{
while (!(Endpoint_IsINReady()))
{
if (USB_DeviceState == DEVICE_STATE_Unattached)
642: 80 91 18 01 lds r24, 0x0118 ; 0x800118 <USB_DeviceState>
646: 88 23 and r24, r24
648: 49 f0 breq .+18 ; 0x65c <Endpoint_ClearStatusStage+0x3c>
* \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 <Endpoint_ClearStatusStage+0x22>
*/
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 <Endpoint_WaitUntilReady>:
* \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 <Endpoint_WaitUntilReady+0x5c>
* \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 <Endpoint_WaitUntilReady+0x58>
{
if (Endpoint_IsOUTReceived())
return ENDPOINT_READYWAIT_NoError;
}
uint8_t USB_DeviceState_LCL = USB_DeviceState;
67c: 80 91 18 01 lds r24, 0x0118 ; 0x800118 <USB_DeviceState>
if (USB_DeviceState_LCL == DEVICE_STATE_Unattached)
680: 88 23 and r24, r24
682: 99 f0 breq .+38 ; 0x6aa <Endpoint_WaitUntilReady+0x4c>
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 <Endpoint_WaitUntilReady+0x50>
* \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 <Endpoint_WaitUntilReady+0x54>
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 <Endpoint_WaitUntilReady+0xa>
69e: 91 50 subi r25, 0x01 ; 1
{
PreviousFrameNumber = CurrentFrameNumber;
if (!(TimeoutMSRem--))
6a0: 11 f0 breq .+4 ; 0x6a6 <Endpoint_WaitUntilReady+0x48>
6a2: 9a 01 movw r18, r20
6a4: e1 cf rjmp .-62 ; 0x668 <Endpoint_WaitUntilReady+0xa>
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 <Endpoint_WaitUntilReady+0x1e>
if (!(TimeoutMSRem--))
return ENDPOINT_READYWAIT_Timeout;
}
}
}
6c2: 08 95 ret
000006c4 <USB_ResetInterface>:
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_DisableAllInterrupts>
USB_INT_ClearAllInterrupts();
6ce: 52 d0 rcall .+164 ; 0x774 <USB_INT_ClearAllInterrupts>
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 <USB_DeviceState>
}
#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>
USB_Device_ConfigurationNumber = 0;
6f0: 10 92 16 01 sts 0x0116, r1 ; 0x800116 <USB_Device_RemoteWakeupEnabled>
#if !defined(NO_DEVICE_REMOTE_WAKEUP)
USB_Device_RemoteWakeupEnabled = false;
6f4: 10 92 15 01 sts 0x0115, r1 ; 0x800115 <USB_Device_CurrentlySelfPowered>
#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 <Endpoint_ConfigureEndpoint_Prv>
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 <USB_Init>:
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_IsInitialized>
USB_ResetInterface();
762: b0 cf rjmp .-160 ; 0x6c4 <USB_ResetInterface>
00000764 <USB_INT_DisableAllInterrupts>:
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 <USB_INT_ClearAllInterrupts>:
}
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 <EVENT_USB_Device_StartOfFrame>
{
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 <USB_DeviceState>
EVENT_USB_Device_Connect();
7f2: f4 dc rcall .-1560 ; 0x1dc <EVENT_USB_Device_Connect>
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 <USB_DeviceState>
EVENT_USB_Device_Disconnect();
7fc: f0 dc rcall .-1568 ; 0x1de <EVENT_USB_Device_Disconnect>
#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 <USB_DeviceState>
EVENT_USB_Device_Suspend();
834: cb d1 rcall .+918 ; 0xbcc <USB_Event_Stub>
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 <USB_Device_ConfigurationNumber>
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 <USB_DeviceState>
#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 <USB_Event_Stub>
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_DeviceState>
USB_Device_ConfigurationNumber = 0;
8bc: 10 92 14 01 sts 0x0114, r1 ; 0x800114 <USB_Device_ConfigurationNumber>
#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 <Endpoint_ConfigureEndpoint_Prv>
#if defined(INTERRUPT_CONTROL_ENDPOINT)
USB_INT_Enable(USB_INT_RXSTPI);
#endif
EVENT_USB_Device_Reset();
8e6: 72 d1 rcall .+740 ; 0xbcc <USB_Event_Stub>
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 <USB_Device_ProcessControlRequest>:
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 <USB_Device_ProcessControlRequest+0x1a>
*(RequestHeader++) = Endpoint_Read_8();
#endif
EVENT_USB_Device_ControlRequest();
932: 5f dc rcall .-1858 ; 0x1f2 <EVENT_USB_Device_ControlRequest>
* \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 <USB_ControlRequest>
switch (USB_ControlRequest.bRequest)
940: 90 91 1a 01 lds r25, 0x011A ; 0x80011a <USB_ControlRequest+0x1>
944: 95 30 cpi r25, 0x05 ; 5
946: 09 f4 brne .+2 ; 0x94a <USB_Device_ProcessControlRequest+0x40>
948: 83 c0 rjmp .+262 ; 0xa50 <USB_Device_ProcessControlRequest+0x146>
94a: 30 f4 brcc .+12 ; 0x958 <USB_Device_ProcessControlRequest+0x4e>
94c: 91 30 cpi r25, 0x01 ; 1
94e: a9 f1 breq .+106 ; 0x9ba <USB_Device_ProcessControlRequest+0xb0>
950: 68 f0 brcs .+26 ; 0x96c <USB_Device_ProcessControlRequest+0x62>
952: 93 30 cpi r25, 0x03 ; 3
954: 91 f1 breq .+100 ; 0x9ba <USB_Device_ProcessControlRequest+0xb0>
956: 22 c1 rjmp .+580 ; 0xb9c <__stack+0x9d>
958: 98 30 cpi r25, 0x08 ; 8
95a: 09 f4 brne .+2 ; 0x95e <USB_Device_ProcessControlRequest+0x54>
95c: ef c0 rjmp .+478 ; 0xb3c <__stack+0x3d>
95e: 99 30 cpi r25, 0x09 ; 9
960: 09 f4 brne .+2 ; 0x964 <USB_Device_ProcessControlRequest+0x5a>
962: fb c0 rjmp .+502 ; 0xb5a <__stack+0x5b>
964: 96 30 cpi r25, 0x06 ; 6
966: 09 f0 breq .+2 ; 0x96a <USB_Device_ProcessControlRequest+0x60>
968: 19 c1 rjmp .+562 ; 0xb9c <__stack+0x9d>
96a: 94 c0 rjmp .+296 ; 0xa94 <USB_Device_ProcessControlRequest+0x18a>
{
case REQ_GetStatus:
if ((bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) ||
96c: 80 38 cpi r24, 0x80 ; 128
96e: 21 f0 breq .+8 ; 0x978 <USB_Device_ProcessControlRequest+0x6e>
970: 82 38 cpi r24, 0x82 ; 130
972: 09 f0 breq .+2 ; 0x976 <USB_Device_ProcessControlRequest+0x6c>
974: 13 c1 rjmp .+550 ; 0xb9c <__stack+0x9d>
976: 08 c0 rjmp .+16 ; 0x988 <USB_Device_ProcessControlRequest+0x7e>
Endpoint_ClearOUT();
}
static void USB_Device_GetStatus(void)
{
uint8_t CurrentStatus = 0;
978: 80 91 15 01 lds r24, 0x0115 ; 0x800115 <USB_Device_CurrentlySelfPowered>
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 <USB_Device_RemoteWakeupEnabled>
980: 99 23 and r25, r25
982: 89 f0 breq .+34 ; 0x9a6 <USB_Device_ProcessControlRequest+0x9c>
CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;
984: 82 60 ori r24, 0x02 ; 2
986: 0f c0 rjmp .+30 ; 0x9a6 <USB_Device_ProcessControlRequest+0x9c>
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 <USB_ControlRequest+0x4>
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 <USB_Device_ProcessControlRequest+0x8a>
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 <USB_Device_ProcessControlRequest+0xb8>
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 <USB_Device_ProcessControlRequest+0xc2>
9c6: 82 30 cpi r24, 0x02 ; 2
9c8: 61 f0 breq .+24 ; 0x9e2 <USB_Device_ProcessControlRequest+0xd8>
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 <USB_ControlRequest+0x2>
9d0: 81 30 cpi r24, 0x01 ; 1
9d2: 09 f0 breq .+2 ; 0x9d6 <USB_Device_ProcessControlRequest+0xcc>
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 <USB_Device_ProcessControlRequest+0xd2>
9da: 80 e0 ldi r24, 0x00 ; 0
9dc: 80 93 16 01 sts 0x0116, r24 ; 0x800116 <USB_Device_RemoteWakeupEnabled>
9e0: 2e c0 rjmp .+92 ; 0xa3e <USB_Device_ProcessControlRequest+0x134>
}
#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 <USB_ControlRequest+0x2>
9e6: 81 11 cpse r24, r1
9e8: 2a c0 rjmp .+84 ; 0xa3e <USB_Device_ProcessControlRequest+0x134>
{
uint8_t EndpointIndex = ((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK);
9ea: 80 91 1d 01 lds r24, 0x011D ; 0x80011d <USB_ControlRequest+0x4>
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 <USB_Device_ProcessControlRequest+0xf0>
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 <USB_Device_ProcessControlRequest+0x134>
{
if (USB_ControlRequest.bRequest == REQ_SetFeature)
a06: 93 30 cpi r25, 0x03 ; 3
a08: 21 f4 brne .+8 ; 0xa12 <USB_Device_ProcessControlRequest+0x108>
* \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 <USB_Device_ProcessControlRequest+0x130>
* \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 <USB_Device_ProcessControlRequest+0x11e>
a24: 44 0f add r20, r20
a26: 55 1f adc r21, r21
a28: 8a 95 dec r24
a2a: e2 f7 brpl .-8 ; 0xa24 <USB_Device_ProcessControlRequest+0x11a>
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 <Endpoint_ClearStatusStage>
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 <USB_ControlRequest+0x2>
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 <Endpoint_ClearStatusStage>
* \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 <USB_Device_ProcessControlRequest+0x168>
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 <USB_Device_ProcessControlRequest+0x182>
a88: 82 e0 ldi r24, 0x02 ; 2
a8a: 01 c0 rjmp .+2 ; 0xa8e <USB_Device_ProcessControlRequest+0x184>
a8c: 83 e0 ldi r24, 0x03 ; 3
a8e: 80 93 18 01 sts 0x0118, r24 ; 0x800118 <USB_DeviceState>
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 <USB_Device_ProcessControlRequest+0x192>
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 <USB_ControlRequest+0x2>
aa0: 90 91 1c 01 lds r25, 0x011C ; 0x80011c <USB_ControlRequest+0x3>
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 <USB_Device_ProcessControlRequest+0x1cc>
{
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 <USB_Device_ProcessControlRequest+0x1da>
ae0: c7 96 adiw r24, 0x37 ; 55
ae2: 01 c0 rjmp .+2 ; 0xae6 <USB_Device_ProcessControlRequest+0x1dc>
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 <USB_Device_ProcessControlRequest+0x1b8>
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 <Endpoint_Write_Control_Stream_LE>
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 <USB_ControlRequest+0x4>
b0c: 70 91 1e 01 lds r23, 0x011E ; 0x80011e <USB_ControlRequest+0x5>
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 <CALLBACK_USB_GetDescriptor>
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 <Endpoint_Write_Control_PStream_LE>
*/
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 <USB_Device_ConfigurationNumber>
* \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 <USB_Device_ProcessControlRequest+0x13e>
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 <USB_ControlRequest+0x2>
b62: 90 91 1c 01 lds r25, 0x011C ; 0x80011c <USB_ControlRequest+0x3>
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 <USB_ControlRequest+0x2>
b7a: 80 93 14 01 sts 0x0114, r24 ; 0x800114 <USB_Device_ConfigurationNumber>
Endpoint_ClearStatusStage();
b7e: 50 dd rcall .-1376 ; 0x620 <Endpoint_ClearStatusStage>
if (USB_Device_ConfigurationNumber)
b80: 80 91 14 01 lds r24, 0x0114 ; 0x800114 <USB_Device_ConfigurationNumber>
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 <USB_DeviceState>
EVENT_USB_Device_ConfigurationChanged();
b9a: 22 db rcall .-2492 ; 0x1e0 <EVENT_USB_Device_ConfigurationChanged>
* \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 <USB_Event_Stub>:
#define __INCLUDE_FROM_EVENTS_C
#define __INCLUDE_FROM_USB_DRIVER
#include "Events.h"
void USB_Event_Stub(void)
{
bcc: 08 95 ret
00000bce <USB_USBTask>:
#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 <USB_DeviceState>
bd4: 88 23 and r24, r24
bd6: 99 f0 breq .+38 ; 0xbfe <USB_USBTask+0x30>
*/
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 <USB_Device_ProcessControlRequest>
*/
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 <HID_Device_ProcessControlRequest>:
#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 <HID_Device_ProcessControlRequest+0x1e>
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 <HID_Device_ProcessControlRequest+0x238>
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 <USB_ControlRequest+0x4>
c3e: 30 91 1e 01 lds r19, 0x011E ; 0x80011e <USB_ControlRequest+0x5>
c42: 28 17 cp r18, r24
c44: 39 07 cpc r19, r25
c46: 09 f0 breq .+2 ; 0xc4a <HID_Device_ProcessControlRequest+0x48>
c48: f8 c0 rjmp .+496 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
return;
switch (USB_ControlRequest.bRequest)
c4a: 80 91 1a 01 lds r24, 0x011A ; 0x80011a <USB_ControlRequest+0x1>
c4e: 83 30 cpi r24, 0x03 ; 3
c50: 09 f4 brne .+2 ; 0xc54 <HID_Device_ProcessControlRequest+0x52>
c52: 9a c0 rjmp .+308 ; 0xd88 <HID_Device_ProcessControlRequest+0x186>
c54: 30 f4 brcc .+12 ; 0xc62 <HID_Device_ProcessControlRequest+0x60>
c56: 81 30 cpi r24, 0x01 ; 1
c58: 71 f0 breq .+28 ; 0xc76 <HID_Device_ProcessControlRequest+0x74>
c5a: 82 30 cpi r24, 0x02 ; 2
c5c: 09 f4 brne .+2 ; 0xc60 <HID_Device_ProcessControlRequest+0x5e>
c5e: d1 c0 rjmp .+418 ; 0xe02 <HID_Device_ProcessControlRequest+0x200>
c60: ec c0 rjmp .+472 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
c62: 8a 30 cpi r24, 0x0A ; 10
c64: 09 f4 brne .+2 ; 0xc68 <HID_Device_ProcessControlRequest+0x66>
c66: b5 c0 rjmp .+362 ; 0xdd2 <HID_Device_ProcessControlRequest+0x1d0>
c68: 8b 30 cpi r24, 0x0B ; 11
c6a: 09 f4 brne .+2 ; 0xc6e <HID_Device_ProcessControlRequest+0x6c>
c6c: 9e c0 rjmp .+316 ; 0xdaa <HID_Device_ProcessControlRequest+0x1a8>
c6e: 89 30 cpi r24, 0x09 ; 9
c70: 09 f0 breq .+2 ; 0xc74 <HID_Device_ProcessControlRequest+0x72>
c72: e3 c0 rjmp .+454 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
c74: 4c c0 rjmp .+152 ; 0xd0e <HID_Device_ProcessControlRequest+0x10c>
{
case HID_REQ_GetReport:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
c76: 80 91 19 01 lds r24, 0x0119 ; 0x800119 <USB_ControlRequest>
c7a: 81 3a cpi r24, 0xA1 ; 161
c7c: 09 f0 breq .+2 ; 0xc80 <HID_Device_ProcessControlRequest+0x7e>
c7e: dd c0 rjmp .+442 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
{
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 <USB_ControlRequest+0x2>
c8c: 10 91 1c 01 lds r17, 0x011C ; 0x80011c <USB_ControlRequest+0x3>
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 <memset>
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 <CALLBACK_HID_Device_CreateHIDReport>
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 <HID_Device_ProcessControlRequest+0xe2>
{
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 <memcpy>
*/
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 <Endpoint_Write_Control_Stream_LE>
*/
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 <HID_Device_ProcessControlRequest+0x17a>
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 <USB_ControlRequest>
d12: 81 32 cpi r24, 0x21 ; 33
d14: 09 f0 breq .+2 ; 0xd18 <HID_Device_ProcessControlRequest+0x116>
d16: 91 c0 rjmp .+290 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
{
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 <USB_ControlRequest+0x6>
d20: 10 91 20 01 lds r17, 0x0120 ; 0x800120 <USB_ControlRequest+0x7>
uint8_t ReportID = (USB_ControlRequest.wValue & 0xFF);
d24: 70 90 1b 01 lds r7, 0x011B ; 0x80011b <USB_ControlRequest+0x2>
d28: 60 90 1c 01 lds r6, 0x011C ; 0x80011c <USB_ControlRequest+0x3>
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 <Endpoint_Read_Control_Stream_LE>
*/
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 <HID_Device_ProcessControlRequest+0x166>
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 <CALLBACK_HID_Device_ProcessHIDReport>
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 <HID_Device_ProcessControlRequest+0x238>
&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 <USB_ControlRequest>
d8c: 81 3a cpi r24, 0xA1 ; 161
d8e: 09 f0 breq .+2 ; 0xd92 <HID_Device_ProcessControlRequest+0x190>
d90: 54 c0 rjmp .+168 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
* \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 <HID_Device_ProcessControlRequest+0x19a>
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 <HID_Device_ProcessControlRequest+0x228>
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 <USB_ControlRequest>
dae: 81 32 cpi r24, 0x21 ; 33
db0: 09 f0 breq .+2 ; 0xdb4 <HID_Device_ProcessControlRequest+0x1b2>
* \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 <HID_Device_ProcessControlRequest+0x238>
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 <Endpoint_ClearStatusStage>
HIDInterfaceInfo->State.UsingReportProtocol = ((USB_ControlRequest.wValue & 0xFF) != 0x00);
dc0: 90 91 1b 01 lds r25, 0x011B ; 0x80011b <USB_ControlRequest+0x2>
dc4: 81 e0 ldi r24, 0x01 ; 1
dc6: 91 11 cpse r25, r1
dc8: 01 c0 rjmp .+2 ; 0xdcc <HID_Device_ProcessControlRequest+0x1ca>
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 <HID_Device_ProcessControlRequest+0x238>
}
break;
case HID_REQ_SetIdle:
if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
dd2: 80 91 19 01 lds r24, 0x0119 ; 0x800119 <USB_ControlRequest>
dd6: 81 32 cpi r24, 0x21 ; 33
dd8: 81 f5 brne .+96 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
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 <Endpoint_ClearStatusStage>
HIDInterfaceInfo->State.IdleCount = ((USB_ControlRequest.wValue & 0xFF00) >> 6);
de6: 80 91 1b 01 lds r24, 0x011B ; 0x80011b <USB_ControlRequest+0x2>
dea: 90 91 1c 01 lds r25, 0x011C ; 0x80011c <USB_ControlRequest+0x3>
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 <HID_Device_ProcessControlRequest+0x1f0>
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 <HID_Device_ProcessControlRequest+0x238>
}
break;
case HID_REQ_GetIdle:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
e02: 80 91 19 01 lds r24, 0x0119 ; 0x800119 <USB_ControlRequest>
e06: 81 3a cpi r24, 0xA1 ; 161
e08: c1 f4 brne .+48 ; 0xe3a <HID_Device_ProcessControlRequest+0x238>
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 <HID_Device_ProcessControlRequest+0x212>
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 <Endpoint_ClearStatusStage>
}
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 <HID_Device_ConfigureEndpoints>:
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 <HID_Device_ConfigureEndpoints+0x8>
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 <Endpoint_ConfigureEndpointTable>
00000e8e <HID_Device_USBTask>:
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 <HID_Device_USBTask+0x20>
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 <USB_DeviceState>
ebe: 84 30 cpi r24, 0x04 ; 4
ec0: 09 f0 breq .+2 ; 0xec4 <HID_Device_USBTask+0x36>
ec2: 86 c0 rjmp .+268 ; 0xfd0 <HID_Device_USBTask+0x142>
* \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 <HID_Device_USBTask+0x4c>
ed8: 7b c0 rjmp .+246 ; 0xfd0 <HID_Device_USBTask+0x142>
*/
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 <HID_Device_USBTask+0x142>
{
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 <memset>
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 <CALLBACK_HID_Device_CreateHIDReport>
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 <HID_Device_USBTask+0xb6>
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 <HID_Device_USBTask+0xb8>
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 <HID_Device_USBTask+0xe4>
{
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 <memcmp>
f5c: 01 e0 ldi r16, 0x01 ; 1
f5e: 89 2b or r24, r25
f60: 09 f4 brne .+2 ; 0xf64 <HID_Device_USBTask+0xd6>
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 <memcpy>
f70: 01 c0 rjmp .+2 ; 0xf74 <HID_Device_USBTask+0xe6>
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 <HID_Device_USBTask+0x12a>
f7c: 51 10 cpse r5, r1
f7e: 04 c0 rjmp .+8 ; 0xf88 <HID_Device_USBTask+0xfa>
f80: 01 11 cpse r16, r1
f82: 02 c0 rjmp .+4 ; 0xf88 <HID_Device_USBTask+0xfa>
f84: 10 ff sbrs r17, 0
f86: 18 c0 rjmp .+48 ; 0xfb8 <HID_Device_USBTask+0x12a>
{
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 <Endpoint_Write_Stream_LE>
*/
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 <memcmp>:
1000: fb 01 movw r30, r22
1002: dc 01 movw r26, r24
1004: 04 c0 rjmp .+8 ; 0x100e <memcmp+0xe>
1006: 8d 91 ld r24, X+
1008: 01 90 ld r0, Z+
100a: 80 19 sub r24, r0
100c: 21 f4 brne .+8 ; 0x1016 <memcmp+0x16>
100e: 41 50 subi r20, 0x01 ; 1
1010: 50 40 sbci r21, 0x00 ; 0
1012: c8 f7 brcc .-14 ; 0x1006 <memcmp+0x6>
1014: 88 1b sub r24, r24
1016: 99 0b sbc r25, r25
1018: 08 95 ret
0000101a <memcpy>:
101a: fb 01 movw r30, r22
101c: dc 01 movw r26, r24
101e: 02 c0 rjmp .+4 ; 0x1024 <memcpy+0xa>
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 <memcpy+0x6>
102a: 08 95 ret
0000102c <memset>:
102c: dc 01 movw r26, r24
102e: 01 c0 rjmp .+2 ; 0x1032 <memset+0x6>
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 <memset+0x4>
1038: 08 95 ret
0000103a <_exit>:
103a: f8 94 cli
0000103c <__stop_program>:
103c: ff cf rjmp .-2 ; 0x103c <__stop_program>