Update 1.1
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
Hoodloader_isp/*
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
:1000000073C100008DC100008BC1000089C10000D8
|
||||
:1000100087C1000085C1000083C1000081C10000CC
|
||||
:100020007FC100007DC100007BC100000C947E08F0
|
||||
:100030000C94270975C1000073C1000071C1000054
|
||||
:100020007FC100007DC100007BC100000C948008EE
|
||||
:100030000C94290975C1000073C1000071C1000052
|
||||
:100040006FC100006DC100006BC1000069C10000FC
|
||||
:1000500067C1000065C1000063C10000BDC30000AE
|
||||
:1000500067C1000065C1000063C10000BFC30000AC
|
||||
:100060005FC100005DC100005BC1000059C100001C
|
||||
:1000700057C1000030034100720064007500690040
|
||||
:100080006E006F00200048006F006F0064006C007D
|
||||
|
|
@ -45,429 +45,430 @@
|
|||
:1002C0001901290215002501750195028102050118
|
||||
:1002D00009300931150026FF03750A950281027560
|
||||
:1002E0000295018103C0C00011241FBECFEFD2E0F0
|
||||
:1002F000DEBFCDBF11E0A0E0B1E0EEE4FDE102C061
|
||||
:1002F000DEBFCDBF11E0A0E0B1E0E2E5FDE102C06C
|
||||
:1003000005900D92AE32B107D9F712E0AEE2B1E03E
|
||||
:1003100001C01D92A738B107E1F70BD10C94A50ECF
|
||||
:1003100001C01D92A738B107E1F70DD10C94A70ECB
|
||||
:100320006FCECF93DF9384B7877F84BF28E10FB66A
|
||||
:10033000F89420936000109260000FBE80E190E07E
|
||||
:100340009093CD008093CC00CAECD0E096E09883E7
|
||||
:10035000A8ECB0E082E08C93E9ECF0E02083539AC3
|
||||
:100360005A9A5B9A10821C92188298838C9388E91F
|
||||
:1003700080835B988AB180638AB98BB180638BB9C3
|
||||
:10038000AED684E085BD5F9A579A22982A9ADF916B
|
||||
:10038000B0D684E085BD5F9A579A22982A9ADF9169
|
||||
:10039000CF9108950F931F93CF93DF93C9E6D2E0D7
|
||||
:1003A000082F10E00AC08091200180FF05C06881FD
|
||||
:1003B00080E191E00E940D0B2196CE01895692407A
|
||||
:1003B00080E191E00E940F0B2196CE018956924078
|
||||
:1003C0008017910784F3DF91CF911F910F910895CA
|
||||
:1003D000CF93DF9360913B02662311F180913D0240
|
||||
:1003E000882319F010923B021BC070E0716081E01D
|
||||
:1003F00013D4C2E6D2E00AC08091200180FF05C07C
|
||||
:10040000688180E191E00E940D0B21969E012256A9
|
||||
:1003F00015D4C2E6D2E00AC08091200180FF05C07A
|
||||
:10040000688180E191E00E940F0B21969E012256A7
|
||||
:1004100032408091610290E0281739076CF3E2CFF7
|
||||
:10042000DF91CF9108951F93CF93DF9382D38823D9
|
||||
:1004300009F47BC01A9B79C09ED28130C9F5AAD23B
|
||||
:1004400080FF36C0C5DFA3D280933B0210923D02ED
|
||||
:1004500091E1EFE3F2E0DF01292F1D922A95E9F700
|
||||
:100460008530A9F038F4823081F0843071F0813029
|
||||
:10047000C9F405C0883088F08A30A0F411C094E037
|
||||
:1004800090933C0280933E020FC088E001C082E05E
|
||||
:1004900080933C0210923E0207C090933C02FACF38
|
||||
:1004A00083E0F6CF10923B02DF91CF911F915FC2A4
|
||||
:1004B00080913B028823C9F15ED210913D02C12F89
|
||||
:1004C000D0E090E09E012E5F3F4F359527952F5F3E
|
||||
:1004D0003F4F8217930729F55AD2C15CDD4F8883BD
|
||||
:1004E000C12FCF5FC0933D0280913C028C1749F031
|
||||
:1004F00051D2EC2FF0E0E15CFD4F80831E5F109342
|
||||
:100500003D0290913C0280913D029813CDCF04C0F2
|
||||
:1005100080E091E00E94A20D80913B028111F8CF12
|
||||
:10052000C3CFDF91CF911F9153CFDF91CF911F9117
|
||||
:100530000895F7DE2FB7F89481E391E09093B2012C
|
||||
:100540008093B1019093B4018093B3012FBF2FB773
|
||||
:10055000F89486EB91E09093370280933602909363
|
||||
:100560003902809338022FBF789410923D02109286
|
||||
:100570003B02239A219AC1E3D1E08C0153E0E52E9E
|
||||
:100580009FB7F8948091B5019FBF803819F180E141
|
||||
:1005900091E00E94750B97FD1DC0E091B101F091B3
|
||||
:1005A000B20180838091B1019091B2010196909344
|
||||
:1005B000B2018093B101815B914021F4D093B201EB
|
||||
:1005C000C093B1019FB7F8948091B5018F5F80937C
|
||||
:1005D000B5019FBF8FB7F894F0903A028FBFA899EA
|
||||
:1005E00004C080E68F1508F050C0A89A80913A02A6
|
||||
:1005F000882329F15D98E0922E0121C0CED1877F1A
|
||||
:1006000021F0E6DE80916802C5DEE0913802F091CB
|
||||
:1006100039028191F0933902E0933802E653F240B7
|
||||
:1006200021F410933902009338022FB7F894909177
|
||||
:100630003A02915090933A022FBFF5DEFA94F110EE
|
||||
:10064000DDCF80912E018823A1F080912E01815071
|
||||
:1006500080932E0181110DC0BBDE9FD183FD07C0A9
|
||||
:10066000F09068029AD187FDF3948F2D93DE7FD1AD
|
||||
:100670005D9A80912F01882341F080912F01815054
|
||||
:1006800080932F01811101C05C9A9FB7F8948091EB
|
||||
:10069000B5019FBF882309F1E091B301F091B40146
|
||||
:1006A0009191F093B401E093B301E15BF14021F447
|
||||
:1006B000D093B401C093B3012FB7F8948091B501E2
|
||||
:1006C00081508093B5012FBF8091C80085FFFCCF7A
|
||||
:1006D0009093CE005C98E0922F0180E191E0EFD7FB
|
||||
:1006E0005BD74ECF08950895CF9380E091E00E94AC
|
||||
:1006F0008D0DC82F80E191E06BD79091E20094605E
|
||||
:100700009093E200882321F0CC2311F080E001C017
|
||||
:1007100080E39BB18095906389238BB9CF91089535
|
||||
:100720001F93CF93DF93EC01E98DE150E23028F481
|
||||
:10073000F0E0E45DFE4F108101C010E0888D823052
|
||||
:1007400009F418608A8D873031F0883031F08630B6
|
||||
:1007500029F4126003C0146001C016605B9A109205
|
||||
:10076000C9001092C8001092CA002C893D894E8998
|
||||
:100770005F89211581EE38074105510579F0CA01DD
|
||||
:10078000B901969587957795679560587B47814E17
|
||||
:100790009F4F0E94660E2150310902C020E130E0D7
|
||||
:1007A0003093CD002093CC001093CA008C899D8992
|
||||
:1007B000AE89BF898115914EA105B10511F480E084
|
||||
:1007C00001C082E08093C80088E98093C9005B98EB
|
||||
:1007D000DF91CF911F9108951F920F920FB60F9244
|
||||
:1007E00011242F938F939F93EF93FF938091CE00CB
|
||||
:1007F00090917E029430F1F4E0913602F09137024C
|
||||
:100800008083E0913602F0913702CF0101969093F8
|
||||
:100810003702809336028653924021F486EB91E0B2
|
||||
:10082000928381839FB7F89480913A028F5F80937F
|
||||
:100830003A029FBFFF91EF919F918F912F910F905F
|
||||
:100840000FBE0F901F901895FC01208920FF02C059
|
||||
:100850005F9808955F9A8BB180638BB9089580E1AA
|
||||
:1008600091E071D780E091E00C94560C80910E01DC
|
||||
:1008700090910F01009729F0019790930F018093B9
|
||||
:100880000E010895EF92FF920F931F93CF93DF9382
|
||||
:100890007B01C901E80110913C02EFE3F2E0412F36
|
||||
:1008A00050E0BF010E94950EEBE3F2E08081D7019A
|
||||
:1008B0008C9318831982108280913E02DF91CF9130
|
||||
:1008C0001F910F91FF90EF9008950895292F3327DE
|
||||
:1008D00023303105B1F04CF42130310509F439C031
|
||||
:1008E0002230310509F03AC007C02132310539F113
|
||||
:1008F0002232310549F132C0EFE5F0E08EEB90E0B5
|
||||
:1009000031C099278130910561F08230910581F0E5
|
||||
:10091000892B21F5EAEBF0E0E491F0E08AEB90E03E
|
||||
:1009200021C0E6EAF0E0E491F0E086EA90E01AC047
|
||||
:10093000E4E7F0E0E491F0E084E790E013C0E9E060
|
||||
:10094000F0E08DE091E00EC0E8EBF1E08FE291E0A5
|
||||
:1009500009C0E2E1F0E08DE191E004C0E0E0F0E008
|
||||
:1009600080E090E0DA018D939C93CF01089588E0B8
|
||||
:1009700080932B0108958091700208956091710217
|
||||
:100980007091720280917302909174020895809127
|
||||
:100990007102089580917202089580912B0108954B
|
||||
:1009A000982F80912B018823E9F083FF0AC01092D1
|
||||
:1009B00075021092760210927702109278021092CD
|
||||
:1009C000790287FF0DC040916802E42FF0E0E759FB
|
||||
:1009D000FD4F80818093690281E08093680202C0AC
|
||||
:1009E0001092680210926F021092700210927102BF
|
||||
:1009F00010927202109273021092740210922B01E4
|
||||
:100A000020916802E22FF0E0E759FD4F9083822F9A
|
||||
:100A10008F5F80936802392F307C80917502303867
|
||||
:100A200009F440C0303C09F05EC0882329F080E919
|
||||
:100A300080932B0120936802292F287326952695F1
|
||||
:100A40002695223018F02730E1F40AC09F709F5F8E
|
||||
:100A500090936F021092750280912B0185603DC0CA
|
||||
:100A6000492F4F7050E060E070E040937602509361
|
||||
:100A70007702609378027093790285E08093750223
|
||||
:100A800056C0892F877090E0A0E0B0E08093760296
|
||||
:100A900090937702A0937802B0937902215020932B
|
||||
:100AA000750245C0282F2150209375028130C9F46A
|
||||
:100AB0009F739F5F9093700280917602909177026E
|
||||
:100AC000A0917802B09179028093710290937202A2
|
||||
:100AD000A0937302B093740283E080932B0181E0B2
|
||||
:100AE000089580E507C0282F215020937502823099
|
||||
:100AF00030F480E380932B011092750218C040916E
|
||||
:100B0000760250917702609178027091790287E0C5
|
||||
:100B1000440F551F661F771F8A95D1F7492B4093C5
|
||||
:100B2000760250937702609378027093790280E0A6
|
||||
:100B300008950F931F9334DF8823A9F01CDF8823C7
|
||||
:100B400091F01CDF8C0122273327DC01CB01AA277F
|
||||
:100B5000BB27082719272A273B2781E00F3F1F4F74
|
||||
:100B60002105310509F080E01F910F9108950F9341
|
||||
:100B70001F93A0916202ECE1F0E097E08A019B01F3
|
||||
:100B80000E2E04C036952795179507950A94D2F72F
|
||||
:100B9000083040F0A0936202973059F4009362024B
|
||||
:100BA00096E007C091503797A02F923039F7009305
|
||||
:100BB0006202A92FA25013C0EA2FF0E0EE59FD4FB8
|
||||
:100BC0008A019B010F771127222733270083E7E053
|
||||
:100BD0007695679557954795EA95D1F7A150A1115C
|
||||
:100BE000EBCF492F50E09A0163E0220F331F6A9543
|
||||
:100BF000E1F7206C3F6F30916202322B309362023A
|
||||
:100C0000FA01EF59FD4F81508F7380688083909374
|
||||
:100C100061021F910F9108950F931F938B01AB01F8
|
||||
:100C20004095509560E070E0BA015527442720E0D8
|
||||
:100C300030E0402B512B622B732B1F910F9197CFDC
|
||||
:100C4000BF92CF92DF92EF92FF920F931F93CF93B9
|
||||
:100C5000DF937C018B01EA01D7D1B82E811132C01C
|
||||
:100C6000209731F028813981021B130BE20EF31E0D
|
||||
:100C7000C12CD12C22C08091E80085FD14C0809148
|
||||
:100C8000E8008E778093E800209749F08881998169
|
||||
:100C90008C0D9D1D9983888325E0B22E13C0B4D19D
|
||||
:100CA000882359F00EC0F70181917F018093F100F4
|
||||
:100CB00001501109FFEFCF1ADF0A01151105D9F60E
|
||||
:100CC00001C0B82E8B2DDF91CF911F910F91FF9016
|
||||
:100CD000EF90DF90CF90BF900895209185023091E2
|
||||
:100CE00086022617370748F06115710539F42091FF
|
||||
:100CF000E8002E772093E80001C0B9019C0180E054
|
||||
:100D000034C090917E02992309F443C0953009F4D0
|
||||
:100D100042C09091E80093FD3AC09091E80092FDA6
|
||||
:100D200030C09091E80090FF20C08091F20090E0E8
|
||||
:100D3000F901821B930B05C021912093F1006150B2
|
||||
:100D400071099F01280F391F6115710519F02830AD
|
||||
:100D5000310590F381E02830310509F080E0909171
|
||||
:100D6000E8009E779093E8009F016115710549F6B0
|
||||
:100D70008111C7CF06C080917E02882351F0853053
|
||||
:100D800051F08091E80082FFF6CF80E0089581E085
|
||||
:100D9000089582E0089583E008956115710529F4AE
|
||||
:100DA0002091E8002B772093E8009C0121C08091DE
|
||||
:100DB0007E02882381F1853041F18091E80083FD36
|
||||
:100DC00026C08091E80082FFF2CFF90107C0809130
|
||||
:100DD000F10081939F016150710929F09F01809179
|
||||
:100DE000F2008111F4CF8091E8008B778093E800C6
|
||||
:100DF00061157105E1F68091E80080FD0AC08091DF
|
||||
:100E00007E02882341F08530B1F783E0089581E0C8
|
||||
:100E1000089580E0089582E0089520918502309140
|
||||
:100E200086022617370748F06115710539F42091BD
|
||||
:100E3000E8002E772093E80001C0B9019C0180E012
|
||||
:100E400035C090917E02992309F444C0953009F48D
|
||||
:100E500043C09091E80093FD3BC09091E80092FD63
|
||||
:100E600031C09091E80090FF21C08091F20090E0A5
|
||||
:100E7000F901821B930B06C024912093F100319657
|
||||
:100E8000615071099C012E0F3F1F6115710519F00A
|
||||
:100E90002830310588F381E02830310509F080E001
|
||||
:100EA0009091E8009E779093E8009F01611571058D
|
||||
:100EB00041F68111C6CF06C080917E02882351F091
|
||||
:100EC000853051F08091E80082FFF6CF80E00895F0
|
||||
:100ED00081E0089582E0089583E00895982F2CC062
|
||||
:100EE0009093E900981739F07091EC002091ED0093
|
||||
:100EF0005091F00003C0242F762F50E021FD02C056
|
||||
:100F00009F5F1AC03091EB003E7F3093EB00309131
|
||||
:100F1000ED003D7F3093ED003091EB003160309378
|
||||
:100F2000EB007093EC002093ED005093F0002091C3
|
||||
:100F3000EE0027FDE5CF07C0953090F28F708093CB
|
||||
:100F4000E90081E0089580E008950F931F93CF9307
|
||||
:100F5000DF93062FEC0110E02EC09881911103C0A1
|
||||
:100F60001F5F259628C02C81E981FA816B81892F2A
|
||||
:100F70008F70853010F080E021C0223010F056E0F4
|
||||
:100F800001C052E028E030E040E003C04F5F220F94
|
||||
:100F9000331F2E173F07D0F34295407F452B991FF3
|
||||
:100FA0009927991F6295660F660F607C692B96DF03
|
||||
:100FB0008111D6CFE0CF1013D0CF81E0DF91CF9158
|
||||
:100FC0001F910F91089580917F0287FD05C0809148
|
||||
:100FD000E80080FF0EC012C08091E80082FD05C0CD
|
||||
:100FE00080917E028111F8CF08958091E8008B777F
|
||||
:100FF00008C080917E028111EACF08958091E800B7
|
||||
:101000008E778093E80008958091E4009091E50048
|
||||
:1010100045E62091EC0020FD1FC023C020917E02F8
|
||||
:10102000222391F0253091F02091EB0025FD10C096
|
||||
:101030002091E4003091E5002817390751F3415021
|
||||
:10104000C90139F784E0089582E0089583E00895A6
|
||||
:1010500081E0089580E008952091E80020FFDECF30
|
||||
:10106000F9CF2091E80022FFD9CFF4CF41D043D06F
|
||||
:101070008091D8008F778093D8008091D8008068C5
|
||||
:101080008093D8008091D8008F7D8093D80084E031
|
||||
:1010900089BD86E089BD09B400FEFDCF10927E02B5
|
||||
:1010A00010927A0210927C0210927B0242E060E081
|
||||
:1010B00080E014DF8091E1008E7F8093E1008091D9
|
||||
:1010C000E20081608093E2008091E200886080937A
|
||||
:1010D000E2008091E0008E7F8093E0000895E3E6D7
|
||||
:1010E000F0E080818E7F808381E080937D02BECF9F
|
||||
:1010F0001092E20008951092E10008951F920F925D
|
||||
:101100000FB60F9211242F933F934F935F936F93DA
|
||||
:101110007F938F939F93AF93BF93EF93FF938091B0
|
||||
:10112000E10082FF0AC08091E20082FF06C0809148
|
||||
:10113000E1008B7F8093E10099DB8091E10080FFEB
|
||||
:1011400017C08091E20080FF13C08091E2008E7F83
|
||||
:101150008093E2008091E20080618093E2008091C0
|
||||
:10116000D80080628093D80019BC10927E02BBDA4E
|
||||
:101170008091E10084FF2FC08091E20084FF2BC0AA
|
||||
:1011800084E089BD86E089BD09B400FEFDCF809171
|
||||
:10119000D8008F7D8093D8008091E1008F7E80936E
|
||||
:1011A000E1008091E2008F7E8093E2008091E20076
|
||||
:1011B00081608093E20080917A02882311F084E0BC
|
||||
:1011C00007C08091E30087FF02C083E001C081E097
|
||||
:1011D00080937E0287DA8091E10083FF27C08091AF
|
||||
:1011E000E20083FF23C08091E100877F8093E100CC
|
||||
:1011F00082E080937E0210927A028091E1008E7FDD
|
||||
:101200008093E1008091E2008E7F8093E2008091E4
|
||||
:10121000E20080618093E20042E060E080E05EDE18
|
||||
:101220008091F00088608093F000B5D1FF91EF913C
|
||||
:10123000BF91AF919F918F917F916F915F914F91EE
|
||||
:101240003F912F910F900FBE0F901F9018951F92F6
|
||||
:101250000F920FB60F9211242F933F934F935F93EA
|
||||
:101260006F937F938F939F93AF93BF93CF93EF939E
|
||||
:10127000FF938091E9008F709091EC0090FF02C085
|
||||
:1012800090E801C090E0C92FC82B1092E90080912E
|
||||
:10129000F000877F8093F00078941CD01092E900D2
|
||||
:1012A0008091F00088608093F000CF70C093E900D7
|
||||
:1012B000FF91EF91CF91BF91AF919F918F917F91CE
|
||||
:1012C0006F915F914F913F912F910F900FBE0F90B3
|
||||
:1012D0001F9018951F93CF93DF93CDB7DEB7AC97D0
|
||||
:1012E0000FB6F894DEBF0FBECDBFEFE7F2E08091FE
|
||||
:1012F000F100819322E0E738F207C9F7B0DA809174
|
||||
:10130000E80083FF30C180917F0290918002953088
|
||||
:1013100009F487C038F49130B1F170F0933009F0DE
|
||||
:1013200022C131C0983009F4F3C0993009F4FFC0EC
|
||||
:10133000963009F018C19BC0803821F0823809F03E
|
||||
:1013400012C108C080917B0290917C02992389F0A0
|
||||
:1013500082600FC080918302909184028F709927E0
|
||||
:101360008093E9008091EB0085FB882780F910923B
|
||||
:10137000E9009091E800977F9093E8008093F10056
|
||||
:101380001092F100D0C0882319F0823009F0EBC030
|
||||
:101390008F7121F0823009F0E6C00BC0809181028C
|
||||
:1013A000813009F0E0C0933009F080E080937C0246
|
||||
:1013B0002FC08091810281112BC080918302909176
|
||||
:1013C00084028F709927009709F4CDC08093E900BB
|
||||
:1013D0002091EB0020FF1CC020918002233021F4DB
|
||||
:1013E0008091EB00806212C09091EB00906190932D
|
||||
:1013F000EB0021E030E001C0220F8A95EAF720934C
|
||||
:10140000EA001092EA008091EB0088608093EB0084
|
||||
:101410001092E9008091E800877F8093E800D3DD97
|
||||
:10142000A2C08111A0C080918102909182028F7729
|
||||
:101430009927182F9091E3009078982B9093E300D0
|
||||
:101440008091E800877F8093E800BDDD8091E8000F
|
||||
:1014500080FFFCCF8091E30080688093E30011233C
|
||||
:1014600011F083E001C082E080937E027CC080584E
|
||||
:10147000823008F078C080918102909182028C3D88
|
||||
:1014800023E0920771F583E08A838AE289834FB76C
|
||||
:10149000F894DE01139620E03EE051E2E32FF0E005
|
||||
:1014A00050935700E49120FF03C0E295EF703F5F37
|
||||
:1014B000EF708E2F90E0EA3010F0C79601C0C09612
|
||||
:1014C0008D939D932F5F243149F74FBF8091E800A2
|
||||
:1014D000877F8093E8006AE270E0CE010196FDDB31
|
||||
:1014E00011C0AE01455D5F4F60918302EFD9009757
|
||||
:1014F000D1F12091E800277F2093E800BC018BA563
|
||||
:101500009CA58BDC8091E8008B778093E8002BC052
|
||||
:10151000803849F58091E800877F8093E8008091CA
|
||||
:101520007A028093F1008091E8008E7776CF811166
|
||||
:101530001AC0909181029230B0F48091E800877FC8
|
||||
:101540008093E80090937A023EDD80917A028111C7
|
||||
:1015500004C08091E30087FF02C084E001C081E005
|
||||
:1015600080937E02C1D88091E80083FF0AC08091F9
|
||||
:10157000E800877F8093E8008091EB008062809391
|
||||
:10158000EB00AC960FB6F894DEBF0FBECDBFDF9177
|
||||
:10159000CF911F9108950895CF9380917E02882363
|
||||
:1015A000A9F08091E9008F709091EC0090FF02C04B
|
||||
:1015B00090E801C090E0C92FC82B1092E9008091FB
|
||||
:1015C000E80083FD87DECF70C093E900CF910895D6
|
||||
:1015D000CF93DF93EC014096FC018BE0DF011D927D
|
||||
:1015E0008A95E9F782E08C83898783E08E8761E0C2
|
||||
:1015F000CE010196AADC882361F061E0CE01069657
|
||||
:10160000A4DC882331F061E0CE010B96DF91CF910D
|
||||
:101610009CCC80E0DF91CF910895CF93C62F20918D
|
||||
:101620007E022430F1F4FC0144895589668977896A
|
||||
:10163000452B462B472BA9F081818F708093E900C1
|
||||
:101640008091E80085FF04C0C093F10080E00AC0EB
|
||||
:101650008091E8008E778093E800D6DC8823A1F3A0
|
||||
:1016600001C082E0CF91089520917E02243029F5B7
|
||||
:10167000FC014489558966897789452B462B472B80
|
||||
:10168000E1F081818F708093E9008091F2008111F7
|
||||
:1016900002C080E008959091E8008091E8008E7784
|
||||
:1016A0008093E80095FDF5CFAFDC811107C09091E4
|
||||
:1016B000E8009E779093E800089582E008952091D5
|
||||
:1016C0007E02243089F4FC01448955896689778932
|
||||
:1016D000452B462B472B41F021812F702093E900A9
|
||||
:1016E0002091E80020FDC0CF089520917E02243093
|
||||
:1016F00019F02FEF3FEF24C0FC014489558966891A
|
||||
:101700007789452B462B472BA1F386818F708093D9
|
||||
:10171000E9008091E80082FFECCF8091F2008823FD
|
||||
:1017200021F02091F10030E002C02FEF3FEF8091D7
|
||||
:10173000F200811105C08091E8008B778093E8006A
|
||||
:10174000C90108950895CF93DF93EC018091E800DB
|
||||
:1017500083FFA9C0888190E02091830230918402A8
|
||||
:101760002817390709F09FC080918002813261F00B
|
||||
:1017700020F4803209F097C03DC0823209F46EC077
|
||||
:10178000833209F090C07FC080917F02813A09F0D6
|
||||
:101790008AC08091E800877F8093E8008091E8000C
|
||||
:1017A00080FFFCCF4C895D896E897F894093F10071
|
||||
:1017B000BB27A72F962F852F8093F100CB01AA2757
|
||||
:1017C000BB278093F100472F552766277727409343
|
||||
:1017D000F100888D8093F100898D8093F1008A8DCE
|
||||
:1017E0008093F1008091E8008E778093E800DF918C
|
||||
:1017F000CF91E9CB80917F02813209F054C0809172
|
||||
:10180000E800877F8093E80005C080917E028823EE
|
||||
:1018100009F449C08091E80082FFF7CF3091F100D0
|
||||
:101820002091F1009091F1008091F1003C8B2D8B83
|
||||
:101830009E8B8F8B8091F100888F8091F100898F32
|
||||
:101840008091F1008A8F8091E8008B778093E80087
|
||||
:10185000BADBCE01DF91CF910C94900380917F028F
|
||||
:10186000813209F58091E800877F8093E800ABDB47
|
||||
:101870008091810290918202998B888BCE01DF91B9
|
||||
:10188000CF910C94240480917F02813261F4809185
|
||||
:10189000E800877F8093E80096DB60918102CE01AB
|
||||
:1018A000DF91CF914FCFDF91CF9108956F927F92CB
|
||||
:1018B0008F929F92AF92BF92CF92DF92EF92FF9260
|
||||
:1018C0000F931F93CF93DF9300D01F92CDB7DEB756
|
||||
:1018D0007C01ADB6BEB68091E80083FF07C1F70179
|
||||
:1018E000808190E02091830230918402281739078B
|
||||
:1018F00009F0FCC080918002833009F49EC030F46E
|
||||
:10190000813071F0823009F0F1C0D4C08A3009F41E
|
||||
:10191000B9C08B3009F4A2C0893009F0E7C04CC0CF
|
||||
:1019200080917F02813A09F0E1C08DB69EB61A829D
|
||||
:10193000198280918102109182028B83F701408588
|
||||
:101940008DB79EB7841B91090FB6F8949EBF0FBE4A
|
||||
:101950008DBFCDB6DEB6EFEFCE1ADE0A360150E00F
|
||||
:1019600060E070E0C601EAD1412F41508E010F5F67
|
||||
:101970001F4F9601BE016D5F7F4FC7010E94420459
|
||||
:10198000F701268137812115310529F0408550E086
|
||||
:10199000B601C901CAD11092E9008091E800877FA1
|
||||
:1019A0008093E80069817A81C30197D98091E8002A
|
||||
:1019B0008B778093E80039C080917F02813209F0F3
|
||||
:1019C00095C08DB69EB600918502109186027090EA
|
||||
:1019D0008102609082028DB79EB7801B910B0FB67B
|
||||
:1019E000F8949EBF0FBE8DBFCDB6DEB6EFEFCE1A18
|
||||
:1019F000DE0A8091E800877F8093E800B801C60185
|
||||
:101A0000CCD98091E8008E778093E80021E07110B6
|
||||
:101A100001C020E030E0021B130B2C0D3D1D462DB4
|
||||
:101A20004150672DC7010E946504882D992D0FB67E
|
||||
:101A3000F8949EBF0FBE8DBF59C080917F02813A3E
|
||||
:101A400009F054C08091E800877F8093E80080917E
|
||||
:101A5000E80080FFFCCFF701818540C080917F02C4
|
||||
:101A6000813209F043C08091E800877F8093E800CD
|
||||
:101A7000AADA9091810281E0911101C080E0F70122
|
||||
:101A8000818734C080917F02813281F58091E800A6
|
||||
:101A9000877F8093E80097DA80918102909182029B
|
||||
:101AA000882736E0969587953A95E1F7F70195876F
|
||||
:101AB00084871CC080917F02813AC1F48091E80044
|
||||
:101AC000877F8093E8008091E80080FFFCCFF701DA
|
||||
:101AD0008485958596958795969587958093F10051
|
||||
:101AE0008091E8008E778093E8006DDA0FB6F89465
|
||||
:101AF000BEBE0FBEADBE0F900F900F90DF91CF9185
|
||||
:101B00001F910F91FF90EF90DF90CF90BF90AF901B
|
||||
:101B10009F908F907F906F9008959C01275F3F4F1B
|
||||
:101B2000F90127E0DF011D922A95E9F721E0FC0188
|
||||
:101B3000218724EF31E03587248723E0248361E087
|
||||
:101B4000019603CA4F925F926F927F928F929F92FB
|
||||
:101B5000AF92BF92CF92DF92EF92FF920F931F93BB
|
||||
:101B6000CF93DF9300D01F92CDB7DEB77C01ADB627
|
||||
:101B7000BEB680917E02843009F08FC08091E4006F
|
||||
:101B80009091E500F701228533852817390709F47C
|
||||
:101B900084C081818F708093E9008091E80085FF87
|
||||
:101BA0007CC06DB67EB640858DB79EB7841B91090B
|
||||
:101BB0000FB6F8949EBF0FBE8DBFCDB6DEB6EFEF69
|
||||
:101BC000CE1ADE0A1B821A821982460150E060E0BA
|
||||
:101BD00070E0C601B3D08E010F5F1F4F960140E049
|
||||
:101BE000BE016D5F7F4FC7010E944204582EF7016E
|
||||
:101BF00084859585892B31F001E010E086859785F5
|
||||
:101C0000892B11F000E010E0F701C680D780C114E5
|
||||
:101C1000D10489F049815A81B601C40179D04424A4
|
||||
:101C20004394009709F4412CF701408550E0B4013A
|
||||
:101C3000C6017BD001C0412C89819A81892BF9F0A2
|
||||
:101C4000511004C0411002C000FF19C0F701848583
|
||||
:101C500095859787868781818F708093E9008B8136
|
||||
:101C600081118093F10069817A8140E050E0C401E4
|
||||
:101C70000E9420068091E8008E778093E800809192
|
||||
:101C8000E4009091E500F70193878287862D972DD8
|
||||
:101C90000FB6F8949EBF0FBE8DBF0FB6F894BEBEB0
|
||||
:101CA0000FBEADBE0F900F900F90DF91CF911F919F
|
||||
:101CB0000F91FF90EF90DF90CF90BF90AF909F90EB
|
||||
:101CC0008F907F906F905F904F900895A1E21A2EB1
|
||||
:101CD000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1FD0
|
||||
:101CE000A217B307E407F50720F0A21BB30BE40B20
|
||||
:101CF000F50B661F771F881F991F1A9469F7609567
|
||||
:101D00007095809590959B01AC01BD01CF01089520
|
||||
:101D1000FB01DC0104C08D910190801921F4415038
|
||||
:101D20005040C8F7881B990B0895FB01DC0102C0E5
|
||||
:101D300001900D9241505040D8F70895DC0101C048
|
||||
:0E1D40006D9341505040E0F70895F894FFCFA6
|
||||
:101D4E00028120000001500211000000000000007E
|
||||
:101D5E0000834000000104400000018208000001E1
|
||||
:0E1D6E0000000000000000000000000830200F
|
||||
:10042000DF91CF9108951F93CF93DF9384D38823D7
|
||||
:1004300009F47DC01A9B7BC0A0D2C82F8130D1F5B2
|
||||
:10044000ABD280FF37C0C4DFA4D280933B021092AE
|
||||
:100450003D0291E1EFE3F2E0DF01292F1D922A95A1
|
||||
:10046000E9F78530A9F038F4823081F0843071F0FA
|
||||
:100470008130D1F405C0883080F08A30A8F410C0F3
|
||||
:1004800094E090933C0280933E0210C088E009C043
|
||||
:10049000C0933C0210923E0209C090933C02FACFF6
|
||||
:1004A00083E080933C02F6CF10923B02DF91CF9124
|
||||
:1004B0001F915FC280913B028823C9F15ED21091E7
|
||||
:1004C0003D02C12FD0E090E09E012E5F3F4F359559
|
||||
:1004D00027952F5F3F4F8217930729F55AD2C15CAA
|
||||
:1004E000DD4F8883C12FCF5FC0933D0280913C02D6
|
||||
:1004F0008C1749F051D2EC2FF0E0E15CFD4F808386
|
||||
:100500001E5F10933D0290913C0280913D02981332
|
||||
:10051000CDCF04C080E091E00E94A40D80913B0209
|
||||
:100520008111F8CFC3CFDF91CF911F9151CFDF91D0
|
||||
:10053000CF911F910895F5DE2FB7F89481E391E0F4
|
||||
:100540009093B2018093B1019093B4018093B30171
|
||||
:100550002FBF2FB7F89486EB91E0909337028093EA
|
||||
:10056000360290933902809338022FBF789410920C
|
||||
:100570003D0210923B02239A219AC1E3D1E08C0103
|
||||
:1005800053E0E52E9FB7F8948091B5019FBF803866
|
||||
:1005900019F180E191E00E94770B97FD1DC0E09179
|
||||
:1005A000B101F091B20180838091B1019091B201CB
|
||||
:1005B00001969093B2018093B101815B914021F447
|
||||
:1005C000D093B201C093B1019FB7F8948091B50167
|
||||
:1005D0008F5F8093B5019FBF8FB7F894F0903A0278
|
||||
:1005E0008FBFA89904C080E68F1508F050C0A89A64
|
||||
:1005F00080913A02882329F15D98E0922E0121C072
|
||||
:10060000CED1877F21F0E4DE80916802C3DEE091E5
|
||||
:100610003802F09139028191F0933902E093380267
|
||||
:10062000E653F24021F410933902009338022FB7B9
|
||||
:10063000F89490913A02915090933A022FBFF3DED2
|
||||
:10064000FA94F110DDCF80912E018823A1F08091E2
|
||||
:100650002E01815080932E0181110DC0B9DE9FD1F2
|
||||
:1006600083FD07C0F09068029AD187FDF3948F2D27
|
||||
:1006700091DE7FD15D9A80912F01882341F0809196
|
||||
:100680002F01815080932F01811101C05C9A9FB787
|
||||
:10069000F8948091B5019FBF882309F1E091B301DF
|
||||
:1006A000F091B4019191F093B401E093B301E15B57
|
||||
:1006B000F14021F4D093B401C093B3012FB7F89463
|
||||
:1006C0008091B50181508093B5012FBF8091C80002
|
||||
:1006D00085FFFCCF9093CE005C98E0922F0180E1E3
|
||||
:1006E00091E0EFD75BD74ECF08950895CF9380E088
|
||||
:1006F00091E00E948F0DC82F80E191E06BD790911F
|
||||
:10070000E20094609093E200882321F0CC2311F062
|
||||
:1007100080E001C080E39BB18095906389238BB911
|
||||
:10072000CF9108951F93CF93DF93EC01E98DE150B2
|
||||
:10073000E23028F4F0E0E45DFE4F108101C010E0EB
|
||||
:10074000888D823009F418608A8D873031F08830C6
|
||||
:1007500031F0863029F4126003C0146001C01660C5
|
||||
:100760005B9A1092C9001092C8001092CA002C899E
|
||||
:100770003D894E895F89211581EE38074105510574
|
||||
:1007800079F0CA01B9019695879577956795605874
|
||||
:100790007B47814E9F4F0E94680E2150310902C055
|
||||
:1007A00020E130E03093CD002093CC001093CA00BC
|
||||
:1007B0008C899D89AE89BF898115914EA105B105AE
|
||||
:1007C00011F480E001C082E08093C80088E9809342
|
||||
:1007D000C9005B98DF91CF911F9108951F920F92EE
|
||||
:1007E0000FB60F9211242F938F939F93EF93FF9344
|
||||
:1007F0008091CE0090917E029430F1F4E091360227
|
||||
:10080000F09137028083E0913602F0913702CF01F8
|
||||
:10081000019690933702809336028653924021F4DA
|
||||
:1008200086EB91E0928381839FB7F89480913A029E
|
||||
:100830008F5F80933A029FBFFF91EF919F918F91BD
|
||||
:100840002F910F900FBE0F901F901895FC012089DB
|
||||
:1008500020FF02C05F9808955F9A8BB180638BB9C7
|
||||
:10086000089580E191E071D780E091E00C94580CFC
|
||||
:1008700080910E0190910F01009729F001979093BC
|
||||
:100880000F0180930E010895EF92FF920F931F9333
|
||||
:10089000CF93DF937B01C901E80110913C02EFE3A4
|
||||
:1008A000F2E0412F50E0BF010E94970EEBE3F2E02F
|
||||
:1008B0008081D7018C9318831982108280913E0227
|
||||
:1008C000DF91CF911F910F91FF90EF9008950895C0
|
||||
:1008D000292F332723303105B1F04CF42130310575
|
||||
:1008E00009F439C02230310509F03AC007C021327D
|
||||
:1008F000310539F12232310549F132C0EFE5F0E03E
|
||||
:100900008EEB90E031C099278130910561F0823003
|
||||
:10091000910581F0892B21F5EAEBF0E0E491F0E01C
|
||||
:100920008AEB90E021C0E6EAF0E0E491F0E086EAAC
|
||||
:1009300090E01AC0E4E7F0E0E491F0E084E790E0B2
|
||||
:1009400013C0E9E0F0E08DE091E00EC0E8EBF1E0EB
|
||||
:100950008FE291E009C0E2E1F0E08DE191E004C0B6
|
||||
:10096000E0E0F0E080E090E0DA018D939C93CF012D
|
||||
:10097000089588E080932B01089580917002089576
|
||||
:100980006091710270917202809173029091740271
|
||||
:100990000895809171020895809172020895809166
|
||||
:1009A0002B010895982F80912B018823E9F083FF74
|
||||
:1009B0000AC010927502109276021092770210927D
|
||||
:1009C00078021092790287FF0DC040916802E42FEF
|
||||
:1009D000F0E0E759FD4F80818093690281E08093C8
|
||||
:1009E000680202C01092680210926F0210927002A8
|
||||
:1009F000109271021092720210927302109274029D
|
||||
:100A000010922B0120916802E22FF0E0E759FD4F90
|
||||
:100A10009083822F8F5F80936802392F307C809182
|
||||
:100A20007502303809F440C0303C09F05EC08823BC
|
||||
:100A300029F080E980932B0120936802292F2873E5
|
||||
:100A4000269526952695223018F02730E1F40AC025
|
||||
:100A50009F709F5F90936F021092750280912B019F
|
||||
:100A600085603DC0492F4F7050E060E070E04093DA
|
||||
:100A7000760250937702609378027093790285E052
|
||||
:100A80008093750256C0892F877090E0A0E0B0E097
|
||||
:100A90008093760290937702A0937802B0937902C4
|
||||
:100AA00021502093750245C0282F215020937502B4
|
||||
:100AB0008130C9F49F739F5F90937002809176029A
|
||||
:100AC00090917702A0917802B0917902809371029F
|
||||
:100AD00090937202A0937302B093740283E08093A8
|
||||
:100AE0002B0181E0089580E507C0282F2150209335
|
||||
:100AF0007502823030F480E380932B0110927502EE
|
||||
:100B000018C04091760250917702609178027091FE
|
||||
:100B1000790287E0440F551F661F771F8A95D1F72A
|
||||
:100B2000492B40937602509377026093780270933A
|
||||
:100B3000790280E008950F931F9334DF8823A9F092
|
||||
:100B40001CDF882391F01CDF8C0122273327DC0176
|
||||
:100B5000CB01AA27BB27082719272A273B2781E093
|
||||
:100B60000F3F1F4F2105310509F080E01F910F91C4
|
||||
:100B700008950F931F93A0916202ECE1F0E097E0DB
|
||||
:100B80008A019B010E2E04C036952795179507956F
|
||||
:100B90000A94D2F7083040F0A0936202973059F4DB
|
||||
:100BA0000093620296E007C091503797A02F9230D1
|
||||
:100BB00039F700936202A92FA25013C0EA2FF0E088
|
||||
:100BC000EE59FD4F8A019B010F771127222733270A
|
||||
:100BD0000083E7E07695679557954795EA95D1F7B5
|
||||
:100BE000A150A111EBCF492F50E09A0163E0220FF1
|
||||
:100BF000331F6A95E1F7206C3F6F30916202322B10
|
||||
:100C000030936202FA01EF59FD4F81508F73806873
|
||||
:100C10008083909361021F910F9108950F931F930A
|
||||
:100C20008B01AB014095509560E070E0BA0155270B
|
||||
:100C3000442720E030E0402B512B622B732B1F9177
|
||||
:100C40000F9197CFBF92CF92DF92EF92FF920F93C7
|
||||
:100C50001F93CF93DF937C018B01EA01D7D1B82E8C
|
||||
:100C6000811132C0209731F028813981021B130B8A
|
||||
:100C7000E20EF31EC12CD12C22C08091E80085FD2C
|
||||
:100C800014C08091E8008E778093E800209749F0A7
|
||||
:100C9000888199818C0D9D1D9983888325E0B22ED2
|
||||
:100CA00013C0B4D1882359F00EC0F70181917F01A0
|
||||
:100CB0008093F10001501109FFEFCF1ADF0A0115EF
|
||||
:100CC0001105D9F601C0B82E8B2DDF91CF911F9160
|
||||
:100CD0000F91FF90EF90DF90CF90BF9008952091FB
|
||||
:100CE0008502309186022617370748F06115710595
|
||||
:100CF00039F42091E8002E772093E80001C0B90173
|
||||
:100D00009C0180E034C090917E02992309F443C095
|
||||
:100D1000953009F442C09091E80093FD3AC090915B
|
||||
:100D2000E80092FD30C09091E80090FF20C08091D3
|
||||
:100D3000F20090E0F901821B930B05C021912093F2
|
||||
:100D4000F100615071099F01280F391F611571056C
|
||||
:100D500019F02830310590F381E02830310509F091
|
||||
:100D600080E09091E8009E779093E8009F016115E4
|
||||
:100D7000710549F68111C7CF06C080917E02882394
|
||||
:100D800051F0853051F08091E80082FFF6CF80E08D
|
||||
:100D9000089581E0089582E0089583E00895611543
|
||||
:100DA000710529F42091E8002B772093E8009C013D
|
||||
:100DB00021C080917E02882381F1853041F18091AC
|
||||
:100DC000E80083FD26C08091E80082FFF2CFF901A0
|
||||
:100DD00007C08091F10081939F016150710929F052
|
||||
:100DE0009F018091F2008111F4CF8091E8008B7710
|
||||
:100DF0008093E80061157105E1F68091E80080FDBF
|
||||
:100E00000AC080917E02882341F08530B1F783E0EB
|
||||
:100E1000089581E0089580E0089582E0089520918A
|
||||
:100E20008502309186022617370748F06115710553
|
||||
:100E300039F42091E8002E772093E80001C0B90131
|
||||
:100E40009C0180E035C090917E02992309F444C052
|
||||
:100E5000953009F443C09091E80093FD3BC0909118
|
||||
:100E6000E80092FD31C09091E80090FF21C0809190
|
||||
:100E7000F20090E0F901821B930B06C024912093AD
|
||||
:100E8000F1003196615071099C012E0F3F1F6115D1
|
||||
:100E9000710519F02830310588F381E028303105DB
|
||||
:100EA00009F080E09091E8009E779093E8009F0120
|
||||
:100EB0006115710541F68111C6CF06C080917E0291
|
||||
:100EC000882351F0853051F08091E80082FFF6CF01
|
||||
:100ED00080E0089581E0089582E0089583E0089518
|
||||
:100EE000982F2CC09093E900981739F07091EC007E
|
||||
:100EF0002091ED005091F00003C0242F762F50E098
|
||||
:100F000021FD02C09F5F1AC03091EB003E7F3093FD
|
||||
:100F1000EB003091ED003D7F3093ED003091EB0020
|
||||
:100F200031603093EB007093EC002093ED00509310
|
||||
:100F3000F0002091EE0027FDE5CF07C0953090F23C
|
||||
:100F40008F708093E90081E0089580E008950F9309
|
||||
:100F50001F93CF93DF93062FEC0110E02EC09881F2
|
||||
:100F6000911103C01F5F259628C02C81E981FA8169
|
||||
:100F70006B81892F8F70853010F080E021C0223086
|
||||
:100F800010F056E001C052E028E030E040E003C03D
|
||||
:100F90004F5F220F331F2E173F07D0F34295407F3C
|
||||
:100FA000452B991F9927991F6295660F660F607CE4
|
||||
:100FB000692B96DF8111D6CFE0CF1013D0CF81E01F
|
||||
:100FC000DF91CF911F910F91089580917F0287FD4E
|
||||
:100FD00005C08091E80080FF0EC012C08091E8003B
|
||||
:100FE00082FD05C080917E028111F8CF0895809125
|
||||
:100FF000E8008B7708C080917E028111EACF0895C6
|
||||
:101000008091E8008E778093E80008958091E40055
|
||||
:101010009091E50045E62091EC0020FD1FC023C023
|
||||
:1010200020917E02222391F0253091F02091EB0057
|
||||
:1010300025FD10C02091E4003091E5002817390704
|
||||
:1010400051F34150C90139F784E0089582E00895D1
|
||||
:1010500083E0089581E0089580E008952091E800FC
|
||||
:1010600020FFDECFF9CF2091E80022FFD9CFF4CFC7
|
||||
:1010700041D043D08091D8008F778093D800809161
|
||||
:10108000D80080688093D8008091D8008F7D8093AD
|
||||
:10109000D80084E089BD86E089BD09B400FEFDCF9B
|
||||
:1010A00010927E0210927A0210927C0210927B02C1
|
||||
:1010B00042E060E080E014DF8091E1008E7F809369
|
||||
:1010C000E1008091E20081608093E2008091E20083
|
||||
:1010D00088608093E2008091E0008E7F8093E00042
|
||||
:1010E0000895E3E6F0E080818E7F808381E0809345
|
||||
:1010F0007D02BECF1092E20008951092E1000895A3
|
||||
:101100001F920F920FB60F9211242F933F934F937C
|
||||
:101110005F936F937F938F939F93AF93BF93EF935F
|
||||
:10112000FF938091E10082FF0AC08091E20082FF7C
|
||||
:1011300006C08091E1008B7F8093E10099DB809174
|
||||
:10114000E10080FF17C08091E20080FF13C0809112
|
||||
:10115000E2008E7F8093E2008091E20080618093C4
|
||||
:10116000E2008091D80080628093D80019BC109270
|
||||
:101170007E02BBDA8091E10084FF2FC08091E20003
|
||||
:1011800084FF2BC084E089BD86E089BD09B400FEE0
|
||||
:10119000FDCF8091D8008F7D8093D8008091E100B1
|
||||
:1011A0008F7E8093E1008091E2008F7E8093E20049
|
||||
:1011B0008091E20081608093E20080917A0288232E
|
||||
:1011C00011F084E007C08091E30087FF02C083E054
|
||||
:1011D00001C081E080937E0287DA8091E10083FF85
|
||||
:1011E00027C08091E20083FF23C08091E100877FC8
|
||||
:1011F0008093E10082E080937E0210927A028091D7
|
||||
:10120000E1008E7F8093E1008091E2008E7F8093E9
|
||||
:10121000E2008091E20080618093E20042E060E0C1
|
||||
:1012200080E05EDE8091F00088608093F000B5D1B0
|
||||
:10123000FF91EF91BF91AF919F918F917F916F91AE
|
||||
:101240005F914F913F912F910F900FBE0F901F9084
|
||||
:1012500018951F920F920FB60F9211242F933F9360
|
||||
:101260004F935F936F937F938F939F93AF93BF93AE
|
||||
:10127000CF93EF93FF938091E9008F709091EC00F2
|
||||
:1012800090FF02C090E801C090E0C92FC82B1092D7
|
||||
:10129000E9008091F000877F8093F00078941CD063
|
||||
:1012A0001092E9008091F00088608093F000CF7088
|
||||
:1012B000C093E900FF91EF91CF91BF91AF919F91C2
|
||||
:1012C0008F917F916F915F914F913F912F910F90EF
|
||||
:1012D0000FBE0F901F9018951F93CF93DF93CDB73C
|
||||
:1012E000DEB7AC970FB6F894DEBF0FBECDBFEFE709
|
||||
:1012F000F2E08091F100819322E0E738F207C9F72C
|
||||
:10130000B0DA8091E80083FF30C180917F02909134
|
||||
:101310008002953009F487C038F49130B1F170F053
|
||||
:10132000933009F022C131C0983009F4F3C09930EC
|
||||
:1013300009F4FFC0963009F018C19BC0803821F035
|
||||
:10134000823809F012C108C080917B0290917C0222
|
||||
:10135000992389F082600FC080918302909184026A
|
||||
:101360008F7099278093E9008091EB0085FB882797
|
||||
:1013700080F91092E9009091E800977F9093E8003F
|
||||
:101380008093F1001092F100D0C0882319F08230D0
|
||||
:1013900009F0EBC08F7121F0823009F0E6C00BC07C
|
||||
:1013A00080918102813009F0E0C0933009F080E043
|
||||
:1013B00080937C022FC08091810281112BC080918B
|
||||
:1013C0008302909184028F709927009709F4CDC011
|
||||
:1013D0008093E9002091EB0020FF1CC02091800247
|
||||
:1013E000233021F48091EB00806212C09091EB00D9
|
||||
:1013F00090619093EB0021E030E001C0220F8A95CC
|
||||
:10140000EAF72093EA001092EA008091EB008860EE
|
||||
:101410008093EB001092E9008091E800877F809331
|
||||
:10142000E800D3DDA2C08111A0C08091810290911B
|
||||
:1014300082028F779927182F9091E3009078982B4C
|
||||
:101440009093E3008091E800877F8093E800BDDD02
|
||||
:101450008091E80080FFFCCF8091E300806880935A
|
||||
:10146000E300112311F083E001C082E080937E024B
|
||||
:101470007CC08058823008F078C0809181029091C1
|
||||
:1014800082028C3D23E0920771F583E08A838AE231
|
||||
:1014900089834FB7F894DE01139620E03EE051E2D5
|
||||
:1014A000E32FF0E050935700E49120FF03C0E29552
|
||||
:1014B000EF703F5FEF708E2F90E0EA3010F0C7962C
|
||||
:1014C00001C0C0968D939D932F5F243149F74FBF84
|
||||
:1014D0008091E800877F8093E8006AE270E0CE01A7
|
||||
:1014E0000196FDDB11C0AE01455D5F4F6091830247
|
||||
:1014F000EFD90097D1F12091E800277F2093E800F1
|
||||
:10150000BC018BA59CA58BDC8091E8008B77809338
|
||||
:10151000E8002BC0803849F58091E800877F8093F0
|
||||
:10152000E80080917A028093F1008091E8008E7744
|
||||
:1015300076CF81111AC0909181029230B0F48091DF
|
||||
:10154000E800877F8093E80090937A023EDD8091E7
|
||||
:101550007A02811104C08091E30087FF02C084E019
|
||||
:1015600001C081E080937E02C1D88091E80083FFB2
|
||||
:101570000AC08091E800877F8093E8008091EB00AB
|
||||
:1015800080628093EB00AC960FB6F894DEBF0FBE7E
|
||||
:10159000CDBFDF91CF911F9108950895CF93809192
|
||||
:1015A0007E028823A9F08091E9008F709091EC0071
|
||||
:1015B00090FF02C090E801C090E0C92FC82B1092A4
|
||||
:1015C000E9008091E80083FD87DECF70C093E900D9
|
||||
:1015D000CF910895CF93DF93EC014096FC018BE00F
|
||||
:1015E000DF011D928A95E9F782E08C83898783E089
|
||||
:1015F0008E8761E0CE010196AADC882361F061E06C
|
||||
:10160000CE010696A4DC882331F061E0CE010B9672
|
||||
:10161000DF91CF919CCC80E0DF91CF910895CF9363
|
||||
:10162000C62F20917E022430F1F4FC0144895589B3
|
||||
:1016300066897789452B462B472BA9F081818F70CE
|
||||
:101640008093E9008091E80085FF04C0C093F10019
|
||||
:1016500080E00AC08091E8008E778093E800D6DCB5
|
||||
:101660008823A1F301C082E0CF91089520917E02EA
|
||||
:10167000243029F5FC014489558966897789452BF1
|
||||
:10168000462B472BE1F081818F708093E900809198
|
||||
:10169000F200811102C080E008959091E8008091ED
|
||||
:1016A000E8008E778093E80095FDF5CFAFDC8111DF
|
||||
:1016B00007C09091E8009E779093E800089582E03B
|
||||
:1016C000089520917E02243089F4FC0144895589D3
|
||||
:1016D00066897789452B462B472B41F021812F7056
|
||||
:1016E0002093E9002091E80020FDC0CF08952091CB
|
||||
:1016F0007E02243019F02FEF3FEF24C0FC01448913
|
||||
:10170000558966897789452B462B472BA1F386811E
|
||||
:101710008F708093E9008091E80082FFECCF809188
|
||||
:10172000F200882321F02091F10030E002C02FEF79
|
||||
:101730003FEF8091F200811105C08091E8008B7726
|
||||
:101740008093E800C90108950895CF93DF93EC01D9
|
||||
:101750008091E80083FFA9C0888190E020918302F6
|
||||
:10176000309184022817390709F09FC080918002C8
|
||||
:10177000813261F020F4803209F097C03DC082329E
|
||||
:1017800009F46EC0833209F090C07FC080917F025F
|
||||
:10179000813A09F08AC08091E800877F8093E80051
|
||||
:1017A0008091E80080FFFCCF4C895D896E897F893C
|
||||
:1017B0004093F100BB27A72F962F852F8093F10030
|
||||
:1017C000CB01AA27BB278093F100472F5527662717
|
||||
:1017D00077274093F100888D8093F100898D809365
|
||||
:1017E000F1008A8D8093F1008091E8008E778093DC
|
||||
:1017F000E800DF91CF91E9CB80917F02813209F03F
|
||||
:1018000054C08091E800877F8093E80005C08091F4
|
||||
:101810007E02882309F449C08091E80082FFF7CF57
|
||||
:101820003091F1002091F1009091F1008091F10050
|
||||
:101830003C8B2D8B9E8B8F8B8091F100888F8091BC
|
||||
:10184000F100898F8091F1008A8F8091E8008B7779
|
||||
:101850008093E800BADBCE01DF91CF910C94920324
|
||||
:1018600080917F02813209F58091E800877F809323
|
||||
:10187000E800ABDB8091810290918202998B888B8A
|
||||
:10188000CE01DF91CF910C94260480917F028132AA
|
||||
:1018900061F48091E800877F8093E80096DB609197
|
||||
:1018A0008102CE01DF91CF914FCFDF91CF9108958B
|
||||
:1018B0006F927F928F929F92AF92BF92CF92DF9260
|
||||
:1018C000EF92FF920F931F93CF93DF9300D01F925D
|
||||
:1018D000CDB7DEB77C01ADB6BEB68091E80083FF20
|
||||
:1018E00007C1F701808190E020918302309184024A
|
||||
:1018F0002817390709F0FCC080918002833009F471
|
||||
:101900009EC030F4813071F0823009F0F1C0D4C053
|
||||
:101910008A3009F4B9C08B3009F4A2C0893009F0CB
|
||||
:10192000E7C04CC080917F02813A09F0E1C08DB6DA
|
||||
:101930009EB61A82198280918102109182028B8355
|
||||
:10194000F70140858DB79EB7841B91090FB6F894B7
|
||||
:101950009EBF0FBE8DBFCDB6DEB6EFEFCE1ADE0A4C
|
||||
:10196000360150E060E070E0C601EAD1412F4150FD
|
||||
:101970008E010F5F1F4F9601BE016D5F7F4FC70144
|
||||
:101980000E944404F701268137812115310529F091
|
||||
:10199000408550E0B601C901CAD11092E90080919A
|
||||
:1019A000E800877F8093E80069817A81C30197D935
|
||||
:1019B0008091E8008B778093E80039C080917F02A6
|
||||
:1019C000813209F095C08DB69EB6009185021091C6
|
||||
:1019D000860270908102609082028DB79EB7801B54
|
||||
:1019E000910B0FB6F8949EBF0FBE8DBFCDB6DEB67D
|
||||
:1019F000EFEFCE1ADE0A8091E800877F8093E8003F
|
||||
:101A0000B801C601CCD98091E8008E778093E800B8
|
||||
:101A100021E0711001C020E030E0021B130B2C0DFF
|
||||
:101A20003D1D462D4150672DC7010E946704882D3A
|
||||
:101A3000992D0FB6F8949EBF0FBE8DBF59C08091EF
|
||||
:101A40007F02813A09F054C08091E800877F80933B
|
||||
:101A5000E8008091E80080FFFCCFF701818540C05D
|
||||
:101A600080917F02813209F043C08091E800877F36
|
||||
:101A70008093E800AADA9091810281E0911101C07F
|
||||
:101A800080E0F701818734C080917F02813281F547
|
||||
:101A90008091E800877F8093E80097DA8091810247
|
||||
:101AA00090918202882736E0969587953A95E1F7DE
|
||||
:101AB000F701958784871CC080917F02813AC1F429
|
||||
:101AC0008091E800877F8093E8008091E80080FFA4
|
||||
:101AD000FCCFF70184859585969587959695879592
|
||||
:101AE0008093F1008091E8008E778093E8006DDAB2
|
||||
:101AF0000FB6F894BEBE0FBEADBE0F900F900F9004
|
||||
:101B0000DF91CF911F910F91FF90EF90DF90CF90D9
|
||||
:101B1000BF90AF909F908F907F906F9008959C01A1
|
||||
:101B2000275F3F4FF90127E0DF011D922A95E9F772
|
||||
:101B300021E0FC01218724EF31E03587248723E071
|
||||
:101B4000248361E0019603CA4F925F926F927F9265
|
||||
:101B50008F929F92AF92BF92CF92DF92EF92FF92BD
|
||||
:101B60000F931F93CF93DF9300D01F92CDB7DEB7B3
|
||||
:101B70007C01ADB6BEB680917E02843009F08FC084
|
||||
:101B80008091E4009091E500F701228533852817C4
|
||||
:101B9000390709F484C081818F708093E9008091B6
|
||||
:101BA000E80085FF7CC06DB67EB640858DB79EB7D8
|
||||
:101BB000841B91090FB6F8949EBF0FBE8DBFCDB6A2
|
||||
:101BC000DEB6EFEFCE1ADE0A1B821A8219824601B8
|
||||
:101BD00050E060E070E0C601B3D08E010F5F1F4F90
|
||||
:101BE000960140E0BE016D5F7F4FC7010E94440433
|
||||
:101BF000582EF70184859585892B31F001E010E09E
|
||||
:101C000086859785892B11F000E010E0F701C680EA
|
||||
:101C1000D780C114D10489F049815A81B601C40129
|
||||
:101C200079D044244394009709F4412CF70140856E
|
||||
:101C300050E0B401C6017BD001C0412C89819A815A
|
||||
:101C4000892BF9F0511004C0411002C000FF19C0E7
|
||||
:101C5000F701848595859787868781818F7080932A
|
||||
:101C6000E9008B8181118093F10069817A8140E0E4
|
||||
:101C700050E0C4010E9422068091E8008E77809394
|
||||
:101C8000E8008091E4009091E500F7019387828756
|
||||
:101C9000862D972D0FB6F8949EBF0FBE8DBF0FB641
|
||||
:101CA000F894BEBE0FBEADBE0F900F900F90DF91A7
|
||||
:101CB000CF911F910F91FF90EF90DF90CF90BF9049
|
||||
:101CC000AF909F908F907F906F905F904F9008950E
|
||||
:101CD000A1E21A2EAA1BBB1BFD010DC0AA1FBB1F30
|
||||
:101CE000EE1FFF1FA217B307E407F50720F0A21BA2
|
||||
:101CF000B30BE40BF50B661F771F881F991F1A940F
|
||||
:101D000069F760957095809590959B01AC01BD0138
|
||||
:101D1000CF010895FB01DC0104C08D910190801971
|
||||
:101D200021F441505040C8F7881B990B0895FB01DE
|
||||
:101D3000DC0102C001900D9241505040D8F7089547
|
||||
:101D4000DC0101C06D9341505040E0F70895F894D4
|
||||
:021D5000FFCFC3
|
||||
:101D5200028120000001500211000000000000007A
|
||||
:101D620000834000000104400000018208000001DD
|
||||
:0E1D720000000000000000000000000830200B
|
||||
:00000001FF
|
||||
|
|
|
|||
489
HID.cpp
|
|
@ -24,15 +24,443 @@ THE SOFTWARE.
|
|||
#include "HID.h"
|
||||
|
||||
//================================================================================
|
||||
// HID
|
||||
// HID Leonardo/Micro
|
||||
//================================================================================
|
||||
|
||||
#if defined(USBCON)
|
||||
|
||||
HID_ HID;
|
||||
|
||||
HID_::HID_(void){
|
||||
// empty
|
||||
}
|
||||
|
||||
void HID_::begin(void){
|
||||
// empty
|
||||
}
|
||||
|
||||
void HID_::end(void){
|
||||
// empty
|
||||
}
|
||||
|
||||
void HID_::sendReport(uint8_t ReportID, const void* HIDReport, uint8_t length){
|
||||
HID_SendReport(ReportID, HIDReport, length);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HID_ENABLED
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
|
||||
// HID report descriptor
|
||||
|
||||
#define LSB(_x) ((_x) & 0xFF)
|
||||
#define MSB(_x) ((_x) >> 8)
|
||||
|
||||
#define RAWHID_USAGE_PAGE 0xFFC0
|
||||
#define RAWHID_USAGE 0x0C00
|
||||
#define RAWHID_TX_SIZE 64
|
||||
#define RAWHID_RX_SIZE 64
|
||||
|
||||
extern const u8 _hidReportDescriptor[] PROGMEM;
|
||||
const u8 _hidReportDescriptor[] = {
|
||||
|
||||
#ifdef HID_MOUSE_ENABLE
|
||||
// Mouse
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop) // 54
|
||||
0x09, 0x02, // USAGE (Mouse)
|
||||
0xa1, 0x01, // COLLECTION (Application)
|
||||
0x09, 0x01, // USAGE (Pointer)
|
||||
0xa1, 0x00, // COLLECTION (Physical)
|
||||
0x85, HID_REPORTID_MouseReport,// REPORT_ID
|
||||
// 5 buttons
|
||||
0x05, 0x09, // USAGE_PAGE (Button)
|
||||
0x19, 0x01, // USAGE_MINIMUM (Button 1)
|
||||
0x29, 0x05, // USAGE_MAXIMUM (Button 5)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
||||
0x95, 0x05, // REPORT_COUNT (5)
|
||||
0x75, 0x01, // REPORT_SIZE (1)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
// reserved
|
||||
0x95, 0x01, // REPORT_COUNT (1)
|
||||
0x75, 0x03, // REPORT_SIZE (3)
|
||||
0x81, 0x03, // INPUT (Cnst,Var,Abs)
|
||||
// x, y, wheel
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x30, // USAGE (X)
|
||||
0x09, 0x31, // USAGE (Y)
|
||||
0x09, 0x38, // USAGE (Wheel)
|
||||
0x15, 0x81, // LOGICAL_MINIMUM (-127)
|
||||
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
|
||||
0x75, 0x08, // REPORT_SIZE (8)
|
||||
0x95, 0x03, // REPORT_COUNT (3)
|
||||
0x81, 0x06, // INPUT (Data,Var,Rel)
|
||||
// end
|
||||
0xc0, // END_COLLECTION
|
||||
0xc0, // END_COLLECTION
|
||||
#endif
|
||||
|
||||
#ifdef HID_KEYBOARD_ENABLE
|
||||
// Keyboard
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x06, // USAGE (Keyboard)
|
||||
0xa1, 0x01, // COLLECTION (Application)
|
||||
0x85, HID_REPORTID_KeyboardReport, // REPORT_ID
|
||||
0x05, 0x07, // USAGE_PAGE (Keyboard)
|
||||
// modifiers
|
||||
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
|
||||
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
||||
0x75, 0x01, // REPORT_SIZE (1)
|
||||
0x95, 0x08, // REPORT_COUNT (8)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
// reserved byte
|
||||
0x95, 0x01, // REPORT_COUNT (1)
|
||||
0x75, 0x08, // REPORT_SIZE (8)
|
||||
0x81, 0x03, // INPUT (Cnst,Var,Abs)
|
||||
// Key[6] Array
|
||||
0x95, 0x06, // REPORT_COUNT (6)
|
||||
0x75, 0x08, // REPORT_SIZE (8)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x25, 0x65, // LOGICAL_MAXIMUM (101)
|
||||
0x05, 0x07, // USAGE_PAGE (Keyboard)
|
||||
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
|
||||
0x29, 0x65, // USAGE_MAXIMUM (Keyboard Application)
|
||||
0x81, 0x00, // INPUT (Data,Ary,Abs)
|
||||
// LEDs for num lock etc
|
||||
0x05, 0x08, /* USAGE_PAGE (LEDs) */
|
||||
0x19, 0x01, /* USAGE_MINIMUM (Num Lock) */
|
||||
0x29, 0x05, /* USAGE_MAXIMUM (Kana) */
|
||||
0x95, 0x05, /* REPORT_COUNT (5) */
|
||||
0x75, 0x01, /* REPORT_SIZE (1) */
|
||||
0x91, 0x02, /* OUTPUT (Data,Var,Abs) */
|
||||
// Reserved 3 bits
|
||||
0x95, 0x01, /* REPORT_COUNT (1) */
|
||||
0x75, 0x03, /* REPORT_SIZE (3) */
|
||||
0x91, 0x03, /* OUTPUT (Cnst,Var,Abs) */
|
||||
// end
|
||||
0xc0, // END_COLLECTION
|
||||
#endif
|
||||
|
||||
#ifdef HID_RAWKEYBOARD_ENABLE
|
||||
// RAW HID
|
||||
0x06, 0xC0, 0xFF,
|
||||
0x0A, 0x00, 0x0C,
|
||||
|
||||
0xA1, 0x01, // Collection 0x01
|
||||
0x85, HID_REPORTID_RawKeyboardReport, // REPORT_ID
|
||||
0x75, 0x08, // report size = 8 bits
|
||||
0x15, 0x00, // logical minimum = 0
|
||||
0x26, 0xFF, 0x00, // logical maximum = 255
|
||||
|
||||
0x95, 64, // report count TX
|
||||
0x09, 0x01, // usage
|
||||
0x81, 0x02, // Input (array)
|
||||
|
||||
0x95, 64, // report count RX
|
||||
0x09, 0x02, // usage
|
||||
0x91, 0x02, // Output (array)
|
||||
0xC0, // end collection
|
||||
#endif
|
||||
|
||||
#ifdef HID_MEDIA_ENABLE
|
||||
// Media
|
||||
0x05, 0x0C, // usage page (consumer device)
|
||||
0x09, 0x01, // usage -- consumer control
|
||||
0xA1, 0x01, // collection (application)
|
||||
0x85, HID_REPORTID_MediaReport, // report id
|
||||
// 4 media Keys
|
||||
0x15, 0x00, //logical minimum
|
||||
0x26, 0xFF, 0xFF, //logical maximum (3ff)
|
||||
0x19, 0x00, // usage minimum (0)
|
||||
0x2A, 0xFF, 0xFF, //usage maximum (3ff)
|
||||
0x95, 0x04, //report count (4)
|
||||
0x75, 0x10, //report size (16)
|
||||
0x81, 0x00, //input
|
||||
0xC0, //end collection
|
||||
#endif
|
||||
|
||||
#ifdef HID_SYSTEM_ENABLE
|
||||
// System
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x80, // USAGE (System Control)
|
||||
0xa1, 0x01, // COLLECTION (Application)
|
||||
0x85, HID_REPORTID_SystemReport, // REPORT_ID
|
||||
// 1 system key
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
|
||||
0x19, 0x00, // USAGE_MINIMUM (Undefined)
|
||||
0x29, 0xff, // USAGE_MAXIMUM (System Menu Down)
|
||||
0x95, 0x01, // REPORT_COUNT (1)
|
||||
0x75, 0x08, // REPORT_SIZE (8)
|
||||
0x81, 0x00, // INPUT (Data,Ary,Abs)
|
||||
0xc0, // END_COLLECTION
|
||||
#endif
|
||||
|
||||
#ifdef HID_GAMEPAD1_ENABLE
|
||||
// Gamepad1
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x05, // USAGE (Game Pad)
|
||||
0xa1, 0x01, // COLLECTION (Application)
|
||||
0x85, HID_REPORTID_Gamepad1Report, // REPORT_ID
|
||||
// 32 Buttons
|
||||
0x05, 0x09, // USAGE_PAGE (Button)
|
||||
0x19, 0x01, // USAGE_MINIMUM (Button 1)
|
||||
0x29, 0x20, // USAGE_MAXIMUM (Button 32)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
||||
0x75, 0x01, // REPORT_SIZE (1)
|
||||
0x95, 0x20, // REPORT_COUNT (32)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
// 6 16bit Axis
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0xa1, 0x00, // COLLECTION (Physical)
|
||||
0x09, 0x30, // USAGE (X)
|
||||
0x09, 0x31, // USAGE (Y)
|
||||
0x09, 0x32, // USAGE (Z)
|
||||
0x09, 0x33, // USAGE (Rx)
|
||||
0x09, 0x34, // USAGE (Ry)
|
||||
0x09, 0x35, // USAGE (Rz)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x27, 0xff, 0xff, 0x00, 0x00, // LOGICAL_MAXIMUM (65535)
|
||||
0x75, 0x10, // REPORT_SIZE (16)
|
||||
0x95, 0x06, // REPORT_COUNT (6)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
0xc0, // END_COLLECTION
|
||||
// 2 Hat Switches
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x39, // USAGE (Hat switch)
|
||||
0x09, 0x39, // USAGE (Hat switch)
|
||||
0x15, 0x01, // LOGICAL_MINIMUM (1)
|
||||
0x25, 0x08, // LOGICAL_MAXIMUM (8)
|
||||
0x95, 0x02, // REPORT_COUNT (2)
|
||||
0x75, 0x04, // REPORT_SIZE (4)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
// 8bit Throttle + Rudder
|
||||
//0x05, 0x02, // USAGE_PAGE (Simulation Controls)
|
||||
//0xa1, 0x00, // COLLECTION (Physical)
|
||||
//0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
//0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
|
||||
//0x09, 0xbb, // USAGE (Throttle)
|
||||
//0x09, 0xba, // USAGE (Rudder)
|
||||
//0x75, 0x08, // REPORT_SIZE (8)
|
||||
//0x95, 0x02, // REPORT_COUNT (2)
|
||||
//0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
//0xc0, // END_COLLECTION
|
||||
0xc0, // END_COLLECTION
|
||||
#endif
|
||||
|
||||
#ifdef HID_GAMEPAD2_ENABLE
|
||||
// Gamepad2
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x05, // USAGE (Game Pad)
|
||||
0xa1, 0x01, // COLLECTION (Application)
|
||||
0x85, HID_REPORTID_Gamepad2Report, // REPORT_ID
|
||||
// 32 Buttons
|
||||
0x05, 0x09, // USAGE_PAGE (Button)
|
||||
0x19, 0x01, // USAGE_MINIMUM (Button 1)
|
||||
0x29, 0x20, // USAGE_MAXIMUM (Button 32)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
||||
0x75, 0x01, // REPORT_SIZE (1)
|
||||
0x95, 0x20, // REPORT_COUNT (32)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
// 6 16bit Axis
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0xa1, 0x00, // COLLECTION (Physical)
|
||||
0x09, 0x30, // USAGE (X)
|
||||
0x09, 0x31, // USAGE (Y)
|
||||
0x09, 0x32, // USAGE (Z)
|
||||
0x09, 0x33, // USAGE (Rx)
|
||||
0x09, 0x34, // USAGE (Ry)
|
||||
0x09, 0x35, // USAGE (Rz)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x27, 0xff, 0xff, 0x00, 0x00, // LOGICAL_MAXIMUM (65535)
|
||||
0x75, 0x10, // REPORT_SIZE (16)
|
||||
0x95, 0x06, // REPORT_COUNT (6)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
0xc0, // END_COLLECTION
|
||||
// 2 Hat Switches
|
||||
0x09, 0x39, // USAGE (Hat switch)
|
||||
0x09, 0x39, // USAGE (Hat switch)
|
||||
0x15, 0x01, // LOGICAL_MINIMUM (1)
|
||||
0x25, 0x08, // LOGICAL_MAXIMUM (8)
|
||||
0x95, 0x02, // REPORT_COUNT (2)
|
||||
0x75, 0x04, // REPORT_SIZE (4)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
// 8bit Throttle + Rudder
|
||||
//0x05, 0x02, // USAGE_PAGE (Simulation Controls)
|
||||
//0xa1, 0x00, // COLLECTION (Physical)
|
||||
//0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
//0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
|
||||
//0x09, 0xbb, // USAGE (Throttle)
|
||||
//0x09, 0xba, // USAGE (Rudder)
|
||||
//0x75, 0x08, // REPORT_SIZE (8)
|
||||
//0x95, 0x02, // REPORT_COUNT (2)
|
||||
//0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
//0xc0, // END_COLLECTION
|
||||
0xc0, // END_COLLECTION
|
||||
#endif
|
||||
|
||||
#ifdef HID_JOYSTICK1_ENABLE
|
||||
// Joystick1
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x04, // USAGE (Joystick)
|
||||
0xa1, 0x01, // COLLECTION (Application)
|
||||
0x85, HID_REPORTID_Joystick1Report, // REPORT_ID
|
||||
0xa1, 0x00, // COLLECTION (Physical)
|
||||
0x05, 0x09, // USAGE_PAGE (Button)
|
||||
0x19, 0x01, // USAGE_MINIMUM (Button 1)
|
||||
0x29, 0x02, // USAGE_MAXIMUM (Button 2)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
||||
0x75, 0x01, // REPORT_SIZE (1)
|
||||
0x95, 0x02, // REPORT_COUNT (2)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x30, // USAGE (X)
|
||||
0x09, 0x31, // USAGE (Y)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x26, 0xff, 0x03, // LOGICAL_MAXIMUM (1023)
|
||||
0x75, 0x0a, // REPORT_SIZE (10)
|
||||
0x95, 0x02, // REPORT_COUNT (2)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
0x75, 0x02, // REPORT_SIZE (2)
|
||||
0x95, 0x01, // REPORT_COUNT (1)
|
||||
0x81, 0x03, // INPUT (Cnst,Var,Abs)
|
||||
0xc0, // END_COLLECTION
|
||||
0xc0, // END_COLLECTION
|
||||
#endif
|
||||
|
||||
#ifdef HID_JOYSTICK2_ENABLE
|
||||
// Joystick2
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x04, // USAGE (Joystick)
|
||||
0xa1, 0x01, // COLLECTION (Application)
|
||||
0x85, HID_REPORTID_Joystick2Report, // REPORT_ID
|
||||
0xa1, 0x00, // COLLECTION (Physical)
|
||||
0x05, 0x09, // USAGE_PAGE (Button)
|
||||
0x19, 0x01, // USAGE_MINIMUM (Button 1)
|
||||
0x29, 0x02, // USAGE_MAXIMUM (Button 2)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
||||
0x75, 0x01, // REPORT_SIZE (1)
|
||||
0x95, 0x02, // REPORT_COUNT (2)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
||||
0x09, 0x30, // USAGE (X)
|
||||
0x09, 0x31, // USAGE (Y)
|
||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
||||
0x26, 0xff, 0x03, // LOGICAL_MAXIMUM (1023)
|
||||
0x75, 0x0a, // REPORT_SIZE (10)
|
||||
0x95, 0x02, // REPORT_COUNT (2)
|
||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
||||
0x75, 0x02, // REPORT_SIZE (2)
|
||||
0x95, 0x01, // REPORT_COUNT (1)
|
||||
0x81, 0x03, // INPUT (Cnst,Var,Abs)
|
||||
0xc0, // END_COLLECTION
|
||||
0xc0 // END_COLLECTION
|
||||
#endif
|
||||
};
|
||||
|
||||
extern const HIDDescriptor _hidInterface PROGMEM;
|
||||
const HIDDescriptor _hidInterface =
|
||||
{
|
||||
D_INTERFACE(HID_INTERFACE,1,3,0,0),
|
||||
D_HIDREPORT(sizeof(_hidReportDescriptor)),
|
||||
D_ENDPOINT(USB_ENDPOINT_IN (HID_ENDPOINT_INT),USB_ENDPOINT_TYPE_INTERRUPT,0x40,0x01)
|
||||
};
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// Driver
|
||||
|
||||
u8 _hid_protocol = 1;
|
||||
u8 _hid_idle = 1;
|
||||
|
||||
#define WEAK __attribute__ ((weak))
|
||||
|
||||
int WEAK HID_GetInterface(u8* interfaceNum)
|
||||
{
|
||||
interfaceNum[0] += 1; // uses 1
|
||||
return USB_SendControl(TRANSFER_PGM,&_hidInterface,sizeof(_hidInterface));
|
||||
}
|
||||
|
||||
int WEAK HID_GetDescriptor(int /* i */)
|
||||
{
|
||||
return USB_SendControl(TRANSFER_PGM,_hidReportDescriptor,sizeof(_hidReportDescriptor));
|
||||
}
|
||||
|
||||
void WEAK HID_SendReport(u8 id, const void* data, int len)
|
||||
{
|
||||
USB_Send(HID_TX, &id, 1);
|
||||
USB_Send(HID_TX | TRANSFER_RELEASE,data,len);
|
||||
}
|
||||
|
||||
bool WEAK HID_Setup(Setup& setup)
|
||||
{
|
||||
u8 r = setup.bRequest;
|
||||
u8 requestType = setup.bmRequestType;
|
||||
if (REQUEST_DEVICETOHOST_CLASS_INTERFACE == requestType)
|
||||
{
|
||||
if (HID_GET_REPORT == r)
|
||||
{
|
||||
//HID_GetReport();
|
||||
return true;
|
||||
}
|
||||
if (HID_GET_PROTOCOL == r)
|
||||
{
|
||||
//Send8(_hid_protocol); // TODO
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (REQUEST_HOSTTODEVICE_CLASS_INTERFACE == requestType)
|
||||
{
|
||||
if (HID_SET_PROTOCOL == r)
|
||||
{
|
||||
_hid_protocol = setup.wValueL;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (HID_SET_IDLE == r)
|
||||
{
|
||||
_hid_idle = setup.wValueL;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//================================================================================
|
||||
// HID Uno/Mega
|
||||
//================================================================================
|
||||
|
||||
#else /* if defined(USBCON) */
|
||||
|
||||
HID_ HID;
|
||||
|
||||
HID_::HID_(void){
|
||||
// empty
|
||||
}
|
||||
|
||||
void HID_::begin(void){
|
||||
Serial.begin(115200);
|
||||
}
|
||||
|
||||
void HID_::end(void){
|
||||
Serial.end();
|
||||
}
|
||||
|
||||
void HID_::sendReport(uint8_t ReportID, const void* HIDReport, uint8_t length){
|
||||
// write the Report via Protocol and checksum. 16bit for each sending
|
||||
// send control address
|
||||
NHPHID.sendChecksum(NHP_ADDRESS_CONTROL, (NHP_USAGE_ARDUINOHID<<8)|ReportID , Serial);
|
||||
NHPwriteChecksum(NHP_ADDRESS_CONTROL, (NHP_USAGE_ARDUINOHID<<8)|ReportID);
|
||||
const uint8_t* report = (const uint8_t*)HIDReport;
|
||||
for(int i = 0; i<length;i++){
|
||||
uint8_t data0=report[i++];
|
||||
|
|
@ -40,9 +468,58 @@ void HID_::sendReport(uint8_t ReportID, const void* HIDReport, uint8_t length){
|
|||
if(i!=length)
|
||||
data1=report[i];
|
||||
// valid HID reports start at Address 2
|
||||
NHPHID.sendChecksum(2+i/2,(data1<<8) | data0, Serial);
|
||||
NHPwriteChecksum(2+i/2,(data1<<8) | data0);
|
||||
}
|
||||
}
|
||||
#endif /* if defined(USBCON) */
|
||||
|
||||
// simple copy/modification of the NicoHoodProtocol writechecksum function
|
||||
void HID_::NHPwriteChecksum(uint8_t address, uint16_t indata){
|
||||
// writes two bytes with its inverse
|
||||
uint32_t temp=~indata;
|
||||
uint32_t data=(temp<<16)|indata;
|
||||
|
||||
// buffer for write operation
|
||||
uint8_t writebuffer[6];
|
||||
|
||||
// start with the maximum size of blocks
|
||||
uint8_t blocks=7;
|
||||
|
||||
// check for the first 7 bit block that doesnt fit into the first 3 bits
|
||||
while(blocks>2){
|
||||
uint8_t nextvalue=(data>>(7*(blocks-3)));
|
||||
if(nextvalue>NHP_MASK_DATA_3BIT){
|
||||
// special case for the MSB
|
||||
if(blocks==7) {
|
||||
writebuffer[0] = nextvalue;
|
||||
blocks--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else{
|
||||
// write the possible first 3 bits and check again after
|
||||
writebuffer[0] = nextvalue;
|
||||
blocks--;
|
||||
}
|
||||
}
|
||||
|
||||
// write the rest of the data bits
|
||||
uint8_t datablocks=blocks-2;
|
||||
while(datablocks>0){
|
||||
writebuffer[datablocks] = data & NHP_MASK_DATA_7BIT;
|
||||
data>>=7;
|
||||
datablocks--;
|
||||
}
|
||||
|
||||
// write lead + length mask
|
||||
writebuffer[0] |= NHP_MASK_LEAD | (blocks <<3);
|
||||
|
||||
// write end mask
|
||||
writebuffer[blocks-1] = NHP_MASK_END | ((address-1) & NHP_MASK_ADDRESS);
|
||||
|
||||
// write the buffer
|
||||
Serial.write(writebuffer, blocks);
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
// Mouse
|
||||
|
|
@ -413,7 +890,7 @@ System_::System_(void){
|
|||
}
|
||||
|
||||
void System_::begin(void){
|
||||
uint16_t _report = 0;
|
||||
uint8_t _report = 0;
|
||||
HID.sendReport(HID_REPORTID_SystemReport, &_report, sizeof(_report));
|
||||
}
|
||||
|
||||
|
|
@ -421,12 +898,12 @@ void System_::end(void){
|
|||
begin();
|
||||
}
|
||||
|
||||
void System_::write(uint16_t s){
|
||||
void System_::write(uint8_t s){
|
||||
press(s);
|
||||
release();
|
||||
}
|
||||
|
||||
void System_::press(uint16_t s){
|
||||
void System_::press(uint8_t s){
|
||||
HID.sendReport(HID_REPORTID_SystemReport, &s, sizeof(s));
|
||||
}
|
||||
|
||||
|
|
|
|||
43
HID.h
|
|
@ -26,23 +26,50 @@ THE SOFTWARE.
|
|||
|
||||
#include <Arduino.h>
|
||||
#include "HID_Reports.h"
|
||||
// somehow you need to declare it in the main program too
|
||||
#include <NicoHoodProtocol.h>
|
||||
|
||||
#ifdef USBCON
|
||||
#include "Platform.h"
|
||||
#include "USBAPI.h"
|
||||
#include "USBDesc.h"
|
||||
#endif
|
||||
|
||||
//================================================================================
|
||||
// HID
|
||||
//================================================================================
|
||||
|
||||
//NHP Definitions
|
||||
|
||||
// Start Mask
|
||||
#define NHP_MASK_START 0xC0 //B11|000000 the two MSB bits
|
||||
#define NHP_MASK_LEAD 0xC0 //B11|000000
|
||||
#define NHP_MASK_DATA 0x00 //B0|0000000 only the first MSB is important
|
||||
#define NHP_MASK_END 0x80 //B10|000000
|
||||
|
||||
// Content Mask
|
||||
#define NHP_MASK_LENGTH 0x38 //B00|111|000
|
||||
#define NHP_MASK_COMMAND 0x0F //B0000|1111
|
||||
#define NHP_MASK_DATA_7BIT 0x7F //B0|1111111
|
||||
#define NHP_MASK_DATA_4BIT 0x0F //B0000|1111
|
||||
#define NHP_MASK_DATA_3BIT 0x07 //B00000|111
|
||||
#define NHP_MASK_ADDRESS 0x3F //B00|111111
|
||||
|
||||
// Reserved Addresses
|
||||
#define NHP_ADDRESS_CONTROL 0x01
|
||||
|
||||
// Reserved Usages
|
||||
#define NHP_USAGE_ARDUINOHID 0x01
|
||||
|
||||
class HID_{
|
||||
public:
|
||||
inline HID_(void){}
|
||||
inline void begin(void){Serial.begin(115200);}
|
||||
inline void end(void){Serial.end();}
|
||||
HID_(void);
|
||||
void begin(void);
|
||||
void end(void);
|
||||
|
||||
// everything public for your own modifications
|
||||
NHProtocol NHPHID;
|
||||
void sendReport(uint8_t ReportID, const void* HIDReport, uint8_t length);
|
||||
private:
|
||||
// simple copy/modification of the NicoHoodProtocol writechecksum function
|
||||
void NHPwriteChecksum(uint8_t address, uint16_t indata);
|
||||
};
|
||||
extern HID_ HID;
|
||||
|
||||
|
|
@ -233,8 +260,8 @@ public:
|
|||
System_(void);
|
||||
void begin(void);
|
||||
void end(void);
|
||||
void write(uint16_t s);
|
||||
void press(uint16_t s);
|
||||
void write(uint8_t s);
|
||||
void press(uint8_t s);
|
||||
void release(void);
|
||||
void releaseAll(void);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,15 +28,17 @@ THE SOFTWARE.
|
|||
//Settings
|
||||
//================================================================================
|
||||
|
||||
#define HID_MOUSE_ENABLE
|
||||
#define HID_KEYBOARD_ENABLE
|
||||
#define HID_RAWKEYBOARD_ENABLE
|
||||
#define HID_MEDIA_ENABLE
|
||||
#define HID_SYSTEM_ENABLE
|
||||
#define HID_GAMEPAD1_ENABLE
|
||||
#define HID_GAMEPAD2_ENABLE
|
||||
#define HID_JOYSTICK1_ENABLE
|
||||
#define HID_JOYSTICK2_ENABLE
|
||||
// deactive unnecessary stuff for Leonardo/Micro
|
||||
// reports needs to be <=255 bytes for leonardo/micro!
|
||||
#define HID_MOUSE_ENABLE 54
|
||||
#define HID_KEYBOARD_ENABLE 65
|
||||
//#define HID_RAWKEYBOARD_ENABLE 30
|
||||
#define HID_MEDIA_ENABLE 25
|
||||
#define HID_SYSTEM_ENABLE 24
|
||||
#define HID_GAMEPAD1_ENABLE 71
|
||||
//#define HID_GAMEPAD2_ENABLE 71
|
||||
//#define HID_JOYSTICK1_ENABLE 51
|
||||
//#define HID_JOYSTICK2_ENABLE 51
|
||||
//#define HID_MIDI_ENABLE
|
||||
|
||||
//================================================================================
|
||||
|
|
@ -96,9 +98,8 @@ typedef union{
|
|||
|
||||
typedef union{
|
||||
// every usable system control key possible. Only one at the same time.
|
||||
uint8_t whole8[2];
|
||||
uint16_t whole16[2/2];
|
||||
uint16_t key;
|
||||
uint8_t whole8[1];
|
||||
uint8_t key;
|
||||
} HID_SystemReport_Data_t;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,16 @@ THE SOFTWARE.
|
|||
|
||||
const USB_Descriptor_HIDReport_Datatype_t PROGMEM HIDReport[] =
|
||||
{
|
||||
// activate all by default
|
||||
#define HID_MOUSE_ENABLE 54
|
||||
#define HID_KEYBOARD_ENABLE 65
|
||||
#define HID_RAWKEYBOARD_ENABLE 30
|
||||
#define HID_MEDIA_ENABLE 25
|
||||
#define HID_SYSTEM_ENABLE 24
|
||||
#define HID_GAMEPAD1_ENABLE 71
|
||||
#define HID_GAMEPAD2_ENABLE 71
|
||||
#define HID_JOYSTICK1_ENABLE 51
|
||||
#define HID_JOYSTICK2_ENABLE 51
|
||||
|
||||
#ifdef HID_MOUSE_ENABLE
|
||||
// Mouse
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ THE SOFTWARE.
|
|||
#include <LUFA/Version.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
|
||||
#include "../../NicoHoodProtocol/NicoHoodProtocol_c.h"
|
||||
#include "Lib/NicoHoodProtocol_c.h"
|
||||
|
||||
/* Macros: */
|
||||
|
||||
|
|
|
|||
254
Hoodloader/Lib/NicoHoodProtocol_c.c
Normal file
|
|
@ -0,0 +1,254 @@
|
|||
/*
|
||||
Copyright (c) 2014 NicoHood
|
||||
See the readme for credit to other people.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "NicoHoodProtocol_c.h"
|
||||
|
||||
//================================================================================
|
||||
// Public variables
|
||||
//================================================================================
|
||||
|
||||
uint8_t NHPreadbuffer[6]={0};
|
||||
uint8_t NHPreadlength=0;
|
||||
uint8_t NHPwritebuffer[6]={0};
|
||||
uint8_t NHPwritelength=0;
|
||||
|
||||
//================================================================================
|
||||
// Private variables
|
||||
//================================================================================
|
||||
|
||||
// Fully read data
|
||||
static uint8_t mCommand=0;
|
||||
static uint8_t mAddress=0;
|
||||
static uint32_t mData=0;
|
||||
static uint8_t mErrorLevel=NHP_INPUT_RESET;
|
||||
|
||||
// in progress reading data
|
||||
static uint8_t mBlocks=0;
|
||||
static uint32_t mWorkData=0;
|
||||
|
||||
//================================================================================
|
||||
//General Functions
|
||||
//================================================================================
|
||||
|
||||
// reset Protocol on the next reading to start a new clean reading
|
||||
void NHPreset(void){ mErrorLevel=NHP_INPUT_RESET; }
|
||||
|
||||
// access for the variables
|
||||
uint8_t NHPgetCommand() { return mCommand; }
|
||||
uint8_t NHPgetAddress() { return mAddress; }
|
||||
uint32_t NHPgetData() { return mData; }
|
||||
uint16_t NHPgetChecksumData() { return mData; }
|
||||
uint8_t NHPgetChecksumData0() { return mData; }
|
||||
uint8_t NHPgetChecksumData1() { return mData>>8;}
|
||||
uint8_t NHPgetErrorLevel(){ return mErrorLevel; }
|
||||
|
||||
// reset buffer for read/write operations
|
||||
void NHPresetreadbuffer() {
|
||||
while(NHPreadlength){
|
||||
NHPreadlength--;
|
||||
NHPreadbuffer[NHPreadlength]=0;
|
||||
}
|
||||
}
|
||||
void NHPresetwritebuffer(){
|
||||
while(NHPwritelength){
|
||||
NHPwritelength--;
|
||||
NHPwritebuffer[NHPwritelength]=0;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
//Read
|
||||
//================================================================================
|
||||
|
||||
bool NHPread(uint8_t input){
|
||||
//reset if previous read was with an input/error
|
||||
if(mErrorLevel){
|
||||
// cancel any pending data reads if a reset was triggered
|
||||
if(mErrorLevel & NHP_INPUT_RESET){
|
||||
mBlocks=0;
|
||||
mWorkData=0;
|
||||
}
|
||||
// if previous read was a lead error keep this byte
|
||||
if(mErrorLevel&NHP_ERR_LEAD){
|
||||
NHPreadbuffer[0]=NHPreadbuffer[NHPreadlength];
|
||||
NHPreadlength=1;
|
||||
}
|
||||
else NHPreadlength=0;
|
||||
}
|
||||
|
||||
// reset fully read data
|
||||
mCommand=0;
|
||||
mAddress=0;
|
||||
mData=0;
|
||||
mErrorLevel=0;
|
||||
|
||||
//write input to the buffer
|
||||
NHPreadbuffer[NHPreadlength]=input;
|
||||
NHPreadlength++;
|
||||
|
||||
// check the lead/end/data indicator
|
||||
switch(input&NHP_MASK_START){
|
||||
|
||||
case(NHP_MASK_LEAD):
|
||||
{
|
||||
// we were still reading! Log an error
|
||||
if(mBlocks){
|
||||
mErrorLevel |= NHP_ERR_LEAD | NHP_ERR_READ;
|
||||
NHPreadlength--;
|
||||
}
|
||||
|
||||
// read command indicator or block length
|
||||
mBlocks = (input & NHP_MASK_LENGTH)>>3;
|
||||
switch(mBlocks){
|
||||
case 0:
|
||||
case 1:
|
||||
// save 4 bit command
|
||||
mCommand=(input & NHP_MASK_COMMAND)+1;
|
||||
mBlocks = 0;
|
||||
mErrorLevel |= NHP_INPUT_COMMAND | NHP_INPUT_NEW;
|
||||
return true;
|
||||
break;
|
||||
case 7:
|
||||
// save block length + first 4 data bits (special case)
|
||||
mWorkData = input & NHP_MASK_DATA_4BIT;
|
||||
mBlocks -=2;
|
||||
break;
|
||||
default:
|
||||
// save block length + first 3 data bits
|
||||
mWorkData = input & NHP_MASK_DATA_3BIT;
|
||||
mBlocks--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case(NHP_MASK_END):
|
||||
{
|
||||
if(mBlocks--==1){
|
||||
// save data + address
|
||||
mAddress=(input&0x3F)+1;
|
||||
mData=mWorkData;
|
||||
mErrorLevel |= NHP_INPUT_ADDRESS | NHP_INPUT_NEW;
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
// log an error, not ready for an address byte, and reset data counters
|
||||
mErrorLevel |= NHP_ERR_DATA | NHP_ERR_READ;
|
||||
mBlocks=0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//case NHP_MASK_DATA1/2?? <--
|
||||
default: //NHP_MASK_DATA1/2
|
||||
{
|
||||
if(mBlocks--<2){
|
||||
// log an error, expecting an address or header byte
|
||||
mErrorLevel |= NHP_ERR_END | NHP_ERR_READ;
|
||||
mBlocks=0;
|
||||
}
|
||||
else{
|
||||
// get next 7 bits of data
|
||||
mWorkData<<=7;
|
||||
// dont need &NHP_MASK_DATA_7BIT because first bit is zero!
|
||||
mWorkData|=input;
|
||||
}
|
||||
}
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
// no new input
|
||||
return false;
|
||||
}
|
||||
|
||||
// reads two bytes and check its inverse
|
||||
bool NHPreadChecksum(uint8_t input){
|
||||
if(NHPread(input)){
|
||||
// if there is an address input (comand invalid, too insecure)
|
||||
if(NHPgetAddress() && (((NHPgetData()&0xFFFF) ^ (NHPgetData()>>16))==0xFFFF)){
|
||||
// make sure to use getAddress() and getData()&0xFFFF
|
||||
return true;
|
||||
}
|
||||
// else you can forward the buffer or pass -1 as error
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
//Write
|
||||
//================================================================================
|
||||
|
||||
void NHPwriteCommand(uint8_t command){
|
||||
// send lead mask 11 + length 00|0 or 00|1 including the last bit for the 4 bit command
|
||||
NHPwritebuffer[0] = NHP_MASK_LEAD | ((command-1) & NHP_MASK_COMMAND);
|
||||
NHPwritelength=1;
|
||||
}
|
||||
|
||||
void NHPwriteAddress(uint8_t address, uint32_t data){
|
||||
// start with the maximum size of blocks
|
||||
uint8_t blocks=7;
|
||||
|
||||
// check for the first 7 bit block that doesnt fit into the first 3 bits
|
||||
while(blocks>2){
|
||||
uint8_t nextvalue=(data>>(7*(blocks-3)));
|
||||
if(nextvalue>NHP_MASK_DATA_3BIT){
|
||||
// special case for the MSB
|
||||
if(blocks==7) {
|
||||
NHPwritebuffer[0] = nextvalue;
|
||||
blocks--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else{
|
||||
// write the possible first 3 bits and check again after
|
||||
NHPwritebuffer[0] = nextvalue;
|
||||
blocks--;
|
||||
}
|
||||
}
|
||||
|
||||
// write the rest of the data bits
|
||||
uint8_t datablocks=blocks-2;
|
||||
while(datablocks>0){
|
||||
NHPwritebuffer[datablocks] = data & NHP_MASK_DATA_7BIT;
|
||||
data>>=7;
|
||||
datablocks--;
|
||||
}
|
||||
|
||||
// write lead + length mask
|
||||
NHPwritebuffer[0] |= NHP_MASK_LEAD | (blocks <<3);
|
||||
|
||||
// write end mask
|
||||
NHPwritebuffer[blocks-1] = NHP_MASK_END | ((address-1) & NHP_MASK_ADDRESS);
|
||||
|
||||
// save the length
|
||||
NHPwritelength=blocks;
|
||||
}
|
||||
|
||||
|
||||
// writes two bytes with its inverse
|
||||
void NHPwriteChecksum(uint8_t address, uint16_t data){
|
||||
uint32_t temp=~data;
|
||||
uint32_t checksum=(temp<<16)|data;
|
||||
NHPwriteAddress(address,checksum);
|
||||
}
|
||||
|
||||
104
Hoodloader/Lib/NicoHoodProtocol_c.h
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
Copyright (c) 2014 NicoHood
|
||||
See the readme for credit to other people.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef NICOHOODPROTOCOL_C_h
|
||||
#define NICOHOODPROTOCOL_C_h
|
||||
|
||||
#include <stdint.h> //uint_t definitions
|
||||
#include <stdbool.h> //bool type
|
||||
|
||||
//================================================================================
|
||||
//Settings
|
||||
//================================================================================
|
||||
|
||||
// empty
|
||||
|
||||
//================================================================================
|
||||
//Definitions
|
||||
//================================================================================
|
||||
|
||||
// ErrorLevel
|
||||
#define NHP_MASK_INPUT 0x0F
|
||||
#define NHP_INPUT_NO 0x00
|
||||
#define NHP_INPUT_NEW 0x01
|
||||
#define NHP_INPUT_ADDRESS 0x02
|
||||
#define NHP_INPUT_COMMAND 0x04
|
||||
#define NHP_INPUT_RESET 0x08
|
||||
#define NHP_MASK_ERR 0xF0
|
||||
#define NHP_ERR_NO 0x00
|
||||
#define NHP_ERR_READ 0x10
|
||||
#define NHP_ERR_END 0x20
|
||||
#define NHP_ERR_DATA 0x40
|
||||
#define NHP_ERR_LEAD 0x80
|
||||
#define NHP_ERR_LIMIT 20 //0-255, only for the user function
|
||||
|
||||
// Start Mask
|
||||
#define NHP_MASK_START 0xC0 //B11|000000 the two MSB bits
|
||||
#define NHP_MASK_LEAD 0xC0 //B11|000000
|
||||
#define NHP_MASK_DATA 0x00 //B0|0000000 only the first MSB is important
|
||||
#define NHP_MASK_END 0x80 //B10|000000
|
||||
|
||||
// Content Mask
|
||||
#define NHP_MASK_LENGTH 0x38 //B00|111|000
|
||||
#define NHP_MASK_COMMAND 0x0F //B0000|1111
|
||||
#define NHP_MASK_DATA_7BIT 0x7F //B0|1111111
|
||||
#define NHP_MASK_DATA_4BIT 0x0F //B0000|1111
|
||||
#define NHP_MASK_DATA_3BIT 0x07 //B00000|111
|
||||
#define NHP_MASK_ADDRESS 0x3F //B00|111111
|
||||
|
||||
// Reserved Addresses
|
||||
#define NHP_ADDRESS_CONTROL 0x01
|
||||
|
||||
// Reserved Usages
|
||||
#define NHP_USAGE_ARDUINOHID 0x01
|
||||
|
||||
//================================================================================
|
||||
//Protocol Function Prototypes
|
||||
//================================================================================
|
||||
|
||||
// access for the variables
|
||||
uint8_t NHPgetCommand(void);
|
||||
uint8_t NHPgetAddress(void);
|
||||
uint32_t NHPgetData(void);
|
||||
uint16_t NHPgetChecksumData(void);
|
||||
uint8_t NHPgetChecksumData0(void);
|
||||
uint8_t NHPgetChecksumData1(void);
|
||||
uint8_t NHPgetErrorLevel(void);
|
||||
|
||||
// buffer for read/write operations
|
||||
extern uint8_t NHPreadbuffer[6];
|
||||
extern uint8_t NHPreadlength;
|
||||
extern uint8_t NHPwritebuffer[6];
|
||||
extern uint8_t NHPwritelength;
|
||||
void NHPresetreadbuffer(void);
|
||||
void NHPresetwritebuffer(void);
|
||||
|
||||
// general multifunctional read/write functions
|
||||
void NHPreset(void);
|
||||
bool NHPread(uint8_t input);
|
||||
bool NHPreadChecksum(uint8_t input);
|
||||
void NHPwriteCommand(uint8_t command);
|
||||
void NHPwriteAddress(uint8_t address, uint32_t data);
|
||||
void NHPwriteChecksum(uint8_t address, uint16_t data);
|
||||
|
||||
#endif
|
||||
|
|
@ -32,7 +32,7 @@ ARCH = AVR8
|
|||
F_USB = $(F_CPU)
|
||||
OPTIMIZATION = s
|
||||
TARGET = Hoodloader
|
||||
SRC = $(TARGET).c Descriptors.c ../../NicoHoodProtocol/NicoHoodProtocol_c.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
|
||||
SRC = $(TARGET).c Descriptors.c Lib/NicoHoodProtocol_c.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
|
||||
LUFA_PATH = ../lufa-LUFA-140302/LUFA
|
||||
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ $(ARDUNIOHID_OPTS)
|
||||
LD_FLAGS =
|
||||
|
|
|
|||
90
Readme.md
|
|
@ -1,4 +1,4 @@
|
|||
Arduino HID Project
|
||||
Arduino HID Project BETA 1.1
|
||||
===================
|
||||
Dont you always wanted to turn your Arduino in a Generic HID device like a Keyboard or a Gamepad?
|
||||
Disappointed that the Uno doesnt support this at all and the Micro/Leonardo only Mouse + Keyboard?
|
||||
|
|
@ -19,8 +19,7 @@ Software includes:
|
|||
|
||||
* Arduino HID Uno/Mega library
|
||||
* Arduino HID Micro/Leonardo library
|
||||
* Arduino HID Bootloader
|
||||
* [NicoHoodProtocol](https://github.com/NicoHood/NicoHoodProtocol) library needed for the Uno/Mega!
|
||||
* Arduino HID Bootloader (Hoodloader)
|
||||
|
||||
The following devices are supported:
|
||||
|
||||
|
|
@ -34,36 +33,52 @@ The following devices are supported:
|
|||
Projects can be found here:
|
||||
http://nicohood.wordpress.com/
|
||||
|
||||
Installation
|
||||
============
|
||||
Download the library and rename the folder. See [this instruction](http://arduino.cc/en/Guide/Libraries) how to install new libraries.
|
||||
Installation Leonardo/Micro/Uno/Mega
|
||||
====================================
|
||||
Download the library and **move and replace** all 4 .h/cpp files from the download folder to:
|
||||
```
|
||||
Installation_path\hardware\arduino\cores\arduino
|
||||
```
|
||||
**I strongly recommend to install the library like this.** You can use the normal way but this will only work for Uno/Mega.
|
||||
To not get in conflict with the normal library installation you need to remove it from your normal library path, if you did so.
|
||||
Now you are able to use the library with all kind of Arduinos. The HID include and HID.begin() is optional for Leonardo/Micro
|
||||
but necessary for Uno/Mega.
|
||||
|
||||
**[NicoHoodProtocol](https://github.com/NicoHood/NicoHoodProtocol) library needed for the Uno/Mega!**
|
||||
#### Leonardo/Micro only
|
||||
**Edit HID_Reports.h to de/activate usb functions.** Each function will take some flash,
|
||||
so if you want to save flah deactivate everything you dont need.
|
||||
By default Mouse, Keyboard, Media, System, Gamepad1 is activated.
|
||||
You cannot use more than 255 bytes HID report on the leonardo/micro.
|
||||
The number after each definition tells you the size of each report.
|
||||
I have no idea why you cannot use more than 255 bytes (yet).
|
||||
|
||||
Always release buttons to not cause any erros. Replug USB cable to reset the values if anything went wrong.
|
||||
Connect GND and MOSI2 to deactivate HID function on Uno/Mega (see picture)
|
||||
|
||||
**Arduino Uno/Mega only**
|
||||
|
||||
To install the new bootloader connect your Arduino to your PC and put it into DFU mode.
|
||||
#### Uno/Mega only
|
||||
To **install the new bootloader** connect your Arduino to your PC and put it into DFU mode.
|
||||
**You can always switch back to the original firmware, nothing to break.**
|
||||
See [this in general](http://arduino.cc/en/Hacking/DFUProgramming8U2) and
|
||||
See [this in general (outdated)](http://arduino.cc/en/Hacking/DFUProgramming8U2) and
|
||||
[this for windows](http://nicohood.wordpress.com/2014/06/03/install-new-firmwares-with-dfu-and-flip-on-arduino-unomega-r3/)
|
||||
on how to upload the hex file to your Arduino. Some notes here: The Arduino R3 doesnt need a resistor or so, just connect the two pins near
|
||||
the USB B jack. Choose atmega16u2 for the new R3 version. For older version you need to check google.
|
||||
For a Flip dll error install the drivers manually from the flip directory.
|
||||
|
||||
Upload the hex file to your Arduino. It doesnt care if its a Uno/Mega/Mega ADK. It will just work the same.
|
||||
Unplug the Arduino if it sais successful and plug it back in. You cannot destroy anything here and you can always
|
||||
switch back to the original firmware.
|
||||
You need to install new drivers for that on Windows. Actually they are not new, its just an .inf file that tells
|
||||
switch back to the original firmware which is included with the download.
|
||||
You need to install new drivers for the new device on Windows. Actually they are not new, its just an .inf file that tells
|
||||
Windows to use its built in CDC Serial driver. Ironically Microsoft never signed its own driver.
|
||||
Also see [this tutorial](http://arduino.cc/en/guide/windows) on how to install the drivers.
|
||||
If you want it to be recognized as Uno/Mega edit the makefile. I dont recommend this to know what
|
||||
Bootloader is currently on your Board.
|
||||
|
||||
#### For all Arduinos
|
||||
You are ready to use the libraries. Just have a look at the examples and test it out.
|
||||
The libraries will work for all Arduinos listed above but it will use 2 different libraries.
|
||||
On Arduino/Mega you can only use baud 115200 for HID due to programming reasons. Its not bad anyways
|
||||
The libraries will work for all Arduinos listed above but it will use 2 different HID libraries.
|
||||
On Arduino/Mega you can only use baud 115200 for HID due to programming reasons. Its not bad anyway
|
||||
because its the fastest baud and you want fast HID recognition. You still can use any other baud for
|
||||
normal sketches without HID.
|
||||
normal sketches without HID. The HID include and HID.begin() is not needed for Leonardo/Micro.
|
||||
|
||||
Always release buttons to not cause any erros. Replug USB cable to reset the values if anything went wrong.
|
||||
Connect GND and MOSI2 to deactivate HID function on Uno/Mega (see picture)
|
||||
|
||||
For Arduino Mega2560 I recommend the nightly IDE. See Issue on Github.
|
||||
```
|
||||
|
|
@ -74,6 +89,26 @@ http://downloads.arduino.cc/arduino-avr-toolchain-nightly-gcc-4.8.1-macosx.zip
|
|||
http://downloads.arduino.cc/arduino-avr-toolchain-nightly-gcc-4.8.1-windows.zip
|
||||
```
|
||||
|
||||
How does it work
|
||||
================
|
||||
For the Leonardo/Micro its just a modified version of the HID descriptor and Classes for the new devices.
|
||||
Its not that complicated, everything you need is in the main 4 .h/cpp files.
|
||||
|
||||
For the Uno/Mega you need a special Bootloader. Why? Because the Uno/Mega has 2 chips onboard.
|
||||
The 328/2560 and 16u2 each. And the only communication between the 16u2 and the main chip is via Serial.
|
||||
But the Serial is also used to program the chip. So what i do here is to filter out all Serial Data that comes in
|
||||
via the NicoHoodProtocol (NHP). There is an indicator ad Address 1 which contains the beginning and the Report ID.
|
||||
If the following Serial information is Address 2 with a valid checksum the report will be created and sent if its
|
||||
finished successfull. If any error occured within the first 2 Protocol Addreses the information will be sent via Serial.
|
||||
The Program should forward this information because it could be a normal information. Everything above 2 Addresses that goes
|
||||
wrong wont be sent and discarded due to a normal wrong HID report. Normally you dont have to worry about getting weird HID
|
||||
presses. You need to send exactly 6 bytes with the special Numbers and another 6 bytes for the first information with checksum.
|
||||
And if the reading timed out the Data will also be forwarded. And if you only send Ascii Code the Information is forwarded instantly
|
||||
because the NHP filters that out instantly (see documentation of the NHP).
|
||||
|
||||
To sum it up: Serial information is grabbed by the "man in the middle" and you dont have to worry to get any wrong report.
|
||||
See picture how to deactivate HID function by hardware.
|
||||
|
||||
This library wouldnt be possible without
|
||||
========================================
|
||||
|
||||
|
|
@ -91,32 +126,39 @@ This library wouldnt be possible without
|
|||
|
||||
Todo
|
||||
====
|
||||
* Micro/Leonardo library
|
||||
* Remove debug leds
|
||||
* Add more devices (even more?)
|
||||
* Add ICSP Programmer function
|
||||
* Add Led support
|
||||
* Add How does it work?
|
||||
* Add rumble support (very hard)
|
||||
* Add Xbox Support (too hard)
|
||||
* Add Midi Support
|
||||
* Add Report Out function (for Keyboard Leds etc)
|
||||
* RAW HID
|
||||
|
||||
Known Bugs
|
||||
==========
|
||||
HID only works with baud 115200 because there is no "programming finished" indicator. If you dont use HID you can still choose the baud of your choice
|
||||
System Wakeup is currently not working!
|
||||
|
||||
System Wakeup is currently not working for Arduino Uno/Mega.
|
||||
|
||||
Not tested on the 8u2
|
||||
Not tested on the 8u2 (message me if it works!)
|
||||
|
||||
If you get a checksum Error after Uploading please message me and send me the whole project.
|
||||
Same if your Arduino crashes and dont want to upload sketches anymore (Replug usb fixes this).
|
||||
These bugs occured while devoloping the bootloader and should be fixed. Just in case it happens again I noted it here.
|
||||
|
||||
HID only works with baud 115200 because there is no "programming finished" indicator. If you dont use HID you can still choose the baud of your choice
|
||||
|
||||
Oh and by the way: I also removed some bugs from the official firmware.
|
||||
|
||||
Version History
|
||||
===============
|
||||
```
|
||||
1.1 Beta Release (05.06.2014)
|
||||
* Added Leonardo/Micro support
|
||||
* Included NicoHoodProtocol
|
||||
* Minor fixes
|
||||
|
||||
1.0 Beta Release (03.06.2014)
|
||||
```
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
1
Tutorials/Readme.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
See http://nicohood.wordpress.com/ for tutorials
|
||||
128
USBAPI.h
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
Copyright (c) 2014 NicoHood
|
||||
See the readme for credit to other people.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __USBAPI__
|
||||
#define __USBAPI__
|
||||
|
||||
#if defined(USBCON)
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// USB
|
||||
|
||||
class USBDevice_
|
||||
{
|
||||
public:
|
||||
USBDevice_();
|
||||
bool configured();
|
||||
|
||||
void attach();
|
||||
void detach(); // Serial port goes down too...
|
||||
void poll();
|
||||
};
|
||||
extern USBDevice_ USBDevice;
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// Serial over CDC (Serial1 is the physical port)
|
||||
|
||||
class Serial_ : public Stream
|
||||
{
|
||||
private:
|
||||
ring_buffer *_cdc_rx_buffer;
|
||||
public:
|
||||
void begin(uint16_t baud_count);
|
||||
void end(void);
|
||||
|
||||
virtual int available(void);
|
||||
virtual void accept(void);
|
||||
virtual int peek(void);
|
||||
virtual int read(void);
|
||||
virtual void flush(void);
|
||||
virtual size_t write(uint8_t);
|
||||
using Print::write; // pull in write(str) and write(buf, size) from Print
|
||||
operator bool();
|
||||
};
|
||||
extern Serial_ Serial;
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// Low level API
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bmRequestType;
|
||||
uint8_t bRequest;
|
||||
uint8_t wValueL;
|
||||
uint8_t wValueH;
|
||||
uint16_t wIndex;
|
||||
uint16_t wLength;
|
||||
} Setup;
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// HID 'Driver'
|
||||
|
||||
#include "HID.h"
|
||||
|
||||
int HID_GetInterface(uint8_t* interfaceNum);
|
||||
int HID_GetDescriptor(int i);
|
||||
bool HID_Setup(Setup& setup);
|
||||
void HID_SendReport(uint8_t id, const void* data, int len);
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// MSC 'Driver'
|
||||
|
||||
int MSC_GetInterface(uint8_t* interfaceNum);
|
||||
int MSC_GetDescriptor(int i);
|
||||
bool MSC_Setup(Setup& setup);
|
||||
bool MSC_Data(uint8_t rx,uint8_t tx);
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
// CSC 'Driver'
|
||||
|
||||
int CDC_GetInterface(uint8_t* interfaceNum);
|
||||
int CDC_GetDescriptor(int i);
|
||||
bool CDC_Setup(Setup& setup);
|
||||
|
||||
//================================================================================
|
||||
//================================================================================
|
||||
|
||||
#define TRANSFER_PGM 0x80
|
||||
#define TRANSFER_RELEASE 0x40
|
||||
#define TRANSFER_ZERO 0x20
|
||||
|
||||
int USB_SendControl(uint8_t flags, const void* d, int len);
|
||||
int USB_RecvControl(void* d, int len);
|
||||
|
||||
uint8_t USB_Available(uint8_t ep);
|
||||
int USB_Send(uint8_t ep, const void* data, int len); // blocking
|
||||
int USB_Recv(uint8_t ep, void* data, int len); // non-blocking
|
||||
int USB_Recv(uint8_t ep); // non-blocking
|
||||
void USB_Flush(uint8_t ep);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* if defined(USBCON) */
|
||||
|
|
@ -5,10 +5,11 @@ See the readme for credit to other people.
|
|||
Advanced HID example
|
||||
*/
|
||||
|
||||
// The protocol ist still needed for Uno/Mega here
|
||||
#include <NicoHoodProtocol.h>
|
||||
// not needed for Leonardo/Micro
|
||||
#include <HID.h>
|
||||
|
||||
// for Leonardo/Micro: make sure to activate desired USB functions in HID_Reports.h
|
||||
|
||||
const int pinLed = 13;
|
||||
const int pinButton = 8;
|
||||
|
||||
|
|
@ -23,6 +24,7 @@ void setup() {
|
|||
// Make sure to end your special HIDs before, this does not clear them!
|
||||
// You need this baud for the HID library but still can use other bauds
|
||||
// without HID functions.
|
||||
// not needed for Leonado/Micro, Serial will not be set
|
||||
HID.begin();
|
||||
|
||||
// Sends a clean report to the host. This is important because
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ See the readme for credit to other people.
|
|||
Gamepad example
|
||||
*/
|
||||
|
||||
// The protocol ist still needed for Uno/Mega here
|
||||
#include <NicoHoodProtocol.h>
|
||||
// not needed for Leonardo/Micro
|
||||
#include <HID.h>
|
||||
|
||||
// for Leonardo/Micro: make sure to activate desired USB functions in HID_Reports.h
|
||||
|
||||
const int pinLed = 13;
|
||||
const int pinButton = 8;
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ void setup() {
|
|||
// Make sure to end your special HIDs before, this does not clear them!
|
||||
// You need this baud for the HID library but still can use other bauds
|
||||
// without HID functions.
|
||||
// not needed for Leonado/Micro, Serial will not be set
|
||||
HID.begin();
|
||||
|
||||
// Sends a clean report to the host. This is important because
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ See the readme for credit to other people.
|
|||
Joystick example
|
||||
*/
|
||||
|
||||
// The protocol ist still needed for Uno/Mega here
|
||||
#include <NicoHoodProtocol.h>
|
||||
// not needed for Leonardo/Micro
|
||||
#include <HID.h>
|
||||
|
||||
// for Leonardo/Micro: make sure to activate desired USB functions in HID_Reports.h
|
||||
|
||||
const int pinLed = 13;
|
||||
const int pinButton = 8;
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ void setup() {
|
|||
// Make sure to end your special HIDs before, this does not clear them!
|
||||
// You need this baud for the HID library but still can use other bauds
|
||||
// without HID functions.
|
||||
// not needed for Leonardo/Micro, Serial will not be set
|
||||
HID.begin();
|
||||
|
||||
// Sends a clean report to the host. This is important because
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
/*
|
||||
Copyright (c) 2014 NicoHood
|
||||
See the readme for credit to other people.
|
||||
See the readme for credit to other people.
|
||||
|
||||
Keyboard example
|
||||
*/
|
||||
|
||||
Keyboard example
|
||||
*/
|
||||
|
||||
// The protocol ist still needed for Uno/Mega here
|
||||
#include <NicoHoodProtocol.h>
|
||||
// not needed for Leonardo/Micro
|
||||
#include <HID.h>
|
||||
|
||||
// for Leonardo/Micro: make sure to activate desired USB functions in HID_Reports.h
|
||||
|
||||
const int pinLed = 13;
|
||||
const int pinButton = 8;
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ void setup() {
|
|||
// Make sure to end your special HIDs before, this does not clear them!
|
||||
// You need this baud for the HID library but still can use other bauds
|
||||
// without HID functions.
|
||||
// not needed for Leonardo/Micro, Serial will not be set
|
||||
HID.begin();
|
||||
|
||||
// Sends a clean report to the host. This is important because
|
||||
|
|
@ -34,6 +36,7 @@ void setup() {
|
|||
Keyboard.begin();
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// press a button to write some text to your pc
|
||||
if (!digitalRead(pinButton)) {
|
||||
|
|
@ -61,45 +64,45 @@ void loop() {
|
|||
|
||||
/*
|
||||
Definitions:
|
||||
|
||||
KEY_LEFT_CTRL
|
||||
KEY_LEFT_SHIFT
|
||||
KEY_LEFT_ALT
|
||||
KEY_LEFT_GUI
|
||||
KEY_RIGHT_CTRL
|
||||
KEY_RIGHT_SHIFT
|
||||
KEY_RIGHT_ALT
|
||||
KEY_RIGHT_GUI
|
||||
|
||||
KEY_UP_ARROW
|
||||
KEY_DOWN_ARROW
|
||||
KEY_LEFT_ARROW
|
||||
KEY_RIGHT_ARROW
|
||||
KEY_BACKSPACE
|
||||
KEY_TAB
|
||||
KEY_RETURN
|
||||
KEY_ESC
|
||||
KEY_INSERT
|
||||
KEY_DELETE
|
||||
KEY_PAGE_UP
|
||||
KEY_PAGE_DOWN
|
||||
KEY_HOME
|
||||
KEY_END
|
||||
KEY_CAPS_LOCK
|
||||
KEY_F1
|
||||
KEY_F2
|
||||
KEY_F3
|
||||
KEY_F4
|
||||
KEY_F5
|
||||
KEY_F6
|
||||
KEY_F7
|
||||
KEY_F8
|
||||
KEY_F9
|
||||
KEY_F10
|
||||
KEY_F11
|
||||
KEY_F12
|
||||
|
||||
KEY_PRINT
|
||||
KEY_SCROLL_LOCK
|
||||
KEY_PAUSE
|
||||
*/
|
||||
|
||||
KEY_LEFT_CTRL
|
||||
KEY_LEFT_SHIFT
|
||||
KEY_LEFT_ALT
|
||||
KEY_LEFT_GUI
|
||||
KEY_RIGHT_CTRL
|
||||
KEY_RIGHT_SHIFT
|
||||
KEY_RIGHT_ALT
|
||||
KEY_RIGHT_GUI
|
||||
|
||||
KEY_UP_ARROW
|
||||
KEY_DOWN_ARROW
|
||||
KEY_LEFT_ARROW
|
||||
KEY_RIGHT_ARROW
|
||||
KEY_BACKSPACE
|
||||
KEY_TAB
|
||||
KEY_RETURN
|
||||
KEY_ESC
|
||||
KEY_INSERT
|
||||
KEY_DELETE
|
||||
KEY_PAGE_UP
|
||||
KEY_PAGE_DOWN
|
||||
KEY_HOME
|
||||
KEY_END
|
||||
KEY_CAPS_LOCK
|
||||
KEY_F1
|
||||
KEY_F2
|
||||
KEY_F3
|
||||
KEY_F4
|
||||
KEY_F5
|
||||
KEY_F6
|
||||
KEY_F7
|
||||
KEY_F8
|
||||
KEY_F9
|
||||
KEY_F10
|
||||
KEY_F11
|
||||
KEY_F12
|
||||
|
||||
KEY_PRINT
|
||||
KEY_SCROLL_LOCK
|
||||
KEY_PAUSE
|
||||
*/
|
||||
|
|
@ -5,10 +5,11 @@ See the readme for credit to other people.
|
|||
Media example
|
||||
*/
|
||||
|
||||
// The protocol ist still needed for Uno/Mega here
|
||||
#include <NicoHoodProtocol.h>
|
||||
// not needed for Leonardo/Micro
|
||||
#include <HID.h>
|
||||
|
||||
// for Leonardo/Micro: make sure to activate desired USB functions in HID_Reports.h
|
||||
|
||||
const int pinLed = 13;
|
||||
const int pinButton = 8;
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ void setup() {
|
|||
// Make sure to end your special HIDs before, this does not clear them!
|
||||
// You need this baud for the HID library but still can use other bauds
|
||||
// without HID functions.
|
||||
// not needed for Leonardo/Micro, Serial will not be set
|
||||
HID.begin();
|
||||
|
||||
// Sends a clean report to the host. This is important because
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ Copyright (c) 2014 NicoHood
|
|||
Mouse example
|
||||
*/
|
||||
|
||||
// The protocol ist still needed for Uno/Mega here
|
||||
#include <NicoHoodProtocol.h>
|
||||
// not needed for Leonardo/Micro
|
||||
#include <HID.h>
|
||||
|
||||
// for Leonardo/Micro: make sure to activate desired USB functions in HID_Reports.h
|
||||
|
||||
const int pinLed = 13;
|
||||
const int pinButton = 8;
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ void setup() {
|
|||
// Make sure to end your special HIDs before, this does not clear them!
|
||||
// You need this baud for the HID library but still can use other bauds
|
||||
// without HID functions.
|
||||
// not needed for Leonardo/Micro, Serial will not be set
|
||||
HID.begin();
|
||||
|
||||
// Sends a clean report to the host. This is important because
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ See the readme for credit to other people.
|
|||
System example
|
||||
*/
|
||||
|
||||
// The protocol ist still needed for Uno/Mega here
|
||||
#include <NicoHoodProtocol.h>
|
||||
// not needed for Leonardo/Micro
|
||||
#include <HID.h>
|
||||
|
||||
// for Leonardo/Micro: make sure to activate desired USB functions in HID_Reports.h
|
||||
|
||||
const int pinLed = 13;
|
||||
const int pinButton = 8;
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ void setup() {
|
|||
// Make sure to end your special HIDs before, this does not clear them!
|
||||
// You need this baud for the HID library but still can use other bauds
|
||||
// without HID functions.
|
||||
// not needed for Leonardo/Micro, Serial will not be set
|
||||
HID.begin();
|
||||
|
||||
// Sends a clean report to the host. This is important because
|
||||
|
|
|
|||