aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/nuevo_diskloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloaders/nuevo_diskloader')
-rw-r--r--bootloaders/nuevo_diskloader/DiskLoader.elf.hex297
-rw-r--r--bootloaders/nuevo_diskloader/DiskLoader.hex297
-rw-r--r--bootloaders/nuevo_diskloader/Makefile208
-rw-r--r--bootloaders/nuevo_diskloader/src/DiskLoader.cpp52
4 files changed, 447 insertions, 407 deletions
diff --git a/bootloaders/nuevo_diskloader/DiskLoader.elf.hex b/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
index b73b4b2..5c8cfee 100644
--- a/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
+++ b/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
@@ -1,153 +1,156 @@
-:10700000ACC00000CFC00000CDC00000CBC000006D
-:10701000C9C00000C7C00000C5C00000C3C0000058
-:10702000C1C00000BFC00000EFC2000062C300008A
-:10703000B9C00000B7C00000B5C00000B3C0000078
-:10704000B1C00000AFC00000ADC00000ABC0000088
-:10705000A9C00000A7C00000A5C00000A3C0000098
-:10706000A1C000009FC000009DC000009BC00000A8
-:1070700099C0000097C0000095C0000093C00000B8
-:1070800091C000008FC000008DC000008BC00000C8
-:1070900089C0000087C0000085C0000083C00000D8
-:1070A00081C000007FC000007DC0000022C1080B2D
+:10700000B4C00000D7C00000D5C00000D3C000004D
+:10701000D1C00000CFC00000CDC00000CBC0000038
+:10702000C9C00000C7C0000005C3000078C300004D
+:10703000C1C00000BFC00000BDC00000BBC0000058
+:10704000B9C00000B7C00000B5C00000B3C0000068
+:10705000B1C00000AFC00000ADC00000ABC0000078
+:10706000A9C00000A7C00000A5C00000A3C0000088
+:10707000A1C000009FC000009DC000009BC0000098
+:1070800099C0000097C0000095C0000093C00000A8
+:1070900091C000008FC000008DC000008BC00000B8
+:1070A00089C0000087C0000085C000002AC1080B0D
:1070B00000020202010009040000010202000005B2
:1070C0002400100105240101010424020605240600
:1070D00000010705810310004009040100020A00B5
:1070E000000007050202400000070583024000007F
-:1070F0000403090422034100720064007500690062
-:107100006E006F0020004C0065006F006E00610093
-:10711000720064006F001803410072006400750083
-:1071200069006E006F0020004C004C00430012010B
-:107130000002000000404123340000010102000170
-:10714000120100020200004041233400000101024C
-:10715000000100C18081EC38693B11241FBECFEFD4
-:10716000DAE0DEBFCDBF11E0A0E0B1E0EEE4F9E788
-:1071700002C005900D92A831B107D9F711E0A8E13E
-:10718000B1E001C01D92A332B107E1F711E7CAE5F2
-:10719000D1E703C02297FE01D4D3C635D107D1F77A
-:1071A000A8D0D3C32DCFDC018091000190910101C3
-:1071B0008F5F9F4F61F4ED91FC9111970480F581F1
-:1071C000E02DCD01099590930101809300018091FC
-:1071D00000019091010108958EE091E090931901D2
-:1071E000809318010895DF93CF930F92CDB7DEB748
-:1071F000698380910901882351F083E0BE016F5FAC
-:107200007F4F41E050E016D11816190614F080E0C7
-:1072100090E00F90CF91DF91089583E0EBC1209132
-:107220000001309101018FEF2F3F380739F08FEFC8
-:107230009FEF909301018093000103C082E0D2D0C0
-:107240009C01C901089582E090D0282F809100010F
-:10725000909101018F5F9F4F09F02F5F822F90E087
-:107260000895FC0180818E5F808380E86EEA70E77C
-:1072700042E450E071C182E291E02AD2F8940C9489
-:10728000003C0895CF93DF93EC0189819881913A76
-:1072900049F4813251F580E062E071E047E050E06E
-:1072A0005BD121C0913209F5803231F482E091E066
-:1072B00067E070E08DD117C08232B9F48091090186
-:1072C000882371F08091020190910301A091040143
-:1072D000B0910501805B9440A040B04009F4CBDF41
-:1072E0008A818093090181E001C080E0DF91CF9124
-:1072F000089588E10FB6F8948093600010926000C2
-:107300000FBE3F9A209A6E9A90E890936100109277
-:10731000610081E885BF95BF01E005BF02E005BFC0
-:10732000769A289A479882E291E0BCD1789488E1D5
-:1073300091E089DF18161906D4F788E191E06FDF34
-:10734000803311F44798F3CF813389F7479AEFCF11
-:10735000FC0104C08091F100819361506623D1F754
-:10736000289884E680931B0108959FB7F89487704E
-:107370008093E9008091F2009FBF0895282F8091AB
-:107380001C018823C1F057FF1AC015C0289890939C
-:107390001B018091F1008193E217F307B9F74115C2
-:1073A000510539F08091F200882319F48BE680931F
-:1073B000E800AFBF02C04FEF5FEFCA010895AFB75B
-:1073C000F89427702093E9008091F200282F30E094
-:1073D000241735070CF4A901FB019B01240F311D73
-:1073E00094E6DACFDF93CF930F92CDB7DEB7BE012D
-:1073F0006F5F7F4F41E050E0C1DF019719F08FEFE1
-:107400009FEF02C0898190E00F90CF91DF910895A6
-:107410002FB7F89487708093E9008091E80085FD8C
-:1074200002C090E004C08091F20090E4981B2FBF4E
-:10743000892F08954F925F926F927F928F929F92C1
-:10744000AF92BF92CF92DF92EF92FF920F931F9372
-:10745000CF93DF93F82E6A0180911C01882309F1F4
-:107460008B01EA016AEFE62E57E0552E5F208F2D43
-:1074700090E040E2842E912C882299223AE3432E18
-:1074800020E4A22EB12CA822B92280EA682E8FE037
-:10749000782E48C08F2DBCDF282F882349F4EA942A
-:1074A00019F44FEF5FEF46C0C3010197F1F73AC0FF
-:1074B00090E0C817D9070CF42C2FC21BD1094FB785
-:1074C000F8945092E9008114910421F406C01092BE
-:1074D000F10021502223D9F719C0F7FC03C0F801AD
-:1074E000922F10C0C801322F06C0FC010196E49112
-:1074F000E093F10031503323C1F706C081918093AE
-:10750000F10091509923D1F7020F111D8091E800ED
-:1075100085FF05C0209729F4A114B10411F0409211
-:10752000E8004FBF209709F0B5CF769884E68093A6
-:107530001A01A601CA01DF91CF911F910F91FF900F
-:10754000EF90DF90CF90BF90AF909F908F907F9003
-:107550006F905F904F9008950F931F93182FFB012A
-:10756000A0911F01B0912001BA010EEF2AC017FFB0
-:1075700002C0949101C0908120911D0130911E01A3
-:107580002A173B07ACF48091E8008570E1F3809105
-:10759000E80082FF03C04FEF5FEF16C09093F10049
-:1075A000C90101968F739070892B11F40093E80044
-:1075B0002F5F3F4F30931E0120931D01615070409B
-:1075C00031966115710599F6CA011F910F910895C1
-:1075D000CF93DF939C01EB018091E80082FFFCCF09
-:1075E000C9016C2FB5DE8BEF8093E800CE01DF91EF
-:1075F000CF9108958093E9008091F200882319F0DB
-:107600008AE38093E80008951F920F920FB60F92BD
-:1076100011242F933F938F938091E1001092E1000A
-:10762000282F83FF0FC01092E90081E08093EB00C8
-:107630001092EC0082E38093ED0010921C0188E030
-:107640008093F00022FF26C083E08093E9008091C0
-:10765000F200882319F08AE38093E80080911A01F0
-:10766000882351F080911A01815080931A018091F2
-:107670001A01882309F4769A80911B01882351F01E
-:1076800080911B01815080931B0180911B018823F5
-:1076900009F4289A8F913F912F910F900FBE0F9070
-:1076A0001F90189510921C0181E08093D70080EA0A
-:1076B0008093D80082E189BD09B400FEFDCF80E946
-:1076C0008093D8008CE08093E2001092E00008954F
-:1076D00008950895DF93CF930F92CDB7DEB7198247
-:1076E000CE010196BEDD898190E00F90CF91DF91B0
-:1076F00008951F920F920FB60F921124EF92FF92EE
-:107700001F932F933F934F935F936F937F938F9329
-:107710009F93AF93BF93EF93FF93DF93CF93CDB737
-:10772000DEB76197DEBFCDBF1092E9008091E8001F
-:1077300083FFECC0CE01019668E00ADE82EF809301
-:10774000E800998197FF05C08091E80080FFFCCF99
-:1077500003C08EEF8093E800292F30E0C9018076C6
-:107760009070892B09F0B3C08A81882329F4109284
-:10777000F1001092F100BFC0813009F4BCC0833029
-:1077800009F4B9C0853049F48091E80080FFFCCF4E
-:107790008B8180688093E300AEC0863009F06DC0B5
-:1077A0001C81EF80F8841230A9F51092E900109244
-:1077B0001E0110921D011092200110921F018ADFFC
-:1077C00099E0FE013996DF01292F1D922A95E9F7EC
-:1077D00099871A8791E09E8790E8988B9AEF998B0A
-:1077E00020911D0130911E01275F3F4F3C872B8761
-:1077F0008D871092E90010921E0110921D01F092E7
-:107800002001E0921F0180E0BF0149E050E0A4DECA
-:1078100061DF71C01092E90010921E0110921D01EB
-:10782000F0922001E0921F01113071F488E0E81617
-:10783000F10411F41093210180912101882309F0B2
-:1078400062C0EEE2F1E713C0133009F058C08B813B
-:10785000882319F4E0EFF0E70AC0823019F4E4EF6E
-:10786000F0E705C0813009F04AC0E6E1F1E7449154
-:1078700050E080E8BF0170DE3EC0873009F43FC0B1
-:10788000883021F481E08093F10035C0893099F58A
-:1078900023703070232B99F5E3E5F1E791E031E0B7
-:1078A00026E39093E9003093EB0084918093EC0001
-:1078B0002093ED009F5F3196943099F78EE7809387
-:1078C000EA001092EA008B8180931C0114C08F8122
-:1078D00098851092E90010921E0110921D0190935C
-:1078E000200180931F018D81882349F4CE010196E8
-:1078F000C9DC882321F08EEF8093E80007C081E285
-:107900008093EB0003C0E0E4F1E7B1CF6196DEBF06
-:10791000CDBFCF91DF91FF91EF91BF91AF919F913B
-:107920008F917F916F915F914F913F912F911F9117
-:10793000FF90EF900F900FBE0F901F901895EE0FD5
-:0E794000FF1F0590F491E02D0994F894FFCFFD
-:10794E00FFFF00E1000000000000000000002339EE
-:08795E00D3380F390D39F3385D
+:1070F000410142144505560455026403740300001F
+:107100000403090422030000000000000000000046
+:10711000000000000000000000000000000000006F
+:1071200000000000000018034100720064007500B8
+:1071300069006E006F0020004C004C0043001201FB
+:10714000000200000040412388000001010200010C
+:1071500012010002020000404123880000010102E8
+:10716000000100C18081F4387F3B11241FBECFEFA6
+:10717000DAE0DEBFCDBF11E0A0E0B1E0EAE7F9E779
+:1071800002C005900D92A831B107D9F711E0A8E12E
+:10719000B1E001C01D92A53AB107E1F711E7CAE6D7
+:1071A000D1E703C02297FE01E2D3C636D107D1F75B
+:1071B000A8D0E1C325CFDC018091000190910101AD
+:1071C0008F5F9F4F61F4ED91FC9111970480F581E1
+:1071D000E02DCD01099590930101809300018091EC
+:1071E00000019091010108958EE091E090931901C2
+:1071F000809318010895DF93CF930F92CDB7DEB738
+:10720000698380910901882351F083E0BE016F5F9B
+:107210007F4F41E050E024D11816190614F080E0A9
+:1072200090E00F90CF91DF91089583E0F9C1209114
+:107230000001309101018FEF2F3F380739F08FEFB8
+:107240009FEF909301018093000103C082E0E0D0A2
+:107250009C01C901089582E09ED0282F80910001F1
+:10726000909101018F5F9F4F09F02F5F822F90E077
+:107270000895FC0180818E5F808380E86EEA70E76C
+:1072800042E450E07FC184EA91E038D2F8940C9453
+:10729000003C0895CF93DF93EC0189819881913A66
+:1072A00049F4813251F580E062E071E047E050E05E
+:1072B00069D121C0913209F5803231F482E091E048
+:1072C00067E070E09BD117C08232B9F48091090168
+:1072D000882371F08091020190910301A091040133
+:1072E000B0910501805B9440A040B04009F4CBDF31
+:1072F0008A818093090181E001C080E0DF91CF9114
+:10730000089588E10FB6F8948093600010926000B1
+:107310000FBE3F9A209A6E9A90E890936100109267
+:10732000610081E885BF95BF01E005BF02E005BFB0
+:10733000769A289A479884EA91E0CAD1789488E1AD
+:1073400091E089DF18161906D4F788E191E06FDF24
+:1073500020EF30E7F901949131962E5F3F4F449131
+:10736000981711F09923B1F710929B0110929A018E
+:1073700050E082E06AE171E017D0E1CFFC0104C087
+:107380008091F100819361506623D1F7289884E6BB
+:1073900080939D0108959FB7F89487708093E900CA
+:1073A0008091F2009FBF0895282F80919E0188232D
+:1073B000C1F057FF1AC015C0289890939D01809185
+:1073C000F1008193E217F307B9F74115510539F040
+:1073D0008091F200882319F48BE68093E800AFBF18
+:1073E00002C04FEF5FEFCA010895AFB7F89427705E
+:1073F0002093E9008091F200282F30E02417350710
+:107400000CF4A901FB019B01240F311D94E6DACF96
+:10741000DF93CF930F92CDB7DEB7BE016F5F7F4F83
+:1074200041E050E0C1DF019719F08FEF9FEF02C0FC
+:10743000898190E00F90CF91DF9108952FB7F89454
+:1074400087708093E9008091E80085FD02C090E09C
+:1074500004C08091F20090E4981B2FBF892F0895FB
+:107460004F925F926F927F928F929F92AF92BF9254
+:10747000CF92DF92EF92FF920F931F93CF93DF9300
+:10748000F82E6A0180919E01882309F18B01EA019F
+:107490006AEFE62E57E0552E5F208F2D90E040E2F8
+:1074A000842E912C882299223AE3432E20E4A22EA6
+:1074B000B12CA822B92280EA682E8FE0782E48C02D
+:1074C0008F2DBCDF282F882349F4EA9419F44FEF5D
+:1074D0005FEF46C0C3010197F1F73AC090E0C817CB
+:1074E000D9070CF42C2FC21BD1094FB7F894509236
+:1074F000E9008114910421F406C01092F10021509A
+:107500002223D9F719C0F7FC03C0F801922F10C04D
+:10751000C801322F06C0FC010196E491E093F1000E
+:1075200031503323C1F706C081918093F10091500F
+:107530009923D1F7020F111D8091E80085FF05C046
+:10754000209729F4A114B10411F04092E8004FBF34
+:10755000209709F0B5CF769884E680939C01A60128
+:10756000CA01DF91CF911F910F91FF90EF90DF90B3
+:10757000CF90BF90AF909F908F907F906F905F90D3
+:107580004F9008950F931F93182FFB01A091A10115
+:10759000B091A201BA010EEF2AC017FF02C0949168
+:1075A00001C0908120919F013091A0012A173B07D3
+:1075B000ACF48091E8008570E1F38091E80082FFEF
+:1075C00003C04FEF5FEF16C09093F100C901019621
+:1075D0008F739070892B11F40093E8002F5F3F4F59
+:1075E0003093A00120939F01615070403196611546
+:1075F000710599F6CA011F910F910895CF93DF93FA
+:107600009C01EB018091E80082FFFCCFC9016C2F47
+:10761000B5DE8BEF8093E800CE01DF91CF91089526
+:107620008093E9008091F200882319F08AE3809327
+:10763000E80008951F920F920FB60F9211242F9316
+:107640003F938F938091E1001092E100282F83FFF8
+:107650000FC01092E90081E08093EB001092EC00E3
+:1076600082E38093ED0010929E0188E08093F00009
+:1076700022FF26C083E08093E9008091F2008823F6
+:1076800019F08AE38093E80080919C01882351F0EF
+:1076900080919C01815080939C0180919C01882362
+:1076A00009F4769A80919D01882351F080919D0183
+:1076B000815080939D0180919D01882309F4289A2F
+:1076C0008F913F912F910F900FBE0F901F901895A3
+:1076D00010929E0181E08093D70080EA8093D800C9
+:1076E00082E189BD09B400FEFDCF80E98093D80016
+:1076F0008CE08093E2001092E000089508950895D0
+:10770000DF93CF930F92CDB7DEB71982CE010196EA
+:10771000B0DD898190E00F90CF91DF9108951F92A5
+:107720000F920FB60F921124EF92FF921F932F9397
+:107730003F934F935F936F937F938F939F93AF93F9
+:10774000BF93EF93FF93DF93CF93CDB7DEB76197EE
+:10775000DEBFCDBF1092E9008091E80083FFECC04E
+:10776000CE01019668E00ADE82EF8093E8009981FD
+:1077700097FF05C08091E80080FFFCCF03C08EEF2B
+:107780008093E800292F30E0C90180769070892B22
+:1077900009F0B3C08A81882329F41092F100109275
+:1077A000F100BFC0813009F4BCC0833009F4B9C016
+:1077B000853049F48091E80080FFFCCF8B818068A0
+:1077C0008093E300AEC0863009F06DC01C81EF806D
+:1077D000F8841230A9F51092E9001092A0011092DD
+:1077E0009F011092A2011092A1018ADF99E0FE018F
+:1077F0003996DF01292F1D922A95E9F799871A8773
+:1078000091E09E8790E8988B9AEF998B20919F0149
+:107810003091A001275F3F4F3C872B878D871092C7
+:10782000E9001092A00110929F01F092A201E09253
+:10783000A10180E0BF0149E050E0A4DE61DF71C03A
+:107840001092E9001092A00110929F01F092A20103
+:10785000E092A101113071F488E0E816F10411F40E
+:107860001093A3018091A301882309F062C0EEE385
+:10787000F1E713C0133009F058C08B81882319F445
+:10788000E0E0F1E70AC0823019F4E4E0F1E705C076
+:10789000813009F04AC0E6E2F1E7449150E080E827
+:1078A000BF0170DE3EC0873009F43FC0883021F44C
+:1078B00081E08093F10035C0893099F523703070F4
+:1078C000232B99F5E3E6F1E791E031E026E390938D
+:1078D000E9003093EB0084918093EC002093ED005D
+:1078E0009F5F3196943099F78EE78093EA0010926B
+:1078F000EA008B8180939E0114C08F81988510923D
+:10790000E9001092A00110929F019093A201809330
+:10791000A1018D81882349F4CE010196BBDC882327
+:1079200021F08EEF8093E80007C081E28093EB00A6
+:1079300003C0E0E5F1E7B1CF6196DEBFCDBFCF91E7
+:10794000DF91FF91EF91BF91AF919F918F917F91C7
+:107950006F915F914F913F912F911F91FF90EF9009
+:107960000F900FBE0F901F901895EE0FFF1F059000
+:0A797000F491E02D0994F894FFCF84
+:10797A00FFFF00E1000000000000000000002B39BA
+:08798A00DB3817391539FB3811
:040000030000700089
:00000001FF
diff --git a/bootloaders/nuevo_diskloader/DiskLoader.hex b/bootloaders/nuevo_diskloader/DiskLoader.hex
index b73b4b2..5c8cfee 100644
--- a/bootloaders/nuevo_diskloader/DiskLoader.hex
+++ b/bootloaders/nuevo_diskloader/DiskLoader.hex
@@ -1,153 +1,156 @@
-:10700000ACC00000CFC00000CDC00000CBC000006D
-:10701000C9C00000C7C00000C5C00000C3C0000058
-:10702000C1C00000BFC00000EFC2000062C300008A
-:10703000B9C00000B7C00000B5C00000B3C0000078
-:10704000B1C00000AFC00000ADC00000ABC0000088
-:10705000A9C00000A7C00000A5C00000A3C0000098
-:10706000A1C000009FC000009DC000009BC00000A8
-:1070700099C0000097C0000095C0000093C00000B8
-:1070800091C000008FC000008DC000008BC00000C8
-:1070900089C0000087C0000085C0000083C00000D8
-:1070A00081C000007FC000007DC0000022C1080B2D
+:10700000B4C00000D7C00000D5C00000D3C000004D
+:10701000D1C00000CFC00000CDC00000CBC0000038
+:10702000C9C00000C7C0000005C3000078C300004D
+:10703000C1C00000BFC00000BDC00000BBC0000058
+:10704000B9C00000B7C00000B5C00000B3C0000068
+:10705000B1C00000AFC00000ADC00000ABC0000078
+:10706000A9C00000A7C00000A5C00000A3C0000088
+:10707000A1C000009FC000009DC000009BC0000098
+:1070800099C0000097C0000095C0000093C00000A8
+:1070900091C000008FC000008DC000008BC00000B8
+:1070A00089C0000087C0000085C000002AC1080B0D
:1070B00000020202010009040000010202000005B2
:1070C0002400100105240101010424020605240600
:1070D00000010705810310004009040100020A00B5
:1070E000000007050202400000070583024000007F
-:1070F0000403090422034100720064007500690062
-:107100006E006F0020004C0065006F006E00610093
-:10711000720064006F001803410072006400750083
-:1071200069006E006F0020004C004C00430012010B
-:107130000002000000404123340000010102000170
-:10714000120100020200004041233400000101024C
-:10715000000100C18081EC38693B11241FBECFEFD4
-:10716000DAE0DEBFCDBF11E0A0E0B1E0EEE4F9E788
-:1071700002C005900D92A831B107D9F711E0A8E13E
-:10718000B1E001C01D92A332B107E1F711E7CAE5F2
-:10719000D1E703C02297FE01D4D3C635D107D1F77A
-:1071A000A8D0D3C32DCFDC018091000190910101C3
-:1071B0008F5F9F4F61F4ED91FC9111970480F581F1
-:1071C000E02DCD01099590930101809300018091FC
-:1071D00000019091010108958EE091E090931901D2
-:1071E000809318010895DF93CF930F92CDB7DEB748
-:1071F000698380910901882351F083E0BE016F5FAC
-:107200007F4F41E050E016D11816190614F080E0C7
-:1072100090E00F90CF91DF91089583E0EBC1209132
-:107220000001309101018FEF2F3F380739F08FEFC8
-:107230009FEF909301018093000103C082E0D2D0C0
-:107240009C01C901089582E090D0282F809100010F
-:10725000909101018F5F9F4F09F02F5F822F90E087
-:107260000895FC0180818E5F808380E86EEA70E77C
-:1072700042E450E071C182E291E02AD2F8940C9489
-:10728000003C0895CF93DF93EC0189819881913A76
-:1072900049F4813251F580E062E071E047E050E06E
-:1072A0005BD121C0913209F5803231F482E091E066
-:1072B00067E070E08DD117C08232B9F48091090186
-:1072C000882371F08091020190910301A091040143
-:1072D000B0910501805B9440A040B04009F4CBDF41
-:1072E0008A818093090181E001C080E0DF91CF9124
-:1072F000089588E10FB6F8948093600010926000C2
-:107300000FBE3F9A209A6E9A90E890936100109277
-:10731000610081E885BF95BF01E005BF02E005BFC0
-:10732000769A289A479882E291E0BCD1789488E1D5
-:1073300091E089DF18161906D4F788E191E06FDF34
-:10734000803311F44798F3CF813389F7479AEFCF11
-:10735000FC0104C08091F100819361506623D1F754
-:10736000289884E680931B0108959FB7F89487704E
-:107370008093E9008091F2009FBF0895282F8091AB
-:107380001C018823C1F057FF1AC015C0289890939C
-:107390001B018091F1008193E217F307B9F74115C2
-:1073A000510539F08091F200882319F48BE680931F
-:1073B000E800AFBF02C04FEF5FEFCA010895AFB75B
-:1073C000F89427702093E9008091F200282F30E094
-:1073D000241735070CF4A901FB019B01240F311D73
-:1073E00094E6DACFDF93CF930F92CDB7DEB7BE012D
-:1073F0006F5F7F4F41E050E0C1DF019719F08FEFE1
-:107400009FEF02C0898190E00F90CF91DF910895A6
-:107410002FB7F89487708093E9008091E80085FD8C
-:1074200002C090E004C08091F20090E4981B2FBF4E
-:10743000892F08954F925F926F927F928F929F92C1
-:10744000AF92BF92CF92DF92EF92FF920F931F9372
-:10745000CF93DF93F82E6A0180911C01882309F1F4
-:107460008B01EA016AEFE62E57E0552E5F208F2D43
-:1074700090E040E2842E912C882299223AE3432E18
-:1074800020E4A22EB12CA822B92280EA682E8FE037
-:10749000782E48C08F2DBCDF282F882349F4EA942A
-:1074A00019F44FEF5FEF46C0C3010197F1F73AC0FF
-:1074B00090E0C817D9070CF42C2FC21BD1094FB785
-:1074C000F8945092E9008114910421F406C01092BE
-:1074D000F10021502223D9F719C0F7FC03C0F801AD
-:1074E000922F10C0C801322F06C0FC010196E49112
-:1074F000E093F10031503323C1F706C081918093AE
-:10750000F10091509923D1F7020F111D8091E800ED
-:1075100085FF05C0209729F4A114B10411F0409211
-:10752000E8004FBF209709F0B5CF769884E68093A6
-:107530001A01A601CA01DF91CF911F910F91FF900F
-:10754000EF90DF90CF90BF90AF909F908F907F9003
-:107550006F905F904F9008950F931F93182FFB012A
-:10756000A0911F01B0912001BA010EEF2AC017FFB0
-:1075700002C0949101C0908120911D0130911E01A3
-:107580002A173B07ACF48091E8008570E1F3809105
-:10759000E80082FF03C04FEF5FEF16C09093F10049
-:1075A000C90101968F739070892B11F40093E80044
-:1075B0002F5F3F4F30931E0120931D01615070409B
-:1075C00031966115710599F6CA011F910F910895C1
-:1075D000CF93DF939C01EB018091E80082FFFCCF09
-:1075E000C9016C2FB5DE8BEF8093E800CE01DF91EF
-:1075F000CF9108958093E9008091F200882319F0DB
-:107600008AE38093E80008951F920F920FB60F92BD
-:1076100011242F933F938F938091E1001092E1000A
-:10762000282F83FF0FC01092E90081E08093EB00C8
-:107630001092EC0082E38093ED0010921C0188E030
-:107640008093F00022FF26C083E08093E9008091C0
-:10765000F200882319F08AE38093E80080911A01F0
-:10766000882351F080911A01815080931A018091F2
-:107670001A01882309F4769A80911B01882351F01E
-:1076800080911B01815080931B0180911B018823F5
-:1076900009F4289A8F913F912F910F900FBE0F9070
-:1076A0001F90189510921C0181E08093D70080EA0A
-:1076B0008093D80082E189BD09B400FEFDCF80E946
-:1076C0008093D8008CE08093E2001092E00008954F
-:1076D00008950895DF93CF930F92CDB7DEB7198247
-:1076E000CE010196BEDD898190E00F90CF91DF91B0
-:1076F00008951F920F920FB60F921124EF92FF92EE
-:107700001F932F933F934F935F936F937F938F9329
-:107710009F93AF93BF93EF93FF93DF93CF93CDB737
-:10772000DEB76197DEBFCDBF1092E9008091E8001F
-:1077300083FFECC0CE01019668E00ADE82EF809301
-:10774000E800998197FF05C08091E80080FFFCCF99
-:1077500003C08EEF8093E800292F30E0C9018076C6
-:107760009070892B09F0B3C08A81882329F4109284
-:10777000F1001092F100BFC0813009F4BCC0833029
-:1077800009F4B9C0853049F48091E80080FFFCCF4E
-:107790008B8180688093E300AEC0863009F06DC0B5
-:1077A0001C81EF80F8841230A9F51092E900109244
-:1077B0001E0110921D011092200110921F018ADFFC
-:1077C00099E0FE013996DF01292F1D922A95E9F7EC
-:1077D00099871A8791E09E8790E8988B9AEF998B0A
-:1077E00020911D0130911E01275F3F4F3C872B8761
-:1077F0008D871092E90010921E0110921D01F092E7
-:107800002001E0921F0180E0BF0149E050E0A4DECA
-:1078100061DF71C01092E90010921E0110921D01EB
-:10782000F0922001E0921F01113071F488E0E81617
-:10783000F10411F41093210180912101882309F0B2
-:1078400062C0EEE2F1E713C0133009F058C08B813B
-:10785000882319F4E0EFF0E70AC0823019F4E4EF6E
-:10786000F0E705C0813009F04AC0E6E1F1E7449154
-:1078700050E080E8BF0170DE3EC0873009F43FC0B1
-:10788000883021F481E08093F10035C0893099F58A
-:1078900023703070232B99F5E3E5F1E791E031E0B7
-:1078A00026E39093E9003093EB0084918093EC0001
-:1078B0002093ED009F5F3196943099F78EE7809387
-:1078C000EA001092EA008B8180931C0114C08F8122
-:1078D00098851092E90010921E0110921D0190935C
-:1078E000200180931F018D81882349F4CE010196E8
-:1078F000C9DC882321F08EEF8093E80007C081E285
-:107900008093EB0003C0E0E4F1E7B1CF6196DEBF06
-:10791000CDBFCF91DF91FF91EF91BF91AF919F913B
-:107920008F917F916F915F914F913F912F911F9117
-:10793000FF90EF900F900FBE0F901F901895EE0FD5
-:0E794000FF1F0590F491E02D0994F894FFCFFD
-:10794E00FFFF00E1000000000000000000002339EE
-:08795E00D3380F390D39F3385D
+:1070F000410142144505560455026403740300001F
+:107100000403090422030000000000000000000046
+:10711000000000000000000000000000000000006F
+:1071200000000000000018034100720064007500B8
+:1071300069006E006F0020004C004C0043001201FB
+:10714000000200000040412388000001010200010C
+:1071500012010002020000404123880000010102E8
+:10716000000100C18081F4387F3B11241FBECFEFA6
+:10717000DAE0DEBFCDBF11E0A0E0B1E0EAE7F9E779
+:1071800002C005900D92A831B107D9F711E0A8E12E
+:10719000B1E001C01D92A53AB107E1F711E7CAE6D7
+:1071A000D1E703C02297FE01E2D3C636D107D1F75B
+:1071B000A8D0E1C325CFDC018091000190910101AD
+:1071C0008F5F9F4F61F4ED91FC9111970480F581E1
+:1071D000E02DCD01099590930101809300018091EC
+:1071E00000019091010108958EE091E090931901C2
+:1071F000809318010895DF93CF930F92CDB7DEB738
+:10720000698380910901882351F083E0BE016F5F9B
+:107210007F4F41E050E024D11816190614F080E0A9
+:1072200090E00F90CF91DF91089583E0F9C1209114
+:107230000001309101018FEF2F3F380739F08FEFB8
+:107240009FEF909301018093000103C082E0E0D0A2
+:107250009C01C901089582E09ED0282F80910001F1
+:10726000909101018F5F9F4F09F02F5F822F90E077
+:107270000895FC0180818E5F808380E86EEA70E76C
+:1072800042E450E07FC184EA91E038D2F8940C9453
+:10729000003C0895CF93DF93EC0189819881913A66
+:1072A00049F4813251F580E062E071E047E050E05E
+:1072B00069D121C0913209F5803231F482E091E048
+:1072C00067E070E09BD117C08232B9F48091090168
+:1072D000882371F08091020190910301A091040133
+:1072E000B0910501805B9440A040B04009F4CBDF31
+:1072F0008A818093090181E001C080E0DF91CF9114
+:10730000089588E10FB6F8948093600010926000B1
+:107310000FBE3F9A209A6E9A90E890936100109267
+:10732000610081E885BF95BF01E005BF02E005BFB0
+:10733000769A289A479884EA91E0CAD1789488E1AD
+:1073400091E089DF18161906D4F788E191E06FDF24
+:1073500020EF30E7F901949131962E5F3F4F449131
+:10736000981711F09923B1F710929B0110929A018E
+:1073700050E082E06AE171E017D0E1CFFC0104C087
+:107380008091F100819361506623D1F7289884E6BB
+:1073900080939D0108959FB7F89487708093E900CA
+:1073A0008091F2009FBF0895282F80919E0188232D
+:1073B000C1F057FF1AC015C0289890939D01809185
+:1073C000F1008193E217F307B9F74115510539F040
+:1073D0008091F200882319F48BE68093E800AFBF18
+:1073E00002C04FEF5FEFCA010895AFB7F89427705E
+:1073F0002093E9008091F200282F30E02417350710
+:107400000CF4A901FB019B01240F311D94E6DACF96
+:10741000DF93CF930F92CDB7DEB7BE016F5F7F4F83
+:1074200041E050E0C1DF019719F08FEF9FEF02C0FC
+:10743000898190E00F90CF91DF9108952FB7F89454
+:1074400087708093E9008091E80085FD02C090E09C
+:1074500004C08091F20090E4981B2FBF892F0895FB
+:107460004F925F926F927F928F929F92AF92BF9254
+:10747000CF92DF92EF92FF920F931F93CF93DF9300
+:10748000F82E6A0180919E01882309F18B01EA019F
+:107490006AEFE62E57E0552E5F208F2D90E040E2F8
+:1074A000842E912C882299223AE3432E20E4A22EA6
+:1074B000B12CA822B92280EA682E8FE0782E48C02D
+:1074C0008F2DBCDF282F882349F4EA9419F44FEF5D
+:1074D0005FEF46C0C3010197F1F73AC090E0C817CB
+:1074E000D9070CF42C2FC21BD1094FB7F894509236
+:1074F000E9008114910421F406C01092F10021509A
+:107500002223D9F719C0F7FC03C0F801922F10C04D
+:10751000C801322F06C0FC010196E491E093F1000E
+:1075200031503323C1F706C081918093F10091500F
+:107530009923D1F7020F111D8091E80085FF05C046
+:10754000209729F4A114B10411F04092E8004FBF34
+:10755000209709F0B5CF769884E680939C01A60128
+:10756000CA01DF91CF911F910F91FF90EF90DF90B3
+:10757000CF90BF90AF909F908F907F906F905F90D3
+:107580004F9008950F931F93182FFB01A091A10115
+:10759000B091A201BA010EEF2AC017FF02C0949168
+:1075A00001C0908120919F013091A0012A173B07D3
+:1075B000ACF48091E8008570E1F38091E80082FFEF
+:1075C00003C04FEF5FEF16C09093F100C901019621
+:1075D0008F739070892B11F40093E8002F5F3F4F59
+:1075E0003093A00120939F01615070403196611546
+:1075F000710599F6CA011F910F910895CF93DF93FA
+:107600009C01EB018091E80082FFFCCFC9016C2F47
+:10761000B5DE8BEF8093E800CE01DF91CF91089526
+:107620008093E9008091F200882319F08AE3809327
+:10763000E80008951F920F920FB60F9211242F9316
+:107640003F938F938091E1001092E100282F83FFF8
+:107650000FC01092E90081E08093EB001092EC00E3
+:1076600082E38093ED0010929E0188E08093F00009
+:1076700022FF26C083E08093E9008091F2008823F6
+:1076800019F08AE38093E80080919C01882351F0EF
+:1076900080919C01815080939C0180919C01882362
+:1076A00009F4769A80919D01882351F080919D0183
+:1076B000815080939D0180919D01882309F4289A2F
+:1076C0008F913F912F910F900FBE0F901F901895A3
+:1076D00010929E0181E08093D70080EA8093D800C9
+:1076E00082E189BD09B400FEFDCF80E98093D80016
+:1076F0008CE08093E2001092E000089508950895D0
+:10770000DF93CF930F92CDB7DEB71982CE010196EA
+:10771000B0DD898190E00F90CF91DF9108951F92A5
+:107720000F920FB60F921124EF92FF921F932F9397
+:107730003F934F935F936F937F938F939F93AF93F9
+:10774000BF93EF93FF93DF93CF93CDB7DEB76197EE
+:10775000DEBFCDBF1092E9008091E80083FFECC04E
+:10776000CE01019668E00ADE82EF8093E8009981FD
+:1077700097FF05C08091E80080FFFCCF03C08EEF2B
+:107780008093E800292F30E0C90180769070892B22
+:1077900009F0B3C08A81882329F41092F100109275
+:1077A000F100BFC0813009F4BCC0833009F4B9C016
+:1077B000853049F48091E80080FFFCCF8B818068A0
+:1077C0008093E300AEC0863009F06DC01C81EF806D
+:1077D000F8841230A9F51092E9001092A0011092DD
+:1077E0009F011092A2011092A1018ADF99E0FE018F
+:1077F0003996DF01292F1D922A95E9F799871A8773
+:1078000091E09E8790E8988B9AEF998B20919F0149
+:107810003091A001275F3F4F3C872B878D871092C7
+:10782000E9001092A00110929F01F092A201E09253
+:10783000A10180E0BF0149E050E0A4DE61DF71C03A
+:107840001092E9001092A00110929F01F092A20103
+:10785000E092A101113071F488E0E816F10411F40E
+:107860001093A3018091A301882309F062C0EEE385
+:10787000F1E713C0133009F058C08B81882319F445
+:10788000E0E0F1E70AC0823019F4E4E0F1E705C076
+:10789000813009F04AC0E6E2F1E7449150E080E827
+:1078A000BF0170DE3EC0873009F43FC0883021F44C
+:1078B00081E08093F10035C0893099F523703070F4
+:1078C000232B99F5E3E6F1E791E031E026E390938D
+:1078D000E9003093EB0084918093EC002093ED005D
+:1078E0009F5F3196943099F78EE78093EA0010926B
+:1078F000EA008B8180939E0114C08F81988510923D
+:10790000E9001092A00110929F019093A201809330
+:10791000A1018D81882349F4CE010196BBDC882327
+:1079200021F08EEF8093E80007C081E28093EB00A6
+:1079300003C0E0E5F1E7B1CF6196DEBFCDBFCF91E7
+:10794000DF91FF91EF91BF91AF919F918F917F91C7
+:107950006F915F914F913F912F911F91FF90EF9009
+:107960000F900FBE0F901F901895EE0FFF1F059000
+:0A797000F491E02D0994F894FFCF84
+:10797A00FFFF00E1000000000000000000002B39BA
+:08798A00DB3817391539FB3811
:040000030000700089
:00000001FF
diff --git a/bootloaders/nuevo_diskloader/Makefile b/bootloaders/nuevo_diskloader/Makefile
index 90a519d..965ca6b 100644
--- a/bootloaders/nuevo_diskloader/Makefile
+++ b/bootloaders/nuevo_diskloader/Makefile
@@ -1,108 +1,108 @@
-###############################################################################
-# Makefile for DiskLoader
-###############################################################################
-
-## General Flags
-PROJECT = DiskLoader
-TARGET = DiskLoader.elf
-CC = avr-gcc
-
-# BOARD2
-MCU = atmega32u4
-AVR_FREQ = 16000000L
-
+###############################################################################
+# Makefile for DiskLoader
+###############################################################################
+
+## General Flags
+PROJECT = DiskLoader
+TARGET = DiskLoader.elf
+CC = avr-gcc
+
+# BOARD2
+MCU = atmega32u4
+AVR_FREQ = 16000000L
+
# Specify the Arduino model using the assigned PID. This is used by Descriptors.c
# to set PID and product descriptor string
# Arduino Leonardo PID
-ARDUINO_MODEL_PID = 0x0034
+ARDUINO_MODEL_PID = 0x0088
# Arduino Micro PID
-#ARDUINO_MODEL_PID = 0x0035
-
-# Change if your programmer is different
-AVRDUDE_PROGRAMMER = avrispmkII
-AVRDUDE_PORT = usb
-
-# program name should not be changed...
-PROGRAM = DiskLoader
-
-AVRDUDE = avrdude
-AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -p $(MCU)
-
-## Options common to compile, link and assembly rules
-COMMON = -mmcu=$(MCU)
-
-override CFLAGS = -g -Wall -Os -mmcu=$(MCU) -DF_CPU=$(AVR_FREQ) -DARDUINO_MODEL_PID=$(ARDUINO_MODEL_PID) $(DEFS) -ffunction-sections -gdwarf-2 -fdata-sections -fno-split-wide-types
-
-## Assembly specific flags
-ASMFLAGS = $(COMMON)
-ASMFLAGS += $(CFLAGS)
-ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
-
-## Linker flags
-LDFLAGS = $(COMMON)
-LDFLAGS += -Wl,-gc-sections,-Map=DiskLoader.map,--cref
-LDFLAGS += -Wl,--section-start=.text=0x7000,--relax
-LDFLAGS += -Wl,--gc-sections
-#LDFLAGS += -nodefaultlibs -nostartfiles
-#LDFLAGS += -nostartfiles
-
-
-## Intel Hex file production flags
-HEX_EEPROM_FLAGS = -j .eeprom
-HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
-HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings
-
-## Objects explicitly added by the user
-LINKONLYOBJECTS =
-
-MODULES := .
-SRC_DIR := $(addprefix src/,$(MODULES))
-BUILD_DIR := $(addprefix build/,$(MODULES))
-
-SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp))
-OBJ := $(patsubst src/%.cpp,build/%.o,$(SRC))
-DEP := $(OBJ:%.o=%.d)
-INCLUDES := $(addprefix -I,$(SRC_DIR))
-
-vpath %.cpp $(SRC_DIR)
-
-.PHONY: all checkdirs clean
-
-all: checkdirs $(TARGET) DiskLoader.hex DiskLoader.lss size
-
--include $(DEP)
-
-checkdirs: $(BUILD_DIR)
-
-$(BUILD_DIR):
- @mkdir -p $@
-
-clean:
- @rm -rf build/
- @rm -f *.hex
- @rm -f *.elf
- @rm -f *.lss
- @rm -f *.map
-
-define make-goal
-$1/%.o: %.cpp
- $(CC) $(INCLUDES) $(CFLAGS) -c $$< -MD -o $$@
-endef
-
-$(foreach bdir,$(BUILD_DIR),$(eval $(call make-goal,$(bdir))))
-
-$(TARGET): $(OBJ)
- $(CC) $(LDFLAGS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) $^ -o $@
-
-%.hex: $(TARGET)
- avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
-
-%.lss: $(TARGET)
- avr-objdump -h -S $< > $@
-
-size: $(TARGET)
- @echo
-# @avr-size -C --mcu=${MCU} ${TARGET}.elf
-
-program: $(TARGET).hex
- $(AVRDUDE) $(AVRDUDE_FLAGS) -B 1 -u -U flash:w:$(TARGET).hex \ No newline at end of file
+#ARDUINO_MODEL_PID = 0x0035
+
+# Change if your programmer is different
+AVRDUDE_PROGRAMMER = avrispmkII
+AVRDUDE_PORT = usb
+
+# program name should not be changed...
+PROGRAM = DiskLoader
+
+AVRDUDE = avrdude
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -p $(MCU)
+
+## Options common to compile, link and assembly rules
+COMMON = -mmcu=$(MCU)
+
+override CFLAGS = -g -Wall -Os -mmcu=$(MCU) -DF_CPU=$(AVR_FREQ) -DARDUINO_MODEL_PID=$(ARDUINO_MODEL_PID) $(DEFS) -ffunction-sections -gdwarf-2 -fdata-sections -fno-split-wide-types
+
+## Assembly specific flags
+ASMFLAGS = $(COMMON)
+ASMFLAGS += $(CFLAGS)
+ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
+
+## Linker flags
+LDFLAGS = $(COMMON)
+LDFLAGS += -Wl,-gc-sections,-Map=DiskLoader.map,--cref
+LDFLAGS += -Wl,--section-start=.text=0x7000,--relax
+LDFLAGS += -Wl,--gc-sections
+#LDFLAGS += -nodefaultlibs -nostartfiles
+#LDFLAGS += -nostartfiles
+
+
+## Intel Hex file production flags
+HEX_EEPROM_FLAGS = -j .eeprom
+HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
+HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings
+
+## Objects explicitly added by the user
+LINKONLYOBJECTS =
+
+MODULES := .
+SRC_DIR := $(addprefix src/,$(MODULES))
+BUILD_DIR := $(addprefix build/,$(MODULES))
+
+SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp))
+OBJ := $(patsubst src/%.cpp,build/%.o,$(SRC))
+DEP := $(OBJ:%.o=%.d)
+INCLUDES := $(addprefix -I,$(SRC_DIR))
+
+vpath %.cpp $(SRC_DIR)
+
+.PHONY: all checkdirs clean
+
+all: checkdirs $(TARGET) DiskLoader.hex DiskLoader.lss size
+
+-include $(DEP)
+
+checkdirs: $(BUILD_DIR)
+
+$(BUILD_DIR):
+ @mkdir -p $@
+
+clean:
+ @rm -rf build/
+ @rm -f *.hex
+ @rm -f *.elf
+ @rm -f *.lss
+ @rm -f *.map
+
+define make-goal
+$1/%.o: %.cpp
+ $(CC) $(INCLUDES) $(CFLAGS) -c $$< -MD -o $$@
+endef
+
+$(foreach bdir,$(BUILD_DIR),$(eval $(call make-goal,$(bdir))))
+
+$(TARGET): $(OBJ)
+ $(CC) $(LDFLAGS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) $^ -o $@
+
+%.hex: $(TARGET)
+ avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
+
+%.lss: $(TARGET)
+ avr-objdump -h -S $< > $@
+
+size: $(TARGET)
+ @echo
+# @avr-size -C --mcu=${MCU} ${TARGET}.elf
+
+program: $(TARGET).hex
+ $(AVRDUDE) $(AVRDUDE_FLAGS) -B 1 -u -U flash:w:$(TARGET).hex
diff --git a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
index 2c91367..10c80b8 100644
--- a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
+++ b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
@@ -20,6 +20,7 @@ void entrypoint(void)
}
u8 _flashbuf[128];
+volatile u16 _timeout;
void Program(u8 ep, u16 page, u8 count)
{
@@ -45,6 +46,34 @@ void Program(u8 ep, u16 page, u8 count)
boot_rww_enable ();
}
+#define STK_OK 0x10
+#define STK_INSYNC 0x14 // ' '
+#define CRC_EOP 0x20 // 'SPACE'
+#define STK_GET_SYNC 0x30 // '0'
+
+#define STK_GET_PARAMETER 0x41 // 'A'
+#define STK_SET_DEVICE 0x42 // 'B'
+#define STK_SET_DEVICE_EXT 0x45 // 'E'
+#define STK_LOAD_ADDRESS 0x55 // 'U'
+#define STK_UNIVERSAL 0x56 // 'V'
+#define STK_PROG_PAGE 0x64 // 'd'
+#define STK_READ_PAGE 0x74 // 't'
+#define STK_READ_SIGN 0x75 // 'u'
+
+extern const u8 _readSize[] PROGMEM;
+const u8 _readSize[] =
+{
+ STK_GET_PARAMETER, 1,
+ STK_SET_DEVICE, 20,
+ STK_SET_DEVICE_EXT, 5,
+ STK_UNIVERSAL, 4,
+ STK_LOAD_ADDRESS, 2,
+ STK_PROG_PAGE, 3,
+ STK_READ_PAGE, 3,
+ 0,0
+};
+
+
int main(void) __attribute__ ((naked));
int main()
{
@@ -68,21 +97,26 @@ int main()
for (;;)
{
-// L_LED_ON();
-// _delay_ms(250);
-// L_LED_OFF();
-// _delay_ms(250);
u8* packet = _flashbuf;
u16 address = 0;
for (;;)
{
-// u8 cmd = getch();
if (Serial.available() > 0) {
u8 cmd = Serial.read();
- if (cmd == '0')
- L_LED_OFF();
- if (cmd == '1')
- L_LED_ON();
+ // Read packet contents
+ u8 len;
+ const u8* rs = _readSize;
+ for (;;)
+ {
+ u8 c = pgm_read_byte(rs++);
+ len = pgm_read_byte(rs++);
+ if (c == cmd || c == 0)
+ break;
+ }
+ _timeout = 0;
+ // Read params
+ USB_Recv(CDC_RX, packet, len);
+
}
}
}