From 540df9f5842bf55260f494c985fd75e4c54fb7cb Mon Sep 17 00:00:00 2001 From: Erik Andresen Date: Sun, 5 Nov 2017 21:02:46 +0100 Subject: [PATCH] misc avr fixes --- avr/motor_ctrl/main.c | 2 +- avr/nano/Makefile | 6 +- avr/nano/main.c | 5 +- avr/nano/main.hex | 616 +++++++++++++++++++++--------------------- avr/nano/uart.c | 4 +- 5 files changed, 316 insertions(+), 317 deletions(-) diff --git a/avr/motor_ctrl/main.c b/avr/motor_ctrl/main.c index d751375..ec9965f 100644 --- a/avr/motor_ctrl/main.c +++ b/avr/motor_ctrl/main.c @@ -382,7 +382,7 @@ ISR(TWI_vect) default: TWI_NAK; } - ireg++; + if (ireg < 0xff) ireg++; break; case TW_ST_SLA_ACK: // start read case TW_ST_DATA_ACK: // read diff --git a/avr/nano/Makefile b/avr/nano/Makefile index f8864cc..1587f45 100644 --- a/avr/nano/Makefile +++ b/avr/nano/Makefile @@ -134,7 +134,7 @@ PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min # Floating point printf version (requires MATH_LIB = -lm below) PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt -lm -PRINTF_LIB = +PRINTF_LIB = $(PRINTF_LIB_MIN) # Minimalistic scanf version SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min @@ -144,7 +144,7 @@ SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt SCANF_LIB = -MATH_LIB = -lm +MATH_LIB = #-lm # External memory options @@ -164,7 +164,7 @@ EXTMEMOPTS = # --cref: add cross reference to map file LDFLAGS = -Wl,-Map=$(TARGET).map,--cref LDFLAGS += $(EXTMEMOPTS) -LDFLAGS += $(PRINTF_LIB_MIN) $(SCANF_LIB) $(MATH_LIB) +LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) diff --git a/avr/nano/main.c b/avr/nano/main.c index 16a316c..7b62c80 100644 --- a/avr/nano/main.c +++ b/avr/nano/main.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "uart.h" /* @@ -81,7 +82,7 @@ ISR(TWI_vect) default: TWI_NAK; } - ireg++; + if (ireg < 0xff) ireg++; break; case TW_ST_SLA_ACK: // start read case TW_ST_DATA_ACK: // read @@ -305,7 +306,7 @@ int main(void) { EICRA = (1 << ISC10) | (1 << ISC00); PCICR = (1 << PCIE2); - printf("\r\nStart\r\n"); + printf_P(PSTR("\r\nStart\r\n")); set_sleep_mode(SLEEP_MODE_IDLE); sei(); diff --git a/avr/nano/main.hex b/avr/nano/main.hex index 7f1bb78..3f3fa6b 100644 --- a/avr/nano/main.hex +++ b/avr/nano/main.hex @@ -1,316 +1,314 @@ -:100000000C945A000C944E010C9498010C947700B7 -:100010000C9477000C94E2010C9477000C94770018 -:100020000C9477000C9477000C9477000C94770074 -:100030000C9477000C9477000C9477000C94770064 -:100040000C9477000C9477000C9443020C94770086 -:100050000C9477000C9477000C9477000C94770044 -:100060000C9479000C947700D300F700D800F700C7 -:10007000E800F700ED00F700E300F700F200F700FA -:10008000FD00FD00FD00FD00FD00FD00FD00FD0088 -:10009000E800F700ED00F700F200F700454647657D -:1000A000666700202B2D2E30313233343536373809 -:1000B0003968000011241FBECFEFD8E0DEBFCDBFEE -:1000C00011E0A0E0B1E0ECE9F3E102C005900D928F -:1000D000A031B107D9F721E0A0E1B1E001C01D9244 -:1000E000AF39B207E1F70E944D030C94CC090C9490 -:1000F00000001F920F920FB60F9211248F939F93BF -:10010000AF93BF93EF93FF938091B900887F803ABC -:1001100009F47EC028F4803641F0803861F07AC05E -:10012000883AA1F1883B91F175C085EC8093BC00C1 -:100130001092290172C080912901882341F08F3FDC -:1001400009F05DC08091BB008093280158C0809168 -:10015000BB008093290180912901853019F481E049 -:1001600080931D0180912901873019F481E08093EB -:100170001B01809129018B3019F481E080931C01CF -:100180008091290181508093290135C0E091290196 -:100190008E2F90E0FC013197EA31F10570F5EC5CAF -:1001A000FF4F0C94F306809126019091270104C023 -:1001B000809124019091250180931601909317015D -:1001C0009093BB0018C08091190190911A01F4CF4F -:1001D0008091220190912301EFCF80911E01909197 -:1001E0001F01EACF8091200190912101E5CF8091FC -:1001F00016018093BB0085EC03C01092BB0085E81C -:100200008093BC00809129018F5F8093290105C0F4 -:1002100085EC01C085ED8093BC00FF91EF91BF910B -:10022000AF919F918F910F900FBE0F901F901895D7 -:1002300093E890937A0080937C0080917C008064A6 -:1002400080937C0080917A00806480937A00809112 -:100250007A0086FDFCCF809178009091790025E0AE -:1002600080E090E030917A00306430937A003091F1 -:100270007A0036FDFCCF4091780050917900840FD0 -:10028000951F215079F720917A002F7720937A00DB -:1002900065E070E00E94C006CB0108951F920F92A6 -:1002A0000FB60F9211242F933F934F935F936F9349 -:1002B0007F938F939F93AF93BF93EF93FF9360913F -:1002C0008400709185004A9B05C07093150160936E -:1002D00014011DC08091140190911501681B790BC8 -:1002E00080E090E00E94C50527EE3CE840E350E442 -:1002F0000E94530620E030E040E05FE30E942A05C0 -:100300000E9496057093230160932201E898FF9163 -:10031000EF91BF91AF919F918F917F916F915F917D -:100320004F913F912F910F900FBE0F901F901895F6 -:100330001F920F920FB60F9211242F933F934F935A -:100340005F936F937F938F939F93AF93BF93EF933D -:10035000FF9360918400709185004B9B05C0709362 -:100360001301609312011DC080911201909113013D -:10037000681B790B80E090E00E94C50527EE3CE801 -:1003800040E350E40E94530620E030E040E05FE3A9 -:100390000E942A050E94960570931F0160931E011A -:1003A000E998FF91EF91BF91AF919F918F917F91CC -:1003B0006F915F914F913F912F910F900FBE0F90D2 -:1003C0001F9018951F920F920FB60F9211242F9322 -:1003D0003F934F935F936F937F938F939F93AF93CD -:1003E000BF93EF93FF93CF93DF931F92CDB7DEB709 -:1003F00089B1898390911801892784FF2DC060916C -:10040000840070918500898184FF05C0709311017B -:100410006093100121C08091100190911101681B1F -:10042000790B80E090E00E94C50527EE3CE840E3B0 -:1004300050E40E94530620E030E040E05FE30E9479 -:100440002A050E94960570932101609320018091F6 -:100450006D008F7E80936D008981809318010F90CD -:10046000DF91CF91FF91EF91BF91AF919F918F91CC -:100470007F916F915F914F913F912F910F900FBEA0 -:100480000F901F9018951F920F920FB60F92112484 -:100490008F939F93EF93FF938091C00087FF17C0C6 -:1004A000E0912C01F0912D018091C600808381E0C4 -:1004B000E139F80730F43196F0932D01E0932C01E7 -:1004C00006C08EE291E090932D0180932C01FF9164 -:1004D000EF919F918F910F900FBE0F901F901895E5 -:1004E0009C01E1ECF0E080818861808380818068FC -:1004F0008083E2ECF0E0808186608083C901A0E027 -:10050000B0E09C01AD0184E0220F331F441F551F52 -:100510008A95D1F760E074E284EF90E00E94D406FF -:10052000DA01C9010197A109B109892F9A2FAB2FCF -:10053000BB27A7FDBA958093C50021502093C40026 -:100540008EE291E090932B0180932A0190932D01EC -:1005500080932C0108952091C00025FFFCCFFC0161 -:1005600080818093C6000895CF93DF931F92CDB70B -:10057000DEB78983CE0101960E94AB0280E090E055 -:100580000F90DF91CF910895CF93DF93EC01CE01CF -:100590002196FC012081222319F00E94AB02F7CFA3 -:1005A000DF91CF9108958091C00087FFFCCF8091AB -:1005B000C60090E008950C94D3026BED72E084EBDA -:1005C00092E00C945D07CF93DF93FC01E253FF4F61 -:1005D000A081B181EC01C453DF4F28813981A2177A -:1005E000B307B9F02091C00025FF13C02C912093D0 -:1005F000C60020813181AC0145535F4F2417350778 -:1006000018F42F5F3F4F03C09C0128593F4F31839F -:100610002083E0912A01F0912B0120912C0130914F -:100620002D012E173F07B1F1EC01CC59DF4FA88106 -:10063000B98120812C93688179819C012B523F4F95 -:10064000D9013C91DB012C91321307C0AC014C5213 -:100650005F4FDA012C912F5F2C939C012D593F4F56 -:100660006217730728F4DB011196B983A88302C0CF -:1006700099838883B1E0E139FB0730F43196F09338 -:100680002B01E0932A0106C08EE291E090932B01AA -:1006900080932A01DF91CF9108951092280180E87C -:1006A00095E20E9470020E94DD0282E58093BA000A -:1006B00085EC8093BC001092800084E080938100E0 -:1006C00095E0909369008093680086E091E00E9435 -:1006D000E00783B7817F83BF7894C8E1D8E0809139 -:1006E0002901833089F058F4813009F03EC080E060 -:1006F0000E941801909327018093260136C089300B -:1007000059F08F3FF1F031C081E00E9418019093C1 -:1007100025018093240129C082E00E941801BC01B8 -:1007200080E090E00E94C50528E431EE4AEB5FE3EB -:100730000E9453060E94960570931A016093190156 -:1007400014C080912801853A81F4F8946BE780E029 -:1007500090E00E94BE09F999FECF0FB6F894A895D3 -:10076000C09360000FBED093600080911D0188236C -:1007700091F010921D011092230110922201529AC1 -:100780005A9A85E38A95F1F700005A9852988CB3EB -:1007900081708CBBE89A80911B01882391F01092A4 -:1007A0001B0110921F0110921E01539A5B9A85E360 -:1007B0008A95F1F700005B9853988CB382708CBBDC -:1007C000E99A80911C018823B1F010921C011092CB -:1007D000210110922001549A5C9A85E38A95F1F7E1 -:1007E00000005C98549889B18093180180916D0045 -:1007F000806180936D0083B7816083BF889583B7E4 -:100800008E7F83BF6CCFACE0B0E0E9E0F4E00C9405 -:10081000FD066C015B017A01FC011782168283815F -:1008200081FF0EC1CE0101964C01F6010381F50155 -:1008300003FD159103FF11915F01112309F4FCC021 -:10084000153249F403FD159103FF11915F01153233 -:1008500011F020E01BC0B601812F90E00E94A80794 -:1008600037017301E2CF112309F4E6C0612F70E074 -:1008700083EA90E02C870E9452072C85892B49F04F -:10088000F50103FD159103FF11915F0127FFEBCFE8 -:1008900009C0133229F01C3609F0D5C02068F0CF0A -:1008A00020E1EECF022F112309F4C6C0612F70E0C2 -:1008B0008CE990E02C870E9452072C85892B41F00F -:1008C0003701F4E06F0E711CB6018FE390E011C0A8 -:1008D000133639F0133781F0133519F5022F016003 -:1008E0000BC0370182E0680E711CB601F7018081F0 -:1008F00091810E94A807B5CF3701F2E06F0E711CFD -:10090000F701E080F180F70100FD859100FF819102 -:100910007F01882309F4A5CFB60190E00E94A807C3 -:10092000F2CF143611F0193629F5370127FF09C027 -:10093000F4E06F0E711CF7016081718182819381F7 -:100940000AC0F2E06F0E711CF70160817181072E01 -:10095000000C880B990B022F0F7E97FF08C0909513 -:100960008095709561957F4F8F4F9F4F00642AE06F -:1009700030E033C0103799F040F41835B1F01F362D -:1009800009F05AC028E030E014C0153719F01837C4 -:1009900041F052C0022F0F7E2AE030E00AC0022F41 -:1009A0000061046220E130E004C0022F046020E115 -:1009B00032E0370107FF09C0F4E06F0E711CF70148 -:1009C000608171818281938108C0F2E06F0E711C99 -:1009D000F7016081718180E090E0A4010E9410081D -:1009E000182F181906FF05C0B6018DE290E00E948D -:1009F000A80704FF15C0FE01E10FF11D80818033BF -:100A000079F0B60180E390E00E94A80702FF08C0D9 -:100A10000072802F90E0B601885A9F4F0E94A8076D -:100A20001150F401E10FF11D8081B60190E00E94A8 -:100A3000A8071111F5CF15CFF6018681978105C062 -:100A40008FEF9FEF02C0022F31CF2C96EEE00C9477 -:100A500019075058BB27AA270E9441050C94190674 -:100A60000E940B0638F00E94120620F039F49F3FD6 -:100A700019F426F40C9408060EF4E095E7FB0C94A8 -:100A80000206E92F0E942A0658F3BA176207730775 -:100A90008407950720F079F4A6F50C944C060EF423 -:100AA000E0950B2EBA2FA02D0B01B90190010C017E -:100AB000CA01A0011124FF27591B99F0593F50F496 -:100AC000503E68F11A16F040A22F232F342F4427EE -:100AD000585FF3CF469537952795A795F0405395E6 -:100AE000C9F77EF41F16BA0B620B730B840BBAF0B6 -:100AF0009150A1F0FF0FBB1F661F771F881FC2F721 -:100B00000EC0BA0F621F731F841F48F48795779534 -:100B10006795B795F7959E3F08F0B0CF9395880FEE -:100B200008F09927EE0F9795879508950E94320651 -:100B300088F09F5798F0B92F9927B751B0F0E1F09E -:100B4000660F771F881F991F1AF0BA95C9F714C04E -:100B5000B13091F00E944C06B1E008950C944C061F -:100B6000672F782F8827B85F39F0B93FCCF3869587 -:100B700077956795B395D9F73EF4909580957095E4 -:100B800061957F4F8F4F9F4F0895E89409C097FB61 -:100B90003EF490958095709561957F4F8F4F9F4F54 -:100BA0009923A9F0F92F96E9BB279395F695879598 -:100BB00077956795B795F111F8CFFAF4BB0F11F45B -:100BC00060FF1BC06F5F7F4F8F4F9F4F16C0882302 -:100BD00011F096E911C0772321F09EE8872F762F38 -:100BE00005C0662371F096E8862F70E060E02AF079 -:100BF0009A95660F771F881FDAF7880F9695879565 -:100C000097F9089597F99F6780E870E060E008958C -:100C10009FEF80EC089500240A9416161706180614 -:100C20000906089500240A941216130614060506F0 -:100C30000895092E0394000C11F4882352F0BB0F81 -:100C400040F4BF2B11F460FF04C06F5F7F4F8F4FE4 -:100C50009F4F089557FD9058440F551F59F05F3F1F -:100C600071F04795880F97FB991F61F09F3F79F0CE -:100C700087950895121613061406551FF2CF469550 -:100C8000F1DF08C0161617061806991FF1CF8695D2 -:100C90007105610508940895E894BB2766277727B6 -:100CA000CB0197F908950E9466060C9419060E94DC -:100CB0000B0638F00E94120620F0952311F00C94D8 -:100CC00002060C94080611240C944D060E942A0674 -:100CD00070F3959FC1F3950F50E0551F629FF0018F -:100CE000729FBB27F00DB11D639FAA27F00DB11DA8 -:100CF000AA1F649F6627B00DA11D661F829F222731 -:100D0000B00DA11D621F739FB00DA11D621F839FB7 -:100D1000A00D611D221F749F3327A00D611D231F8D -:100D2000849F600D211D822F762F6A2F11249F57DB -:100D300050409AF0F1F088234AF0EE0FFF1FBB1FDE -:100D4000661F771F881F91505040A9F79E3F51059D -:100D500080F00C9402060C944D065F3FE4F3983E3D -:100D6000D4F3869577956795B795F795E7959F5F47 -:100D7000C1F7FE2B880F911D9695879597F90895D9 -:100D8000AA1BBB1B51E107C0AA1FBB1FA617B707B1 -:100D900010F0A61BB70B881F991F5A95A9F78095CD -:100DA0009095BC01CD010895052E97FB1EF400948B -:100DB0000E94EB0657FD07D00E94300707FC03D0C6 -:100DC0004EF40C94EB0650954095309521953F4F8D -:100DD0004F4F5F4F089590958095709561957F4F27 -:100DE0008F4F9F4F0895EE0FFF1F0590F491E02D58 -:100DF00009942F923F924F925F926F927F928F92BF -:100E00009F92AF92BF92CF92DF92EF92FF920F9399 -:100E10001F93CF93DF93CDB7DEB7CA1BDB0B0FB6A3 -:100E2000F894DEBF0FBECDBF09942A883988488860 -:100E30005F846E847D848C849B84AA84B984C884F6 -:100E4000DF80EE80FD800C811B81AA81B981CE0FED -:100E5000D11D0FB6F894DEBF0FBECDBFED010895D2 -:100E6000A1E21A2EAA1BBB1BFD010DC0AA1FBB1FAE -:100E7000EE1FFF1FA217B307E407F50720F0A21B20 -:100E8000B30BE40BF50B661F771F881F991F1A948D -:100E900069F760957095809590959B01AC01BD01B7 -:100EA000CF010895FC010590061621F00020D9F726 +:100000000C945F000C945B010C94A5010C947C0093 +:100010000C947C000C94EF010C947C000C947C00FC +:100020000C947C000C947C000C947C000C947C0060 +:100030000C947C000C947C000C947C000C947C0050 +:100040000C947C000C947C000C9450020C947C006A +:100050000C947C000C947C000C947C000C947C0030 +:100060000C947E000C947C00E0000401E500040187 +:10007000F5000401FA000401F0000401FF0004018E +:100080000A010A010A010A010A010A010A010A0118 +:10009000F5000401FA000401FF0004010D0A537485 +:1000A0006172740D0A0045464765666700202B2D76 +:1000B0002E30313233343536373839680000112468 +:1000C0001FBECFEFD8E0DEBFCDBF21E0A6E0B1E09C +:1000D00001C01D92A539B207E1F711E0A0E0B1E03F +:1000E000E8E7F3E102C005900D92A630B107D9F719 +:1000F0000E9457030C94BA090C9400001F920F92AF +:100100000FB60F9211248F939F93AF93BF93EF93EA +:10011000FF938091B900887F803A09F486C028F463 +:10012000803641F0803861F082C0883AE1F1883B46 +:10013000D1F17DC085EC8093BC0010921F017AC084 +:1001400080911F01882339F08F3F29F58091BB00F2 +:1001500080931E0120C08091BB0080931F0180917D +:100160001F01853019F481E08093130180911F01F4 +:10017000873019F481E08093110180911F018B3049 +:1001800019F481E08093120180911F0181508093C6 +:100190001F0185EC01C085E88093BC0080911F01A0 +:1001A0008F3FE9F547C0E0911F018E2F90E0FC01E1 +:1001B0003197EA31F10570F5EC5CFF4F0C945C056A +:1001C00080911C0190911D0104C080911A019091B1 +:1001D0001B0180930C0190930D019093BB0018C0FC +:1001E00080910F0190911001F4CF809118019091AE +:1001F0001901EFCF8091140190911501EACF809100 +:10020000160190911701E5CF80910C018093BB00FE +:1002100085EC03C01092BB0085E88093BC00809100 +:100220001F018F5F80931F0105C085EC01C085ED24 +:100230008093BC00FF91EF91BF91AF919F918F91FF +:100240000F900FBE0F901F90189593E890937A002F +:1002500080937C0080917C00806480937C008091FE +:100260007A00806480937A0080917A0086FDFCCFCA +:10027000809178009091790025E080E090E03091C5 +:100280007A00306430937A0030917A0036FDFCCFEA +:100290004091780050917900840F951F215079F793 +:1002A00020917A002F7720937A0065E070E00E9419 +:1002B0002905CB0108951F920F920FB60F921124BA +:1002C0002F933F934F935F936F937F938F939F935E +:1002D000AF93BF93EF93FF9360918400709185007B +:1002E0004A9B05C070930B0160930A011DC0809169 +:1002F0000A0190910B01681B790B80E090E00E944D +:10030000570627EE3CE840E350E40E94E50620E073 +:1003100030E040E05FE30E94BC050E942806709335 +:10032000190160931801E898FF91EF91BF91AF9187 +:100330009F918F917F916F915F914F913F912F91FD +:100340000F900FBE0F901F9018951F920F920FB62F +:100350000F9211242F933F934F935F936F937F934B +:100360008F939F93AF93BF93EF93FF93609184001C +:10037000709185004B9B05C0709309016093080143 +:100380001DC08091080190910901681B790B80E0E4 +:1003900090E00E94570627EE3CE840E350E40E94BC +:1003A000E50620E030E040E05FE30E94BC050E94EB +:1003B00028067093150160931401E998FF91EF915D +:1003C000BF91AF919F918F917F916F915F914F916D +:1003D0003F912F910F900FBE0F901F9018951F9275 +:1003E0000F920FB60F9211242F933F934F935F9369 +:1003F0006F937F938F939F93AF93BF93EF93FF93ED +:10040000CF93DF931F92CDB7DEB799B199838091D7 +:100410000E01892784FF2DC06091840070918500B2 +:10042000898184FF05C0709307016093060121C094 +:100430008091060190910701681B790B80E090E0A4 +:100440000E94570627EE3CE840E350E40E94E50690 +:1004500020E030E040E05FE30E94BC050E942806F7 +:10046000709317016093160180916D008F7E8093C9 +:100470006D00898180930E010F90DF91CF91FF91E4 +:10048000EF91BF91AF919F918F917F916F915F910C +:100490004F913F912F910F900FBE0F901F90189585 +:1004A0001F920F920FB60F9211248F939F93EF9389 +:1004B000FF938091C00087FF17C0E0912201F09167 +:1004C00023018091C600808381E0E738F80730F48B +:1004D0003196F0932301E093220106C084E291E07B +:1004E0009093230180932201FF91EF919F918F912F +:1004F0000F900FBE0F901F9018959C01E1ECF0E05B +:1005000088E1808380818068808386E08093C20058 +:10051000C901A0E0B0E09C01AD0184E0220F331FCF +:10052000441F551F8A95D1F760E074E284EF90E094 +:100530000E943D05DA01C9010197A109B109892F7E +:100540009A2FAB2FBB27A7FDBA958093C5002150EA +:100550002093C40084E291E09093210180932001D4 +:10056000909323018093220108952091C00025FFDC +:10057000FCCFFC0180818093C6000895CF93DF9368 +:100580001F92CDB7DEB78983CE0101960E94B502D6 +:1005900080E090E00F90DF91CF910895CF93DF93AB +:1005A000EC01CE012196FC012081222319F00E944A +:1005B000B502F7CFDF91CF9108958091C00087FFFA +:1005C000FCCF8091C60090E008950C94DD0265EEAA +:1005D00072E08EEB92E00C945D07CF93DF93FC0109 +:1005E000E253FF4FA081B181EC01C453DF4F28815A +:1005F0003981A217B307B9F02091C00025FF13C0BD +:100600002C912093C60020813181AC0145535F4F6E +:100610002417350718F42F5F3F4F03C09C0128595A +:100620003F4F31832083E0912001F09121012091FF +:100630002201309123012E173F07B1F1EC01CC5973 +:10064000DF4FA881B98120812C93688179819C0139 +:100650002B523F4FD9013C91DB012C91321307C043 +:10066000AC014C525F4FDA012C912F5F2C939C010F +:100670002D593F4F6217730728F4DB011196B98398 +:10068000A88302C099838883B1E0E738FB0730F480 +:100690003196F0932101E093200106C084E291E0BD +:1006A0009093210180932001DF91CF9108951092C2 +:1006B0001E0180E895E20E947D020E94E70282E529 +:1006C0008093BA0085EC8093BC001092800084E097 +:1006D0008093810095E090936900809368008CE995 +:1006E00090E09F938F930E94E40783B7817F83BF3D +:1006F00078940F900F90C8E1D8E080911F0183306B +:1007000089F058F4813009F03EC080E00E94250154 +:1007100090931D0180931C0136C0893059F08F3FA2 +:10072000F1F031C081E00E94250190931B0180937C +:100730001A0129C082E00E942501BC0180E090E0FE +:100740000E94570628E431EE4AEB5FE30E94E5067B +:100750000E9428067093100160930F0114C08091CD +:100760001E01853A81F4F8946BE780E090E00E94E6 +:10077000AC09F999FECF0FB6F894A895C093600024 +:100780000FBED093600080911301882391F01092E6 +:1007900013011092190110921801529A5A9A85E386 +:1007A0008A95F1F700005A9852988CB381708CBBEF +:1007B000E89A80911101882391F010921101109212 +:1007C000150110921401539A5B9A85E38A95F1F70B +:1007D00000005B9853988CB382708CBBE99A80912F +:1007E00012018823B1F01092120110921701109299 +:1007F0001601549A5C9A85E38A95F1F700005C989B +:10080000549889B180930E0180916D00806180932E +:100810006D0083B7816083BF889583B78E7F83BF68 +:100820006CCFABE0B0E0E7E1F4E00C9466056C015E +:100830007B013A01FC0117821682838181FF03C18B +:10084000CE0101964C01F601B380F701B3FC05918E +:10085000B3FE01917F01002309F4F1C0053249F490 +:10086000B3FC0591B3FE01917F01053211F010E058 +:1008700019C0B601802F90E00E94A80753013501EE +:10088000E2CF002309F4DBC0602F70E08DEA90E036 +:100890000E945207892B49F0F701B3FC0591B3FE82 +:1008A00001917F0117FFEDCF04C0033239F00C3600 +:1008B00019F0011105C0C3C01068EECF10E1ECCFF4 +:1008C000602F70E086EA90E00E945207892B41F089 +:1008D0005301F4E0AF0EB11CB6018FE390E010C0FD +:1008E000033631F0033779F0033511F511600BC091 +:1008F000530182E0A80EB11CB601F3018081918101 +:100900000E94A807BCCF5301F2E0AF0EB11CF30167 +:1009100060807180F30110FD859110FF81913F018E +:10092000882309F4ACCFB60190E00E94A807F2CF6B +:10093000043611F0093621F5530117FF09C0F4E020 +:10094000AF0EB11CF30160817181828193810AC075 +:10095000F2E0AF0EB11CF30160817181072E000C33 +:10096000880B990B1F7E97FF08C090958095709516 +:1009700061957F4F8F4F9F4F10642AE030E030C069 +:10098000003791F040F40835A1F00F3609F057C058 +:1009900028E030E011C0053719F0083731F04FC0BA +:1009A0001F7E2AE030E008C01061146220E130E0D0 +:1009B00003C0146020E132E0530117FF09C0F4E0E6 +:1009C000AF0EB11CF301608171818281938108C0F7 +:1009D000F2E0AF0EB11CF3016081718180E090E024 +:1009E000A4010E940A08082F081916FF05C0B601C5 +:1009F0008DE290E00E94A80714FF15C0FE01E00FF1 +:100A0000F11D8081803379F0B60180E390E00E948F +:100A1000A80712FF08C01072812F90E0B601885A13 +:100A20009F4F0E94A8070150F401E00FF11D808143 +:100A3000B60190E00E94A8070111F5CF20CFF60182 +:100A40008681978102C08FEF9FEF2B96EEE00C948A +:100A50008205AA1BBB1B51E107C0AA1FBB1FA6171B +:100A6000B70710F0A61BB70B881F991F5A95A9F757 +:100A700080959095BC01CD010895052E97FB1EF43D +:100A800000940E94540557FD07D00E94990507FC69 +:100A900003D04EF40C945405509540953095219513 +:100AA0003F4F4F4F5F4F089590958095709561959A +:100AB0007F4F8F4F9F4F0895EE0FFF1F0590F491CA +:100AC000E02D09942F923F924F925F926F927F9206 +:100AD0008F929F92AF92BF92CF92DF92EF92FF924E +:100AE0000F931F93CF93DF93CDB7DEB7CA1BDB0BFA +:100AF0000FB6F894DEBF0FBECDBF09942A8839889F +:100B000048885F846E847D848C849B84AA84B984A5 +:100B1000C884DF80EE80FD800C811B81AA81B981B1 +:100B2000CE0FD11D0FB6F894DEBF0FBECDBFED01C5 +:100B30000895A1E21A2EAA1BBB1BFD010DC0AA1F1E +:100B4000BB1FEE1FFF1FA217B307E407F50720F036 +:100B5000A21BB30BE40BF50B661F771F881F991FB1 +:100B60001A9469F760957095809590959B01AC01FA +:100B7000BD01CF0108955058BB27AA270E94D30575 +:100B80000C94AB060E949D0638F00E94A40620F04B +:100B900039F49F3F19F426F40C949A060EF4E0956C +:100BA000E7FB0C949406E92F0E94BC0658F3BA1791 +:100BB000620773078407950720F079F4A6F50C9473 +:100BC000DE060EF4E0950B2EBA2FA02D0B01B90115 +:100BD00090010C01CA01A0011124FF27591B99F0B3 +:100BE000593F50F4503E68F11A16F040A22F232FBF +:100BF000342F4427585FF3CF469537952795A7950F +:100C0000F0405395C9F77EF41F16BA0B620B730BB5 +:100C1000840BBAF09150A1F0FF0FBB1F661F771F26 +:100C2000881FC2F70EC0BA0F621F731F841F48F4DB +:100C3000879577956795B795F7959E3F08F0B0CF64 +:100C40009395880F08F09927EE0F9795879508954B +:100C50000E94C40688F09F5798F0B92F9927B75182 +:100C6000B0F0E1F0660F771F881F991F1AF0BA9550 +:100C7000C9F714C0B13091F00E94DE06B1E00895CA +:100C80000C94DE06672F782F8827B85F39F0B93FBC +:100C9000CCF3869577956795B395D9F73EF4909503 +:100CA0008095709561957F4F8F4F9F4F0895E89481 +:100CB00009C097FB3EF490958095709561957F4FA4 +:100CC0008F4F9F4F9923A9F0F92F96E9BB27939552 +:100CD000F695879577956795B795F111F8CFFAF462 +:100CE000BB0F11F460FF1BC06F5F7F4F8F4F9F4F93 +:100CF00016C0882311F096E911C0772321F09EE8F1 +:100D0000872F762F05C0662371F096E8862F70E056 +:100D100060E02AF09A95660F771F881FDAF7880F30 +:100D20009695879597F9089597F99F6780E870E001 +:100D300060E008959FEF80EC089500240A94161651 +:100D4000170618060906089500240A9412161306B9 +:100D5000140605060895092E0394000C11F4882347 +:100D600052F0BB0F40F4BF2B11F460FF04C06F5F63 +:100D70007F4F8F4F9F4F089557FD9058440F551F39 +:100D800059F05F3F71F04795880F97FB991F61F00D +:100D90009F3F79F087950895121613061406551F84 +:100DA000F2CF4695F1DF08C0161617061806991FF0 +:100DB000F1CF86957105610508940895E894BB27E5 +:100DC00066277727CB0197F908950E94F8060C94BF +:100DD000AB060E949D0638F00E94A40620F09523E1 +:100DE00011F00C9494060C949A0611240C94DF06CE +:100DF0000E94BC0670F3959FC1F3950F50E0551FFC +:100E0000629FF001729FBB27F00DB11D639FAA275F +:100E1000F00DB11DAA1F649F6627B00DA11D661FAE +:100E2000829F2227B00DA11D621F739FB00DA11DCF +:100E3000621F839FA00D611D221F749F3327A00D89 +:100E4000611D231F849F600D211D822F762F6A2F25 +:100E500011249F5750409AF0F1F088234AF0EE0F8A +:100E6000FF1FBB1F661F771F881F91505040A9F7B7 +:100E70009E3F510580F00C9494060C94DF065F3F72 +:100E8000E4F3983ED4F3869577956795B795F795F3 +:100E9000E7959F5FC1F7FE2B880F911D969587956B +:100EA00097F90895FC010590061621F00020D9F766 :100EB000C00108953197CF0108950F931F93CF93E9 :100EC000DF93009731F46115710519F480E090E02B :100ED0003AC08B01EC016EE070E081E090E00E948E -:100EE0006E08FC01892B91F380E8838301151105BD -:100EF00071F01387028781E8838380919501909137 -:100F00009601892B21F4F0939601E09395012097A7 -:100F1000C9F0D187C08783818260838380919701E4 -:100F200090919801892B71F4F0939801E0939701C7 -:100F30008091990190919A01892B21F4F0939A0163 -:100F4000E0939901CF01DF91CF911F910F91089507 +:100EE0006808FC01892B91F380E8838301151105C3 +:100EF00071F01387028781E8838380918B01909141 +:100F00008C01892B21F4F0938C01E0938B012097C5 +:100F1000C9F0D187C08783818260838380918D01EE +:100F200090918E01892B71F4F0938E01E0938D01E5 +:100F300080918F0190919001892B21F4F093900181 +:100F4000E0938F01CF01DF91CF911F910F91089511 :100F50000F931F93CF93DF93FB01238121FD03C0E8 -:100F60008FEF9FEF28C022FF16C046815781248152 +:100F60008FEF9FEF2CC022FF16C04681578124814E :100F700035814217530744F4A081B1819D012F5F51 :100F80003F4F318320838C93268137812F5F3F4FE2 -:100F90003783268310C0EB01092F182F0084F185B9 -:100FA000E02D0995892BE1F68E819F8101969F8323 -:100FB0008E83812F902FDF91CF911F910F910895F4 -:100FC0000F931F93CF93DF93E0919701F0919801D6 -:100FD000238121FF1BC08C01D0E0C0E0F80181918A -:100FE0008F016091970170919801DB011896ED9146 -:100FF000FC911997882331F00995892B79F3DFEF5C -:10100000CFEFECCF8AE00995892B19F08FEF9FEF96 -:1010100002C08D2F9C2FDF91CF911F910F910895CA -:10102000FA01AA27283051F1203181F1E8946F9319 -:101030006E7F6E5F7F4F8F4F9F4FAF4FB1E03ED0BF -:10104000B4E03CD0670F781F891F9A1FA11D680F5D -:10105000791F8A1F911DA11D6A0F711D811D911D90 -:10106000A11D20D009F468943F912AE0269F112405 -:101070003019305D3193DEF6CF010895462F477069 -:10108000405D4193B3E00FD0C9F7F6CF462F4F70C4 -:10109000405D4A3318F0495D31FD4052419302D022 -:1010A000A9F7EACFB4E0A6959795879577956795C8 -:1010B000BA95C9F700976105710508959B01AC01C8 -:1010C0000A2E06945795479537952795BA95C9F7EF -:1010D000620F731F841F951FA01D08950F931F9308 -:1010E000CF93DF93869F8001879F100D969F100DF1 -:1010F0001124C8010E948A08EC01009729F0A80178 -:1011000060E070E00E94B709CE01DF91CF911F919E -:101110000F910895CF93DF938230910510F482E010 -:1011200090E0E0919D01F0919E0120E030E0C0E070 -:10113000D0E0309711F14081518148175907C0F034 -:101140004817590761F482819381209719F09B8396 -:101150008A832BC090939E0180939D0126C0211508 -:10116000310519F04217530718F49A01BE01DF0147 -:10117000EF010280F381E02DDCCF2115310509F16B -:10118000281B390B2430310590F412968D919C91D7 -:1011900013976115710521F0FB019383828304C0CD -:1011A00090939E0180939D01FD01329644C0FD0104 -:1011B000E20FF31F81939193225031092D933C93B9 -:1011C0003AC020919B0130919C01232B41F4209146 -:1011D00002013091030130939C0120939B012091E7 -:1011E0000001309101012115310541F42DB73EB7C1 -:1011F0004091040150910501241B350BE0919B01A6 -:10120000F0919C01E217F307A0F42E1B3F0B281767 -:10121000390778F0AC014E5F5F4F2417350748F06F -:101220004E0F5F1F50939C0140939B0181939193BC -:1012300002C0E0E0F0E0CF01DF91CF9108950F937D -:101240001F93CF93DF93009709F48CC0FC01329772 -:101250001382128200919D0110919E0101151105CA -:1012600081F420813181820F931F20919B01309165 -:101270009C012817390779F5F0939C01E0939B01B5 -:1012800071C0D80140E050E0AE17BF0750F412968D -:101290002D913C911397AD012115310509F1D9012B -:1012A000F3CF9D01DA013383228360817181860F40 -:1012B000971F8217930769F4EC0128813981260F63 -:1012C000371F2E5F3F4F318320838A819B81938319 -:1012D0008283452B29F4F0939E01E0939D0142C047 -:1012E0001396FC93EE931297ED01499159919E014B -:1012F000240F351FE217F30771F480819181840F69 -:10130000951F029611969C938E93828193811396DA -:101310009C938E931297E0E0F0E0D80112968D91A5 -:101320009C911397009719F0F8018C01F6CF8D91DD -:101330009C9198012E5F3F4F820F931F20919B013C -:1013400030919C012817390769F4309729F41092DD -:101350009E0110929D0102C01382128210939C0183 -:1013600000939B01DF91CF911F910F910895DC01B4 -:1013700001C06D9341505040E0F70895262FF99930 -:10138000FECF1FBA92BD81BD20BD0FB6F894FA9A68 -:0C139000F99A0FBE01960895F894FFCF63 -:10139C0000009F0120000D0A53746172740D00004F +:100F90003783268314C08B01EC01FB010084F185AB +:100FA000E02D0995892BE1F6D80116968D919C913B +:100FB0001797019617969C938E931697CE01DF9103 +:100FC000CF911F910F910895A0E0B0E0EAEEF7E015 +:100FD0000C947005AE01495F5F4FDA016D917D9110 +:100FE000AD010BE811E0F80182819381DC011396D9 +:100FF0002C911397286013962C930E941104D8010A +:101000001296ED91FC9113972381277F2383E4E0CF +:101010000C948C05FA01AA27283051F1203181F176 +:10102000E8946F936E7F6E5F7F4F8F4F9F4FAF4FF0 +:10103000B1E03ED0B4E03CD0670F781F891F9A1F03 +:10104000A11D680F791F8A1F911DA11D6A0F711DB7 +:10105000811D911DA11D20D009F468943F912AE0C3 +:10106000269F11243019305D3193DEF6CF010895AB +:10107000462F4770405D4193B3E00FD0C9F7F6CFDC +:10108000462F4F70405D4A3318F0495D31FD4052A4 +:10109000419302D0A9F7EACFB4E0A695979587953A +:1010A00077956795BA95C9F7009761057105089519 +:1010B0009B01AC010A2E06945795479537952795C5 +:1010C000BA95C9F7620F731F841F951FA01D08955D +:1010D0000F931F93CF93DF93869F8001879F100DFF +:1010E000969F100D1124C8010E948408EC010097FE +:1010F00029F0A80160E070E00E94A509CE01DF910F +:10110000CF911F910F9108950F931F93CF93DF936A +:101110008230910510F482E090E0E0919301F0912B +:10112000940120E030E0A0E0B0E0309719F1408178 +:1011300051810281138148175907C8F08417950718 +:1011400069F4109731F012960C93129713961C9332 +:1011500027C0009393011093940122C021153105FB +:1011600019F04217530718F49A01BD01EF01DF018E +:10117000F801DBCF21153105F9F0281B390B24309C +:10118000310580F48A819B816115710521F0FB0195 +:101190009383828304C09093940180939301FE0112 +:1011A000329644C0FE01E20FF31F819391932250C7 +:1011B0003109398328833AC02091910130919201FD +:1011C000232B41F4209102013091030130939201CD +:1011D00020939101209100013091010121153105E9 +:1011E00041F42DB73EB74091040150910501241BF5 +:1011F000350BE0919101F0919201E217F307A0F411 +:101200002E1B3F0B2817390778F0AC014E5F5F4F5C +:101210002417350748F04E0F5F1F509392014093FB +:1012200091018193919302C0E0E0F0E0CF01DF9162 +:10123000CF911F910F910895CF93DF93009709F4F9 +:1012400081C0FC01329713821282A0919301B09168 +:101250009401109781F420813181820F931F209196 +:101260009101309192012817390751F5F0939201BD +:10127000E093910167C0ED0120E030E0CE17DF0779 +:1012800040F44A815B819E0141155105F1F0EA016C +:10129000F5CFD383C28340815181840F951FC81736 +:1012A000D90759F488819981840F951F02969183FB +:1012B00080838A819B81938382832115310529F460 +:1012C000F0939401E09393013DC0E901FB83EA832D +:1012D00049915991C40FD51FEC17FD0761F4808126 +:1012E0009181840F951F0296E901998388838281F9 +:1012F00093819B838A83E0E0F0E012968D919C912C +:101300001397009719F0FD01DC01F7CF8D919C91A7 +:1013100011979D012E5F3F4F820F931F20919101E6 +:10132000309192012817390769F4309729F4109207 +:1013300094011092930102C013821282B093920121 +:10134000A0939101DF91CF910895DC0101C06D93CD +:1013500041505040E0F70895262FF999FECF1FBA6B +:1013600092BD81BD20BD0FB6F894FA9AF99A0FBECE +:0813700001960895F894FFCFE7 +:06137800000095012000B9 :00000001FF diff --git a/avr/nano/uart.c b/avr/nano/uart.c index 1a3707a..6fb768f 100644 --- a/avr/nano/uart.c +++ b/avr/nano/uart.c @@ -20,9 +20,9 @@ ISR(USART_RX_vect) { void setup_uart(unsigned int rate) { - UCSR0B |= (1<> 8); UBRR0L = (uint8_t)UART_UBRR_CALC(rate, F_CPU); -- 2.39.5