/programy/Atmel_C/AVRcam/AVRcam.eep |
---|
0,0 → 1,0 |
:00000001FF |
/programy/Atmel_C/AVRcam/AVRcam.elf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programy/Atmel_C/AVRcam/AVRcam.hex |
---|
1,268 → 1,270 |
:1000000063C0EAC7EAC77AC079C078C077C076C053 |
:10001000E5C774C073C0A8C571C070C06FC06EC0A2 |
:100020006DC013C66BC02AC693C692C691C690C651 |
:100030008FC68EC68DC622C68BC68AC689C688C69E |
:1000400087C686C685C62AC683C682C681C680C6BE |
:100050007FC67EC67DC625C67BC67AC679C678C6EB |
:1000600077C676C675C625C673C672C671C670C613 |
:100070006FC66EC66DC664C66BC66AC669C668C6FC |
:1000800067C666C665C664C663C662C661C660C624 |
:100090005FC65EC65DC623C65BC65AC659C658C68D |
:1000A00057C656C655C6FDC553C652C651C650C6DC |
:1000B0004FC64EC64DC61FC64BC64AC649C648C6E1 |
:1000C00047C646C645C636C611241FBECFE5D4E096 |
:1000D000DEBFCDBF10E0A0E6B0E0EEE9F0E102C087 |
:1000000063C005C805C87AC079C078C077C076C01B |
:1000100000C874C073C0AAC571C070C06FC06EC084 |
:100020006DC00FC66BC029C6BFC6BEC6BDC6BCC6A6 |
:10003000BBC6BAC6B9C621C6B7C6B6C6B5C6B4C66B |
:10004000B3C6B2C6B1C631C6AFC6AEC6ADC6ACC683 |
:10005000ABC6AAC6A9C63AC6A7C6A6C6A5C6A4C6A2 |
:10006000A3C6A2C6A1C63BC69FC69EC69DC69CC6C9 |
:100070009BC69AC699C654C697C696C695C694C6D8 |
:1000800093C692C691C690C68FC68EC68DC68CC6C4 |
:100090008BC68AC689C64DC687C686C685C684C62F |
:1000A00083C682C681C612C67FC67EC67DC67CC692 |
:1000B0007BC67AC679C64EC677C676C675C674C67E |
:1000C00073C672C671C662C611241FBECFE5D4E0E6 |
:1000D000DEBFCDBF10E0A0E6B0E0EEEBF0E102C085 |
:1000E00005900D92A037B107D9F712E0A0E7B0E074 |
:1000F00001C01D92A43EB107E1F731C076C78F9AC7 |
:100100008F9A8A98979890EF87B3892387BB87B394 |
:10011000892B87BB84B3892384BB8EB5887F8EBD32 |
:1000F00001C01D92A43EB107E1F730C091C7089539 |
:100100008F9A8F9A8A98979887B3807F87BB87B397 |
:10011000806F87BB84B3807F84BB8EB5887F8EBDA4 |
:1001200085B78C6085BF85B7836085BF8BB78064DA |
:100130008BBF86E083BF85B78F7885BF85B7806822 |
:1001400085BF80E093E020E3FC0111922A95E9F756 |
:1001500040E350E061E070E07DD708950895CFE579 |
:10016000D4E0DEBFCDBFAAD6F1D42CD5C8DF7894B9 |
:10017000FAD594D27FD088EE93E065D603D080E0A4 |
:1001800090E08CC7CF93809172008823B9F080FFF4 |
:1001900009C0F894809172008E7F809372007894E9 |
:1001A000F8D0ACD28091720081FF08C0F8948091A1 |
:1001B00072008D7F809372007894B9D09091700016 |
:1001C000809171009817F9F232D0C82F99278031A9 |
:1001D000910511F1813191057CF48230910509F18D |
:1001E000833091051CF40197D1F0CDCF8430910577 |
:1001F000C1F00897B1F0C7CF8038910591F08138F0 |
:1002000091051CF4809769F0BECF8138910549F0C3 |
:100210008039910549F0B7CF8C2F33D005C08C2F92 |
:1002200058D28C2F2ED0AFCF8C2F53D2ACCFF89486 |
:10023000209171008CE692E0FC01E20FF11D9081AB |
:10024000822F8F5F8770809371007894892F992710 |
:100250000895382FF894209170008CE692E0FC010C |
:10026000E20FF11D3083822F8F5F877080937000C3 |
:100270007894089580E4E8E7F0E011928A95E9F730 |
:10028000089599278430910551F18530910534F412 |
:100290008130910531F1029771F008958038910510 |
:1002A000C1F0813891051CF48097B9F00895813828 |
:1002B0009105F1F0089561E081E166D56AD588EE97 |
:1002C00093E0C1D51092730082E0809374002FD028 |
:1002D000089581E08093740002C018D108950CD075 |
:1002E000089580917400882329F084E0B2DF089596 |
:1002F0001092740008950895809174008130A9F4DB |
:1003000010927700809175008093760010927500AE |
:1003100080E4E8E7F0E011928A95E9F7829BFECF4E |
:1003200060E073E08CEB91E0F0D508950895809142 |
:100330007400823011F580917300880F90EBECEB24 |
:10034000F1E011929A95E9F790EBECE0F1E011926F |
:100350009A95E9F7829BFECF8299FECF882339F0E8 |
:10036000849BFECF81508499FECF8823C9F76CE02F |
:1003700071E08CEB91E010D608958091740081308B |
:1003800039F48499FECF60E073E08CEB91E0BDD549 |
:100390000895DF92EF92FF920F931F93CF93DF9315 |
:1003A000CDB7DEB721970FB6F894DEBF0FBECDBF35 |
:1003B000009160001091610080917400823009F01A |
:1003C00054C08BE0CDD380917300CAD3DD242D2D92 |
:1003D00033270F2EFCEBEF2EF1E0FF2EF02DE20E77 |
:1003E000F31EF7018081898389818F7089838981D8 |
:1003F0008295807F89838901045F1E4FF801808187 |
:10040000982F9F708981892B89838981A9D3F801CD |
:100410008181898389818F70898389818295807F99 |
:100420008983F7018181982F9F708981892B898326 |
:10043000898196D3F2E0DF0E4FEA4D1540F68FE04A |
:100440008FD3809173008F5F80937300883408F49A |
:100450004AC0109273001092740089B78B7F89BFD5 |
:1004600060E081E191D495D443C0809174008130E3 |
:1004700009F03EC0A1D080917700992787709070D5 |
:10048000079711F5DD24F80187818130B9F4868161 |
:10049000282F33278481A901481B51094330510576 |
:1004A0006CF4809177009927821B930B039734F0AB |
:1004B000178280917500815080937500085F1F4FEF |
:1004C000D39457E05D15F8F6809177008F5F8093A5 |
:1004D0007700803941F480E2BCDE89B78B7F89BF29 |
:1004E0001092770005C08091720082608093720044 |
:1004F00021960FB6F894DEBF0FBECDBFDF91CF912E |
:100500001F910F91FF90EF90DF900895DF92EF928F |
:10051000FF920F931F93CF93DF93809175008823F1 |
:1005200009F440C08AE001D3C0916000D09161001D |
:1005300080917500FAD2DD248F81813061F580E0F1 |
:1005400098819038D9F0903411F481E017C090323E |
:1005500011F482E013C0903111F483E00FC09830A1 |
:1005600011F484E00BC0943011F485E007C09230A0 |
:1005700011F486E003C0913009F487E01B810C81FF |
:10058000FD80EE80D2D2812FD0D2802FCED28F2D7F |
:10059000CCD28E2DCAD22896D39487E08D1560F6E2 |
:1005A0008FEFC3D284E055DEDF91CF911F910F9181 |
:1005B000FF90EF90DF9008951F93CF93ACEBB1E0E5 |
:1005C00060E0C62F71E010E05D91C70F7D91670F6D |
:1005D000552309F45DC0743008F45AC0E0916000FE |
:1005E000F0916100412F8081581751F5878181304A |
:1005F00039F58681282F3327809177009927019735 |
:1006000028173907E9F481819281C81710F09C17E7 |
:1006100040F4681710F0961720F48C1788F06917CB |
:1006200078F0C18362838381C81708F4C38385810E |
:10063000861708F4658380917700868311E004C0F3 |
:1006400038964F5F483078F2112311F5809175008C |
:100650008830F0F4E0916000F0916100412F8781D3 |
:10066000882321F038964F5F4830C8F35083C18308 |
:100670006283C38380917700848365838091770050 |
:10068000868381E08783809175008F5F80937500FA |
:10069000603B08F498CFCF911F9108951092BF004E |
:1006A0001092C0001092C1001092C20080E4E3ECEE |
:1006B000F0E011928A95E9F780E4E4E9F2E0119222 |
:1006C0008A95E9F780E2E4E7F2E011928A95E9F78A |
:1006D000089599278031910551F0813191051CF4DD |
:1006E000019739F008958039910529F0089506D0D1 |
:1006F00008950ED00895E6D1089508959091BA0016 |
:100700008091BB00981711F0FED12AD20895089568 |
:10071000CF939091B8008091B900981709F46FC0F9 |
:10072000C9E0DFD1382F8D3029F58091BE008823B4 |
:1007300011F42CD106C002D18091BE008F5F80934E |
:10074000BE0084E690E07FD38091620088508230C2 |
:1007500020F484D180E97DDD04C077D180E979DDA2 |
:1007600051D01092BE0080E4E3ECF0E011928A9543 |
:10077000E9F73EC08032D9F48091BE00882311F49D |
:1007800005D10FC08091BE00992701968034910554 |
:100790003CF01092BC001092BD001092BE0026C02A |
:1007A000CDD08091BE008F5F8093BE0021C0815468 |
:1007B0008A3118F08F5E8A30C8F42091BD00822FF4 |
:1007C0009927FC01E154FF4F30838091BC00982FA2 |
:1007D0009F5F9093BC00822F8F5F8093BD00943009 |
:1007E00038F0C09362001092BD0002C0C093620056 |
:1007F0009091B8008091B900981709F092CFE894D1 |
:10080000CF910895DF92EF92FF920F931F93CF93B2 |
:10081000DF93EE2480916200813009F487C0882341 |
:1008200069F4C3E6D0E080916300882309F47EC0B8 |
:1008300089917BD188818823D9F778C08091620023 |
:10084000873011F48BDC72C080916200833029F410 |
:1008500084E690E0F8D282E028C080916200823085 |
:10086000B1F4FF24F3948091BE00F81670F48F2D3C |
:100870009927FC01ED53FF4F6181808185D282E091 |
:10088000F80E8091BE00F81690F383D24FC080918D |
:100890006200843029F484E690E0D5D280E805C077 |
:1008A00080916200853019F481E8D3DC3FC08091EB |
:1008B00062008630D9F5FF248091BE00F816B0F5AD |
:1008C0008F2D99278C0100501D4FFC01ED53FF4FD8 |
:1008D0002181F80120830196B5D3982FF8018081FA |
:1008E0009817F9F0DD24F2E0FE15D0F08F2D99274E |
:1008F0008C0100501D4FEC012196F8016081CE0162 |
:10090000BAD3E394CE019ED3982FF8018081981733 |
:1009100011F4DD24D394DD2019F4F2E0FE1568F71C |
:10092000EE24F3948091BE00F81650F2DF91CF913F |
:100930001F910F91FF90EF90DF9008958FEB90E063 |
:1009400055D3AC018F3F910571F068F089E0809339 |
:1009500062002091BE0083EC90E0FC01E20FF11DEB |
:100960008FEF808308C08091BE0023EC30E0F90156 |
:10097000E80FF11D408383E0EFEBF0E011928A95E0 |
:10098000E9F71092BD001092BC0008958091BF005D |
:10099000803531F48091C000873411F481E048C083 |
:1009A0008091BF00873439F48091C000863519F4F6 |
:1009B000109262003FC08091BF00843431F4809176 |
:1009C000C000863411F483E033C08091BF008334CB |
:1009D00031F48091C000823511F482E029C0809109 |
:1009E000BF00853431F48091C000843511F484E077 |
:1009F0001FC08091BF00833531F48091C0008D34D9 |
:100A000011F486E015C08091BF00843431F48091E8 |
:100A1000C000843511F485E00BC08091BF008235A1 |
:100A200031F48091C000833511F487E001C089E082 |
:100A30008093620083E0EFEBF0E011928A95E9F792 |
:100A40001092BD001092BC00089581E46ED083E442 |
:100A50006CD08BE46AD08DE068D008958EE465D0C8 |
:100A600083E463D08BE461D08DE05FD00895DC0136 |
:100A70006623A9F0F89461506F3F81F024E932E0D9 |
:100A80009091BA00F901E90FF11D8D918083892FB2 |
:100A90008F5F8F738093BA00615090F778940895B8 |
:100AA0000F931F93CF938C01C62FC150CF3F31F0CE |
:100AB000F80181918F0154D0C150D0F7CF911F918F |
:100AC0000F9108959091BA008091BB00981741F062 |
:100AD0001AD046D09091BA008091BB009817C1F708 |
:100AE0000895F8942091B90084E792E0FC01E20FA8 |
:100AF000F11D9081822F8F5F8F718093B900789460 |
:100B0000892F99270895F8942091BB0084E992E0F9 |
:100B1000FC01E20FF11D9081822F8F5F8F73809314 |
:100B2000BB007894892F99270895382FF894209145 |
:100B3000BA0084E992E0FC01E20FF11D3083822FBC |
:100B40008F5F8F738093BA007894089510BC82E110 |
:100B500089B988E98AB986E880BD82E08BB90895B1 |
:100B60005D9BFECF8CB908951F920F920FB60F9226 |
:100B700011242F938F939F93EF93FF932091B800AD |
:100B800084E792E0FC01E20FF11D8CB180832F5FBE |
:100B90002F712093B800209170008CE692E0FC0148 |
:100BA000E20FF11D81E08083280F277020937000F1 |
:100BB000FF91EF919F918F912F910F900FBE0F900A |
:100BC0001F90189511B888E480B90895982F8091E6 |
:100BD00008018823E4F306B604FCFDCF90930301DB |
:100BE0007093050160930401409307011092060180 |
:100BF0001092090185EA86BF809108018068809380 |
:100C000008010895982F809108018823E4F39093B8 |
:100C1000030170930501609304014093070181E093 |
:100C2000809306011092090185EA86BF8091080130 |
:100C3000806880930801089590E0809108018823DE |
:100C40000CF491E0892F992708951F920F920FB607 |
:100C50000F9211248F939F93AF93BF93EF93FF93C2 |
:100C600081B1887F9927AA27BB27FC013897E135F6 |
:100C7000F10508F06DC0ED5EFF4F09948091090108 |
:100C8000833008F05DC080910301982F990F809107 |
:100C90000601890F83B986B78F7D4AC0109209017A |
:100CA00011C0809109018F5F8093090186B7806B25 |
:100CB0003FC0809107018150809307018091070117 |
:100CC0008823F1F1E0910401F0910501808183B95D |
:100CD000CF010196909305018093040109C0809192 |
:100CE0000701815080930701809107018823D9F47F |
:100CF00086B780681DC0E0910401F091050183B1C1 |
:100D000080838091040190910501019690930501E3 |
:100D100080930401809107018150809307018091A5 |
:100D20000701882319F086B7806C02C086B78F7BD5 |
:100D300086BF0EC0E0910401F091050183B180836C |
:100D400086B7806986BF809108018F7780930801FC |
:100D5000FF91EF91BF91AF919F918F910F900FBE37 |
:100D60000F901F90189560E284E10ED060E489E353 |
:100D70000BD068E282E108D065E088E205D061E04E |
:100D800083E102D006D00895282F362FC9012FD035 |
:100D90000895CF93DF93CDB7DEB722970FB6F894BF |
:100DA000DEBF0FBECDBF90910A0180910B01981755 |
:100DB000A9F037D089839A8342E0BE016F5F7F4FED |
:100DC00080E604DF84E690E03ED036DF8130E9F350 |
:100DD00090910A0180910B01981759F722960FB64E |
:100DE000F894DEBF0FBECDBFDF91CF9108959C0177 |
:100DF00051E040910A01842F9927880F991FFC0127 |
:100E0000EC52FD4F20833183842F850F87708093B0 |
:100E10000A0190910B01891709F450E0852F992759 |
:100E2000089540910B01842F9927880F991FFC0189 |
:100E3000EC52FD4F20813181842F8F5F877080932A |
:100E40000B01C9010895CF93DF93CDB7DEB7249787 |
:100E50000FB6F894DEBF0FBECDBF9C0119821A8277 |
:100E60001B821C8219821A8289819A8182179307B8 |
:100E7000E0F41B821C828B819C81885E934058F435 |
:100E800000008B819C8101968B839C838B819C814C |
:100E9000885E9340A8F389819A81019689839A8319 |
:100EA00089819A818217930720F324960FB6F894CC |
:100EB000DEBF0FBECDBFDF91CF9108951F938E9AF5 |
:100EC000969A84EF91E0BFDF1FEB82B3812382BB50 |
:100ED00084EF91E0B8DF969A84EF91E0B4DF82B3BB |
:100EE000812382BB84EF91E0AEDF969A84EF91E09C |
:100EF000AADF82B3812382BB84EF91E0A4DF969ABC |
:100F00001F910895969A96988895E6F13EB53760B8 |
:100F10003EBD00E010E520E0B92FA82FF72FE62F07 |
:100F2000D72F39B7346039BF30E54FEF4DBD3CBDE9 |
:100F3000C62F3BB730683BBF969A889596983BB7CB |
:100F40003F773BBF00000000E6B3C3B3CF703081F2 |
:100F5000E6B3488950A13423352376F03217A1F344 |
:100F6000969A00009698412F0CB5102F041B2D93D4 |
:100F70000D93232F0000E8CF0FEF011B03953D9346 |
:100F80000C9300C03EB5387F3EBD969A9698E89483 |
:100F90000895969A96988895AEF3B92FA82FD72FD3 |
:100FA000C62F30E54FEF4DBD3CBD3EB537603EBD71 |
:100FB000000039B7346039BF3BB730683BBF969A01 |
:100FC000889596983BB73F773BBF000033B346B355 |
:100FD0003D934993DEF7D6CF18951895309172005E |
:100FE000316030937200689418951895FC01882739 |
:100FF0009927E89421912223E9F02032D9F329306E |
:10100000C9F32A30B9F32C30A9F32D3099F32637E0 |
:1010100089F32B3219F02D3221F468942191222387 |
:1010200049F020333CF02A332CF420532FD0820F88 |
:10103000911DF4CF8115910521F01EF480959095B6 |
:1010400001960895E199FECF9FBB8EBBE09A992748 |
:101050008DB308954115510569F0DC01E199FECF8A |
:101060007FBB6EBBE09A6F5F7F4F0DB20D92415018 |
:101070005040B1F70895E199FECF9FBB8EBB6DBB89 |
:101080000FB6F894E29AE19A0FBE08957AE0979F1E |
:0E109000902D879F802D910D11240895FFCF84 |
:10109E0078000841565263616D2076312E340D0072 |
:1001400085BFE0E0F3E080E3DF01982F1D929A95F0 |
:10015000E9F7A1E0B0E0182EA0D70895CFE5D4E0EC |
:10016000DEBFCDBFCFD6F4D42BD5CADF78947ED6F0 |
:100170008AD337D288EE93E08AD611D080E090E01F |
:100180009DC7F89490917000ECE6F2E0E90FF11D44 |
:1001900080839F5F9770909370007894089580910A |
:1001A0007200882399F080FF07C0F8948E7F8093B7 |
:1001B00072007894B6D0FFD28091720081FF06C0A1 |
:1001C000F8948D7F80937200789412D22091710000 |
:1001D00080917000821719F3F894E22FFF27E459F9 |
:1001E000FD4F9081822F8F5F87708093710078948C |
:1001F000892F9927803131F1813168F48230C9F03B |
:10020000833018F4813059F62BC0843031F18830B6 |
:1002100009F0C5CF1FC0803879F0813820F48032D2 |
:1002200009F0BDCF14C0813851F0803909F0B7CF43 |
:100230001CC082E02ED2B3CF80E82BD2B0CF81E8B1 |
:1002400028D2ADCF80E125D280E175D4A8CF80E25D |
:1002500020D2A5CF88E01DD2A2CF84E01AD29FCFB2 |
:1002600081E069D481E015D29ACF80E964D497CF38 |
:10027000DF92EF92FF920F931F93CF93DF93209122 |
:1002800060003091610080917300882309F43FC0C1 |
:10029000E9018AE05CD28091730059D2DD248F811C |
:1002A000813069F588818038E1F0803411F481E093 |
:1002B00019C0803211F482E015C0803111F483E05E |
:1002C00011C0883011F484E00DC0843011F485E051 |
:1002D00009C0823011F486E005C0813011F487E056 |
:1002E00001C080E01B810C81FD80EE8030D2812F27 |
:1002F0002ED2802F2CD28F2D2AD28E2D28D2D3947D |
:1003000088E0D81611F02896CACF8FEF20D284E06B |
:1003100038DFDF91CF911F910F91FF90EF90DF9029 |
:1003200008952F923F924F925F926F927F928F9299 |
:100330009F92AF92BF92CF92DF92EF92FF920F9374 |
:100340001F93CF93DF93CDB7DEB721970FB6F89405 |
:10035000DEBF0FBECDBF00916000109161008091A3 |
:100360007400823009F06AC08BE0FCD38091750084 |
:10037000F9D30F2EFCEBCF2EF1E0DF2EF02D00E0B5 |
:1003800010E00F2EFCE0EF2EF1E0FF2EF02DF60135 |
:100390008081898389818F70898389818295807F1B |
:1003A00089839981F70180818F70892B8983898165 |
:1003B000D9D3D8011196FD01E45FFE4F8081898376 |
:1003C00089818F70898389818295807F89839981D2 |
:1003D000A454BE4F8C918F70892B89838981C2D39D |
:1003E00082E090E0C80ED91E0E5F1F4FE80EF91E86 |
:1003F000003B110561F68FE0B5D3809175008F5FEA |
:1004000080937500883460F010927500109274002B |
:1004100089B78B7F89BF60E081E1E9D4EDD4C8C0A2 |
:1004200080917200826080937200C2C080E2A9DE77 |
:1004300089B78B7F89BF10927600BAC0813009F0EE |
:10044000B7C0F0907600CF2CDD2436010894610807 |
:100450007108709173000F2EFCEB2F2EF1E03F2EF0 |
:10046000F02D50E040E061E0EF2CE394F1013081A9 |
:10047000560F618182E090E0280E391E460F33232B |
:1004800009F45CC0643008F459C0D80120E08C91B4 |
:100490003817C9F5FD0187818130A9F50F2EF6E0E7 |
:1004A000AF2EBB24F02DAA0EBB1E86819927861580 |
:1004B000970549F52D010894411C511C8181882420 |
:1004C0009924689481F88A0E9B1E9281581710F027 |
:1004D000951740F4481710F0941720F4851798F0FA |
:1004E000491788F0F2015083F4014083FD018381B4 |
:1004F000581708F45383FD018581841708F4458358 |
:10050000F501F0821BC02F5F283009F44DC018960A |
:10051000BECFD80190E0FD018781882321F0189695 |
:100520009F5F9830C1F73C93FD0151834283538311 |
:10053000F4824583F68281E087837F5F403B08F445 |
:1005400095CF70937300C60187709070079701F57F |
:10055000D801179640E08C918130A1F4FD013197CC |
:100560009081FD0133978081292F3327F901E81B02 |
:10057000F10933973CF4C601821B930B039714F0E7 |
:100580001C9271504F5F1896483029F77093730092 |
:10059000E0927600F0E9EF1609F448CF80917200FE |
:1005A00082608093720004C0783008F4B2CFC6CF66 |
:1005B00021960FB6F894DEBF0FBECDBFDF91CF916D |
:1005C0001F910F91FF90EF90DF90CF90BF90AF9071 |
:1005D0009F908F907F906F905F904F903F902F9063 |
:1005E000089580E4E8E7F0E011928A95E9F708952C |
:1005F00080917400823049F580917500282F220F78 |
:1006000080EBECEBF1E0982F11929A95E9F7ECE092 |
:10061000F1E011928A95E9F7829BFECF829B07C099 |
:10062000FDCF90E0849BFECF849B04C0FDCF2223AE |
:10063000C1F705C09150822F8195981799F76CE00A |
:1006400071E08CEB91E0C3D40895813039F4849942 |
:10065000FECF60E073E08CEB91E072D4089580915E |
:1006600074008130A9F41092760080917300809319 |
:1006700077001092730080E4E8E7F0E011928A9529 |
:10068000E9F7829BFECF60E073E08CEB91E058D4F9 |
:100690000895843019F1853028F4813009F18230D1 |
:1006A00041F507C0803899F0813809F1803209F5A9 |
:1006B00013C061E081E19BD39FD388EE93E0E7D341 |
:1006C0001092750082E08093740092DF089581E0BB |
:1006D00080937400C4DF0895CBDD0895C0DF0895D2 |
:1006E00080917400882329F084E04BDD08951092F6 |
:1006F00074000895DC01862F6623C9F0F8946150D8 |
:100700006F3FA1F0262F44E952E0861B682F62500C |
:100710008091BA00FA01E80FF11D9D9190838F5FDF |
:100720008F738093BA002150621791F778940895DF |
:10073000F8949091BB00E4E9F2E0E90FF11D8081AB |
:100740009F5F9F739093BB00789499270895F894C6 |
:100750009091BA00E4E9F2E0E90FF11D80839F5F18 |
:100760009F739093BA00789408959091BA00809105 |
:10077000BB00981741F0DCDFF5D19091BA00809171 |
:10078000BB009817C1F708950F931F93CF93DF9382 |
:10079000EC01862F61506F3F49F0162F861B082F02 |
:1007A00002508991DFD111500117D9F7DF91CF9114 |
:1007B0001F910F9108959091BA008091BB009817F6 |
:1007C00011F0B6DFCFD108959091BF00903541F47C |
:1007D0008091C000873409F581E08093620048C0B1 |
:1007E000973439F48091C000863509F51092620083 |
:1007F0003FC0943441F48091C000863411F583E009 |
:100800008093620035C0933441F48091C0008235FA |
:1008100011F582E0809362002BC0953441F4809101 |
:10082000C000843511F584E08093620021C09335C7 |
:1008300041F48091C0008D34C1F486E08093620061 |
:1008400017C0943441F48091C000843571F485E080 |
:10085000809362000DC0923541F48091C0008335D1 |
:1008600021F487E08093620003C089E080936200F6 |
:1008700083E0EFEBF0E011928A95E9F71092BE0069 |
:100880001092BD0008951092BF001092C000109207 |
:10089000C1001092C20080E4E3ECF0E0982F1192C6 |
:1008A0009A95E9F7E4E9F2E011928A95E9F780E296 |
:1008B000E4E7F2E011928A95E9F708958FEB90E072 |
:1008C000B0D39C018F3F910569F060F089E080937F |
:1008D00062008091BC00E3ECF0E0E80FF11D8FEFC7 |
:1008E000808307C08091BC00E3ECF0E0E80FF11DCD |
:1008F000208383E0EFEBF0E011928A95E9F7109204 |
:10090000BE001092BD000895FF920F931F93CF93E6 |
:10091000DF930F2EF9E0FF2EF02DFFC0F894E22FA9 |
:10092000FF27EC58FD4F9081822F8F5F8F7180934E |
:10093000B90078949D3009F0B1C08091BC00882343 |
:1009400011F442DF06C0BADF8091BC008F5F809354 |
:10095000BC0084E690E09BD2809162008850823097 |
:1009600058F48EE4F4DE83E4F2DE8BE4F0DE8DE016 |
:10097000EEDE80E906DC89C081E4E9DE83E4E7DEBF |
:100980008BE4E5DE8DE0E3DE80E9FBDB8091620055 |
:10099000813009F47AC0882371F480916300882340 |
:1009A00009F473C0C3E6D0E02196D1DE88818823A4 |
:1009B00009F46BC0F9CF873011F4A1DB66C0833036 |
:1009C00031F484E690E063D282E0DBDB5EC082300B |
:1009D00099F48091BC00823068F011E0E12FFF278C |
:1009E000ED53FF4F6181808102D21E5F8091BC0078 |
:1009F0001817A0F301D249C0843031F484E690E0A6 |
:100A000046D280E8BEDB41C0853019F481E8B9DB0D |
:100A10003CC0863009F039C08091BC00882309F4BD |
:100A200034C040E003EC10E060E073E0842F9927CD |
:100A30009C012F5F3F4FF901E00FF11FE081EC01B6 |
:100A4000C60FD71FE883D90120D3802DE817C1F046 |
:100A5000D9010E2E27D3D90118D3802D988198174C |
:100A600079F0D901092E1ED3D9010FD3802D988199 |
:100A7000981731F0D901092E15D3D90106D3802D4D |
:100A80004F5F8091BC00481788F21092BC0080E450 |
:100A9000E3ECF0E011928A95E9F73FC09032F1F46F |
:100AA0008091BC00882339F48FDE8091BC008F5F79 |
:100AB0008093BC0032C09927CF974CF01092BD00B4 |
:100AC0001092BE001092BC00F092620026C0F6DECA |
:100AD0008091BC008F5F8093BC001FC0892F815420 |
:100AE0008A3118F08F5E8A30B0F48091BE00E82F12 |
:100AF000FF27E154FF4F90839091BD009F5F90933B |
:100B0000BD008F5F8093BE00943038F0F092620099 |
:100B10001092BE0002C0F09262002091B900809154 |
:100B2000B800821709F0FACEE894DF91CF911F91B7 |
:100B30000F91FF900895803129F0803939F081308C |
:100B400031F402C038DE0895DFDE08950EDE089528 |
:100B500010BC82E189B988E98AB986E880BD82E063 |
:100B60008BB908955D9BFECF8CB908951F920F92AB |
:100B70000FB60F9211248F939F93EF93FF93809161 |
:100B8000B8009CB1E4E7F2E0E80FF11D90838F5FBD |
:100B90008F718093B80080917000ECE6F2E0E80F6E |
:100BA000F11D91E090838F5F877080937000FF91BB |
:100BB000EF919F918F910F900FBE0F901F901895FE |
:100BC00011B888E480B90895982F8091080188238E |
:100BD000E4F306B604FCFDCF909303017093050186 |
:100BE00060930401409307011092060110920901DD |
:100BF00085EA86BF80910801806880930801089586 |
:100C0000982F809108018823E4F390930301709357 |
:100C10000501609304014093070181E08093060180 |
:100C20001092090185EA86BF80910801806880934F |
:100C30000801089580910801881F8827881F992737 |
:100C400008951F920F920FB60F9211248F939F93C6 |
:100C5000AF93BF93EF93FF9381B19927AA27BB2747 |
:100C6000887F9070A070B070FC013897E135F10575 |
:100C700008F09AC0ED5EFF4F09948091090183301E |
:100C800048F086B7806986BF809108018F7780938E |
:100C900008018AC08091030190910601880F890F95 |
:100CA00083B986B78F7D86BF7FC010920901E0911E |
:100CB0000401F0910501808183B93196F09305011B |
:100CC000E093040186B7806886BF6EC080910901F9 |
:100CD0008F5F8093090186B7806B86BF65C0809166 |
:100CE000070181508093070180910701882379F0E3 |
:100CF000E0910401F0910501808183B93196F09370 |
:100D00000501E093040186B7806886BF4DC086B7B1 |
:100D1000806986BF809108018F778093080144C065 |
:100D200086B7806986BF809108018F77809308011C |
:100D30003BC080910701815080930701809107019A |
:100D4000882321F086B7806C86BF2EC086B7806866 |
:100D500086BF2AC0E0910401F091050183B1808330 |
:100D60003196F0930501E0930401809107018150D1 |
:100D70008093070180910701882321F086B7806C5A |
:100D800086BF12C086B78F7B86BF0EC0E09104017C |
:100D9000F091050183B1808386B7806986BF809119 |
:100DA00008018F7780930801FF91EF91BF91AF9178 |
:100DB0009F918F910F900FBE0F901F9018952091CB |
:100DC0000A01E22FFF27EE0FFF1FEC52FD4F918328 |
:100DD00080832F5F277020930A0190E080910B01A0 |
:100DE000281709F491E081E0892799270895282F91 |
:100DF000362FC901E4DF08950F931F93CF93DF933C |
:100E0000CDB7DEB722970FB6F894DEBF0FBECDBFC9 |
:100E10008E010F5F1F4F19C0E32FFF27EE0FFF1F3B |
:100E2000EC52FD4F91812081832F8F5F87708093DB |
:100E30000B019A83298342E0B80180E6C5DE84E68F |
:100E400090E025D0F7DE8130E9F330910B018091FD |
:100E50000A01831709F722960FB6F894DEBF0FBE7A |
:100E6000CDBFDF91CF911F910F91089560E284E192 |
:100E7000BEDF60E489E3BBDF68E282E1B8DF65E002 |
:100E800088E2B5DF61E083E1B2DFB6DF0895CF939A |
:100E9000DF93CDB7DEB724970FB6F894DEBF0FBE51 |
:100EA000CDBF9C011A8219821C821B821A82198270 |
:100EB00089819A8182179307E0F41C821B828B81BF |
:100EC0009C81885E934058F400008B819C81019640 |
:100ED0009C838B838B819C81885E9340A8F389815E |
:100EE0009A8101969A83898389819A8182179307CF |
:100EF00020F324960FB6F894DEBF0FBECDBFDF916E |
:100F0000CF9108958E9A969A84EF91E0C0DF9698DB |
:100F100084EF91E0BCDF969A84EF91E0B8DF969879 |
:100F200084EF91E0B4DF969A84EF91E0B0DF969879 |
:100F300084EF91E0ACDF969A0895969A96988895FA |
:100F4000E6F13EB537603EBD00E010E520E0B92F88 |
:100F5000A82FF72FE62FD72F39B7346039BF30E5E8 |
:100F60004FEF4DBD3CBDC62F3BB730683BBF969A97 |
:100F7000889596983BB73F773BBF00000000E6B3EB |
:100F8000C3B3CF703081E6B3488950A134233523F1 |
:100F900076F03217A1F3969A00009698412F0CB57F |
:100FA000102F041B2D930D93232F0000E8CF0FEF7C |
:100FB000011B03953D930C9300C03EB5387F3EBDA9 |
:100FC000969A9698E8940895969A96988895AEF38E |
:100FD000B92FA82FD72FC62F30E54FEF4DBD3CBD01 |
:100FE0003EB537603EBD000039B7346039BF3BB70E |
:100FF00030683BBF969A889596983BB73F773BBF42 |
:10100000000033B346B33D934993DEF7D6CF18952E |
:101010001895309172003160309372006894189581 |
:101020001895FC0188279927E89421912223E9F05B |
:101030002032D9F32930C9F32A30B9F32C30A9F37F |
:101040002D3099F3263789F32B3219F02D3221F404 |
:1010500068942191222349F020333CF02A332CF468 |
:1010600020530BD0820F911DF4CF8115910521F0F3 |
:101070001EF480959095019608957AE0979F902DA3 |
:10108000879F802D910D11240895E199FECFBFBB5C |
:10109000AEBBE09A11960DB20895F7DF01921A9453 |
:1010A000E1F70895E199FECFBFBBAEBB0DBA119633 |
:0E10B0000FB6F894E29AE19A0FBE0895FFCFB2 |
:1010BE0078000841565263616D2076312E340D0052 |
:00000001FF |
/programy/Atmel_C/AVRcam/AVRcam.lss |
---|
1,1747 → 1,1402 |
AVRcam.elf: file format elf32-avr |
Sections: |
Idx Name Size VMA LMA File off Algn |
0 .noinit 00000030 00800300 00800300 00001162 2**0 |
ALLOC |
1 .bss 00000274 00800070 00800070 00001162 2**0 |
ALLOC |
2 .data 00000010 00800060 0000109e 00001152 2**0 |
CONTENTS, ALLOC, LOAD, DATA |
3 .text 0000109e 00000000 00000000 000000b4 2**1 |
CONTENTS, ALLOC, LOAD, READONLY, CODE |
4 .eeprom 00000000 00810000 00810000 00001162 2**0 |
CONTENTS |
5 .stab 00003f30 00000000 00000000 00001164 2**2 |
CONTENTS, READONLY, DEBUGGING |
6 .stabstr 0000181e 00000000 00000000 00005094 2**0 |
CONTENTS, READONLY, DEBUGGING |
Disassembly of section .text: |
00000000 <__vectors>: |
0: 63 c0 rjmp .+198 ; 0xc8 |
2: ea c7 rjmp .+4052 ; 0xfd8 |
4: ea c7 rjmp .+4052 ; 0xfda |
6: 7a c0 rjmp .+244 ; 0xfc |
8: 79 c0 rjmp .+242 ; 0xfc |
a: 78 c0 rjmp .+240 ; 0xfc |
c: 77 c0 rjmp .+238 ; 0xfc |
e: 76 c0 rjmp .+236 ; 0xfc |
10: e5 c7 rjmp .+4042 ; 0xfdc |
12: 74 c0 rjmp .+232 ; 0xfc |
14: 73 c0 rjmp .+230 ; 0xfc |
16: a8 c5 rjmp .+2896 ; 0xb68 |
18: 71 c0 rjmp .+226 ; 0xfc |
1a: 70 c0 rjmp .+224 ; 0xfc |
1c: 6f c0 rjmp .+222 ; 0xfc |
1e: 6e c0 rjmp .+220 ; 0xfc |
20: 6d c0 rjmp .+218 ; 0xfc |
22: 13 c6 rjmp .+3110 ; 0xc4a |
24: 6b c0 rjmp .+214 ; 0xfc |
00000026 <__ctors_end>: |
26: 2a c6 rjmp .+3156 ; 0xc7c |
28: 93 c6 rjmp .+3366 ; 0xd50 |
2a: 92 c6 rjmp .+3364 ; 0xd50 |
2c: 91 c6 rjmp .+3362 ; 0xd50 |
2e: 90 c6 rjmp .+3360 ; 0xd50 |
30: 8f c6 rjmp .+3358 ; 0xd50 |
32: 8e c6 rjmp .+3356 ; 0xd50 |
34: 8d c6 rjmp .+3354 ; 0xd50 |
36: 22 c6 rjmp .+3140 ; 0xc7c |
38: 8b c6 rjmp .+3350 ; 0xd50 |
3a: 8a c6 rjmp .+3348 ; 0xd50 |
3c: 89 c6 rjmp .+3346 ; 0xd50 |
3e: 88 c6 rjmp .+3344 ; 0xd50 |
40: 87 c6 rjmp .+3342 ; 0xd50 |
42: 86 c6 rjmp .+3340 ; 0xd50 |
44: 85 c6 rjmp .+3338 ; 0xd50 |
46: 2a c6 rjmp .+3156 ; 0xc9c |
48: 83 c6 rjmp .+3334 ; 0xd50 |
4a: 82 c6 rjmp .+3332 ; 0xd50 |
4c: 81 c6 rjmp .+3330 ; 0xd50 |
4e: 80 c6 rjmp .+3328 ; 0xd50 |
50: 7f c6 rjmp .+3326 ; 0xd50 |
52: 7e c6 rjmp .+3324 ; 0xd50 |
54: 7d c6 rjmp .+3322 ; 0xd50 |
56: 25 c6 rjmp .+3146 ; 0xca2 |
58: 7b c6 rjmp .+3318 ; 0xd50 |
5a: 7a c6 rjmp .+3316 ; 0xd50 |
5c: 79 c6 rjmp .+3314 ; 0xd50 |
5e: 78 c6 rjmp .+3312 ; 0xd50 |
60: 77 c6 rjmp .+3310 ; 0xd50 |
62: 76 c6 rjmp .+3308 ; 0xd50 |
64: 75 c6 rjmp .+3306 ; 0xd50 |
66: 25 c6 rjmp .+3146 ; 0xcb2 |
68: 73 c6 rjmp .+3302 ; 0xd50 |
6a: 72 c6 rjmp .+3300 ; 0xd50 |
6c: 71 c6 rjmp .+3298 ; 0xd50 |
6e: 70 c6 rjmp .+3296 ; 0xd50 |
70: 6f c6 rjmp .+3294 ; 0xd50 |
72: 6e c6 rjmp .+3292 ; 0xd50 |
74: 6d c6 rjmp .+3290 ; 0xd50 |
76: 64 c6 rjmp .+3272 ; 0xd40 |
78: 6b c6 rjmp .+3286 ; 0xd50 |
7a: 6a c6 rjmp .+3284 ; 0xd50 |
7c: 69 c6 rjmp .+3282 ; 0xd50 |
7e: 68 c6 rjmp .+3280 ; 0xd50 |
80: 67 c6 rjmp .+3278 ; 0xd50 |
82: 66 c6 rjmp .+3276 ; 0xd50 |
84: 65 c6 rjmp .+3274 ; 0xd50 |
86: 64 c6 rjmp .+3272 ; 0xd50 |
88: 63 c6 rjmp .+3270 ; 0xd50 |
8a: 62 c6 rjmp .+3268 ; 0xd50 |
8c: 61 c6 rjmp .+3266 ; 0xd50 |
8e: 60 c6 rjmp .+3264 ; 0xd50 |
90: 5f c6 rjmp .+3262 ; 0xd50 |
92: 5e c6 rjmp .+3260 ; 0xd50 |
94: 5d c6 rjmp .+3258 ; 0xd50 |
96: 23 c6 rjmp .+3142 ; 0xcde |
98: 5b c6 rjmp .+3254 ; 0xd50 |
9a: 5a c6 rjmp .+3252 ; 0xd50 |
9c: 59 c6 rjmp .+3250 ; 0xd50 |
9e: 58 c6 rjmp .+3248 ; 0xd50 |
a0: 57 c6 rjmp .+3246 ; 0xd50 |
a2: 56 c6 rjmp .+3244 ; 0xd50 |
a4: 55 c6 rjmp .+3242 ; 0xd50 |
a6: fd c5 rjmp .+3066 ; 0xca2 |
a8: 53 c6 rjmp .+3238 ; 0xd50 |
aa: 52 c6 rjmp .+3236 ; 0xd50 |
ac: 51 c6 rjmp .+3234 ; 0xd50 |
ae: 50 c6 rjmp .+3232 ; 0xd50 |
b0: 4f c6 rjmp .+3230 ; 0xd50 |
b2: 4e c6 rjmp .+3228 ; 0xd50 |
b4: 4d c6 rjmp .+3226 ; 0xd50 |
b6: 1f c6 rjmp .+3134 ; 0xcf6 |
b8: 4b c6 rjmp .+3222 ; 0xd50 |
ba: 4a c6 rjmp .+3220 ; 0xd50 |
bc: 49 c6 rjmp .+3218 ; 0xd50 |
be: 48 c6 rjmp .+3216 ; 0xd50 |
c0: 47 c6 rjmp .+3214 ; 0xd50 |
c2: 46 c6 rjmp .+3212 ; 0xd50 |
c4: 45 c6 rjmp .+3210 ; 0xd50 |
c6: 36 c6 rjmp .+3180 ; 0xd34 |
000000c8 <__init>: |
c8: 11 24 eor r1, r1 |
ca: 1f be out 0x3f, r1 ; 63 |
cc: cf e5 ldi r28, 0x5F ; 95 |
ce: d4 e0 ldi r29, 0x04 ; 4 |
d0: de bf out 0x3e, r29 ; 62 |
d2: cd bf out 0x3d, r28 ; 61 |
000000d4 <__do_copy_data>: |
d4: 10 e0 ldi r17, 0x00 ; 0 |
d6: a0 e6 ldi r26, 0x60 ; 96 |
d8: b0 e0 ldi r27, 0x00 ; 0 |
da: ee e9 ldi r30, 0x9E ; 158 |
dc: f0 e1 ldi r31, 0x10 ; 16 |
de: 02 c0 rjmp .+4 ; 0xe4 |
000000e0 <.do_copy_data_loop>: |
e0: 05 90 lpm r0, Z+ |
e2: 0d 92 st X+, r0 |
000000e4 <.do_copy_data_start>: |
e4: a0 37 cpi r26, 0x70 ; 112 |
e6: b1 07 cpc r27, r17 |
e8: d9 f7 brne .-10 ; 0xe0 |
000000ea <__do_clear_bss>: |
ea: 12 e0 ldi r17, 0x02 ; 2 |
ec: a0 e7 ldi r26, 0x70 ; 112 |
ee: b0 e0 ldi r27, 0x00 ; 0 |
f0: 01 c0 rjmp .+2 ; 0xf4 |
000000f2 <.do_clear_bss_loop>: |
f2: 1d 92 st X+, r1 |
000000f4 <.do_clear_bss_start>: |
f4: a4 3e cpi r26, 0xE4 ; 228 |
f6: b1 07 cpc r27, r17 |
f8: e1 f7 brne .-8 ; 0xf2 |
fa: 31 c0 rjmp .+98 ; 0x15e |
000000fc <__bad_interrupt>: |
fc: 76 c7 rjmp .+3820 ; 0xfea |
000000fe <CamInt_init>: |
#endif |
/* set up the mega8 ports that will be interfacing |
with the camera */ |
CAM_CONTROL_PORT_DIR |= (1<<CAM_RESET_LINE); /* cam reset is output */ |
fe: 8f 9a sbi 0x11, 7 ; 17 |
CAM_CONTROL_PORT_DIR |= 0x80; /* set just the MSB as an output */ |
100: 8f 9a sbi 0x11, 7 ; 17 |
CAM_CONTROL_PORT_DIR &= 0xFB; /* make sure bit2 is clear (input) */ |
102: 8a 98 cbi 0x11, 2 ; 17 |
CAM_CONTROL_PORT &= 0x7F; /* set reset line low */ |
104: 97 98 cbi 0x12, 7 ; 18 |
CAM_G_BUS_DIR &= 0xF0; /* 4-bit G bus all inputs */ |
106: 90 ef ldi r25, 0xF0 ; 240 |
108: 87 b3 in r24, 0x17 ; 23 |
10a: 89 23 and r24, r25 |
10c: 87 bb out 0x17, r24 ; 23 |
CAM_G_BUS_DIR |= 0xF0; /* disable the pull-up on PB4 and PB5 */ |
10e: 87 b3 in r24, 0x17 ; 23 |
110: 89 2b or r24, r25 |
112: 87 bb out 0x17, r24 ; 23 |
CAM_RB_BUS_DIR &= 0xF0; /* 4-bit RB bus all inputs */ |
114: 84 b3 in r24, 0x14 ; 20 |
116: 89 23 and r24, r25 |
118: 84 bb out 0x14, r24 ; 20 |
/* ensure that timer1 is disabled to start...eventually, when PCLK needs |
to feed timer1 through the external counter, it will be enabled on an |
"as needed" basis...*/ |
TCCR1B &= ~( (1<<CS12)|(1<<CS11)|(1<<CS10) ); |
11a: 8e b5 in r24, 0x2e ; 46 |
11c: 88 7f andi r24, 0xF8 ; 248 |
11e: 8e bd out 0x2e, r24 ; 46 |
/* we'll turn on the interrupt after we assign the initial TCNT value */ |
/* set up External Interrupt1 to interrupt us on rising edges (HREF)... |
this is needed to indicate when the first pixel of each line is about to start, so |
we can synch up with it...this interrupt will be disabled once HREF goes high */ |
MCUCR |= (1<<ISC11) | (1<<ISC10); /* rising edge interrupt */ |
120: 85 b7 in r24, 0x35 ; 53 |
122: 8c 60 ori r24, 0x0C ; 12 |
124: 85 bf out 0x35, r24 ; 53 |
/* the interrupt will be enabled when we are ready to detect the rising edge of |
HREF...its now primed and ready to go */ |
/* set up External Interrupt0 to interrupt us on rising edges (VSYNC) */ |
MCUCR |= (1<<ISC01) | (1<<ISC00); /* rising edge interrupt */ |
126: 85 b7 in r24, 0x35 ; 53 |
128: 83 60 ori r24, 0x03 ; 3 |
12a: 85 bf out 0x35, r24 ; 53 |
GICR |= (1<<INT0); /* interrupt request enabled */ |
12c: 8b b7 in r24, 0x3b ; 59 |
12e: 80 64 ori r24, 0x40 ; 64 |
130: 8b bf out 0x3b, r24 ; 59 |
/* set up TimerO to count and be clocked from an external pulse source |
(HREF) on falling edges...eventually, we need to enable the interrupt |
for this! FIX THIS */ |
TCCR0 = (1<<CS02)|(1<<CS01)|(0<<CS00); |
132: 86 e0 ldi r24, 0x06 ; 6 |
134: 83 bf out 0x33, r24 ; 51 |
/* setting up the PCLK counter with Timer1 will be done right after |
we start receiving pixels in each line...we sacrifice the first pixel |
in each line, but we'll account for it...*/ |
/* set up the mega8 so that its sleep mode puts it in an IDLE sleep |
mode, where it can wake up as fast as possible */ |
set_sleep_mode(SLEEP_MODE_IDLE); |
136: 85 b7 in r24, 0x35 ; 53 |
138: 8f 78 andi r24, 0x8F ; 143 |
13a: 85 bf out 0x35, r24 ; 53 |
/* umm....we need to actually enable the sleep mode...*/ |
MCUCR |= 0x80; |
13c: 85 b7 in r24, 0x35 ; 53 |
13e: 80 68 ori r24, 0x80 ; 128 |
140: 85 bf out 0x35, r24 ; 53 |
/* initialize the memLookup table */ |
memset(colorMap,0x00,NUM_ELEMENTS_IN_COLOR_MAP); |
142: 80 e0 ldi r24, 0x00 ; 0 |
144: 93 e0 ldi r25, 0x03 ; 3 |
146: 20 e3 ldi r18, 0x30 ; 48 |
148: fc 01 movw r30, r24 |
14a: 11 92 st Z+, r1 |
14c: 2a 95 dec r18 |
14e: e9 f7 brne .-6 ; 0x14a |
/* read the color map out of EEPROM */ |
eeprom_read_block(colorMap, (unsigned char*)0x01,NUM_ELEMENTS_IN_COLOR_MAP); |
150: 40 e3 ldi r20, 0x30 ; 48 |
152: 50 e0 ldi r21, 0x00 ; 0 |
154: 61 e0 ldi r22, 0x01 ; 1 |
156: 70 e0 ldi r23, 0x00 ; 0 |
158: 7d d7 rcall .+3834 ; 0x1054 |
#if OUTPUT_INITIAL_COLOR_MAP |
UIMgr_txBuffer("\r\n",2); |
for (i=0; i<NUM_ELEMENTS_IN_COLOR_MAP; i++) |
{ |
memset(asciiBuffer,0x00,5); |
itoa(colorMap[i],asciiBuffer,10); |
UIMgr_txBuffer(asciiBuffer,3); |
UIMgr_txBuffer(" ",1); |
if (i==15 || i == 31) |
{ |
/* break up the output */ |
UIMgr_txBuffer("\r\n",2); |
} |
} |
#endif |
#ifndef NO_CRYSTAL |
CamInt_resetCam(); |
#endif |
} |
15a: 08 95 ret |
0000015c <CamInt_resetCam>: |
/*********************************************************** |
Function Name: CamInt_resetCam |
Function Description: This function is responsible |
for resetting the camera. This is accomplished by |
toggling the reset line on the OV6620 for ~100 mS. |
Inputs: none |
Outputs: none |
IMPORTANT NOTE: This function has effectively been removed |
since resetting the camera now causes the camera to not |
AVRcam.elf: file format elf32-avr |
Sections: |
Idx Name Size VMA LMA File off Algn |
0 .noinit 00000030 00800300 00800300 00001182 2**0 |
ALLOC |
1 .bss 00000274 00800070 00800070 00001182 2**0 |
ALLOC |
2 .data 00000010 00800060 000010be 00001172 2**0 |
CONTENTS, ALLOC, LOAD, DATA |
3 .text 000010be 00000000 00000000 000000b4 2**1 |
CONTENTS, ALLOC, LOAD, READONLY, CODE |
4 .eeprom 00000000 00810000 00810000 00001182 2**0 |
CONTENTS |
5 .stab 00003ed0 00000000 00000000 00001184 2**2 |
CONTENTS, READONLY, DEBUGGING |
6 .stabstr 000017c9 00000000 00000000 00005054 2**0 |
CONTENTS, READONLY, DEBUGGING |
Disassembly of section .text: |
00000000 <__vectors>: |
0: 63 c0 rjmp .+198 ; 0xc8 <__init> |
2: 05 c8 rjmp .-4086 ; 0xfffff00e <__eeprom_end+0xff7ef00e> |
4: 05 c8 rjmp .-4086 ; 0xfffff010 <__eeprom_end+0xff7ef010> |
6: 7a c0 rjmp .+244 ; 0xfc <__bad_interrupt> |
8: 79 c0 rjmp .+242 ; 0xfc <__bad_interrupt> |
a: 78 c0 rjmp .+240 ; 0xfc <__bad_interrupt> |
c: 77 c0 rjmp .+238 ; 0xfc <__bad_interrupt> |
e: 76 c0 rjmp .+236 ; 0xfc <__bad_interrupt> |
10: 00 c8 rjmp .-4096 ; 0xfffff012 <__eeprom_end+0xff7ef012> |
12: 74 c0 rjmp .+232 ; 0xfc <__bad_interrupt> |
14: 73 c0 rjmp .+230 ; 0xfc <__bad_interrupt> |
16: aa c5 rjmp .+2900 ; 0xb6c <__vector_11> |
18: 71 c0 rjmp .+226 ; 0xfc <__bad_interrupt> |
1a: 70 c0 rjmp .+224 ; 0xfc <__bad_interrupt> |
1c: 6f c0 rjmp .+222 ; 0xfc <__bad_interrupt> |
1e: 6e c0 rjmp .+220 ; 0xfc <__bad_interrupt> |
20: 6d c0 rjmp .+218 ; 0xfc <__bad_interrupt> |
22: 0f c6 rjmp .+3102 ; 0xc42 <__vector_17> |
24: 6b c0 rjmp .+214 ; 0xfc <__bad_interrupt> |
00000026 <__ctors_end>: |
26: 29 c6 rjmp .+3154 ; 0xc7a <__vector_17+0x38> |
28: bf c6 rjmp .+3454 ; 0xda8 <__vector_17+0x166> |
2a: be c6 rjmp .+3452 ; 0xda8 <__vector_17+0x166> |
2c: bd c6 rjmp .+3450 ; 0xda8 <__vector_17+0x166> |
2e: bc c6 rjmp .+3448 ; 0xda8 <__vector_17+0x166> |
30: bb c6 rjmp .+3446 ; 0xda8 <__vector_17+0x166> |
32: ba c6 rjmp .+3444 ; 0xda8 <__vector_17+0x166> |
34: b9 c6 rjmp .+3442 ; 0xda8 <__vector_17+0x166> |
36: 21 c6 rjmp .+3138 ; 0xc7a <__vector_17+0x38> |
38: b7 c6 rjmp .+3438 ; 0xda8 <__vector_17+0x166> |
3a: b6 c6 rjmp .+3436 ; 0xda8 <__vector_17+0x166> |
3c: b5 c6 rjmp .+3434 ; 0xda8 <__vector_17+0x166> |
3e: b4 c6 rjmp .+3432 ; 0xda8 <__vector_17+0x166> |
40: b3 c6 rjmp .+3430 ; 0xda8 <__vector_17+0x166> |
42: b2 c6 rjmp .+3428 ; 0xda8 <__vector_17+0x166> |
44: b1 c6 rjmp .+3426 ; 0xda8 <__vector_17+0x166> |
46: 31 c6 rjmp .+3170 ; 0xcaa <__vector_17+0x68> |
48: af c6 rjmp .+3422 ; 0xda8 <__vector_17+0x166> |
4a: ae c6 rjmp .+3420 ; 0xda8 <__vector_17+0x166> |
4c: ad c6 rjmp .+3418 ; 0xda8 <__vector_17+0x166> |
4e: ac c6 rjmp .+3416 ; 0xda8 <__vector_17+0x166> |
50: ab c6 rjmp .+3414 ; 0xda8 <__vector_17+0x166> |
52: aa c6 rjmp .+3412 ; 0xda8 <__vector_17+0x166> |
54: a9 c6 rjmp .+3410 ; 0xda8 <__vector_17+0x166> |
56: 3a c6 rjmp .+3188 ; 0xccc <__vector_17+0x8a> |
58: a7 c6 rjmp .+3406 ; 0xda8 <__vector_17+0x166> |
5a: a6 c6 rjmp .+3404 ; 0xda8 <__vector_17+0x166> |
5c: a5 c6 rjmp .+3402 ; 0xda8 <__vector_17+0x166> |
5e: a4 c6 rjmp .+3400 ; 0xda8 <__vector_17+0x166> |
60: a3 c6 rjmp .+3398 ; 0xda8 <__vector_17+0x166> |
62: a2 c6 rjmp .+3396 ; 0xda8 <__vector_17+0x166> |
64: a1 c6 rjmp .+3394 ; 0xda8 <__vector_17+0x166> |
66: 3b c6 rjmp .+3190 ; 0xcde <__vector_17+0x9c> |
68: 9f c6 rjmp .+3390 ; 0xda8 <__vector_17+0x166> |
6a: 9e c6 rjmp .+3388 ; 0xda8 <__vector_17+0x166> |
6c: 9d c6 rjmp .+3386 ; 0xda8 <__vector_17+0x166> |
6e: 9c c6 rjmp .+3384 ; 0xda8 <__vector_17+0x166> |
70: 9b c6 rjmp .+3382 ; 0xda8 <__vector_17+0x166> |
72: 9a c6 rjmp .+3380 ; 0xda8 <__vector_17+0x166> |
74: 99 c6 rjmp .+3378 ; 0xda8 <__vector_17+0x166> |
76: 54 c6 rjmp .+3240 ; 0xd20 <__vector_17+0xde> |
78: 97 c6 rjmp .+3374 ; 0xda8 <__vector_17+0x166> |
7a: 96 c6 rjmp .+3372 ; 0xda8 <__vector_17+0x166> |
7c: 95 c6 rjmp .+3370 ; 0xda8 <__vector_17+0x166> |
7e: 94 c6 rjmp .+3368 ; 0xda8 <__vector_17+0x166> |
80: 93 c6 rjmp .+3366 ; 0xda8 <__vector_17+0x166> |
82: 92 c6 rjmp .+3364 ; 0xda8 <__vector_17+0x166> |
84: 91 c6 rjmp .+3362 ; 0xda8 <__vector_17+0x166> |
86: 90 c6 rjmp .+3360 ; 0xda8 <__vector_17+0x166> |
88: 8f c6 rjmp .+3358 ; 0xda8 <__vector_17+0x166> |
8a: 8e c6 rjmp .+3356 ; 0xda8 <__vector_17+0x166> |
8c: 8d c6 rjmp .+3354 ; 0xda8 <__vector_17+0x166> |
8e: 8c c6 rjmp .+3352 ; 0xda8 <__vector_17+0x166> |
90: 8b c6 rjmp .+3350 ; 0xda8 <__vector_17+0x166> |
92: 8a c6 rjmp .+3348 ; 0xda8 <__vector_17+0x166> |
94: 89 c6 rjmp .+3346 ; 0xda8 <__vector_17+0x166> |
96: 4d c6 rjmp .+3226 ; 0xd32 <__vector_17+0xf0> |
98: 87 c6 rjmp .+3342 ; 0xda8 <__vector_17+0x166> |
9a: 86 c6 rjmp .+3340 ; 0xda8 <__vector_17+0x166> |
9c: 85 c6 rjmp .+3338 ; 0xda8 <__vector_17+0x166> |
9e: 84 c6 rjmp .+3336 ; 0xda8 <__vector_17+0x166> |
a0: 83 c6 rjmp .+3334 ; 0xda8 <__vector_17+0x166> |
a2: 82 c6 rjmp .+3332 ; 0xda8 <__vector_17+0x166> |
a4: 81 c6 rjmp .+3330 ; 0xda8 <__vector_17+0x166> |
a6: 12 c6 rjmp .+3108 ; 0xccc <__vector_17+0x8a> |
a8: 7f c6 rjmp .+3326 ; 0xda8 <__vector_17+0x166> |
aa: 7e c6 rjmp .+3324 ; 0xda8 <__vector_17+0x166> |
ac: 7d c6 rjmp .+3322 ; 0xda8 <__vector_17+0x166> |
ae: 7c c6 rjmp .+3320 ; 0xda8 <__vector_17+0x166> |
b0: 7b c6 rjmp .+3318 ; 0xda8 <__vector_17+0x166> |
b2: 7a c6 rjmp .+3316 ; 0xda8 <__vector_17+0x166> |
b4: 79 c6 rjmp .+3314 ; 0xda8 <__vector_17+0x166> |
b6: 4e c6 rjmp .+3228 ; 0xd54 <__vector_17+0x112> |
b8: 77 c6 rjmp .+3310 ; 0xda8 <__vector_17+0x166> |
ba: 76 c6 rjmp .+3308 ; 0xda8 <__vector_17+0x166> |
bc: 75 c6 rjmp .+3306 ; 0xda8 <__vector_17+0x166> |
be: 74 c6 rjmp .+3304 ; 0xda8 <__vector_17+0x166> |
c0: 73 c6 rjmp .+3302 ; 0xda8 <__vector_17+0x166> |
c2: 72 c6 rjmp .+3300 ; 0xda8 <__vector_17+0x166> |
c4: 71 c6 rjmp .+3298 ; 0xda8 <__vector_17+0x166> |
c6: 62 c6 rjmp .+3268 ; 0xd8c <__vector_17+0x14a> |
000000c8 <__init>: |
c8: 11 24 eor r1, r1 |
ca: 1f be out 0x3f, r1 ; 63 |
cc: cf e5 ldi r28, 0x5F ; 95 |
ce: d4 e0 ldi r29, 0x04 ; 4 |
d0: de bf out 0x3e, r29 ; 62 |
d2: cd bf out 0x3d, r28 ; 61 |
000000d4 <__do_copy_data>: |
d4: 10 e0 ldi r17, 0x00 ; 0 |
d6: a0 e6 ldi r26, 0x60 ; 96 |
d8: b0 e0 ldi r27, 0x00 ; 0 |
da: ee eb ldi r30, 0xBE ; 190 |
dc: f0 e1 ldi r31, 0x10 ; 16 |
de: 02 c0 rjmp .+4 ; 0xe4 <.do_copy_data_start> |
000000e0 <.do_copy_data_loop>: |
e0: 05 90 lpm r0, Z+ |
e2: 0d 92 st X+, r0 |
000000e4 <.do_copy_data_start>: |
e4: a0 37 cpi r26, 0x70 ; 112 |
e6: b1 07 cpc r27, r17 |
e8: d9 f7 brne .-10 ; 0xe0 <.do_copy_data_loop> |
000000ea <__do_clear_bss>: |
ea: 12 e0 ldi r17, 0x02 ; 2 |
ec: a0 e7 ldi r26, 0x70 ; 112 |
ee: b0 e0 ldi r27, 0x00 ; 0 |
f0: 01 c0 rjmp .+2 ; 0xf4 <.do_clear_bss_start> |
000000f2 <.do_clear_bss_loop>: |
f2: 1d 92 st X+, r1 |
000000f4 <.do_clear_bss_start>: |
f4: a4 3e cpi r26, 0xE4 ; 228 |
f6: b1 07 cpc r27, r17 |
f8: e1 f7 brne .-8 ; 0xf2 <.do_clear_bss_loop> |
fa: 30 c0 rjmp .+96 ; 0x15c <main> |
000000fc <__bad_interrupt>: |
fc: 91 c7 rjmp .+3874 ; 0x1020 <__vector_default> |
000000fe <CamInt_resetCam>: |
output the clock signal. Thus, if we reset the cam, the |
AVR has no clock, and thus doesn't run... |
***********************************************************/ |
void CamInt_resetCam(void) |
{ |
15c: 08 95 ret |
0000015e <main>: |
fe: 08 95 ret |
00000100 <CamInt_init>: |
100: 8f 9a sbi 0x11, 7 ; 17 |
102: 8f 9a sbi 0x11, 7 ; 17 |
104: 8a 98 cbi 0x11, 2 ; 17 |
106: 97 98 cbi 0x12, 7 ; 18 |
108: 87 b3 in r24, 0x17 ; 23 |
10a: 80 7f andi r24, 0xF0 ; 240 |
10c: 87 bb out 0x17, r24 ; 23 |
10e: 87 b3 in r24, 0x17 ; 23 |
110: 80 6f ori r24, 0xF0 ; 240 |
112: 87 bb out 0x17, r24 ; 23 |
114: 84 b3 in r24, 0x14 ; 20 |
116: 80 7f andi r24, 0xF0 ; 240 |
118: 84 bb out 0x14, r24 ; 20 |
11a: 8e b5 in r24, 0x2e ; 46 |
11c: 88 7f andi r24, 0xF8 ; 248 |
11e: 8e bd out 0x2e, r24 ; 46 |
120: 85 b7 in r24, 0x35 ; 53 |
122: 8c 60 ori r24, 0x0C ; 12 |
124: 85 bf out 0x35, r24 ; 53 |
126: 85 b7 in r24, 0x35 ; 53 |
128: 83 60 ori r24, 0x03 ; 3 |
12a: 85 bf out 0x35, r24 ; 53 |
12c: 8b b7 in r24, 0x3b ; 59 |
12e: 80 64 ori r24, 0x40 ; 64 |
130: 8b bf out 0x3b, r24 ; 59 |
132: 86 e0 ldi r24, 0x06 ; 6 |
134: 83 bf out 0x33, r24 ; 51 |
136: 85 b7 in r24, 0x35 ; 53 |
138: 8f 78 andi r24, 0x8F ; 143 |
13a: 85 bf out 0x35, r24 ; 53 |
13c: 85 b7 in r24, 0x35 ; 53 |
13e: 80 68 ori r24, 0x80 ; 128 |
140: 85 bf out 0x35, r24 ; 53 |
142: e0 e0 ldi r30, 0x00 ; 0 |
144: f3 e0 ldi r31, 0x03 ; 3 |
146: 80 e3 ldi r24, 0x30 ; 48 |
148: df 01 movw r26, r30 |
14a: 98 2f mov r25, r24 |
14c: 1d 92 st X+, r1 |
14e: 9a 95 dec r25 |
150: e9 f7 brne .-6 ; 0x14c <CamInt_init+0x4c> |
/* Needed in order to truncate to 8 bit. */ |
uint8_t len; |
len = (uint8_t) n; |
asm volatile ( |
152: a1 e0 ldi r26, 0x01 ; 1 |
154: b0 e0 ldi r27, 0x00 ; 0 |
156: 18 2e mov r1, r24 |
158: a0 d7 rcall .+3904 ; 0x109a <__eeprom_read_block_1C1D1E> |
15a: 08 95 ret |
0000015c <main>: |
Inputs: none |
Outputs: int |
***********************************************************/ |
int main(void) |
{ |
15e: cf e5 ldi r28, 0x5F ; 95 |
160: d4 e0 ldi r29, 0x04 ; 4 |
162: de bf out 0x3e, r29 ; 62 |
164: cd bf out 0x3d, r28 ; 61 |
15c: cf e5 ldi r28, 0x5F ; 95 |
15e: d4 e0 ldi r29, 0x04 ; 4 |
160: de bf out 0x3e, r29 ; 62 |
162: cd bf out 0x3d, r28 ; 61 |
/* initialize all of the interface modules */ |
DebugInt_init(); |
166: aa d6 rcall .+3412 ; 0xebc |
164: cf d6 rcall .+3486 ; 0xf04 <DebugInt_init> |
UartInt_init(); |
168: f1 d4 rcall .+2530 ; 0xb4c |
166: f4 d4 rcall .+2536 ; 0xb50 <UartInt_init> |
I2CInt_init(); |
16a: 2c d5 rcall .+2648 ; 0xbc4 |
168: 2b d5 rcall .+2646 ; 0xbc0 <I2CInt_init> |
CamInt_init(); |
16c: c8 df rcall .-112 ; 0xfe |
16a: ca df rcall .-108 ; 0x100 <CamInt_init> |
/* initialize the remaining modules that will process |
data...interrupts need to be on for these */ |
ENABLE_INTS(); |
16e: 78 94 sei |
16c: 78 94 sei |
CamConfig_init(); |
170: fa d5 rcall .+3060 ; 0xd66 |
16e: 7e d6 rcall .+3324 ; 0xe6c <CamConfig_init> |
UIMgr_init(); |
172: 94 d2 rcall .+1320 ; 0x69c |
170: 8a d3 rcall .+1812 ; 0x886 <UIMgr_init> |
FrameMgr_init(); |
174: 7f d0 rcall .+254 ; 0x274 |
172: 37 d2 rcall .+1134 ; 0x5e2 <FrameMgr_init> |
/* provide a short delay for the camera to stabilize before |
we let the executive start up */ |
Utility_delay(1000); |
176: 88 ee ldi r24, 0xE8 ; 232 |
178: 93 e0 ldi r25, 0x03 ; 3 |
17a: 65 d6 rcall .+3274 ; 0xe46 |
174: 88 ee ldi r24, 0xE8 ; 232 |
176: 93 e0 ldi r25, 0x03 ; 3 |
178: 8a d6 rcall .+3348 ; 0xe8e <Utility_delay> |
/* the rest of the application will be under the |
control of the Executive. */ |
Exec_run(); |
17c: 03 d0 rcall .+6 ; 0x184 |
17a: 11 d0 rcall .+34 ; 0x19e <Exec_run> |
/* this should never be reached */ |
return(0); |
} |
17e: 80 e0 ldi r24, 0x00 ; 0 |
180: 90 e0 ldi r25, 0x00 ; 0 |
182: 8c c7 rjmp .+3864 ; 0x109c |
17c: 80 e0 ldi r24, 0x00 ; 0 |
17e: 90 e0 ldi r25, 0x00 ; 0 |
180: 9d c7 rjmp .+3898 ; 0x10bc <_exit> |
00000182 <Exec_writeEventFifo>: |
00000184 <Exec_run>: |
Inputs: none |
Outputs: none |
***********************************************************/ |
void Exec_run(void) |
{ |
184: cf 93 push r28 |
unsigned char eventGenerated; |
while(1) |
{ |
if (fastEventBitmask) |
186: 80 91 72 00 lds r24, 0x0072 |
18a: 88 23 and r24, r24 |
18c: b9 f0 breq .+46 ; 0x1bc |
{ |
/* an event needing fast processing has been received */ |
/* a received line needs to be processed...this |
needs to be processed as quickly as possible */ |
if (fastEventBitmask & FEV_ACQUIRE_LINE_COMPLETE) |
18e: 80 ff sbrs r24, 0 |
190: 09 c0 rjmp .+18 ; 0x1a4 |
{ |
DISABLE_INTS(); |
192: f8 94 cli |
fastEventBitmask &= ~FEV_ACQUIRE_LINE_COMPLETE; |
194: 80 91 72 00 lds r24, 0x0072 |
198: 8e 7f andi r24, 0xFE ; 254 |
19a: 80 93 72 00 sts 0x0072, r24 |
ENABLE_INTS(); |
19e: 78 94 sei |
FrameMgr_processLine(); |
1a0: f8 d0 rcall .+496 ; 0x392 |
/* also check if serial data needs to be sent |
out through UIMgr */ |
UIMgr_transmitPendingData(); |
1a2: ac d2 rcall .+1368 ; 0x6fc |
182: f8 94 cli |
184: 90 91 70 00 lds r25, 0x0070 |
188: ec e6 ldi r30, 0x6C ; 108 |
18a: f2 e0 ldi r31, 0x02 ; 2 |
18c: e9 0f add r30, r25 |
18e: f1 1d adc r31, r1 |
190: 80 83 st Z, r24 |
192: 9f 5f subi r25, 0xFF ; 255 |
194: 97 70 andi r25, 0x07 ; 7 |
196: 90 93 70 00 sts 0x0070, r25 |
19a: 78 94 sei |
19c: 08 95 ret |
0000019e <Exec_run>: |
19e: 80 91 72 00 lds r24, 0x0072 |
1a2: 88 23 and r24, r24 |
1a4: 99 f0 breq .+38 ; 0x1cc <Exec_run+0x2e> |
1a6: 80 ff sbrs r24, 0 |
1a8: 07 c0 rjmp .+14 ; 0x1b8 <Exec_run+0x1a> |
1aa: f8 94 cli |
1ac: 8e 7f andi r24, 0xFE ; 254 |
1ae: 80 93 72 00 sts 0x0072, r24 |
1b2: 78 94 sei |
1b4: b6 d0 rcall .+364 ; 0x322 <FrameMgr_processLine> |
1b6: ff d2 rcall .+1534 ; 0x7b6 <UIMgr_transmitPendingData> |
1b8: 80 91 72 00 lds r24, 0x0072 |
1bc: 81 ff sbrs r24, 1 |
1be: 06 c0 rjmp .+12 ; 0x1cc <Exec_run+0x2e> |
1c0: f8 94 cli |
1c2: 8d 7f andi r24, 0xFD ; 253 |
1c4: 80 93 72 00 sts 0x0072, r24 |
1c8: 78 94 sei |
1ca: 12 d2 rcall .+1060 ; 0x5f0 <FrameMgr_acquireLine> |
1cc: 20 91 71 00 lds r18, 0x0071 |
1d0: 80 91 70 00 lds r24, 0x0070 |
1d4: 82 17 cp r24, r18 |
1d6: 19 f3 breq .-58 ; 0x19e <Exec_run> |
1d8: f8 94 cli |
1da: e2 2f mov r30, r18 |
1dc: ff 27 eor r31, r31 |
1de: e4 59 subi r30, 0x94 ; 148 |
1e0: fd 4f sbci r31, 0xFD ; 253 |
1e2: 90 81 ld r25, Z |
1e4: 82 2f mov r24, r18 |
1e6: 8f 5f subi r24, 0xFF ; 255 |
1e8: 87 70 andi r24, 0x07 ; 7 |
1ea: 80 93 71 00 sts 0x0071, r24 |
1ee: 78 94 sei |
1f0: 89 2f mov r24, r25 |
1f2: 99 27 eor r25, r25 |
1f4: 80 31 cpi r24, 0x10 ; 16 |
1f6: 31 f1 breq .+76 ; 0x244 <Exec_run+0xa6> |
1f8: 81 31 cpi r24, 0x11 ; 17 |
1fa: 68 f4 brcc .+26 ; 0x216 <Exec_run+0x78> |
1fc: 82 30 cpi r24, 0x02 ; 2 |
1fe: c9 f0 breq .+50 ; 0x232 <Exec_run+0x94> |
200: 83 30 cpi r24, 0x03 ; 3 |
202: 18 f4 brcc .+6 ; 0x20a <Exec_run+0x6c> |
204: 81 30 cpi r24, 0x01 ; 1 |
206: 59 f6 brne .-106 ; 0x19e <Exec_run> |
208: 2b c0 rjmp .+86 ; 0x260 <Exec_run+0xc2> |
20a: 84 30 cpi r24, 0x04 ; 4 |
20c: 31 f1 breq .+76 ; 0x25a <Exec_run+0xbc> |
20e: 88 30 cpi r24, 0x08 ; 8 |
210: 09 f0 breq .+2 ; 0x214 <Exec_run+0x76> |
212: c5 cf rjmp .-118 ; 0x19e <Exec_run> |
214: 1f c0 rjmp .+62 ; 0x254 <Exec_run+0xb6> |
216: 80 38 cpi r24, 0x80 ; 128 |
218: 79 f0 breq .+30 ; 0x238 <Exec_run+0x9a> |
21a: 81 38 cpi r24, 0x81 ; 129 |
21c: 20 f4 brcc .+8 ; 0x226 <Exec_run+0x88> |
21e: 80 32 cpi r24, 0x20 ; 32 |
220: 09 f0 breq .+2 ; 0x224 <Exec_run+0x86> |
222: bd cf rjmp .-134 ; 0x19e <Exec_run> |
224: 14 c0 rjmp .+40 ; 0x24e <Exec_run+0xb0> |
226: 81 38 cpi r24, 0x81 ; 129 |
228: 51 f0 breq .+20 ; 0x23e <Exec_run+0xa0> |
22a: 80 39 cpi r24, 0x90 ; 144 |
22c: 09 f0 breq .+2 ; 0x230 <Exec_run+0x92> |
22e: b7 cf rjmp .-146 ; 0x19e <Exec_run> |
230: 1c c0 rjmp .+56 ; 0x26a <Exec_run+0xcc> |
232: 82 e0 ldi r24, 0x02 ; 2 |
234: 2e d2 rcall .+1116 ; 0x692 <FrameMgr_dispatchEvent> |
236: b3 cf rjmp .-154 ; 0x19e <Exec_run> |
238: 80 e8 ldi r24, 0x80 ; 128 |
23a: 2b d2 rcall .+1110 ; 0x692 <FrameMgr_dispatchEvent> |
23c: b0 cf rjmp .-160 ; 0x19e <Exec_run> |
23e: 81 e8 ldi r24, 0x81 ; 129 |
240: 28 d2 rcall .+1104 ; 0x692 <FrameMgr_dispatchEvent> |
242: ad cf rjmp .-166 ; 0x19e <Exec_run> |
244: 80 e1 ldi r24, 0x10 ; 16 |
246: 25 d2 rcall .+1098 ; 0x692 <FrameMgr_dispatchEvent> |
248: 80 e1 ldi r24, 0x10 ; 16 |
24a: 75 d4 rcall .+2282 ; 0xb36 <UIMgr_dispatchEvent> |
24c: a8 cf rjmp .-176 ; 0x19e <Exec_run> |
24e: 80 e2 ldi r24, 0x20 ; 32 |
250: 20 d2 rcall .+1088 ; 0x692 <FrameMgr_dispatchEvent> |
252: a5 cf rjmp .-182 ; 0x19e <Exec_run> |
254: 88 e0 ldi r24, 0x08 ; 8 |
256: 1d d2 rcall .+1082 ; 0x692 <FrameMgr_dispatchEvent> |
258: a2 cf rjmp .-188 ; 0x19e <Exec_run> |
25a: 84 e0 ldi r24, 0x04 ; 4 |
25c: 1a d2 rcall .+1076 ; 0x692 <FrameMgr_dispatchEvent> |
25e: 9f cf rjmp .-194 ; 0x19e <Exec_run> |
260: 81 e0 ldi r24, 0x01 ; 1 |
262: 69 d4 rcall .+2258 ; 0xb36 <UIMgr_dispatchEvent> |
264: 81 e0 ldi r24, 0x01 ; 1 |
266: 15 d2 rcall .+1066 ; 0x692 <FrameMgr_dispatchEvent> |
268: 9a cf rjmp .-204 ; 0x19e <Exec_run> |
26a: 80 e9 ldi r24, 0x90 ; 144 |
26c: 64 d4 rcall .+2248 ; 0xb36 <UIMgr_dispatchEvent> |
26e: 97 cf rjmp .-210 ; 0x19e <Exec_run> |
00000270 <FrameMgr_processFrame>: |
270: df 92 push r13 |
272: ef 92 push r14 |
274: ff 92 push r15 |
276: 0f 93 push r16 |
278: 1f 93 push r17 |
27a: cf 93 push r28 |
27c: df 93 push r29 |
27e: 20 91 60 00 lds r18, 0x0060 |
282: 30 91 61 00 lds r19, 0x0061 |
286: 80 91 73 00 lds r24, 0x0073 |
28a: 88 23 and r24, r24 |
28c: 09 f4 brne .+2 ; 0x290 <FrameMgr_processFrame+0x20> |
28e: 3f c0 rjmp .+126 ; 0x30e <FrameMgr_processFrame+0x9e> |
290: e9 01 movw r28, r18 |
292: 8a e0 ldi r24, 0x0A ; 10 |
294: 5c d2 rcall .+1208 ; 0x74e <UIMgr_writeTxFifo> |
296: 80 91 73 00 lds r24, 0x0073 |
29a: 59 d2 rcall .+1202 ; 0x74e <UIMgr_writeTxFifo> |
29c: dd 24 eor r13, r13 |
29e: 8f 81 ldd r24, Y+7 ; 0x07 |
2a0: 81 30 cpi r24, 0x01 ; 1 |
2a2: 69 f5 brne .+90 ; 0x2fe <FrameMgr_processFrame+0x8e> |
2a4: 88 81 ld r24, Y |
2a6: 80 38 cpi r24, 0x80 ; 128 |
2a8: e1 f0 breq .+56 ; 0x2e2 <FrameMgr_processFrame+0x72> |
2aa: 80 34 cpi r24, 0x40 ; 64 |
2ac: 11 f4 brne .+4 ; 0x2b2 <FrameMgr_processFrame+0x42> |
2ae: 81 e0 ldi r24, 0x01 ; 1 |
2b0: 19 c0 rjmp .+50 ; 0x2e4 <FrameMgr_processFrame+0x74> |
2b2: 80 32 cpi r24, 0x20 ; 32 |
2b4: 11 f4 brne .+4 ; 0x2ba <FrameMgr_processFrame+0x4a> |
2b6: 82 e0 ldi r24, 0x02 ; 2 |
2b8: 15 c0 rjmp .+42 ; 0x2e4 <FrameMgr_processFrame+0x74> |
2ba: 80 31 cpi r24, 0x10 ; 16 |
2bc: 11 f4 brne .+4 ; 0x2c2 <FrameMgr_processFrame+0x52> |
2be: 83 e0 ldi r24, 0x03 ; 3 |
2c0: 11 c0 rjmp .+34 ; 0x2e4 <FrameMgr_processFrame+0x74> |
2c2: 88 30 cpi r24, 0x08 ; 8 |
2c4: 11 f4 brne .+4 ; 0x2ca <FrameMgr_processFrame+0x5a> |
2c6: 84 e0 ldi r24, 0x04 ; 4 |
2c8: 0d c0 rjmp .+26 ; 0x2e4 <FrameMgr_processFrame+0x74> |
2ca: 84 30 cpi r24, 0x04 ; 4 |
2cc: 11 f4 brne .+4 ; 0x2d2 <FrameMgr_processFrame+0x62> |
2ce: 85 e0 ldi r24, 0x05 ; 5 |
2d0: 09 c0 rjmp .+18 ; 0x2e4 <FrameMgr_processFrame+0x74> |
2d2: 82 30 cpi r24, 0x02 ; 2 |
2d4: 11 f4 brne .+4 ; 0x2da <FrameMgr_processFrame+0x6a> |
2d6: 86 e0 ldi r24, 0x06 ; 6 |
2d8: 05 c0 rjmp .+10 ; 0x2e4 <FrameMgr_processFrame+0x74> |
2da: 81 30 cpi r24, 0x01 ; 1 |
2dc: 11 f4 brne .+4 ; 0x2e2 <FrameMgr_processFrame+0x72> |
2de: 87 e0 ldi r24, 0x07 ; 7 |
2e0: 01 c0 rjmp .+2 ; 0x2e4 <FrameMgr_processFrame+0x74> |
2e2: 80 e0 ldi r24, 0x00 ; 0 |
2e4: 1b 81 ldd r17, Y+3 ; 0x03 |
2e6: 0c 81 ldd r16, Y+4 ; 0x04 |
2e8: fd 80 ldd r15, Y+5 ; 0x05 |
2ea: ee 80 ldd r14, Y+6 ; 0x06 |
2ec: 30 d2 rcall .+1120 ; 0x74e <UIMgr_writeTxFifo> |
2ee: 81 2f mov r24, r17 |
2f0: 2e d2 rcall .+1116 ; 0x74e <UIMgr_writeTxFifo> |
2f2: 80 2f mov r24, r16 |
2f4: 2c d2 rcall .+1112 ; 0x74e <UIMgr_writeTxFifo> |
2f6: 8f 2d mov r24, r15 |
2f8: 2a d2 rcall .+1108 ; 0x74e <UIMgr_writeTxFifo> |
2fa: 8e 2d mov r24, r14 |
2fc: 28 d2 rcall .+1104 ; 0x74e <UIMgr_writeTxFifo> |
2fe: d3 94 inc r13 |
300: 88 e0 ldi r24, 0x08 ; 8 |
302: d8 16 cp r13, r24 |
304: 11 f0 breq .+4 ; 0x30a <FrameMgr_processFrame+0x9a> |
306: 28 96 adiw r28, 0x08 ; 8 |
308: ca cf rjmp .-108 ; 0x29e <FrameMgr_processFrame+0x2e> |
30a: 8f ef ldi r24, 0xFF ; 255 |
30c: 20 d2 rcall .+1088 ; 0x74e <UIMgr_writeTxFifo> |
30e: 84 e0 ldi r24, 0x04 ; 4 |
310: 38 df rcall .-400 ; 0x182 <Exec_writeEventFifo> |
312: df 91 pop r29 |
314: cf 91 pop r28 |
316: 1f 91 pop r17 |
318: 0f 91 pop r16 |
31a: ff 90 pop r15 |
31c: ef 90 pop r14 |
31e: df 90 pop r13 |
320: 08 95 ret |
00000322 <FrameMgr_processLine>: |
322: 2f 92 push r2 |
324: 3f 92 push r3 |
326: 4f 92 push r4 |
328: 5f 92 push r5 |
32a: 6f 92 push r6 |
32c: 7f 92 push r7 |
32e: 8f 92 push r8 |
330: 9f 92 push r9 |
332: af 92 push r10 |
334: bf 92 push r11 |
336: cf 92 push r12 |
338: df 92 push r13 |
33a: ef 92 push r14 |
33c: ff 92 push r15 |
33e: 0f 93 push r16 |
340: 1f 93 push r17 |
342: cf 93 push r28 |
344: df 93 push r29 |
346: cd b7 in r28, 0x3d ; 61 |
348: de b7 in r29, 0x3e ; 62 |
34a: 21 97 sbiw r28, 0x01 ; 1 |
34c: 0f b6 in r0, 0x3f ; 63 |
34e: f8 94 cli |
350: de bf out 0x3e, r29 ; 62 |
352: 0f be out 0x3f, r0 ; 63 |
354: cd bf out 0x3d, r28 ; 61 |
356: 00 91 60 00 lds r16, 0x0060 |
35a: 10 91 61 00 lds r17, 0x0061 |
35e: 80 91 74 00 lds r24, 0x0074 |
362: 82 30 cpi r24, 0x02 ; 2 |
364: 09 f0 breq .+2 ; 0x368 <FrameMgr_processLine+0x46> |
366: 6a c0 rjmp .+212 ; 0x43c <FrameMgr_processLine+0x11a> |
368: 8b e0 ldi r24, 0x0B ; 11 |
36a: fc d3 rcall .+2040 ; 0xb64 <UartInt_txByte> |
36c: 80 91 75 00 lds r24, 0x0075 |
370: f9 d3 rcall .+2034 ; 0xb64 <UartInt_txByte> |
372: 0f 2e mov r0, r31 |
374: fc eb ldi r31, 0xBC ; 188 |
376: cf 2e mov r12, r31 |
378: f1 e0 ldi r31, 0x01 ; 1 |
37a: df 2e mov r13, r31 |
37c: f0 2d mov r31, r0 |
37e: 00 e0 ldi r16, 0x00 ; 0 |
380: 10 e0 ldi r17, 0x00 ; 0 |
382: 0f 2e mov r0, r31 |
384: fc e0 ldi r31, 0x0C ; 12 |
386: ef 2e mov r14, r31 |
388: f1 e0 ldi r31, 0x01 ; 1 |
38a: ff 2e mov r15, r31 |
38c: f0 2d mov r31, r0 |
38e: f6 01 movw r30, r12 |
390: 80 81 ld r24, Z |
392: 89 83 std Y+1, r24 ; 0x01 |
394: 89 81 ldd r24, Y+1 ; 0x01 |
396: 8f 70 andi r24, 0x0F ; 15 |
398: 89 83 std Y+1, r24 ; 0x01 |
39a: 89 81 ldd r24, Y+1 ; 0x01 |
39c: 82 95 swap r24 |
39e: 80 7f andi r24, 0xF0 ; 240 |
3a0: 89 83 std Y+1, r24 ; 0x01 |
3a2: 99 81 ldd r25, Y+1 ; 0x01 |
3a4: f7 01 movw r30, r14 |
3a6: 80 81 ld r24, Z |
3a8: 8f 70 andi r24, 0x0F ; 15 |
3aa: 89 2b or r24, r25 |
3ac: 89 83 std Y+1, r24 ; 0x01 |
3ae: 89 81 ldd r24, Y+1 ; 0x01 |
3b0: d9 d3 rcall .+1970 ; 0xb64 <UartInt_txByte> |
3b2: d8 01 movw r26, r16 |
3b4: 11 96 adiw r26, 0x01 ; 1 |
3b6: fd 01 movw r30, r26 |
3b8: e4 5f subi r30, 0xF4 ; 244 |
3ba: fe 4f sbci r31, 0xFE ; 254 |
3bc: 80 81 ld r24, Z |
3be: 89 83 std Y+1, r24 ; 0x01 |
3c0: 89 81 ldd r24, Y+1 ; 0x01 |
3c2: 8f 70 andi r24, 0x0F ; 15 |
3c4: 89 83 std Y+1, r24 ; 0x01 |
3c6: 89 81 ldd r24, Y+1 ; 0x01 |
3c8: 82 95 swap r24 |
3ca: 80 7f andi r24, 0xF0 ; 240 |
3cc: 89 83 std Y+1, r24 ; 0x01 |
3ce: 99 81 ldd r25, Y+1 ; 0x01 |
3d0: a4 54 subi r26, 0x44 ; 68 |
3d2: be 4f sbci r27, 0xFE ; 254 |
3d4: 8c 91 ld r24, X |
3d6: 8f 70 andi r24, 0x0F ; 15 |
3d8: 89 2b or r24, r25 |
3da: 89 83 std Y+1, r24 ; 0x01 |
3dc: 89 81 ldd r24, Y+1 ; 0x01 |
3de: c2 d3 rcall .+1924 ; 0xb64 <UartInt_txByte> |
3e0: 82 e0 ldi r24, 0x02 ; 2 |
3e2: 90 e0 ldi r25, 0x00 ; 0 |
3e4: c8 0e add r12, r24 |
3e6: d9 1e adc r13, r25 |
3e8: 0e 5f subi r16, 0xFE ; 254 |
3ea: 1f 4f sbci r17, 0xFF ; 255 |
3ec: e8 0e add r14, r24 |
3ee: f9 1e adc r15, r25 |
3f0: 00 3b cpi r16, 0xB0 ; 176 |
3f2: 11 05 cpc r17, r1 |
3f4: 61 f6 brne .-104 ; 0x38e <FrameMgr_processLine+0x6c> |
3f6: 8f e0 ldi r24, 0x0F ; 15 |
3f8: b5 d3 rcall .+1898 ; 0xb64 <UartInt_txByte> |
3fa: 80 91 75 00 lds r24, 0x0075 |
3fe: 8f 5f subi r24, 0xFF ; 255 |
400: 80 93 75 00 sts 0x0075, r24 |
404: 88 34 cpi r24, 0x48 ; 72 |
406: 60 f0 brcs .+24 ; 0x420 <FrameMgr_processLine+0xfe> |
408: 10 92 75 00 sts 0x0075, r1 |
40c: 10 92 74 00 sts 0x0074, r1 |
410: 89 b7 in r24, 0x39 ; 57 |
412: 8b 7f andi r24, 0xFB ; 251 |
414: 89 bf out 0x39, r24 ; 57 |
416: 60 e0 ldi r22, 0x00 ; 0 |
418: 81 e1 ldi r24, 0x11 ; 17 |
41a: e9 d4 rcall .+2514 ; 0xdee <CamConfig_setCamReg> |
41c: ed d4 rcall .+2522 ; 0xdf8 <CamConfig_sendFifoCmds> |
41e: c8 c0 rjmp .+400 ; 0x5b0 <__stack+0x151> |
420: 80 91 72 00 lds r24, 0x0072 |
424: 82 60 ori r24, 0x02 ; 2 |
426: 80 93 72 00 sts 0x0072, r24 |
42a: c2 c0 rjmp .+388 ; 0x5b0 <__stack+0x151> |
42c: 80 e2 ldi r24, 0x20 ; 32 |
42e: a9 de rcall .-686 ; 0x182 <Exec_writeEventFifo> |
430: 89 b7 in r24, 0x39 ; 57 |
432: 8b 7f andi r24, 0xFB ; 251 |
434: 89 bf out 0x39, r24 ; 57 |
436: 10 92 76 00 sts 0x0076, r1 |
43a: ba c0 rjmp .+372 ; 0x5b0 <__stack+0x151> |
43c: 81 30 cpi r24, 0x01 ; 1 |
43e: 09 f0 breq .+2 ; 0x442 <FrameMgr_processLine+0x120> |
440: b7 c0 rjmp .+366 ; 0x5b0 <__stack+0x151> |
442: f0 90 76 00 lds r15, 0x0076 |
446: cf 2c mov r12, r15 |
448: dd 24 eor r13, r13 |
44a: 36 01 movw r6, r12 |
44c: 08 94 sec |
44e: 61 08 sbc r6, r1 |
450: 71 08 sbc r7, r1 |
452: 70 91 73 00 lds r23, 0x0073 |
456: 0f 2e mov r0, r31 |
458: fc eb ldi r31, 0xBC ; 188 |
45a: 2f 2e mov r2, r31 |
45c: f1 e0 ldi r31, 0x01 ; 1 |
45e: 3f 2e mov r3, r31 |
460: f0 2d mov r31, r0 |
462: 50 e0 ldi r21, 0x00 ; 0 |
464: 40 e0 ldi r20, 0x00 ; 0 |
466: 61 e0 ldi r22, 0x01 ; 1 |
468: ef 2c mov r14, r15 |
46a: e3 94 inc r14 |
46c: f1 01 movw r30, r2 |
46e: 30 81 ld r19, Z |
470: 56 0f add r21, r22 |
472: 61 81 ldd r22, Z+1 ; 0x01 |
474: 82 e0 ldi r24, 0x02 ; 2 |
476: 90 e0 ldi r25, 0x00 ; 0 |
478: 28 0e add r2, r24 |
47a: 39 1e adc r3, r25 |
47c: 46 0f add r20, r22 |
47e: 33 23 and r19, r19 |
480: 09 f4 brne .+2 ; 0x484 <__stack+0x25> |
482: 5c c0 rjmp .+184 ; 0x53c <__stack+0xdd> |
484: 64 30 cpi r22, 0x04 ; 4 |
486: 08 f4 brcc .+2 ; 0x48a <__stack+0x2b> |
488: 59 c0 rjmp .+178 ; 0x53c <__stack+0xdd> |
48a: d8 01 movw r26, r16 |
48c: 20 e0 ldi r18, 0x00 ; 0 |
48e: 8c 91 ld r24, X |
490: 38 17 cp r19, r24 |
492: c9 f5 brne .+114 ; 0x506 <__stack+0xa7> |
494: fd 01 movw r30, r26 |
496: 87 81 ldd r24, Z+7 ; 0x07 |
498: 81 30 cpi r24, 0x01 ; 1 |
49a: a9 f5 brne .+106 ; 0x506 <__stack+0xa7> |
49c: 0f 2e mov r0, r31 |
49e: f6 e0 ldi r31, 0x06 ; 6 |
4a0: af 2e mov r10, r31 |
4a2: bb 24 eor r11, r11 |
4a4: f0 2d mov r31, r0 |
4a6: aa 0e add r10, r26 |
4a8: bb 1e adc r11, r27 |
4aa: 86 81 ldd r24, Z+6 ; 0x06 |
4ac: 99 27 eor r25, r25 |
4ae: 86 15 cp r24, r6 |
4b0: 97 05 cpc r25, r7 |
4b2: 49 f5 brne .+82 ; 0x506 <__stack+0xa7> |
4b4: 2d 01 movw r4, r26 |
4b6: 08 94 sec |
4b8: 41 1c adc r4, r1 |
4ba: 51 1c adc r5, r1 |
4bc: 81 81 ldd r24, Z+1 ; 0x01 |
4be: 88 24 eor r8, r8 |
4c0: 99 24 eor r9, r9 |
4c2: 68 94 set |
4c4: 81 f8 bld r8, 1 |
4c6: 8a 0e add r8, r26 |
4c8: 9b 1e adc r9, r27 |
4ca: 92 81 ldd r25, Z+2 ; 0x02 |
4cc: 58 17 cp r21, r24 |
4ce: 10 f0 brcs .+4 ; 0x4d4 <__stack+0x75> |
4d0: 95 17 cp r25, r21 |
4d2: 40 f4 brcc .+16 ; 0x4e4 <__stack+0x85> |
4d4: 48 17 cp r20, r24 |
4d6: 10 f0 brcs .+4 ; 0x4dc <__stack+0x7d> |
4d8: 94 17 cp r25, r20 |
4da: 20 f4 brcc .+8 ; 0x4e4 <__stack+0x85> |
4dc: 85 17 cp r24, r21 |
4de: 98 f0 brcs .+38 ; 0x506 <__stack+0xa7> |
4e0: 49 17 cp r20, r25 |
4e2: 88 f0 brcs .+34 ; 0x506 <__stack+0xa7> |
4e4: f2 01 movw r30, r4 |
4e6: 50 83 st Z, r21 |
4e8: f4 01 movw r30, r8 |
4ea: 40 83 st Z, r20 |
4ec: fd 01 movw r30, r26 |
4ee: 83 81 ldd r24, Z+3 ; 0x03 |
4f0: 58 17 cp r21, r24 |
4f2: 08 f4 brcc .+2 ; 0x4f6 <__stack+0x97> |
4f4: 53 83 std Z+3, r21 ; 0x03 |
4f6: fd 01 movw r30, r26 |
4f8: 85 81 ldd r24, Z+5 ; 0x05 |
4fa: 84 17 cp r24, r20 |
4fc: 08 f4 brcc .+2 ; 0x500 <__stack+0xa1> |
4fe: 45 83 std Z+5, r20 ; 0x05 |
500: f5 01 movw r30, r10 |
502: f0 82 st Z, r15 |
504: 1b c0 rjmp .+54 ; 0x53c <__stack+0xdd> |
506: 2f 5f subi r18, 0xFF ; 255 |
508: 28 30 cpi r18, 0x08 ; 8 |
50a: 09 f4 brne .+2 ; 0x50e <__stack+0xaf> |
50c: 4d c0 rjmp .+154 ; 0x5a8 <__stack+0x149> |
50e: 18 96 adiw r26, 0x08 ; 8 |
510: be cf rjmp .-132 ; 0x48e <__stack+0x2f> |
512: d8 01 movw r26, r16 |
514: 90 e0 ldi r25, 0x00 ; 0 |
516: fd 01 movw r30, r26 |
518: 87 81 ldd r24, Z+7 ; 0x07 |
51a: 88 23 and r24, r24 |
51c: 21 f0 breq .+8 ; 0x526 <__stack+0xc7> |
51e: 18 96 adiw r26, 0x08 ; 8 |
520: 9f 5f subi r25, 0xFF ; 255 |
522: 98 30 cpi r25, 0x08 ; 8 |
524: c1 f7 brne .-16 ; 0x516 <__stack+0xb7> |
526: 3c 93 st X, r19 |
528: fd 01 movw r30, r26 |
52a: 51 83 std Z+1, r21 ; 0x01 |
52c: 42 83 std Z+2, r20 ; 0x02 |
52e: 53 83 std Z+3, r21 ; 0x03 |
530: f4 82 std Z+4, r15 ; 0x04 |
532: 45 83 std Z+5, r20 ; 0x05 |
534: f6 82 std Z+6, r15 ; 0x06 |
536: 81 e0 ldi r24, 0x01 ; 1 |
538: 87 83 std Z+7, r24 ; 0x07 |
53a: 7f 5f subi r23, 0xFF ; 255 |
53c: 40 3b cpi r20, 0xB0 ; 176 |
53e: 08 f4 brcc .+2 ; 0x542 <__stack+0xe3> |
540: 95 cf rjmp .-214 ; 0x46c <__stack+0xd> |
542: 70 93 73 00 sts 0x0073, r23 |
546: c6 01 movw r24, r12 |
548: 87 70 andi r24, 0x07 ; 7 |
54a: 90 70 andi r25, 0x00 ; 0 |
54c: 07 97 sbiw r24, 0x07 ; 7 |
54e: 01 f5 brne .+64 ; 0x590 <__stack+0x131> |
550: d8 01 movw r26, r16 |
552: 17 96 adiw r26, 0x07 ; 7 |
554: 40 e0 ldi r20, 0x00 ; 0 |
556: 8c 91 ld r24, X |
558: 81 30 cpi r24, 0x01 ; 1 |
55a: a1 f4 brne .+40 ; 0x584 <__stack+0x125> |
55c: fd 01 movw r30, r26 |
55e: 31 97 sbiw r30, 0x01 ; 1 |
560: 90 81 ld r25, Z |
562: fd 01 movw r30, r26 |
564: 33 97 sbiw r30, 0x03 ; 3 |
566: 80 81 ld r24, Z |
568: 29 2f mov r18, r25 |
56a: 33 27 eor r19, r19 |
56c: f9 01 movw r30, r18 |
56e: e8 1b sub r30, r24 |
570: f1 09 sbc r31, r1 |
572: 33 97 sbiw r30, 0x03 ; 3 |
574: 3c f4 brge .+14 ; 0x584 <__stack+0x125> |
576: c6 01 movw r24, r12 |
578: 82 1b sub r24, r18 |
57a: 93 0b sbc r25, r19 |
57c: 03 97 sbiw r24, 0x03 ; 3 |
57e: 14 f0 brlt .+4 ; 0x584 <__stack+0x125> |
580: 1c 92 st X, r1 |
582: 71 50 subi r23, 0x01 ; 1 |
584: 4f 5f subi r20, 0xFF ; 255 |
586: 18 96 adiw r26, 0x08 ; 8 |
588: 48 30 cpi r20, 0x08 ; 8 |
58a: 29 f7 brne .-54 ; 0x556 <__stack+0xf7> |
58c: 70 93 73 00 sts 0x0073, r23 |
590: e0 92 76 00 sts 0x0076, r14 |
594: f0 e9 ldi r31, 0x90 ; 144 |
596: ef 16 cp r14, r31 |
598: 09 f4 brne .+2 ; 0x59c <__stack+0x13d> |
59a: 48 cf rjmp .-368 ; 0x42c <FrameMgr_processLine+0x10a> |
59c: 80 91 72 00 lds r24, 0x0072 |
5a0: 82 60 ori r24, 0x02 ; 2 |
5a2: 80 93 72 00 sts 0x0072, r24 |
5a6: 04 c0 rjmp .+8 ; 0x5b0 <__stack+0x151> |
5a8: 78 30 cpi r23, 0x08 ; 8 |
5aa: 08 f4 brcc .+2 ; 0x5ae <__stack+0x14f> |
5ac: b2 cf rjmp .-156 ; 0x512 <__stack+0xb3> |
5ae: c6 cf rjmp .-116 ; 0x53c <__stack+0xdd> |
5b0: 21 96 adiw r28, 0x01 ; 1 |
5b2: 0f b6 in r0, 0x3f ; 63 |
5b4: f8 94 cli |
5b6: de bf out 0x3e, r29 ; 62 |
5b8: 0f be out 0x3f, r0 ; 63 |
5ba: cd bf out 0x3d, r28 ; 61 |
5bc: df 91 pop r29 |
5be: cf 91 pop r28 |
5c0: 1f 91 pop r17 |
5c2: 0f 91 pop r16 |
5c4: ff 90 pop r15 |
5c6: ef 90 pop r14 |
5c8: df 90 pop r13 |
5ca: cf 90 pop r12 |
5cc: bf 90 pop r11 |
5ce: af 90 pop r10 |
5d0: 9f 90 pop r9 |
5d2: 8f 90 pop r8 |
5d4: 7f 90 pop r7 |
5d6: 6f 90 pop r6 |
5d8: 5f 90 pop r5 |
5da: 4f 90 pop r4 |
5dc: 3f 90 pop r3 |
5de: 2f 90 pop r2 |
5e0: 08 95 ret |
000005e2 <FrameMgr_init>: |
5e2: 80 e4 ldi r24, 0x40 ; 64 |
5e4: e8 e7 ldi r30, 0x78 ; 120 |
5e6: f0 e0 ldi r31, 0x00 ; 0 |
5e8: 11 92 st Z+, r1 |
5ea: 8a 95 dec r24 |
5ec: e9 f7 brne .-6 ; 0x5e8 <FrameMgr_init+0x6> |
5ee: 08 95 ret |
000005f0 <FrameMgr_acquireLine>: |
5f0: 80 91 74 00 lds r24, 0x0074 |
5f4: 82 30 cpi r24, 0x02 ; 2 |
5f6: 49 f5 brne .+82 ; 0x64a <FrameMgr_acquireLine+0x5a> |
5f8: 80 91 75 00 lds r24, 0x0075 |
5fc: 28 2f mov r18, r24 |
5fe: 22 0f add r18, r18 |
600: 80 eb ldi r24, 0xB0 ; 176 |
602: ec eb ldi r30, 0xBC ; 188 |
604: f1 e0 ldi r31, 0x01 ; 1 |
606: 98 2f mov r25, r24 |
608: 11 92 st Z+, r1 |
60a: 9a 95 dec r25 |
60c: e9 f7 brne .-6 ; 0x608 <FrameMgr_acquireLine+0x18> |
60e: ec e0 ldi r30, 0x0C ; 12 |
610: f1 e0 ldi r31, 0x01 ; 1 |
612: 11 92 st Z+, r1 |
614: 8a 95 dec r24 |
616: e9 f7 brne .-6 ; 0x612 <FrameMgr_acquireLine+0x22> |
618: 82 9b sbis 0x10, 2 ; 16 |
61a: fe cf rjmp .-4 ; 0x618 <FrameMgr_acquireLine+0x28> |
61c: 82 9b sbis 0x10, 2 ; 16 |
61e: 07 c0 rjmp .+14 ; 0x62e <FrameMgr_acquireLine+0x3e> |
620: fd cf rjmp .-6 ; 0x61c <FrameMgr_acquireLine+0x2c> |
622: 90 e0 ldi r25, 0x00 ; 0 |
624: 84 9b sbis 0x10, 4 ; 16 |
626: fe cf rjmp .-4 ; 0x624 <FrameMgr_acquireLine+0x34> |
628: 84 9b sbis 0x10, 4 ; 16 |
62a: 04 c0 rjmp .+8 ; 0x634 <FrameMgr_acquireLine+0x44> |
62c: fd cf rjmp .-6 ; 0x628 <FrameMgr_acquireLine+0x38> |
62e: 22 23 and r18, r18 |
630: c1 f7 brne .-16 ; 0x622 <FrameMgr_acquireLine+0x32> |
632: 05 c0 rjmp .+10 ; 0x63e <FrameMgr_acquireLine+0x4e> |
634: 91 50 subi r25, 0x01 ; 1 |
636: 82 2f mov r24, r18 |
638: 81 95 neg r24 |
63a: 98 17 cp r25, r24 |
63c: 99 f7 brne .-26 ; 0x624 <FrameMgr_acquireLine+0x34> |
63e: 6c e0 ldi r22, 0x0C ; 12 |
640: 71 e0 ldi r23, 0x01 ; 1 |
642: 8c eb ldi r24, 0xBC ; 188 |
644: 91 e0 ldi r25, 0x01 ; 1 |
646: c3 d4 rcall .+2438 ; 0xfce <CamIntAsm_acquireDumpLine> |
648: 08 95 ret |
64a: 81 30 cpi r24, 0x01 ; 1 |
64c: 39 f4 brne .+14 ; 0x65c <FrameMgr_acquireLine+0x6c> |
64e: 84 99 sbic 0x10, 4 ; 16 |
650: fe cf rjmp .-4 ; 0x64e <FrameMgr_acquireLine+0x5e> |
652: 60 e0 ldi r22, 0x00 ; 0 |
654: 73 e0 ldi r23, 0x03 ; 3 |
656: 8c eb ldi r24, 0xBC ; 188 |
658: 91 e0 ldi r25, 0x01 ; 1 |
65a: 72 d4 rcall .+2276 ; 0xf40 <CamIntAsm_acquireTrackingLine> |
65c: 08 95 ret |
0000065e <FrameMgr_acquireFrame>: |
65e: 80 91 74 00 lds r24, 0x0074 |
662: 81 30 cpi r24, 0x01 ; 1 |
664: a9 f4 brne .+42 ; 0x690 <FrameMgr_acquireFrame+0x32> |
666: 10 92 76 00 sts 0x0076, r1 |
66a: 80 91 73 00 lds r24, 0x0073 |
66e: 80 93 77 00 sts 0x0077, r24 |
672: 10 92 73 00 sts 0x0073, r1 |
676: 80 e4 ldi r24, 0x40 ; 64 |
678: e8 e7 ldi r30, 0x78 ; 120 |
67a: f0 e0 ldi r31, 0x00 ; 0 |
67c: 11 92 st Z+, r1 |
67e: 8a 95 dec r24 |
680: e9 f7 brne .-6 ; 0x67c <FrameMgr_acquireFrame+0x1e> |
682: 82 9b sbis 0x10, 2 ; 16 |
684: fe cf rjmp .-4 ; 0x682 <FrameMgr_acquireFrame+0x24> |
686: 60 e0 ldi r22, 0x00 ; 0 |
688: 73 e0 ldi r23, 0x03 ; 3 |
68a: 8c eb ldi r24, 0xBC ; 188 |
68c: 91 e0 ldi r25, 0x01 ; 1 |
68e: 58 d4 rcall .+2224 ; 0xf40 <CamIntAsm_acquireTrackingLine> |
690: 08 95 ret |
00000692 <FrameMgr_dispatchEvent>: |
692: 84 30 cpi r24, 0x04 ; 4 |
694: 19 f1 breq .+70 ; 0x6dc <FrameMgr_dispatchEvent+0x4a> |
696: 85 30 cpi r24, 0x05 ; 5 |
698: 28 f4 brcc .+10 ; 0x6a4 <FrameMgr_dispatchEvent+0x12> |
69a: 81 30 cpi r24, 0x01 ; 1 |
69c: 09 f1 breq .+66 ; 0x6e0 <FrameMgr_dispatchEvent+0x4e> |
69e: 82 30 cpi r24, 0x02 ; 2 |
6a0: 41 f5 brne .+80 ; 0x6f2 <FrameMgr_dispatchEvent+0x60> |
6a2: 07 c0 rjmp .+14 ; 0x6b2 <FrameMgr_dispatchEvent+0x20> |
6a4: 80 38 cpi r24, 0x80 ; 128 |
6a6: 99 f0 breq .+38 ; 0x6ce <FrameMgr_dispatchEvent+0x3c> |
6a8: 81 38 cpi r24, 0x81 ; 129 |
6aa: 09 f1 breq .+66 ; 0x6ee <FrameMgr_dispatchEvent+0x5c> |
6ac: 80 32 cpi r24, 0x20 ; 32 |
6ae: 09 f5 brne .+66 ; 0x6f2 <FrameMgr_dispatchEvent+0x60> |
6b0: 13 c0 rjmp .+38 ; 0x6d8 <FrameMgr_dispatchEvent+0x46> |
6b2: 61 e0 ldi r22, 0x01 ; 1 |
6b4: 81 e1 ldi r24, 0x11 ; 17 |
6b6: 9b d3 rcall .+1846 ; 0xdee <CamConfig_setCamReg> |
6b8: 9f d3 rcall .+1854 ; 0xdf8 <CamConfig_sendFifoCmds> |
6ba: 88 ee ldi r24, 0xE8 ; 232 |
6bc: 93 e0 ldi r25, 0x03 ; 3 |
6be: e7 d3 rcall .+1998 ; 0xe8e <Utility_delay> |
6c0: 10 92 75 00 sts 0x0075, r1 |
6c4: 82 e0 ldi r24, 0x02 ; 2 |
6c6: 80 93 74 00 sts 0x0074, r24 |
6ca: 92 df rcall .-220 ; 0x5f0 <FrameMgr_acquireLine> |
6cc: 08 95 ret |
6ce: 81 e0 ldi r24, 0x01 ; 1 |
6d0: 80 93 74 00 sts 0x0074, r24 |
6d4: c4 df rcall .-120 ; 0x65e <FrameMgr_acquireFrame> |
6d6: 08 95 ret |
6d8: cb dd rcall .-1130 ; 0x270 <FrameMgr_processFrame> |
6da: 08 95 ret |
6dc: c0 df rcall .-128 ; 0x65e <FrameMgr_acquireFrame> |
6de: 08 95 ret |
6e0: 80 91 74 00 lds r24, 0x0074 |
6e4: 88 23 and r24, r24 |
6e6: 29 f0 breq .+10 ; 0x6f2 <FrameMgr_dispatchEvent+0x60> |
6e8: 84 e0 ldi r24, 0x04 ; 4 |
6ea: 4b dd rcall .-1386 ; 0x182 <Exec_writeEventFifo> |
6ec: 08 95 ret |
6ee: 10 92 74 00 sts 0x0074, r1 |
6f2: 08 95 ret |
000006f4 <UIMgr_writeBufferToTxFifo>: |
6f4: dc 01 movw r26, r24 |
6f6: 86 2f mov r24, r22 |
6f8: 66 23 and r22, r22 |
6fa: c9 f0 breq .+50 ; 0x72e <UIMgr_writeBufferToTxFifo+0x3a> |
6fc: f8 94 cli |
6fe: 61 50 subi r22, 0x01 ; 1 |
700: 6f 3f cpi r22, 0xFF ; 255 |
702: a1 f0 breq .+40 ; 0x72c <UIMgr_writeBufferToTxFifo+0x38> |
704: 26 2f mov r18, r22 |
706: 44 e9 ldi r20, 0x94 ; 148 |
708: 52 e0 ldi r21, 0x02 ; 2 |
70a: 86 1b sub r24, r22 |
70c: 68 2f mov r22, r24 |
70e: 62 50 subi r22, 0x02 ; 2 |
710: 80 91 ba 00 lds r24, 0x00BA |
714: fa 01 movw r30, r20 |
716: e8 0f add r30, r24 |
718: f1 1d adc r31, r1 |
71a: 9d 91 ld r25, X+ |
71c: 90 83 st Z, r25 |
71e: 8f 5f subi r24, 0xFF ; 255 |
720: 8f 73 andi r24, 0x3F ; 63 |
722: 80 93 ba 00 sts 0x00BA, r24 |
726: 21 50 subi r18, 0x01 ; 1 |
728: 62 17 cp r22, r18 |
72a: 91 f7 brne .-28 ; 0x710 <UIMgr_writeBufferToTxFifo+0x1c> |
72c: 78 94 sei |
72e: 08 95 ret |
00000730 <UIMgr_readTxFifo>: |
730: f8 94 cli |
732: 90 91 bb 00 lds r25, 0x00BB |
736: e4 e9 ldi r30, 0x94 ; 148 |
738: f2 e0 ldi r31, 0x02 ; 2 |
73a: e9 0f add r30, r25 |
73c: f1 1d adc r31, r1 |
73e: 80 81 ld r24, Z |
740: 9f 5f subi r25, 0xFF ; 255 |
742: 9f 73 andi r25, 0x3F ; 63 |
744: 90 93 bb 00 sts 0x00BB, r25 |
748: 78 94 sei |
74a: 99 27 eor r25, r25 |
74c: 08 95 ret |
0000074e <UIMgr_writeTxFifo>: |
74e: f8 94 cli |
750: 90 91 ba 00 lds r25, 0x00BA |
754: e4 e9 ldi r30, 0x94 ; 148 |
756: f2 e0 ldi r31, 0x02 ; 2 |
758: e9 0f add r30, r25 |
75a: f1 1d adc r31, r1 |
75c: 80 83 st Z, r24 |
75e: 9f 5f subi r25, 0xFF ; 255 |
760: 9f 73 andi r25, 0x3F ; 63 |
762: 90 93 ba 00 sts 0x00BA, r25 |
766: 78 94 sei |
768: 08 95 ret |
0000076a <UIMgr_flushTxBuffer>: |
76a: 90 91 ba 00 lds r25, 0x00BA |
76e: 80 91 bb 00 lds r24, 0x00BB |
772: 98 17 cp r25, r24 |
774: 41 f0 breq .+16 ; 0x786 <UIMgr_flushTxBuffer+0x1c> |
776: dc df rcall .-72 ; 0x730 <UIMgr_readTxFifo> |
778: f5 d1 rcall .+1002 ; 0xb64 <UartInt_txByte> |
77a: 90 91 ba 00 lds r25, 0x00BA |
77e: 80 91 bb 00 lds r24, 0x00BB |
782: 98 17 cp r25, r24 |
784: c1 f7 brne .-16 ; 0x776 <UIMgr_flushTxBuffer+0xc> |
786: 08 95 ret |
00000788 <UIMgr_txBuffer>: |
788: 0f 93 push r16 |
78a: 1f 93 push r17 |
78c: cf 93 push r28 |
78e: df 93 push r29 |
790: ec 01 movw r28, r24 |
792: 86 2f mov r24, r22 |
794: 61 50 subi r22, 0x01 ; 1 |
796: 6f 3f cpi r22, 0xFF ; 255 |
798: 49 f0 breq .+18 ; 0x7ac <UIMgr_txBuffer+0x24> |
79a: 16 2f mov r17, r22 |
79c: 86 1b sub r24, r22 |
79e: 08 2f mov r16, r24 |
7a0: 02 50 subi r16, 0x02 ; 2 |
7a2: 89 91 ld r24, Y+ |
7a4: df d1 rcall .+958 ; 0xb64 <UartInt_txByte> |
7a6: 11 50 subi r17, 0x01 ; 1 |
7a8: 01 17 cp r16, r17 |
7aa: d9 f7 brne .-10 ; 0x7a2 <UIMgr_txBuffer+0x1a> |
7ac: df 91 pop r29 |
7ae: cf 91 pop r28 |
7b0: 1f 91 pop r17 |
7b2: 0f 91 pop r16 |
7b4: 08 95 ret |
000007b6 <UIMgr_transmitPendingData>: |
7b6: 90 91 ba 00 lds r25, 0x00BA |
7ba: 80 91 bb 00 lds r24, 0x00BB |
7be: 98 17 cp r25, r24 |
7c0: 11 f0 breq .+4 ; 0x7c6 <UIMgr_transmitPendingData+0x10> |
7c2: b6 df rcall .-148 ; 0x730 <UIMgr_readTxFifo> |
7c4: cf d1 rcall .+926 ; 0xb64 <UartInt_txByte> |
7c6: 08 95 ret |
000007c8 <UIMgr_convertTokenToCmd>: |
7c8: 90 91 bf 00 lds r25, 0x00BF |
7cc: 90 35 cpi r25, 0x50 ; 80 |
7ce: 41 f4 brne .+16 ; 0x7e0 <UIMgr_convertTokenToCmd+0x18> |
7d0: 80 91 c0 00 lds r24, 0x00C0 |
7d4: 87 34 cpi r24, 0x47 ; 71 |
7d6: 09 f5 brne .+66 ; 0x81a <UIMgr_convertTokenToCmd+0x52> |
7d8: 81 e0 ldi r24, 0x01 ; 1 |
7da: 80 93 62 00 sts 0x0062, r24 |
7de: 48 c0 rjmp .+144 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
7e0: 97 34 cpi r25, 0x47 ; 71 |
7e2: 39 f4 brne .+14 ; 0x7f2 <UIMgr_convertTokenToCmd+0x2a> |
7e4: 80 91 c0 00 lds r24, 0x00C0 |
7e8: 86 35 cpi r24, 0x56 ; 86 |
7ea: 09 f5 brne .+66 ; 0x82e <UIMgr_convertTokenToCmd+0x66> |
7ec: 10 92 62 00 sts 0x0062, r1 |
7f0: 3f c0 rjmp .+126 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
7f2: 94 34 cpi r25, 0x44 ; 68 |
7f4: 41 f4 brne .+16 ; 0x806 <UIMgr_convertTokenToCmd+0x3e> |
7f6: 80 91 c0 00 lds r24, 0x00C0 |
7fa: 86 34 cpi r24, 0x46 ; 70 |
7fc: 11 f5 brne .+68 ; 0x842 <UIMgr_convertTokenToCmd+0x7a> |
7fe: 83 e0 ldi r24, 0x03 ; 3 |
800: 80 93 62 00 sts 0x0062, r24 |
804: 35 c0 rjmp .+106 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
806: 93 34 cpi r25, 0x43 ; 67 |
808: 41 f4 brne .+16 ; 0x81a <UIMgr_convertTokenToCmd+0x52> |
80a: 80 91 c0 00 lds r24, 0x00C0 |
80e: 82 35 cpi r24, 0x52 ; 82 |
810: 11 f5 brne .+68 ; 0x856 <UIMgr_convertTokenToCmd+0x8e> |
812: 82 e0 ldi r24, 0x02 ; 2 |
814: 80 93 62 00 sts 0x0062, r24 |
818: 2b c0 rjmp .+86 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
81a: 95 34 cpi r25, 0x45 ; 69 |
81c: 41 f4 brne .+16 ; 0x82e <UIMgr_convertTokenToCmd+0x66> |
81e: 80 91 c0 00 lds r24, 0x00C0 |
822: 84 35 cpi r24, 0x54 ; 84 |
824: 11 f5 brne .+68 ; 0x86a <UIMgr_convertTokenToCmd+0xa2> |
826: 84 e0 ldi r24, 0x04 ; 4 |
828: 80 93 62 00 sts 0x0062, r24 |
82c: 21 c0 rjmp .+66 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
82e: 93 35 cpi r25, 0x53 ; 83 |
830: 41 f4 brne .+16 ; 0x842 <UIMgr_convertTokenToCmd+0x7a> |
832: 80 91 c0 00 lds r24, 0x00C0 |
836: 8d 34 cpi r24, 0x4D ; 77 |
838: c1 f4 brne .+48 ; 0x86a <UIMgr_convertTokenToCmd+0xa2> |
83a: 86 e0 ldi r24, 0x06 ; 6 |
83c: 80 93 62 00 sts 0x0062, r24 |
840: 17 c0 rjmp .+46 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
842: 94 34 cpi r25, 0x44 ; 68 |
844: 41 f4 brne .+16 ; 0x856 <UIMgr_convertTokenToCmd+0x8e> |
846: 80 91 c0 00 lds r24, 0x00C0 |
84a: 84 35 cpi r24, 0x54 ; 84 |
84c: 71 f4 brne .+28 ; 0x86a <UIMgr_convertTokenToCmd+0xa2> |
84e: 85 e0 ldi r24, 0x05 ; 5 |
850: 80 93 62 00 sts 0x0062, r24 |
854: 0d c0 rjmp .+26 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
856: 92 35 cpi r25, 0x52 ; 82 |
858: 41 f4 brne .+16 ; 0x86a <UIMgr_convertTokenToCmd+0xa2> |
85a: 80 91 c0 00 lds r24, 0x00C0 |
85e: 83 35 cpi r24, 0x53 ; 83 |
860: 21 f4 brne .+8 ; 0x86a <UIMgr_convertTokenToCmd+0xa2> |
862: 87 e0 ldi r24, 0x07 ; 7 |
864: 80 93 62 00 sts 0x0062, r24 |
868: 03 c0 rjmp .+6 ; 0x870 <UIMgr_convertTokenToCmd+0xa8> |
86a: 89 e0 ldi r24, 0x09 ; 9 |
86c: 80 93 62 00 sts 0x0062, r24 |
870: 83 e0 ldi r24, 0x03 ; 3 |
872: ef eb ldi r30, 0xBF ; 191 |
874: f0 e0 ldi r31, 0x00 ; 0 |
876: 11 92 st Z+, r1 |
878: 8a 95 dec r24 |
87a: e9 f7 brne .-6 ; 0x876 <UIMgr_convertTokenToCmd+0xae> |
87c: 10 92 be 00 sts 0x00BE, r1 |
880: 10 92 bd 00 sts 0x00BD, r1 |
884: 08 95 ret |
00000886 <UIMgr_init>: |
886: 10 92 bf 00 sts 0x00BF, r1 |
88a: 10 92 c0 00 sts 0x00C0, r1 |
88e: 10 92 c1 00 sts 0x00C1, r1 |
892: 10 92 c2 00 sts 0x00C2, r1 |
896: 80 e4 ldi r24, 0x40 ; 64 |
898: e3 ec ldi r30, 0xC3 ; 195 |
89a: f0 e0 ldi r31, 0x00 ; 0 |
89c: 98 2f mov r25, r24 |
89e: 11 92 st Z+, r1 |
8a0: 9a 95 dec r25 |
8a2: e9 f7 brne .-6 ; 0x89e <UIMgr_init+0x18> |
8a4: e4 e9 ldi r30, 0x94 ; 148 |
8a6: f2 e0 ldi r31, 0x02 ; 2 |
8a8: 11 92 st Z+, r1 |
8aa: 8a 95 dec r24 |
8ac: e9 f7 brne .-6 ; 0x8a8 <UIMgr_init+0x22> |
8ae: 80 e2 ldi r24, 0x20 ; 32 |
8b0: e4 e7 ldi r30, 0x74 ; 116 |
8b2: f2 e0 ldi r31, 0x02 ; 2 |
8b4: 11 92 st Z+, r1 |
8b6: 8a 95 dec r24 |
8b8: e9 f7 brne .-6 ; 0x8b4 <UIMgr_init+0x2e> |
8ba: 08 95 ret |
000008bc <UIMgr_convertTokenToValue>: |
8bc: 8f eb ldi r24, 0xBF ; 191 |
8be: 90 e0 ldi r25, 0x00 ; 0 |
8c0: b0 d3 rcall .+1888 ; 0x1022 <atoi> |
8c2: 9c 01 movw r18, r24 |
8c4: 8f 3f cpi r24, 0xFF ; 255 |
8c6: 91 05 cpc r25, r1 |
8c8: 69 f0 breq .+26 ; 0x8e4 <UIMgr_convertTokenToValue+0x28> |
8ca: 60 f0 brcs .+24 ; 0x8e4 <UIMgr_convertTokenToValue+0x28> |
8cc: 89 e0 ldi r24, 0x09 ; 9 |
8ce: 80 93 62 00 sts 0x0062, r24 |
8d2: 80 91 bc 00 lds r24, 0x00BC |
8d6: e3 ec ldi r30, 0xC3 ; 195 |
8d8: f0 e0 ldi r31, 0x00 ; 0 |
8da: e8 0f add r30, r24 |
8dc: f1 1d adc r31, r1 |
8de: 8f ef ldi r24, 0xFF ; 255 |
8e0: 80 83 st Z, r24 |
8e2: 07 c0 rjmp .+14 ; 0x8f2 <UIMgr_convertTokenToValue+0x36> |
8e4: 80 91 bc 00 lds r24, 0x00BC |
8e8: e3 ec ldi r30, 0xC3 ; 195 |
8ea: f0 e0 ldi r31, 0x00 ; 0 |
8ec: e8 0f add r30, r24 |
8ee: f1 1d adc r31, r1 |
8f0: 20 83 st Z, r18 |
8f2: 83 e0 ldi r24, 0x03 ; 3 |
8f4: ef eb ldi r30, 0xBF ; 191 |
8f6: f0 e0 ldi r31, 0x00 ; 0 |
8f8: 11 92 st Z+, r1 |
8fa: 8a 95 dec r24 |
8fc: e9 f7 brne .-6 ; 0x8f8 <UIMgr_convertTokenToValue+0x3c> |
8fe: 10 92 be 00 sts 0x00BE, r1 |
902: 10 92 bd 00 sts 0x00BD, r1 |
906: 08 95 ret |
00000908 <UIMgr_processReceivedData>: |
908: ff 92 push r15 |
90a: 0f 93 push r16 |
90c: 1f 93 push r17 |
90e: cf 93 push r28 |
910: df 93 push r29 |
912: 0f 2e mov r0, r31 |
914: f9 e0 ldi r31, 0x09 ; 9 |
916: ff 2e mov r15, r31 |
918: f0 2d mov r31, r0 |
91a: ff c0 rjmp .+510 ; 0xb1a <UIMgr_processReceivedData+0x212> |
91c: f8 94 cli |
91e: e2 2f mov r30, r18 |
920: ff 27 eor r31, r31 |
922: ec 58 subi r30, 0x8C ; 140 |
924: fd 4f sbci r31, 0xFD ; 253 |
926: 90 81 ld r25, Z |
928: 82 2f mov r24, r18 |
92a: 8f 5f subi r24, 0xFF ; 255 |
92c: 8f 71 andi r24, 0x1F ; 31 |
92e: 80 93 b9 00 sts 0x00B9, r24 |
932: 78 94 sei |
934: 9d 30 cpi r25, 0x0D ; 13 |
936: 09 f0 breq .+2 ; 0x93a <UIMgr_processReceivedData+0x32> |
938: b1 c0 rjmp .+354 ; 0xa9c <UIMgr_processReceivedData+0x194> |
93a: 80 91 bc 00 lds r24, 0x00BC |
93e: 88 23 and r24, r24 |
940: 11 f4 brne .+4 ; 0x946 <UIMgr_processReceivedData+0x3e> |
942: 42 df rcall .-380 ; 0x7c8 <UIMgr_convertTokenToCmd> |
944: 06 c0 rjmp .+12 ; 0x952 <UIMgr_processReceivedData+0x4a> |
946: ba df rcall .-140 ; 0x8bc <UIMgr_convertTokenToValue> |
948: 80 91 bc 00 lds r24, 0x00BC |
94c: 8f 5f subi r24, 0xFF ; 255 |
94e: 80 93 bc 00 sts 0x00BC, r24 |
952: 84 e6 ldi r24, 0x64 ; 100 |
954: 90 e0 ldi r25, 0x00 ; 0 |
956: 9b d2 rcall .+1334 ; 0xe8e <Utility_delay> |
958: 80 91 62 00 lds r24, 0x0062 |
95c: 88 50 subi r24, 0x08 ; 8 |
95e: 82 30 cpi r24, 0x02 ; 2 |
960: 58 f4 brcc .+22 ; 0x978 <UIMgr_processReceivedData+0x70> |
962: 8e e4 ldi r24, 0x4E ; 78 |
964: f4 de rcall .-536 ; 0x74e <UIMgr_writeTxFifo> |
966: 83 e4 ldi r24, 0x43 ; 67 |
968: f2 de rcall .-540 ; 0x74e <UIMgr_writeTxFifo> |
96a: 8b e4 ldi r24, 0x4B ; 75 |
96c: f0 de rcall .-544 ; 0x74e <UIMgr_writeTxFifo> |
96e: 8d e0 ldi r24, 0x0D ; 13 |
970: ee de rcall .-548 ; 0x74e <UIMgr_writeTxFifo> |
972: 80 e9 ldi r24, 0x90 ; 144 |
974: 06 dc rcall .-2036 ; 0x182 <Exec_writeEventFifo> |
976: 89 c0 rjmp .+274 ; 0xa8a <UIMgr_processReceivedData+0x182> |
978: 81 e4 ldi r24, 0x41 ; 65 |
97a: e9 de rcall .-558 ; 0x74e <UIMgr_writeTxFifo> |
97c: 83 e4 ldi r24, 0x43 ; 67 |
97e: e7 de rcall .-562 ; 0x74e <UIMgr_writeTxFifo> |
980: 8b e4 ldi r24, 0x4B ; 75 |
982: e5 de rcall .-566 ; 0x74e <UIMgr_writeTxFifo> |
984: 8d e0 ldi r24, 0x0D ; 13 |
986: e3 de rcall .-570 ; 0x74e <UIMgr_writeTxFifo> |
988: 80 e9 ldi r24, 0x90 ; 144 |
98a: fb db rcall .-2058 ; 0x182 <Exec_writeEventFifo> |
98c: 80 91 62 00 lds r24, 0x0062 |
990: 81 30 cpi r24, 0x01 ; 1 |
992: 09 f4 brne .+2 ; 0x996 <UIMgr_processReceivedData+0x8e> |
994: 7a c0 rjmp .+244 ; 0xa8a <UIMgr_processReceivedData+0x182> |
996: 88 23 and r24, r24 |
998: 71 f4 brne .+28 ; 0x9b6 <UIMgr_processReceivedData+0xae> |
99a: 80 91 63 00 lds r24, 0x0063 |
99e: 88 23 and r24, r24 |
9a0: 09 f4 brne .+2 ; 0x9a4 <UIMgr_processReceivedData+0x9c> |
9a2: 73 c0 rjmp .+230 ; 0xa8a <UIMgr_processReceivedData+0x182> |
9a4: c3 e6 ldi r28, 0x63 ; 99 |
9a6: d0 e0 ldi r29, 0x00 ; 0 |
9a8: 21 96 adiw r28, 0x01 ; 1 |
9aa: d1 de rcall .-606 ; 0x74e <UIMgr_writeTxFifo> |
9ac: 88 81 ld r24, Y |
9ae: 88 23 and r24, r24 |
9b0: 09 f4 brne .+2 ; 0x9b4 <UIMgr_processReceivedData+0xac> |
9b2: 6b c0 rjmp .+214 ; 0xa8a <UIMgr_processReceivedData+0x182> |
9b4: f9 cf rjmp .-14 ; 0x9a8 <UIMgr_processReceivedData+0xa0> |
9b6: 87 30 cpi r24, 0x07 ; 7 |
9b8: 11 f4 brne .+4 ; 0x9be <UIMgr_processReceivedData+0xb6> |
9ba: a1 db rcall .-2238 ; 0xfe <CamInt_resetCam> |
9bc: 66 c0 rjmp .+204 ; 0xa8a <UIMgr_processReceivedData+0x182> |
9be: 83 30 cpi r24, 0x03 ; 3 |
9c0: 31 f4 brne .+12 ; 0x9ce <UIMgr_processReceivedData+0xc6> |
9c2: 84 e6 ldi r24, 0x64 ; 100 |
9c4: 90 e0 ldi r25, 0x00 ; 0 |
9c6: 63 d2 rcall .+1222 ; 0xe8e <Utility_delay> |
9c8: 82 e0 ldi r24, 0x02 ; 2 |
9ca: db db rcall .-2122 ; 0x182 <Exec_writeEventFifo> |
9cc: 5e c0 rjmp .+188 ; 0xa8a <UIMgr_processReceivedData+0x182> |
9ce: 82 30 cpi r24, 0x02 ; 2 |
9d0: 99 f4 brne .+38 ; 0x9f8 <UIMgr_processReceivedData+0xf0> |
9d2: 80 91 bc 00 lds r24, 0x00BC |
9d6: 82 30 cpi r24, 0x02 ; 2 |
9d8: 68 f0 brcs .+26 ; 0x9f4 <UIMgr_processReceivedData+0xec> |
9da: 11 e0 ldi r17, 0x01 ; 1 |
9dc: e1 2f mov r30, r17 |
9de: ff 27 eor r31, r31 |
9e0: ed 53 subi r30, 0x3D ; 61 |
9e2: ff 4f sbci r31, 0xFF ; 255 |
9e4: 61 81 ldd r22, Z+1 ; 0x01 |
9e6: 80 81 ld r24, Z |
9e8: 02 d2 rcall .+1028 ; 0xdee <CamConfig_setCamReg> |
9ea: 1e 5f subi r17, 0xFE ; 254 |
9ec: 80 91 bc 00 lds r24, 0x00BC |
9f0: 18 17 cp r17, r24 |
9f2: a0 f3 brcs .-24 ; 0x9dc <UIMgr_processReceivedData+0xd4> |
9f4: 01 d2 rcall .+1026 ; 0xdf8 <CamConfig_sendFifoCmds> |
9f6: 49 c0 rjmp .+146 ; 0xa8a <UIMgr_processReceivedData+0x182> |
9f8: 84 30 cpi r24, 0x04 ; 4 |
9fa: 31 f4 brne .+12 ; 0xa08 <UIMgr_processReceivedData+0x100> |
9fc: 84 e6 ldi r24, 0x64 ; 100 |
9fe: 90 e0 ldi r25, 0x00 ; 0 |
a00: 46 d2 rcall .+1164 ; 0xe8e <Utility_delay> |
a02: 80 e8 ldi r24, 0x80 ; 128 |
a04: be db rcall .-2180 ; 0x182 <Exec_writeEventFifo> |
a06: 41 c0 rjmp .+130 ; 0xa8a <UIMgr_processReceivedData+0x182> |
a08: 85 30 cpi r24, 0x05 ; 5 |
a0a: 19 f4 brne .+6 ; 0xa12 <UIMgr_processReceivedData+0x10a> |
a0c: 81 e8 ldi r24, 0x81 ; 129 |
a0e: b9 db rcall .-2190 ; 0x182 <Exec_writeEventFifo> |
a10: 3c c0 rjmp .+120 ; 0xa8a <UIMgr_processReceivedData+0x182> |
a12: 86 30 cpi r24, 0x06 ; 6 |
a14: 09 f0 breq .+2 ; 0xa18 <UIMgr_processReceivedData+0x110> |
a16: 39 c0 rjmp .+114 ; 0xa8a <UIMgr_processReceivedData+0x182> |
a18: 80 91 bc 00 lds r24, 0x00BC |
a1c: 88 23 and r24, r24 |
a1e: 09 f4 brne .+2 ; 0xa22 <UIMgr_processReceivedData+0x11a> |
a20: 34 c0 rjmp .+104 ; 0xa8a <UIMgr_processReceivedData+0x182> |
a22: 40 e0 ldi r20, 0x00 ; 0 |
a24: 03 ec ldi r16, 0xC3 ; 195 |
a26: 10 e0 ldi r17, 0x00 ; 0 |
a28: 60 e0 ldi r22, 0x00 ; 0 |
a2a: 73 e0 ldi r23, 0x03 ; 3 |
a2c: 84 2f mov r24, r20 |
a2e: 99 27 eor r25, r25 |
a30: 9c 01 movw r18, r24 |
a32: 2f 5f subi r18, 0xFF ; 255 |
a34: 3f 4f sbci r19, 0xFF ; 255 |
a36: f9 01 movw r30, r18 |
a38: e0 0f add r30, r16 |
a3a: f1 1f adc r31, r17 |
a3c: e0 81 ld r30, Z |
a3e: ec 01 movw r28, r24 |
a40: c6 0f add r28, r22 |
a42: d7 1f adc r29, r23 |
a44: e8 83 st Y, r30 |
uint8_t |
eeprom_read_byte (const uint8_t *addr) |
{ |
uint8_t result; |
asm volatile |
a46: d9 01 movw r26, r18 |
a48: 20 d3 rcall .+1600 ; 0x108a <__eeprom_read_byte_1C1D1E> |
a4a: 80 2d mov r24, r0 |
static unsigned char tokenBuffer[MAX_TOKEN_COUNT]; |
static UIMgr_Cmd_t receivedCmd = noCmd; |
static unsigned char AVRcamVersion[] = "AVRcam v1.4\r"; |
/* we can't just call acquire line again here, |
since we don't know if we need to acquire another |
line or not (it depends on the FrameMgr to figure |
this out) */ |
} |
if (fastEventBitmask & FEV_PROCESS_LINE_COMPLETE) |
1a4: 80 91 72 00 lds r24, 0x0072 |
1a8: 81 ff sbrs r24, 1 |
1aa: 08 c0 rjmp .+16 ; 0x1bc |
{ |
DISABLE_INTS(); |
1ac: f8 94 cli |
fastEventBitmask &= ~FEV_PROCESS_LINE_COMPLETE; |
1ae: 80 91 72 00 lds r24, 0x0072 |
1b2: 8d 7f andi r24, 0xFD ; 253 |
1b4: 80 93 72 00 sts 0x0072, r24 |
ENABLE_INTS(); |
1b8: 78 94 sei |
FrameMgr_acquireLine(); |
1ba: b9 d0 rcall .+370 ; 0x32e |
} |
} |
if (IS_DATA_IN_EVENT_FIFO() == TRUE) |
1bc: 90 91 70 00 lds r25, 0x0070 |
1c0: 80 91 71 00 lds r24, 0x0071 |
1c4: 98 17 cp r25, r24 |
1c6: f9 f2 breq .-66 ; 0x186 |
{ |
eventGenerated = Exec_readEventFifo(); |
1c8: 32 d0 rcall .+100 ; 0x22e |
1ca: c8 2f mov r28, r24 |
switch(eventGenerated) |
1cc: 99 27 eor r25, r25 |
1ce: 80 31 cpi r24, 0x10 ; 16 |
1d0: 91 05 cpc r25, r1 |
1d2: 11 f1 breq .+68 ; 0x218 |
1d4: 81 31 cpi r24, 0x11 ; 17 |
1d6: 91 05 cpc r25, r1 |
1d8: 7c f4 brge .+30 ; 0x1f8 |
1da: 82 30 cpi r24, 0x02 ; 2 |
1dc: 91 05 cpc r25, r1 |
1de: 09 f1 breq .+66 ; 0x222 |
1e0: 83 30 cpi r24, 0x03 ; 3 |
1e2: 91 05 cpc r25, r1 |
1e4: 1c f4 brge .+6 ; 0x1ec |
1e6: 01 97 sbiw r24, 0x01 ; 1 |
1e8: d1 f0 breq .+52 ; 0x21e |
1ea: cd cf rjmp .-102 ; 0x186 |
1ec: 84 30 cpi r24, 0x04 ; 4 |
1ee: 91 05 cpc r25, r1 |
1f0: c1 f0 breq .+48 ; 0x222 |
1f2: 08 97 sbiw r24, 0x08 ; 8 |
1f4: b1 f0 breq .+44 ; 0x222 |
1f6: c7 cf rjmp .-114 ; 0x186 |
1f8: 80 38 cpi r24, 0x80 ; 128 |
1fa: 91 05 cpc r25, r1 |
1fc: 91 f0 breq .+36 ; 0x222 |
1fe: 81 38 cpi r24, 0x81 ; 129 |
200: 91 05 cpc r25, r1 |
202: 1c f4 brge .+6 ; 0x20a |
204: 80 97 sbiw r24, 0x20 ; 32 |
206: 69 f0 breq .+26 ; 0x222 |
208: be cf rjmp .-132 ; 0x186 |
20a: 81 38 cpi r24, 0x81 ; 129 |
20c: 91 05 cpc r25, r1 |
20e: 49 f0 breq .+18 ; 0x222 |
210: 80 39 cpi r24, 0x90 ; 144 |
212: 91 05 cpc r25, r1 |
214: 49 f0 breq .+18 ; 0x228 |
216: b7 cf rjmp .-146 ; 0x186 |
{ |
case (EV_DUMP_FRAME): |
FrameMgr_dispatchEvent(eventGenerated); |
break; |
case (EV_ENABLE_TRACKING): |
FrameMgr_dispatchEvent(eventGenerated); |
break; |
case (EV_DISABLE_TRACKING): |
FrameMgr_dispatchEvent(eventGenerated); |
break; |
case (EV_ACQUIRE_LINE_COMPLETE): |
FrameMgr_dispatchEvent(eventGenerated); |
218: 8c 2f mov r24, r28 |
21a: 33 d0 rcall .+102 ; 0x282 |
UIMgr_dispatchEvent(eventGenerated); |
21c: 05 c0 rjmp .+10 ; 0x228 |
break; |
case (EV_ACQUIRE_FRAME_COMPLETE): |
FrameMgr_dispatchEvent(eventGenerated); |
break; |
case (EV_PROCESS_LINE_COMPLETE): |
FrameMgr_dispatchEvent(eventGenerated); |
break; |
case (EV_PROCESS_FRAME_COMPLETE): |
FrameMgr_dispatchEvent(eventGenerated); |
break; |
case (EV_SERIAL_DATA_RECEIVED): |
UIMgr_dispatchEvent(eventGenerated); |
21e: 8c 2f mov r24, r28 |
220: 58 d2 rcall .+1200 ; 0x6d2 |
FrameMgr_dispatchEvent(eventGenerated); |
222: 8c 2f mov r24, r28 |
224: 2e d0 rcall .+92 ; 0x282 |
break; |
226: af cf rjmp .-162 ; 0x186 |
/* Local Function Declaration */ |
static unsigned char UIMgr_readRxFifo(void); |
static unsigned char UIMgr_readTxFifo(void); |
static unsigned char UIMgr_readRxFifo(void); |
static void UIMgr_sendNck(void); |
static void UIMgr_sendAck(void); |
static void UIMgr_convertTokenToCmd(void); |
static void UIMgr_convertTokenToValue(void); |
static void UIMgr_executeCmd(void); |
case (EV_SERIAL_DATA_PENDING_TX): |
UIMgr_dispatchEvent(eventGenerated); |
228: 8c 2f mov r24, r28 |
22a: 53 d2 rcall .+1190 ; 0x6d2 |
break; |
22c: ac cf rjmp .-168 ; 0x186 |
/* Extern Variables */ |
unsigned char UIMgr_rxFifo[UI_MGR_RX_FIFO_SIZE]; |
unsigned char UIMgr_rxFifoHead=0; |
unsigned char UIMgr_rxFifoTail=0; |
0000022e <Exec_readEventFifo>: |
default: |
break; |
} |
} |
/* toggle the debug line */ |
unsigned char UIMgr_txFifo[UI_MGR_TX_FIFO_SIZE]; |
unsigned char UIMgr_txFifoHead=0; |
unsigned char UIMgr_txFifoTail=0; |
} |
} |
/* Definitions */ |
#define IS_DATA_IN_TX_FIFO() (!(UIMgr_txFifoHead == UIMgr_txFifoTail)) |
#define IS_DATA_IN_RX_FIFO() (!(UIMgr_rxFifoHead == UIMgr_rxFifoTail)) |
/* MAX_EEPROM_WRITE_ATTEMPTS limits the number of writes that can be |
done to a particular EEPROM cell, so that it can't possible just |
write to the same cell over and over */ |
#define MAX_EEPROM_WRITE_ATTEMPTS 3 |
/*********************************************************** |
Function Name: Exec_readEventFifo |
Function Name: UIMgr_init |
Function Description: This function is responsible for |
reading a single event out of the event fifo. |
initializing the UIMgr module. It sets up the fifo |
used to hold incoming data, etc. |
Inputs: none |
Outputs: unsigned char-the data read |
***********************************************************/ |
static unsigned char Exec_readEventFifo(void) |
{ |
unsigned char dataByte, tmpTail; |
DISABLE_INTS(); |
22e: f8 94 cli |
/* just return the current tail from the tx fifo */ |
dataByte = Exec_eventFifo[Exec_eventFifoTail]; |
230: 20 91 71 00 lds r18, 0x0071 |
234: 8c e6 ldi r24, 0x6C ; 108 |
236: 92 e0 ldi r25, 0x02 ; 2 |
238: fc 01 movw r30, r24 |
23a: e2 0f add r30, r18 |
23c: f1 1d adc r31, r1 |
23e: 90 81 ld r25, Z |
tmpTail = (Exec_eventFifoTail+1) & (EXEC_EVENT_FIFO_MASK); |
240: 82 2f mov r24, r18 |
242: 8f 5f subi r24, 0xFF ; 255 |
244: 87 70 andi r24, 0x07 ; 7 |
Exec_eventFifoTail = tmpTail; |
246: 80 93 71 00 sts 0x0071, r24 |
ENABLE_INTS(); |
24a: 78 94 sei |
return(dataByte); |
24c: 89 2f mov r24, r25 |
24e: 99 27 eor r25, r25 |
} |
250: 08 95 ret |
00000252 <Exec_writeEventFifo>: |
/*********************************************************** |
Function Name: Exec_writeEventFifo |
Function Description: This function is responsible for |
writing a single event to the event fifo and |
updating the appropriate pointers. |
Inputs: data - the byte to write to the Fifo |
Outputs: none |
***********************************************************/ |
void Exec_writeEventFifo(unsigned char event) |
{ |
252: 38 2f mov r19, r24 |
unsigned char tmpHead; |
DISABLE_INTS(); |
254: f8 94 cli |
Exec_eventFifo[Exec_eventFifoHead] = event; |
256: 20 91 70 00 lds r18, 0x0070 |
25a: 8c e6 ldi r24, 0x6C ; 108 |
25c: 92 e0 ldi r25, 0x02 ; 2 |
25e: fc 01 movw r30, r24 |
260: e2 0f add r30, r18 |
262: f1 1d adc r31, r1 |
264: 30 83 st Z, r19 |
/* now move the head up */ |
tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK); |
266: 82 2f mov r24, r18 |
268: 8f 5f subi r24, 0xFF ; 255 |
26a: 87 70 andi r24, 0x07 ; 7 |
Exec_eventFifoHead = tmpHead; |
26c: 80 93 70 00 sts 0x0070, r24 |
ENABLE_INTS(); |
270: 78 94 sei |
} |
272: 08 95 ret |
00000274 <FrameMgr_init>: |
Outputs: none |
***********************************************************/ |
void FrameMgr_init(void) |
{ |
memset(trackedObjectTable,0x00,sizeof(trackedObjectTable)); |
274: 80 e4 ldi r24, 0x40 ; 64 |
276: e8 e7 ldi r30, 0x78 ; 120 |
278: f0 e0 ldi r31, 0x00 ; 0 |
27a: 11 92 st Z+, r1 |
27c: 8a 95 dec r24 |
27e: e9 f7 brne .-6 ; 0x27a |
} |
280: 08 95 ret |
00000282 <FrameMgr_dispatchEvent>: |
/*********************************************************** |
Function Name: FrameMgr_dispatchEvent |
Function Description: This function is responsible for |
taking an incoming event and performing the needed |
actions with it as pertains to the FrameMgr. |
Inputs: event - the generated event |
Outputs: none |
***********************************************************/ |
void FrameMgr_dispatchEvent(unsigned char event) |
{ |
switch(event) |
282: 99 27 eor r25, r25 |
284: 84 30 cpi r24, 0x04 ; 4 |
286: 91 05 cpc r25, r1 |
288: 51 f1 breq .+84 ; 0x2de |
28a: 85 30 cpi r24, 0x05 ; 5 |
28c: 91 05 cpc r25, r1 |
28e: 34 f4 brge .+12 ; 0x29c |
290: 81 30 cpi r24, 0x01 ; 1 |
292: 91 05 cpc r25, r1 |
294: 31 f1 breq .+76 ; 0x2e2 |
296: 02 97 sbiw r24, 0x02 ; 2 |
298: 71 f0 breq .+28 ; 0x2b6 |
{ |
case EV_DUMP_FRAME: |
/* try re-initializing the camera before we start dumping */ |
CamConfig_setCamReg(0x11,0x01); /* reduce the frame rate for dumping*/ |
CamConfig_sendFifoCmds(); |
Utility_delay(1000); /* allow the new frame rate to settle */ |
lineCount = 0; |
currentState = ST_FrameMgr_DumpingFrame; |
//CamIntAsm_waitForNewDumpFrame(currentLineBuffer,previousLineBuffer); |
FrameMgr_acquireLine(); |
break; |
case EV_ENABLE_TRACKING: |
currentState = ST_FrameMgr_TrackingFrame; |
FrameMgr_acquireFrame(); |
break; |
case EV_ACQUIRE_FRAME_COMPLETE: |
FrameMgr_processFrame(); |
break; |
case EV_PROCESS_FRAME_COMPLETE: |
FrameMgr_acquireFrame(); |
break; |
case EV_SERIAL_DATA_RECEIVED: |
if (currentState != ST_FrameMgr_idle) |
{ |
/* we need to go back to processing line data, since |
serial data reception interrupted us....just trash the |
frame and act like the frame has been processed, which |
will kick off the system to wait for the next line */ |
PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE); |
} |
break; |
case EV_DISABLE_TRACKING: |
/* tracking needs to be turned off */ |
currentState = ST_FrameMgr_idle; |
break; |
} |
} |
29a: 08 95 ret |
29c: 80 38 cpi r24, 0x80 ; 128 |
29e: 91 05 cpc r25, r1 |
2a0: c1 f0 breq .+48 ; 0x2d2 |
2a2: 81 38 cpi r24, 0x81 ; 129 |
2a4: 91 05 cpc r25, r1 |
2a6: 1c f4 brge .+6 ; 0x2ae |
2a8: 80 97 sbiw r24, 0x20 ; 32 |
2aa: b9 f0 breq .+46 ; 0x2da |
2ac: 08 95 ret |
2ae: 81 38 cpi r24, 0x81 ; 129 |
2b0: 91 05 cpc r25, r1 |
2b2: f1 f0 breq .+60 ; 0x2f0 |
2b4: 08 95 ret |
2b6: 61 e0 ldi r22, 0x01 ; 1 |
2b8: 81 e1 ldi r24, 0x11 ; 17 |
2ba: 66 d5 rcall .+2764 ; 0xd88 |
2bc: 6a d5 rcall .+2772 ; 0xd92 |
2be: 88 ee ldi r24, 0xE8 ; 232 |
2c0: 93 e0 ldi r25, 0x03 ; 3 |
2c2: c1 d5 rcall .+2946 ; 0xe46 |
2c4: 10 92 73 00 sts 0x0073, r1 |
2c8: 82 e0 ldi r24, 0x02 ; 2 |
2ca: 80 93 74 00 sts 0x0074, r24 |
2ce: 2f d0 rcall .+94 ; 0x32e |
2d0: 08 95 ret |
2d2: 81 e0 ldi r24, 0x01 ; 1 |
2d4: 80 93 74 00 sts 0x0074, r24 |
2d8: 02 c0 rjmp .+4 ; 0x2de |
2da: 18 d1 rcall .+560 ; 0x50c |
2dc: 08 95 ret |
2de: 0c d0 rcall .+24 ; 0x2f8 |
2e0: 08 95 ret |
2e2: 80 91 74 00 lds r24, 0x0074 |
2e6: 88 23 and r24, r24 |
2e8: 29 f0 breq .+10 ; 0x2f4 |
2ea: 84 e0 ldi r24, 0x04 ; 4 |
2ec: b2 df rcall .-156 ; 0x252 |
2ee: 08 95 ret |
2f0: 10 92 74 00 sts 0x0074, r1 |
2f4: 08 95 ret |
2f6: 08 95 ret |
000002f8 <FrameMgr_acquireFrame>: |
/*********************************************************** |
Function Name: FrameMgr_acquireFrame |
Function Description: This function is responsible for |
beginning of the acquisition of a new frame of data |
from the camera interface. The acquisition of this line |
depends on the current state of the FrameMgr. |
Inputs: none |
Outputs: none |
***********************************************************/ |
void FrameMgr_acquireFrame(void) |
{ |
if (currentState == ST_FrameMgr_TrackingFrame) |
2f8: 80 91 74 00 lds r24, 0x0074 |
2fc: 81 30 cpi r24, 0x01 ; 1 |
2fe: a9 f4 brne .+42 ; 0x32a |
{ |
trackedLineCount = 0; |
300: 10 92 77 00 sts 0x0077, r1 |
numPrevTrackedObjects = numCurrTrackedObjects; |
304: 80 91 75 00 lds r24, 0x0075 |
308: 80 93 76 00 sts 0x0076, r24 |
numCurrTrackedObjects = 0; |
30c: 10 92 75 00 sts 0x0075, r1 |
/* clear out the tracking table, and wait for the new frame |
to start */ |
memset(trackedObjectTable,0x00,sizeof(trackedObjectTable)); |
310: 80 e4 ldi r24, 0x40 ; 64 |
312: e8 e7 ldi r30, 0x78 ; 120 |
314: f0 e0 ldi r31, 0x00 ; 0 |
316: 11 92 st Z+, r1 |
318: 8a 95 dec r24 |
31a: e9 f7 brne .-6 ; 0x316 |
//CamIntAsm_waitForNewTrackingFrame(currentLineBuffer,colorMap); |
WAIT_FOR_VSYNC_HIGH(); |
31c: 82 9b sbis 0x10, 2 ; 16 |
31e: fe cf rjmp .-4 ; 0x31c |
CamIntAsm_acquireTrackingLine(currentLineBuffer,colorMap); |
320: 60 e0 ldi r22, 0x00 ; 0 |
322: 73 e0 ldi r23, 0x03 ; 3 |
324: 8c eb ldi r24, 0xBC ; 188 |
326: 91 e0 ldi r25, 0x01 ; 1 |
328: f0 d5 rcall .+3040 ; 0xf0a |
} |
} |
32a: 08 95 ret |
32c: 08 95 ret |
0000032e <FrameMgr_acquireLine>: |
/*********************************************************** |
Function Name: FrameMgr_acquireLine |
Function Description: This function is responsible for |
acquiring a line of data from the camera interface. |
The acquisition of this line depends on the current |
state of the FrameMgr. |
Inputs: none |
Outputs: none |
***********************************************************/ |
void FrameMgr_acquireLine(void) |
{ |
unsigned char tmpLineCount; |
/* clearing out the buffers takes too long...we should |
just overwrite the data here without a problem when |
we start acquiring...at no point do we check for |
a 0x00 value in the current or previous lineBuffers, |
so it was a bit excessive :-) */ |
/* check which state we are in and proceed as needed */ |
if (currentState == ST_FrameMgr_DumpingFrame) |
32e: 80 91 74 00 lds r24, 0x0074 |
332: 82 30 cpi r24, 0x02 ; 2 |
334: 11 f5 brne .+68 ; 0x37a |
{ |
tmpLineCount = lineCount*2; |
336: 80 91 73 00 lds r24, 0x0073 |
33a: 88 0f add r24, r24 |
/* clearing out the line data in dump mode is ok, and actually |
is needed, since it is possible for the first dump line in |
a frame to come back with the last line captured of the |
last capture session...*/ |
memset(currentLineBuffer,0x00,LENGTH_OF_LINE_BUFFER); |
33c: 90 eb ldi r25, 0xB0 ; 176 |
33e: ec eb ldi r30, 0xBC ; 188 |
340: f1 e0 ldi r31, 0x01 ; 1 |
342: 11 92 st Z+, r1 |
344: 9a 95 dec r25 |
346: e9 f7 brne .-6 ; 0x342 |
memset(previousLineBuffer,0x00,LENGTH_OF_LINE_BUFFER); |
348: 90 eb ldi r25, 0xB0 ; 176 |
34a: ec e0 ldi r30, 0x0C ; 12 |
34c: f1 e0 ldi r31, 0x01 ; 1 |
34e: 11 92 st Z+, r1 |
350: 9a 95 dec r25 |
352: e9 f7 brne .-6 ; 0x34e |
/* wait for another VSYNC so we know which frame to use |
to start looking for a line to receive */ |
WAIT_FOR_VSYNC_HIGH(); |
354: 82 9b sbis 0x10, 2 ; 16 |
356: fe cf rjmp .-4 ; 0x354 |
WAIT_FOR_VSYNC_LOW(); |
358: 82 99 sbic 0x10, 2 ; 16 |
35a: fe cf rjmp .-4 ; 0x358 |
/* look at lineCount to determine how many HREFs we should |
wait before we start sampling */ |
while(tmpLineCount != 0) |
35c: 88 23 and r24, r24 |
35e: 39 f0 breq .+14 ; 0x36e |
{ |
WAIT_FOR_HREF_HIGH(); |
360: 84 9b sbis 0x10, 4 ; 16 |
362: fe cf rjmp .-4 ; 0x360 |
tmpLineCount--; |
364: 81 50 subi r24, 0x01 ; 1 |
WAIT_FOR_HREF_LOW(); |
366: 84 99 sbic 0x10, 4 ; 16 |
368: fe cf rjmp .-4 ; 0x366 |
36a: 88 23 and r24, r24 |
36c: c9 f7 brne .-14 ; 0x360 |
} |
/* we should now be ready to sample our line...*/ |
CamIntAsm_acquireDumpLine(currentLineBuffer,previousLineBuffer); |
36e: 6c e0 ldi r22, 0x0C ; 12 |
370: 71 e0 ldi r23, 0x01 ; 1 |
372: 8c eb ldi r24, 0xBC ; 188 |
374: 91 e0 ldi r25, 0x01 ; 1 |
376: 10 d6 rcall .+3104 ; 0xf98 |
} |
else if (currentState == ST_FrameMgr_TrackingFrame) |
{ |
WAIT_FOR_HREF_LOW(); |
CamIntAsm_acquireTrackingLine(currentLineBuffer,colorMap); |
} |
} |
378: 08 95 ret |
37a: 80 91 74 00 lds r24, 0x0074 |
37e: 81 30 cpi r24, 0x01 ; 1 |
380: 39 f4 brne .+14 ; 0x390 |
382: 84 99 sbic 0x10, 4 ; 16 |
384: fe cf rjmp .-4 ; 0x382 |
386: 60 e0 ldi r22, 0x00 ; 0 |
388: 73 e0 ldi r23, 0x03 ; 3 |
38a: 8c eb ldi r24, 0xBC ; 188 |
38c: 91 e0 ldi r25, 0x01 ; 1 |
38e: bd d5 rcall .+2938 ; 0xf0a |
390: 08 95 ret |
00000392 <FrameMgr_processLine>: |
/*********************************************************** |
Function Name: FrameMgr_processLine |
Function Description: This function is responsible for |
parsing the received image line and performing either |
connected region mapping (if in the Tracking state) or |
sending out the raw sampled data (if in the Dumping |
state). |
Inputs: none |
Outputs: none |
***********************************************************/ |
void FrameMgr_processLine(void) |
{ |
392: df 92 push r13 |
394: ef 92 push r14 |
396: ff 92 push r15 |
398: 0f 93 push r16 |
39a: 1f 93 push r17 |
39c: cf 93 push r28 |
39e: df 93 push r29 |
3a0: cd b7 in r28, 0x3d ; 61 |
3a2: de b7 in r29, 0x3e ; 62 |
3a4: 21 97 sbiw r28, 0x01 ; 1 |
3a6: 0f b6 in r0, 0x3f ; 63 |
3a8: f8 94 cli |
3aa: de bf out 0x3e, r29 ; 62 |
3ac: 0f be out 0x3f, r0 ; 63 |
3ae: cd bf out 0x3d, r28 ; 61 |
unsigned char i; |
volatile unsigned char dataToSend; |
unsigned char *pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable; |
3b0: 00 91 60 00 lds r16, 0x0060 |
3b4: 10 91 61 00 lds r17, 0x0061 |
#ifdef DEBUG_TRACKED_LINE |
unsigned char *pSendData; |
unsigned char asciiBuffer[5]; |
unsigned char pixelCount = 0; |
#endif |
if (currentState == ST_FrameMgr_DumpingFrame) |
3b8: 80 91 74 00 lds r24, 0x0074 |
3bc: 82 30 cpi r24, 0x02 ; 2 |
3be: 09 f0 breq .+2 ; 0x3c2 |
3c0: 54 c0 rjmp .+168 ; 0x46a |
{ |
/* we want to sit in a tight loop and send the acquired data |
sitting in current and previous line buffers out the serial |
port...it is sent out the serial port immediately instead |
of going into the UIMgr tx fifo because we can't do anything |
until its sent out anyway...may as well just get it out now */ |
/* currentLineBuffer is getting "g" previousLineBuffer is getting "b-r" */ |
UartInt_txByte(0x0B); /* send the header byte */ |
3c2: 8b e0 ldi r24, 0x0B ; 11 |
3c4: cd d3 rcall .+1946 ; 0xb60 |
UartInt_txByte(lineCount); /* send the line count */ |
3c6: 80 91 73 00 lds r24, 0x0073 |
3ca: ca d3 rcall .+1940 ; 0xb60 |
for (i=0; i<NUM_PIXELS_IN_A_DUMP_LINE; i+=2) |
3cc: dd 24 eor r13, r13 |
{ |
/* when a dump line is sampled, the upper byte can potentially |
have garbage in it...we don't have time to mask it off as we're |
sampling, so it is done here before we send it out...we also |
combine the samples together so we really are sending up a |
sample for line N as well as line N+1 */ |
dataToSend = currentLineBuffer[i]; |
3ce: 2d 2d mov r18, r13 |
3d0: 33 27 eor r19, r19 |
3d2: 0f 2e mov r0, r31 |
3d4: fc eb ldi r31, 0xBC ; 188 |
3d6: ef 2e mov r14, r31 |
3d8: f1 e0 ldi r31, 0x01 ; 1 |
3da: ff 2e mov r15, r31 |
3dc: f0 2d mov r31, r0 |
3de: e2 0e add r14, r18 |
3e0: f3 1e adc r15, r19 |
3e2: f7 01 movw r30, r14 |
3e4: 80 81 ld r24, Z |
3e6: 89 83 std Y+1, r24 ; 0x01 |
dataToSend &= 0x0F; |
3e8: 89 81 ldd r24, Y+1 ; 0x01 |
3ea: 8f 70 andi r24, 0x0F ; 15 |
3ec: 89 83 std Y+1, r24 ; 0x01 |
dataToSend <<= 4; |
3ee: 89 81 ldd r24, Y+1 ; 0x01 |
3f0: 82 95 swap r24 |
3f2: 80 7f andi r24, 0xF0 ; 240 |
3f4: 89 83 std Y+1, r24 ; 0x01 |
dataToSend |= (previousLineBuffer[i] & 0x0F); |
3f6: 89 01 movw r16, r18 |
3f8: 04 5f subi r16, 0xF4 ; 244 |
3fa: 1e 4f sbci r17, 0xFE ; 254 |
3fc: f8 01 movw r30, r16 |
3fe: 80 81 ld r24, Z |
400: 98 2f mov r25, r24 |
402: 9f 70 andi r25, 0x0F ; 15 |
404: 89 81 ldd r24, Y+1 ; 0x01 |
406: 89 2b or r24, r25 |
408: 89 83 std Y+1, r24 ; 0x01 |
/* dataToSend should be packed now */ |
UartInt_txByte(dataToSend); |
40a: 89 81 ldd r24, Y+1 ; 0x01 |
40c: a9 d3 rcall .+1874 ; 0xb60 |
/* flip the colors around since we are doing all G on Y and BR on UV */ |
dataToSend = previousLineBuffer[i+1]; |
40e: f8 01 movw r30, r16 |
410: 81 81 ldd r24, Z+1 ; 0x01 |
412: 89 83 std Y+1, r24 ; 0x01 |
dataToSend &= 0x0F; |
414: 89 81 ldd r24, Y+1 ; 0x01 |
416: 8f 70 andi r24, 0x0F ; 15 |
418: 89 83 std Y+1, r24 ; 0x01 |
dataToSend <<= 4; |
41a: 89 81 ldd r24, Y+1 ; 0x01 |
41c: 82 95 swap r24 |
41e: 80 7f andi r24, 0xF0 ; 240 |
420: 89 83 std Y+1, r24 ; 0x01 |
dataToSend |= (currentLineBuffer[i+1] & 0x0F); |
422: f7 01 movw r30, r14 |
424: 81 81 ldd r24, Z+1 ; 0x01 |
426: 98 2f mov r25, r24 |
428: 9f 70 andi r25, 0x0F ; 15 |
42a: 89 81 ldd r24, Y+1 ; 0x01 |
42c: 89 2b or r24, r25 |
42e: 89 83 std Y+1, r24 ; 0x01 |
/* dataToSend should be packed now */ |
UartInt_txByte(dataToSend); |
430: 89 81 ldd r24, Y+1 ; 0x01 |
432: 96 d3 rcall .+1836 ; 0xb60 |
434: f2 e0 ldi r31, 0x02 ; 2 |
436: df 0e add r13, r31 |
438: 4f ea ldi r20, 0xAF ; 175 |
43a: 4d 15 cp r20, r13 |
43c: 40 f6 brcc .-112 ; 0x3ce |
} |
UartInt_txByte(0x0F); /* send line end */ |
43e: 8f e0 ldi r24, 0x0F ; 15 |
440: 8f d3 rcall .+1822 ; 0xb60 |
/* once all the data is sent, increment out line count by 2 since |
we really get 2 lines worth of pixels on each pass */ |
/* Update...increment only by 1, but only send 72 double-lines */ |
lineCount++; |
442: 80 91 73 00 lds r24, 0x0073 |
446: 8f 5f subi r24, 0xFF ; 255 |
448: 80 93 73 00 sts 0x0073, r24 |
/* check to see if we have retrieved all of the needed lines */ |
if (lineCount >= 72) /* half 144, since we send two lines at a time */ |
44c: 88 34 cpi r24, 0x48 ; 72 |
44e: 08 f4 brcc .+2 ; 0x452 |
450: 4a c0 rjmp .+148 ; 0x4e6 |
{ |
/* we're done, so send the dump complete?...nope, just change |
states and we should be fine */ |
lineCount = 0; |
452: 10 92 73 00 sts 0x0073, r1 |
currentState = ST_FrameMgr_idle; |
456: 10 92 74 00 sts 0x0074, r1 |
/* disable the PCLK counting overflow interrupt */ |
TIMSK &= DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK; |
45a: 89 b7 in r24, 0x39 ; 57 |
45c: 8b 7f andi r24, 0xFB ; 251 |
45e: 89 bf out 0x39, r24 ; 57 |
CamConfig_setCamReg(0x11,0x00); /* reset the frame rate to normal*/ |
460: 60 e0 ldi r22, 0x00 ; 0 |
462: 81 e1 ldi r24, 0x11 ; 17 |
464: 91 d4 rcall .+2338 ; 0xd88 |
CamConfig_sendFifoCmds(); |
466: 95 d4 rcall .+2346 ; 0xd92 |
468: 43 c0 rjmp .+134 ; 0x4f0 |
} |
else |
{ |
/* we have more lines to acquire in this frame, so keep on truckin...*/ |
PUBLISH_FAST_EVENT(FEV_PROCESS_LINE_COMPLETE); |
} |
} |
else if (currentState == ST_FrameMgr_TrackingFrame) |
46a: 80 91 74 00 lds r24, 0x0074 |
46e: 81 30 cpi r24, 0x01 ; 1 |
470: 09 f0 breq .+2 ; 0x474 |
472: 3e c0 rjmp .+124 ; 0x4f0 |
{ |
#ifdef DEBUG_TRACKED_LINE |
/* send the received line over serial...this should only send |
until a pixelCount == 176 */ |
pSendData = currentLineBuffer; |
itoa(trackedLineCount,asciiBuffer,10); |
UIMgr_txBuffer(asciiBuffer,3); |
UIMgr_txBuffer(" ",1); |
while(pixelCount < ACTUAL_NUM_PIXELS_IN_A_LINE) |
{ |
memset(asciiBuffer,0x00,5); |
itoa(*pSendData++,asciiBuffer,10); /* color is first byte */ |
UIMgr_txBuffer(asciiBuffer,3); /* 3 ascii bytes for data */ |
UIMgr_txBuffer(" ",1); |
pixelCount += *pSendData; /* run-length is second byte */ |
memset(asciiBuffer,0x00,5); |
itoa(*pSendData++,asciiBuffer,10); |
UIMgr_txBuffer(asciiBuffer,3); |
UIMgr_txBuffer(" ",1); |
} |
UIMgr_txBuffer("\n\r",2); |
trackedLineCount++; |
if (trackedLineCount == 144) |
{ |
UIMgr_txBuffer(" FC \n\r",8); |
trackedLineCount = 0; |
PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE); |
} |
else |
{ |
PUBLISH_EVENT(EV_PROCESS_LINE_COMPLETE); |
} |
#else |
/* determine if any of the RLE blocks overlap */ |
FrameMgr_findConnectedness(); |
474: a1 d0 rcall .+322 ; 0x5b8 |
/* we also want to remove any objects that are less than |
a minimum height...we already removed portions of the |
run-length that are less than MIN_PIXEL_WIDTH in the |
findConnectedness() routine...doing it here instead of |
a function to speed things up...this may end up slowing down the |
frame rate slightly, and can be removed if this isn't needed */ |
/* run this routine once every 8 lines */ |
if ( (trackedLineCount & RUN_OBJECT_FILTER_MASK) == RUN_OBJECT_FILTER_MASK) |
476: 80 91 77 00 lds r24, 0x0077 |
47a: 99 27 eor r25, r25 |
47c: 87 70 andi r24, 0x07 ; 7 |
47e: 90 70 andi r25, 0x00 ; 0 |
480: 07 97 sbiw r24, 0x07 ; 7 |
482: 11 f5 brne .+68 ; 0x4c8 |
{ |
for (i=0; i<MAX_TRACKED_OBJECTS; i++) |
484: dd 24 eor r13, r13 |
{ |
if ( *(pTrackedObjectData + VALID_OBJECT_OFFSET) == TRUE) |
486: f8 01 movw r30, r16 |
488: 87 81 ldd r24, Z+7 ; 0x07 |
48a: 81 30 cpi r24, 0x01 ; 1 |
48c: b9 f4 brne .+46 ; 0x4bc |
{ |
/* check to see if the object is already in |
our past...i.e., its last */ |
if ( (*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) - |
48e: 86 81 ldd r24, Z+6 ; 0x06 |
490: 28 2f mov r18, r24 |
492: 33 27 eor r19, r19 |
494: 84 81 ldd r24, Z+4 ; 0x04 |
496: a9 01 movw r20, r18 |
498: 48 1b sub r20, r24 |
49a: 51 09 sbc r21, r1 |
49c: 43 30 cpi r20, 0x03 ; 3 |
49e: 51 05 cpc r21, r1 |
4a0: 6c f4 brge .+26 ; 0x4bc |
*(pTrackedObjectData + Y_UPPER_LEFT_OFFSET)) < MIN_OBJECT_TRACKING_HEIGHT) |
{ |
/* the object is less than the minimum height...see if it is adjacent |
to the current line we just processed...if so, leave it here...otherwise, |
it needs to be invalidated since its too small */ |
if ( trackedLineCount - *(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) > 2) |
4a2: 80 91 77 00 lds r24, 0x0077 |
4a6: 99 27 eor r25, r25 |
4a8: 82 1b sub r24, r18 |
4aa: 93 0b sbc r25, r19 |
4ac: 03 97 sbiw r24, 0x03 ; 3 |
4ae: 34 f0 brlt .+12 ; 0x4bc |
{ |
/* invalidate the object */ |
*(pTrackedObjectData + VALID_OBJECT_OFFSET) = FALSE; |
4b0: 17 82 std Z+7, r1 ; 0x07 |
numCurrTrackedObjects--; |
4b2: 80 91 75 00 lds r24, 0x0075 |
4b6: 81 50 subi r24, 0x01 ; 1 |
4b8: 80 93 75 00 sts 0x0075, r24 |
} |
} |
} |
pTrackedObjectData += SIZE_OF_TRACKED_OBJECT; |
4bc: 08 5f subi r16, 0xF8 ; 248 |
4be: 1f 4f sbci r17, 0xFF ; 255 |
4c0: d3 94 inc r13 |
4c2: 57 e0 ldi r21, 0x07 ; 7 |
4c4: 5d 15 cp r21, r13 |
4c6: f8 f6 brcc .-66 ; 0x486 |
} |
} |
trackedLineCount++; |
4c8: 80 91 77 00 lds r24, 0x0077 |
4cc: 8f 5f subi r24, 0xFF ; 255 |
4ce: 80 93 77 00 sts 0x0077, r24 |
if (trackedLineCount == ACTUAL_NUM_LINES_IN_A_FRAME) |
4d2: 80 39 cpi r24, 0x90 ; 144 |
4d4: 41 f4 brne .+16 ; 0x4e6 |
{ |
/* an entire frame of tracking data has been acquired, so |
publish an event letting the system know this fact */ |
PUBLISH_EVENT(EV_ACQUIRE_FRAME_COMPLETE); |
4d6: 80 e2 ldi r24, 0x20 ; 32 |
4d8: bc de rcall .-648 ; 0x252 |
/* disable the PCLK counting overflow interrupt */ |
TIMSK &= DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK; |
4da: 89 b7 in r24, 0x39 ; 57 |
4dc: 8b 7f andi r24, 0xFB ; 251 |
4de: 89 bf out 0x39, r24 ; 57 |
trackedLineCount = 0; |
4e0: 10 92 77 00 sts 0x0077, r1 |
4e4: 05 c0 rjmp .+10 ; 0x4f0 |
} |
else |
{ |
PUBLISH_FAST_EVENT(FEV_PROCESS_LINE_COMPLETE); |
4e6: 80 91 72 00 lds r24, 0x0072 |
4ea: 82 60 ori r24, 0x02 ; 2 |
4ec: 80 93 72 00 sts 0x0072, r24 |
} |
#endif |
} |
else |
{ |
/* ...and here? */ |
} |
} |
4f0: 21 96 adiw r28, 0x01 ; 1 |
4f2: 0f b6 in r0, 0x3f ; 63 |
4f4: f8 94 cli |
4f6: de bf out 0x3e, r29 ; 62 |
4f8: 0f be out 0x3f, r0 ; 63 |
4fa: cd bf out 0x3d, r28 ; 61 |
4fc: df 91 pop r29 |
4fe: cf 91 pop r28 |
500: 1f 91 pop r17 |
502: 0f 91 pop r16 |
504: ff 90 pop r15 |
506: ef 90 pop r14 |
508: df 90 pop r13 |
50a: 08 95 ret |
0000050c <FrameMgr_processFrame>: |
/*********************************************************** |
Function Name: FrameMgr_processFrame |
Function Description: This function is responsible for |
parsing the completed frame and performing all actions |
needed at this level. |
Inputs: none |
Outputs: none |
***********************************************************/ |
void FrameMgr_processFrame(void) |
{ |
50c: df 92 push r13 |
50e: ef 92 push r14 |
510: ff 92 push r15 |
512: 0f 93 push r16 |
514: 1f 93 push r17 |
516: cf 93 push r28 |
518: df 93 push r29 |
unsigned char i,k,color; |
#if DEBUG_FRAME_DATA |
unsigned char asciiBuffer[5]; |
unsigned char j; |
#endif |
unsigned char *pTableData = (unsigned char *)pCurrentTrackedObjectTable; |
unsigned char tmpUpperLeftX,tmpUpperLeftY,tmpLowerRightX,tmpLowerRightY; |
#if DEBUG_FRAME_DATA |
/* we want to send all of the currently tracked table out |
the serial port for debugging */ |
for (i=0; i<numCurrTrackedObjects; i++) |
{ |
UIMgr_txBuffer("----------\r\n",12); |
for (j=0; j<SIZE_OF_TRACKED_OBJECT; j++) |
{ |
memset(asciiBuffer,0x00,5); |
itoa(*pTableData++,asciiBuffer,10); |
UIMgr_txBuffer(asciiBuffer,3); /* 3 ascii bytes for data |
+ 1 space */ |
UIMgr_txBuffer("\r\n",2); |
} |
} |
/* finally, send a new line */ |
UIMgr_txBuffer("\r\n",2); |
memset(asciiBuffer,0x00,5); |
itoa(numCurrTrackedObjects,asciiBuffer,10); |
UIMgr_txBuffer(asciiBuffer,3); |
UIMgr_txBuffer(" PFC\r\n",5); |
#else |
/* we only send tracking packets if there are tracked objects */ |
if (numCurrTrackedObjects > 0) |
51a: 80 91 75 00 lds r24, 0x0075 |
51e: 88 23 and r24, r24 |
520: 09 f4 brne .+2 ; 0x524 |
522: 40 c0 rjmp .+128 ; 0x5a4 |
{ |
UIMgr_writeTxFifo(0x0A); /* header byte for a tracking packet */ |
524: 8a e0 ldi r24, 0x0A ; 10 |
526: 01 d3 rcall .+1538 ; 0xb2a |
/* reset the pointer */ |
pTableData = (unsigned char *)pCurrentTrackedObjectTable; |
528: c0 91 60 00 lds r28, 0x0060 |
52c: d0 91 61 00 lds r29, 0x0061 |
UIMgr_writeTxFifo(numCurrTrackedObjects); /* num of objects tracked */ |
530: 80 91 75 00 lds r24, 0x0075 |
534: fa d2 rcall .+1524 ; 0xb2a |
for (i=0; i<MAX_TRACKED_OBJECTS; i++) |
536: dd 24 eor r13, r13 |
{ |
/* we only want to process objects that have their objectValid flag |
set to TRUE */ |
if ( *(pTableData + VALID_OBJECT_OFFSET) == TRUE) |
538: 8f 81 ldd r24, Y+7 ; 0x07 |
53a: 81 30 cpi r24, 0x01 ; 1 |
53c: 61 f5 brne .+88 ; 0x596 |
{ |
/* the object is valid...convert the color from bit position to value...remember, |
each bit in the "color" byte corresponds to a color */ |
k=0; |
53e: 80 e0 ldi r24, 0x00 ; 0 |
color = *(pTableData + COLOR_OFFSET); |
540: 98 81 ld r25, Y |
if (color == 128) k=0; |
542: 90 38 cpi r25, 0x80 ; 128 |
544: d9 f0 breq .+54 ; 0x57c |
else if (color == 64) k=1; |
546: 90 34 cpi r25, 0x40 ; 64 |
548: 11 f4 brne .+4 ; 0x54e |
54a: 81 e0 ldi r24, 0x01 ; 1 |
54c: 17 c0 rjmp .+46 ; 0x57c |
else if (color == 32) k=2; |
54e: 90 32 cpi r25, 0x20 ; 32 |
550: 11 f4 brne .+4 ; 0x556 |
552: 82 e0 ldi r24, 0x02 ; 2 |
554: 13 c0 rjmp .+38 ; 0x57c |
else if (color == 16) k=3; |
556: 90 31 cpi r25, 0x10 ; 16 |
558: 11 f4 brne .+4 ; 0x55e |
55a: 83 e0 ldi r24, 0x03 ; 3 |
55c: 0f c0 rjmp .+30 ; 0x57c |
else if (color == 8) k=4; |
55e: 98 30 cpi r25, 0x08 ; 8 |
560: 11 f4 brne .+4 ; 0x566 |
562: 84 e0 ldi r24, 0x04 ; 4 |
564: 0b c0 rjmp .+22 ; 0x57c |
else if (color == 4) k=5; |
566: 94 30 cpi r25, 0x04 ; 4 |
568: 11 f4 brne .+4 ; 0x56e |
56a: 85 e0 ldi r24, 0x05 ; 5 |
56c: 07 c0 rjmp .+14 ; 0x57c |
else if (color == 2) k=6; |
56e: 92 30 cpi r25, 0x02 ; 2 |
570: 11 f4 brne .+4 ; 0x576 |
572: 86 e0 ldi r24, 0x06 ; 6 |
574: 03 c0 rjmp .+6 ; 0x57c |
else if (color == 1) k=7; |
576: 91 30 cpi r25, 0x01 ; 1 |
578: 09 f4 brne .+2 ; 0x57c |
57a: 87 e0 ldi r24, 0x07 ; 7 |
tmpUpperLeftX = *(pTableData + X_UPPER_LEFT_OFFSET); /* get the upper left X */ |
57c: 1b 81 ldd r17, Y+3 ; 0x03 |
tmpUpperLeftY = *(pTableData + Y_UPPER_LEFT_OFFSET); /* get the upper left Y */ |
57e: 0c 81 ldd r16, Y+4 ; 0x04 |
tmpLowerRightX = *(pTableData + X_LOWER_RIGHT_OFFSET); /* get the lower right X */ |
580: fd 80 ldd r15, Y+5 ; 0x05 |
tmpLowerRightY = *(pTableData + Y_LOWER_RIGHT_OFFSET); /* get the lower right Y */ |
582: ee 80 ldd r14, Y+6 ; 0x06 |
UIMgr_writeTxFifo(k); /* send the color first */ |
584: d2 d2 rcall .+1444 ; 0xb2a |
UIMgr_writeTxFifo(tmpUpperLeftX); |
586: 81 2f mov r24, r17 |
588: d0 d2 rcall .+1440 ; 0xb2a |
UIMgr_writeTxFifo(tmpUpperLeftY); |
58a: 80 2f mov r24, r16 |
58c: ce d2 rcall .+1436 ; 0xb2a |
UIMgr_writeTxFifo(tmpLowerRightX); |
58e: 8f 2d mov r24, r15 |
590: cc d2 rcall .+1432 ; 0xb2a |
UIMgr_writeTxFifo(tmpLowerRightY); |
592: 8e 2d mov r24, r14 |
594: ca d2 rcall .+1428 ; 0xb2a |
} |
/* move our pointer up to the beginning of the next object */ |
pTableData += SIZE_OF_TRACKED_OBJECT; |
596: 28 96 adiw r28, 0x08 ; 8 |
598: d3 94 inc r13 |
59a: 87 e0 ldi r24, 0x07 ; 7 |
59c: 8d 15 cp r24, r13 |
59e: 60 f6 brcc .-104 ; 0x538 |
} |
/* all done...send the end of tracking packets char */ |
UIMgr_writeTxFifo(0xFF); |
5a0: 8f ef ldi r24, 0xFF ; 255 |
5a2: c3 d2 rcall .+1414 ; 0xb2a |
} |
#endif |
/* the tracked object table will be cleared out right before we start |
to wait for VSYNC to indicate a new frame...so it doesn't need to be |
done now */ |
/* schedule the next action to acquire a new frame */ |
PUBLISH_EVENT(EV_PROCESS_FRAME_COMPLETE); |
5a4: 84 e0 ldi r24, 0x04 ; 4 |
5a6: 55 de rcall .-854 ; 0x252 |
} |
5a8: df 91 pop r29 |
5aa: cf 91 pop r28 |
5ac: 1f 91 pop r17 |
5ae: 0f 91 pop r16 |
5b0: ff 90 pop r15 |
5b2: ef 90 pop r14 |
5b4: df 90 pop r13 |
5b6: 08 95 ret |
000005b8 <FrameMgr_findConnectedness>: |
/*********************************************************** |
Function Name: FrameMgr_findConnectedness |
Function Description: This function is responsible for |
finding the connectedness between two particular run- |
length encoded lines of pixel data. It updates the |
trackingTable as needed. |
Inputs: none |
Outputs: none |
***********************************************************/ |
static void FrameMgr_findConnectedness(void) |
{ |
5b8: 1f 93 push r17 |
5ba: cf 93 push r28 |
trackedColor_t currColor; |
unsigned char *pCurrLineColorInfo = currentLineBuffer; |
5bc: ac eb ldi r26, 0xBC ; 188 |
5be: b1 e0 ldi r27, 0x01 ; 1 |
unsigned char *pTrackedObjectData; |
register unsigned char currPixelRunStart=0; |
5c0: 60 e0 ldi r22, 0x00 ; 0 |
register unsigned char currPixelRunFinish=0; |
5c2: c6 2f mov r28, r22 |
register unsigned char lastLineXStart=0; |
register unsigned char lastLineXFinish=0; |
register unsigned char runLength=1; |
5c4: 71 e0 ldi r23, 0x01 ; 1 |
unsigned char i; |
bool_t colorConnected; |
do |
{ |
/* grab both the current color and the number of pixels |
in the run...remember, pixels start at 1, not 0! */ |
colorConnected = FALSE; |
5c6: 10 e0 ldi r17, 0x00 ; 0 |
currColor = *pCurrLineColorInfo++; |
5c8: 5d 91 ld r21, X+ |
currPixelRunStart += runLength; |
5ca: c7 0f add r28, r23 |
runLength = *pCurrLineColorInfo++; |
5cc: 7d 91 ld r23, X+ |
currPixelRunFinish += runLength; |
5ce: 67 0f add r22, r23 |
/* make sure that the run-length is at least as wide as |
the minimum horizontal tracking width, and we care about the color */ |
if ( (currColor != notTracked) && (runLength > MIN_OBJECT_TRACKING_WIDTH) ) |
5d0: 55 23 and r21, r21 |
5d2: 09 f4 brne .+2 ; 0x5d6 |
5d4: 5d c0 rjmp .+186 ; 0x690 |
5d6: 74 30 cpi r23, 0x04 ; 4 |
5d8: 08 f4 brcc .+2 ; 0x5dc |
5da: 5a c0 rjmp .+180 ; 0x690 |
{ |
/* this run contains a color we care about, so |
either it will begin a new tracked object, or it |
is connected to a currently tracked object... |
compare it with each object in the tracking |
table...we can't just look at the numTrackedObjects because |
it is entirely possible that the first couple of objects could |
be invalid... |
NOTE: Instead of accessing each element in the trackedObjectTable |
through the 'i' index, and then accessing the fields in each structure, |
a pointer to each entry is established each time through the loop, followed |
by accessing the elements through specified offsets. GCC seems to be |
able to optimize this code much better than simply accessing the elements |
of each structure in the array the more normal way...*/ |
pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable; |
5dc: e0 91 60 00 lds r30, 0x0060 |
5e0: f0 91 61 00 lds r31, 0x0061 |
for (i=0; i<MAX_TRACKED_OBJECTS; i++) |
5e4: 41 2f mov r20, r17 |
{ |
if ( (currColor == *(pTrackedObjectData + COLOR_OFFSET)) && |
5e6: 80 81 ld r24, Z |
5e8: 58 17 cp r21, r24 |
5ea: 51 f5 brne .+84 ; 0x640 |
5ec: 87 81 ldd r24, Z+7 ; 0x07 |
5ee: 81 30 cpi r24, 0x01 ; 1 |
5f0: 39 f5 brne .+78 ; 0x640 |
5f2: 86 81 ldd r24, Z+6 ; 0x06 |
5f4: 28 2f mov r18, r24 |
5f6: 33 27 eor r19, r19 |
5f8: 80 91 77 00 lds r24, 0x0077 |
5fc: 99 27 eor r25, r25 |
5fe: 01 97 sbiw r24, 0x01 ; 1 |
600: 28 17 cp r18, r24 |
602: 39 07 cpc r19, r25 |
604: e9 f4 brne .+58 ; 0x640 |
(*(pTrackedObjectData + VALID_OBJECT_OFFSET) == TRUE) && |
(*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) == trackedLineCount - 1) ) |
{ |
/* found a color match and the object is valid...check to see if there is |
connectedness */ |
lastLineXStart = *(pTrackedObjectData + LAST_LINE_X_START_OFFSET); |
606: 81 81 ldd r24, Z+1 ; 0x01 |
lastLineXFinish = *(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET); |
608: 92 81 ldd r25, Z+2 ; 0x02 |
/* Check for the 5 following types of line connectedness: |
--------------------- |
| | |
--------------------- |
------------------------- |
| | |
------------------------- */ |
if ( ( (currPixelRunStart >= lastLineXStart) && |
60a: c8 17 cp r28, r24 |
60c: 10 f0 brcs .+4 ; 0x612 |
60e: 9c 17 cp r25, r28 |
610: 40 f4 brcc .+16 ; 0x622 |
612: 68 17 cp r22, r24 |
614: 10 f0 brcs .+4 ; 0x61a |
616: 96 17 cp r25, r22 |
618: 20 f4 brcc .+8 ; 0x622 |
61a: 8c 17 cp r24, r28 |
61c: 88 f0 brcs .+34 ; 0x640 |
61e: 69 17 cp r22, r25 |
620: 78 f0 brcs .+30 ; 0x640 |
(currPixelRunStart <= lastLineXFinish) ) || |
/* --------------------- |
| | |
--------------------- |
------------------- |
| | |
------------------- |
OR |
------------------------------ |
| | |
------------------------------ |
--------- |
| | |
--------- */ |
( (currPixelRunFinish >= lastLineXStart) && |
(currPixelRunFinish <= lastLineXFinish) ) || |
/* ------------------------------- |
| | |
------------------------------- |
------------------------------- |
| | |
------------------------------- |
OR |
------------- |
| | |
------------- |
------------------------------- |
| | |
------------------------------- */ |
( (currPixelRunStart <= lastLineXStart) && |
(currPixelRunFinish >= lastLineXFinish) ) ) |
{ |
/* THERE IS CONNECTEDNESS...update the lastLineXStart and lastLineXFinish |
data pointed to by pTrackedObjectData */ |
*(pTrackedObjectData + LAST_LINE_X_START_OFFSET) = currPixelRunStart; |
622: c1 83 std Z+1, r28 ; 0x01 |
*(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET) = currPixelRunFinish; |
624: 62 83 std Z+2, r22 ; 0x02 |
/* check if the bounding box needs to be updated */ |
if (*(pTrackedObjectData + X_UPPER_LEFT_OFFSET) > currPixelRunStart) |
626: 83 81 ldd r24, Z+3 ; 0x03 |
628: c8 17 cp r28, r24 |
62a: 08 f4 brcc .+2 ; 0x62e |
{ |
/* need to update the bounding box for the upper left point to |
enclose this new left-most point...we never have to update the |
upper left Y point, since each scan line we process moves from |
top to bottom */ |
*(pTrackedObjectData + X_UPPER_LEFT_OFFSET) = currPixelRunStart; |
62c: c3 83 std Z+3, r28 ; 0x03 |
} |
if ( *(pTrackedObjectData + X_LOWER_RIGHT_OFFSET) < currPixelRunFinish) |
62e: 85 81 ldd r24, Z+5 ; 0x05 |
630: 86 17 cp r24, r22 |
632: 08 f4 brcc .+2 ; 0x636 |
{ |
/* need to update the bounding box for the lower right X point to |
enclose this new right-most point */ |
*(pTrackedObjectData + X_LOWER_RIGHT_OFFSET) = currPixelRunFinish; |
634: 65 83 std Z+5, r22 ; 0x05 |
} |
/* the lower right 'y' point always gets updated when connectedness is found */ |
*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) = trackedLineCount; |
636: 80 91 77 00 lds r24, 0x0077 |
63a: 86 83 std Z+6, r24 ; 0x06 |
/* set a flag indicating that that color run is part of another |
object and thus doesn't need to be added as a new entry into the |
tracking table */ |
colorConnected = TRUE; |
63c: 11 e0 ldi r17, 0x01 ; 1 |
break; |
63e: 04 c0 rjmp .+8 ; 0x648 |
} |
} |
/* go to the next object */ |
pTrackedObjectData += SIZE_OF_TRACKED_OBJECT; |
640: 38 96 adiw r30, 0x08 ; 8 |
642: 4f 5f subi r20, 0xFF ; 255 |
644: 48 30 cpi r20, 0x08 ; 8 |
646: 78 f2 brcs .-98 ; 0x5e6 |
} |
if (colorConnected == FALSE) |
648: 11 23 and r17, r17 |
64a: 11 f5 brne .+68 ; 0x690 |
{ |
/* a new entry needs to be made to the tracking table, since we have |
a run-length with a color, and it isn't connected to anything...but we |
can only do this if there is space left in the trackedObject table */ |
if (numCurrTrackedObjects < MAX_TRACKED_OBJECTS) |
64c: 80 91 75 00 lds r24, 0x0075 |
650: 88 30 cpi r24, 0x08 ; 8 |
652: f0 f4 brcc .+60 ; 0x690 |
{ |
/* space is available...add the object...but first we need to find an |
invalid object in the object tracking table */ |
pTrackedObjectData = (unsigned char *)pCurrentTrackedObjectTable; |
654: e0 91 60 00 lds r30, 0x0060 |
658: f0 91 61 00 lds r31, 0x0061 |
for (i=0; i<MAX_TRACKED_OBJECTS; i++) |
65c: 41 2f mov r20, r17 |
{ |
if ( *(pTrackedObjectData + VALID_OBJECT_OFFSET) == FALSE) break; |
65e: 87 81 ldd r24, Z+7 ; 0x07 |
660: 88 23 and r24, r24 |
662: 21 f0 breq .+8 ; 0x66c |
/* if we haven't broken above, then the object must have been valid... |
go ahead and move the pointer to the next object to check it */ |
pTrackedObjectData += SIZE_OF_TRACKED_OBJECT; |
664: 38 96 adiw r30, 0x08 ; 8 |
666: 4f 5f subi r20, 0xFF ; 255 |
668: 48 30 cpi r20, 0x08 ; 8 |
66a: c8 f3 brcs .-14 ; 0x65e |
} |
/* now that we have a pointer to the tracked object to be updated, update all |
the fields */ |
*(pTrackedObjectData + COLOR_OFFSET) = currColor; /* color */ |
66c: 50 83 st Z, r21 |
*(pTrackedObjectData + LAST_LINE_X_START_OFFSET) = currPixelRunStart; /* lastLineXStart */ |
66e: c1 83 std Z+1, r28 ; 0x01 |
*(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET) = currPixelRunFinish; /* lastLineXFinish */ |
670: 62 83 std Z+2, r22 ; 0x02 |
*(pTrackedObjectData + X_UPPER_LEFT_OFFSET) = currPixelRunStart; /* x_upperLeft */ |
672: c3 83 std Z+3, r28 ; 0x03 |
*(pTrackedObjectData + Y_UPPER_LEFT_OFFSET) = trackedLineCount; /* y_upperLeft */ |
674: 80 91 77 00 lds r24, 0x0077 |
678: 84 83 std Z+4, r24 ; 0x04 |
*(pTrackedObjectData + X_LOWER_RIGHT_OFFSET) = currPixelRunFinish; /* x_lowerRight */ |
67a: 65 83 std Z+5, r22 ; 0x05 |
*(pTrackedObjectData + Y_LOWER_RIGHT_OFFSET) = trackedLineCount; /* y_lowerRight */ |
67c: 80 91 77 00 lds r24, 0x0077 |
680: 86 83 std Z+6, r24 ; 0x06 |
*(pTrackedObjectData + VALID_OBJECT_OFFSET) = TRUE; /* objectValid flag */ |
682: 81 e0 ldi r24, 0x01 ; 1 |
684: 87 83 std Z+7, r24 ; 0x07 |
numCurrTrackedObjects++; |
686: 80 91 75 00 lds r24, 0x0075 |
68a: 8f 5f subi r24, 0xFF ; 255 |
68c: 80 93 75 00 sts 0x0075, r24 |
} |
} |
/* move the pointer to the beginning of the next tracked object */ |
pTrackedObjectData += SIZE_OF_TRACKED_OBJECT; |
} |
} while(currPixelRunFinish < ACTUAL_NUM_PIXELS_IN_A_LINE); |
690: 60 3b cpi r22, 0xB0 ; 176 |
692: 08 f4 brcc .+2 ; 0x696 |
694: 98 cf rjmp .-208 ; 0x5c6 |
} |
696: cf 91 pop r28 |
698: 1f 91 pop r17 |
69a: 08 95 ret |
0000069c <UIMgr_init>: |
Outputs: none |
***********************************************************/ |
void UIMgr_init(void) |
{ |
memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH+1); |
69c: 10 92 bf 00 sts 0x00BF, r1 |
6a0: 10 92 c0 00 sts 0x00C0, r1 |
6a4: 10 92 c1 00 sts 0x00C1, r1 |
6a8: 10 92 c2 00 sts 0x00C2, r1 |
memset(tokenBuffer,0x00,MAX_TOKEN_COUNT); |
6ac: 80 e4 ldi r24, 0x40 ; 64 |
6ae: e3 ec ldi r30, 0xC3 ; 195 |
6b0: f0 e0 ldi r31, 0x00 ; 0 |
6b2: 11 92 st Z+, r1 |
6b4: 8a 95 dec r24 |
6b6: e9 f7 brne .-6 ; 0x6b2 |
memset(UIMgr_txFifo,0x00,UI_MGR_TX_FIFO_SIZE); |
6b8: 80 e4 ldi r24, 0x40 ; 64 |
6ba: e4 e9 ldi r30, 0x94 ; 148 |
6bc: f2 e0 ldi r31, 0x02 ; 2 |
6be: 11 92 st Z+, r1 |
6c0: 8a 95 dec r24 |
6c2: e9 f7 brne .-6 ; 0x6be |
memset(UIMgr_rxFifo,0x00,UI_MGR_RX_FIFO_SIZE); |
6c4: 80 e2 ldi r24, 0x20 ; 32 |
6c6: e4 e7 ldi r30, 0x74 ; 116 |
6c8: f2 e0 ldi r31, 0x02 ; 2 |
6ca: 11 92 st Z+, r1 |
6cc: 8a 95 dec r24 |
6ce: e9 f7 brne .-6 ; 0x6ca |
} |
6d0: 08 95 ret |
000006d2 <UIMgr_dispatchEvent>: |
/*********************************************************** |
Function Name: UIMgr_dispatchEvent |
Function Description: This function is responsible for |
1752,15 → 1407,6 |
void UIMgr_dispatchEvent(unsigned char event) |
{ |
switch(event) |
6d2: 99 27 eor r25, r25 |
6d4: 80 31 cpi r24, 0x10 ; 16 |
6d6: 91 05 cpc r25, r1 |
6d8: 51 f0 breq .+20 ; 0x6ee |
6da: 81 31 cpi r24, 0x11 ; 17 |
6dc: 91 05 cpc r25, r1 |
6de: 1c f4 brge .+6 ; 0x6e6 |
6e0: 01 97 sbiw r24, 0x01 ; 1 |
6e2: 39 f0 breq .+14 ; 0x6f2 |
{ |
case EV_ACQUIRE_LINE_COMPLETE: |
UIMgr_transmitPendingData(); |
1775,20 → 1421,6 |
break; |
} |
} |
6e4: 08 95 ret |
6e6: 80 39 cpi r24, 0x90 ; 144 |
6e8: 91 05 cpc r25, r1 |
6ea: 29 f0 breq .+10 ; 0x6f6 |
6ec: 08 95 ret |
6ee: 06 d0 rcall .+12 ; 0x6fc |
6f0: 08 95 ret |
6f2: 0e d0 rcall .+28 ; 0x710 |
6f4: 08 95 ret |
6f6: e6 d1 rcall .+972 ; 0xac4 |
6f8: 08 95 ret |
6fa: 08 95 ret |
000006fc <UIMgr_transmitPendingData>: |
/*********************************************************** |
Function Name: UIMgr_transmitPendingData |
Function Description: This function is responsible for |
1801,21 → 1433,11 |
void UIMgr_transmitPendingData(void) |
{ |
if (IS_DATA_IN_TX_FIFO() == TRUE) |
6fc: 90 91 ba 00 lds r25, 0x00BA |
700: 80 91 bb 00 lds r24, 0x00BB |
704: 98 17 cp r25, r24 |
706: 11 f0 breq .+4 ; 0x70c |
{ |
/* data is waiting...send a single byte */ |
UartInt_txByte( UIMgr_readTxFifo() ); |
708: fe d1 rcall .+1020 ; 0xb06 |
70a: 2a d2 rcall .+1108 ; 0xb60 |
} |
} |
70c: 08 95 ret |
70e: 08 95 ret |
00000710 <UIMgr_processReceivedData>: |
/*********************************************************** |
Function Name: UIMgr_processReceivedData |
Function Description: This function is responsible for |
1825,7 → 1447,6 |
***********************************************************/ |
void UIMgr_processReceivedData(void) |
{ |
710: cf 93 push r28 |
unsigned char tmpData = 0; |
/* still need to add a mechanism to handle token counts |
1832,100 → 1453,51 |
that are excessive!!! FIX ME!!! */ |
while(IS_DATA_IN_RX_FIFO() == TRUE) |
712: 90 91 b8 00 lds r25, 0x00B8 |
716: 80 91 b9 00 lds r24, 0x00B9 |
71a: 98 17 cp r25, r24 |
71c: 09 f4 brne .+2 ; 0x720 |
71e: 6f c0 rjmp .+222 ; 0x7fe |
720: c9 e0 ldi r28, 0x09 ; 9 |
{ |
tmpData = UIMgr_readRxFifo(); |
722: df d1 rcall .+958 ; 0xae2 |
724: 38 2f mov r19, r24 |
if (tmpData == '\r') |
726: 8d 30 cpi r24, 0x0D ; 13 |
728: 29 f5 brne .+74 ; 0x774 |
{ |
/* we have reached a token separator */ |
if (tokenCount == 0) |
72a: 80 91 be 00 lds r24, 0x00BE |
72e: 88 23 and r24, r24 |
730: 11 f4 brne .+4 ; 0x736 |
{ |
/* convert the command */ |
UIMgr_convertTokenToCmd(); |
732: 2c d1 rcall .+600 ; 0x98c |
734: 06 c0 rjmp .+12 ; 0x742 |
} |
else |
{ |
/* convert a value */ |
UIMgr_convertTokenToValue(); |
736: 02 d1 rcall .+516 ; 0x93c |
tokenCount++; |
738: 80 91 be 00 lds r24, 0x00BE |
73c: 8f 5f subi r24, 0xFF ; 255 |
73e: 80 93 be 00 sts 0x00BE, r24 |
} |
/* either way, it is time to try to process the received |
token list since we have reached the end of the cmd. */ |
Utility_delay(100); |
742: 84 e6 ldi r24, 0x64 ; 100 |
744: 90 e0 ldi r25, 0x00 ; 0 |
746: 7f d3 rcall .+1790 ; 0xe46 |
if (receivedCmd == invalidCmd || |
748: 80 91 62 00 lds r24, 0x0062 |
74c: 88 50 subi r24, 0x08 ; 8 |
74e: 82 30 cpi r24, 0x02 ; 2 |
750: 20 f4 brcc .+8 ; 0x75a |
receivedCmd == noCmd ) |
{ |
UIMgr_sendNck(); |
752: 84 d1 rcall .+776 ; 0xa5c |
PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX); |
754: 80 e9 ldi r24, 0x90 ; 144 |
756: 7d dd rcall .-1286 ; 0x252 |
758: 04 c0 rjmp .+8 ; 0x762 |
} |
else |
{ |
UIMgr_sendAck(); |
75a: 77 d1 rcall .+750 ; 0xa4a |
/* publish the serial data pending event, so it |
will push the ACK out before we execute the cmd */ |
PUBLISH_EVENT(EV_SERIAL_DATA_PENDING_TX); |
75c: 80 e9 ldi r24, 0x90 ; 144 |
75e: 79 dd rcall .-1294 ; 0x252 |
UIMgr_executeCmd(); |
760: 51 d0 rcall .+162 ; 0x804 |
} |
/* reset any necessary data */ |
tokenCount = 0; |
762: 10 92 be 00 sts 0x00BE, r1 |
memset(tokenBuffer,0x00,MAX_TOKEN_COUNT); |
766: 80 e4 ldi r24, 0x40 ; 64 |
768: e3 ec ldi r30, 0xC3 ; 195 |
76a: f0 e0 ldi r31, 0x00 ; 0 |
76c: 11 92 st Z+, r1 |
76e: 8a 95 dec r24 |
770: e9 f7 brne .-6 ; 0x76c |
772: 3e c0 rjmp .+124 ; 0x7f0 |
} |
else if (tmpData == ' ') /* space char */ |
774: 80 32 cpi r24, 0x20 ; 32 |
776: d9 f4 brne .+54 ; 0x7ae |
{ |
/* the end of a token has been reached */ |
if (tokenCount == 0) |
778: 80 91 be 00 lds r24, 0x00BE |
77c: 88 23 and r24, r24 |
77e: 11 f4 brne .+4 ; 0x784 |
{ |
UIMgr_convertTokenToCmd(); |
780: 05 d1 rcall .+522 ; 0x98c |
tokenCount++; /* check this...why is this being incremented here??? This |
782: 0f c0 rjmp .+30 ; 0x7a2 |
means we have received a token, with tokenCount == 0, which means it is a |
command...why is this contributing to tokenCount? |
This might cause the set color map command to include too much data, since |
1936,77 → 1508,37 |
/* check to see if this token is going to push |
us over the limit...if so, abort the transaction */ |
if (tokenCount+1 >= MAX_TOKEN_COUNT) |
784: 80 91 be 00 lds r24, 0x00BE |
788: 99 27 eor r25, r25 |
78a: 01 96 adiw r24, 0x01 ; 1 |
78c: 80 34 cpi r24, 0x40 ; 64 |
78e: 91 05 cpc r25, r1 |
790: 3c f0 brlt .+14 ; 0x7a0 |
{ |
/* we received too many tokens, and |
need to NCK this request, since its too |
large...reset everything...*/ |
charCount=0; |
792: 10 92 bc 00 sts 0x00BC, r1 |
charIndex=0; |
796: 10 92 bd 00 sts 0x00BD, r1 |
tokenCount=0; |
79a: 10 92 be 00 sts 0x00BE, r1 |
receivedCmd = invalidCmd; |
79e: 26 c0 rjmp .+76 ; 0x7ec |
} |
else |
{ |
/* tokenCount is still in range...*/ |
UIMgr_convertTokenToValue(); |
7a0: cd d0 rcall .+410 ; 0x93c |
tokenCount++; |
7a2: 80 91 be 00 lds r24, 0x00BE |
7a6: 8f 5f subi r24, 0xFF ; 255 |
7a8: 80 93 be 00 sts 0x00BE, r24 |
7ac: 21 c0 rjmp .+66 ; 0x7f0 |
} |
} |
} |
else if ( (tmpData >= 'A' && tmpData <= 'Z') || |
7ae: 81 54 subi r24, 0x41 ; 65 |
7b0: 8a 31 cpi r24, 0x1A ; 26 |
7b2: 18 f0 brcs .+6 ; 0x7ba |
7b4: 8f 5e subi r24, 0xEF ; 239 |
7b6: 8a 30 cpi r24, 0x0A ; 10 |
7b8: c8 f4 brcc .+50 ; 0x7ec |
(tmpData >= '0' && tmpData <= '9') ) |
{ |
/* a valid range of token was received */ |
asciiTokenBuffer[charIndex] = tmpData; |
7ba: 20 91 bd 00 lds r18, 0x00BD |
7be: 82 2f mov r24, r18 |
7c0: 99 27 eor r25, r25 |
7c2: fc 01 movw r30, r24 |
7c4: e1 54 subi r30, 0x41 ; 65 |
7c6: ff 4f sbci r31, 0xFF ; 255 |
7c8: 30 83 st Z, r19 |
charCount++; |
7ca: 80 91 bc 00 lds r24, 0x00BC |
7ce: 98 2f mov r25, r24 |
7d0: 9f 5f subi r25, 0xFF ; 255 |
7d2: 90 93 bc 00 sts 0x00BC, r25 |
charIndex++; |
7d6: 82 2f mov r24, r18 |
7d8: 8f 5f subi r24, 0xFF ; 255 |
7da: 80 93 bd 00 sts 0x00BD, r24 |
if (charCount > MAX_TOKEN_LENGTH) |
7de: 94 30 cpi r25, 0x04 ; 4 |
7e0: 38 f0 brcs .+14 ; 0x7f0 |
{ |
/* we have received a token that cannot be handled... |
set the received cmd to an invalid cmd, and wait |
for the \r to process it */ |
receivedCmd = invalidCmd; |
7e2: c0 93 62 00 sts 0x0062, r28 |
charIndex = 0; /* ...so we won't overwrite memory */ |
7e6: 10 92 bd 00 sts 0x00BD, r1 |
7ea: 02 c0 rjmp .+4 ; 0x7f0 |
} |
} |
else |
2013,24 → 1545,13 |
{ |
/* an invalid character was received */ |
receivedCmd = invalidCmd; |
7ec: c0 93 62 00 sts 0x0062, r28 |
7f0: 90 91 b8 00 lds r25, 0x00B8 |
7f4: 80 91 b9 00 lds r24, 0x00B9 |
7f8: 98 17 cp r25, r24 |
7fa: 09 f0 breq .+2 ; 0x7fe |
7fc: 92 cf rjmp .-220 ; 0x722 |
} |
} /* end while */ |
asm volatile("clt"::); /* clear out the T flag in case it wasn't |
7fe: e8 94 clt |
cleared already */ |
} |
800: cf 91 pop r28 |
802: 08 95 ret |
00000804 <UIMgr_executeCmd>: |
/*********************************************************** |
Function Name: UIMgr_executeCmd |
Function Description: This function is responsible for |
2041,15 → 1562,7 |
***********************************************************/ |
static void UIMgr_executeCmd(void) |
{ |
804: df 92 push r13 |
806: ef 92 push r14 |
808: ff 92 push r15 |
80a: 0f 93 push r16 |
80c: 1f 93 push r17 |
80e: cf 93 push r28 |
810: df 93 push r29 |
unsigned char i,eepromData, num_writes=0; |
812: ee 24 eor r14, r14 |
unsigned char *pData; |
unsigned char eeprom_write_succeeded = FALSE; |
#if DEBUG_COLOR_MAP |
2057,47 → 1570,21 |
#endif |
if (receivedCmd == pingCmd) |
814: 80 91 62 00 lds r24, 0x0062 |
818: 81 30 cpi r24, 0x01 ; 1 |
81a: 09 f4 brne .+2 ; 0x81e |
81c: 87 c0 rjmp .+270 ; 0x92c |
{ |
} |
else if (receivedCmd == getVersionCmd) |
81e: 88 23 and r24, r24 |
820: 69 f4 brne .+26 ; 0x83c |
{ |
pData = AVRcamVersion; |
822: c3 e6 ldi r28, 0x63 ; 99 |
824: d0 e0 ldi r29, 0x00 ; 0 |
while(*pData != 0) |
826: 80 91 63 00 lds r24, 0x0063 |
82a: 88 23 and r24, r24 |
82c: 09 f4 brne .+2 ; 0x830 |
82e: 7e c0 rjmp .+252 ; 0x92c |
{ |
UIMgr_writeTxFifo(*pData++); |
830: 89 91 ld r24, Y+ |
832: 7b d1 rcall .+758 ; 0xb2a |
834: 88 81 ld r24, Y |
836: 88 23 and r24, r24 |
838: d9 f7 brne .-10 ; 0x830 |
83a: 78 c0 rjmp .+240 ; 0x92c |
} |
} |
else if (receivedCmd == resetCameraCmd) |
83c: 80 91 62 00 lds r24, 0x0062 |
840: 87 30 cpi r24, 0x07 ; 7 |
842: 11 f4 brne .+4 ; 0x848 |
{ |
CamInt_resetCam(); |
844: 8b dc rcall .-1770 ; 0x15c |
846: 72 c0 rjmp .+228 ; 0x92c |
} |
else if (receivedCmd == dumpFrameCmd) |
848: 80 91 62 00 lds r24, 0x0062 |
84c: 83 30 cpi r24, 0x03 ; 3 |
84e: 29 f4 brne .+10 ; 0x85a |
{ |
/* publish the event that will indicate that |
a request has come to dump a frame...this will |
2107,1579 → 1594,655 |
it wouldn't be able to receive the serial data |
as quickly as AVRcam can provide it). */ |
Utility_delay(100); |
850: 84 e6 ldi r24, 0x64 ; 100 |
852: 90 e0 ldi r25, 0x00 ; 0 |
854: f8 d2 rcall .+1520 ; 0xe46 |
PUBLISH_EVENT(EV_DUMP_FRAME); |
856: 82 e0 ldi r24, 0x02 ; 2 |
858: 28 c0 rjmp .+80 ; 0x8aa |
} |
else if (receivedCmd == setCameraRegsCmd) |
85a: 80 91 62 00 lds r24, 0x0062 |
85e: 82 30 cpi r24, 0x02 ; 2 |
860: b1 f4 brne .+44 ; 0x88e |
{ |
/* we need to gather the tokens and |
build config cmds to be sent to the camera */ |
for (i=1; i<tokenCount; i+=2) /* starts at 1 since first token |
862: ff 24 eor r15, r15 |
864: f3 94 inc r15 |
866: 80 91 be 00 lds r24, 0x00BE |
86a: f8 16 cp r15, r24 |
86c: 70 f4 brcc .+28 ; 0x88a |
is the CR cmd */ |
{ |
CamConfig_setCamReg(tokenBuffer[i],tokenBuffer[i+1]); |
86e: 8f 2d mov r24, r15 |
870: 99 27 eor r25, r25 |
872: fc 01 movw r30, r24 |
874: ed 53 subi r30, 0x3D ; 61 |
876: ff 4f sbci r31, 0xFF ; 255 |
878: 61 81 ldd r22, Z+1 ; 0x01 |
87a: 80 81 ld r24, Z |
87c: 85 d2 rcall .+1290 ; 0xd88 |
87e: 82 e0 ldi r24, 0x02 ; 2 |
880: f8 0e add r15, r24 |
882: 80 91 be 00 lds r24, 0x00BE |
886: f8 16 cp r15, r24 |
888: 90 f3 brcs .-28 ; 0x86e |
} |
CamConfig_sendFifoCmds(); |
88a: 83 d2 rcall .+1286 ; 0xd92 |
88c: 4f c0 rjmp .+158 ; 0x92c |
} |
else if (receivedCmd == enableTrackingCmd) |
88e: 80 91 62 00 lds r24, 0x0062 |
892: 84 30 cpi r24, 0x04 ; 4 |
894: 29 f4 brne .+10 ; 0x8a0 |
{ |
/* publish the event...again with a short delay */ |
Utility_delay(100); |
896: 84 e6 ldi r24, 0x64 ; 100 |
898: 90 e0 ldi r25, 0x00 ; 0 |
89a: d5 d2 rcall .+1450 ; 0xe46 |
PUBLISH_EVENT(EV_ENABLE_TRACKING); |
89c: 80 e8 ldi r24, 0x80 ; 128 |
89e: 05 c0 rjmp .+10 ; 0x8aa |
} |
else if (receivedCmd == disableTrackingCmd) |
8a0: 80 91 62 00 lds r24, 0x0062 |
8a4: 85 30 cpi r24, 0x05 ; 5 |
8a6: 19 f4 brne .+6 ; 0x8ae |
{ |
PUBLISH_EVENT(EV_DISABLE_TRACKING); |
8a8: 81 e8 ldi r24, 0x81 ; 129 |
8aa: d3 dc rcall .-1626 ; 0x252 |
8ac: 3f c0 rjmp .+126 ; 0x92c |
} |
else if (receivedCmd == setColorMapCmd) |
8ae: 80 91 62 00 lds r24, 0x0062 |
8b2: 86 30 cpi r24, 0x06 ; 6 |
8b4: d9 f5 brne .+118 ; 0x92c |
{ |
/* copy the received tokens into the color map */ |
for (i=0; i<tokenCount; i++) |
8b6: ff 24 eor r15, r15 |
8b8: 80 91 be 00 lds r24, 0x00BE |
8bc: f8 16 cp r15, r24 |
8be: b0 f5 brcc .+108 ; 0x92c |
{ |
colorMap[i] = tokenBuffer[i+1]; |
8c0: 8f 2d mov r24, r15 |
8c2: 99 27 eor r25, r25 |
8c4: 8c 01 movw r16, r24 |
8c6: 00 50 subi r16, 0x00 ; 0 |
8c8: 1d 4f sbci r17, 0xFD ; 253 |
8ca: fc 01 movw r30, r24 |
8cc: ed 53 subi r30, 0x3D ; 61 |
8ce: ff 4f sbci r31, 0xFF ; 255 |
8d0: 21 81 ldd r18, Z+1 ; 0x01 |
8d2: f8 01 movw r30, r16 |
8d4: 20 83 st Z, r18 |
/* write each colorMap byte to EEPROM, but only those |
that changed...this will help reduce wear on the EEPROM */ |
eepromData = eeprom_read_byte( (unsigned char*)(i+1)); |
8d6: 01 96 adiw r24, 0x01 ; 1 |
8d8: b5 d3 rcall .+1898 ; 0x1044 |
8da: 98 2f mov r25, r24 |
if (eepromData != colorMap[i]) |
8dc: f8 01 movw r30, r16 |
8de: 80 81 ld r24, Z |
8e0: 98 17 cp r25, r24 |
8e2: f9 f0 breq .+62 ; 0x922 |
a4c: e8 17 cp r30, r24 |
a4e: c1 f0 breq .+48 ; 0xa80 <UIMgr_processReceivedData+0x178> |
void |
eeprom_write_byte (uint8_t *addr,uint8_t value) |
{ |
asm volatile ( |
a50: d9 01 movw r26, r18 |
a52: 0e 2e mov r0, r30 |
a54: 27 d3 rcall .+1614 ; 0x10a4 <__eeprom_write_byte_1C1D1E> |
a56: d9 01 movw r26, r18 |
a58: 18 d3 rcall .+1584 ; 0x108a <__eeprom_read_byte_1C1D1E> |
a5a: 80 2d mov r24, r0 |
{ |
/* need to actually perform the write because the |
data in eeprom is different than the current colorMap */ |
eeprom_write_succeeded = FALSE; |
8e4: dd 24 eor r13, r13 |
while(eeprom_write_succeeded == FALSE && num_writes < MAX_EEPROM_WRITE_ATTEMPTS) |
8e6: f2 e0 ldi r31, 0x02 ; 2 |
8e8: fe 15 cp r31, r14 |
8ea: d0 f0 brcs .+52 ; 0x920 |
8ec: 8f 2d mov r24, r15 |
8ee: 99 27 eor r25, r25 |
8f0: 8c 01 movw r16, r24 |
8f2: 00 50 subi r16, 0x00 ; 0 |
8f4: 1d 4f sbci r17, 0xFD ; 253 |
8f6: ec 01 movw r28, r24 |
8f8: 21 96 adiw r28, 0x01 ; 1 |
{ |
eeprom_write_byte((unsigned char*)(i+1),colorMap[i]); |
8fa: f8 01 movw r30, r16 |
8fc: 60 81 ld r22, Z |
8fe: ce 01 movw r24, r28 |
900: ba d3 rcall .+1908 ; 0x1076 |
num_writes++; |
902: e3 94 inc r14 |
eepromData = eeprom_read_byte( (unsigned char*)(i+1)); |
904: ce 01 movw r24, r28 |
906: 9e d3 rcall .+1852 ; 0x1044 |
908: 98 2f mov r25, r24 |
if (eepromData == colorMap[i]) |
90a: f8 01 movw r30, r16 |
90c: 80 81 ld r24, Z |
90e: 98 17 cp r25, r24 |
910: 11 f4 brne .+4 ; 0x916 |
{ |
eeprom_write_succeeded = TRUE; |
912: dd 24 eor r13, r13 |
914: d3 94 inc r13 |
916: dd 20 and r13, r13 |
918: 19 f4 brne .+6 ; 0x920 |
91a: f2 e0 ldi r31, 0x02 ; 2 |
91c: fe 15 cp r31, r14 |
91e: 68 f7 brcc .-38 ; 0x8fa |
} |
} |
num_writes = 0; |
920: ee 24 eor r14, r14 |
922: f3 94 inc r15 |
924: 80 91 be 00 lds r24, 0x00BE |
928: f8 16 cp r15, r24 |
92a: 50 f2 brcs .-108 ; 0x8c0 |
} |
} |
#if DEBUG_COLOR_MAP |
/* for debugging...send out the entire color map */ |
UIMgr_txBuffer("\r\n",2); |
for (i=0; i<NUM_ELEMENTS_IN_COLOR_MAP; i++) |
{ |
memset(asciiBuffer,0x00,5); |
itoa(colorMap[i],asciiBuffer,10); |
UIMgr_txBuffer(asciiBuffer,3); |
UIMgr_txBuffer(" ",1); |
if (i==15 || i == 31) |
{ |
/* break up the output */ |
UIMgr_txBuffer("\r\n",2); |
} |
} |
#endif |
} |
} |
92c: df 91 pop r29 |
92e: cf 91 pop r28 |
930: 1f 91 pop r17 |
932: 0f 91 pop r16 |
934: ff 90 pop r15 |
936: ef 90 pop r14 |
938: df 90 pop r13 |
93a: 08 95 ret |
0000093c <UIMgr_convertTokenToValue>: |
/*********************************************************** |
Function Name: UIMgr_convertTokenToValue |
Function Description: This function is responsible for |
converting a received token to a hex value It will |
access the asciiTokenBuffer directly, and store the |
result in the appropriate token buffer. |
Inputs: none |
Outputs: none |
***********************************************************/ |
static void UIMgr_convertTokenToValue(void) |
{ |
unsigned int newValue; |
newValue = atoi(asciiTokenBuffer); |
93c: 8f eb ldi r24, 0xBF ; 191 |
93e: 90 e0 ldi r25, 0x00 ; 0 |
940: 55 d3 rcall .+1706 ; 0xfec |
942: ac 01 movw r20, r24 |
if (newValue > 255) |
944: 8f 3f cpi r24, 0xFF ; 255 |
946: 91 05 cpc r25, r1 |
948: 71 f0 breq .+28 ; 0x966 |
94a: 68 f0 brcs .+26 ; 0x966 |
{ |
/* the value is too large */ |
receivedCmd = invalidCmd; |
94c: 89 e0 ldi r24, 0x09 ; 9 |
94e: 80 93 62 00 sts 0x0062, r24 |
tokenBuffer[tokenCount] = 0xFF; /* to indicate an error */ |
952: 20 91 be 00 lds r18, 0x00BE |
956: 83 ec ldi r24, 0xC3 ; 195 |
958: 90 e0 ldi r25, 0x00 ; 0 |
95a: fc 01 movw r30, r24 |
95c: e2 0f add r30, r18 |
95e: f1 1d adc r31, r1 |
960: 8f ef ldi r24, 0xFF ; 255 |
962: 80 83 st Z, r24 |
964: 08 c0 rjmp .+16 ; 0x976 |
} |
else |
{ |
/* copy the value into the tokenBuffer */ |
tokenBuffer[tokenCount] = newValue; |
966: 80 91 be 00 lds r24, 0x00BE |
96a: 23 ec ldi r18, 0xC3 ; 195 |
96c: 30 e0 ldi r19, 0x00 ; 0 |
96e: f9 01 movw r30, r18 |
970: e8 0f add r30, r24 |
972: f1 1d adc r31, r1 |
974: 40 83 st Z, r20 |
} |
memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH); |
976: 83 e0 ldi r24, 0x03 ; 3 |
978: ef eb ldi r30, 0xBF ; 191 |
97a: f0 e0 ldi r31, 0x00 ; 0 |
97c: 11 92 st Z+, r1 |
97e: 8a 95 dec r24 |
980: e9 f7 brne .-6 ; 0x97c |
charIndex = 0; |
982: 10 92 bd 00 sts 0x00BD, r1 |
charCount = 0; |
986: 10 92 bc 00 sts 0x00BC, r1 |
} |
98a: 08 95 ret |
0000098c <UIMgr_convertTokenToCmd>: |
/*********************************************************** |
Function Name: UIMgr_convertTokenToCmd |
Function Description: This function is responsible for |
parsing a received 2-character command. It will |
access the asciiTokenBuffer directly. |
Inputs: none |
Outputs: none |
***********************************************************/ |
static void UIMgr_convertTokenToCmd(void) |
{ |
if ( (asciiTokenBuffer[0] == 'P') && |
98c: 80 91 bf 00 lds r24, 0x00BF |
990: 80 35 cpi r24, 0x50 ; 80 |
992: 31 f4 brne .+12 ; 0x9a0 |
994: 80 91 c0 00 lds r24, 0x00C0 |
998: 87 34 cpi r24, 0x47 ; 71 |
99a: 11 f4 brne .+4 ; 0x9a0 |
(asciiTokenBuffer[1] == 'G') ) |
{ |
/* we got a "ping" command...but we still need to see |
if we are going to get the \r */ |
receivedCmd = pingCmd; |
99c: 81 e0 ldi r24, 0x01 ; 1 |
99e: 48 c0 rjmp .+144 ; 0xa30 |
} |
else if ( (asciiTokenBuffer[0] == 'G') && |
9a0: 80 91 bf 00 lds r24, 0x00BF |
9a4: 87 34 cpi r24, 0x47 ; 71 |
9a6: 39 f4 brne .+14 ; 0x9b6 |
9a8: 80 91 c0 00 lds r24, 0x00C0 |
9ac: 86 35 cpi r24, 0x56 ; 86 |
9ae: 19 f4 brne .+6 ; 0x9b6 |
(asciiTokenBuffer[1] == 'V') ) |
{ |
/* we got the "get version" command */ |
receivedCmd = getVersionCmd; |
9b0: 10 92 62 00 sts 0x0062, r1 |
9b4: 3f c0 rjmp .+126 ; 0xa34 |
} |
else if ( (asciiTokenBuffer[0] == 'D') && |
9b6: 80 91 bf 00 lds r24, 0x00BF |
9ba: 84 34 cpi r24, 0x44 ; 68 |
9bc: 31 f4 brne .+12 ; 0x9ca |
9be: 80 91 c0 00 lds r24, 0x00C0 |
9c2: 86 34 cpi r24, 0x46 ; 70 |
9c4: 11 f4 brne .+4 ; 0x9ca |
(asciiTokenBuffer[1] == 'F') ) |
{ |
/* we should go into frame dump mode */ |
receivedCmd = dumpFrameCmd; |
9c6: 83 e0 ldi r24, 0x03 ; 3 |
9c8: 33 c0 rjmp .+102 ; 0xa30 |
} |
else if ( (asciiTokenBuffer[0] == 'C') && |
9ca: 80 91 bf 00 lds r24, 0x00BF |
9ce: 83 34 cpi r24, 0x43 ; 67 |
9d0: 31 f4 brne .+12 ; 0x9de |
9d2: 80 91 c0 00 lds r24, 0x00C0 |
9d6: 82 35 cpi r24, 0x52 ; 82 |
9d8: 11 f4 brne .+4 ; 0x9de |
(asciiTokenBuffer[1] == 'R') ) |
{ |
/* the user wants to set registers in the OV6620 */ |
receivedCmd = setCameraRegsCmd; |
9da: 82 e0 ldi r24, 0x02 ; 2 |
9dc: 29 c0 rjmp .+82 ; 0xa30 |
} |
else if ( (asciiTokenBuffer[0] == 'E') && |
9de: 80 91 bf 00 lds r24, 0x00BF |
9e2: 85 34 cpi r24, 0x45 ; 69 |
9e4: 31 f4 brne .+12 ; 0x9f2 |
9e6: 80 91 c0 00 lds r24, 0x00C0 |
9ea: 84 35 cpi r24, 0x54 ; 84 |
9ec: 11 f4 brne .+4 ; 0x9f2 |
(asciiTokenBuffer[1] == 'T') ) |
{ |
/* the user wants to enable tracking */ |
receivedCmd = enableTrackingCmd; |
9ee: 84 e0 ldi r24, 0x04 ; 4 |
9f0: 1f c0 rjmp .+62 ; 0xa30 |
} |
else if ( (asciiTokenBuffer[0] == 'S') && |
9f2: 80 91 bf 00 lds r24, 0x00BF |
9f6: 83 35 cpi r24, 0x53 ; 83 |
9f8: 31 f4 brne .+12 ; 0xa06 |
9fa: 80 91 c0 00 lds r24, 0x00C0 |
9fe: 8d 34 cpi r24, 0x4D ; 77 |
a00: 11 f4 brne .+4 ; 0xa06 |
(asciiTokenBuffer[1] == 'M') ) |
{ |
/* the user wants to set the color map */ |
receivedCmd = setColorMapCmd; |
a02: 86 e0 ldi r24, 0x06 ; 6 |
a04: 15 c0 rjmp .+42 ; 0xa30 |
} |
else if ( (asciiTokenBuffer[0] == 'D') && |
a06: 80 91 bf 00 lds r24, 0x00BF |
a0a: 84 34 cpi r24, 0x44 ; 68 |
a0c: 31 f4 brne .+12 ; 0xa1a |
a0e: 80 91 c0 00 lds r24, 0x00C0 |
a12: 84 35 cpi r24, 0x54 ; 84 |
a14: 11 f4 brne .+4 ; 0xa1a |
(asciiTokenBuffer[1] == 'T') ) |
{ |
receivedCmd = disableTrackingCmd; |
a16: 85 e0 ldi r24, 0x05 ; 5 |
a18: 0b c0 rjmp .+22 ; 0xa30 |
} |
else if ( (asciiTokenBuffer[0] == 'R') && |
a1a: 80 91 bf 00 lds r24, 0x00BF |
a1e: 82 35 cpi r24, 0x52 ; 82 |
a20: 31 f4 brne .+12 ; 0xa2e |
a22: 80 91 c0 00 lds r24, 0x00C0 |
a26: 83 35 cpi r24, 0x53 ; 83 |
a28: 11 f4 brne .+4 ; 0xa2e |
(asciiTokenBuffer[1] == 'S') ) |
{ |
receivedCmd = resetCameraCmd; |
a2a: 87 e0 ldi r24, 0x07 ; 7 |
a2c: 01 c0 rjmp .+2 ; 0xa30 |
} |
else |
{ |
/* don't recognize the cmd */ |
receivedCmd = invalidCmd; |
a2e: 89 e0 ldi r24, 0x09 ; 9 |
a30: 80 93 62 00 sts 0x0062, r24 |
} |
memset(asciiTokenBuffer,0x00,MAX_TOKEN_LENGTH); |
a34: 83 e0 ldi r24, 0x03 ; 3 |
a36: ef eb ldi r30, 0xBF ; 191 |
a38: f0 e0 ldi r31, 0x00 ; 0 |
a3a: 11 92 st Z+, r1 |
a3c: 8a 95 dec r24 |
a3e: e9 f7 brne .-6 ; 0xa3a |
charIndex = 0; |
a40: 10 92 bd 00 sts 0x00BD, r1 |
charCount = 0; |
a44: 10 92 bc 00 sts 0x00BC, r1 |
} |
a48: 08 95 ret |
00000a4a <UIMgr_sendAck>: |
/*********************************************************** |
Function Name: UIMgr_sendAck |
Function Description: This function is responsible for |
queuing up an ACK to be sent to the user. |
Inputs: none |
Outputs: none |
***********************************************************/ |
static void UIMgr_sendAck(void) |
{ |
UIMgr_writeTxFifo('A'); |
a4a: 81 e4 ldi r24, 0x41 ; 65 |
a4c: 6e d0 rcall .+220 ; 0xb2a |
UIMgr_writeTxFifo('C'); |
a4e: 83 e4 ldi r24, 0x43 ; 67 |
a50: 6c d0 rcall .+216 ; 0xb2a |
UIMgr_writeTxFifo('K'); |
a52: 8b e4 ldi r24, 0x4B ; 75 |
a54: 6a d0 rcall .+212 ; 0xb2a |
UIMgr_writeTxFifo('\r'); |
a56: 8d e0 ldi r24, 0x0D ; 13 |
a58: 68 d0 rcall .+208 ; 0xb2a |
} |
a5a: 08 95 ret |
00000a5c <UIMgr_sendNck>: |
/*********************************************************** |
Function Name: UIMgr_sendNck |
Function Description: This function is responsible for |
queueing up an NCK to be sent to the user. |
Inputs: none |
Outputs: none |
***********************************************************/ |
static void UIMgr_sendNck(void) |
{ |
UIMgr_writeTxFifo('N'); |
a5c: 8e e4 ldi r24, 0x4E ; 78 |
a5e: 65 d0 rcall .+202 ; 0xb2a |
UIMgr_writeTxFifo('C'); |
a60: 83 e4 ldi r24, 0x43 ; 67 |
a62: 63 d0 rcall .+198 ; 0xb2a |
UIMgr_writeTxFifo('K'); |
a64: 8b e4 ldi r24, 0x4B ; 75 |
a66: 61 d0 rcall .+194 ; 0xb2a |
UIMgr_writeTxFifo('\r'); |
a68: 8d e0 ldi r24, 0x0D ; 13 |
a6a: 5f d0 rcall .+190 ; 0xb2a |
} |
a6c: 08 95 ret |
00000a6e <UIMgr_writeBufferToTxFifo>: |
/*********************************************************** |
Function Name: UIMgr_writeBufferToTxFifo |
Function Description: This function is responsible for |
placing "length" bytes into the tx FIFO. |
Inputs: pData - a pointer to the data to send |
length - the number of bytes to send |
Outputs: none |
***********************************************************/ |
void UIMgr_writeBufferToTxFifo(unsigned char *pData, unsigned char length) |
{ |
a6e: dc 01 movw r26, r24 |
unsigned char tmpHead; |
if (length == 0) |
a70: 66 23 and r22, r22 |
a72: a9 f0 breq .+42 ; 0xa9e |
{ |
return; |
} |
DISABLE_INTS(); |
a74: f8 94 cli |
while(length-- != 0) |
a76: 61 50 subi r22, 0x01 ; 1 |
a78: 6f 3f cpi r22, 0xFF ; 255 |
a7a: 81 f0 breq .+32 ; 0xa9c |
a7c: 24 e9 ldi r18, 0x94 ; 148 |
a7e: 32 e0 ldi r19, 0x02 ; 2 |
{ |
UIMgr_txFifo[UIMgr_txFifoHead] = *pData++; |
a80: 90 91 ba 00 lds r25, 0x00BA |
a84: f9 01 movw r30, r18 |
a86: e9 0f add r30, r25 |
a88: f1 1d adc r31, r1 |
a8a: 8d 91 ld r24, X+ |
a8c: 80 83 st Z, r24 |
/* now move the head up */ |
tmpHead = (UIMgr_txFifoHead + 1) & (UI_MGR_TX_FIFO_MASK); |
a8e: 89 2f mov r24, r25 |
a90: 8f 5f subi r24, 0xFF ; 255 |
a92: 8f 73 andi r24, 0x3F ; 63 |
UIMgr_txFifoHead = tmpHead; |
a94: 80 93 ba 00 sts 0x00BA, r24 |
a98: 61 50 subi r22, 0x01 ; 1 |
a9a: 90 f7 brcc .-28 ; 0xa80 |
} |
ENABLE_INTS(); |
a9c: 78 94 sei |
} |
a9e: 08 95 ret |
00000aa0 <UIMgr_txBuffer>: |
/*********************************************************** |
Function Name: UIMgr_txBuffer |
Function Description: This function is responsible for |
sending 'length' bytes out using the UartInterface |
module. |
Inputs: pData - a pointer to the data to send |
length - the number of bytes to send |
Outputs: none |
***********************************************************/ |
void UIMgr_txBuffer(unsigned char *pData, unsigned char length) |
{ |
aa0: 0f 93 push r16 |
aa2: 1f 93 push r17 |
aa4: cf 93 push r28 |
aa6: 8c 01 movw r16, r24 |
aa8: c6 2f mov r28, r22 |
while(length-- != 0) |
aaa: c1 50 subi r28, 0x01 ; 1 |
aac: cf 3f cpi r28, 0xFF ; 255 |
aae: 31 f0 breq .+12 ; 0xabc |
{ |
UartInt_txByte(*pData++); |
ab0: f8 01 movw r30, r16 |
ab2: 81 91 ld r24, Z+ |
ab4: 8f 01 movw r16, r30 |
ab6: 54 d0 rcall .+168 ; 0xb60 |
ab8: c1 50 subi r28, 0x01 ; 1 |
aba: d0 f7 brcc .-12 ; 0xab0 |
} |
} |
abc: cf 91 pop r28 |
abe: 1f 91 pop r17 |
ac0: 0f 91 pop r16 |
ac2: 08 95 ret |
00000ac4 <UIMgr_flushTxBuffer>: |
/*********************************************************** |
Function Name: UIMgr_flushTxBuffer |
Function Description: This function is responsible for |
sending all data currently in the serial tx buffer |
to the user. |
Inputs: none |
Outputs: none |
***********************************************************/ |
void UIMgr_flushTxBuffer(void) |
{ |
while(IS_DATA_IN_TX_FIFO() == TRUE) |
ac4: 90 91 ba 00 lds r25, 0x00BA |
ac8: 80 91 bb 00 lds r24, 0x00BB |
acc: 98 17 cp r25, r24 |
ace: 41 f0 breq .+16 ; 0xae0 |
{ |
UartInt_txByte(UIMgr_readTxFifo() ); |
ad0: 1a d0 rcall .+52 ; 0xb06 |
ad2: 46 d0 rcall .+140 ; 0xb60 |
ad4: 90 91 ba 00 lds r25, 0x00BA |
ad8: 80 91 bb 00 lds r24, 0x00BB |
adc: 98 17 cp r25, r24 |
ade: c1 f7 brne .-16 ; 0xad0 |
} |
} |
ae0: 08 95 ret |
00000ae2 <UIMgr_readRxFifo>: |
/*********************************************************** |
Function Name: UIMgr_readRxFifo |
Function Description: This function is responsible for |
reading a single byte of data from the rx fifo, and |
updating the appropriate pointers. |
Inputs: none |
Outputs: unsigned char-the data read |
***********************************************************/ |
static unsigned char UIMgr_readRxFifo(void) |
{ |
unsigned char dataByte, tmpTail; |
/* just return the current tail from the rx fifo */ |
DISABLE_INTS(); |
ae2: f8 94 cli |
dataByte = UIMgr_rxFifo[UIMgr_rxFifoTail]; |
ae4: 20 91 b9 00 lds r18, 0x00B9 |
ae8: 84 e7 ldi r24, 0x74 ; 116 |
aea: 92 e0 ldi r25, 0x02 ; 2 |
aec: fc 01 movw r30, r24 |
aee: e2 0f add r30, r18 |
af0: f1 1d adc r31, r1 |
af2: 90 81 ld r25, Z |
tmpTail = (UIMgr_rxFifoTail+1) & (UI_MGR_RX_FIFO_MASK); |
af4: 82 2f mov r24, r18 |
af6: 8f 5f subi r24, 0xFF ; 255 |
af8: 8f 71 andi r24, 0x1F ; 31 |
UIMgr_rxFifoTail = tmpTail; |
afa: 80 93 b9 00 sts 0x00B9, r24 |
ENABLE_INTS(); |
afe: 78 94 sei |
return(dataByte); |
b00: 89 2f mov r24, r25 |
b02: 99 27 eor r25, r25 |
} |
b04: 08 95 ret |
00000b06 <UIMgr_readTxFifo>: |
/*********************************************************** |
Function Name: UIMgr_readTxFifo |
Function Description: This function is responsible for |
reading a single byte of data from the tx fifo, and |
updating the appropriate pointers. |
Inputs: none |
Outputs: unsigned char-the data read |
***********************************************************/ |
static unsigned char UIMgr_readTxFifo(void) |
{ |
unsigned char dataByte, tmpTail; |
/* just return the current tail from the tx fifo */ |
DISABLE_INTS(); |
b06: f8 94 cli |
dataByte = UIMgr_txFifo[UIMgr_txFifoTail]; |
b08: 20 91 bb 00 lds r18, 0x00BB |
b0c: 84 e9 ldi r24, 0x94 ; 148 |
b0e: 92 e0 ldi r25, 0x02 ; 2 |
b10: fc 01 movw r30, r24 |
b12: e2 0f add r30, r18 |
b14: f1 1d adc r31, r1 |
b16: 90 81 ld r25, Z |
tmpTail = (UIMgr_txFifoTail+1) & (UI_MGR_TX_FIFO_MASK); |
b18: 82 2f mov r24, r18 |
b1a: 8f 5f subi r24, 0xFF ; 255 |
b1c: 8f 73 andi r24, 0x3F ; 63 |
UIMgr_txFifoTail = tmpTail; |
b1e: 80 93 bb 00 sts 0x00BB, r24 |
ENABLE_INTS(); |
b22: 78 94 sei |
return(dataByte); |
b24: 89 2f mov r24, r25 |
b26: 99 27 eor r25, r25 |
} |
b28: 08 95 ret |
00000b2a <UIMgr_writeTxFifo>: |
/*********************************************************** |
Function Name: UIMgr_writeTxFifo |
Function Description: This function is responsible for |
writing a single byte to the TxFifo and |
updating the appropriate pointers. |
Inputs: data - the byte to write to the Fifo |
Outputs: none |
***********************************************************/ |
void UIMgr_writeTxFifo(unsigned char data) |
{ |
b2a: 38 2f mov r19, r24 |
unsigned char tmpHead; |
DISABLE_INTS(); |
b2c: f8 94 cli |
UIMgr_txFifo[UIMgr_txFifoHead] = data; |
b2e: 20 91 ba 00 lds r18, 0x00BA |
b32: 84 e9 ldi r24, 0x94 ; 148 |
b34: 92 e0 ldi r25, 0x02 ; 2 |
b36: fc 01 movw r30, r24 |
b38: e2 0f add r30, r18 |
b3a: f1 1d adc r31, r1 |
b3c: 30 83 st Z, r19 |
/* now move the head up */ |
tmpHead = (UIMgr_txFifoHead + 1) & (UI_MGR_TX_FIFO_MASK); |
b3e: 82 2f mov r24, r18 |
b40: 8f 5f subi r24, 0xFF ; 255 |
b42: 8f 73 andi r24, 0x3F ; 63 |
UIMgr_txFifoHead = tmpHead; |
b44: 80 93 ba 00 sts 0x00BA, r24 |
ENABLE_INTS(); |
b48: 78 94 sei |
} |
b4a: 08 95 ret |
00000b4c <UartInt_init>: |
void UartInt_init(void) |
{ |
/* set up the baud rate registers so the UART will operate |
at 115.2 Kbps */ |
UBRRH = 0x00; |
b4c: 10 bc out 0x20, r1 ; 32 |
#ifdef NO_CRYSTAL |
UBRRL = 18; /* 18 for double clocking at 115.2 kbps */ |
b4e: 82 e1 ldi r24, 0x12 ; 18 |
b50: 89 b9 out 0x09, r24 ; 9 |
#else |
UBRRL = 0x08; /* for 16 MHz crystal at 115.2 kbps */ |
#endif |
/* enable the tx and rx capabilities of the UART...as well |
as the receive complete interrupt */ |
UCSRB = (1<<RXCIE)|(1<<RXEN)|(1<<TXEN); |
b52: 88 e9 ldi r24, 0x98 ; 152 |
b54: 8a b9 out 0x0a, r24 ; 10 |
/* set up the control registers so the UART works at 8N1 */ |
UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); |
b56: 86 e8 ldi r24, 0x86 ; 134 |
b58: 80 bd out 0x20, r24 ; 32 |
#ifdef NO_CRYSTAL |
/* set the baud rate to use the double-speed */ |
UCSRA = (1<<U2X); |
b5a: 82 e0 ldi r24, 0x02 ; 2 |
b5c: 8b b9 out 0x0b, r24 ; 11 |
#endif |
} |
b5e: 08 95 ret |
00000b60 <UartInt_txByte>: |
/*********************************************************** |
Function Name: UartInt_txByte |
Function Description: This function is responsible for |
transmitting a single byte on the uart. |
Inputs: txByte - the byte to send |
Outputs: none |
NOTES: When the TX UDRE (data register empty) is set, there |
is puposefully no interrupt...thus, to send a string of |
data out, the calling routine needs to hold up the entire |
application while this takes place (or just send one |
byte at a time at strtegically timed intervals, like |
the stats data is sent out :-) |
***********************************************************/ |
void UartInt_txByte(unsigned char txByte) |
{ |
/* Wait for empty transmit buffer */ |
while ( !( UCSRA & (1<<UDRE)) ); |
b60: 5d 9b sbis 0x0b, 5 ; 11 |
b62: fe cf rjmp .-4 ; 0xb60 |
/* Put data into buffer, sends the data */ |
UDR = txByte; |
b64: 8c b9 out 0x0c, r24 ; 12 |
} |
b66: 08 95 ret |
00000b68 <__vector_11>: |
/*********************************************************** |
Function Name: SIG_UART_RECV ISR |
Function Description: This function is responsible for |
handling the interrupt caused when a data byte is |
received by the UART. |
Inputs: none |
Outputs: none |
NOTES: This function was originally written in assembly, |
but moved over to C when the setting of the "T" bit at |
the end of the routine was no longer necessary (this |
theoretically allowed the AVRcam to respond to serial |
bytes in the middle of tracking or dumping a frame. |
But it wasn't really needed, and understanding the C |
is easier :-) |
***********************************************************/ |
SIGNAL(SIG_UART_RECV) |
{ |
b68: 1f 92 push r1 |
b6a: 0f 92 push r0 |
b6c: 0f b6 in r0, 0x3f ; 63 |
b6e: 0f 92 push r0 |
b70: 11 24 eor r1, r1 |
b72: 2f 93 push r18 |
b74: 8f 93 push r24 |
b76: 9f 93 push r25 |
b78: ef 93 push r30 |
b7a: ff 93 push r31 |
unsigned char tmpHead; |
/* read the data byte, put it in the serial queue, and |
post the event */ |
UIMgr_rxFifo[UIMgr_rxFifoHead] = UDR; |
b7c: 20 91 b8 00 lds r18, 0x00B8 |
b80: 84 e7 ldi r24, 0x74 ; 116 |
b82: 92 e0 ldi r25, 0x02 ; 2 |
b84: fc 01 movw r30, r24 |
b86: e2 0f add r30, r18 |
b88: f1 1d adc r31, r1 |
b8a: 8c b1 in r24, 0x0c ; 12 |
b8c: 80 83 st Z, r24 |
/* now move the head up */ |
tmpHead = (UIMgr_rxFifoHead + 1) & (UI_MGR_RX_FIFO_MASK); |
b8e: 2f 5f subi r18, 0xFF ; 255 |
b90: 2f 71 andi r18, 0x1F ; 31 |
UIMgr_rxFifoHead = tmpHead; |
b92: 20 93 b8 00 sts 0x00B8, r18 |
/* write the serial received event to the event fifo */ |
Exec_eventFifo[Exec_eventFifoHead] = EV_SERIAL_DATA_RECEIVED; |
b96: 20 91 70 00 lds r18, 0x0070 |
b9a: 8c e6 ldi r24, 0x6C ; 108 |
b9c: 92 e0 ldi r25, 0x02 ; 2 |
b9e: fc 01 movw r30, r24 |
ba0: e2 0f add r30, r18 |
ba2: f1 1d adc r31, r1 |
ba4: 81 e0 ldi r24, 0x01 ; 1 |
ba6: 80 83 st Z, r24 |
/* now move the head up */ |
tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK); |
ba8: 28 0f add r18, r24 |
baa: 27 70 andi r18, 0x07 ; 7 |
Exec_eventFifoHead = tmpHead; |
bac: 20 93 70 00 sts 0x0070, r18 |
} |
bb0: ff 91 pop r31 |
bb2: ef 91 pop r30 |
bb4: 9f 91 pop r25 |
bb6: 8f 91 pop r24 |
bb8: 2f 91 pop r18 |
bba: 0f 90 pop r0 |
bbc: 0f be out 0x3f, r0 ; 63 |
bbe: 0f 90 pop r0 |
bc0: 1f 90 pop r1 |
bc2: 18 95 reti |
00000bc4 <I2CInt_init>: |
Outputs: none |
***********************************************************/ |
void I2CInt_init(void) |
{ |
TWSR = 0; |
bc4: 11 b8 out 0x01, r1 ; 1 |
/* init the speed of the I2C interface, running at |
100 Kbps */ |
TWBR = (FOSC / I2C_SPEED - 16)/2; |
bc6: 88 e4 ldi r24, 0x48 ; 72 |
bc8: 80 b9 out 0x00, r24 ; 0 |
} |
bca: 08 95 ret |
00000bcc <I2CInt_writeData>: |
/*********************************************************** |
Function Name: I2CInt_writeData |
Function Description: This function is responsible for |
initiating the process of writing a sequence of bytes |
an I2C slave address. This function will try to write |
the data three times before giving up. |
Inputs: address: the address of the I2C slave device |
data: a pointer to the data to be written |
to the slave...for camera interfacing, |
the data follows a <register #><data> |
format |
bytes: the number of bytes to write |
Outputs: none |
***********************************************************/ |
void I2CInt_writeData(unsigned char address, unsigned char *data, unsigned char bytes) |
{ |
bcc: 98 2f mov r25, r24 |
while(status & (1<<BUSY)); /* Bus is busy wait (or exit with error code) */ |
bce: 80 91 08 01 lds r24, 0x0108 |
bd2: 88 23 and r24, r24 |
bd4: e4 f3 brlt .-8 ; 0xbce |
while(TWCR & (1<<TWSTO)); |
bd6: 06 b6 in r0, 0x36 ; 54 |
bd8: 04 fc sbrc r0, 4 |
bda: fd cf rjmp .-6 ; 0xbd6 |
/* copy the needed data and state info to our local I2C command structure */ |
twi_address = address; |
bdc: 90 93 03 01 sts 0x0103, r25 |
twi_data = data; |
be0: 70 93 05 01 sts 0x0105, r23 |
be4: 60 93 04 01 sts 0x0104, r22 |
twi_bytes = bytes; |
be8: 40 93 07 01 sts 0x0107, r20 |
twi_ddr = TW_WRITE; |
bec: 10 92 06 01 sts 0x0106, r1 |
retry_cnt = 0; |
bf0: 10 92 09 01 sts 0x0109, r1 |
/* Generate start condition, the remainder of the transfer is interrupt driven and |
will be performed in the background */ |
TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE); |
bf4: 85 ea ldi r24, 0xA5 ; 165 |
bf6: 86 bf out 0x36, r24 ; 54 |
status |= (1<<BUSY); |
bf8: 80 91 08 01 lds r24, 0x0108 |
bfc: 80 68 ori r24, 0x80 ; 128 |
bfe: 80 93 08 01 sts 0x0108, r24 |
} |
c02: 08 95 ret |
00000c04 <I2CInt_readData>: |
/*********************************************************** |
Function Name: I2CInt_readData |
Function Description: This funcion is responsible for |
reading the specified number of bytes from a slave |
device. |
Inputs: address: the slave address to read from |
data: a pointer to where the data will be stored |
bytes: the number of bytes to read |
Outputs: none |
***********************************************************/ |
void I2CInt_readData(unsigned char address, unsigned char *data, unsigned char bytes) |
{ |
c04: 98 2f mov r25, r24 |
/* Bus is busy wait (or exit with error code) */ |
while(status & (1<<BUSY)); |
c06: 80 91 08 01 lds r24, 0x0108 |
c0a: 88 23 and r24, r24 |
c0c: e4 f3 brlt .-8 ; 0xc06 |
twi_address = address; |
c0e: 90 93 03 01 sts 0x0103, r25 |
twi_data = data; |
c12: 70 93 05 01 sts 0x0105, r23 |
c16: 60 93 04 01 sts 0x0104, r22 |
twi_bytes = bytes; |
c1a: 40 93 07 01 sts 0x0107, r20 |
twi_ddr = TW_READ; |
c1e: 81 e0 ldi r24, 0x01 ; 1 |
c20: 80 93 06 01 sts 0x0106, r24 |
retry_cnt = 0; |
c24: 10 92 09 01 sts 0x0109, r1 |
/* Generate start condition, the remainder of the transfer is interrupt driven and |
will be performed in the background */ |
TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE); |
c28: 85 ea ldi r24, 0xA5 ; 165 |
c2a: 86 bf out 0x36, r24 ; 54 |
status |= (1<<BUSY); |
c2c: 80 91 08 01 lds r24, 0x0108 |
c30: 80 68 ori r24, 0x80 ; 128 |
c32: 80 93 08 01 sts 0x0108, r24 |
} |
c36: 08 95 ret |
00000c38 <I2CInt_isI2cBusy>: |
/*********************************************************** |
Function Name: I2CInt_isI2cBusy |
Function Description: This funcion is responsible for |
indicating if the I2C bus is currently busy to external |
modules. |
device. |
Inputs: none |
Outputs: bool_t - indicating if bus is busy |
***********************************************************/ |
bool_t I2CInt_isI2cBusy(void) |
{ |
bool_t retVal = FALSE; |
c38: 90 e0 ldi r25, 0x00 ; 0 |
if ( (status & (1<<BUSY)) != 0) |
c3a: 80 91 08 01 lds r24, 0x0108 |
c3e: 88 23 and r24, r24 |
c40: 0c f4 brge .+2 ; 0xc44 |
{ |
retVal = TRUE; |
c42: 91 e0 ldi r25, 0x01 ; 1 |
} |
return(retVal); |
c44: 89 2f mov r24, r25 |
c46: 99 27 eor r25, r25 |
} |
c48: 08 95 ret |
00000c4a <__vector_17>: |
/*********************************************************** |
Function Name: <interrupt handler for I2C> |
Function Description: This function is responsible for |
implementing the control logic needed to perform a |
read or write operation with an I2C slave. |
Inputs: none |
Outputs: none |
***********************************************************/ |
SIGNAL(SIG_2WIRE_SERIAL) |
{ |
c4a: 1f 92 push r1 |
c4c: 0f 92 push r0 |
c4e: 0f b6 in r0, 0x3f ; 63 |
c50: 0f 92 push r0 |
c52: 11 24 eor r1, r1 |
c54: 8f 93 push r24 |
c56: 9f 93 push r25 |
c58: af 93 push r26 |
c5a: bf 93 push r27 |
c5c: ef 93 push r30 |
c5e: ff 93 push r31 |
unsigned char TWI_status = TWSR & TW_STATUS_MASK; /* grab just the status bits */ |
c60: 81 b1 in r24, 0x01 ; 1 |
c62: 88 7f andi r24, 0xF8 ; 248 |
/* the entire I2C handler is state-based...determine |
what needs to be done based on TWI_status */ |
switch(TWI_status) |
c64: 99 27 eor r25, r25 |
c66: aa 27 eor r26, r26 |
c68: bb 27 eor r27, r27 |
c6a: fc 01 movw r30, r24 |
c6c: 38 97 sbiw r30, 0x08 ; 8 |
c6e: e1 35 cpi r30, 0x51 ; 81 |
c70: f1 05 cpc r31, r1 |
c72: 08 f0 brcs .+2 ; 0xc76 |
c74: 6d c0 rjmp .+218 ; 0xd50 |
c76: ed 5e subi r30, 0xED ; 237 |
c78: ff 4f sbci r31, 0xFF ; 255 |
c7a: 09 94 ijmp |
{ |
case TW_START: /* Start condition */ |
case TW_REP_START: /* Repeated start condition */ |
if(retry_cnt > MAX_TWI_RETRIES) |
c7c: 80 91 09 01 lds r24, 0x0109 |
c80: 83 30 cpi r24, 0x03 ; 3 |
c82: 08 f0 brcs .+2 ; 0xc86 |
c84: 5d c0 rjmp .+186 ; 0xd40 |
{ |
/* generate stop condition if we've reached our retry limit */ |
TWCR |= (1<<TWINT)|(1<<TWSTO); |
status &= ~(1<<BUSY); |
return; |
} |
/* indicate read or write */ |
TWDR = (twi_address<<1) + twi_ddr; |
c86: 80 91 03 01 lds r24, 0x0103 |
c8a: 98 2f mov r25, r24 |
c8c: 99 0f add r25, r25 |
c8e: 80 91 06 01 lds r24, 0x0106 |
c92: 89 0f add r24, r25 |
c94: 83 b9 out 0x03, r24 ; 3 |
/* TWSTA must be cleared...also clears TWINT */ |
TWCR &= ~(1<<TWSTA); |
c96: 86 b7 in r24, 0x36 ; 54 |
c98: 8f 7d andi r24, 0xDF ; 223 |
c9a: 4a c0 rjmp .+148 ; 0xd30 |
break; |
case TW_MT_SLA_ACK: /* Slave acknowledged address, */ |
retry_cnt = 0; |
c9c: 10 92 09 01 sts 0x0109, r1 |
/* tx the data, and increment the data pointer */ |
TWDR = *twi_data; |
ca0: 11 c0 rjmp .+34 ; 0xcc4 |
twi_data++; |
/* clear the int to continue */ |
TWCR |= (1<<TWINT); |
break; |
case TW_MT_SLA_NACK: /* Slave didn't acknowledge address, */ |
case TW_MR_SLA_NACK: |
retry_cnt++; |
ca2: 80 91 09 01 lds r24, 0x0109 |
ca6: 8f 5f subi r24, 0xFF ; 255 |
ca8: 80 93 09 01 sts 0x0109, r24 |
/* retry...*/ |
TWCR |= (1<<TWINT)|(1<<TWSTA)|(1<<TWSTO); |
cac: 86 b7 in r24, 0x36 ; 54 |
cae: 80 6b ori r24, 0xB0 ; 176 |
cb0: 3f c0 rjmp .+126 ; 0xd30 |
break; |
case TW_MT_DATA_ACK: /* Slave Acknowledged data, */ |
if(--twi_bytes > 0) |
cb2: 80 91 07 01 lds r24, 0x0107 |
cb6: 81 50 subi r24, 0x01 ; 1 |
cb8: 80 93 07 01 sts 0x0107, r24 |
cbc: 80 91 07 01 lds r24, 0x0107 |
cc0: 88 23 and r24, r24 |
cc2: f1 f1 breq .+124 ; 0xd40 |
{ |
/* more data to send, so send it */ |
TWDR = *twi_data; |
cc4: e0 91 04 01 lds r30, 0x0104 |
cc8: f0 91 05 01 lds r31, 0x0105 |
ccc: 80 81 ld r24, Z |
cce: 83 b9 out 0x03, r24 ; 3 |
twi_data++; |
cd0: cf 01 movw r24, r30 |
cd2: 01 96 adiw r24, 0x01 ; 1 |
cd4: 90 93 05 01 sts 0x0105, r25 |
cd8: 80 93 04 01 sts 0x0104, r24 |
TWCR |= (1<<TWINT); |
cdc: 09 c0 rjmp .+18 ; 0xcf0 |
} |
else |
{ |
/* generate the stop condition if needed */ |
TWCR |= (1<<TWSTO)|(1<<TWINT); |
status &= ~(1<<BUSY); |
} |
break; |
case TW_MT_DATA_NACK: /* Slave didn't acknowledge data */ |
/* send the stop condition */ |
TWCR |= (1<<TWINT)|(1<<TWSTO); |
status &= ~(1<<BUSY); |
break; |
case TW_MR_SLA_ACK: /* Slave acknowledged address */ |
if(--twi_bytes > 0) |
cde: 80 91 07 01 lds r24, 0x0107 |
ce2: 81 50 subi r24, 0x01 ; 1 |
ce4: 80 93 07 01 sts 0x0107, r24 |
ce8: 80 91 07 01 lds r24, 0x0107 |
cec: 88 23 and r24, r24 |
cee: d9 f4 brne .+54 ; 0xd26 |
{ |
/* if there is more than one byte to read, acknowledge */ |
TWCR |= (1<<TWEA)|(1<<TWINT); |
} |
else |
{ |
/* no acknowledge */ |
TWCR |= (1<<TWINT); |
cf0: 86 b7 in r24, 0x36 ; 54 |
cf2: 80 68 ori r24, 0x80 ; 128 |
cf4: 1d c0 rjmp .+58 ; 0xd30 |
} |
break; |
case TW_MR_DATA_ACK: /* Master acknowledged data */ |
/* grab the received data */ |
*twi_data = TWDR; |
cf6: e0 91 04 01 lds r30, 0x0104 |
cfa: f0 91 05 01 lds r31, 0x0105 |
cfe: 83 b1 in r24, 0x03 ; 3 |
d00: 80 83 st Z, r24 |
twi_data++; |
d02: 80 91 04 01 lds r24, 0x0104 |
d06: 90 91 05 01 lds r25, 0x0105 |
d0a: 01 96 adiw r24, 0x01 ; 1 |
d0c: 90 93 05 01 sts 0x0105, r25 |
d10: 80 93 04 01 sts 0x0104, r24 |
if(--twi_bytes > 0) |
d14: 80 91 07 01 lds r24, 0x0107 |
d18: 81 50 subi r24, 0x01 ; 1 |
d1a: 80 93 07 01 sts 0x0107, r24 |
d1e: 80 91 07 01 lds r24, 0x0107 |
d22: 88 23 and r24, r24 |
d24: 19 f0 breq .+6 ; 0xd2c |
{ |
/* get the next data byte and ack */ |
TWCR |= (1<<TWEA)|(1<<TWINT); |
d26: 86 b7 in r24, 0x36 ; 54 |
d28: 80 6c ori r24, 0xC0 ; 192 |
d2a: 02 c0 rjmp .+4 ; 0xd30 |
} |
else |
{ |
/* clear out the enable acknowledge bit */ |
TWCR &= ~(1<<TWEA); |
d2c: 86 b7 in r24, 0x36 ; 54 |
d2e: 8f 7b andi r24, 0xBF ; 191 |
d30: 86 bf out 0x36, r24 ; 54 |
} |
break; |
d32: 0e c0 rjmp .+28 ; 0xd50 |
case TW_MR_DATA_NACK: /* Master didn't acknowledge data -> end of read process */ |
/* read data, and generate the stop condition */ |
*twi_data = TWDR; |
d34: e0 91 04 01 lds r30, 0x0104 |
d38: f0 91 05 01 lds r31, 0x0105 |
d3c: 83 b1 in r24, 0x03 ; 3 |
d3e: 80 83 st Z, r24 |
TWCR |= (1<<TWSTO)|(1<<TWINT); |
d40: 86 b7 in r24, 0x36 ; 54 |
d42: 80 69 ori r24, 0x90 ; 144 |
d44: 86 bf out 0x36, r24 ; 54 |
status &= ~(1<<BUSY); |
d46: 80 91 08 01 lds r24, 0x0108 |
d4a: 8f 77 andi r24, 0x7F ; 127 |
d4c: 80 93 08 01 sts 0x0108, r24 |
break; |
} |
} |
d50: ff 91 pop r31 |
d52: ef 91 pop r30 |
d54: bf 91 pop r27 |
d56: af 91 pop r26 |
d58: 9f 91 pop r25 |
d5a: 8f 91 pop r24 |
d5c: 0f 90 pop r0 |
d5e: 0f be out 0x3f, r0 ; 63 |
d60: 0f 90 pop r0 |
d62: 1f 90 pop r1 |
d64: 18 95 reti |
00000d66 <CamConfig_init>: |
Outputs: none |
***********************************************************/ |
void CamConfig_init(void) |
{ |
CamConfig_setCamReg(0x14,0x20); /* reduce frame size */ |
d66: 60 e2 ldi r22, 0x20 ; 32 |
d68: 84 e1 ldi r24, 0x14 ; 20 |
d6a: 0e d0 rcall .+28 ; 0xd88 |
CamConfig_setCamReg(0x39,0x40); /* gate PCLK with HREF */ |
d6c: 60 e4 ldi r22, 0x40 ; 64 |
d6e: 89 e3 ldi r24, 0x39 ; 57 |
d70: 0b d0 rcall .+22 ; 0xd88 |
CamConfig_setCamReg(0x12,0x28); /* set RGB mode, with no AWB */ |
d72: 68 e2 ldi r22, 0x28 ; 40 |
d74: 82 e1 ldi r24, 0x12 ; 18 |
d76: 08 d0 rcall .+16 ; 0xd88 |
CamConfig_setCamReg(0x28,0x05); /* set color sequencer */ |
d78: 65 e0 ldi r22, 0x05 ; 5 |
d7a: 88 e2 ldi r24, 0x28 ; 40 |
d7c: 05 d0 rcall .+10 ; 0xd88 |
CamConfig_setCamReg(0x13,0x01); /* un-tri-state the Y/UV lines */ |
d7e: 61 e0 ldi r22, 0x01 ; 1 |
d80: 83 e1 ldi r24, 0x13 ; 19 |
d82: 02 d0 rcall .+4 ; 0xd88 |
/* send the first four cmds in the I2C fifo */ |
CamConfig_sendFifoCmds(); |
d84: 06 d0 rcall .+12 ; 0xd92 |
} |
d86: 08 95 ret |
00000d88 <CamConfig_setCamReg>: |
/*********************************************************** |
Function Name: CamConfig_setCamReg |
Function Description: This function is responsible for |
creating an I2C cmd structure and placing it into the |
cmd fifo. |
Inputs: reg - the register to modify |
val - the new value of the register |
Outputs: none |
***********************************************************/ |
void CamConfig_setCamReg(unsigned char reg, unsigned char val) |
{ |
i2cCmd_t cmd; |
cmd.configReg = reg; |
d88: 28 2f mov r18, r24 |
cmd.data = val; |
d8a: 36 2f mov r19, r22 |
#ifndef SIMULATION |
CamConfig_writeTxFifo(cmd); |
d8c: c9 01 movw r24, r18 |
d8e: 2f d0 rcall .+94 ; 0xdee |
#endif |
} |
d90: 08 95 ret |
00000d92 <CamConfig_sendFifoCmds>: |
/*********************************************************** |
Function Name: CamConfig_sendFifoCmds |
Function Description: This function is responsible for |
sending the entire contents of the config fifo. This |
function won't return until the configuration process |
is complete (or an error is encountered). |
Inputs: none |
Outputs: none |
Note: Since this function is written to use the TWI |
interrupt in the I2CInterface module, there will be |
some busy-waiting here...no big deal, since we end up |
having to trash the frame that we are executing this |
slave write in anyway (since we can't meet the strict |
timing requirements and write i2c at the same time). |
***********************************************************/ |
void CamConfig_sendFifoCmds(void) |
{ |
d92: cf 93 push r28 |
d94: df 93 push r29 |
d96: cd b7 in r28, 0x3d ; 61 |
d98: de b7 in r29, 0x3e ; 62 |
d9a: 22 97 sbiw r28, 0x02 ; 2 |
d9c: 0f b6 in r0, 0x3f ; 63 |
d9e: f8 94 cli |
da0: de bf out 0x3e, r29 ; 62 |
da2: 0f be out 0x3f, r0 ; 63 |
da4: cd bf out 0x3d, r28 ; 61 |
i2cCmd_t cmd; |
while (CamConfig_txFifoHead != CamConfig_txFifoTail) |
da6: 90 91 0a 01 lds r25, 0x010A |
daa: 80 91 0b 01 lds r24, 0x010B |
dae: 98 17 cp r25, r24 |
db0: a9 f0 breq .+42 ; 0xddc |
{ |
cmd = CamConfig_readTxFifo(); |
db2: 37 d0 rcall .+110 ; 0xe22 |
db4: 89 83 std Y+1, r24 ; 0x01 |
db6: 9a 83 std Y+2, r25 ; 0x02 |
I2CInt_writeData(CAM_ADDRESS,&cmd.configReg,SIZE_OF_I2C_CMD); |
db8: 42 e0 ldi r20, 0x02 ; 2 |
dba: be 01 movw r22, r28 |
dbc: 6f 5f subi r22, 0xFF ; 255 |
dbe: 7f 4f sbci r23, 0xFF ; 255 |
dc0: 80 e6 ldi r24, 0x60 ; 96 |
dc2: 04 df rcall .-504 ; 0xbcc |
Utility_delay(100); |
dc4: 84 e6 ldi r24, 0x64 ; 100 |
dc6: 90 e0 ldi r25, 0x00 ; 0 |
dc8: 3e d0 rcall .+124 ; 0xe46 |
/* wait for the I2C transaction to complete */ |
while(I2CInt_isI2cBusy() == TRUE); |
dca: 36 df rcall .-404 ; 0xc38 |
dcc: 81 30 cpi r24, 0x01 ; 1 |
dce: e9 f3 breq .-6 ; 0xdca |
dd0: 90 91 0a 01 lds r25, 0x010A |
dd4: 80 91 0b 01 lds r24, 0x010B |
dd8: 98 17 cp r25, r24 |
dda: 59 f7 brne .-42 ; 0xdb2 |
} |
} |
ddc: 22 96 adiw r28, 0x02 ; 2 |
dde: 0f b6 in r0, 0x3f ; 63 |
de0: f8 94 cli |
de2: de bf out 0x3e, r29 ; 62 |
de4: 0f be out 0x3f, r0 ; 63 |
de6: cd bf out 0x3d, r28 ; 61 |
de8: df 91 pop r29 |
dea: cf 91 pop r28 |
dec: 08 95 ret |
00000dee <CamConfig_writeTxFifo>: |
/*********************************************************** |
Function Name: CamConfig_writeTxFifo |
Function Description: This function is responsible for |
adding a new command to the tx fifo. It adjusts all |
needed pointers. |
Inputs: cmd - the i2cCmd_t to add to the fifo |
Outputs: bool_t - indicating if writing to the fifo |
causes it to wrap |
***********************************************************/ |
bool_t CamConfig_writeTxFifo(i2cCmd_t cmd) |
{ |
dee: 9c 01 movw r18, r24 |
unsigned char tmpHead; |
bool_t retVal = TRUE; |
df0: 51 e0 ldi r21, 0x01 ; 1 |
CamConfig_txFifo[CamConfig_txFifoHead] = cmd; |
df2: 40 91 0a 01 lds r20, 0x010A |
df6: 84 2f mov r24, r20 |
df8: 99 27 eor r25, r25 |
dfa: 88 0f add r24, r24 |
dfc: 99 1f adc r25, r25 |
dfe: fc 01 movw r30, r24 |
e00: ec 52 subi r30, 0x2C ; 44 |
e02: fd 4f sbci r31, 0xFD ; 253 |
e04: 20 83 st Z, r18 |
e06: 31 83 std Z+1, r19 ; 0x01 |
/* see if we need to wrap */ |
tmpHead = (CamConfig_txFifoHead+1) & (CAM_CONFIG_TX_FIFO_MASK); |
e08: 84 2f mov r24, r20 |
e0a: 85 0f add r24, r21 |
e0c: 87 70 andi r24, 0x07 ; 7 |
CamConfig_txFifoHead = tmpHead; |
e0e: 80 93 0a 01 sts 0x010A, r24 |
/* check to see if we have filled up the queue */ |
if (CamConfig_txFifoHead == CamConfig_txFifoTail) |
e12: 90 91 0b 01 lds r25, 0x010B |
e16: 89 17 cp r24, r25 |
e18: 09 f4 brne .+2 ; 0xe1c |
{ |
/* we wrapped the fifo...return false */ |
retVal = FALSE; |
e1a: 50 e0 ldi r21, 0x00 ; 0 |
} |
return(retVal); |
e1c: 85 2f mov r24, r21 |
e1e: 99 27 eor r25, r25 |
} |
e20: 08 95 ret |
00000e22 <CamConfig_readTxFifo>: |
/*********************************************************** |
Function Name: CamConfig_readTxFifo |
Function Description: This function is responsible for |
reading a cmd out of the tx fifo. |
Inputs: none |
Outputs: i2cCmd_t - the cmd read from the fifo |
***********************************************************/ |
static i2cCmd_t CamConfig_readTxFifo(void) |
{ |
i2cCmd_t cmd; |
unsigned char tmpTail; |
/* just return the current tail from the rx fifo */ |
cmd = CamConfig_txFifo[CamConfig_txFifoTail]; |
e22: 40 91 0b 01 lds r20, 0x010B |
e26: 84 2f mov r24, r20 |
e28: 99 27 eor r25, r25 |
e2a: 88 0f add r24, r24 |
e2c: 99 1f adc r25, r25 |
e2e: fc 01 movw r30, r24 |
e30: ec 52 subi r30, 0x2C ; 44 |
e32: fd 4f sbci r31, 0xFD ; 253 |
e34: 20 81 ld r18, Z |
e36: 31 81 ldd r19, Z+1 ; 0x01 |
tmpTail = (CamConfig_txFifoTail+1) & (CAM_CONFIG_TX_FIFO_MASK); |
e38: 84 2f mov r24, r20 |
e3a: 8f 5f subi r24, 0xFF ; 255 |
e3c: 87 70 andi r24, 0x07 ; 7 |
CamConfig_txFifoTail = tmpTail; |
e3e: 80 93 0b 01 sts 0x010B, r24 |
return(cmd); |
} |
e42: c9 01 movw r24, r18 |
e44: 08 95 ret |
00000e46 <Utility_delay>: |
if needed...this isn't really a millisecond, so DON'T |
depend on it for exact timing... |
***********************************************************/ |
void Utility_delay(unsigned short numMs) |
{ |
e46: cf 93 push r28 |
e48: df 93 push r29 |
e4a: cd b7 in r28, 0x3d ; 61 |
e4c: de b7 in r29, 0x3e ; 62 |
e4e: 24 97 sbiw r28, 0x04 ; 4 |
e50: 0f b6 in r0, 0x3f ; 63 |
e52: f8 94 cli |
e54: de bf out 0x3e, r29 ; 62 |
e56: 0f be out 0x3f, r0 ; 63 |
e58: cd bf out 0x3d, r28 ; 61 |
e5a: 9c 01 movw r18, r24 |
volatile unsigned short i=0,j=0; |
e5c: 19 82 std Y+1, r1 ; 0x01 |
e5e: 1a 82 std Y+2, r1 ; 0x02 |
e60: 1b 82 std Y+3, r1 ; 0x03 |
e62: 1c 82 std Y+4, r1 ; 0x04 |
#ifndef SIMULATION |
for (i=0; i<numMs; i++) |
e64: 19 82 std Y+1, r1 ; 0x01 |
e66: 1a 82 std Y+2, r1 ; 0x02 |
e68: 89 81 ldd r24, Y+1 ; 0x01 |
e6a: 9a 81 ldd r25, Y+2 ; 0x02 |
e6c: 82 17 cp r24, r18 |
e6e: 93 07 cpc r25, r19 |
e70: e0 f4 brcc .+56 ; 0xeaa |
{ |
for (j=0; j<1000; j++) |
e72: 1b 82 std Y+3, r1 ; 0x03 |
e74: 1c 82 std Y+4, r1 ; 0x04 |
e76: 8b 81 ldd r24, Y+3 ; 0x03 |
e78: 9c 81 ldd r25, Y+4 ; 0x04 |
e7a: 88 5e subi r24, 0xE8 ; 232 |
e7c: 93 40 sbci r25, 0x03 ; 3 |
e7e: 58 f4 brcc .+22 ; 0xe96 |
{ |
asm volatile("nop"::); |
e80: 00 00 nop |
e82: 8b 81 ldd r24, Y+3 ; 0x03 |
e84: 9c 81 ldd r25, Y+4 ; 0x04 |
e86: 01 96 adiw r24, 0x01 ; 1 |
e88: 8b 83 std Y+3, r24 ; 0x03 |
e8a: 9c 83 std Y+4, r25 ; 0x04 |
e8c: 8b 81 ldd r24, Y+3 ; 0x03 |
e8e: 9c 81 ldd r25, Y+4 ; 0x04 |
e90: 88 5e subi r24, 0xE8 ; 232 |
e92: 93 40 sbci r25, 0x03 ; 3 |
e94: a8 f3 brcs .-22 ; 0xe80 |
e96: 89 81 ldd r24, Y+1 ; 0x01 |
e98: 9a 81 ldd r25, Y+2 ; 0x02 |
e9a: 01 96 adiw r24, 0x01 ; 1 |
e9c: 89 83 std Y+1, r24 ; 0x01 |
e9e: 9a 83 std Y+2, r25 ; 0x02 |
ea0: 89 81 ldd r24, Y+1 ; 0x01 |
ea2: 9a 81 ldd r25, Y+2 ; 0x02 |
ea4: 82 17 cp r24, r18 |
ea6: 93 07 cpc r25, r19 |
ea8: 20 f3 brcs .-56 ; 0xe72 |
} |
} |
#endif |
} |
eaa: 24 96 adiw r28, 0x04 ; 4 |
eac: 0f b6 in r0, 0x3f ; 63 |
eae: f8 94 cli |
eb0: de bf out 0x3e, r29 ; 62 |
eb2: 0f be out 0x3f, r0 ; 63 |
eb4: cd bf out 0x3d, r28 ; 61 |
eb6: df 91 pop r29 |
eb8: cf 91 pop r28 |
eba: 08 95 ret |
00000ebc <DebugInt_init>: |
Inputs: none |
Outputs: none |
***********************************************************/ |
void DebugInt_init(void) |
{ |
ebc: 1f 93 push r17 |
/* set PortD pin6 for output */ |
DDRD |= 0x40; |
ebe: 8e 9a sbi 0x11, 6 ; 17 |
/* turn on LED */ |
PORTD |= 0x40; |
ec0: 96 9a sbi 0x12, 6 ; 18 |
Utility_delay(500); |
ec2: 84 ef ldi r24, 0xF4 ; 244 |
ec4: 91 e0 ldi r25, 0x01 ; 1 |
ec6: bf df rcall .-130 ; 0xe46 |
PORTD &= 0xBF; |
ec8: 1f eb ldi r17, 0xBF ; 191 |
eca: 82 b3 in r24, 0x12 ; 18 |
ecc: 81 23 and r24, r17 |
ece: 82 bb out 0x12, r24 ; 18 |
Utility_delay(500); |
ed0: 84 ef ldi r24, 0xF4 ; 244 |
ed2: 91 e0 ldi r25, 0x01 ; 1 |
ed4: b8 df rcall .-144 ; 0xe46 |
PORTD |= 0x40; |
ed6: 96 9a sbi 0x12, 6 ; 18 |
Utility_delay(500); |
ed8: 84 ef ldi r24, 0xF4 ; 244 |
eda: 91 e0 ldi r25, 0x01 ; 1 |
edc: b4 df rcall .-152 ; 0xe46 |
PORTD &= 0xBF; |
ede: 82 b3 in r24, 0x12 ; 18 |
ee0: 81 23 and r24, r17 |
ee2: 82 bb out 0x12, r24 ; 18 |
Utility_delay(500); |
ee4: 84 ef ldi r24, 0xF4 ; 244 |
ee6: 91 e0 ldi r25, 0x01 ; 1 |
ee8: ae df rcall .-164 ; 0xe46 |
PORTD |= 0x40; |
eea: 96 9a sbi 0x12, 6 ; 18 |
Utility_delay(500); |
eec: 84 ef ldi r24, 0xF4 ; 244 |
eee: 91 e0 ldi r25, 0x01 ; 1 |
ef0: aa df rcall .-172 ; 0xe46 |
PORTD &= 0xBF; |
ef2: 82 b3 in r24, 0x12 ; 18 |
ef4: 81 23 and r24, r17 |
ef6: 82 bb out 0x12, r24 ; 18 |
Utility_delay(500); |
ef8: 84 ef ldi r24, 0xF4 ; 244 |
efa: 91 e0 ldi r25, 0x01 ; 1 |
efc: a4 df rcall .-184 ; 0xe46 |
PORTD |= 0x40; |
efe: 96 9a sbi 0x12, 6 ; 18 |
} |
f00: 1f 91 pop r17 |
f02: 08 95 ret |
00000f04 <CamIntAsm_waitForNewTrackingFrame>: |
a5c: 98 81 ld r25, Y |
a5e: 98 17 cp r25, r24 |
a60: 79 f0 breq .+30 ; 0xa80 <UIMgr_processReceivedData+0x178> |
void |
eeprom_write_byte (uint8_t *addr,uint8_t value) |
{ |
asm volatile ( |
a62: d9 01 movw r26, r18 |
a64: 09 2e mov r0, r25 |
a66: 1e d3 rcall .+1596 ; 0x10a4 <__eeprom_write_byte_1C1D1E> |
a68: d9 01 movw r26, r18 |
a6a: 0f d3 rcall .+1566 ; 0x108a <__eeprom_read_byte_1C1D1E> |
a6c: 80 2d mov r24, r0 |
a6e: 98 81 ld r25, Y |
a70: 98 17 cp r25, r24 |
a72: 31 f0 breq .+12 ; 0xa80 <UIMgr_processReceivedData+0x178> |
void |
eeprom_write_byte (uint8_t *addr,uint8_t value) |
{ |
asm volatile ( |
a74: d9 01 movw r26, r18 |
a76: 09 2e mov r0, r25 |
a78: 15 d3 rcall .+1578 ; 0x10a4 <__eeprom_write_byte_1C1D1E> |
a7a: d9 01 movw r26, r18 |
a7c: 06 d3 rcall .+1548 ; 0x108a <__eeprom_read_byte_1C1D1E> |
a7e: 80 2d mov r24, r0 |
a80: 4f 5f subi r20, 0xFF ; 255 |
a82: 80 91 bc 00 lds r24, 0x00BC |
a86: 48 17 cp r20, r24 |
a88: 88 f2 brcs .-94 ; 0xa2c <UIMgr_processReceivedData+0x124> |
a8a: 10 92 bc 00 sts 0x00BC, r1 |
a8e: 80 e4 ldi r24, 0x40 ; 64 |
a90: e3 ec ldi r30, 0xC3 ; 195 |
a92: f0 e0 ldi r31, 0x00 ; 0 |
a94: 11 92 st Z+, r1 |
a96: 8a 95 dec r24 |
a98: e9 f7 brne .-6 ; 0xa94 <UIMgr_processReceivedData+0x18c> |
a9a: 3f c0 rjmp .+126 ; 0xb1a <UIMgr_processReceivedData+0x212> |
a9c: 90 32 cpi r25, 0x20 ; 32 |
a9e: f1 f4 brne .+60 ; 0xadc <UIMgr_processReceivedData+0x1d4> |
aa0: 80 91 bc 00 lds r24, 0x00BC |
aa4: 88 23 and r24, r24 |
aa6: 39 f4 brne .+14 ; 0xab6 <UIMgr_processReceivedData+0x1ae> |
aa8: 8f de rcall .-738 ; 0x7c8 <UIMgr_convertTokenToCmd> |
aaa: 80 91 bc 00 lds r24, 0x00BC |
aae: 8f 5f subi r24, 0xFF ; 255 |
ab0: 80 93 bc 00 sts 0x00BC, r24 |
ab4: 32 c0 rjmp .+100 ; 0xb1a <UIMgr_processReceivedData+0x212> |
ab6: 99 27 eor r25, r25 |
ab8: cf 97 sbiw r24, 0x3f ; 63 |
aba: 4c f0 brlt .+18 ; 0xace <UIMgr_processReceivedData+0x1c6> |
abc: 10 92 bd 00 sts 0x00BD, r1 |
ac0: 10 92 be 00 sts 0x00BE, r1 |
ac4: 10 92 bc 00 sts 0x00BC, r1 |
ac8: f0 92 62 00 sts 0x0062, r15 |
acc: 26 c0 rjmp .+76 ; 0xb1a <UIMgr_processReceivedData+0x212> |
ace: f6 de rcall .-532 ; 0x8bc <UIMgr_convertTokenToValue> |
ad0: 80 91 bc 00 lds r24, 0x00BC |
ad4: 8f 5f subi r24, 0xFF ; 255 |
ad6: 80 93 bc 00 sts 0x00BC, r24 |
ada: 1f c0 rjmp .+62 ; 0xb1a <UIMgr_processReceivedData+0x212> |
adc: 89 2f mov r24, r25 |
ade: 81 54 subi r24, 0x41 ; 65 |
ae0: 8a 31 cpi r24, 0x1A ; 26 |
ae2: 18 f0 brcs .+6 ; 0xaea <UIMgr_processReceivedData+0x1e2> |
ae4: 8f 5e subi r24, 0xEF ; 239 |
ae6: 8a 30 cpi r24, 0x0A ; 10 |
ae8: b0 f4 brcc .+44 ; 0xb16 <UIMgr_processReceivedData+0x20e> |
aea: 80 91 be 00 lds r24, 0x00BE |
aee: e8 2f mov r30, r24 |
af0: ff 27 eor r31, r31 |
af2: e1 54 subi r30, 0x41 ; 65 |
af4: ff 4f sbci r31, 0xFF ; 255 |
af6: 90 83 st Z, r25 |
af8: 90 91 bd 00 lds r25, 0x00BD |
afc: 9f 5f subi r25, 0xFF ; 255 |
afe: 90 93 bd 00 sts 0x00BD, r25 |
b02: 8f 5f subi r24, 0xFF ; 255 |
b04: 80 93 be 00 sts 0x00BE, r24 |
b08: 94 30 cpi r25, 0x04 ; 4 |
b0a: 38 f0 brcs .+14 ; 0xb1a <UIMgr_processReceivedData+0x212> |
b0c: f0 92 62 00 sts 0x0062, r15 |
b10: 10 92 be 00 sts 0x00BE, r1 |
b14: 02 c0 rjmp .+4 ; 0xb1a <UIMgr_processReceivedData+0x212> |
b16: f0 92 62 00 sts 0x0062, r15 |
b1a: 20 91 b9 00 lds r18, 0x00B9 |
b1e: 80 91 b8 00 lds r24, 0x00B8 |
b22: 82 17 cp r24, r18 |
b24: 09 f0 breq .+2 ; 0xb28 <UIMgr_processReceivedData+0x220> |
b26: fa ce rjmp .-524 ; 0x91c <UIMgr_processReceivedData+0x14> |
b28: e8 94 clt |
b2a: df 91 pop r29 |
b2c: cf 91 pop r28 |
b2e: 1f 91 pop r17 |
b30: 0f 91 pop r16 |
b32: ff 90 pop r15 |
b34: 08 95 ret |
00000b36 <UIMgr_dispatchEvent>: |
b36: 80 31 cpi r24, 0x10 ; 16 |
b38: 29 f0 breq .+10 ; 0xb44 <UIMgr_dispatchEvent+0xe> |
b3a: 80 39 cpi r24, 0x90 ; 144 |
b3c: 39 f0 breq .+14 ; 0xb4c <UIMgr_dispatchEvent+0x16> |
b3e: 81 30 cpi r24, 0x01 ; 1 |
b40: 31 f4 brne .+12 ; 0xb4e <UIMgr_dispatchEvent+0x18> |
b42: 02 c0 rjmp .+4 ; 0xb48 <UIMgr_dispatchEvent+0x12> |
b44: 38 de rcall .-912 ; 0x7b6 <UIMgr_transmitPendingData> |
b46: 08 95 ret |
b48: df de rcall .-578 ; 0x908 <UIMgr_processReceivedData> |
b4a: 08 95 ret |
b4c: 0e de rcall .-996 ; 0x76a <UIMgr_flushTxBuffer> |
b4e: 08 95 ret |
00000b50 <UartInt_init>: |
b50: 10 bc out 0x20, r1 ; 32 |
b52: 82 e1 ldi r24, 0x12 ; 18 |
b54: 89 b9 out 0x09, r24 ; 9 |
b56: 88 e9 ldi r24, 0x98 ; 152 |
b58: 8a b9 out 0x0a, r24 ; 10 |
b5a: 86 e8 ldi r24, 0x86 ; 134 |
b5c: 80 bd out 0x20, r24 ; 32 |
b5e: 82 e0 ldi r24, 0x02 ; 2 |
b60: 8b b9 out 0x0b, r24 ; 11 |
b62: 08 95 ret |
00000b64 <UartInt_txByte>: |
b64: 5d 9b sbis 0x0b, 5 ; 11 |
b66: fe cf rjmp .-4 ; 0xb64 <UartInt_txByte> |
b68: 8c b9 out 0x0c, r24 ; 12 |
b6a: 08 95 ret |
00000b6c <__vector_11>: |
b6c: 1f 92 push r1 |
b6e: 0f 92 push r0 |
b70: 0f b6 in r0, 0x3f ; 63 |
b72: 0f 92 push r0 |
b74: 11 24 eor r1, r1 |
b76: 8f 93 push r24 |
b78: 9f 93 push r25 |
b7a: ef 93 push r30 |
b7c: ff 93 push r31 |
b7e: 80 91 b8 00 lds r24, 0x00B8 |
b82: 9c b1 in r25, 0x0c ; 12 |
b84: e4 e7 ldi r30, 0x74 ; 116 |
b86: f2 e0 ldi r31, 0x02 ; 2 |
b88: e8 0f add r30, r24 |
b8a: f1 1d adc r31, r1 |
b8c: 90 83 st Z, r25 |
b8e: 8f 5f subi r24, 0xFF ; 255 |
b90: 8f 71 andi r24, 0x1F ; 31 |
b92: 80 93 b8 00 sts 0x00B8, r24 |
b96: 80 91 70 00 lds r24, 0x0070 |
b9a: ec e6 ldi r30, 0x6C ; 108 |
b9c: f2 e0 ldi r31, 0x02 ; 2 |
b9e: e8 0f add r30, r24 |
ba0: f1 1d adc r31, r1 |
ba2: 91 e0 ldi r25, 0x01 ; 1 |
ba4: 90 83 st Z, r25 |
ba6: 8f 5f subi r24, 0xFF ; 255 |
ba8: 87 70 andi r24, 0x07 ; 7 |
baa: 80 93 70 00 sts 0x0070, r24 |
bae: ff 91 pop r31 |
bb0: ef 91 pop r30 |
bb2: 9f 91 pop r25 |
bb4: 8f 91 pop r24 |
bb6: 0f 90 pop r0 |
bb8: 0f be out 0x3f, r0 ; 63 |
bba: 0f 90 pop r0 |
bbc: 1f 90 pop r1 |
bbe: 18 95 reti |
00000bc0 <I2CInt_init>: |
bc0: 11 b8 out 0x01, r1 ; 1 |
bc2: 88 e4 ldi r24, 0x48 ; 72 |
bc4: 80 b9 out 0x00, r24 ; 0 |
bc6: 08 95 ret |
00000bc8 <I2CInt_writeData>: |
bc8: 98 2f mov r25, r24 |
bca: 80 91 08 01 lds r24, 0x0108 |
bce: 88 23 and r24, r24 |
bd0: e4 f3 brlt .-8 ; 0xbca <I2CInt_writeData+0x2> |
bd2: 06 b6 in r0, 0x36 ; 54 |
bd4: 04 fc sbrc r0, 4 |
bd6: fd cf rjmp .-6 ; 0xbd2 <I2CInt_writeData+0xa> |
bd8: 90 93 03 01 sts 0x0103, r25 |
bdc: 70 93 05 01 sts 0x0105, r23 |
be0: 60 93 04 01 sts 0x0104, r22 |
be4: 40 93 07 01 sts 0x0107, r20 |
be8: 10 92 06 01 sts 0x0106, r1 |
bec: 10 92 09 01 sts 0x0109, r1 |
bf0: 85 ea ldi r24, 0xA5 ; 165 |
bf2: 86 bf out 0x36, r24 ; 54 |
bf4: 80 91 08 01 lds r24, 0x0108 |
bf8: 80 68 ori r24, 0x80 ; 128 |
bfa: 80 93 08 01 sts 0x0108, r24 |
bfe: 08 95 ret |
00000c00 <I2CInt_readData>: |
c00: 98 2f mov r25, r24 |
c02: 80 91 08 01 lds r24, 0x0108 |
c06: 88 23 and r24, r24 |
c08: e4 f3 brlt .-8 ; 0xc02 <I2CInt_readData+0x2> |
c0a: 90 93 03 01 sts 0x0103, r25 |
c0e: 70 93 05 01 sts 0x0105, r23 |
c12: 60 93 04 01 sts 0x0104, r22 |
c16: 40 93 07 01 sts 0x0107, r20 |
c1a: 81 e0 ldi r24, 0x01 ; 1 |
c1c: 80 93 06 01 sts 0x0106, r24 |
c20: 10 92 09 01 sts 0x0109, r1 |
c24: 85 ea ldi r24, 0xA5 ; 165 |
c26: 86 bf out 0x36, r24 ; 54 |
c28: 80 91 08 01 lds r24, 0x0108 |
c2c: 80 68 ori r24, 0x80 ; 128 |
c2e: 80 93 08 01 sts 0x0108, r24 |
c32: 08 95 ret |
00000c34 <I2CInt_isI2cBusy>: |
c34: 80 91 08 01 lds r24, 0x0108 |
c38: 88 1f adc r24, r24 |
c3a: 88 27 eor r24, r24 |
c3c: 88 1f adc r24, r24 |
c3e: 99 27 eor r25, r25 |
c40: 08 95 ret |
00000c42 <__vector_17>: |
c42: 1f 92 push r1 |
c44: 0f 92 push r0 |
c46: 0f b6 in r0, 0x3f ; 63 |
c48: 0f 92 push r0 |
c4a: 11 24 eor r1, r1 |
c4c: 8f 93 push r24 |
c4e: 9f 93 push r25 |
c50: af 93 push r26 |
c52: bf 93 push r27 |
c54: ef 93 push r30 |
c56: ff 93 push r31 |
c58: 81 b1 in r24, 0x01 ; 1 |
c5a: 99 27 eor r25, r25 |
c5c: aa 27 eor r26, r26 |
c5e: bb 27 eor r27, r27 |
c60: 88 7f andi r24, 0xF8 ; 248 |
c62: 90 70 andi r25, 0x00 ; 0 |
c64: a0 70 andi r26, 0x00 ; 0 |
c66: b0 70 andi r27, 0x00 ; 0 |
c68: fc 01 movw r30, r24 |
c6a: 38 97 sbiw r30, 0x08 ; 8 |
c6c: e1 35 cpi r30, 0x51 ; 81 |
c6e: f1 05 cpc r31, r1 |
c70: 08 f0 brcs .+2 ; 0xc74 <__vector_17+0x32> |
c72: 9a c0 rjmp .+308 ; 0xda8 <__vector_17+0x166> |
c74: ed 5e subi r30, 0xED ; 237 |
c76: ff 4f sbci r31, 0xFF ; 255 |
c78: 09 94 ijmp |
c7a: 80 91 09 01 lds r24, 0x0109 |
c7e: 83 30 cpi r24, 0x03 ; 3 |
c80: 48 f0 brcs .+18 ; 0xc94 <__vector_17+0x52> |
c82: 86 b7 in r24, 0x36 ; 54 |
c84: 80 69 ori r24, 0x90 ; 144 |
c86: 86 bf out 0x36, r24 ; 54 |
c88: 80 91 08 01 lds r24, 0x0108 |
c8c: 8f 77 andi r24, 0x7F ; 127 |
c8e: 80 93 08 01 sts 0x0108, r24 |
c92: 8a c0 rjmp .+276 ; 0xda8 <__vector_17+0x166> |
c94: 80 91 03 01 lds r24, 0x0103 |
c98: 90 91 06 01 lds r25, 0x0106 |
c9c: 88 0f add r24, r24 |
c9e: 89 0f add r24, r25 |
ca0: 83 b9 out 0x03, r24 ; 3 |
ca2: 86 b7 in r24, 0x36 ; 54 |
ca4: 8f 7d andi r24, 0xDF ; 223 |
ca6: 86 bf out 0x36, r24 ; 54 |
ca8: 7f c0 rjmp .+254 ; 0xda8 <__vector_17+0x166> |
caa: 10 92 09 01 sts 0x0109, r1 |
cae: e0 91 04 01 lds r30, 0x0104 |
cb2: f0 91 05 01 lds r31, 0x0105 |
cb6: 80 81 ld r24, Z |
cb8: 83 b9 out 0x03, r24 ; 3 |
cba: 31 96 adiw r30, 0x01 ; 1 |
cbc: f0 93 05 01 sts 0x0105, r31 |
cc0: e0 93 04 01 sts 0x0104, r30 |
cc4: 86 b7 in r24, 0x36 ; 54 |
cc6: 80 68 ori r24, 0x80 ; 128 |
cc8: 86 bf out 0x36, r24 ; 54 |
cca: 6e c0 rjmp .+220 ; 0xda8 <__vector_17+0x166> |
ccc: 80 91 09 01 lds r24, 0x0109 |
cd0: 8f 5f subi r24, 0xFF ; 255 |
cd2: 80 93 09 01 sts 0x0109, r24 |
cd6: 86 b7 in r24, 0x36 ; 54 |
cd8: 80 6b ori r24, 0xB0 ; 176 |
cda: 86 bf out 0x36, r24 ; 54 |
cdc: 65 c0 rjmp .+202 ; 0xda8 <__vector_17+0x166> |
cde: 80 91 07 01 lds r24, 0x0107 |
ce2: 81 50 subi r24, 0x01 ; 1 |
ce4: 80 93 07 01 sts 0x0107, r24 |
ce8: 80 91 07 01 lds r24, 0x0107 |
cec: 88 23 and r24, r24 |
cee: 79 f0 breq .+30 ; 0xd0e <__vector_17+0xcc> |
cf0: e0 91 04 01 lds r30, 0x0104 |
cf4: f0 91 05 01 lds r31, 0x0105 |
cf8: 80 81 ld r24, Z |
cfa: 83 b9 out 0x03, r24 ; 3 |
cfc: 31 96 adiw r30, 0x01 ; 1 |
cfe: f0 93 05 01 sts 0x0105, r31 |
d02: e0 93 04 01 sts 0x0104, r30 |
d06: 86 b7 in r24, 0x36 ; 54 |
d08: 80 68 ori r24, 0x80 ; 128 |
d0a: 86 bf out 0x36, r24 ; 54 |
d0c: 4d c0 rjmp .+154 ; 0xda8 <__vector_17+0x166> |
d0e: 86 b7 in r24, 0x36 ; 54 |
d10: 80 69 ori r24, 0x90 ; 144 |
d12: 86 bf out 0x36, r24 ; 54 |
d14: 80 91 08 01 lds r24, 0x0108 |
d18: 8f 77 andi r24, 0x7F ; 127 |
d1a: 80 93 08 01 sts 0x0108, r24 |
d1e: 44 c0 rjmp .+136 ; 0xda8 <__vector_17+0x166> |
d20: 86 b7 in r24, 0x36 ; 54 |
d22: 80 69 ori r24, 0x90 ; 144 |
d24: 86 bf out 0x36, r24 ; 54 |
d26: 80 91 08 01 lds r24, 0x0108 |
d2a: 8f 77 andi r24, 0x7F ; 127 |
d2c: 80 93 08 01 sts 0x0108, r24 |
d30: 3b c0 rjmp .+118 ; 0xda8 <__vector_17+0x166> |
d32: 80 91 07 01 lds r24, 0x0107 |
d36: 81 50 subi r24, 0x01 ; 1 |
d38: 80 93 07 01 sts 0x0107, r24 |
d3c: 80 91 07 01 lds r24, 0x0107 |
d40: 88 23 and r24, r24 |
d42: 21 f0 breq .+8 ; 0xd4c <__vector_17+0x10a> |
d44: 86 b7 in r24, 0x36 ; 54 |
d46: 80 6c ori r24, 0xC0 ; 192 |
d48: 86 bf out 0x36, r24 ; 54 |
d4a: 2e c0 rjmp .+92 ; 0xda8 <__vector_17+0x166> |
d4c: 86 b7 in r24, 0x36 ; 54 |
d4e: 80 68 ori r24, 0x80 ; 128 |
d50: 86 bf out 0x36, r24 ; 54 |
d52: 2a c0 rjmp .+84 ; 0xda8 <__vector_17+0x166> |
d54: e0 91 04 01 lds r30, 0x0104 |
d58: f0 91 05 01 lds r31, 0x0105 |
d5c: 83 b1 in r24, 0x03 ; 3 |
d5e: 80 83 st Z, r24 |
d60: 31 96 adiw r30, 0x01 ; 1 |
d62: f0 93 05 01 sts 0x0105, r31 |
d66: e0 93 04 01 sts 0x0104, r30 |
d6a: 80 91 07 01 lds r24, 0x0107 |
d6e: 81 50 subi r24, 0x01 ; 1 |
d70: 80 93 07 01 sts 0x0107, r24 |
d74: 80 91 07 01 lds r24, 0x0107 |
d78: 88 23 and r24, r24 |
d7a: 21 f0 breq .+8 ; 0xd84 <__vector_17+0x142> |
d7c: 86 b7 in r24, 0x36 ; 54 |
d7e: 80 6c ori r24, 0xC0 ; 192 |
d80: 86 bf out 0x36, r24 ; 54 |
d82: 12 c0 rjmp .+36 ; 0xda8 <__vector_17+0x166> |
d84: 86 b7 in r24, 0x36 ; 54 |
d86: 8f 7b andi r24, 0xBF ; 191 |
d88: 86 bf out 0x36, r24 ; 54 |
d8a: 0e c0 rjmp .+28 ; 0xda8 <__vector_17+0x166> |
d8c: e0 91 04 01 lds r30, 0x0104 |
d90: f0 91 05 01 lds r31, 0x0105 |
d94: 83 b1 in r24, 0x03 ; 3 |
d96: 80 83 st Z, r24 |
d98: 86 b7 in r24, 0x36 ; 54 |
d9a: 80 69 ori r24, 0x90 ; 144 |
d9c: 86 bf out 0x36, r24 ; 54 |
d9e: 80 91 08 01 lds r24, 0x0108 |
da2: 8f 77 andi r24, 0x7F ; 127 |
da4: 80 93 08 01 sts 0x0108, r24 |
da8: ff 91 pop r31 |
daa: ef 91 pop r30 |
dac: bf 91 pop r27 |
dae: af 91 pop r26 |
db0: 9f 91 pop r25 |
db2: 8f 91 pop r24 |
db4: 0f 90 pop r0 |
db6: 0f be out 0x3f, r0 ; 63 |
db8: 0f 90 pop r0 |
dba: 1f 90 pop r1 |
dbc: 18 95 reti |
00000dbe <CamConfig_writeTxFifo>: |
dbe: 20 91 0a 01 lds r18, 0x010A |
dc2: e2 2f mov r30, r18 |
dc4: ff 27 eor r31, r31 |
dc6: ee 0f add r30, r30 |
dc8: ff 1f adc r31, r31 |
dca: ec 52 subi r30, 0x2C ; 44 |
dcc: fd 4f sbci r31, 0xFD ; 253 |
dce: 91 83 std Z+1, r25 ; 0x01 |
dd0: 80 83 st Z, r24 |
dd2: 2f 5f subi r18, 0xFF ; 255 |
dd4: 27 70 andi r18, 0x07 ; 7 |
dd6: 20 93 0a 01 sts 0x010A, r18 |
dda: 90 e0 ldi r25, 0x00 ; 0 |
ddc: 80 91 0b 01 lds r24, 0x010B |
de0: 28 17 cp r18, r24 |
de2: 09 f4 brne .+2 ; 0xde6 <CamConfig_writeTxFifo+0x28> |
de4: 91 e0 ldi r25, 0x01 ; 1 |
de6: 81 e0 ldi r24, 0x01 ; 1 |
de8: 89 27 eor r24, r25 |
dea: 99 27 eor r25, r25 |
dec: 08 95 ret |
00000dee <CamConfig_setCamReg>: |
dee: 28 2f mov r18, r24 |
df0: 36 2f mov r19, r22 |
df2: c9 01 movw r24, r18 |
df4: e4 df rcall .-56 ; 0xdbe <CamConfig_writeTxFifo> |
df6: 08 95 ret |
00000df8 <CamConfig_sendFifoCmds>: |
df8: 0f 93 push r16 |
dfa: 1f 93 push r17 |
dfc: cf 93 push r28 |
dfe: df 93 push r29 |
e00: cd b7 in r28, 0x3d ; 61 |
e02: de b7 in r29, 0x3e ; 62 |
e04: 22 97 sbiw r28, 0x02 ; 2 |
e06: 0f b6 in r0, 0x3f ; 63 |
e08: f8 94 cli |
e0a: de bf out 0x3e, r29 ; 62 |
e0c: 0f be out 0x3f, r0 ; 63 |
e0e: cd bf out 0x3d, r28 ; 61 |
e10: 8e 01 movw r16, r28 |
e12: 0f 5f subi r16, 0xFF ; 255 |
e14: 1f 4f sbci r17, 0xFF ; 255 |
e16: 19 c0 rjmp .+50 ; 0xe4a <CamConfig_sendFifoCmds+0x52> |
e18: e3 2f mov r30, r19 |
e1a: ff 27 eor r31, r31 |
e1c: ee 0f add r30, r30 |
e1e: ff 1f adc r31, r31 |
e20: ec 52 subi r30, 0x2C ; 44 |
e22: fd 4f sbci r31, 0xFD ; 253 |
e24: 91 81 ldd r25, Z+1 ; 0x01 |
e26: 20 81 ld r18, Z |
e28: 83 2f mov r24, r19 |
e2a: 8f 5f subi r24, 0xFF ; 255 |
e2c: 87 70 andi r24, 0x07 ; 7 |
e2e: 80 93 0b 01 sts 0x010B, r24 |
e32: 9a 83 std Y+2, r25 ; 0x02 |
e34: 29 83 std Y+1, r18 ; 0x01 |
e36: 42 e0 ldi r20, 0x02 ; 2 |
e38: b8 01 movw r22, r16 |
e3a: 80 e6 ldi r24, 0x60 ; 96 |
e3c: c5 de rcall .-630 ; 0xbc8 <I2CInt_writeData> |
e3e: 84 e6 ldi r24, 0x64 ; 100 |
e40: 90 e0 ldi r25, 0x00 ; 0 |
e42: 25 d0 rcall .+74 ; 0xe8e <Utility_delay> |
e44: f7 de rcall .-530 ; 0xc34 <I2CInt_isI2cBusy> |
e46: 81 30 cpi r24, 0x01 ; 1 |
e48: e9 f3 breq .-6 ; 0xe44 <CamConfig_sendFifoCmds+0x4c> |
e4a: 30 91 0b 01 lds r19, 0x010B |
e4e: 80 91 0a 01 lds r24, 0x010A |
e52: 83 17 cp r24, r19 |
e54: 09 f7 brne .-62 ; 0xe18 <CamConfig_sendFifoCmds+0x20> |
e56: 22 96 adiw r28, 0x02 ; 2 |
e58: 0f b6 in r0, 0x3f ; 63 |
e5a: f8 94 cli |
e5c: de bf out 0x3e, r29 ; 62 |
e5e: 0f be out 0x3f, r0 ; 63 |
e60: cd bf out 0x3d, r28 ; 61 |
e62: df 91 pop r29 |
e64: cf 91 pop r28 |
e66: 1f 91 pop r17 |
e68: 0f 91 pop r16 |
e6a: 08 95 ret |
00000e6c <CamConfig_init>: |
e6c: 60 e2 ldi r22, 0x20 ; 32 |
e6e: 84 e1 ldi r24, 0x14 ; 20 |
e70: be df rcall .-132 ; 0xdee <CamConfig_setCamReg> |
e72: 60 e4 ldi r22, 0x40 ; 64 |
e74: 89 e3 ldi r24, 0x39 ; 57 |
e76: bb df rcall .-138 ; 0xdee <CamConfig_setCamReg> |
e78: 68 e2 ldi r22, 0x28 ; 40 |
e7a: 82 e1 ldi r24, 0x12 ; 18 |
e7c: b8 df rcall .-144 ; 0xdee <CamConfig_setCamReg> |
e7e: 65 e0 ldi r22, 0x05 ; 5 |
e80: 88 e2 ldi r24, 0x28 ; 40 |
e82: b5 df rcall .-150 ; 0xdee <CamConfig_setCamReg> |
e84: 61 e0 ldi r22, 0x01 ; 1 |
e86: 83 e1 ldi r24, 0x13 ; 19 |
e88: b2 df rcall .-156 ; 0xdee <CamConfig_setCamReg> |
e8a: b6 df rcall .-148 ; 0xdf8 <CamConfig_sendFifoCmds> |
e8c: 08 95 ret |
00000e8e <Utility_delay>: |
e8e: cf 93 push r28 |
e90: df 93 push r29 |
e92: cd b7 in r28, 0x3d ; 61 |
e94: de b7 in r29, 0x3e ; 62 |
e96: 24 97 sbiw r28, 0x04 ; 4 |
e98: 0f b6 in r0, 0x3f ; 63 |
e9a: f8 94 cli |
e9c: de bf out 0x3e, r29 ; 62 |
e9e: 0f be out 0x3f, r0 ; 63 |
ea0: cd bf out 0x3d, r28 ; 61 |
ea2: 9c 01 movw r18, r24 |
ea4: 1a 82 std Y+2, r1 ; 0x02 |
ea6: 19 82 std Y+1, r1 ; 0x01 |
ea8: 1c 82 std Y+4, r1 ; 0x04 |
eaa: 1b 82 std Y+3, r1 ; 0x03 |
eac: 1a 82 std Y+2, r1 ; 0x02 |
eae: 19 82 std Y+1, r1 ; 0x01 |
eb0: 89 81 ldd r24, Y+1 ; 0x01 |
eb2: 9a 81 ldd r25, Y+2 ; 0x02 |
eb4: 82 17 cp r24, r18 |
eb6: 93 07 cpc r25, r19 |
eb8: e0 f4 brcc .+56 ; 0xef2 <Utility_delay+0x64> |
eba: 1c 82 std Y+4, r1 ; 0x04 |
ebc: 1b 82 std Y+3, r1 ; 0x03 |
ebe: 8b 81 ldd r24, Y+3 ; 0x03 |
ec0: 9c 81 ldd r25, Y+4 ; 0x04 |
ec2: 88 5e subi r24, 0xE8 ; 232 |
ec4: 93 40 sbci r25, 0x03 ; 3 |
ec6: 58 f4 brcc .+22 ; 0xede <Utility_delay+0x50> |
ec8: 00 00 nop |
eca: 8b 81 ldd r24, Y+3 ; 0x03 |
ecc: 9c 81 ldd r25, Y+4 ; 0x04 |
ece: 01 96 adiw r24, 0x01 ; 1 |
ed0: 9c 83 std Y+4, r25 ; 0x04 |
ed2: 8b 83 std Y+3, r24 ; 0x03 |
ed4: 8b 81 ldd r24, Y+3 ; 0x03 |
ed6: 9c 81 ldd r25, Y+4 ; 0x04 |
ed8: 88 5e subi r24, 0xE8 ; 232 |
eda: 93 40 sbci r25, 0x03 ; 3 |
edc: a8 f3 brcs .-22 ; 0xec8 <Utility_delay+0x3a> |
ede: 89 81 ldd r24, Y+1 ; 0x01 |
ee0: 9a 81 ldd r25, Y+2 ; 0x02 |
ee2: 01 96 adiw r24, 0x01 ; 1 |
ee4: 9a 83 std Y+2, r25 ; 0x02 |
ee6: 89 83 std Y+1, r24 ; 0x01 |
ee8: 89 81 ldd r24, Y+1 ; 0x01 |
eea: 9a 81 ldd r25, Y+2 ; 0x02 |
eec: 82 17 cp r24, r18 |
eee: 93 07 cpc r25, r19 |
ef0: 20 f3 brcs .-56 ; 0xeba <Utility_delay+0x2c> |
ef2: 24 96 adiw r28, 0x04 ; 4 |
ef4: 0f b6 in r0, 0x3f ; 63 |
ef6: f8 94 cli |
ef8: de bf out 0x3e, r29 ; 62 |
efa: 0f be out 0x3f, r0 ; 63 |
efc: cd bf out 0x3d, r28 ; 61 |
efe: df 91 pop r29 |
f00: cf 91 pop r28 |
f02: 08 95 ret |
00000f04 <DebugInt_init>: |
f04: 8e 9a sbi 0x11, 6 ; 17 |
f06: 96 9a sbi 0x12, 6 ; 18 |
f08: 84 ef ldi r24, 0xF4 ; 244 |
f0a: 91 e0 ldi r25, 0x01 ; 1 |
f0c: c0 df rcall .-128 ; 0xe8e <Utility_delay> |
f0e: 96 98 cbi 0x12, 6 ; 18 |
f10: 84 ef ldi r24, 0xF4 ; 244 |
f12: 91 e0 ldi r25, 0x01 ; 1 |
f14: bc df rcall .-136 ; 0xe8e <Utility_delay> |
f16: 96 9a sbi 0x12, 6 ; 18 |
f18: 84 ef ldi r24, 0xF4 ; 244 |
f1a: 91 e0 ldi r25, 0x01 ; 1 |
f1c: b8 df rcall .-144 ; 0xe8e <Utility_delay> |
f1e: 96 98 cbi 0x12, 6 ; 18 |
f20: 84 ef ldi r24, 0xF4 ; 244 |
f22: 91 e0 ldi r25, 0x01 ; 1 |
f24: b4 df rcall .-152 ; 0xe8e <Utility_delay> |
f26: 96 9a sbi 0x12, 6 ; 18 |
f28: 84 ef ldi r24, 0xF4 ; 244 |
f2a: 91 e0 ldi r25, 0x01 ; 1 |
f2c: b0 df rcall .-160 ; 0xe8e <Utility_delay> |
f2e: 96 98 cbi 0x12, 6 ; 18 |
f30: 84 ef ldi r24, 0xF4 ; 244 |
f32: 91 e0 ldi r25, 0x01 ; 1 |
f34: ac df rcall .-168 ; 0xe8e <Utility_delay> |
f36: 96 9a sbi 0x12, 6 ; 18 |
f38: 08 95 ret |
00000f3a <CamIntAsm_waitForNewTrackingFrame>: |
; set, and the function will return. |
;***************************************************************** |
CamIntAsm_waitForNewTrackingFrame: |
sbi _SFR_IO_ADDR(PORTD),PD6 ; For testing... |
f04: 96 9a sbi 0x12, 6 ; 18 |
f3a: 96 9a sbi 0x12, 6 ; 18 |
cbi _SFR_IO_ADDR(PORTD),PD6 |
f06: 96 98 cbi 0x12, 6 ; 18 |
f3c: 96 98 cbi 0x12, 6 ; 18 |
sleep |
f08: 88 95 sleep |
f3e: 88 95 sleep |
00000f40 <CamIntAsm_acquireTrackingLine>: |
00000f0a <CamIntAsm_acquireTrackingLine>: |
;***************************************************************** |
; REMEMBER...everything from here on out is critically timed to be |
; synchronized with the flow of pixel data from the camera... |
3687,68 → 2250,68 |
CamIntAsm_acquireTrackingLine: |
brts _cleanUp |
f0a: e6 f1 brts .+120 ; 0xf84 |
f40: e6 f1 brts .+120 ; 0xfba <_cleanUp> |
;sbi _SFR_IO_ADDR(PORTD),PD6 ; For testing... |
;cbi _SFR_IO_ADDR(PORTD),PD6 |
in tmp1,_SFR_IO_ADDR(TCCR1B) ; Enable the PCLK line to actually |
f0c: 3e b5 in r19, 0x2e ; 46 |
f42: 3e b5 in r19, 0x2e ; 46 |
ori tmp1, 0x07 ; feed Timer1 |
f0e: 37 60 ori r19, 0x07 ; 7 |
f44: 37 60 ori r19, 0x07 ; 7 |
out _SFR_IO_ADDR(TCCR1B),tmp1 |
f10: 3e bd out 0x2e, r19 ; 46 |
f46: 3e bd out 0x2e, r19 ; 46 |
; The line is about to start... |
ldi pixelCount,0 ; Initialize the RLE stats... |
f12: 00 e0 ldi r16, 0x00 ; 0 |
f48: 00 e0 ldi r16, 0x00 ; 0 |
ldi pixelRunStart,PIXEL_RUN_START_INITIAL ; Remember, we always calculate |
f14: 10 e5 ldi r17, 0x50 ; 80 |
f4a: 10 e5 ldi r17, 0x50 ; 80 |
; the pixel run length as |
; TCNT1L - pixelRunStart |
ldi lastColor,0x00 ; clear out the last color before we start |
f16: 20 e0 ldi r18, 0x00 ; 0 |
f4c: 20 e0 ldi r18, 0x00 ; 0 |
mov XH,currLineBuffHigh ; Load the pointer to the current line |
f18: b9 2f mov r27, r25 |
f4e: b9 2f mov r27, r25 |
mov XL,currLineBuffLow ; buffer into the X pointer regs |
f1a: a8 2f mov r26, r24 |
f50: a8 2f mov r26, r24 |
mov ZH,colorMapHigh ; Load the pointers to the membership |
f1c: f7 2f mov r31, r23 |
f52: f7 2f mov r31, r23 |
mov ZL,colorMapLow ; lookup tables (ZL and YL will be overwritten |
f1e: e6 2f mov r30, r22 |
f54: e6 2f mov r30, r22 |
mov YH,colorMapHigh ; as soon as we start reading data) to Z and Y |
f20: d7 2f mov r29, r23 |
f56: d7 2f mov r29, r23 |
in tmp1, _SFR_IO_ADDR(TIMSK) ; enable TIMER1 to start counting |
f22: 39 b7 in r19, 0x39 ; 57 |
f58: 39 b7 in r19, 0x39 ; 57 |
ori tmp1, ENABLE_PCLK_TIMER1_OVERFLOW_BITMASK ; external PCLK pulses and interrupt on |
f24: 34 60 ori r19, 0x04 ; 4 |
f5a: 34 60 ori r19, 0x04 ; 4 |
out _SFR_IO_ADDR(TIMSK),tmp1 ; overflow |
f26: 39 bf out 0x39, r19 ; 57 |
f5c: 39 bf out 0x39, r19 ; 57 |
ldi tmp1,PIXEL_RUN_START_INITIAL ; set up the TCNT1 to overflow (and |
f28: 30 e5 ldi r19, 0x50 ; 80 |
f5e: 30 e5 ldi r19, 0x50 ; 80 |
ldi tmp2,0xFF ; interrupts) after 176 pixels |
f2a: 4f ef ldi r20, 0xFF ; 255 |
f60: 4f ef ldi r20, 0xFF ; 255 |
out _SFR_IO_ADDR(TCNT1H),tmp2 |
f2c: 4d bd out 0x2d, r20 ; 45 |
f62: 4d bd out 0x2d, r20 ; 45 |
out _SFR_IO_ADDR(TCNT1L),tmp1 |
f2e: 3c bd out 0x2c, r19 ; 44 |
f64: 3c bd out 0x2c, r19 ; 44 |
mov YL,colorMapLow |
f30: c6 2f mov r28, r22 |
f66: c6 2f mov r28, r22 |
in tmp1, _SFR_IO_ADDR(GICR) ; enable the HREF interrupt...remember, we |
f32: 3b b7 in r19, 0x3b ; 59 |
f68: 3b b7 in r19, 0x3b ; 59 |
; only use this interrupt to synchronize |
; the beginning of the line |
ori tmp1, HREF_INTERRUPT_ENABLE_MASK |
f34: 30 68 ori r19, 0x80 ; 128 |
f6a: 30 68 ori r19, 0x80 ; 128 |
out _SFR_IO_ADDR(GICR), tmp1 |
f36: 3b bf out 0x3b, r19 ; 59 |
00000f38 <_trackFrame>: |
f6c: 3b bf out 0x3b, r19 ; 59 |
00000f6e <_trackFrame>: |
;******************************************************************************************* |
; Track Frame handler |
3756,9 → 2319,9 |
_trackFrame: |
sbi _SFR_IO_ADDR(PORTD),PD6 |
f38: 96 9a sbi 0x12, 6 ; 18 |
f6e: 96 9a sbi 0x12, 6 ; 18 |
sleep ; ...And we wait... |
f3a: 88 95 sleep |
f70: 88 95 sleep |
; Returning from the interrupt/sleep wakeup will consume |
; 14 clock cycles (7 to wakeup from idle sleep, 3 to vector, and 4 to return) |
3765,50 → 2328,50 |
; Disable the HREF interrupt |
cbi _SFR_IO_ADDR(PORTD),PD6 |
f3c: 96 98 cbi 0x12, 6 ; 18 |
f72: 96 98 cbi 0x12, 6 ; 18 |
in tmp1, _SFR_IO_ADDR(GICR) |
f3e: 3b b7 in r19, 0x3b ; 59 |
f74: 3b b7 in r19, 0x3b ; 59 |
andi tmp1, HREF_INTERRUPT_DISABLE_MASK |
f40: 3f 77 andi r19, 0x7F ; 127 |
f76: 3f 77 andi r19, 0x7F ; 127 |
out _SFR_IO_ADDR(GICR), tmp1 |
f42: 3b bf out 0x3b, r19 ; 59 |
f78: 3b bf out 0x3b, r19 ; 59 |
; A couple of NOPs are needed here to sync up the pixel data...the number (2) |
; of NOPs was determined emperically by trial and error. |
nop |
f44: 00 00 nop |
... |
00000f48 <_acquirePixelBlock>: |
f7a: 00 00 nop |
... |
00000f7e <_acquirePixelBlock>: |
nop |
_acquirePixelBlock: ; Clock Cycle Count |
in ZL,RB_PORT ; sample the red value (PINB) (1) |
f48: e6 b3 in r30, 0x16 ; 22 |
f7e: e6 b3 in r30, 0x16 ; 22 |
in YL,G_PORT ; sample the green value (PINC) (1) |
f4a: c3 b3 in r28, 0x13 ; 19 |
f80: c3 b3 in r28, 0x13 ; 19 |
andi YL,0x0F ; clear the high nibble (1) |
f4c: cf 70 andi r28, 0x0F ; 15 |
f82: cf 70 andi r28, 0x0F ; 15 |
ldd color,Z+RED_MEM_OFFSET ; lookup the red membership (2) |
f4e: 30 81 ld r19, Z |
f84: 30 81 ld r19, Z |
in ZL,RB_PORT ; sample the blue value (PINB) (1) |
f50: e6 b3 in r30, 0x16 ; 22 |
f86: e6 b3 in r30, 0x16 ; 22 |
ldd greenData,Y+GREEN_MEM_OFFSET; lookup the green membership (2) |
f52: 48 89 ldd r20, Y+16 ; 0x10 |
f88: 48 89 ldd r20, Y+16 ; 0x10 |
ldd blueData,Z+BLUE_MEM_OFFSET ; lookup the blue membership (2) |
f54: 50 a1 ldd r21, Z+32 ; 0x20 |
f8a: 50 a1 ldd r21, Z+32 ; 0x20 |
and color,greenData ; mask memberships together (1) |
f56: 34 23 and r19, r20 |
f8c: 34 23 and r19, r20 |
and color,blueData ; to produce the final color (1) |
f58: 35 23 and r19, r21 |
f8e: 35 23 and r19, r21 |
brts _cleanUpTrackingLine ; if some interrupt routine has (1...not set) |
f5a: 76 f0 brts .+28 ; 0xf78 |
f90: 76 f0 brts .+28 ; 0xfae <_cleanUpTrackingLine> |
; come in and set our T flag in |
; SREG, then we need to hop out |
; and blow away this frames data (common cleanup) |
cp color,lastColor ; check to see if the run continues (1) |
f5c: 32 17 cp r19, r18 |
f92: 32 17 cp r19, r18 |
breq _acquirePixelBlock ; (2...equal) |
f5e: a1 f3 breq .-24 ; 0xf48 |
f94: a1 f3 breq .-24 ; 0xf7e <_acquirePixelBlock> |
; ___________ |
; 16 clock cycles |
; (16 clock cycles = 1 uS = 1 pixelBlock time) |
3815,57 → 2378,57 |
; Toggle the debug line to indicate a color change |
sbi _SFR_IO_ADDR(PORTD),PD6 |
f60: 96 9a sbi 0x12, 6 ; 18 |
f96: 96 9a sbi 0x12, 6 ; 18 |
nop |
f62: 00 00 nop |
f98: 00 00 nop |
cbi _SFR_IO_ADDR(PORTD),PD6 |
f64: 96 98 cbi 0x12, 6 ; 18 |
f9a: 96 98 cbi 0x12, 6 ; 18 |
mov tmp2,pixelRunStart ; get the count value of the |
f66: 41 2f mov r20, r17 |
f9c: 41 2f mov r20, r17 |
; current pixel run |
in pixelCount,_SFR_IO_ADDR(TCNT1L) ; get the current TCNT1 value |
f68: 0c b5 in r16, 0x2c ; 44 |
f9e: 0c b5 in r16, 0x2c ; 44 |
mov pixelRunStart,pixelCount ; reload pixelRunStart for the |
f6a: 10 2f mov r17, r16 |
fa0: 10 2f mov r17, r16 |
; next run |
sub pixelCount,tmp2 ; pixelCount = TCNT1L - pixelRunStart |
f6c: 04 1b sub r16, r20 |
fa2: 04 1b sub r16, r20 |
st X+,lastColor ; record the color run in the current line buffer |
f6e: 2d 93 st X+, r18 |
fa4: 2d 93 st X+, r18 |
st X+,pixelCount ; with its length |
f70: 0d 93 st X+, r16 |
fa6: 0d 93 st X+, r16 |
mov lastColor,color ; set lastColor so we can figure out when it changes |
f72: 23 2f mov r18, r19 |
fa8: 23 2f mov r18, r19 |
nop ; waste one more cycle for a total of 16 |
f74: 00 00 nop |
faa: 00 00 nop |
rjmp _acquirePixelBlock |
f76: e8 cf rjmp .-48 ; 0xf48 |
00000f78 <_cleanUpTrackingLine>: |
fac: e8 cf rjmp .-48 ; 0xf7e <_acquirePixelBlock> |
00000fae <_cleanUpTrackingLine>: |
; _cleanUpTrackingLine is used to write the last run length block off to the currentLineBuffer so |
; that all 176 pixels in the line are accounted for. |
_cleanUpTrackingLine: |
ldi pixelCount,0xFF ; the length of the last run is ALWAYS 0xFF minus the last |
f78: 0f ef ldi r16, 0xFF ; 255 |
fae: 0f ef ldi r16, 0xFF ; 255 |
sub pixelCount,pixelRunStart ; pixelRunStart |
f7a: 01 1b sub r16, r17 |
fb0: 01 1b sub r16, r17 |
inc pixelCount ; increment pixelCount since we actually need to account |
f7c: 03 95 inc r16 |
fb2: 03 95 inc r16 |
; for the overflow of TCNT1 |
st X+,color ; record the color run in the current line buffer |
f7e: 3d 93 st X+, r19 |
fb4: 3d 93 st X+, r19 |
st X,pixelCount |
f80: 0c 93 st X, r16 |
fb6: 0c 93 st X, r16 |
rjmp _cleanUp |
f82: 00 c0 rjmp .+0 ; 0xf84 |
00000f84 <_cleanUp>: |
fb8: 00 c0 rjmp .+0 ; 0xfba <_cleanUp> |
00000fba <_cleanUp>: |
_cleanUpDumpLine: |
; NOTE: If serial data is received, to interrupt the tracking of a line, we'll |
3883,27 → 2446,27 |
_cleanUp: |
; Disable the external clocking of the Timer1 counter |
in tmp1, _SFR_IO_ADDR(TCCR1B) |
f84: 3e b5 in r19, 0x2e ; 46 |
fba: 3e b5 in r19, 0x2e ; 46 |
andi tmp1, 0xF8 |
f86: 38 7f andi r19, 0xF8 ; 248 |
fbc: 38 7f andi r19, 0xF8 ; 248 |
out _SFR_IO_ADDR(TCCR1B),tmp1 |
f88: 3e bd out 0x2e, r19 ; 46 |
fbe: 3e bd out 0x2e, r19 ; 46 |
; Toggle the debug line to indicate the line is complete |
sbi _SFR_IO_ADDR(PORTD),PD6 |
f8a: 96 9a sbi 0x12, 6 ; 18 |
fc0: 96 9a sbi 0x12, 6 ; 18 |
cbi _SFR_IO_ADDR(PORTD),PD6 |
f8c: 96 98 cbi 0x12, 6 ; 18 |
fc2: 96 98 cbi 0x12, 6 ; 18 |
clt ; clear out the T bit since we have detected |
f8e: e8 94 clt |
00000f90 <_exit>: |
fc4: e8 94 clt |
00000fc6 <_exit>: |
; the interruption and are exiting to handle it |
_exit: |
ret |
f90: 08 95 ret |
00000f92 <CamIntAsm_waitForNewDumpFrame>: |
fc6: 08 95 ret |
00000fc8 <CamIntAsm_waitForNewDumpFrame>: |
;***************************************************************** |
; Function Name: CamIntAsm_waitForNewDumpFrame |
3923,14 → 2486,14 |
;***************************************************************** |
CamIntAsm_waitForNewDumpFrame: |
sbi _SFR_IO_ADDR(PORTD),PD6 ; For testing... |
f92: 96 9a sbi 0x12, 6 ; 18 |
fc8: 96 9a sbi 0x12, 6 ; 18 |
cbi _SFR_IO_ADDR(PORTD),PD6 |
f94: 96 98 cbi 0x12, 6 ; 18 |
fca: 96 98 cbi 0x12, 6 ; 18 |
sleep |
f96: 88 95 sleep |
fcc: 88 95 sleep |
00000fce <CamIntAsm_acquireDumpLine>: |
00000f98 <CamIntAsm_acquireDumpLine>: |
;***************************************************************** |
; REMEMBER...everything from here on out is critically timed to be |
; synchronized with the flow of pixel data from the camera... |
3938,55 → 2501,55 |
CamIntAsm_acquireDumpLine: |
brts _cleanUp |
f98: ae f3 brts .-22 ; 0xf84 |
fce: ae f3 brts .-22 ; 0xfba <_cleanUp> |
;sbi _SFR_IO_ADDR(PORTD),PD6 ; For testing... |
;cbi _SFR_IO_ADDR(PORTD),PD6 |
mov XH,currLineBuffHigh ; Load the pointer to the current line |
f9a: b9 2f mov r27, r25 |
fd0: b9 2f mov r27, r25 |
mov XL,currLineBuffLow ; buffer into the X pointer regs |
f9c: a8 2f mov r26, r24 |
fd2: a8 2f mov r26, r24 |
mov YH,prevLineBuffHigh ; Load the pointer to the previous line |
f9e: d7 2f mov r29, r23 |
fd4: d7 2f mov r29, r23 |
mov YL,prevLineBuffLow ; buffer into the Y pointer regs |
fa0: c6 2f mov r28, r22 |
fd6: c6 2f mov r28, r22 |
ldi tmp1,PIXEL_RUN_START_INITIAL ; set up the TCNT1 to overflow (and |
fa2: 30 e5 ldi r19, 0x50 ; 80 |
fd8: 30 e5 ldi r19, 0x50 ; 80 |
ldi tmp2,0xFF ; interrupts) after 176 pixels |
fa4: 4f ef ldi r20, 0xFF ; 255 |
fda: 4f ef ldi r20, 0xFF ; 255 |
out _SFR_IO_ADDR(TCNT1H),tmp2 |
fa6: 4d bd out 0x2d, r20 ; 45 |
fdc: 4d bd out 0x2d, r20 ; 45 |
out _SFR_IO_ADDR(TCNT1L),tmp1 |
fa8: 3c bd out 0x2c, r19 ; 44 |
fde: 3c bd out 0x2c, r19 ; 44 |
in tmp1, _SFR_IO_ADDR(TCCR1B) ; Enable the PCLK line to actually |
faa: 3e b5 in r19, 0x2e ; 46 |
fe0: 3e b5 in r19, 0x2e ; 46 |
ori tmp1, 0x07 ; feed Timer1 |
fac: 37 60 ori r19, 0x07 ; 7 |
fe2: 37 60 ori r19, 0x07 ; 7 |
out _SFR_IO_ADDR(TCCR1B),tmp1 |
fae: 3e bd out 0x2e, r19 ; 46 |
fe4: 3e bd out 0x2e, r19 ; 46 |
nop |
fb0: 00 00 nop |
fe6: 00 00 nop |
in tmp1, _SFR_IO_ADDR(TIMSK) ; enable TIMER1 to start counting |
fb2: 39 b7 in r19, 0x39 ; 57 |
fe8: 39 b7 in r19, 0x39 ; 57 |
ori tmp1, ENABLE_PCLK_TIMER1_OVERFLOW_BITMASK ; external PCLK pulses and interrupt on |
fb4: 34 60 ori r19, 0x04 ; 4 |
fea: 34 60 ori r19, 0x04 ; 4 |
out _SFR_IO_ADDR(TIMSK),tmp1 ; overflow |
fb6: 39 bf out 0x39, r19 ; 57 |
fec: 39 bf out 0x39, r19 ; 57 |
in tmp1, _SFR_IO_ADDR(GICR) ; enable the HREF interrupt...remember, we |
fb8: 3b b7 in r19, 0x3b ; 59 |
fee: 3b b7 in r19, 0x3b ; 59 |
; only use this interrupt to synchronize |
; the beginning of the line |
ori tmp1, HREF_INTERRUPT_ENABLE_MASK |
fba: 30 68 ori r19, 0x80 ; 128 |
ff0: 30 68 ori r19, 0x80 ; 128 |
out _SFR_IO_ADDR(GICR), tmp1 |
fbc: 3b bf out 0x3b, r19 ; 59 |
00000fbe <_dumpFrame>: |
ff2: 3b bf out 0x3b, r19 ; 59 |
00000ff4 <_dumpFrame>: |
;******************************************************************************************* |
; Dump Frame handler |
3994,21 → 2557,21 |
_dumpFrame: |
sbi _SFR_IO_ADDR(PORTD),PD6 |
fbe: 96 9a sbi 0x12, 6 ; 18 |
ff4: 96 9a sbi 0x12, 6 ; 18 |
sleep ; ...And we wait... |
fc0: 88 95 sleep |
ff6: 88 95 sleep |
cbi _SFR_IO_ADDR(PORTD),PD6 |
fc2: 96 98 cbi 0x12, 6 ; 18 |
ff8: 96 98 cbi 0x12, 6 ; 18 |
in tmp1, _SFR_IO_ADDR(GICR) ; disable the HREF interrupt |
fc4: 3b b7 in r19, 0x3b ; 59 |
ffa: 3b b7 in r19, 0x3b ; 59 |
andi tmp1, HREF_INTERRUPT_DISABLE_MASK ; so we don't get interrupted |
fc6: 3f 77 andi r19, 0x7F ; 127 |
ffc: 3f 77 andi r19, 0x7F ; 127 |
out _SFR_IO_ADDR(GICR), tmp1 ; while dumping the line |
fc8: 3b bf out 0x3b, r19 ; 59 |
... |
00000fcc <_sampleDumpPixel>: |
ffe: 3b bf out 0x3b, r19 ; 59 |
... |
00001002 <_sampleDumpPixel>: |
nop ; Remember...if we ever remove the "cbi" instruction above, |
; we need to add two more NOPs to cover this |
4023,15 → 2586,15 |
; do that here (only 8 instruction cycles :-) ) |
_sampleDumpPixel: |
in tmp1,G_PORT ; sample the G value (1) |
fcc: 33 b3 in r19, 0x13 ; 19 |
1002: 33 b3 in r19, 0x13 ; 19 |
in tmp2,RB_PORT ; sample the R/B value (1) |
fce: 46 b3 in r20, 0x16 ; 22 |
1004: 46 b3 in r20, 0x16 ; 22 |
st X+,tmp1 ; store to the currLineBuff and inc ptrs(2) |
fd0: 3d 93 st X+, r19 |
1006: 3d 93 st X+, r19 |
st Y+,tmp2 ; store to the prevLineBuff and inc ptrs(2) |
fd2: 49 93 st Y+, r20 |
1008: 49 93 st Y+, r20 |
brtc _sampleDumpPixel ; loop back unless flag is set (2...if not set) |
fd4: de f7 brtc .-10 ; 0xfcc |
100a: de f7 brtc .-10 ; 0x1002 <_sampleDumpPixel> |
; ___________ |
; 8 cycles normally |
4038,10 → 2601,10 |
; if we make it here, it means the T flag is set, and we must have been interrupted |
; so we need to exit (what if we were interrupted for serial? should we disable it?) |
rjmp _cleanUpDumpLine |
fd6: d6 cf rjmp .-84 ; 0xf84 |
100c: d6 cf rjmp .-84 ; 0xfba <_cleanUp> |
0000100e <__vector_1>: |
00000fd8 <__vector_1>: |
;*********************************************************** |
; Function Name: <interrupt handler for External Interrupt0> |
; Function Description: This function is responsible |
4055,9 → 2618,9 |
SIG_INTERRUPT0: |
; This will wake us up when VSYNC transitions high...we just want to return |
reti |
fd8: 18 95 reti |
00000fda <__vector_2>: |
100e: 18 95 reti |
00001010 <__vector_2>: |
;*********************************************************** |
; Function Name: <interrupt handler for External Interrupt1> |
4073,9 → 2636,9 |
SIG_INTERRUPT1: |
; This will wake us up when HREF transitions high...we just want to return |
reti |
fda: 18 95 reti |
00000fdc <__vector_8>: |
1010: 18 95 reti |
00001012 <__vector_8>: |
;*********************************************************** |
; Function Name: <interrupt handler for Timer0 overflow> |
4111,143 → 2674,114 |
;*********************************************************** |
SIG_OVERFLOW1: |
lds tmp1,fastEventBitmask ; set a flag indicating |
fdc: 30 91 72 00 lds r19, 0x0072 |
1012: 30 91 72 00 lds r19, 0x0072 |
ori tmp1,FEV_ACQUIRE_LINE_COMPLETE ; a line is complete |
fe0: 31 60 ori r19, 0x01 ; 1 |
1016: 31 60 ori r19, 0x01 ; 1 |
sts fastEventBitmask,tmp1 |
fe2: 30 93 72 00 sts 0x0072, r19 |
1018: 30 93 72 00 sts 0x0072, r19 |
set ; set the T bit in SREG |
fe6: 68 94 set |
101c: 68 94 set |
;sbi _SFR_IO_ADDR(PORTD),PD6 ; For testing... |
;cbi _SFR_IO_ADDR(PORTD),PD6 ; For testing... |
reti |
fe8: 18 95 reti |
101e: 18 95 reti |
00001020 <__vector_default>: |
00000fea <__vector_default>: |
; This is the default handler for all interrupts that don't |
; have handler routines specified for them. |
.global __vector_default |
__vector_default: |
reti |
fea: 18 95 reti |
00000fec <atoi>: |
fec: fc 01 movw r30, r24 |
fee: 88 27 eor r24, r24 |
ff0: 99 27 eor r25, r25 |
ff2: e8 94 clt |
00000ff4 <.atoi_loop>: |
ff4: 21 91 ld r18, Z+ |
ff6: 22 23 and r18, r18 |
ff8: e9 f0 breq .+58 ; 0x1034 |
ffa: 20 32 cpi r18, 0x20 ; 32 |
ffc: d9 f3 breq .-10 ; 0xff4 |
ffe: 29 30 cpi r18, 0x09 ; 9 |
1000: c9 f3 breq .-14 ; 0xff4 |
1002: 2a 30 cpi r18, 0x0A ; 10 |
1004: b9 f3 breq .-18 ; 0xff4 |
1006: 2c 30 cpi r18, 0x0C ; 12 |
1008: a9 f3 breq .-22 ; 0xff4 |
100a: 2d 30 cpi r18, 0x0D ; 13 |
100c: 99 f3 breq .-26 ; 0xff4 |
100e: 26 37 cpi r18, 0x76 ; 118 |
1010: 89 f3 breq .-30 ; 0xff4 |
1012: 2b 32 cpi r18, 0x2B ; 43 |
1014: 19 f0 breq .+6 ; 0x101c |
1016: 2d 32 cpi r18, 0x2D ; 45 |
1018: 21 f4 brne .+8 ; 0x1022 |
0000101a <.atoi_neg>: |
101a: 68 94 set |
0000101c <.atoi_loop2>: |
101c: 21 91 ld r18, Z+ |
101e: 22 23 and r18, r18 |
1020: 49 f0 breq .+18 ; 0x1034 |
00001022 <.atoi_digit>: |
1022: 20 33 cpi r18, 0x30 ; 48 |
1024: 3c f0 brlt .+14 ; 0x1034 |
1026: 2a 33 cpi r18, 0x3A ; 58 |
1028: 2c f4 brge .+10 ; 0x1034 |
102a: 20 53 subi r18, 0x30 ; 48 |
102c: 2f d0 rcall .+94 ; 0x108c |
102e: 82 0f add r24, r18 |
1030: 91 1d adc r25, r1 |
1032: f4 cf rjmp .-24 ; 0x101c |
00001034 <.atoi_sig>: |
1034: 81 15 cp r24, r1 |
1036: 91 05 cpc r25, r1 |
1038: 21 f0 breq .+8 ; 0x1042 |
103a: 1e f4 brtc .+6 ; 0x1042 |
103c: 80 95 com r24 |
103e: 90 95 com r25 |
1040: 01 96 adiw r24, 0x01 ; 1 |
00001042 <.atoi_done>: |
1042: 08 95 ret |
00001044 <eeprom_read_byte>: |
1044: e1 99 sbic 0x1c, 1 ; 28 |
1046: fe cf rjmp .-4 ; 0x1044 |
1048: 9f bb out 0x1f, r25 ; 31 |
104a: 8e bb out 0x1e, r24 ; 30 |
104c: e0 9a sbi 0x1c, 0 ; 28 |
104e: 99 27 eor r25, r25 |
1050: 8d b3 in r24, 0x1d ; 29 |
1052: 08 95 ret |
00001054 <eeprom_read_block>: |
1054: 41 15 cp r20, r1 |
1056: 51 05 cpc r21, r1 |
1058: 69 f0 breq .+26 ; 0x1074 |
105a: dc 01 movw r26, r24 |
0000105c <eeprom_read_block_busy>: |
105c: e1 99 sbic 0x1c, 1 ; 28 |
105e: fe cf rjmp .-4 ; 0x105c |
00001060 <eeprom_read_block_loop>: |
1060: 7f bb out 0x1f, r23 ; 31 |
1062: 6e bb out 0x1e, r22 ; 30 |
1064: e0 9a sbi 0x1c, 0 ; 28 |
1066: 6f 5f subi r22, 0xFF ; 255 |
1068: 7f 4f sbci r23, 0xFF ; 255 |
106a: 0d b2 in r0, 0x1d ; 29 |
106c: 0d 92 st X+, r0 |
106e: 41 50 subi r20, 0x01 ; 1 |
1070: 50 40 sbci r21, 0x00 ; 0 |
1072: b1 f7 brne .-20 ; 0x1060 |
00001074 <eeprom_read_block_done>: |
1074: 08 95 ret |
00001076 <eeprom_write_byte>: |
1076: e1 99 sbic 0x1c, 1 ; 28 |
1078: fe cf rjmp .-4 ; 0x1076 |
107a: 9f bb out 0x1f, r25 ; 31 |
107c: 8e bb out 0x1e, r24 ; 30 |
107e: 6d bb out 0x1d, r22 ; 29 |
1080: 0f b6 in r0, 0x3f ; 63 |
1082: f8 94 cli |
1084: e2 9a sbi 0x1c, 2 ; 28 |
1086: e1 9a sbi 0x1c, 1 ; 28 |
1088: 0f be out 0x3f, r0 ; 63 |
108a: 08 95 ret |
0000108c <__mulhi_const_10>: |
108c: 7a e0 ldi r23, 0x0A ; 10 |
108e: 97 9f mul r25, r23 |
1090: 90 2d mov r25, r0 |
1092: 87 9f mul r24, r23 |
1094: 80 2d mov r24, r0 |
1096: 91 0d add r25, r1 |
1098: 11 24 eor r1, r1 |
109a: 08 95 ret |
0000109c <_exit>: |
109c: ff cf rjmp .-2 ; 0x109c |
1020: 18 95 reti |
00001022 <atoi>: |
1022: fc 01 movw r30, r24 |
1024: 88 27 eor r24, r24 |
1026: 99 27 eor r25, r25 |
1028: e8 94 clt |
102a: 21 91 ld r18, Z+ |
102c: 22 23 and r18, r18 |
102e: e9 f0 breq .+58 ; 0x106a <atoi+0x48> |
1030: 20 32 cpi r18, 0x20 ; 32 |
1032: d9 f3 breq .-10 ; 0x102a <atoi+0x8> |
1034: 29 30 cpi r18, 0x09 ; 9 |
1036: c9 f3 breq .-14 ; 0x102a <atoi+0x8> |
1038: 2a 30 cpi r18, 0x0A ; 10 |
103a: b9 f3 breq .-18 ; 0x102a <atoi+0x8> |
103c: 2c 30 cpi r18, 0x0C ; 12 |
103e: a9 f3 breq .-22 ; 0x102a <atoi+0x8> |
1040: 2d 30 cpi r18, 0x0D ; 13 |
1042: 99 f3 breq .-26 ; 0x102a <atoi+0x8> |
1044: 26 37 cpi r18, 0x76 ; 118 |
1046: 89 f3 breq .-30 ; 0x102a <atoi+0x8> |
1048: 2b 32 cpi r18, 0x2B ; 43 |
104a: 19 f0 breq .+6 ; 0x1052 <atoi+0x30> |
104c: 2d 32 cpi r18, 0x2D ; 45 |
104e: 21 f4 brne .+8 ; 0x1058 <atoi+0x36> |
1050: 68 94 set |
1052: 21 91 ld r18, Z+ |
1054: 22 23 and r18, r18 |
1056: 49 f0 breq .+18 ; 0x106a <atoi+0x48> |
1058: 20 33 cpi r18, 0x30 ; 48 |
105a: 3c f0 brlt .+14 ; 0x106a <atoi+0x48> |
105c: 2a 33 cpi r18, 0x3A ; 58 |
105e: 2c f4 brge .+10 ; 0x106a <atoi+0x48> |
1060: 20 53 subi r18, 0x30 ; 48 |
1062: 0b d0 rcall .+22 ; 0x107a <__mulhi_const_10> |
1064: 82 0f add r24, r18 |
1066: 91 1d adc r25, r1 |
1068: f4 cf rjmp .-24 ; 0x1052 <atoi+0x30> |
106a: 81 15 cp r24, r1 |
106c: 91 05 cpc r25, r1 |
106e: 21 f0 breq .+8 ; 0x1078 <atoi+0x56> |
1070: 1e f4 brtc .+6 ; 0x1078 <atoi+0x56> |
1072: 80 95 com r24 |
1074: 90 95 com r25 |
1076: 01 96 adiw r24, 0x01 ; 1 |
1078: 08 95 ret |
0000107a <__mulhi_const_10>: |
107a: 7a e0 ldi r23, 0x0A ; 10 |
107c: 97 9f mul r25, r23 |
107e: 90 2d mov r25, r0 |
1080: 87 9f mul r24, r23 |
1082: 80 2d mov r24, r0 |
1084: 91 0d add r25, r1 |
1086: 11 24 eor r1, r1 |
1088: 08 95 ret |
0000108a <__eeprom_read_byte_1C1D1E>: |
108a: e1 99 sbic 0x1c, 1 ; 28 |
108c: fe cf rjmp .-4 ; 0x108a <__eeprom_read_byte_1C1D1E> |
108e: bf bb out 0x1f, r27 ; 31 |
1090: ae bb out 0x1e, r26 ; 30 |
1092: e0 9a sbi 0x1c, 0 ; 28 |
1094: 11 96 adiw r26, 0x01 ; 1 |
1096: 0d b2 in r0, 0x1d ; 29 |
1098: 08 95 ret |
0000109a <__eeprom_read_block_1C1D1E>: |
109a: f7 df rcall .-18 ; 0x108a <__eeprom_read_byte_1C1D1E> |
109c: 01 92 st Z+, r0 |
109e: 1a 94 dec r1 |
10a0: e1 f7 brne .-8 ; 0x109a <__eeprom_read_block_1C1D1E> |
10a2: 08 95 ret |
000010a4 <__eeprom_write_byte_1C1D1E>: |
10a4: e1 99 sbic 0x1c, 1 ; 28 |
10a6: fe cf rjmp .-4 ; 0x10a4 <__eeprom_write_byte_1C1D1E> |
10a8: bf bb out 0x1f, r27 ; 31 |
10aa: ae bb out 0x1e, r26 ; 30 |
10ac: 0d ba out 0x1d, r0 ; 29 |
10ae: 11 96 adiw r26, 0x01 ; 1 |
10b0: 0f b6 in r0, 0x3f ; 63 |
10b2: f8 94 cli |
10b4: e2 9a sbi 0x1c, 2 ; 28 |
10b6: e1 9a sbi 0x1c, 1 ; 28 |
10b8: 0f be out 0x3f, r0 ; 63 |
10ba: 08 95 ret |
000010bc <_exit>: |
10bc: ff cf rjmp .-2 ; 0x10bc <_exit> |
/programy/Atmel_C/AVRcam/AVRcam.map |
---|
1,585 → 1,593 |
Archive member included because of file (symbol) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_exit.o) |
Main.o (exit) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_copy_data.o) |
CamInterface.o (__do_copy_data) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_clear_bss.o) |
CamInterface.o (__do_clear_bss) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(atoi.o) |
UIMgr.o (atoi) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_rb.o) |
UIMgr.o (eeprom_read_byte) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_rblk.o) |
CamInterface.o (eeprom_read_block) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_wb.o) |
UIMgr.o (eeprom_write_byte) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(mul10.o) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(atoi.o) (__mulhi_const_10) |
Allocating common symbols |
Common symbol size file |
previousLineBuffer 0xb0 CamInterface.o |
UIMgr_rxFifo 0x20 UIMgr.o |
currentLineBuffer 0xb0 CamInterface.o |
Exec_eventFifo 0x8 Executive.o |
CamConfig_txFifo 0x10 CamConfig.o |
UIMgr_txFifo 0x40 UIMgr.o |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00002000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
LOAD C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
LOAD CamInterface.o |
LOAD Main.o |
LOAD Executive.o |
LOAD FrameMgr.o |
LOAD UIMgr.o |
LOAD UartInterface.o |
LOAD I2CInterface.o |
LOAD CamConfig.o |
LOAD Utility.o |
LOAD DebugInterface.o |
LOAD CamInterfaceAsm.o |
Address of section .noinit set to 0x800300 |
LOAD C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libm.a |
LOAD C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a |
LOAD C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a |
LOAD C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0x109e |
*(.vectors) |
.vectors 0x00000000 0x26 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
0x00000000 __vectors |
0x00000026 __ctors_start = . |
*(.ctors) |
0x00000026 __ctors_end = . |
0x00000026 __dtors_start = . |
*(.dtors) |
0x00000026 __dtors_end = . |
*(.progmem.gcc*) |
.progmem.gcc_sw_table |
0x00000026 0xa2 I2CInterface.o |
*(.progmem*) |
0x000000c8 . = ALIGN (0x2) |
*(.init0) |
*(.init1) |
*(.init2) |
.init2 0x000000c8 0xc C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
*(.init3) |
*(.init4) |
.init4 0x000000d4 0x16 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_copy_data.o) |
0x000000d4 __do_copy_data |
.init4 0x000000ea 0x10 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_clear_bss.o) |
0x000000ea __do_clear_bss |
*(.init5) |
*(.init6) |
*(.init7) |
*(.init8) |
*(.init9) |
.init9 0x000000fa 0x2 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
*(.text) |
.text 0x000000fc 0x2 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
0x000000fc __vector_12 |
0x000000fc __bad_interrupt |
0x000000fc __vector_6 |
0x000000fc __vector_3 |
0x000000fc __vector_13 |
0x000000fc __vector_7 |
0x000000fc __vector_5 |
0x000000fc __vector_4 |
0x000000fc __vector_9 |
0x000000fc __vector_15 |
0x000000fc __vector_14 |
0x000000fc __vector_10 |
0x000000fc __vector_16 |
0x000000fc __vector_18 |
.text 0x000000fe 0x60 CamInterface.o |
0x000000fe CamInt_init |
0x0000015c CamInt_resetCam |
.text 0x0000015e 0x26 Main.o |
0x0000015e main |
.text 0x00000184 0xf0 Executive.o |
0x00000252 Exec_writeEventFifo |
0x00000184 Exec_run |
.text 0x00000274 0x428 FrameMgr.o |
0x000002f8 FrameMgr_acquireFrame |
0x0000032e FrameMgr_acquireLine |
0x00000282 FrameMgr_dispatchEvent |
0x0000050c FrameMgr_processFrame |
0x00000274 FrameMgr_init |
0x00000392 FrameMgr_processLine |
.text 0x0000069c 0x4b0 UIMgr.o |
0x00000ac4 UIMgr_flushTxBuffer |
0x00000b2a UIMgr_writeTxFifo |
0x00000710 UIMgr_processReceivedData |
0x0000069c UIMgr_init |
0x00000a6e UIMgr_writeBufferToTxFifo |
0x00000aa0 UIMgr_txBuffer |
0x000006fc UIMgr_transmitPendingData |
0x000006d2 UIMgr_dispatchEvent |
.text 0x00000b4c 0x78 UartInterface.o |
0x00000b4c UartInt_init |
0x00000b68 __vector_11 |
0x00000b60 UartInt_txByte |
.text 0x00000bc4 0x1a2 I2CInterface.o |
0x00000c38 I2CInt_isI2cBusy |
0x00000c04 I2CInt_readData |
0x00000c4a __vector_17 |
0x00000bc4 I2CInt_init |
0x00000bcc I2CInt_writeData |
.text 0x00000d66 0xe0 CamConfig.o |
0x00000d66 CamConfig_init |
0x00000dee CamConfig_writeTxFifo |
0x00000d92 CamConfig_sendFifoCmds |
0x00000d88 CamConfig_setCamReg |
.text 0x00000e46 0x76 Utility.o |
0x00000e46 Utility_delay |
.text 0x00000ebc 0x48 DebugInterface.o |
0x00000ebc DebugInt_init |
.text 0x00000f04 0xe8 CamInterfaceAsm.o |
0x00000fd8 __vector_1 |
0x00000f98 CamIntAsm_acquireDumpLine |
0x00000fea __vector_default |
0x00000fda __vector_2 |
0x00000f92 CamIntAsm_waitForNewDumpFrame |
0x00000f04 CamIntAsm_waitForNewTrackingFrame |
0x00000f0a CamIntAsm_acquireTrackingLine |
0x00000fdc __vector_8 |
.text 0x00000fec 0x58 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(atoi.o) |
0x00000fec atoi |
.text 0x00001044 0x10 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_rb.o) |
0x00001044 eeprom_read_byte |
.text 0x00001054 0x22 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_rblk.o) |
0x00001054 eeprom_read_block |
.text 0x00001076 0x16 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_wb.o) |
0x00001076 eeprom_write_byte |
.text 0x0000108c 0x10 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(mul10.o) |
0x0000108c __mulhi_const_10 |
0x0000109c . = ALIGN (0x2) |
*(.text.*) |
0x0000109c . = ALIGN (0x2) |
*(.fini9) |
*(.fini8) |
*(.fini7) |
*(.fini6) |
*(.fini5) |
*(.fini4) |
*(.fini3) |
*(.fini2) |
*(.fini1) |
*(.fini0) |
.fini0 0x0000109c 0x2 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_exit.o) |
0x0000109e _etext = . |
.data 0x00800060 0x10 load address 0x0000109e |
0x00800060 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800060 0x2 FrameMgr.o |
.data 0x00800062 0xe UIMgr.o |
*(.gnu.linkonce.d*) |
0x00800070 . = ALIGN (0x2) |
0x00800070 _edata = . |
0x00800070 PROVIDE (__data_end, .) |
.bss 0x00800070 0x274 |
0x00800070 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800070 0x3 Executive.o |
0x00800071 Exec_eventFifoTail |
0x00800072 fastEventBitmask |
0x00800070 Exec_eventFifoHead |
.bss 0x00800073 0x45 FrameMgr.o |
.bss 0x008000b8 0x4b UIMgr.o |
0x008000b9 UIMgr_rxFifoTail |
0x008000bb UIMgr_txFifoTail |
0x008000ba UIMgr_txFifoHead |
0x008000b8 UIMgr_rxFifoHead |
.bss 0x00800103 0x7 I2CInterface.o |
.bss 0x0080010a 0x2 CamConfig.o |
0x0080010a CamConfig_txFifoHead |
0x0080010b CamConfig_txFifoTail |
*(COMMON) |
COMMON 0x0080010c 0x160 CamInterface.o |
0x0 (size before relaxing) |
0x0080010c previousLineBuffer |
0x008001bc currentLineBuffer |
COMMON 0x0080026c 0x8 Executive.o |
0x0 (size before relaxing) |
0x0080026c Exec_eventFifo |
COMMON 0x00800274 0x60 UIMgr.o |
0x0 (size before relaxing) |
0x00800274 UIMgr_rxFifo |
0x00800294 UIMgr_txFifo |
COMMON 0x008002d4 0x10 CamConfig.o |
0x0 (size before relaxing) |
0x008002d4 CamConfig_txFifo |
0x008002e4 PROVIDE (__bss_end, .) |
0x0000109e __data_load_start = LOADADDR (.data) |
0x000010ae __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x00800300 0x30 |
0x00800300 PROVIDE (__noinit_start, .) |
*(.noinit*) |
.noinit 0x00800300 0x30 CamInterface.o |
0x00800300 colorMap |
0x00800330 PROVIDE (__noinit_end, .) |
0x00800330 _end = . |
0x00800330 PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 load address 0x000010ae |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.stab 0x00000000 0x3f30 |
*(.stab) |
.stab 0x00000000 0x51c CamInterface.o |
.stab 0x0000051c 0x318 Main.o |
0x3fc (size before relaxing) |
.stab 0x00000834 0x4bc Executive.o |
0x5dc (size before relaxing) |
.stab 0x00000cf0 0xce4 FrameMgr.o |
0xe1c (size before relaxing) |
.stab 0x000019d4 0xe4c UIMgr.o |
0x1014 (size before relaxing) |
.stab 0x00002820 0x300 UartInterface.o |
0x390 (size before relaxing) |
.stab 0x00002b20 0x5a0 I2CInterface.o |
0x624 (size before relaxing) |
.stab 0x000030c0 0x48c CamConfig.o |
0x510 (size before relaxing) |
.stab 0x0000354c 0x21c Utility.o |
0x270 (size before relaxing) |
.stab 0x00003768 0x258 DebugInterface.o |
0x2c4 (size before relaxing) |
.stab 0x000039c0 0x570 CamInterfaceAsm.o |
0x57c (size before relaxing) |
.stabstr 0x00000000 0x181e |
*(.stabstr) |
.stabstr 0x00000000 0x181e CamInterface.o |
0x0 (size before relaxing) |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges |
*(.debug_aranges) |
.debug_pubnames |
*(.debug_pubnames) |
.debug_info |
*(.debug_info) |
*(.gnu.linkonce.wi.*) |
.debug_abbrev |
*(.debug_abbrev) |
.debug_line |
*(.debug_line) |
.debug_frame |
*(.debug_frame) |
.debug_str |
*(.debug_str) |
.debug_loc |
*(.debug_loc) |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(AVRcam.elf elf32-avr) |
Cross Reference Table |
Symbol File |
CamConfig_init CamConfig.o |
Main.o |
CamConfig_sendFifoCmds CamConfig.o |
UIMgr.o |
FrameMgr.o |
CamConfig_setCamReg CamConfig.o |
UIMgr.o |
FrameMgr.o |
CamConfig_txFifo CamConfig.o |
CamConfig_txFifoHead CamConfig.o |
CamConfig_txFifoTail CamConfig.o |
CamConfig_writeTxFifo CamConfig.o |
CamIntAsm_acquireDumpLine CamInterfaceAsm.o |
FrameMgr.o |
CamIntAsm_acquireTrackingLine CamInterfaceAsm.o |
FrameMgr.o |
CamIntAsm_waitForNewDumpFrame CamInterfaceAsm.o |
CamIntAsm_waitForNewTrackingFrame CamInterfaceAsm.o |
CamInt_init CamInterface.o |
Main.o |
CamInt_resetCam CamInterface.o |
UIMgr.o |
DebugInt_init DebugInterface.o |
Main.o |
Exec_eventFifo UartInterface.o |
Executive.o |
Exec_eventFifoHead Executive.o |
UartInterface.o |
Exec_eventFifoTail Executive.o |
Exec_run Executive.o |
Main.o |
Exec_writeEventFifo Executive.o |
UIMgr.o |
FrameMgr.o |
FrameMgr_acquireFrame FrameMgr.o |
FrameMgr_acquireLine FrameMgr.o |
Executive.o |
FrameMgr_dispatchEvent FrameMgr.o |
Executive.o |
FrameMgr_init FrameMgr.o |
Main.o |
FrameMgr_processFrame FrameMgr.o |
FrameMgr_processLine FrameMgr.o |
Executive.o |
I2CInt_init I2CInterface.o |
Main.o |
I2CInt_isI2cBusy I2CInterface.o |
CamConfig.o |
I2CInt_readData I2CInterface.o |
I2CInt_writeData I2CInterface.o |
CamConfig.o |
UIMgr_dispatchEvent UIMgr.o |
Executive.o |
UIMgr_flushTxBuffer UIMgr.o |
UIMgr_init UIMgr.o |
Main.o |
UIMgr_processReceivedData UIMgr.o |
UIMgr_rxFifo UartInterface.o |
UIMgr.o |
UIMgr_rxFifoHead UIMgr.o |
UartInterface.o |
UIMgr_rxFifoTail UIMgr.o |
UIMgr_transmitPendingData UIMgr.o |
Executive.o |
UIMgr_txBuffer UIMgr.o |
UIMgr_txFifo UIMgr.o |
UIMgr_txFifoHead UIMgr.o |
UIMgr_txFifoTail UIMgr.o |
UIMgr_writeBufferToTxFifo UIMgr.o |
UIMgr_writeTxFifo UIMgr.o |
FrameMgr.o |
UartInt_init UartInterface.o |
Main.o |
UartInt_txByte UartInterface.o |
UIMgr.o |
FrameMgr.o |
Utility_delay Utility.o |
DebugInterface.o |
CamConfig.o |
UIMgr.o |
FrameMgr.o |
Main.o |
__bad_interrupt C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__bss_end C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_clear_bss.o) |
__bss_start C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_clear_bss.o) |
__data_end C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_copy_data.o) |
__data_load_start C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_copy_data.o) |
__data_start C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_copy_data.o) |
__do_clear_bss C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_clear_bss.o) |
DebugInterface.o |
Utility.o |
CamConfig.o |
I2CInterface.o |
UartInterface.o |
UIMgr.o |
FrameMgr.o |
Executive.o |
Main.o |
CamInterface.o |
__do_copy_data C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_copy_data.o) |
DebugInterface.o |
Utility.o |
CamConfig.o |
I2CInterface.o |
UartInterface.o |
UIMgr.o |
FrameMgr.o |
Executive.o |
Main.o |
CamInterface.o |
__heap_end C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__init C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__mulhi_const_10 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(mul10.o) |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(atoi.o) |
__stack C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
Main.o |
__vector_1 CamInterfaceAsm.o |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_10 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_11 UartInterface.o |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_12 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_13 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_14 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_15 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_16 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_17 I2CInterface.o |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_18 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_2 CamInterfaceAsm.o |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_3 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_4 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_5 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_6 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_7 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_8 CamInterfaceAsm.o |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vector_9 C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
CamInterfaceAsm.o |
__vector_default CamInterfaceAsm.o |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
__vectors C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
_exit C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_exit.o) |
atoi C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(atoi.o) |
UIMgr.o |
colorMap CamInterface.o |
UIMgr.o |
FrameMgr.o |
currentLineBuffer FrameMgr.o |
CamInterface.o |
eeprom_read_block C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_rblk.o) |
CamInterface.o |
eeprom_read_byte C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_rb.o) |
UIMgr.o |
eeprom_write_byte C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\libc.a(ee_wb.o) |
UIMgr.o |
exit C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\avr4\libgcc.a(_exit.o) |
Main.o |
fastEventBitmask Executive.o |
CamInterfaceAsm.o |
FrameMgr.o |
main Main.o |
C:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr4\crtm8.o |
previousLineBuffer FrameMgr.o |
CamInterface.o |
Archive member included because of file (symbol) |
/usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_exit.o) |
Main.o (exit) |
/usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_copy_data.o) |
CamInterface.o (__do_copy_data) |
/usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_clear_bss.o) |
CamInterface.o (__do_clear_bss) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(atoi.o) |
UIMgr.o (atoi) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(mul10.o) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(atoi.o) (__mulhi_const_10) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rb.1C1D1E.o) |
UIMgr.o (__eeprom_read_byte_1C1D1E) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rblk.1C1D1E.o) |
CamInterface.o (__eeprom_read_block_1C1D1E) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_wb.1C1D1E.o) |
UIMgr.o (__eeprom_write_byte_1C1D1E) |
Allocating common symbols |
Common symbol size file |
previousLineBuffer 0xb0 CamInterface.o |
UIMgr_rxFifo 0x20 UIMgr.o |
currentLineBuffer 0xb0 CamInterface.o |
Exec_eventFifo 0x8 Executive.o |
CamConfig_txFifo 0x10 CamConfig.o |
UIMgr_txFifo 0x40 UIMgr.o |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00002000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
LOAD /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
LOAD CamInterface.o |
LOAD Main.o |
LOAD Executive.o |
LOAD FrameMgr.o |
LOAD UIMgr.o |
LOAD UartInterface.o |
LOAD I2CInterface.o |
LOAD CamConfig.o |
LOAD Utility.o |
LOAD DebugInterface.o |
LOAD CamInterfaceAsm.o |
Address of section .noinit set to 0x800300 |
LOAD /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libm.a |
LOAD /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a |
LOAD /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a |
LOAD /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0x10be |
*(.vectors) |
.vectors 0x00000000 0x26 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
0x00000000 __vectors |
0x00000026 __ctors_start = . |
*(.ctors) |
0x00000026 __ctors_end = . |
0x00000026 __dtors_start = . |
*(.dtors) |
0x00000026 __dtors_end = . |
*(.progmem.gcc*) |
.progmem.gcc_sw_table |
0x00000026 0xa2 I2CInterface.o |
*(.progmem*) |
0x000000c8 . = ALIGN (0x2) |
*(.init0) |
*(.init1) |
*(.init2) |
.init2 0x000000c8 0xc /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
*(.init3) |
*(.init4) |
.init4 0x000000d4 0x16 /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_copy_data.o) |
0x000000d4 __do_copy_data |
.init4 0x000000ea 0x10 /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_clear_bss.o) |
0x000000ea __do_clear_bss |
*(.init5) |
*(.init6) |
*(.init7) |
*(.init8) |
*(.init9) |
.init9 0x000000fa 0x2 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
*(.text) |
.text 0x000000fc 0x2 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
0x000000fc __vector_12 |
0x000000fc __bad_interrupt |
0x000000fc __vector_6 |
0x000000fc __vector_3 |
0x000000fc __vector_13 |
0x000000fc __vector_7 |
0x000000fc __vector_5 |
0x000000fc __vector_4 |
0x000000fc __vector_9 |
0x000000fc __vector_15 |
0x000000fc __vector_14 |
0x000000fc __vector_10 |
0x000000fc __vector_16 |
0x000000fc __vector_18 |
.text 0x000000fe 0x5e CamInterface.o |
0x00000100 CamInt_init |
0x000000fe CamInt_resetCam |
.text 0x0000015c 0x26 Main.o |
0x0000015c main |
.text 0x00000182 0xee Executive.o |
0x00000182 Exec_writeEventFifo |
0x0000019e Exec_run |
.text 0x00000270 0x484 FrameMgr.o |
0x0000065e FrameMgr_acquireFrame |
0x000005f0 FrameMgr_acquireLine |
0x00000692 FrameMgr_dispatchEvent |
0x00000270 FrameMgr_processFrame |
0x000005e2 FrameMgr_init |
0x00000322 FrameMgr_processLine |
.text 0x000006f4 0x45c UIMgr.o |
0x0000076a UIMgr_flushTxBuffer |
0x0000074e UIMgr_writeTxFifo |
0x00000908 UIMgr_processReceivedData |
0x00000886 UIMgr_init |
0x000006f4 UIMgr_writeBufferToTxFifo |
0x00000788 UIMgr_txBuffer |
0x000007b6 UIMgr_transmitPendingData |
0x00000b36 UIMgr_dispatchEvent |
.text 0x00000b50 0x70 UartInterface.o |
0x00000b50 UartInt_init |
0x00000b6c __vector_11 |
0x00000b64 UartInt_txByte |
.text 0x00000bc0 0x1fe I2CInterface.o |
0x00000c34 I2CInt_isI2cBusy |
0x00000c00 I2CInt_readData |
0x00000c42 __vector_17 |
0x00000bc0 I2CInt_init |
0x00000bc8 I2CInt_writeData |
.text 0x00000dbe 0xd0 CamConfig.o |
0x00000e6c CamConfig_init |
0x00000dbe CamConfig_writeTxFifo |
0x00000df8 CamConfig_sendFifoCmds |
0x00000dee CamConfig_setCamReg |
.text 0x00000e8e 0x76 Utility.o |
0x00000e8e Utility_delay |
.text 0x00000f04 0x36 DebugInterface.o |
0x00000f04 DebugInt_init |
.text 0x00000f3a 0xe8 CamInterfaceAsm.o |
0x0000100e __vector_1 |
0x00000fce CamIntAsm_acquireDumpLine |
0x00001020 __vector_default |
0x00001010 __vector_2 |
0x00000fc8 CamIntAsm_waitForNewDumpFrame |
0x00000f3a CamIntAsm_waitForNewTrackingFrame |
0x00000f40 CamIntAsm_acquireTrackingLine |
0x00001012 __vector_8 |
.text 0x00001022 0x58 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(atoi.o) |
0x00001022 atoi |
.text 0x0000107a 0x10 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(mul10.o) |
0x0000107a __mulhi_const_10 |
0x0000108a . = ALIGN (0x2) |
*(.text.*) |
.text.eeprom 0x0000108a 0x10 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rb.1C1D1E.o) |
0x0000108a __eeprom_read_byte_1C1D1E |
.text.eeprom 0x0000109a 0xa /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rblk.1C1D1E.o) |
0x0000109a __eeprom_read_block_1C1D1E |
.text.eeprom 0x000010a4 0x18 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_wb.1C1D1E.o) |
0x000010a4 __eeprom_write_byte_1C1D1E |
0x000010bc . = ALIGN (0x2) |
*(.fini9) |
*(.fini8) |
*(.fini7) |
*(.fini6) |
*(.fini5) |
*(.fini4) |
*(.fini3) |
*(.fini2) |
*(.fini1) |
*(.fini0) |
.fini0 0x000010bc 0x2 /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_exit.o) |
0x000010be _etext = . |
.data 0x00800060 0x10 load address 0x000010be |
0x00800060 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800060 0x2 FrameMgr.o |
.data 0x00800062 0xe UIMgr.o |
*(.gnu.linkonce.d*) |
0x00800070 . = ALIGN (0x2) |
0x00800070 _edata = . |
0x00800070 PROVIDE (__data_end, .) |
.bss 0x00800070 0x274 |
0x00800070 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800070 0x3 Executive.o |
0x00800071 Exec_eventFifoTail |
0x00800072 fastEventBitmask |
0x00800070 Exec_eventFifoHead |
.bss 0x00800073 0x45 FrameMgr.o |
.bss 0x008000b8 0x4b UIMgr.o |
0x008000b9 UIMgr_rxFifoTail |
0x008000bb UIMgr_txFifoTail |
0x008000ba UIMgr_txFifoHead |
0x008000b8 UIMgr_rxFifoHead |
.bss 0x00800103 0x7 I2CInterface.o |
.bss 0x0080010a 0x2 CamConfig.o |
0x0080010a CamConfig_txFifoHead |
0x0080010b CamConfig_txFifoTail |
*(COMMON) |
COMMON 0x0080010c 0x160 CamInterface.o |
0x0080010c previousLineBuffer |
0x008001bc currentLineBuffer |
COMMON 0x0080026c 0x8 Executive.o |
0x0080026c Exec_eventFifo |
COMMON 0x00800274 0x60 UIMgr.o |
0x00800274 UIMgr_rxFifo |
0x00800294 UIMgr_txFifo |
COMMON 0x008002d4 0x10 CamConfig.o |
0x008002d4 CamConfig_txFifo |
0x008002e4 PROVIDE (__bss_end, .) |
0x000010be __data_load_start = LOADADDR (.data) |
0x000010ce __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x00800300 0x30 |
0x00800300 PROVIDE (__noinit_start, .) |
*(.noinit*) |
.noinit 0x00800300 0x30 CamInterface.o |
0x00800300 colorMap |
0x00800330 PROVIDE (__noinit_end, .) |
0x00800330 _end = . |
0x00800330 PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.stab 0x00000000 0x3ed0 |
*(.stab) |
.stab 0x00000000 0x36c /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
.stab 0x0000036c 0x51c CamInterface.o |
0x528 (size before relaxing) |
.stab 0x00000888 0x240 Main.o |
0x42c (size before relaxing) |
.stab 0x00000ac8 0x3cc Executive.o |
0x600 (size before relaxing) |
.stab 0x00000e94 0xa80 FrameMgr.o |
0xca8 (size before relaxing) |
.stab 0x00001914 0xc84 UIMgr.o |
0xeb8 (size before relaxing) |
.stab 0x00002598 0x264 UartInterface.o |
0x420 (size before relaxing) |
.stab 0x000027fc 0x57c I2CInterface.o |
0x75c (size before relaxing) |
.stab 0x00002d78 0x3d8 CamConfig.o |
0x5b8 (size before relaxing) |
.stab 0x00003150 0x1ec Utility.o |
0x3b4 (size before relaxing) |
.stab 0x0000333c 0x210 DebugInterface.o |
0x3d8 (size before relaxing) |
.stab 0x0000354c 0x570 CamInterfaceAsm.o |
0x57c (size before relaxing) |
.stab 0x00003abc 0x228 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(atoi.o) |
0x234 (size before relaxing) |
.stab 0x00003ce4 0x78 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(mul10.o) |
0x84 (size before relaxing) |
.stab 0x00003d5c 0x78 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rb.1C1D1E.o) |
0x84 (size before relaxing) |
.stab 0x00003dd4 0x54 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rblk.1C1D1E.o) |
0x60 (size before relaxing) |
.stab 0x00003e28 0xa8 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_wb.1C1D1E.o) |
0xb4 (size before relaxing) |
.stabstr 0x00000000 0x17c9 |
*(.stabstr) |
.stabstr 0x00000000 0x17c9 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges |
*(.debug_aranges) |
.debug_pubnames |
*(.debug_pubnames) |
.debug_info |
*(.debug_info) |
*(.gnu.linkonce.wi.*) |
.debug_abbrev |
*(.debug_abbrev) |
.debug_line |
*(.debug_line) |
.debug_frame |
*(.debug_frame) |
.debug_str |
*(.debug_str) |
.debug_loc |
*(.debug_loc) |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(AVRcam.elf elf32-avr) |
Cross Reference Table |
Symbol File |
CamConfig_init CamConfig.o |
Main.o |
CamConfig_sendFifoCmds CamConfig.o |
UIMgr.o |
FrameMgr.o |
CamConfig_setCamReg CamConfig.o |
UIMgr.o |
FrameMgr.o |
CamConfig_txFifo CamConfig.o |
CamConfig_txFifoHead CamConfig.o |
CamConfig_txFifoTail CamConfig.o |
CamConfig_writeTxFifo CamConfig.o |
CamIntAsm_acquireDumpLine CamInterfaceAsm.o |
FrameMgr.o |
CamIntAsm_acquireTrackingLine CamInterfaceAsm.o |
FrameMgr.o |
CamIntAsm_waitForNewDumpFrame CamInterfaceAsm.o |
CamIntAsm_waitForNewTrackingFrame CamInterfaceAsm.o |
CamInt_init CamInterface.o |
Main.o |
CamInt_resetCam CamInterface.o |
UIMgr.o |
DebugInt_init DebugInterface.o |
Main.o |
Exec_eventFifo UartInterface.o |
Executive.o |
Exec_eventFifoHead Executive.o |
UartInterface.o |
Exec_eventFifoTail Executive.o |
Exec_run Executive.o |
Main.o |
Exec_writeEventFifo Executive.o |
UIMgr.o |
FrameMgr.o |
FrameMgr_acquireFrame FrameMgr.o |
FrameMgr_acquireLine FrameMgr.o |
Executive.o |
FrameMgr_dispatchEvent FrameMgr.o |
Executive.o |
FrameMgr_init FrameMgr.o |
Main.o |
FrameMgr_processFrame FrameMgr.o |
FrameMgr_processLine FrameMgr.o |
Executive.o |
I2CInt_init I2CInterface.o |
Main.o |
I2CInt_isI2cBusy I2CInterface.o |
CamConfig.o |
I2CInt_readData I2CInterface.o |
I2CInt_writeData I2CInterface.o |
CamConfig.o |
UIMgr_dispatchEvent UIMgr.o |
Executive.o |
UIMgr_flushTxBuffer UIMgr.o |
UIMgr_init UIMgr.o |
Main.o |
UIMgr_processReceivedData UIMgr.o |
UIMgr_rxFifo UartInterface.o |
UIMgr.o |
UIMgr_rxFifoHead UIMgr.o |
UartInterface.o |
UIMgr_rxFifoTail UIMgr.o |
UIMgr_transmitPendingData UIMgr.o |
Executive.o |
UIMgr_txBuffer UIMgr.o |
UIMgr_txFifo UIMgr.o |
UIMgr_txFifoHead UIMgr.o |
UIMgr_txFifoTail UIMgr.o |
UIMgr_writeBufferToTxFifo UIMgr.o |
UIMgr_writeTxFifo UIMgr.o |
FrameMgr.o |
UartInt_init UartInterface.o |
Main.o |
UartInt_txByte UartInterface.o |
UIMgr.o |
FrameMgr.o |
Utility_delay Utility.o |
DebugInterface.o |
CamConfig.o |
UIMgr.o |
FrameMgr.o |
Main.o |
__bad_interrupt /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__bss_end /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_clear_bss.o) |
__bss_start /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_clear_bss.o) |
__data_end /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_copy_data.o) |
__data_load_start /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_copy_data.o) |
__data_start /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_copy_data.o) |
__do_clear_bss /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_clear_bss.o) |
DebugInterface.o |
Utility.o |
CamConfig.o |
I2CInterface.o |
UartInterface.o |
UIMgr.o |
FrameMgr.o |
Executive.o |
Main.o |
CamInterface.o |
__do_copy_data /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_copy_data.o) |
DebugInterface.o |
Utility.o |
CamConfig.o |
I2CInterface.o |
UartInterface.o |
UIMgr.o |
FrameMgr.o |
Executive.o |
Main.o |
CamInterface.o |
__eeprom_read_block_1C1D1E /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rblk.1C1D1E.o) |
CamInterface.o |
__eeprom_read_byte_1C1D1E /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rb.1C1D1E.o) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_rblk.1C1D1E.o) |
UIMgr.o |
__eeprom_write_byte_1C1D1E /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(ee_wb.1C1D1E.o) |
UIMgr.o |
__heap_end /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__init /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__mulhi_const_10 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(mul10.o) |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(atoi.o) |
__stack /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
Main.o |
__vector_1 CamInterfaceAsm.o |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_10 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_11 UartInterface.o |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_12 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_13 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_14 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_15 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_16 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_17 I2CInterface.o |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_18 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_2 CamInterfaceAsm.o |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_3 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_4 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_5 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_6 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_7 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_8 CamInterfaceAsm.o |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vector_9 /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
CamInterfaceAsm.o |
__vector_default CamInterfaceAsm.o |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
__vectors /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
_exit /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_exit.o) |
atoi /usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/libc.a(atoi.o) |
UIMgr.o |
colorMap CamInterface.o |
UIMgr.o |
FrameMgr.o |
currentLineBuffer FrameMgr.o |
CamInterface.o |
exit /usr/lib/gcc/avr/4.1.0/avr4/libgcc.a(_exit.o) |
Main.o |
fastEventBitmask Executive.o |
CamInterfaceAsm.o |
FrameMgr.o |
main Main.o |
/usr/lib/gcc/avr/4.1.0/../../../../avr/lib/avr4/crtm8.o |
previousLineBuffer FrameMgr.o |
CamInterface.o |
/programy/Atmel_C/AVRcam/CamConfig.lst |
---|
0,0 → 1,560 |
GAS LISTING /tmp/ccaC5L8h.s page 1 |
1 .file "CamConfig.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "CamConfig.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
14 .stabs "gcc2_compiled.",60,0,0,0 |
15 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0 |
16 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0 |
17 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0 |
18 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0 |
19 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0 |
20 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0, |
21 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0 |
22 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0 |
23 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0 |
24 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0 |
25 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0 |
26 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0 |
27 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0 |
28 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0 |
29 .stabs "void:t(0,15)=(0,15)",128,0,0,0 |
30 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0 |
31 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0 |
32 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0 |
33 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0 |
34 .stabs "int8_t:t(4,1)=(0,10)",128,0,116,0 |
35 .stabs "uint8_t:t(4,2)=(0,11)",128,0,117,0 |
36 .stabs "int16_t:t(4,3)=(0,1)",128,0,118,0 |
37 .stabs "uint16_t:t(4,4)=(0,4)",128,0,119,0 |
38 .stabs "int32_t:t(4,5)=(0,3)",128,0,120,0 |
39 .stabs "uint32_t:t(4,6)=(0,5)",128,0,121,0 |
40 .stabs "int64_t:t(4,7)=(0,6)",128,0,122,0 |
41 .stabs "uint64_t:t(4,8)=(0,7)",128,0,123,0 |
42 .stabs "intptr_t:t(4,9)=(4,3)",128,0,135,0 |
43 .stabs "uintptr_t:t(4,10)=(4,4)",128,0,140,0 |
44 .stabs "int_least8_t:t(4,11)=(4,1)",128,0,152,0 |
45 .stabs "uint_least8_t:t(4,12)=(4,2)",128,0,157,0 |
46 .stabs "int_least16_t:t(4,13)=(4,3)",128,0,162,0 |
47 .stabs "uint_least16_t:t(4,14)=(4,4)",128,0,167,0 |
48 .stabs "int_least32_t:t(4,15)=(4,5)",128,0,172,0 |
49 .stabs "uint_least32_t:t(4,16)=(4,6)",128,0,177,0 |
50 .stabs "int_least64_t:t(4,17)=(4,7)",128,0,182,0 |
51 .stabs "uint_least64_t:t(4,18)=(4,8)",128,0,187,0 |
52 .stabs "int_fast8_t:t(4,19)=(4,1)",128,0,200,0 |
53 .stabs "uint_fast8_t:t(4,20)=(4,2)",128,0,205,0 |
54 .stabs "int_fast16_t:t(4,21)=(4,3)",128,0,210,0 |
55 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0 |
56 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0 |
57 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0 |
GAS LISTING /tmp/ccaC5L8h.s page 2 |
58 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0 |
59 .stabs "uint_fast64_t:t(4,26)=(4,8)",128,0,235,0 |
60 .stabs "intmax_t:t(4,27)=(4,7)",128,0,249,0 |
61 .stabs "uintmax_t:t(4,28)=(4,8)",128,0,254,0 |
62 .stabn 162,0,0,0 |
63 .stabs "int_farptr_t:t(3,1)=(4,5)",128,0,76,0 |
64 .stabs "uint_farptr_t:t(3,2)=(4,6)",128,0,80,0 |
65 .stabn 162,0,0,0 |
66 .stabn 162,0,0,0 |
67 .stabn 162,0,0,0 |
68 .stabs "CamConfig.h",130,0,0,0 |
69 .stabs "I2CInterface.h",130,0,0,0 |
70 .stabs "CommonDefs.h",130,0,0,0 |
71 .stabs "bool_t:t(7,1)=(0,11)",128,0,56,0 |
72 .stabn 162,0,0,0 |
73 .stabs "i2cCmd_t:t(6,1)=(6,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,0 |
74 .stabn 162,0,0,0 |
75 .stabn 162,0,0,0 |
76 .stabs "CamConfig_writeTxFifo:F(7,1)",36,0,155,CamConfig_writeTxFifo |
77 .stabs "cmd:P(6,1)",64,0,154,24 |
78 .global CamConfig_writeTxFifo |
79 .type CamConfig_writeTxFifo, @function |
80 CamConfig_writeTxFifo: |
81 .stabd 46,0,0 |
1:CamConfig.c **** /* |
2:CamConfig.c **** Copyright (C) 2004 John Orlando |
3:CamConfig.c **** |
4:CamConfig.c **** AVRcam: a small real-time image processing engine. |
5:CamConfig.c **** |
6:CamConfig.c **** This program is free software; you can redistribute it and/or |
7:CamConfig.c **** modify it under the terms of the GNU General Public |
8:CamConfig.c **** License as published by the Free Software Foundation; either |
9:CamConfig.c **** version 2 of the License, or (at your option) any later version. |
10:CamConfig.c **** |
11:CamConfig.c **** This program is distributed in the hope that it will be useful, |
12:CamConfig.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of |
13:CamConfig.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14:CamConfig.c **** General Public License for more details. |
15:CamConfig.c **** |
16:CamConfig.c **** You should have received a copy of the GNU General Public |
17:CamConfig.c **** License along with this program; if not, write to the Free Software |
18:CamConfig.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19:CamConfig.c **** |
20:CamConfig.c **** For more information on the AVRcam, please contact: |
21:CamConfig.c **** |
22:CamConfig.c **** john@jrobot.net |
23:CamConfig.c **** |
24:CamConfig.c **** or go to www.jrobot.net for more details regarding the system. |
25:CamConfig.c **** */ |
26:CamConfig.c **** /********************************************************** |
27:CamConfig.c **** Module Name: CamConfig.c |
28:CamConfig.c **** Module Date: 04/10/2004 |
29:CamConfig.c **** Module Auth: John Orlando |
30:CamConfig.c **** |
31:CamConfig.c **** Description: This module is responsible for the |
32:CamConfig.c **** high-level configuration activities of the OV6620 |
33:CamConfig.c **** camera module. This module interfaces with the |
GAS LISTING /tmp/ccaC5L8h.s page 3 |
34:CamConfig.c **** I2CInterface module to perform this configuration. |
35:CamConfig.c **** |
36:CamConfig.c **** Revision History: |
37:CamConfig.c **** Date Rel Ver. Notes |
38:CamConfig.c **** 4/10/2004 0.1 Module created |
39:CamConfig.c **** 6/30/2004 1.0 Initial release for Circuit Cellar |
40:CamConfig.c **** contest. |
41:CamConfig.c **** 11/15/2004 1.2 Added code to un-tri-state the |
42:CamConfig.c **** OV6620's pixel data busses at |
43:CamConfig.c **** startup after four seconds. |
44:CamConfig.c **** This was added in to |
45:CamConfig.c **** allow the user to re-program the |
46:CamConfig.c **** mega8 at startup if needed. |
47:CamConfig.c **** ***********************************************************/ |
48:CamConfig.c **** |
49:CamConfig.c **** /* Includes */ |
50:CamConfig.c **** #include <avr/io.h> |
51:CamConfig.c **** #include "CamConfig.h" |
52:CamConfig.c **** #include "I2CInterface.h" |
53:CamConfig.c **** #include "CommonDefs.h" |
54:CamConfig.c **** #include "Utility.h" |
55:CamConfig.c **** |
56:CamConfig.c **** /**********************************************************/ |
57:CamConfig.c **** /* Definitions */ |
58:CamConfig.c **** /* The length of an I2C command is made up of a register address |
59:CamConfig.c **** plus the actual value of the register */ |
60:CamConfig.c **** #define SIZE_OF_I2C_CMD 2 |
61:CamConfig.c **** #define MAX_NUM_CONFIG_CMDS 8 |
62:CamConfig.c **** #define CAM_CONFIG_TX_FIFO_SIZE MAX_NUM_CONFIG_CMDS |
63:CamConfig.c **** #define CAM_CONFIG_TX_FIFO_MASK CAM_CONFIG_TX_FIFO_SIZE-1 |
64:CamConfig.c **** |
65:CamConfig.c **** /* Local Variables */ |
66:CamConfig.c **** |
67:CamConfig.c **** /* Local Structures and Typedefs */ |
68:CamConfig.c **** |
69:CamConfig.c **** /* Local Function Prototypes */ |
70:CamConfig.c **** static i2cCmd_t CamConfig_readTxFifo(void); |
71:CamConfig.c **** |
72:CamConfig.c **** /* Extern Variables */ |
73:CamConfig.c **** i2cCmd_t CamConfig_txFifo[CAM_CONFIG_TX_FIFO_SIZE]; |
74:CamConfig.c **** unsigned char CamConfig_txFifoHead=0; |
75:CamConfig.c **** unsigned char CamConfig_txFifoTail=0; |
76:CamConfig.c **** |
77:CamConfig.c **** /*********************************************************** |
78:CamConfig.c **** Function Name: CamConfig_init |
79:CamConfig.c **** Function Description: This function is responsible for |
80:CamConfig.c **** performing the initial configuration of the camera. |
81:CamConfig.c **** Inputs: none |
82:CamConfig.c **** Outputs: none |
83:CamConfig.c **** ***********************************************************/ |
84:CamConfig.c **** void CamConfig_init(void) |
85:CamConfig.c **** { |
86:CamConfig.c **** CamConfig_setCamReg(0x14,0x20); /* reduce frame size */ |
87:CamConfig.c **** CamConfig_setCamReg(0x39,0x40); /* gate PCLK with HREF */ |
88:CamConfig.c **** CamConfig_setCamReg(0x12,0x28); /* set RGB mode, with no AWB */ |
89:CamConfig.c **** CamConfig_setCamReg(0x28,0x05); /* set color sequencer */ |
90:CamConfig.c **** CamConfig_setCamReg(0x13,0x01); /* un-tri-state the Y/UV lines */ |
GAS LISTING /tmp/ccaC5L8h.s page 4 |
91:CamConfig.c **** |
92:CamConfig.c **** /* send the first four cmds in the I2C fifo */ |
93:CamConfig.c **** CamConfig_sendFifoCmds(); |
94:CamConfig.c **** } |
95:CamConfig.c **** |
96:CamConfig.c **** |
97:CamConfig.c **** /*********************************************************** |
98:CamConfig.c **** Function Name: CamConfig_setCamReg |
99:CamConfig.c **** Function Description: This function is responsible for |
100:CamConfig.c **** creating an I2C cmd structure and placing it into the |
101:CamConfig.c **** cmd fifo. |
102:CamConfig.c **** Inputs: reg - the register to modify |
103:CamConfig.c **** val - the new value of the register |
104:CamConfig.c **** Outputs: none |
105:CamConfig.c **** ***********************************************************/ |
106:CamConfig.c **** void CamConfig_setCamReg(unsigned char reg, unsigned char val) |
107:CamConfig.c **** { |
108:CamConfig.c **** i2cCmd_t cmd; |
109:CamConfig.c **** |
110:CamConfig.c **** cmd.configReg = reg; |
111:CamConfig.c **** cmd.data = val; |
112:CamConfig.c **** #ifndef SIMULATION |
113:CamConfig.c **** CamConfig_writeTxFifo(cmd); |
114:CamConfig.c **** #endif |
115:CamConfig.c **** } |
116:CamConfig.c **** /*********************************************************** |
117:CamConfig.c **** Function Name: CamConfig_sendFifoCmds |
118:CamConfig.c **** Function Description: This function is responsible for |
119:CamConfig.c **** sending the entire contents of the config fifo. This |
120:CamConfig.c **** function won't return until the configuration process |
121:CamConfig.c **** is complete (or an error is encountered). |
122:CamConfig.c **** Inputs: none |
123:CamConfig.c **** Outputs: none |
124:CamConfig.c **** Note: Since this function is written to use the TWI |
125:CamConfig.c **** interrupt in the I2CInterface module, there will be |
126:CamConfig.c **** some busy-waiting here...no big deal, since we end up |
127:CamConfig.c **** having to trash the frame that we are executing this |
128:CamConfig.c **** slave write in anyway (since we can't meet the strict |
129:CamConfig.c **** timing requirements and write i2c at the same time). |
130:CamConfig.c **** ***********************************************************/ |
131:CamConfig.c **** void CamConfig_sendFifoCmds(void) |
132:CamConfig.c **** { |
133:CamConfig.c **** i2cCmd_t cmd; |
134:CamConfig.c **** |
135:CamConfig.c **** while (CamConfig_txFifoHead != CamConfig_txFifoTail) |
136:CamConfig.c **** { |
137:CamConfig.c **** cmd = CamConfig_readTxFifo(); |
138:CamConfig.c **** I2CInt_writeData(CAM_ADDRESS,&cmd.configReg,SIZE_OF_I2C_CMD); |
139:CamConfig.c **** Utility_delay(100); |
140:CamConfig.c **** /* wait for the I2C transaction to complete */ |
141:CamConfig.c **** while(I2CInt_isI2cBusy() == TRUE); |
142:CamConfig.c **** } |
143:CamConfig.c **** } |
144:CamConfig.c **** |
145:CamConfig.c **** /*********************************************************** |
146:CamConfig.c **** Function Name: CamConfig_writeTxFifo |
147:CamConfig.c **** Function Description: This function is responsible for |
GAS LISTING /tmp/ccaC5L8h.s page 5 |
148:CamConfig.c **** adding a new command to the tx fifo. It adjusts all |
149:CamConfig.c **** needed pointers. |
150:CamConfig.c **** Inputs: cmd - the i2cCmd_t to add to the fifo |
151:CamConfig.c **** Outputs: bool_t - indicating if writing to the fifo |
152:CamConfig.c **** causes it to wrap |
153:CamConfig.c **** ***********************************************************/ |
154:CamConfig.c **** bool_t CamConfig_writeTxFifo(i2cCmd_t cmd) |
155:CamConfig.c **** { |
82 .stabn 68,0,155,.LM0-CamConfig_writeTxFifo |
83 .LM0: |
84 /* prologue: frame size=0 */ |
85 /* prologue end (size=0) */ |
156:CamConfig.c **** unsigned char tmpHead; |
157:CamConfig.c **** bool_t retVal = TRUE; |
158:CamConfig.c **** |
159:CamConfig.c **** CamConfig_txFifo[CamConfig_txFifoHead] = cmd; |
86 .stabn 68,0,159,.LM1-CamConfig_writeTxFifo |
87 .LM1: |
88 0000 2091 0000 lds r18,CamConfig_txFifoHead |
89 0004 E22F mov r30,r18 |
90 0006 FF27 clr r31 |
91 0008 EE0F lsl r30 |
92 000a FF1F rol r31 |
93 000c E050 subi r30,lo8(-(CamConfig_txFifo)) |
94 000e F040 sbci r31,hi8(-(CamConfig_txFifo)) |
95 0010 9183 std Z+1,r25 |
96 0012 8083 st Z,r24 |
160:CamConfig.c **** |
161:CamConfig.c **** /* see if we need to wrap */ |
162:CamConfig.c **** tmpHead = (CamConfig_txFifoHead+1) & (CAM_CONFIG_TX_FIFO_MASK); |
97 .stabn 68,0,162,.LM2-CamConfig_writeTxFifo |
98 .LM2: |
99 0014 2F5F subi r18,lo8(-(1)) |
100 0016 2770 andi r18,lo8(7) |
163:CamConfig.c **** CamConfig_txFifoHead = tmpHead; |
101 .stabn 68,0,163,.LM3-CamConfig_writeTxFifo |
102 .LM3: |
103 0018 2093 0000 sts CamConfig_txFifoHead,r18 |
104 001c 90E0 ldi r25,lo8(0) |
105 001e 8091 0000 lds r24,CamConfig_txFifoTail |
106 0022 2817 cp r18,r24 |
107 0024 09F4 brne .L2 |
108 .stabn 68,0,163,.LM4-CamConfig_writeTxFifo |
109 .LM4: |
110 0026 91E0 ldi r25,lo8(1) |
111 .L2: |
112 0028 81E0 ldi r24,lo8(1) |
113 002a 8927 eor r24,r25 |
164:CamConfig.c **** |
165:CamConfig.c **** /* check to see if we have filled up the queue */ |
166:CamConfig.c **** if (CamConfig_txFifoHead == CamConfig_txFifoTail) |
167:CamConfig.c **** { |
168:CamConfig.c **** /* we wrapped the fifo...return false */ |
169:CamConfig.c **** retVal = FALSE; |
170:CamConfig.c **** } |
171:CamConfig.c **** return(retVal); |
172:CamConfig.c **** } |
GAS LISTING /tmp/ccaC5L8h.s page 6 |
114 .stabn 68,0,172,.LM5-CamConfig_writeTxFifo |
115 .LM5: |
116 002c 9927 clr r25 |
117 /* epilogue: frame size=0 */ |
118 002e 0895 ret |
119 /* epilogue end (size=1) */ |
120 /* function CamConfig_writeTxFifo size 24 (23) */ |
121 .size CamConfig_writeTxFifo, .-CamConfig_writeTxFifo |
122 .stabs "tmpHead:r(0,11)",64,0,156,18 |
123 .stabn 192,0,0,CamConfig_writeTxFifo-CamConfig_writeTxFifo |
124 .stabn 224,0,0,.Lscope0-CamConfig_writeTxFifo |
125 .Lscope0: |
126 .stabs "",36,0,0,.Lscope0-CamConfig_writeTxFifo |
127 .stabd 78,0,0 |
128 .stabs "CamConfig_setCamReg:F(0,15)",36,0,107,CamConfig_setCamReg |
129 .stabs "reg:P(0,11)",64,0,106,24 |
130 .stabs "val:P(0,11)",64,0,106,22 |
131 .global CamConfig_setCamReg |
132 .type CamConfig_setCamReg, @function |
133 CamConfig_setCamReg: |
134 .stabd 46,0,0 |
135 .stabn 68,0,107,.LM6-CamConfig_setCamReg |
136 .LM6: |
137 /* prologue: frame size=0 */ |
138 /* prologue end (size=0) */ |
139 .stabn 68,0,110,.LM7-CamConfig_setCamReg |
140 .LM7: |
141 0030 282F mov r18,r24 |
142 .stabn 68,0,111,.LM8-CamConfig_setCamReg |
143 .LM8: |
144 0032 362F mov r19,r22 |
145 .stabn 68,0,113,.LM9-CamConfig_setCamReg |
146 .LM9: |
147 0034 C901 movw r24,r18 |
148 0036 E4DF rcall CamConfig_writeTxFifo |
149 /* epilogue: frame size=0 */ |
150 0038 0895 ret |
151 /* epilogue end (size=1) */ |
152 /* function CamConfig_setCamReg size 5 (4) */ |
153 .size CamConfig_setCamReg, .-CamConfig_setCamReg |
154 .stabs "cmd:r(6,1)",64,0,108,18 |
155 .stabn 192,0,0,CamConfig_setCamReg-CamConfig_setCamReg |
156 .stabn 224,0,0,.Lscope1-CamConfig_setCamReg |
157 .Lscope1: |
158 .stabs "",36,0,0,.Lscope1-CamConfig_setCamReg |
159 .stabd 78,0,0 |
160 .stabs "CamConfig_sendFifoCmds:F(0,15)",36,0,132,CamConfig_sendFifoCmds |
161 .global CamConfig_sendFifoCmds |
162 .type CamConfig_sendFifoCmds, @function |
163 CamConfig_sendFifoCmds: |
164 .stabd 46,0,0 |
165 .stabn 68,0,132,.LM10-CamConfig_sendFifoCmds |
166 .LM10: |
167 /* prologue: frame size=2 */ |
168 003a 0F93 push r16 |
169 003c 1F93 push r17 |
170 003e CF93 push r28 |
GAS LISTING /tmp/ccaC5L8h.s page 7 |
171 0040 DF93 push r29 |
172 0042 CDB7 in r28,__SP_L__ |
173 0044 DEB7 in r29,__SP_H__ |
174 0046 2297 sbiw r28,2 |
175 0048 0FB6 in __tmp_reg__,__SREG__ |
176 004a F894 cli |
177 004c DEBF out __SP_H__,r29 |
178 004e 0FBE out __SREG__,__tmp_reg__ |
179 0050 CDBF out __SP_L__,r28 |
180 /* prologue end (size=12) */ |
181 0052 8E01 movw r16,r28 |
182 0054 0F5F subi r16,lo8(-(1)) |
183 0056 1F4F sbci r17,hi8(-(1)) |
184 0058 19C0 rjmp .L7 |
185 .L8: |
186 .LBB4: |
187 .LBB5: |
173:CamConfig.c **** |
174:CamConfig.c **** /*********************************************************** |
175:CamConfig.c **** Function Name: CamConfig_readTxFifo |
176:CamConfig.c **** Function Description: This function is responsible for |
177:CamConfig.c **** reading a cmd out of the tx fifo. |
178:CamConfig.c **** Inputs: none |
179:CamConfig.c **** Outputs: i2cCmd_t - the cmd read from the fifo |
180:CamConfig.c **** ***********************************************************/ |
181:CamConfig.c **** static i2cCmd_t CamConfig_readTxFifo(void) |
182:CamConfig.c **** { |
183:CamConfig.c **** i2cCmd_t cmd; |
184:CamConfig.c **** unsigned char tmpTail; |
185:CamConfig.c **** |
186:CamConfig.c **** /* just return the current tail from the rx fifo */ |
187:CamConfig.c **** cmd = CamConfig_txFifo[CamConfig_txFifoTail]; |
188 .stabn 68,0,187,.LM11-CamConfig_sendFifoCmds |
189 .LM11: |
190 005a E32F mov r30,r19 |
191 005c FF27 clr r31 |
192 005e EE0F lsl r30 |
193 0060 FF1F rol r31 |
194 0062 E050 subi r30,lo8(-(CamConfig_txFifo)) |
195 0064 F040 sbci r31,hi8(-(CamConfig_txFifo)) |
196 0066 9181 ldd r25,Z+1 |
197 0068 2081 ld r18,Z |
188:CamConfig.c **** tmpTail = (CamConfig_txFifoTail+1) & (CAM_CONFIG_TX_FIFO_MASK); |
189:CamConfig.c **** CamConfig_txFifoTail = tmpTail; |
198 .stabn 68,0,189,.LM12-CamConfig_sendFifoCmds |
199 .LM12: |
200 006a 832F mov r24,r19 |
201 006c 8F5F subi r24,lo8(-(1)) |
202 006e 8770 andi r24,lo8(7) |
203 0070 8093 0000 sts CamConfig_txFifoTail,r24 |
204 .stabn 68,0,137,.LM13-CamConfig_sendFifoCmds |
205 .LM13: |
206 0074 9A83 std Y+2,r25 |
207 0076 2983 std Y+1,r18 |
208 .LBE5: |
209 .LBE4: |
210 .stabn 68,0,138,.LM14-CamConfig_sendFifoCmds |
GAS LISTING /tmp/ccaC5L8h.s page 8 |
211 .LM14: |
212 0078 42E0 ldi r20,lo8(2) |
213 007a B801 movw r22,r16 |
214 007c 80E6 ldi r24,lo8(96) |
215 007e 00D0 rcall I2CInt_writeData |
216 .stabn 68,0,139,.LM15-CamConfig_sendFifoCmds |
217 .LM15: |
218 0080 84E6 ldi r24,lo8(100) |
219 0082 90E0 ldi r25,hi8(100) |
220 0084 00D0 rcall Utility_delay |
221 .L9: |
222 .stabn 68,0,141,.LM16-CamConfig_sendFifoCmds |
223 .LM16: |
224 0086 00D0 rcall I2CInt_isI2cBusy |
225 0088 8130 cpi r24,lo8(1) |
226 008a E9F3 breq .L9 |
227 .L7: |
228 .stabn 68,0,135,.LM17-CamConfig_sendFifoCmds |
229 .LM17: |
230 008c 3091 0000 lds r19,CamConfig_txFifoTail |
231 0090 8091 0000 lds r24,CamConfig_txFifoHead |
232 0094 8317 cp r24,r19 |
233 0096 09F7 brne .L8 |
234 /* epilogue: frame size=2 */ |
235 0098 2296 adiw r28,2 |
236 009a 0FB6 in __tmp_reg__,__SREG__ |
237 009c F894 cli |
238 009e DEBF out __SP_H__,r29 |
239 00a0 0FBE out __SREG__,__tmp_reg__ |
240 00a2 CDBF out __SP_L__,r28 |
241 00a4 DF91 pop r29 |
242 00a6 CF91 pop r28 |
243 00a8 1F91 pop r17 |
244 00aa 0F91 pop r16 |
245 00ac 0895 ret |
246 /* epilogue end (size=11) */ |
247 /* function CamConfig_sendFifoCmds size 58 (35) */ |
248 .size CamConfig_sendFifoCmds, .-CamConfig_sendFifoCmds |
249 .stabs "cmd:(6,1)",128,0,133,1 |
250 .stabn 192,0,0,CamConfig_sendFifoCmds-CamConfig_sendFifoCmds |
251 .stabn 224,0,0,.Lscope2-CamConfig_sendFifoCmds |
252 .Lscope2: |
253 .stabs "",36,0,0,.Lscope2-CamConfig_sendFifoCmds |
254 .stabd 78,0,0 |
255 .stabs "CamConfig_init:F(0,15)",36,0,85,CamConfig_init |
256 .global CamConfig_init |
257 .type CamConfig_init, @function |
258 CamConfig_init: |
259 .stabd 46,0,0 |
260 .stabn 68,0,85,.LM18-CamConfig_init |
261 .LM18: |
262 /* prologue: frame size=0 */ |
263 /* prologue end (size=0) */ |
264 .stabn 68,0,86,.LM19-CamConfig_init |
265 .LM19: |
266 00ae 60E2 ldi r22,lo8(32) |
267 00b0 84E1 ldi r24,lo8(20) |
GAS LISTING /tmp/ccaC5L8h.s page 9 |
268 00b2 BEDF rcall CamConfig_setCamReg |
269 .stabn 68,0,87,.LM20-CamConfig_init |
270 .LM20: |
271 00b4 60E4 ldi r22,lo8(64) |
272 00b6 89E3 ldi r24,lo8(57) |
273 00b8 BBDF rcall CamConfig_setCamReg |
274 .stabn 68,0,88,.LM21-CamConfig_init |
275 .LM21: |
276 00ba 68E2 ldi r22,lo8(40) |
277 00bc 82E1 ldi r24,lo8(18) |
278 00be B8DF rcall CamConfig_setCamReg |
279 .stabn 68,0,89,.LM22-CamConfig_init |
280 .LM22: |
281 00c0 65E0 ldi r22,lo8(5) |
282 00c2 88E2 ldi r24,lo8(40) |
283 00c4 B5DF rcall CamConfig_setCamReg |
284 .stabn 68,0,90,.LM23-CamConfig_init |
285 .LM23: |
286 00c6 61E0 ldi r22,lo8(1) |
287 00c8 83E1 ldi r24,lo8(19) |
288 00ca B2DF rcall CamConfig_setCamReg |
289 .stabn 68,0,93,.LM24-CamConfig_init |
290 .LM24: |
291 00cc B6DF rcall CamConfig_sendFifoCmds |
292 /* epilogue: frame size=0 */ |
293 00ce 0895 ret |
294 /* epilogue end (size=1) */ |
295 /* function CamConfig_init size 17 (16) */ |
296 .size CamConfig_init, .-CamConfig_init |
297 .Lscope3: |
298 .stabs "",36,0,0,.Lscope3-CamConfig_init |
299 .stabd 78,0,0 |
300 .global CamConfig_txFifoHead |
301 .global CamConfig_txFifoHead |
302 .section .bss |
303 .type CamConfig_txFifoHead, @object |
304 .size CamConfig_txFifoHead, 1 |
305 CamConfig_txFifoHead: |
306 0000 00 .skip 1,0 |
307 .global CamConfig_txFifoTail |
308 .global CamConfig_txFifoTail |
309 .type CamConfig_txFifoTail, @object |
310 .size CamConfig_txFifoTail, 1 |
311 CamConfig_txFifoTail: |
312 0001 00 .skip 1,0 |
313 .comm CamConfig_txFifo,16,1 |
314 .stabs "CamConfig_txFifo:G(0,16)=ar(0,17)=r(0,17);0;0177777;;0;7;(6,1)",32,0,73,0 |
315 .stabs "CamConfig_txFifoHead:G(0,11)",32,0,74,0 |
316 .stabs "CamConfig_txFifoTail:G(0,11)",32,0,75,0 |
317 .text |
318 .stabs "",100,0,0,.Letext0 |
319 .Letext0: |
320 /* File "CamConfig.c": code 104 = 0x0068 ( 78), prologues 12, epilogues 14 */ |
GAS LISTING /tmp/ccaC5L8h.s page 10 |
DEFINED SYMBOLS |
*ABS*:00000000 CamConfig.c |
/tmp/ccaC5L8h.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccaC5L8h.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccaC5L8h.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccaC5L8h.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccaC5L8h.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccaC5L8h.s:80 .text:00000000 CamConfig_writeTxFifo |
/tmp/ccaC5L8h.s:305 .bss:00000000 CamConfig_txFifoHead |
*COM*:00000010 CamConfig_txFifo |
/tmp/ccaC5L8h.s:311 .bss:00000001 CamConfig_txFifoTail |
/tmp/ccaC5L8h.s:133 .text:00000030 CamConfig_setCamReg |
/tmp/ccaC5L8h.s:163 .text:0000003a CamConfig_sendFifoCmds |
/tmp/ccaC5L8h.s:258 .text:000000ae CamConfig_init |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
I2CInt_writeData |
Utility_delay |
I2CInt_isI2cBusy |
/programy/Atmel_C/AVRcam/CamInterface.c |
---|
49,7 → 49,6 |
/* Includes */ |
#include <avr/interrupt.h> |
#include <avr/signal.h> |
#include <avr/sleep.h> |
#include <avr/eeprom.h> |
#include <stdlib.h> |
/programy/Atmel_C/AVRcam/CamInterface.lst |
---|
1,4 → 1,4 |
GAS LISTING /tmp/ccAE2QZt.s page 1 |
GAS LISTING /tmp/ccQQINeY.s page 1 |
1 .file "CamInterface.c" |
10,7 → 10,7 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0 |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "CamInterface.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
58,7 → 58,7 |
55 .stabs "int_fast16_t:t(5,21)=(5,3)",128,0,210,0 |
56 .stabs "uint_fast16_t:t(5,22)=(5,4)",128,0,215,0 |
57 .stabs "int_fast32_t:t(5,23)=(5,5)",128,0,220,0 |
GAS LISTING /tmp/ccAE2QZt.s page 2 |
GAS LISTING /tmp/ccQQINeY.s page 2 |
58 .stabs "uint_fast32_t:t(5,24)=(5,6)",128,0,225,0 |
89,7 → 89,7 |
83 .stabs "CommonDefs.h",130,0,0,0 |
84 .stabs "bool_t:t(10,1)=(0,11)",128,0,56,0 |
85 .stabn 162,0,0,0 |
86 .stabs "CamInt_resetCam:F(0,15)",36,0,226,CamInt_resetCam |
86 .stabs "CamInt_resetCam:F(0,15)",36,0,225,CamInt_resetCam |
87 .global CamInt_resetCam |
88 .type CamInt_resetCam, @function |
89 CamInt_resetCam: |
118,7 → 118,7 |
22:CamInterface.c **** john@jrobot.net |
23:CamInterface.c **** |
24:CamInterface.c **** or go to www.jrobot.net for more details regarding the system. |
GAS LISTING /tmp/ccAE2QZt.s page 3 |
GAS LISTING /tmp/ccQQINeY.s page 3 |
25:CamInterface.c **** */ |
148,191 → 148,190 |
49:CamInterface.c **** |
50:CamInterface.c **** /* Includes */ |
51:CamInterface.c **** #include <avr/interrupt.h> |
52:CamInterface.c **** #include <avr/signal.h> |
53:CamInterface.c **** #include <avr/sleep.h> |
54:CamInterface.c **** #include <avr/eeprom.h> |
55:CamInterface.c **** #include <stdlib.h> |
56:CamInterface.c **** #include <string.h> |
57:CamInterface.c **** #include "CommonDefs.h" |
58:CamInterface.c **** #include "CamInterface.h" |
59:CamInterface.c **** #include "Utility.h" |
60:CamInterface.c **** #include "UIMgr.h" |
61:CamInterface.c **** #include "Executive.h" |
62:CamInterface.c **** #include "UartInterface.h" |
63:CamInterface.c **** |
64:CamInterface.c **** /* Local Variables */ |
65:CamInterface.c **** |
66:CamInterface.c **** /* Local Structures and Typedefs */ |
67:CamInterface.c **** |
68:CamInterface.c **** /* Definitions */ |
69:CamInterface.c **** //#define OUTPUT_INITIAL_COLOR_MAP 1 |
70:CamInterface.c **** |
71:CamInterface.c **** #define FAST_ACQUIRE 1 |
72:CamInterface.c **** #define CAM_G_BUS PINB |
73:CamInterface.c **** #define CAM_G_BUS_DIR DDRB |
74:CamInterface.c **** #define CAM_RB_BUS PINC |
75:CamInterface.c **** #define CAM_RB_BUS_DIR DDRC |
76:CamInterface.c **** |
77:CamInterface.c **** #define CAM_CONTROL_PORT PORTD |
78:CamInterface.c **** #define CAM_CONTROL_PORT_DIR DDRD |
79:CamInterface.c **** #define CAM_RESET_LINE BIT7 |
80:CamInterface.c **** #define CAM_PIXEL_CLK_COUNT BIT5 |
81:CamInterface.c **** #define CAM_HREF BIT4 |
GAS LISTING /tmp/ccAE2QZt.s page 4 |
52:CamInterface.c **** #include <avr/sleep.h> |
53:CamInterface.c **** #include <avr/eeprom.h> |
54:CamInterface.c **** #include <stdlib.h> |
55:CamInterface.c **** #include <string.h> |
56:CamInterface.c **** #include "CommonDefs.h" |
57:CamInterface.c **** #include "CamInterface.h" |
58:CamInterface.c **** #include "Utility.h" |
59:CamInterface.c **** #include "UIMgr.h" |
60:CamInterface.c **** #include "Executive.h" |
61:CamInterface.c **** #include "UartInterface.h" |
62:CamInterface.c **** |
63:CamInterface.c **** /* Local Variables */ |
64:CamInterface.c **** |
65:CamInterface.c **** /* Local Structures and Typedefs */ |
66:CamInterface.c **** |
67:CamInterface.c **** /* Definitions */ |
68:CamInterface.c **** //#define OUTPUT_INITIAL_COLOR_MAP 1 |
69:CamInterface.c **** |
70:CamInterface.c **** #define FAST_ACQUIRE 1 |
71:CamInterface.c **** #define CAM_G_BUS PINB |
72:CamInterface.c **** #define CAM_G_BUS_DIR DDRB |
73:CamInterface.c **** #define CAM_RB_BUS PINC |
74:CamInterface.c **** #define CAM_RB_BUS_DIR DDRC |
75:CamInterface.c **** |
76:CamInterface.c **** #define CAM_CONTROL_PORT PORTD |
77:CamInterface.c **** #define CAM_CONTROL_PORT_DIR DDRD |
78:CamInterface.c **** #define CAM_RESET_LINE BIT7 |
79:CamInterface.c **** #define CAM_PIXEL_CLK_COUNT BIT5 |
80:CamInterface.c **** #define CAM_HREF BIT4 |
81:CamInterface.c **** #define CAM_PIXEL_CLK_INT BIT3 |
GAS LISTING /tmp/ccQQINeY.s page 4 |
82:CamInterface.c **** #define CAM_PIXEL_CLK_INT BIT3 |
83:CamInterface.c **** #define CAM_VSYNC BIT2 |
84:CamInterface.c **** |
85:CamInterface.c **** /* Global Variables */ |
86:CamInterface.c **** /* NOTE: This file MUST appear first in the Makefile for these variables to |
87:CamInterface.c **** be placed properly in RAM */ |
88:CamInterface.c **** |
89:CamInterface.c **** /* The colorMap[] table provides the membership lookup table to convert |
90:CamInterface.c **** RGB or YUV pixel values into actual colors. The membership table contains |
91:CamInterface.c **** 16 elements for each color channel, concatenated together. The Red (or Y) |
92:CamInterface.c **** value is located in the first 16 bytes, the G (or U) value is located in |
93:CamInterface.c **** the second 16 bytes, and the B (or V) value is located in the last 16 bytes: |
94:CamInterface.c **** |
95:CamInterface.c **** ---------------------------------------------------------------------------------- |
96:CamInterface.c **** |red0|red1|red2|...|red15|green0|green1|green2|...|green15|blue0|blue1|...|blue15| |
97:CamInterface.c **** mem:|0x00 0x01 0x02 0x15 0x16 0x17 0x18 0x31 0x32 0x33 0x47 | |
98:CamInterface.c **** --------------------------------------------------------------------------------- |
99:CamInterface.c **** Thus, the red lookup is accessed at colorMap+0, the green lookup is accessed |
100:CamInterface.c **** at colorMap+16, and the blue lookup is accessed at colorMap+32. */ |
101:CamInterface.c **** unsigned char colorMap[NUM_ELEMENTS_IN_COLOR_MAP] __attribute__ ((section (".noinit"))); |
102:CamInterface.c **** |
103:CamInterface.c **** /* Extern Variables */ |
104:CamInterface.c **** /* These two buffers hold the current and previous lines |
105:CamInterface.c **** of pixel data. They are sized to the worst case scenario, |
106:CamInterface.c **** where the color changes between every pixel (unrealistic). |
107:CamInterface.c **** The format of each buffer is for all the even bytes to hold |
108:CamInterface.c **** the run-length, and the odd bytes to hold the color data. */ |
109:CamInterface.c **** |
110:CamInterface.c **** /* In addition, if we are in frameDump mode, we use these buffers |
111:CamInterface.c **** to store the acquired line data...we are actually grabbing ALL of the |
112:CamInterface.c **** pixels in a line (176) instead of the 88 we get normally during tracking. |
113:CamInterface.c **** But since we have enough to hold 88-RLE blocks, we already have the 176 |
114:CamInterface.c **** allocated for this... */ |
115:CamInterface.c **** unsigned char currentLineBuffer[LENGTH_OF_LINE_BUFFER]; |
116:CamInterface.c **** unsigned char previousLineBuffer[LENGTH_OF_LINE_BUFFER]; |
117:CamInterface.c **** |
118:CamInterface.c **** /* Extern Functions */ |
119:CamInterface.c **** /* These functions are located in assembly files, and thus |
120:CamInterface.c **** must be externed here so they can be referenced in the source below. */ |
121:CamInterface.c **** extern void CamIntAsm_waitForNewTrackingFrame(unsigned char *pBuffer, unsigned char *pMemLookup); |
122:CamInterface.c **** extern void CamIntAsm_waitForNewDumpFrame(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer); |
123:CamInterface.c **** extern void CamIntAsm_acquireTrackingLine(unsigned char *pBuffer, unsigned char *pMemLookup); |
124:CamInterface.c **** extern void CamIntAsm_acquireDumpLine(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer); |
125:CamInterface.c **** |
126:CamInterface.c **** /*********************************************************** |
127:CamInterface.c **** Function Name: CamInt_init |
128:CamInterface.c **** Function Description: This function is responsible |
129:CamInterface.c **** for initializing the camera interface. This includes |
130:CamInterface.c **** setting up the i/o ports that are used to read the |
131:CamInterface.c **** camera busses, as well as resetting the camera. |
132:CamInterface.c **** Inputs: none |
133:CamInterface.c **** Outputs: none |
134:CamInterface.c **** ***********************************************************/ |
135:CamInterface.c **** void CamInt_init(void) |
136:CamInterface.c **** { |
137:CamInterface.c **** #if OUTPUT_INITIAL_COLOR_MAP |
138:CamInterface.c **** unsigned char asciiBuffer[5]; |
GAS LISTING /tmp/ccAE2QZt.s page 5 |
82:CamInterface.c **** #define CAM_VSYNC BIT2 |
83:CamInterface.c **** |
84:CamInterface.c **** /* Global Variables */ |
85:CamInterface.c **** /* NOTE: This file MUST appear first in the Makefile for these variables to |
86:CamInterface.c **** be placed properly in RAM */ |
87:CamInterface.c **** |
88:CamInterface.c **** /* The colorMap[] table provides the membership lookup table to convert |
89:CamInterface.c **** RGB or YUV pixel values into actual colors. The membership table contains |
90:CamInterface.c **** 16 elements for each color channel, concatenated together. The Red (or Y) |
91:CamInterface.c **** value is located in the first 16 bytes, the G (or U) value is located in |
92:CamInterface.c **** the second 16 bytes, and the B (or V) value is located in the last 16 bytes: |
93:CamInterface.c **** |
94:CamInterface.c **** ---------------------------------------------------------------------------------- |
95:CamInterface.c **** |red0|red1|red2|...|red15|green0|green1|green2|...|green15|blue0|blue1|...|blue15| |
96:CamInterface.c **** mem:|0x00 0x01 0x02 0x15 0x16 0x17 0x18 0x31 0x32 0x33 0x47 | |
97:CamInterface.c **** --------------------------------------------------------------------------------- |
98:CamInterface.c **** Thus, the red lookup is accessed at colorMap+0, the green lookup is accessed |
99:CamInterface.c **** at colorMap+16, and the blue lookup is accessed at colorMap+32. */ |
100:CamInterface.c **** unsigned char colorMap[NUM_ELEMENTS_IN_COLOR_MAP] __attribute__ ((section (".noinit"))); |
101:CamInterface.c **** |
102:CamInterface.c **** /* Extern Variables */ |
103:CamInterface.c **** /* These two buffers hold the current and previous lines |
104:CamInterface.c **** of pixel data. They are sized to the worst case scenario, |
105:CamInterface.c **** where the color changes between every pixel (unrealistic). |
106:CamInterface.c **** The format of each buffer is for all the even bytes to hold |
107:CamInterface.c **** the run-length, and the odd bytes to hold the color data. */ |
108:CamInterface.c **** |
109:CamInterface.c **** /* In addition, if we are in frameDump mode, we use these buffers |
110:CamInterface.c **** to store the acquired line data...we are actually grabbing ALL of the |
111:CamInterface.c **** pixels in a line (176) instead of the 88 we get normally during tracking. |
112:CamInterface.c **** But since we have enough to hold 88-RLE blocks, we already have the 176 |
113:CamInterface.c **** allocated for this... */ |
114:CamInterface.c **** unsigned char currentLineBuffer[LENGTH_OF_LINE_BUFFER]; |
115:CamInterface.c **** unsigned char previousLineBuffer[LENGTH_OF_LINE_BUFFER]; |
116:CamInterface.c **** |
117:CamInterface.c **** /* Extern Functions */ |
118:CamInterface.c **** /* These functions are located in assembly files, and thus |
119:CamInterface.c **** must be externed here so they can be referenced in the source below. */ |
120:CamInterface.c **** extern void CamIntAsm_waitForNewTrackingFrame(unsigned char *pBuffer, unsigned char *pMemLookup); |
121:CamInterface.c **** extern void CamIntAsm_waitForNewDumpFrame(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer); |
122:CamInterface.c **** extern void CamIntAsm_acquireTrackingLine(unsigned char *pBuffer, unsigned char *pMemLookup); |
123:CamInterface.c **** extern void CamIntAsm_acquireDumpLine(unsigned char *pCurrBuffer, unsigned char *pPrevBuffer); |
124:CamInterface.c **** |
125:CamInterface.c **** /*********************************************************** |
126:CamInterface.c **** Function Name: CamInt_init |
127:CamInterface.c **** Function Description: This function is responsible |
128:CamInterface.c **** for initializing the camera interface. This includes |
129:CamInterface.c **** setting up the i/o ports that are used to read the |
130:CamInterface.c **** camera busses, as well as resetting the camera. |
131:CamInterface.c **** Inputs: none |
132:CamInterface.c **** Outputs: none |
133:CamInterface.c **** ***********************************************************/ |
134:CamInterface.c **** void CamInt_init(void) |
135:CamInterface.c **** { |
136:CamInterface.c **** #if OUTPUT_INITIAL_COLOR_MAP |
137:CamInterface.c **** unsigned char asciiBuffer[5]; |
138:CamInterface.c **** unsigned char i; |
GAS LISTING /tmp/ccQQINeY.s page 5 |
139:CamInterface.c **** unsigned char i; |
140:CamInterface.c **** #endif |
141:CamInterface.c **** |
142:CamInterface.c **** /* set up the mega8 ports that will be interfacing |
143:CamInterface.c **** with the camera */ |
144:CamInterface.c **** CAM_CONTROL_PORT_DIR |= (1<<CAM_RESET_LINE); /* cam reset is output */ |
145:CamInterface.c **** CAM_CONTROL_PORT_DIR |= 0x80; /* set just the MSB as an output */ |
146:CamInterface.c **** CAM_CONTROL_PORT_DIR &= 0xFB; /* make sure bit2 is clear (input) */ |
147:CamInterface.c **** CAM_CONTROL_PORT &= 0x7F; /* set reset line low */ |
148:CamInterface.c **** CAM_G_BUS_DIR &= 0xF0; /* 4-bit G bus all inputs */ |
149:CamInterface.c **** CAM_G_BUS_DIR |= 0xF0; /* disable the pull-up on PB4 and PB5 */ |
150:CamInterface.c **** CAM_RB_BUS_DIR &= 0xF0; /* 4-bit RB bus all inputs */ |
151:CamInterface.c **** |
152:CamInterface.c **** /* ensure that timer1 is disabled to start...eventually, when PCLK needs |
153:CamInterface.c **** to feed timer1 through the external counter, it will be enabled on an |
154:CamInterface.c **** "as needed" basis...*/ |
155:CamInterface.c **** TCCR1B &= ~( (1<<CS12)|(1<<CS11)|(1<<CS10) ); |
156:CamInterface.c **** |
157:CamInterface.c **** /* we'll turn on the interrupt after we assign the initial TCNT value */ |
158:CamInterface.c **** |
159:CamInterface.c **** /* set up External Interrupt1 to interrupt us on rising edges (HREF)... |
160:CamInterface.c **** this is needed to indicate when the first pixel of each line is about to start, so |
161:CamInterface.c **** we can synch up with it...this interrupt will be disabled once HREF goes high */ |
162:CamInterface.c **** |
163:CamInterface.c **** MCUCR |= (1<<ISC11) | (1<<ISC10); /* rising edge interrupt */ |
164:CamInterface.c **** /* the interrupt will be enabled when we are ready to detect the rising edge of |
165:CamInterface.c **** HREF...its now primed and ready to go */ |
166:CamInterface.c **** |
167:CamInterface.c **** /* set up External Interrupt0 to interrupt us on rising edges (VSYNC) */ |
168:CamInterface.c **** MCUCR |= (1<<ISC01) | (1<<ISC00); /* rising edge interrupt */ |
169:CamInterface.c **** GICR |= (1<<INT0); /* interrupt request enabled */ |
170:CamInterface.c **** |
171:CamInterface.c **** /* set up TimerO to count and be clocked from an external pulse source |
172:CamInterface.c **** (HREF) on falling edges...eventually, we need to enable the interrupt |
173:CamInterface.c **** for this! FIX THIS */ |
174:CamInterface.c **** TCCR0 = (1<<CS02)|(1<<CS01)|(0<<CS00); |
175:CamInterface.c **** |
176:CamInterface.c **** /* setting up the PCLK counter with Timer1 will be done right after |
177:CamInterface.c **** we start receiving pixels in each line...we sacrifice the first pixel |
178:CamInterface.c **** in each line, but we'll account for it...*/ |
179:CamInterface.c **** |
180:CamInterface.c **** /* set up the mega8 so that its sleep mode puts it in an IDLE sleep |
181:CamInterface.c **** mode, where it can wake up as fast as possible */ |
182:CamInterface.c **** set_sleep_mode(SLEEP_MODE_IDLE); |
183:CamInterface.c **** /* umm....we need to actually enable the sleep mode...*/ |
184:CamInterface.c **** MCUCR |= 0x80; |
185:CamInterface.c **** |
186:CamInterface.c **** /* initialize the memLookup table */ |
187:CamInterface.c **** memset(colorMap,0x00,NUM_ELEMENTS_IN_COLOR_MAP); |
188:CamInterface.c **** |
189:CamInterface.c **** /* read the color map out of EEPROM */ |
190:CamInterface.c **** eeprom_read_block(colorMap, (unsigned char*)0x01,NUM_ELEMENTS_IN_COLOR_MAP); |
191:CamInterface.c **** |
192:CamInterface.c **** #if OUTPUT_INITIAL_COLOR_MAP |
193:CamInterface.c **** UIMgr_txBuffer("\r\n",2); |
194:CamInterface.c **** for (i=0; i<NUM_ELEMENTS_IN_COLOR_MAP; i++) |
195:CamInterface.c **** { |
GAS LISTING /tmp/ccAE2QZt.s page 6 |
139:CamInterface.c **** #endif |
140:CamInterface.c **** |
141:CamInterface.c **** /* set up the mega8 ports that will be interfacing |
142:CamInterface.c **** with the camera */ |
143:CamInterface.c **** CAM_CONTROL_PORT_DIR |= (1<<CAM_RESET_LINE); /* cam reset is output */ |
144:CamInterface.c **** CAM_CONTROL_PORT_DIR |= 0x80; /* set just the MSB as an output */ |
145:CamInterface.c **** CAM_CONTROL_PORT_DIR &= 0xFB; /* make sure bit2 is clear (input) */ |
146:CamInterface.c **** CAM_CONTROL_PORT &= 0x7F; /* set reset line low */ |
147:CamInterface.c **** CAM_G_BUS_DIR &= 0xF0; /* 4-bit G bus all inputs */ |
148:CamInterface.c **** CAM_G_BUS_DIR |= 0xF0; /* disable the pull-up on PB4 and PB5 */ |
149:CamInterface.c **** CAM_RB_BUS_DIR &= 0xF0; /* 4-bit RB bus all inputs */ |
150:CamInterface.c **** |
151:CamInterface.c **** /* ensure that timer1 is disabled to start...eventually, when PCLK needs |
152:CamInterface.c **** to feed timer1 through the external counter, it will be enabled on an |
153:CamInterface.c **** "as needed" basis...*/ |
154:CamInterface.c **** TCCR1B &= ~( (1<<CS12)|(1<<CS11)|(1<<CS10) ); |
155:CamInterface.c **** |
156:CamInterface.c **** /* we'll turn on the interrupt after we assign the initial TCNT value */ |
157:CamInterface.c **** |
158:CamInterface.c **** /* set up External Interrupt1 to interrupt us on rising edges (HREF)... |
159:CamInterface.c **** this is needed to indicate when the first pixel of each line is about to start, so |
160:CamInterface.c **** we can synch up with it...this interrupt will be disabled once HREF goes high */ |
161:CamInterface.c **** |
162:CamInterface.c **** MCUCR |= (1<<ISC11) | (1<<ISC10); /* rising edge interrupt */ |
163:CamInterface.c **** /* the interrupt will be enabled when we are ready to detect the rising edge of |
164:CamInterface.c **** HREF...its now primed and ready to go */ |
165:CamInterface.c **** |
166:CamInterface.c **** /* set up External Interrupt0 to interrupt us on rising edges (VSYNC) */ |
167:CamInterface.c **** MCUCR |= (1<<ISC01) | (1<<ISC00); /* rising edge interrupt */ |
168:CamInterface.c **** GICR |= (1<<INT0); /* interrupt request enabled */ |
169:CamInterface.c **** |
170:CamInterface.c **** /* set up TimerO to count and be clocked from an external pulse source |
171:CamInterface.c **** (HREF) on falling edges...eventually, we need to enable the interrupt |
172:CamInterface.c **** for this! FIX THIS */ |
173:CamInterface.c **** TCCR0 = (1<<CS02)|(1<<CS01)|(0<<CS00); |
174:CamInterface.c **** |
175:CamInterface.c **** /* setting up the PCLK counter with Timer1 will be done right after |
176:CamInterface.c **** we start receiving pixels in each line...we sacrifice the first pixel |
177:CamInterface.c **** in each line, but we'll account for it...*/ |
178:CamInterface.c **** |
179:CamInterface.c **** /* set up the mega8 so that its sleep mode puts it in an IDLE sleep |
180:CamInterface.c **** mode, where it can wake up as fast as possible */ |
181:CamInterface.c **** set_sleep_mode(SLEEP_MODE_IDLE); |
182:CamInterface.c **** /* umm....we need to actually enable the sleep mode...*/ |
183:CamInterface.c **** MCUCR |= 0x80; |
184:CamInterface.c **** |
185:CamInterface.c **** /* initialize the memLookup table */ |
186:CamInterface.c **** memset(colorMap,0x00,NUM_ELEMENTS_IN_COLOR_MAP); |
187:CamInterface.c **** |
188:CamInterface.c **** /* read the color map out of EEPROM */ |
189:CamInterface.c **** eeprom_read_block(colorMap, (unsigned char*)0x01,NUM_ELEMENTS_IN_COLOR_MAP); |
190:CamInterface.c **** |
191:CamInterface.c **** #if OUTPUT_INITIAL_COLOR_MAP |
192:CamInterface.c **** UIMgr_txBuffer("\r\n",2); |
193:CamInterface.c **** for (i=0; i<NUM_ELEMENTS_IN_COLOR_MAP; i++) |
194:CamInterface.c **** { |
195:CamInterface.c **** memset(asciiBuffer,0x00,5); |
GAS LISTING /tmp/ccQQINeY.s page 6 |
196:CamInterface.c **** memset(asciiBuffer,0x00,5); |
197:CamInterface.c **** itoa(colorMap[i],asciiBuffer,10); |
198:CamInterface.c **** UIMgr_txBuffer(asciiBuffer,3); |
199:CamInterface.c **** UIMgr_txBuffer(" ",1); |
200:CamInterface.c **** if (i==15 || i == 31) |
201:CamInterface.c **** { |
202:CamInterface.c **** /* break up the output */ |
203:CamInterface.c **** UIMgr_txBuffer("\r\n",2); |
204:CamInterface.c **** } |
205:CamInterface.c **** } |
206:CamInterface.c **** #endif |
207:CamInterface.c **** |
208:CamInterface.c **** #ifndef NO_CRYSTAL |
209:CamInterface.c **** CamInt_resetCam(); |
210:CamInterface.c **** #endif |
211:CamInterface.c **** } |
212:CamInterface.c **** |
213:CamInterface.c **** /*********************************************************** |
214:CamInterface.c **** Function Name: CamInt_resetCam |
215:CamInterface.c **** Function Description: This function is responsible |
216:CamInterface.c **** for resetting the camera. This is accomplished by |
217:CamInterface.c **** toggling the reset line on the OV6620 for ~100 mS. |
218:CamInterface.c **** Inputs: none |
219:CamInterface.c **** Outputs: none |
220:CamInterface.c **** IMPORTANT NOTE: This function has effectively been removed |
221:CamInterface.c **** since resetting the camera now causes the camera to not |
222:CamInterface.c **** output the clock signal. Thus, if we reset the cam, the |
223:CamInterface.c **** AVR has no clock, and thus doesn't run... |
224:CamInterface.c **** ***********************************************************/ |
225:CamInterface.c **** void CamInt_resetCam(void) |
226:CamInterface.c **** { |
91 .stabn 68,0,226,.LM0-CamInt_resetCam |
196:CamInterface.c **** itoa(colorMap[i],asciiBuffer,10); |
197:CamInterface.c **** UIMgr_txBuffer(asciiBuffer,3); |
198:CamInterface.c **** UIMgr_txBuffer(" ",1); |
199:CamInterface.c **** if (i==15 || i == 31) |
200:CamInterface.c **** { |
201:CamInterface.c **** /* break up the output */ |
202:CamInterface.c **** UIMgr_txBuffer("\r\n",2); |
203:CamInterface.c **** } |
204:CamInterface.c **** } |
205:CamInterface.c **** #endif |
206:CamInterface.c **** |
207:CamInterface.c **** #ifndef NO_CRYSTAL |
208:CamInterface.c **** CamInt_resetCam(); |
209:CamInterface.c **** #endif |
210:CamInterface.c **** } |
211:CamInterface.c **** |
212:CamInterface.c **** /*********************************************************** |
213:CamInterface.c **** Function Name: CamInt_resetCam |
214:CamInterface.c **** Function Description: This function is responsible |
215:CamInterface.c **** for resetting the camera. This is accomplished by |
216:CamInterface.c **** toggling the reset line on the OV6620 for ~100 mS. |
217:CamInterface.c **** Inputs: none |
218:CamInterface.c **** Outputs: none |
219:CamInterface.c **** IMPORTANT NOTE: This function has effectively been removed |
220:CamInterface.c **** since resetting the camera now causes the camera to not |
221:CamInterface.c **** output the clock signal. Thus, if we reset the cam, the |
222:CamInterface.c **** AVR has no clock, and thus doesn't run... |
223:CamInterface.c **** ***********************************************************/ |
224:CamInterface.c **** void CamInt_resetCam(void) |
225:CamInterface.c **** { |
91 .stabn 68,0,225,.LM0-CamInt_resetCam |
92 .LM0: |
93 /* prologue: frame size=0 */ |
94 /* prologue end (size=0) */ |
344,84 → 343,84 |
100 .Lscope0: |
101 .stabs "",36,0,0,.Lscope0-CamInt_resetCam |
102 .stabd 78,0,0 |
103 .stabs "CamInt_init:F(0,15)",36,0,136,CamInt_init |
103 .stabs "CamInt_init:F(0,15)",36,0,135,CamInt_init |
104 .global CamInt_init |
105 .type CamInt_init, @function |
106 CamInt_init: |
107 .stabd 46,0,0 |
108 .stabn 68,0,136,.LM1-CamInt_init |
108 .stabn 68,0,135,.LM1-CamInt_init |
109 .LM1: |
110 /* prologue: frame size=0 */ |
111 /* prologue end (size=0) */ |
112 .stabn 68,0,144,.LM2-CamInt_init |
112 .stabn 68,0,143,.LM2-CamInt_init |
113 .LM2: |
114 0002 8F9A sbi 49-0x20,7 |
115 .stabn 68,0,145,.LM3-CamInt_init |
115 .stabn 68,0,144,.LM3-CamInt_init |
116 .LM3: |
GAS LISTING /tmp/ccAE2QZt.s page 7 |
117 0004 8F9A sbi 49-0x20,7 |
GAS LISTING /tmp/ccQQINeY.s page 7 |
117 0004 8F9A sbi 49-0x20,7 |
118 .stabn 68,0,146,.LM4-CamInt_init |
118 .stabn 68,0,145,.LM4-CamInt_init |
119 .LM4: |
120 0006 8A98 cbi 49-0x20,2 |
121 .stabn 68,0,147,.LM5-CamInt_init |
121 .stabn 68,0,146,.LM5-CamInt_init |
122 .LM5: |
123 0008 9798 cbi 50-0x20,7 |
124 .stabn 68,0,148,.LM6-CamInt_init |
124 .stabn 68,0,147,.LM6-CamInt_init |
125 .LM6: |
126 000a 87B3 in r24,55-0x20 |
127 000c 807F andi r24,lo8(-16) |
128 000e 87BB out 55-0x20,r24 |
129 .stabn 68,0,149,.LM7-CamInt_init |
129 .stabn 68,0,148,.LM7-CamInt_init |
130 .LM7: |
131 0010 87B3 in r24,55-0x20 |
132 0012 806F ori r24,lo8(-16) |
133 0014 87BB out 55-0x20,r24 |
134 .stabn 68,0,150,.LM8-CamInt_init |
134 .stabn 68,0,149,.LM8-CamInt_init |
135 .LM8: |
136 0016 84B3 in r24,52-0x20 |
137 0018 807F andi r24,lo8(-16) |
138 001a 84BB out 52-0x20,r24 |
139 .stabn 68,0,155,.LM9-CamInt_init |
139 .stabn 68,0,154,.LM9-CamInt_init |
140 .LM9: |
141 001c 8EB5 in r24,78-0x20 |
142 001e 887F andi r24,lo8(-8) |
143 0020 8EBD out 78-0x20,r24 |
144 .stabn 68,0,163,.LM10-CamInt_init |
144 .stabn 68,0,162,.LM10-CamInt_init |
145 .LM10: |
146 0022 85B7 in r24,85-0x20 |
147 0024 8C60 ori r24,lo8(12) |
148 0026 85BF out 85-0x20,r24 |
149 .stabn 68,0,168,.LM11-CamInt_init |
149 .stabn 68,0,167,.LM11-CamInt_init |
150 .LM11: |
151 0028 85B7 in r24,85-0x20 |
152 002a 8360 ori r24,lo8(3) |
153 002c 85BF out 85-0x20,r24 |
154 .stabn 68,0,169,.LM12-CamInt_init |
154 .stabn 68,0,168,.LM12-CamInt_init |
155 .LM12: |
156 002e 8BB7 in r24,91-0x20 |
157 0030 8064 ori r24,lo8(64) |
158 0032 8BBF out 91-0x20,r24 |
159 .stabn 68,0,174,.LM13-CamInt_init |
159 .stabn 68,0,173,.LM13-CamInt_init |
160 .LM13: |
161 0034 86E0 ldi r24,lo8(6) |
162 0036 83BF out 83-0x20,r24 |
163 .stabn 68,0,182,.LM14-CamInt_init |
163 .stabn 68,0,181,.LM14-CamInt_init |
164 .LM14: |
165 0038 85B7 in r24,85-0x20 |
166 003a 8F78 andi r24,lo8(-113) |
167 003c 85BF out 85-0x20,r24 |
168 .stabn 68,0,184,.LM15-CamInt_init |
168 .stabn 68,0,183,.LM15-CamInt_init |
169 .LM15: |
170 003e 85B7 in r24,85-0x20 |
171 0040 8068 ori r24,lo8(-128) |
172 0042 85BF out 85-0x20,r24 |
173 .stabn 68,0,187,.LM16-CamInt_init |
GAS LISTING /tmp/ccAE2QZt.s page 8 |
173 .stabn 68,0,186,.LM16-CamInt_init |
174 .LM16: |
GAS LISTING /tmp/ccQQINeY.s page 8 |
174 .LM16: |
175 0044 E0E0 ldi r30,lo8(colorMap) |
176 0046 F0E0 ldi r31,hi8(colorMap) |
177 0048 80E3 ldi r24,lo8(48) |
478,10 → 477,10 |
41:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Complete rewrite using the original interface by Bjoern Haase |
42:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** <bjoern.haase@de.bosch.com>. |
43:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** */ |
GAS LISTING /tmp/ccAE2QZt.s page 9 |
44:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
GAS LISTING /tmp/ccQQINeY.s page 9 |
44:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
45:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #ifndef _EEPROM_H_ |
46:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define _EEPROM_H_ 1 |
47:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
538,10 → 537,10 |
98:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** is ready to be accessed. Since this may cause long delays if a |
99:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** write operation is still pending, time-critical applications |
100:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** should first poll the EEPROM e. g. using eeprom_is_ready() before |
GAS LISTING /tmp/ccAE2QZt.s page 10 |
101:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** attempting any actual I/O. |
GAS LISTING /tmp/ccQQINeY.s page 10 |
101:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** attempting any actual I/O. |
102:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
103:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \note This header file declares inline functions that call the |
104:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** assembler subroutines directly. This prevents that the compiler |
598,10 → 597,10 |
155:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Attribute expression causing a variable to be allocated within the .eeprom |
156:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** section. */ |
157:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** #define EEMEM __attribute__((section(".eeprom"))) |
GAS LISTING /tmp/ccAE2QZt.s page 11 |
158:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
GAS LISTING /tmp/ccQQINeY.s page 11 |
158:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
159:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \def eeprom_is_ready |
160:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \ingroup avr_eeprom |
161:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \returns 1 if EEPROM is ready for a new read/write operation, 0 if not. */ |
658,10 → 657,10 |
212:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : ); |
213:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** return result; |
214:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** } |
GAS LISTING /tmp/ccAE2QZt.s page 12 |
215:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
GAS LISTING /tmp/ccQQINeY.s page 12 |
215:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
216:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom |
217:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Read a block of \c n bytes from EEPROM address \c pointer_eeprom to |
218:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** \c pointer_ram. For constant n <= 256 bytes a library function is used. |
718,10 → 717,10 |
189 .LM17: |
190 0054 A1E0 ldi r26,lo8(1) |
191 0056 B0E0 ldi r27,hi8(1) |
GAS LISTING /tmp/ccAE2QZt.s page 13 |
192 /* #APP */ |
GAS LISTING /tmp/ccQQINeY.s page 13 |
192 /* #APP */ |
193 0058 182E mov __zero_reg__,r24 |
194 005a 00D0 rcall __eeprom_read_block_1C1D1E |
195 /* #NOAPP */ |
733,8 → 732,8 |
201 /* epilogue end (size=1) */ |
202 /* function CamInt_init size 48 (47) */ |
203 .size CamInt_init, .-CamInt_init |
204 .stabs "pointer_eeprom:r(0,16)=*(0,17)=k(0,15)",64,0,190,26 |
205 .stabs "pointer_ram:r(0,18)=*(0,15)",64,0,190,30 |
204 .stabs "pointer_eeprom:r(0,16)=*(0,17)=k(0,15)",64,0,189,26 |
205 .stabs "pointer_ram:r(0,18)=*(0,15)",64,0,189,30 |
206 .stabn 192,0,0,.LBB6-CamInt_init |
207 .stabn 224,0,0,.LBE6-CamInt_init |
208 .Lscope1: |
752,26 → 751,26 |
218 0000 0000 |
218 0000 0000 |
218 0000 0000 |
219 .stabs "currentLineBuffer:G(0,19)=ar(0,20)=r(0,20);0;0177777;;0;175;(0,11)",32,0,115,0 |
220 .stabs "previousLineBuffer:G(0,19)",32,0,116,0 |
221 .stabs "colorMap:G(0,21)=ar(0,20);0;47;(0,11)",32,0,101,0 |
219 .stabs "currentLineBuffer:G(0,19)=ar(0,20)=r(0,20);0;0177777;;0;175;(0,11)",32,0,114,0 |
220 .stabs "previousLineBuffer:G(0,19)",32,0,115,0 |
221 .stabs "colorMap:G(0,21)=ar(0,20);0;47;(0,11)",32,0,100,0 |
222 .text |
223 .stabs "",100,0,0,.Letext0 |
224 .Letext0: |
225 /* File "CamInterface.c": code 49 = 0x0031 ( 47), prologues 0, epilogues 2 */ |
GAS LISTING /tmp/ccAE2QZt.s page 14 |
GAS LISTING /tmp/ccQQINeY.s page 14 |
DEFINED SYMBOLS |
*ABS*:00000000 CamInterface.c |
/tmp/ccAE2QZt.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccAE2QZt.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccAE2QZt.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccAE2QZt.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccAE2QZt.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccAE2QZt.s:89 .text:00000000 CamInt_resetCam |
/tmp/ccAE2QZt.s:106 .text:00000002 CamInt_init |
/tmp/ccAE2QZt.s:217 .noinit:00000000 colorMap |
/tmp/ccQQINeY.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccQQINeY.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccQQINeY.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccQQINeY.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccQQINeY.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccQQINeY.s:89 .text:00000000 CamInt_resetCam |
/tmp/ccQQINeY.s:106 .text:00000002 CamInt_init |
/tmp/ccQQINeY.s:217 .noinit:00000000 colorMap |
*COM*:000000b0 currentLineBuffer |
*COM*:000000b0 previousLineBuffer |
/programy/Atmel_C/AVRcam/CamInterfaceAsm.lst |
---|
1,11 → 1,11 |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 1 |
1 # 1 "CamInterfaceAsm.S" |
2 # 1 "<built-in>" |
GAS LISTING /tmp/cckBHomO.s page 1 |
1 # 1 "CamInterfaceAsm.S" |
2 # 1 "<built-in>" |
1 ; |
0 |
0 |
0 |
0 |
2 ; Copyright (C) 2004 John Orlando |
3 ; |
4 ; AVRcam: a small real-time image processing engine. |
58,480 → 58,1169 |
51 ; and is turned off when it isn't needed. |
52 |
53 #include <avr/io.h> |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 2 |
1 /* Copyright (c) 2002,2003 Marek Michalkiewicz, Joerg Wunsch |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 * Redistributions in binary form must reproduce the above copyright |
10 notice, this list of conditions and the following disclaimer in |
11 the documentation and/or other materials provided with the |
12 distribution. |
13 |
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
18 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
19 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
20 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
21 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
22 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
23 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
24 POSSIBILITY OF SUCH DAMAGE. */ |
25 |
26 /* $Id: io.h,v 1.10 2003/02/28 23:03:40 marekm Exp $ */ |
27 |
28 /** \defgroup avr_io AVR device-specific IO definitions |
29 \code #include <avr/io.h> \endcode |
30 |
31 This header file includes the apropriate IO definitions for the |
32 device that has been specified by the <tt>-mmcu=</tt> compiler |
33 command-line switch. This is done by diverting to the appropriate |
34 file <tt><avr/io</tt><em>XXXX</em><tt>.h></tt> which should |
35 never be included directly. Some register names common to all |
36 AVR devices are defined directly within <tt><avr/io.h></tt>, |
37 but most of the details come from the respective include file. |
38 |
39 Note that this file always includes |
40 \code #include <avr/sfr_defs.h> \endcode |
41 See \ref avr_sfr for the details. |
42 |
43 Included are definitions of the IO register set and their |
44 respective bit values as specified in the Atmel documentation. |
45 Note that Atmel is not very consistent in its naming conventions, |
46 so even identical functions sometimes get different names on |
47 different devices. |
48 |
49 Also included are the specific names useable for interrupt |
50 function definitions as documented |
51 \ref avr_signames "here". |
52 |
53 Finally, the following macros are defined: |
54 |
55 - \b RAMEND |
56 <br> |
57 A constant describing the last on-chip RAM location. |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 3 |
58 <br> |
59 - \b XRAMEND |
60 <br> |
61 A constant describing the last possible location in RAM. |
62 This is equal to RAMEND for devices that do not allow for |
63 external RAM. |
64 <br> |
65 - \b E2END |
66 <br> |
67 A constant describing the address of the last EEPROM cell. |
68 <br> |
69 - \b FLASHEND |
70 <br> |
71 A constant describing the last byte address in flash ROM. |
72 <br> |
73 - \b SPM_PAGESIZE |
74 <br> |
75 For devices with bootloader support, the flash pagesize |
76 (in bytes) to be used for the \c SPM instruction. */ |
77 |
78 #ifndef _AVR_IO_H_ |
79 #define _AVR_IO_H_ |
80 |
81 #include <avr/sfr_defs.h> |
1 /* Copyright (c) 2002, Marek Michalkiewicz <marekm@amelek.gda.pl> |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 * Redistributions in binary form must reproduce the above copyright |
10 notice, this list of conditions and the following disclaimer in |
11 the documentation and/or other materials provided with the |
12 distribution. |
13 |
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
18 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
19 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
20 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
21 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
22 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
23 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
24 POSSIBILITY OF SUCH DAMAGE. */ |
25 |
26 /* avr/sfr_defs.h - macros for accessing AVR special function registers */ |
27 |
28 /* $Id: sfr_defs.h,v 1.10 2003/08/11 21:42:13 troth Exp $ */ |
29 |
30 #ifndef _AVR_SFR_DEFS_H_ |
31 #define _AVR_SFR_DEFS_H_ 1 |
32 |
33 /** \defgroup avr_sfr_notes Additional notes from <avr/sfr_defs.h> |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 4 |
34 \ingroup avr_sfr |
35 |
36 The \c <avr/sfr_defs.h> file is included by all of the \c <avr/ioXXXX.h> |
37 files, which use macros defined here to make the special function register |
38 definitions look like C variables or simple constants, depending on the |
39 <tt>_SFR_ASM_COMPAT</tt> define. Some examples from \c <avr/iom128.h> to |
40 show how to define such macros: |
41 |
42 \code |
43 #define PORTA _SFR_IO8(0x1b) |
44 #define TCNT1 _SFR_IO16(0x2c) |
45 #define PORTF _SFR_MEM8(0x61) |
46 #define TCNT3 _SFR_MEM16(0x88) |
47 \endcode |
48 |
49 If \c _SFR_ASM_COMPAT is not defined, C programs can use names like |
50 <tt>PORTA</tt> directly in C expressions (also on the left side of |
51 assignment operators) and GCC will do the right thing (use short I/O |
52 instructions if possible). The \c __SFR_OFFSET definition is not used in |
53 any way in this case. |
54 |
55 Define \c _SFR_ASM_COMPAT as 1 to make these names work as simple constants |
56 (addresses of the I/O registers). This is necessary when included in |
57 preprocessed assembler (*.S) source files, so it is done automatically if |
58 \c __ASSEMBLER__ is defined. By default, all addresses are defined as if |
59 they were memory addresses (used in \c lds/sts instructions). To use these |
60 addresses in \c in/out instructions, you must subtract 0x20 from them. |
61 |
62 For more backwards compatibility, insert the following at the start of your |
63 old assembler source file: |
64 |
65 \code |
66 #define __SFR_OFFSET 0 |
67 \endcode |
68 |
69 This automatically subtracts 0x20 from I/O space addresses, but it's a |
70 hack, so it is recommended to change your source: wrap such addresses in |
71 macros defined here, as shown below. After this is done, the |
72 <tt>__SFR_OFFSET</tt> definition is no longer necessary and can be removed. |
73 |
74 Real example - this code could be used in a boot loader that is portable |
75 between devices with \c SPMCR at different addresses. |
76 |
77 \verbatim |
78 <avr/iom163.h>: #define SPMCR _SFR_IO8(0x37) |
79 <avr/iom128.h>: #define SPMCR _SFR_MEM8(0x68) |
80 \endverbatim |
81 |
82 \code |
82 |
83 /* |
84 * Registers common to all AVR devices. |
85 */ |
86 |
87 #if __AVR_ARCH__ != 1 |
88 /* |
89 * AVR architecture 1 has no RAM, thus no stack pointer. |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 5 |
90 * |
91 * All other archs do have a stack pointer. Some devices have only |
92 * less than 256 bytes of possible RAM locations (128 Bytes of SRAM |
93 * and no option for external RAM), thus SPH is officially "reserved" |
94 * for them. We catch this case below after including the |
95 * device-specific ioXXXX.h file, by examining XRAMEND, and |
96 * #undef-ining SP and SPH in that case. |
97 */ |
98 /* Stack Pointer */ |
99 #define SP _SFR_IO16(0x3D) |
100 #define SPL _SFR_IO8(0x3D) |
101 #define SPH _SFR_IO8(0x3E) |
102 #endif /* #if __AVR_ARCH__ != 1 */ |
103 |
104 /* Status REGister */ |
105 #define SREG _SFR_IO8(0x3F) |
106 |
107 /* Status Register - SREG */ |
108 #define SREG_I 7 |
109 #define SREG_T 6 |
110 #define SREG_H 5 |
111 #define SREG_S 4 |
112 #define SREG_V 3 |
113 #define SREG_N 2 |
114 #define SREG_Z 1 |
115 #define SREG_C 0 |
116 |
117 /* Pointer definition */ |
118 #if __AVR_ARCH__ != 1 |
119 /* avr1 has only the Z pointer */ |
120 #define XL r26 |
121 #define XH r27 |
122 #define YL r28 |
123 #define YH r29 |
124 #endif /* #if __AVR_ARCH__ != 1 */ |
125 #define ZL r30 |
126 #define ZH r31 |
127 |
128 /* |
129 * Only few devices come without EEPROM. In order to assemble the |
130 * EEPROM library components without defining a specific device, we |
131 * keep the EEPROM-related definitions here, and catch the devices |
132 * without EEPROM (E2END == 0) below. Obviously, the EEPROM library |
133 * functions will not work for them. ;-) |
134 */ |
135 /* EEPROM Control Register */ |
136 #define EECR _SFR_IO8(0x1C) |
137 |
138 /* EEPROM Data Register */ |
139 #define EEDR _SFR_IO8(0x1D) |
140 |
141 /* EEPROM Address Register */ |
142 #define EEAR _SFR_IO16(0x1E) |
143 #define EEARL _SFR_IO8(0x1E) |
144 #define EEARH _SFR_IO8(0x1F) |
145 |
146 /* EEPROM Control Register */ |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 6 |
147 #define EERIE 3 |
148 #define EEMWE 2 |
149 #define EEWE 1 |
150 #define EERE 0 |
151 |
152 #if defined (__AVR_AT94K__) |
153 # include <avr/ioat94k.h> |
154 #elif defined (__AVR_AT43USB320__) |
155 # include <avr/io43u32x.h> |
156 #elif defined (__AVR_AT43USB355__) |
157 # include <avr/io43u35x.h> |
158 #elif defined (__AVR_AT76C711__) |
159 # include <avr/io76c711.h> |
160 #elif defined (__AVR_AT86RF401__) |
161 # include <avr/io86r401.h> |
162 #elif defined (__AVR_ATmega128__) |
163 # include <avr/iom128.h> |
164 #elif defined (__AVR_ATmega64__) |
165 # include <avr/iom64.h> |
166 #elif defined (__AVR_ATmega103__) |
167 # include <avr/iom103.h> |
168 #elif defined (__AVR_ATmega32__) |
169 # include <avr/iom32.h> |
170 #elif defined (__AVR_ATmega323__) |
171 # include <avr/iom323.h> |
172 #elif defined (__AVR_ATmega16__) |
173 # include <avr/iom16.h> |
174 #elif defined (__AVR_ATmega161__) |
175 # include <avr/iom161.h> |
176 #elif defined (__AVR_ATmega162__) |
177 # include <avr/iom162.h> |
178 #elif defined (__AVR_ATmega163__) |
179 # include <avr/iom163.h> |
180 #elif defined (__AVR_ATmega169__) |
181 # include <avr/iom169.h> |
182 #elif defined (__AVR_ATmega8__) |
183 # include <avr/iom8.h> |
1 /* Copyright (c) 2002, Marek Michalkiewicz |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 * Redistributions in binary form must reproduce the above copyright |
10 notice, this list of conditions and the following disclaimer in |
11 the documentation and/or other materials provided with the |
12 distribution. |
13 |
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
18 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
19 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
20 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 7 |
21 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
22 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
23 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
24 POSSIBILITY OF SUCH DAMAGE. */ |
25 |
26 /* $Id: iom8.h,v 1.8 2003/02/17 09:57:28 marekm Exp $ */ |
27 |
28 /* avr/iom8.h - definitions for ATmega8 */ |
29 |
30 #ifndef _AVR_IOM8_H_ |
31 #define _AVR_IOM8_H_ 1 |
32 |
33 /* This file should only be included from <avr/io.h>, never directly. */ |
34 |
35 #ifndef _AVR_IO_H_ |
36 # error "Include <avr/io.h> instead of this file." |
37 #endif |
38 |
39 #ifndef _AVR_IOXXX_H_ |
40 # define _AVR_IOXXX_H_ "iom8.h" |
41 #else |
42 # error "Attempt to include more than one <avr/ioXXX.h> file." |
43 #endif |
44 |
45 /* I/O registers */ |
46 |
47 /* TWI stands for "Two Wire Interface" or "TWI Was I2C(tm)" */ |
48 #define TWBR _SFR_IO8(0x00) |
49 #define TWSR _SFR_IO8(0x01) |
50 #define TWAR _SFR_IO8(0x02) |
51 #define TWDR _SFR_IO8(0x03) |
52 |
53 /* ADC */ |
54 #define ADCW _SFR_IO16(0x04) |
55 #ifndef __ASSEMBLER__ |
56 #define ADC _SFR_IO16(0x04) |
57 #endif |
58 #define ADCL _SFR_IO8(0x04) |
59 #define ADCH _SFR_IO8(0x05) |
60 #define ADCSR _SFR_IO8(0x06) |
61 #define ADCSRA _SFR_IO8(0x06) /* Changed in 2486H-AVR-09/02 */ |
62 #define ADMUX _SFR_IO8(0x07) |
63 |
64 /* analog comparator */ |
65 #define ACSR _SFR_IO8(0x08) |
66 |
67 /* USART */ |
68 #define UBRRL _SFR_IO8(0x09) |
69 #define UCSRB _SFR_IO8(0x0A) |
70 #define UCSRA _SFR_IO8(0x0B) |
71 #define UDR _SFR_IO8(0x0C) |
72 |
73 /* SPI */ |
74 #define SPCR _SFR_IO8(0x0D) |
75 #define SPSR _SFR_IO8(0x0E) |
76 #define SPDR _SFR_IO8(0x0F) |
77 |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 8 |
78 /* Port D */ |
79 #define PIND _SFR_IO8(0x10) |
80 #define DDRD _SFR_IO8(0x11) |
81 #define PORTD _SFR_IO8(0x12) |
82 |
83 /* Port C */ |
84 #define PINC _SFR_IO8(0x13) |
85 #define DDRC _SFR_IO8(0x14) |
86 #define PORTC _SFR_IO8(0x15) |
87 |
88 /* Port B */ |
89 #define PINB _SFR_IO8(0x16) |
90 #define DDRB _SFR_IO8(0x17) |
91 #define PORTB _SFR_IO8(0x18) |
92 |
93 /* 0x1C..0x1F EEPROM */ |
94 |
95 #define UCSRC _SFR_IO8(0x20) |
96 #define UBRRH _SFR_IO8(0x20) |
97 |
98 #define WDTCR _SFR_IO8(0x21) |
99 #define ASSR _SFR_IO8(0x22) |
100 |
101 /* Timer 2 */ |
102 #define OCR2 _SFR_IO8(0x23) |
103 #define TCNT2 _SFR_IO8(0x24) |
104 #define TCCR2 _SFR_IO8(0x25) |
105 |
106 /* Timer 1 */ |
107 #define ICR1 _SFR_IO16(0x26) |
108 #define ICR1L _SFR_IO8(0x26) |
109 #define ICR1H _SFR_IO8(0x27) |
110 #define OCR1B _SFR_IO16(0x28) |
111 #define OCR1BL _SFR_IO8(0x28) |
112 #define OCR1BH _SFR_IO8(0x29) |
113 #define OCR1A _SFR_IO16(0x2A) |
114 #define OCR1AL _SFR_IO8(0x2A) |
115 #define OCR1AH _SFR_IO8(0x2B) |
116 #define TCNT1 _SFR_IO16(0x2C) |
117 #define TCNT1L _SFR_IO8(0x2C) |
118 #define TCNT1H _SFR_IO8(0x2D) |
119 #define TCCR1B _SFR_IO8(0x2E) |
120 #define TCCR1A _SFR_IO8(0x2F) |
121 |
122 #define SFIOR _SFR_IO8(0x30) |
123 |
124 #define OSCCAL _SFR_IO8(0x31) |
125 |
126 /* Timer 0 */ |
127 #define TCNT0 _SFR_IO8(0x32) |
128 #define TCCR0 _SFR_IO8(0x33) |
129 |
130 #define MCUCSR _SFR_IO8(0x34) |
131 #define MCUCR _SFR_IO8(0x35) |
132 |
133 #define TWCR _SFR_IO8(0x36) |
134 |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 9 |
135 #define SPMCR _SFR_IO8(0x37) |
136 |
137 #define TIFR _SFR_IO8(0x38) |
138 #define TIMSK _SFR_IO8(0x39) |
139 |
140 #define GIFR _SFR_IO8(0x3A) |
141 #define GIMSK _SFR_IO8(0x3B) |
142 #define GICR _SFR_IO8(0x3B) /* Changed in 2486H-AVR-09/02 */ |
143 |
144 /* 0x3C reserved (OCR0?) */ |
145 |
146 /* 0x3D..0x3E SP */ |
147 |
148 /* 0x3F SREG */ |
149 |
150 /* Interrupt vectors */ |
151 |
152 #define SIG_INTERRUPT0 _VECTOR(1) |
153 #define SIG_INTERRUPT1 _VECTOR(2) |
154 #define SIG_OUTPUT_COMPARE2 _VECTOR(3) |
155 #define SIG_OVERFLOW2 _VECTOR(4) |
156 #define SIG_INPUT_CAPTURE1 _VECTOR(5) |
157 #define SIG_OUTPUT_COMPARE1A _VECTOR(6) |
158 #define SIG_OUTPUT_COMPARE1B _VECTOR(7) |
159 #define SIG_OVERFLOW1 _VECTOR(8) |
160 #define SIG_OVERFLOW0 _VECTOR(9) |
161 #define SIG_SPI _VECTOR(10) |
162 #define SIG_UART_RECV _VECTOR(11) |
163 #define SIG_UART_DATA _VECTOR(12) |
164 #define SIG_UART_TRANS _VECTOR(13) |
165 #define SIG_ADC _VECTOR(14) |
166 #define SIG_EEPROM_READY _VECTOR(15) |
167 #define SIG_COMPARATOR _VECTOR(16) |
168 #define SIG_2WIRE_SERIAL _VECTOR(17) |
169 #define SIG_SPM_READY _VECTOR(18) |
170 |
171 #define _VECTORS_SIZE 38 |
172 |
173 /* Bit numbers */ |
174 |
175 /* GIMSK / GICR */ |
176 #define INT1 7 |
177 #define INT0 6 |
178 #define IVSEL 1 |
179 #define IVCE 0 |
180 |
181 /* GIFR */ |
182 #define INTF1 7 |
183 #define INTF0 6 |
184 |
184 #elif defined (__AVR_ATmega8515__) |
GAS LISTING /tmp/cckBHomO.s page 2 |
1 /* Copyright (c) 2002,2003,2005,2006, Marek Michalkiewicz, Joerg Wunsch |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 |
10 * Redistributions in binary form must reproduce the above copyright |
11 notice, this list of conditions and the following disclaimer in |
12 the documentation and/or other materials provided with the |
13 distribution. |
14 |
15 * Neither the name of the copyright holders nor the names of |
16 contributors may be used to endorse or promote products derived |
17 from this software without specific prior written permission. |
18 |
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 POSSIBILITY OF SUCH DAMAGE. */ |
30 |
31 /* $Id: io.h,v 1.24.2.7 2006/04/19 16:53:25 aesok Exp $ */ |
32 |
33 /** \defgroup avr_io <avr/io.h>: AVR device-specific IO definitions |
34 \code #include <avr/io.h> \endcode |
35 |
36 This header file includes the apropriate IO definitions for the |
37 device that has been specified by the <tt>-mmcu=</tt> compiler |
38 command-line switch. This is done by diverting to the appropriate |
39 file <tt><avr/io</tt><em>XXXX</em><tt>.h></tt> which should |
40 never be included directly. Some register names common to all |
41 AVR devices are defined directly within <tt><avr/io.h></tt>, |
42 but most of the details come from the respective include file. |
43 |
44 Note that this file always includes |
45 \code #include <avr/sfr_defs.h> \endcode |
46 See \ref avr_sfr for the details. |
47 |
48 Included are definitions of the IO register set and their |
49 respective bit values as specified in the Atmel documentation. |
50 Note that Atmel is not very consistent in its naming conventions, |
51 so even identical functions sometimes get different names on |
52 different devices. |
53 |
54 Also included are the specific names useable for interrupt |
55 function definitions as documented |
56 \ref avr_signames "here". |
57 |
GAS LISTING /tmp/cckBHomO.s page 3 |
58 Finally, the following macros are defined: |
59 |
60 - \b RAMEND |
61 <br> |
62 A constant describing the last on-chip RAM location. |
63 <br> |
64 - \b XRAMEND |
65 <br> |
66 A constant describing the last possible location in RAM. |
67 This is equal to RAMEND for devices that do not allow for |
68 external RAM. |
69 <br> |
70 - \b E2END |
71 <br> |
72 A constant describing the address of the last EEPROM cell. |
73 <br> |
74 - \b FLASHEND |
75 <br> |
76 A constant describing the last byte address in flash ROM. |
77 <br> |
78 - \b SPM_PAGESIZE |
79 <br> |
80 For devices with bootloader support, the flash pagesize |
81 (in bytes) to be used for the \c SPM instruction. */ |
82 |
83 #ifndef _AVR_IO_H_ |
84 #define _AVR_IO_H_ |
85 |
86 #include <avr/sfr_defs.h> |
1 /* Copyright (c) 2002, Marek Michalkiewicz <marekm@amelek.gda.pl> |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 |
10 * Redistributions in binary form must reproduce the above copyright |
11 notice, this list of conditions and the following disclaimer in |
12 the documentation and/or other materials provided with the |
13 distribution. |
14 |
15 * Neither the name of the copyright holders nor the names of |
16 contributors may be used to endorse or promote products derived |
17 from this software without specific prior written permission. |
18 |
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
GAS LISTING /tmp/cckBHomO.s page 4 |
29 POSSIBILITY OF SUCH DAMAGE. */ |
30 |
31 /* avr/sfr_defs.h - macros for accessing AVR special function registers */ |
32 |
33 /* $Id: sfr_defs.h,v 1.16 2005/09/10 21:31:13 joerg_wunsch Exp $ */ |
34 |
35 #ifndef _AVR_SFR_DEFS_H_ |
36 #define _AVR_SFR_DEFS_H_ 1 |
37 |
38 /** \defgroup avr_sfr_notes Additional notes from <avr/sfr_defs.h> |
39 \ingroup avr_sfr |
40 |
41 The \c <avr/sfr_defs.h> file is included by all of the \c <avr/ioXXXX.h> |
42 files, which use macros defined here to make the special function register |
43 definitions look like C variables or simple constants, depending on the |
44 <tt>_SFR_ASM_COMPAT</tt> define. Some examples from \c <avr/iom128.h> to |
45 show how to define such macros: |
46 |
47 \code |
48 #define PORTA _SFR_IO8(0x1b) |
49 #define TCNT1 _SFR_IO16(0x2c) |
50 #define PORTF _SFR_MEM8(0x61) |
51 #define TCNT3 _SFR_MEM16(0x88) |
52 \endcode |
53 |
54 If \c _SFR_ASM_COMPAT is not defined, C programs can use names like |
55 <tt>PORTA</tt> directly in C expressions (also on the left side of |
56 assignment operators) and GCC will do the right thing (use short I/O |
57 instructions if possible). The \c __SFR_OFFSET definition is not used in |
58 any way in this case. |
59 |
60 Define \c _SFR_ASM_COMPAT as 1 to make these names work as simple constants |
61 (addresses of the I/O registers). This is necessary when included in |
62 preprocessed assembler (*.S) source files, so it is done automatically if |
63 \c __ASSEMBLER__ is defined. By default, all addresses are defined as if |
64 they were memory addresses (used in \c lds/sts instructions). To use these |
65 addresses in \c in/out instructions, you must subtract 0x20 from them. |
66 |
67 For more backwards compatibility, insert the following at the start of your |
68 old assembler source file: |
69 |
70 \code |
71 #define __SFR_OFFSET 0 |
72 \endcode |
73 |
74 This automatically subtracts 0x20 from I/O space addresses, but it's a |
75 hack, so it is recommended to change your source: wrap such addresses in |
76 macros defined here, as shown below. After this is done, the |
77 <tt>__SFR_OFFSET</tt> definition is no longer necessary and can be removed. |
78 |
79 Real example - this code could be used in a boot loader that is portable |
80 between devices with \c SPMCR at different addresses. |
81 |
82 \verbatim |
83 <avr/iom163.h>: #define SPMCR _SFR_IO8(0x37) |
84 <avr/iom128.h>: #define SPMCR _SFR_MEM8(0x68) |
85 \endverbatim |
GAS LISTING /tmp/cckBHomO.s page 5 |
86 |
87 \code |
87 |
88 #ifndef __AVR_HAVE_MOVW__ |
89 # if defined(__AVR_ENHANCED__) && __AVR_ENHANCED__ |
90 # define __AVR_HAVE_MOVW__ 1 |
91 # endif |
92 #endif |
93 |
94 #ifndef __AVR_HAVE_LPMX__ |
95 # if defined(__AVR_ENHANCED__) && __AVR_ENHANCED__ |
96 # define __AVR_HAVE_LPMX__ 1 |
97 # endif |
98 #endif |
99 |
100 /* |
101 * Registers common to all AVR devices. |
102 */ |
103 |
104 #if __AVR_ARCH__ != 1 |
105 /* |
106 * AVR architecture 1 has no RAM, thus no stack pointer. |
107 * |
108 * All other archs do have a stack pointer. Some devices have only |
109 * less than 256 bytes of possible RAM locations (128 Bytes of SRAM |
110 * and no option for external RAM), thus SPH is officially "reserved" |
111 * for them. We catch this case below after including the |
112 * device-specific ioXXXX.h file, by examining XRAMEND, and |
113 * #undef-ining SP and SPH in that case. |
114 */ |
115 /* Stack Pointer */ |
116 #define SP _SFR_IO16(0x3D) |
117 #define SPL _SFR_IO8(0x3D) |
118 #define SPH _SFR_IO8(0x3E) |
119 #endif /* #if __AVR_ARCH__ != 1 */ |
120 |
121 /* Status REGister */ |
122 #define SREG _SFR_IO8(0x3F) |
123 |
124 /* Status Register - SREG */ |
125 #define SREG_I 7 |
126 #define SREG_T 6 |
127 #define SREG_H 5 |
128 #define SREG_S 4 |
129 #define SREG_V 3 |
130 #define SREG_N 2 |
131 #define SREG_Z 1 |
132 #define SREG_C 0 |
133 |
134 /* Pointer definition */ |
135 #if __AVR_ARCH__ != 1 |
136 /* avr1 has only the Z pointer */ |
137 #define XL r26 |
138 #define XH r27 |
139 #define YL r28 |
140 #define YH r29 |
141 #endif /* #if __AVR_ARCH__ != 1 */ |
GAS LISTING /tmp/cckBHomO.s page 6 |
142 #define ZL r30 |
143 #define ZH r31 |
144 |
145 /* |
146 * Only few devices come without EEPROM. In order to assemble the |
147 * EEPROM library components without defining a specific device, we |
148 * keep the EEPROM-related definitions here. |
149 */ |
150 #if defined(__COMPILING_AVR_LIBC__) |
151 |
152 /* EEPROM Control Register */ |
153 #define EECR _SFR_IO8(0x1C) |
154 |
155 /* EEPROM Data Register */ |
156 #define EEDR _SFR_IO8(0x1D) |
157 |
158 /* EEPROM Address Register */ |
159 #define EEAR _SFR_IO16(0x1E) |
160 #define EEARL _SFR_IO8(0x1E) |
161 #define EEARH _SFR_IO8(0x1F) |
162 |
163 /* EEPROM Control Register */ |
164 #define EERIE 3 |
165 #define EEMWE 2 |
166 #define EEWE 1 |
167 #define EERE 0 |
168 |
169 #endif /* __COMPILING_AVR_LIBC__ */ |
170 |
171 #if defined (__AVR_AT94K__) |
172 # include <avr/ioat94k.h> |
173 #elif defined (__AVR_AT43USB320__) |
174 # include <avr/io43u32x.h> |
175 #elif defined (__AVR_AT43USB355__) |
176 # include <avr/io43u35x.h> |
177 #elif defined (__AVR_AT76C711__) |
178 # include <avr/io76c711.h> |
179 #elif defined (__AVR_AT86RF401__) |
180 # include <avr/io86r401.h> |
181 #elif defined (__AVR_AT90PWM2__) |
182 # include <avr/io90pwmx.h> |
183 #elif defined (__AVR_AT90PWM3__) |
184 # include <avr/io90pwmx.h> |
185 #elif defined (__AVR_ATmega128__) |
186 # include <avr/iom128.h> |
187 #elif defined (__AVR_ATmega1280__) |
188 # include <avr/iom1280.h> |
189 #elif defined (__AVR_ATmega1281__) |
190 # include <avr/iom1281.h> |
191 #elif defined (__AVR_AT90CAN32__) |
192 # include <avr/iocan32.h> |
193 #elif defined (__AVR_AT90CAN64__) |
194 # include <avr/iocan64.h> |
195 #elif defined (__AVR_AT90CAN128__) |
196 # include <avr/iocan128.h> |
197 #elif defined (__AVR_AT90USB646__) |
198 # include <avr/iousb646.h> |
GAS LISTING /tmp/cckBHomO.s page 7 |
199 #elif defined (__AVR_AT90USB647__) |
200 # include <avr/iousb647.h> |
201 #elif defined (__AVR_AT90USB1286__) |
202 # include <avr/iousb1286.h> |
203 #elif defined (__AVR_AT90USB1287__) |
204 # include <avr/iousb1287.h> |
205 #elif defined (__AVR_ATmega64__) |
206 # include <avr/iom64.h> |
207 #elif defined (__AVR_ATmega640__) |
208 # include <avr/iom640.h> |
209 #elif defined (__AVR_ATmega644__) |
210 # include <avr/iom644.h> |
211 #elif defined (__AVR_ATmega644P__) |
212 # include <avr/iom644.h> |
213 #elif defined (__AVR_ATmega645__) |
214 # include <avr/iom645.h> |
215 #elif defined (__AVR_ATmega6450__) |
216 # include <avr/iom6450.h> |
217 #elif defined (__AVR_ATmega649__) |
218 # include <avr/iom649.h> |
219 #elif defined (__AVR_ATmega6490__) |
220 # include <avr/iom6490.h> |
221 #elif defined (__AVR_ATmega103__) |
222 # include <avr/iom103.h> |
223 #elif defined (__AVR_ATmega32__) |
224 # include <avr/iom32.h> |
225 #elif defined (__AVR_ATmega323__) |
226 # include <avr/iom323.h> |
227 #elif defined (__AVR_ATmega324P__) |
228 # include <avr/iom324.h> |
229 #elif defined (__AVR_ATmega325__) |
230 # include <avr/iom325.h> |
231 #elif defined (__AVR_ATmega3250__) |
232 # include <avr/iom3250.h> |
233 #elif defined (__AVR_ATmega329__) |
234 # include <avr/iom329.h> |
235 #elif defined (__AVR_ATmega3290__) |
236 # include <avr/iom3290.h> |
237 #elif defined (__AVR_ATmega406__) |
238 # include <avr/iom406.h> |
239 #elif defined (__AVR_ATmega16__) |
240 # include <avr/iom16.h> |
241 #elif defined (__AVR_ATmega161__) |
242 # include <avr/iom161.h> |
243 #elif defined (__AVR_ATmega162__) |
244 # include <avr/iom162.h> |
245 #elif defined (__AVR_ATmega163__) |
246 # include <avr/iom163.h> |
247 #elif defined (__AVR_ATmega164P__) |
248 # include <avr/iom164.h> |
249 #elif defined (__AVR_ATmega165__) |
250 # include <avr/iom165.h> |
251 #elif defined (__AVR_ATmega168__) |
252 # include <avr/iom168.h> |
253 #elif defined (__AVR_ATmega169__) |
254 # include <avr/iom169.h> |
255 #elif defined (__AVR_ATmega8__) |
GAS LISTING /tmp/cckBHomO.s page 8 |
256 # include <avr/iom8.h> |
1 /* Copyright (c) 2002, Marek Michalkiewicz |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 |
10 * Redistributions in binary form must reproduce the above copyright |
11 notice, this list of conditions and the following disclaimer in |
12 the documentation and/or other materials provided with the |
13 distribution. |
14 |
15 * Neither the name of the copyright holders nor the names of |
16 contributors may be used to endorse or promote products derived |
17 from this software without specific prior written permission. |
18 |
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 POSSIBILITY OF SUCH DAMAGE. */ |
30 |
31 /* $Id: iom8.h,v 1.13 2005/10/30 22:11:23 joerg_wunsch Exp $ */ |
32 |
33 /* avr/iom8.h - definitions for ATmega8 */ |
34 |
35 #ifndef _AVR_IOM8_H_ |
36 #define _AVR_IOM8_H_ 1 |
37 |
38 /* This file should only be included from <avr/io.h>, never directly. */ |
39 |
40 #ifndef _AVR_IO_H_ |
41 # error "Include <avr/io.h> instead of this file." |
42 #endif |
43 |
44 #ifndef _AVR_IOXXX_H_ |
45 # define _AVR_IOXXX_H_ "iom8.h" |
46 #else |
47 # error "Attempt to include more than one <avr/ioXXX.h> file." |
48 #endif |
49 |
50 /* I/O registers */ |
51 |
52 /* TWI stands for "Two Wire Interface" or "TWI Was I2C(tm)" */ |
53 #define TWBR _SFR_IO8(0x00) |
54 #define TWSR _SFR_IO8(0x01) |
55 #define TWAR _SFR_IO8(0x02) |
56 #define TWDR _SFR_IO8(0x03) |
GAS LISTING /tmp/cckBHomO.s page 9 |
57 |
58 /* ADC */ |
59 #define ADCW _SFR_IO16(0x04) |
60 #ifndef __ASSEMBLER__ |
61 #define ADC _SFR_IO16(0x04) |
62 #endif |
63 #define ADCL _SFR_IO8(0x04) |
64 #define ADCH _SFR_IO8(0x05) |
65 #define ADCSR _SFR_IO8(0x06) |
66 #define ADCSRA _SFR_IO8(0x06) /* Changed in 2486H-AVR-09/02 */ |
67 #define ADMUX _SFR_IO8(0x07) |
68 |
69 /* analog comparator */ |
70 #define ACSR _SFR_IO8(0x08) |
71 |
72 /* USART */ |
73 #define UBRRL _SFR_IO8(0x09) |
74 #define UCSRB _SFR_IO8(0x0A) |
75 #define UCSRA _SFR_IO8(0x0B) |
76 #define UDR _SFR_IO8(0x0C) |
77 |
78 /* SPI */ |
79 #define SPCR _SFR_IO8(0x0D) |
80 #define SPSR _SFR_IO8(0x0E) |
81 #define SPDR _SFR_IO8(0x0F) |
82 |
83 /* Port D */ |
84 #define PIND _SFR_IO8(0x10) |
85 #define DDRD _SFR_IO8(0x11) |
86 #define PORTD _SFR_IO8(0x12) |
87 |
88 /* Port C */ |
89 #define PINC _SFR_IO8(0x13) |
90 #define DDRC _SFR_IO8(0x14) |
91 #define PORTC _SFR_IO8(0x15) |
92 |
93 /* Port B */ |
94 #define PINB _SFR_IO8(0x16) |
95 #define DDRB _SFR_IO8(0x17) |
96 #define PORTB _SFR_IO8(0x18) |
97 |
98 /* EEPROM Control Register */ |
99 #define EECR _SFR_IO8(0x1C) |
100 |
101 /* EEPROM Data Register */ |
102 #define EEDR _SFR_IO8(0x1D) |
103 |
104 /* EEPROM Address Register */ |
105 #define EEAR _SFR_IO16(0x1E) |
106 #define EEARL _SFR_IO8(0x1E) |
107 #define EEARH _SFR_IO8(0x1F) |
108 |
109 #define UCSRC _SFR_IO8(0x20) |
110 #define UBRRH _SFR_IO8(0x20) |
111 |
112 #define WDTCR _SFR_IO8(0x21) |
113 #define ASSR _SFR_IO8(0x22) |
GAS LISTING /tmp/cckBHomO.s page 10 |
114 |
115 /* Timer 2 */ |
116 #define OCR2 _SFR_IO8(0x23) |
117 #define TCNT2 _SFR_IO8(0x24) |
118 #define TCCR2 _SFR_IO8(0x25) |
119 |
120 /* Timer 1 */ |
121 #define ICR1 _SFR_IO16(0x26) |
122 #define ICR1L _SFR_IO8(0x26) |
123 #define ICR1H _SFR_IO8(0x27) |
124 #define OCR1B _SFR_IO16(0x28) |
125 #define OCR1BL _SFR_IO8(0x28) |
126 #define OCR1BH _SFR_IO8(0x29) |
127 #define OCR1A _SFR_IO16(0x2A) |
128 #define OCR1AL _SFR_IO8(0x2A) |
129 #define OCR1AH _SFR_IO8(0x2B) |
130 #define TCNT1 _SFR_IO16(0x2C) |
131 #define TCNT1L _SFR_IO8(0x2C) |
132 #define TCNT1H _SFR_IO8(0x2D) |
133 #define TCCR1B _SFR_IO8(0x2E) |
134 #define TCCR1A _SFR_IO8(0x2F) |
135 |
136 #define SFIOR _SFR_IO8(0x30) |
137 |
138 #define OSCCAL _SFR_IO8(0x31) |
139 |
140 /* Timer 0 */ |
141 #define TCNT0 _SFR_IO8(0x32) |
142 #define TCCR0 _SFR_IO8(0x33) |
143 |
144 #define MCUCSR _SFR_IO8(0x34) |
145 #define MCUCR _SFR_IO8(0x35) |
146 |
147 #define TWCR _SFR_IO8(0x36) |
148 |
149 #define SPMCR _SFR_IO8(0x37) |
150 |
151 #define TIFR _SFR_IO8(0x38) |
152 #define TIMSK _SFR_IO8(0x39) |
153 |
154 #define GIFR _SFR_IO8(0x3A) |
155 #define GIMSK _SFR_IO8(0x3B) |
156 #define GICR _SFR_IO8(0x3B) /* Changed in 2486H-AVR-09/02 */ |
157 |
158 /* 0x3C reserved (OCR0?) */ |
159 |
160 /* 0x3D..0x3E SP */ |
161 |
162 /* 0x3F SREG */ |
163 |
164 /* Interrupt vectors */ |
165 |
166 /* External Interrupt Request 0 */ |
167 #define INT0_vect _VECTOR(1) |
168 #define SIG_INTERRUPT0 _VECTOR(1) |
169 |
170 /* External Interrupt Request 1 */ |
GAS LISTING /tmp/cckBHomO.s page 11 |
171 #define INT1_vect _VECTOR(2) |
172 #define SIG_INTERRUPT1 _VECTOR(2) |
173 |
174 /* Timer/Counter2 Compare Match */ |
175 #define TIMER2_COMP_vect _VECTOR(3) |
176 #define SIG_OUTPUT_COMPARE2 _VECTOR(3) |
177 |
178 /* Timer/Counter2 Overflow */ |
179 #define TIMER2_OVF_vect _VECTOR(4) |
180 #define SIG_OVERFLOW2 _VECTOR(4) |
181 |
182 /* Timer/Counter1 Capture Event */ |
183 #define TIMER1_CAPT_vect _VECTOR(5) |
184 #define SIG_INPUT_CAPTURE1 _VECTOR(5) |
185 |
186 /* Timer/Counter1 Compare Match A */ |
187 #define TIMER1_COMPA_vect _VECTOR(6) |
188 #define SIG_OUTPUT_COMPARE1A _VECTOR(6) |
189 |
190 /* Timer/Counter1 Compare Match B */ |
191 #define TIMER1_COMPB_vect _VECTOR(7) |
192 #define SIG_OUTPUT_COMPARE1B _VECTOR(7) |
193 |
194 /* Timer/Counter1 Overflow */ |
195 #define TIMER1_OVF_vect _VECTOR(8) |
196 #define SIG_OVERFLOW1 _VECTOR(8) |
197 |
198 /* Timer/Counter0 Overflow */ |
199 #define TIMER0_OVF_vect _VECTOR(9) |
200 #define SIG_OVERFLOW0 _VECTOR(9) |
201 |
202 /* Serial Transfer Complete */ |
203 #define SPI_STC_vect _VECTOR(10) |
204 #define SIG_SPI _VECTOR(10) |
205 |
206 /* USART, Rx Complete */ |
207 #define USART_RXC_vect _VECTOR(11) |
208 #define SIG_UART_RECV _VECTOR(11) |
209 |
210 /* USART Data Register Empty */ |
211 #define USART_UDRE_vect _VECTOR(12) |
212 #define SIG_UART_DATA _VECTOR(12) |
213 |
214 /* USART, Tx Complete */ |
215 #define USART_TXC_vect _VECTOR(13) |
216 #define SIG_UART_TRANS _VECTOR(13) |
217 |
218 /* ADC Conversion Complete */ |
219 #define ADC_vect _VECTOR(14) |
220 #define SIG_ADC _VECTOR(14) |
221 |
222 /* EEPROM Ready */ |
223 #define EE_RDY_vect _VECTOR(15) |
224 #define SIG_EEPROM_READY _VECTOR(15) |
225 |
226 /* Analog Comparator */ |
227 #define ANA_COMP_vect _VECTOR(16) |
GAS LISTING /tmp/cckBHomO.s page 12 |
228 #define SIG_COMPARATOR _VECTOR(16) |
229 |
230 /* 2-wire Serial Interface */ |
231 #define TWI_vect _VECTOR(17) |
232 #define SIG_2WIRE_SERIAL _VECTOR(17) |
233 |
234 /* Store Program Memory Ready */ |
235 #define SPM_RDY_vect _VECTOR(18) |
236 #define SIG_SPM_READY _VECTOR(18) |
237 |
238 #define _VECTORS_SIZE 38 |
239 |
240 /* Bit numbers */ |
241 |
242 /* GIMSK / GICR */ |
243 #define INT1 7 |
244 #define INT0 6 |
245 #define IVSEL 1 |
246 #define IVCE 0 |
247 |
248 /* GIFR */ |
249 #define INTF1 7 |
250 #define INTF0 6 |
251 |
252 /* TIMSK */ |
253 #define OCIE2 7 |
254 #define TOIE2 6 |
255 #define TICIE1 5 |
256 #define OCIE1A 4 |
257 #define OCIE1B 3 |
257 #elif defined (__AVR_ATmega48__) |
258 # include <avr/iom48.h> |
259 #elif defined (__AVR_ATmega88__) |
260 # include <avr/iom88.h> |
261 #elif defined (__AVR_ATmega8515__) |
262 # include <avr/iom8515.h> |
263 #elif defined (__AVR_ATmega8535__) |
264 # include <avr/iom8535.h> |
265 #elif defined (__AVR_AT90S8535__) |
266 # include <avr/io8535.h> |
267 #elif defined (__AVR_AT90C8534__) |
268 # include <avr/io8534.h> |
269 #elif defined (__AVR_AT90S8515__) |
270 # include <avr/io8515.h> |
271 #elif defined (__AVR_AT90S4434__) |
272 # include <avr/io4434.h> |
273 #elif defined (__AVR_AT90S4433__) |
274 # include <avr/io4433.h> |
275 #elif defined (__AVR_AT90S4414__) |
276 # include <avr/io4414.h> |
277 #elif defined (__AVR_ATtiny22__) |
278 # include <avr/iotn22.h> |
279 #elif defined (__AVR_ATtiny26__) |
280 # include <avr/iotn26.h> |
281 #elif defined (__AVR_AT90S2343__) |
282 # include <avr/io2343.h> |
283 #elif defined (__AVR_AT90S2333__) |
GAS LISTING /tmp/cckBHomO.s page 13 |
284 # include <avr/io2333.h> |
285 #elif defined (__AVR_AT90S2323__) |
286 # include <avr/io2323.h> |
287 #elif defined (__AVR_AT90S2313__) |
288 # include <avr/io2313.h> |
289 #elif defined (__AVR_ATtiny2313__) |
290 # include <avr/iotn2313.h> |
291 #elif defined (__AVR_ATtiny13__) |
292 # include <avr/iotn13.h> |
293 #elif defined (__AVR_ATtiny25__) |
294 # include <avr/iotn25.h> |
295 #elif defined (__AVR_ATtiny45__) |
296 # include <avr/iotn45.h> |
297 #elif defined (__AVR_ATtiny85__) |
298 # include <avr/iotn85.h> |
299 #elif defined (__AVR_ATtiny24__) |
300 # include <avr/iotn24.h> |
301 #elif defined (__AVR_ATtiny44__) |
302 # include <avr/iotn44.h> |
303 #elif defined (__AVR_ATtiny84__) |
304 # include <avr/iotn84.h> |
305 #elif defined (__AVR_ATtiny261__) |
306 # include <avr/iotn261.h> |
307 #elif defined (__AVR_ATtiny461__) |
308 # include <avr/iotn461.h> |
309 #elif defined (__AVR_ATtiny861__) |
310 # include <avr/iotn861.h> |
311 /* avr1: the following only supported for assembler programs */ |
312 #elif defined (__AVR_ATtiny28__) |
313 # include <avr/iotn28.h> |
314 #elif defined (__AVR_AT90S1200__) |
315 # include <avr/io1200.h> |
316 #elif defined (__AVR_ATtiny15__) |
317 # include <avr/iotn15.h> |
318 #elif defined (__AVR_ATtiny12__) |
319 # include <avr/iotn12.h> |
320 #elif defined (__AVR_ATtiny11__) |
321 # include <avr/iotn11.h> |
322 #else |
323 # if !defined(__COMPILING_AVR_LIBC__) |
324 # warning "device type not defined" |
325 # endif |
326 #endif |
327 |
328 #include <avr/portpins.h> |
1 /* Copyright (c) 2003 Theodore A. Roth |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 |
10 * Redistributions in binary form must reproduce the above copyright |
11 notice, this list of conditions and the following disclaimer in |
12 the documentation and/or other materials provided with the |
GAS LISTING /tmp/cckBHomO.s page 14 |
13 distribution. |
14 |
15 * Neither the name of the copyright holders nor the names of |
16 contributors may be used to endorse or promote products derived |
17 from this software without specific prior written permission. |
18 |
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 POSSIBILITY OF SUCH DAMAGE. */ |
30 |
31 /* $Id: portpins.h,v 1.3.4.1 2006/03/10 16:22:38 aesok Exp $ */ |
32 |
33 #ifndef _AVR_PORTPINS_H_ |
34 #define _AVR_PORTPINS_H_ 1 |
35 |
36 /* This file should only be included from <avr/io.h>, never directly. */ |
37 |
38 #ifndef _AVR_IO_H_ |
39 # error "Include <avr/io.h> instead of this file." |
40 #endif |
41 |
42 /* Define Generic PORTn, DDn, and PINn values. */ |
43 |
44 /* Port Data Register (generic) */ |
45 #define PORT7 7 |
46 #define PORT6 6 |
47 #define PORT5 5 |
48 #define PORT4 4 |
49 #define PORT3 3 |
50 #define PORT2 2 |
51 #define PORT1 1 |
52 #define PORT0 0 |
53 |
54 /* Port Data Direction Register (generic) */ |
55 #define DD7 7 |
56 #define DD6 6 |
57 #define DD5 5 |
58 #define DD4 4 |
59 #define DD3 3 |
60 #define DD2 2 |
61 #define DD1 1 |
62 #define DD0 0 |
63 |
64 /* Port Input Pins (generic) */ |
65 #define PIN7 7 |
66 #define PIN6 6 |
67 #define PIN5 5 |
68 #define PIN4 4 |
69 #define PIN3 3 |
GAS LISTING /tmp/cckBHomO.s page 15 |
70 #define PIN2 2 |
71 #define PIN1 1 |
72 #define PIN0 0 |
73 |
74 /* Define PORTxn values for all possible port pins. */ |
75 |
76 /* PORT A */ |
77 |
78 #if defined(PA0) |
79 # define PORTA0 PA0 |
80 #endif |
81 #if defined(PA1) |
82 # define PORTA1 PA1 |
83 #endif |
84 #if defined(PA2) |
85 # define PORTA2 PA2 |
86 #endif |
87 #if defined(PA3) |
88 # define PORTA3 PA3 |
89 #endif |
90 #if defined(PA4) |
91 # define PORTA4 PA4 |
92 #endif |
93 #if defined(PA5) |
94 # define PORTA5 PA5 |
95 #endif |
96 #if defined(PA6) |
97 # define PORTA6 PA6 |
98 #endif |
99 #if defined(PA7) |
100 # define PORTA7 PA7 |
101 #endif |
102 |
103 /* PORT B */ |
104 |
105 #if defined(PB0) |
106 # define PORTB0 PB0 |
107 #endif |
108 #if defined(PB1) |
109 # define PORTB1 PB1 |
110 #endif |
111 #if defined(PB2) |
112 # define PORTB2 PB2 |
113 #endif |
114 #if defined(PB3) |
115 # define PORTB3 PB3 |
116 #endif |
117 #if defined(PB4) |
118 # define PORTB4 PB4 |
119 #endif |
120 #if defined(PB5) |
121 # define PORTB5 PB5 |
122 #endif |
123 #if defined(PB6) |
124 # define PORTB6 PB6 |
125 #endif |
126 #if defined(PB7) |
GAS LISTING /tmp/cckBHomO.s page 16 |
127 # define PORTB7 PB7 |
128 #endif |
129 |
130 /* PORT C */ |
131 |
132 #if defined(PC0) |
133 # define PORTC0 PC0 |
134 #endif |
135 #if defined(PC1) |
136 # define PORTC1 PC1 |
137 #endif |
138 #if defined(PC2) |
139 # define PORTC2 PC2 |
140 #endif |
141 #if defined(PC3) |
142 # define PORTC3 PC3 |
143 #endif |
144 #if defined(PC4) |
145 # define PORTC4 PC4 |
146 #endif |
147 #if defined(PC5) |
148 # define PORTC5 PC5 |
149 #endif |
150 #if defined(PC6) |
151 # define PORTC6 PC6 |
152 #endif |
153 #if defined(PC7) |
154 # define PORTC7 PC7 |
155 #endif |
156 |
157 /* PORT D */ |
158 |
159 #if defined(PD0) |
160 # define PORTD0 PD0 |
161 #endif |
162 #if defined(PD1) |
163 # define PORTD1 PD1 |
164 #endif |
165 #if defined(PD2) |
166 # define PORTD2 PD2 |
167 #endif |
168 #if defined(PD3) |
169 # define PORTD3 PD3 |
170 #endif |
171 #if defined(PD4) |
172 # define PORTD4 PD4 |
173 #endif |
174 #if defined(PD5) |
175 # define PORTD5 PD5 |
176 #endif |
177 #if defined(PD6) |
178 # define PORTD6 PD6 |
179 #endif |
180 #if defined(PD7) |
181 # define PORTD7 PD7 |
182 #endif |
183 |
GAS LISTING /tmp/cckBHomO.s page 17 |
184 /* PORT E */ |
185 |
186 #if defined(PE0) |
187 # define PORTE0 PE0 |
188 #endif |
189 #if defined(PE1) |
190 # define PORTE1 PE1 |
191 #endif |
192 #if defined(PE2) |
193 # define PORTE2 PE2 |
194 #endif |
195 #if defined(PE3) |
196 # define PORTE3 PE3 |
197 #endif |
198 #if defined(PE4) |
199 # define PORTE4 PE4 |
200 #endif |
201 #if defined(PE5) |
202 # define PORTE5 PE5 |
203 #endif |
204 #if defined(PE6) |
205 # define PORTE6 PE6 |
206 #endif |
207 #if defined(PE7) |
208 # define PORTE7 PE7 |
209 #endif |
210 |
211 /* PORT F */ |
212 |
213 #if defined(PF0) |
214 # define PORTF0 PF0 |
215 #endif |
216 #if defined(PF1) |
217 # define PORTF1 PF1 |
218 #endif |
219 #if defined(PF2) |
220 # define PORTF2 PF2 |
221 #endif |
222 #if defined(PF3) |
223 # define PORTF3 PF3 |
224 #endif |
225 #if defined(PF4) |
226 # define PORTF4 PF4 |
227 #endif |
228 #if defined(PF5) |
229 # define PORTF5 PF5 |
230 #endif |
231 #if defined(PF6) |
232 # define PORTF6 PF6 |
233 #endif |
234 #if defined(PF7) |
235 # define PORTF7 PF7 |
236 #endif |
237 |
238 /* PORT G */ |
239 |
240 #if defined(PG0) |
GAS LISTING /tmp/cckBHomO.s page 18 |
241 # define PORTG0 PG0 |
242 #endif |
243 #if defined(PG1) |
244 # define PORTG1 PG1 |
245 #endif |
246 #if defined(PG2) |
247 # define PORTG2 PG2 |
248 #endif |
249 #if defined(PG3) |
250 # define PORTG3 PG3 |
251 #endif |
252 #if defined(PG4) |
253 # define PORTG4 PG4 |
254 #endif |
255 #if defined(PG5) |
256 # define PORTG5 PG5 |
257 #endif |
258 #if defined(PG6) |
259 # define PORTG6 PG6 |
260 #endif |
261 #if defined(PG7) |
262 # define PORTG7 PG7 |
263 #endif |
264 |
265 /* PORT H */ |
266 |
267 #if defined(PH0) |
268 # define PORTH0 PH0 |
269 #endif |
270 #if defined(PH1) |
271 # define PORTH1 PH1 |
272 #endif |
273 #if defined(PH2) |
274 # define PORTH2 PH2 |
275 #endif |
276 #if defined(PH3) |
277 # define PORTH3 PH3 |
278 #endif |
279 #if defined(PH4) |
280 # define PORTH4 PH4 |
281 #endif |
282 #if defined(PH5) |
283 # define PORTH5 PH5 |
284 #endif |
285 #if defined(PH6) |
286 # define PORTH6 PH6 |
287 #endif |
288 #if defined(PH7) |
289 # define PORTH7 PH7 |
290 #endif |
291 |
292 /* PORT J */ |
293 |
294 #if defined(PJ0) |
295 # define PORTJ0 PJ0 |
296 #endif |
297 #if defined(PJ1) |
GAS LISTING /tmp/cckBHomO.s page 19 |
298 # define PORTJ1 PJ1 |
299 #endif |
300 #if defined(PJ2) |
301 # define PORTJ2 PJ2 |
302 #endif |
303 #if defined(PJ3) |
304 # define PORTJ3 PJ3 |
305 #endif |
306 #if defined(PJ4) |
307 # define PORTJ4 PJ4 |
308 #endif |
309 #if defined(PJ5) |
310 # define PORTJ5 PJ5 |
311 #endif |
312 #if defined(PJ6) |
313 # define PORTJ6 PJ6 |
314 #endif |
315 #if defined(PJ7) |
316 # define PORTJ7 PJ7 |
317 #endif |
318 |
319 /* PORT K */ |
320 |
321 #if defined(PK0) |
322 # define PORTK0 PK0 |
323 #endif |
324 #if defined(PK1) |
325 # define PORTK1 PK1 |
326 #endif |
327 #if defined(PK2) |
328 # define PORTK2 PK2 |
329 #endif |
329 |
330 #if __AVR_ARCH__ != 1 |
331 # if XRAMEND < 0x100 && !defined(__COMPILING_AVR_LIBC__) |
332 # undef SP |
333 # define SP _SFR_IO8(0x3D) |
334 # undef SPH |
335 # endif |
336 #endif |
337 |
338 #include <avr/version.h> |
1 /* Copyright (c) 2005, Joerg Wunsch -*- c -*- |
2 All rights reserved. |
3 |
4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions are met: |
6 |
7 * Redistributions of source code must retain the above copyright |
8 notice, this list of conditions and the following disclaimer. |
9 |
10 * Redistributions in binary form must reproduce the above copyright |
11 notice, this list of conditions and the following disclaimer in |
12 the documentation and/or other materials provided with the |
13 distribution. |
14 |
15 * Neither the name of the copyright holders nor the names of |
GAS LISTING /tmp/cckBHomO.s page 20 |
16 contributors may be used to endorse or promote products derived |
17 from this software without specific prior written permission. |
18 |
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 POSSIBILITY OF SUCH DAMAGE. */ |
30 |
31 /* $Id: version.h.in,v 1.1 2005/09/12 20:18:12 joerg_wunsch Exp $ */ |
32 |
33 /** \defgroup avr_version <avr/version.h>: avr-libc version macros |
34 \code #include <avr/version.h> \endcode |
35 |
36 This header file defines macros that contain version numbers and |
37 strings describing the current version of avr-libc. |
38 |
39 The version number itself basically consists of three pieces that |
40 are separated by a dot: the major number, the minor number, and |
41 the revision number. For development versions (which use an odd |
42 minor number), the string representation additionally gets the |
43 date code (YYYYMMDD) appended. |
44 |
45 This file will also be included by \c <avr/io.h>. That way, |
46 portable tests can be implemented using \c <avr/io.h> that can be |
47 used in code that wants to remain backwards-compatible to library |
48 versions prior to the date when the library version API had been |
49 added, as referenced but undefined C preprocessor macros |
50 automatically evaluate to 0. |
51 */ |
52 |
53 #ifndef _AVR_VERSION_H_ |
54 #define _AVR_VERSION_H_ |
55 |
56 /** \ingroup avr_version |
57 String literal representation of the current library version. */ |
58 #define __AVR_LIBC_VERSION_STRING__ "1.4.4" |
59 |
60 /** \ingroup avr_version |
61 Numerical representation of the current library version. |
62 |
63 In the numerical representation, the major number is multiplied by |
64 10000, the minor number by 100, and all three parts are then |
65 added. It is intented to provide a monotonically increasing |
66 numerical value that can easily be used in numerical checks. |
67 */ |
68 #define __AVR_LIBC_VERSION__ 10404UL |
69 |
70 /** \ingroup avr_version |
71 String literal representation of the release date. */ |
72 #define __AVR_LIBC_DATE_STRING__ "20060420" |
GAS LISTING /tmp/cckBHomO.s page 21 |
73 |
74 /** \ingroup avr_version |
75 Numerical representation of the release date. */ |
76 #define __AVR_LIBC_DATE_ 20060420UL |
77 |
78 /** \ingroup avr_version |
79 Library major version number. */ |
80 #define __AVR_LIBC_MAJOR__ 1 |
81 |
82 /** \ingroup avr_version |
83 Library minor version number. */ |
84 #define __AVR_LIBC_MINOR__ 4 |
85 |
86 /** \ingroup avr_version |
87 Library revision number. */ |
88 #define __AVR_LIBC_REVISION__ 4 |
89 |
90 #endif /* _AVR_VERSION_H_ */ |
91 ... |
339 |
54 #include "Events.h" |
1 #ifndef EVENTS_H |
2 #define EVENTS_H |
538,9 → 1227,6 |
3 |
4 /* |
5 Copyright (C) 2004 John Orlando |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 10 |
6 |
7 AVRcam: a small real-time image processing engine. |
8 |
572,6 → 1258,9 |
34 Description: This file provides the external interface |
35 to the events that can be published/processed in the |
36 system. It is specifically by itself (and nothing |
GAS LISTING /tmp/cckBHomO.s page 22 |
37 else should be defined in here) so that both .c and |
38 .S (assembly) files can include this file without |
39 a problem. |
598,9 → 1287,6 |
59 #define HREF_INTERRUPT_ENABLE_MASK 0x80 |
60 #define HREF_INTERRUPT_DISABLE_MASK 0x7F |
61 #define ENABLE_PCLK_TIMER1_OVERFLOW_BITMASK 0x04 |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 11 |
62 #define DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK 0xFB |
63 #define G_PORT _SFR_IO_ADDR(PINC) |
64 #define RB_PORT _SFR_IO_ADDR(PINB) |
632,6 → 1318,9 |
90 |
91 ; As pixel blocks are sampled, the red, green, and blue values are |
92 ; used to index into their respective color maps. The color maps |
GAS LISTING /tmp/cckBHomO.s page 23 |
93 ; return values that can be logically ANDed together so that a |
94 ; particular RGB triplet will result in a single bit being set |
95 ; after the AND operation. This single bit indicates which color |
658,9 → 1347,6 |
116 |
117 ; These are the registers that will be used throughout this |
118 ; module for acquiring each line of pixel data |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 12 |
119 pixelCount = 16 |
120 pixelRunStart = 17 |
121 lastColor = 18 |
692,6 → 1378,9 |
147 ;***************************************************************** |
148 ; Function Name: CamIntAsm_waitForNewTrackingFrame |
149 ; Function Description: This function is responsible for |
GAS LISTING /tmp/cckBHomO.s page 24 |
150 ; going to sleep until a new frame begins (indicated by |
151 ; VSYNC transitioning from low to high. This will wake |
152 ; the "VSYNC sleep" up and allow it to continue with |
718,9 → 1407,6 |
173 |
174 ;***************************************************************** |
175 ; REMEMBER...everything from here on out is critically timed to be |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 13 |
176 ; synchronized with the flow of pixel data from the camera... |
177 ;***************************************************************** |
178 |
752,6 → 1438,9 |
204:CamInterfaceAsm.S **** out _SFR_IO_ADDR(TIMSK),tmp1 ; overflow |
205 |
206:CamInterfaceAsm.S **** ldi tmp1,PIXEL_RUN_START_INITIAL ; set up the TCNT1 to overflow (and |
GAS LISTING /tmp/cckBHomO.s page 25 |
207:CamInterfaceAsm.S **** ldi tmp2,0xFF ; interrupts) after 176 pixels |
208:CamInterfaceAsm.S **** out _SFR_IO_ADDR(TCNT1H),tmp2 |
209:CamInterfaceAsm.S **** out _SFR_IO_ADDR(TCNT1L),tmp1 |
778,9 → 1467,6 |
230 ; Disable the HREF interrupt |
231:CamInterfaceAsm.S **** cbi _SFR_IO_ADDR(PORTD),PD6 |
232:CamInterfaceAsm.S **** in tmp1, _SFR_IO_ADDR(GICR) |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 14 |
233:CamInterfaceAsm.S **** andi tmp1, HREF_INTERRUPT_DISABLE_MASK |
234:CamInterfaceAsm.S **** out _SFR_IO_ADDR(GICR), tmp1 |
235 |
812,6 → 1498,9 |
261:CamInterfaceAsm.S **** sbi _SFR_IO_ADDR(PORTD),PD6 |
262:CamInterfaceAsm.S **** nop |
263:CamInterfaceAsm.S **** cbi _SFR_IO_ADDR(PORTD),PD6 |
GAS LISTING /tmp/cckBHomO.s page 26 |
264 |
265:CamInterfaceAsm.S **** mov tmp2,pixelRunStart ; get the count value of the |
266 ; current pixel run |
838,9 → 1527,6 |
287 |
288:CamInterfaceAsm.S **** st X+,color ; record the color run in the current line buffer |
289:CamInterfaceAsm.S **** st X,pixelCount |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 15 |
290:CamInterfaceAsm.S **** rjmp _cleanUp |
291 |
292 _cleanUpDumpLine: |
872,6 → 1558,9 |
318 |
319 ;***************************************************************** |
320 ; Function Name: CamIntAsm_waitForNewDumpFrame |
GAS LISTING /tmp/cckBHomO.s page 27 |
321 ; Function Description: This function is responsible for |
322 ; going to sleep until a new frame begins (indicated by |
323 ; VSYNC transitioning from low to high. This will wake |
898,9 → 1587,6 |
344 |
345 CamIntAsm_acquireDumpLine: |
346:CamInterfaceAsm.S **** brts _cleanUp |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 16 |
347 ;sbi _SFR_IO_ADDR(PORTD),PD6 ; For testing... |
348 ;cbi _SFR_IO_ADDR(PORTD),PD6 |
349 |
932,6 → 1618,9 |
375 |
376 ;******************************************************************************************* |
377 ; Dump Frame handler |
GAS LISTING /tmp/cckBHomO.s page 28 |
378 ;******************************************************************************************* |
379 |
380 _dumpFrame: |
958,9 → 1647,6 |
401:CamInterfaceAsm.S **** in tmp1,G_PORT ; sample the G value (1) |
402:CamInterfaceAsm.S **** in tmp2,RB_PORT ; sample the R/B value (1) |
403:CamInterfaceAsm.S **** st X+,tmp1 ; store to the currLineBuff and inc ptrs(2) |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 17 |
404:CamInterfaceAsm.S **** st Y+,tmp2 ; store to the prevLineBuff and inc ptrs(2) |
405:CamInterfaceAsm.S **** brtc _sampleDumpPixel ; loop back unless flag is set (2...if not set) |
406 ; ___________ |
992,6 → 1678,9 |
432 ; whenever the HREF transitions (meaning the pixels |
433 ; are starting after VSYNC transitioned, and we need to |
434 ; start acquiring the pixel blocks |
GAS LISTING /tmp/cckBHomO.s page 29 |
435 ; Inputs: none |
436 ; Outputs: none |
437 ;*********************************************************** |
1018,9 → 1707,6 |
458 ; set ; set the T bit in SREG |
459 ; lds tmp1,eventBitmask |
460 ; ori tmp1,EV_ACQUIRE_FRAME_COMPLETE |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 18 |
461 ; sts eventBitmask,tmp1 |
462 ; reti |
463 |
1051,53 → 1737,42 |
488:CamInterfaceAsm.S **** reti |
489 |
490 .end |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 19 |
DEFINED SYMBOLS |
*ABS*:00000000 CamInterfaceAsm.S |
*ABS*:00000000 Events.h |
*ABS*:00000000 CamInterfaceAsm.S |
*ABS*:00000000 C:/WinAVR/avr/include/avr/io.h |
*ABS*:00000000 C:/WinAVR/avr/include/avr/iom8.h |
*ABS*:00000000 C:/WinAVR/avr/include/avr/io.h |
*ABS*:00000000 C:/WinAVR/avr/include/avr/sfr_defs.h |
*ABS*:00000000 C:/WinAVR/avr/include/avr/io.h |
*ABS*:00000000 CamInterfaceAsm.S |
*ABS*:00000000 <command line> |
*ABS*:00000000 <built-in> |
*ABS*:00000000 CamInterfaceAsm.S |
*ABS*:00000010 pixelCount |
*ABS*:00000011 pixelRunStart |
*ABS*:00000012 lastColor |
*ABS*:00000013 tmp1 |
*ABS*:00000014 tmp2 |
*ABS*:00000013 color |
*ABS*:00000014 greenData |
*ABS*:00000015 blueData |
*ABS*:00000016 colorMapLow |
*ABS*:00000017 colorMapHigh |
*ABS*:00000016 prevLineBuffLow |
*ABS*:00000017 prevLineBuffHigh |
*ABS*:00000018 currLineBuffLow |
*ABS*:00000019 currLineBuffHigh |
CamInterfaceAsm.S:169 .text:00000000 CamIntAsm_waitForNewTrackingFrame |
CamInterfaceAsm.S:335 .text:0000008e CamIntAsm_waitForNewDumpFrame |
CamInterfaceAsm.S:345 .text:00000094 CamIntAsm_acquireDumpLine |
CamInterfaceAsm.S:179 .text:00000006 CamIntAsm_acquireTrackingLine |
CamInterfaceAsm.S:423 .text:000000d4 __vector_1 |
CamInterfaceAsm.S:438 .text:000000d6 __vector_2 |
CamInterfaceAsm.S:474 .text:000000d8 __vector_8 |
CamInterfaceAsm.S:305 .text:00000080 _cleanUp |
CamInterfaceAsm.S:223 .text:00000034 _trackFrame |
CamInterfaceAsm.S:240 .text:00000044 _acquirePixelBlock |
CamInterfaceAsm.S:281 .text:00000074 _cleanUpTrackingLine |
CamInterfaceAsm.S:292 .text:00000080 _cleanUpDumpLine |
CamInterfaceAsm.S:316 .text:0000008c _exit |
CamInterfaceAsm.S:380 .text:000000ba _dumpFrame |
CamInterfaceAsm.S:400 .text:000000c8 _sampleDumpPixel |
CamInterfaceAsm.S:487 .text:000000e6 __vector_default |
UNDEFINED SYMBOLS |
__vector_9 |
fastEventBitmask |
GAS LISTING /tmp/cckBHomO.s page 30 |
DEFINED SYMBOLS |
*ABS*:00000000 CamInterfaceAsm.S |
CamInterfaceAsm.S:119 *ABS*:00000010 pixelCount |
CamInterfaceAsm.S:120 *ABS*:00000011 pixelRunStart |
CamInterfaceAsm.S:121 *ABS*:00000012 lastColor |
CamInterfaceAsm.S:122 *ABS*:00000013 tmp1 |
CamInterfaceAsm.S:123 *ABS*:00000014 tmp2 |
CamInterfaceAsm.S:124 *ABS*:00000013 color |
CamInterfaceAsm.S:125 *ABS*:00000014 greenData |
CamInterfaceAsm.S:126 *ABS*:00000015 blueData |
CamInterfaceAsm.S:127 *ABS*:00000016 colorMapLow |
CamInterfaceAsm.S:128 *ABS*:00000017 colorMapHigh |
CamInterfaceAsm.S:129 *ABS*:00000016 prevLineBuffLow |
CamInterfaceAsm.S:130 *ABS*:00000017 prevLineBuffHigh |
CamInterfaceAsm.S:131 *ABS*:00000018 currLineBuffLow |
CamInterfaceAsm.S:132 *ABS*:00000019 currLineBuffHigh |
CamInterfaceAsm.S:169 .text:00000000 CamIntAsm_waitForNewTrackingFrame |
CamInterfaceAsm.S:335 .text:0000008e CamIntAsm_waitForNewDumpFrame |
CamInterfaceAsm.S:345 .text:00000094 CamIntAsm_acquireDumpLine |
CamInterfaceAsm.S:179 .text:00000006 CamIntAsm_acquireTrackingLine |
CamInterfaceAsm.S:423 .text:000000d4 __vector_1 |
CamInterfaceAsm.S:438 .text:000000d6 __vector_2 |
CamInterfaceAsm.S:474 .text:000000d8 __vector_8 |
CamInterfaceAsm.S:305 .text:00000080 _cleanUp |
CamInterfaceAsm.S:223 .text:00000034 _trackFrame |
CamInterfaceAsm.S:240 .text:00000044 _acquirePixelBlock |
CamInterfaceAsm.S:281 .text:00000074 _cleanUpTrackingLine |
CamInterfaceAsm.S:292 .text:00000080 _cleanUpDumpLine |
CamInterfaceAsm.S:316 .text:0000008c _exit |
CamInterfaceAsm.S:380 .text:000000ba _dumpFrame |
CamInterfaceAsm.S:400 .text:000000c8 _sampleDumpPixel |
CamInterfaceAsm.S:487 .text:000000e6 __vector_default |
UNDEFINED SYMBOLS |
__vector_9 |
fastEventBitmask |
/programy/Atmel_C/AVRcam/DebugInterface.lst |
---|
1,66 → 1,89 |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccm4aaaa.s page 1 |
1 .file "DebugInterface.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "C:\\WinAVR\\AVRcam_dev_1_3_2/",100,0,0,.Ltext0 |
11 .stabs "DebugInterface.c",100,0,0,.Ltext0 |
12 .text |
13 .Ltext0: |
14 .stabs "gcc2_compiled.",60,0,0,0 |
15 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0 |
16 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0 |
17 .stabs "long int:t(0,3)=@s32;r(0,3);0020000000000;0017777777777;",128,0,0,0 |
18 .stabs "unsigned int:t(0,4)=r(0,4);0000000000000;0000000177777;",128,0,0,0 |
19 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0000000000000;0037777777777;",128,0,0,0 |
20 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0, |
21 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0000000000000;01777777777777777777777;",128,0,0, |
22 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0 |
23 .stabs "short unsigned int:t(0,9)=r(0,9);0000000000000;0000000177777;",128,0,0,0 |
24 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0 |
25 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0 |
26 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0 |
27 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0 |
28 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0 |
29 .stabs "complex int:t(0,15)=s4real:(0,1),0,16;imag:(0,1),16,16;;",128,0,0,0 |
30 .stabs "complex float:t(0,16)=R3;8;0;",128,0,0,0 |
31 .stabs "complex double:t(0,17)=R3;8;0;",128,0,0,0 |
32 .stabs "complex long double:t(0,18)=R3;8;0;",128,0,0,0 |
33 .stabs "__builtin_va_list:t(0,19)=*(0,20)=(0,20)",128,0,0,0 |
34 .stabs "_Bool:t(0,21)=@s8;-16;",128,0,0,0 |
35 .stabs "DebugInterface.c",130,0,0,0 |
36 .stabs "CommonDefs.h",130,0,0,0 |
37 .stabs "C:/WinAVR/avr/include/avr/interrupt.h",130,0,0,0 |
38 .stabs "C:/WinAVR/avr/include/avr/io.h",130,0,0,0 |
39 .stabs "C:/WinAVR/avr/include/avr/sfr_defs.h",130,0,0,0 |
40 .stabn 162,0,0,0 |
41 .stabs "C:/WinAVR/avr/include/avr/iom8.h",130,0,0,0 |
42 .stabn 162,0,0,0 |
43 .stabn 162,0,0,0 |
44 .stabn 162,0,0,0 |
45 .stabs "bool_t:t(2,1)=(0,11)",128,0,56,0 |
46 .stabn 162,0,0,0 |
47 .stabs "UartInterface.h",130,0,0,0 |
48 .stabn 162,0,0,0 |
49 .stabs "Utility.h",130,0,0,0 |
50 .stabn 162,0,0,0 |
51 .stabs "DebugInt_init:F(0,20)",36,0,71,DebugInt_init |
52 .global DebugInt_init |
53 .type DebugInt_init, @function |
54 DebugInt_init: |
GAS LISTING /tmp/ccATXzNG.s page 1 |
1 .file "DebugInterface.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "DebugInterface.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
14 .stabs "gcc2_compiled.",60,0,0,0 |
15 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0 |
16 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0 |
17 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0 |
18 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0 |
19 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0 |
20 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0, |
21 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0 |
22 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0 |
23 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0 |
24 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0 |
25 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0 |
26 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0 |
27 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0 |
28 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0 |
29 .stabs "void:t(0,15)=(0,15)",128,0,0,0 |
30 .stabs "CommonDefs.h",130,0,0,0 |
31 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/interrupt.h",130,0,0,0 |
32 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0 |
33 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0 |
34 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0 |
35 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0 |
36 .stabs "int8_t:t(6,1)=(0,10)",128,0,116,0 |
37 .stabs "uint8_t:t(6,2)=(0,11)",128,0,117,0 |
38 .stabs "int16_t:t(6,3)=(0,1)",128,0,118,0 |
39 .stabs "uint16_t:t(6,4)=(0,4)",128,0,119,0 |
40 .stabs "int32_t:t(6,5)=(0,3)",128,0,120,0 |
41 .stabs "uint32_t:t(6,6)=(0,5)",128,0,121,0 |
42 .stabs "int64_t:t(6,7)=(0,6)",128,0,122,0 |
43 .stabs "uint64_t:t(6,8)=(0,7)",128,0,123,0 |
44 .stabs "intptr_t:t(6,9)=(6,3)",128,0,135,0 |
45 .stabs "uintptr_t:t(6,10)=(6,4)",128,0,140,0 |
46 .stabs "int_least8_t:t(6,11)=(6,1)",128,0,152,0 |
47 .stabs "uint_least8_t:t(6,12)=(6,2)",128,0,157,0 |
48 .stabs "int_least16_t:t(6,13)=(6,3)",128,0,162,0 |
49 .stabs "uint_least16_t:t(6,14)=(6,4)",128,0,167,0 |
50 .stabs "int_least32_t:t(6,15)=(6,5)",128,0,172,0 |
51 .stabs "uint_least32_t:t(6,16)=(6,6)",128,0,177,0 |
52 .stabs "int_least64_t:t(6,17)=(6,7)",128,0,182,0 |
53 .stabs "uint_least64_t:t(6,18)=(6,8)",128,0,187,0 |
54 .stabs "int_fast8_t:t(6,19)=(6,1)",128,0,200,0 |
55 .stabs "uint_fast8_t:t(6,20)=(6,2)",128,0,205,0 |
56 .stabs "int_fast16_t:t(6,21)=(6,3)",128,0,210,0 |
57 .stabs "uint_fast16_t:t(6,22)=(6,4)",128,0,215,0 |
GAS LISTING /tmp/ccATXzNG.s page 2 |
58 .stabs "int_fast32_t:t(6,23)=(6,5)",128,0,220,0 |
59 .stabs "uint_fast32_t:t(6,24)=(6,6)",128,0,225,0 |
60 .stabs "int_fast64_t:t(6,25)=(6,7)",128,0,230,0 |
61 .stabs "uint_fast64_t:t(6,26)=(6,8)",128,0,235,0 |
62 .stabs "intmax_t:t(6,27)=(6,7)",128,0,249,0 |
63 .stabs "uintmax_t:t(6,28)=(6,8)",128,0,254,0 |
64 .stabn 162,0,0,0 |
65 .stabs "int_farptr_t:t(5,1)=(6,5)",128,0,76,0 |
66 .stabs "uint_farptr_t:t(5,2)=(6,6)",128,0,80,0 |
67 .stabn 162,0,0,0 |
68 .stabn 162,0,0,0 |
69 .stabn 162,0,0,0 |
70 .stabn 162,0,0,0 |
71 .stabs "bool_t:t(1,1)=(0,11)",128,0,56,0 |
72 .stabn 162,0,0,0 |
73 .stabs "DebugInt_init:F(0,15)",36,0,71,DebugInt_init |
74 .global DebugInt_init |
75 .type DebugInt_init, @function |
76 DebugInt_init: |
77 .stabd 46,0,0 |
1:DebugInterface.c **** /* |
2:DebugInterface.c **** Copyright (C) 2004 John Orlando |
3:DebugInterface.c **** |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccm4aaaa.s page 2 |
4:DebugInterface.c **** AVRcam: a small real-time image processing engine. |
5:DebugInterface.c **** |
6:DebugInterface.c **** This program is free software; you can redistribute it and/or |
95,6 → 118,9 |
35:DebugInterface.c **** addition to the LED hooked up at PORTD bit 6. |
36:DebugInterface.c **** |
37:DebugInterface.c **** Revision History: |
GAS LISTING /tmp/ccATXzNG.s page 3 |
38:DebugInterface.c **** Date Rel Ver. Notes |
39:DebugInterface.c **** 4/10/2004 0.1 Module created |
40:DebugInterface.c **** 6/30/2004 1.0 Initial release for Circuit Cellar |
118,9 → 144,6 |
58:DebugInterface.c **** Function Name: DebugInt_init |
59:DebugInterface.c **** Function Description: This function is responsible for |
60:DebugInterface.c **** initializing the debug module. It sets up the debug LED |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccm4aaaa.s page 3 |
61:DebugInterface.c **** as well as any other debugging that will be done. The |
62:DebugInterface.c **** LED blinks four times, which indicates to the user |
63:DebugInterface.c **** that the system is available for re-programming if |
132,120 → 155,110 |
69:DebugInterface.c **** ***********************************************************/ |
70:DebugInterface.c **** void DebugInt_init(void) |
71:DebugInterface.c **** { |
55 .stabn 68,0,71,.LM1-DebugInt_init |
56 .LM1: |
57 /* prologue: frame size=0 */ |
58 0000 1F93 push r17 |
59 /* prologue end (size=1) */ |
78 .stabn 68,0,71,.LM0-DebugInt_init |
79 .LM0: |
80 /* prologue: frame size=0 */ |
81 /* prologue end (size=0) */ |
72:DebugInterface.c **** /* set PortD pin6 for output */ |
73:DebugInterface.c **** DDRD |= 0x40; |
60 .stabn 68,0,73,.LM2-DebugInt_init |
61 .LM2: |
62 0002 8E9A sbi 49-0x20,6 |
82 .stabn 68,0,73,.LM1-DebugInt_init |
83 .LM1: |
84 0000 8E9A sbi 49-0x20,6 |
74:DebugInterface.c **** /* turn on LED */ |
75:DebugInterface.c **** PORTD |= 0x40; |
63 .stabn 68,0,75,.LM3-DebugInt_init |
64 .LM3: |
65 0004 969A sbi 50-0x20,6 |
85 .stabn 68,0,75,.LM2-DebugInt_init |
86 .LM2: |
87 0002 969A sbi 50-0x20,6 |
76:DebugInterface.c **** Utility_delay(500); |
66 .stabn 68,0,76,.LM4-DebugInt_init |
67 .LM4: |
68 0006 84EF ldi r24,lo8(500) |
69 0008 91E0 ldi r25,hi8(500) |
70 000a 00D0 rcall Utility_delay |
88 .stabn 68,0,76,.LM3-DebugInt_init |
89 .LM3: |
90 0004 84EF ldi r24,lo8(500) |
91 0006 91E0 ldi r25,hi8(500) |
92 0008 00D0 rcall Utility_delay |
77:DebugInterface.c **** PORTD &= 0xBF; |
71 .stabn 68,0,77,.LM5-DebugInt_init |
72 .LM5: |
73 000c 1FEB ldi r17,lo8(-65) |
74 000e 82B3 in r24,50-0x20 |
75 0010 8123 and r24,r17 |
76 0012 82BB out 50-0x20,r24 |
93 .stabn 68,0,77,.LM4-DebugInt_init |
94 .LM4: |
GAS LISTING /tmp/ccATXzNG.s page 4 |
95 000a 9698 cbi 50-0x20,6 |
78:DebugInterface.c **** Utility_delay(500); |
77 .stabn 68,0,78,.LM6-DebugInt_init |
78 .LM6: |
79 0014 84EF ldi r24,lo8(500) |
80 0016 91E0 ldi r25,hi8(500) |
81 0018 00D0 rcall Utility_delay |
96 .stabn 68,0,78,.LM5-DebugInt_init |
97 .LM5: |
98 000c 84EF ldi r24,lo8(500) |
99 000e 91E0 ldi r25,hi8(500) |
100 0010 00D0 rcall Utility_delay |
79:DebugInterface.c **** PORTD |= 0x40; |
82 .stabn 68,0,79,.LM7-DebugInt_init |
83 .LM7: |
84 001a 969A sbi 50-0x20,6 |
101 .stabn 68,0,79,.LM6-DebugInt_init |
102 .LM6: |
103 0012 969A sbi 50-0x20,6 |
80:DebugInterface.c **** Utility_delay(500); |
85 .stabn 68,0,80,.LM8-DebugInt_init |
86 .LM8: |
87 001c 84EF ldi r24,lo8(500) |
88 001e 91E0 ldi r25,hi8(500) |
89 0020 00D0 rcall Utility_delay |
104 .stabn 68,0,80,.LM7-DebugInt_init |
105 .LM7: |
106 0014 84EF ldi r24,lo8(500) |
107 0016 91E0 ldi r25,hi8(500) |
108 0018 00D0 rcall Utility_delay |
81:DebugInterface.c **** PORTD &= 0xBF; |
90 .stabn 68,0,81,.LM9-DebugInt_init |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccm4aaaa.s page 4 |
91 .LM9: |
92 0022 82B3 in r24,50-0x20 |
93 0024 8123 and r24,r17 |
94 0026 82BB out 50-0x20,r24 |
109 .stabn 68,0,81,.LM8-DebugInt_init |
110 .LM8: |
111 001a 9698 cbi 50-0x20,6 |
82:DebugInterface.c **** Utility_delay(500); |
95 .stabn 68,0,82,.LM10-DebugInt_init |
96 .LM10: |
97 0028 84EF ldi r24,lo8(500) |
98 002a 91E0 ldi r25,hi8(500) |
99 002c 00D0 rcall Utility_delay |
112 .stabn 68,0,82,.LM9-DebugInt_init |
113 .LM9: |
114 001c 84EF ldi r24,lo8(500) |
115 001e 91E0 ldi r25,hi8(500) |
116 0020 00D0 rcall Utility_delay |
83:DebugInterface.c **** PORTD |= 0x40; |
100 .stabn 68,0,83,.LM11-DebugInt_init |
101 .LM11: |
102 002e 969A sbi 50-0x20,6 |
117 .stabn 68,0,83,.LM10-DebugInt_init |
118 .LM10: |
119 0022 969A sbi 50-0x20,6 |
84:DebugInterface.c **** Utility_delay(500); |
103 .stabn 68,0,84,.LM12-DebugInt_init |
104 .LM12: |
105 0030 84EF ldi r24,lo8(500) |
106 0032 91E0 ldi r25,hi8(500) |
107 0034 00D0 rcall Utility_delay |
120 .stabn 68,0,84,.LM11-DebugInt_init |
121 .LM11: |
122 0024 84EF ldi r24,lo8(500) |
123 0026 91E0 ldi r25,hi8(500) |
124 0028 00D0 rcall Utility_delay |
85:DebugInterface.c **** PORTD &= 0xBF; |
108 .stabn 68,0,85,.LM13-DebugInt_init |
109 .LM13: |
110 0036 82B3 in r24,50-0x20 |
111 0038 8123 and r24,r17 |
112 003a 82BB out 50-0x20,r24 |
125 .stabn 68,0,85,.LM12-DebugInt_init |
126 .LM12: |
127 002a 9698 cbi 50-0x20,6 |
86:DebugInterface.c **** Utility_delay(500); |
113 .stabn 68,0,86,.LM14-DebugInt_init |
114 .LM14: |
115 003c 84EF ldi r24,lo8(500) |
116 003e 91E0 ldi r25,hi8(500) |
117 0040 00D0 rcall Utility_delay |
128 .stabn 68,0,86,.LM13-DebugInt_init |
129 .LM13: |
130 002c 84EF ldi r24,lo8(500) |
131 002e 91E0 ldi r25,hi8(500) |
132 0030 00D0 rcall Utility_delay |
87:DebugInterface.c **** PORTD |= 0x40; |
118 .stabn 68,0,87,.LM15-DebugInt_init |
119 .LM15: |
120 0042 969A sbi 50-0x20,6 |
88:DebugInterface.c **** } |
121 .stabn 68,0,88,.LM16-DebugInt_init |
122 .LM16: |
123 /* epilogue: frame size=0 */ |
124 0044 1F91 pop r17 |
125 0046 0895 ret |
126 /* epilogue end (size=2) */ |
127 /* function DebugInt_init size 36 (33) */ |
128 .size DebugInt_init, .-DebugInt_init |
129 .Lscope0: |
130 .stabs "",36,0,0,.Lscope0-DebugInt_init |
131 .text |
132 .stabs "",100,0,0,Letext |
133 Letext: |
134 /* File "DebugInterface.c": code 36 = 0x0024 ( 33), prologues 1, epilogues 2 */ |
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccm4aaaa.s page 5 |
DEFINED SYMBOLS |
*ABS*:00000000 DebugInterface.c |
*ABS*:0000003f __SREG__ |
*ABS*:0000003e __SP_H__ |
*ABS*:0000003d __SP_L__ |
*ABS*:00000000 __tmp_reg__ |
*ABS*:00000001 __zero_reg__ |
C:\DOCUME~1\John\LOCALS~1\Temp/ccm4aaaa.s:54 .text:00000000 DebugInt_init |
C:\DOCUME~1\John\LOCALS~1\Temp/ccm4aaaa.s:133 .text:00000048 Letext |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
Utility_delay |
133 .stabn 68,0,87,.LM14-DebugInt_init |
134 .LM14: |
135 0032 969A sbi 50-0x20,6 |
136 /* epilogue: frame size=0 */ |
137 0034 0895 ret |
138 /* epilogue end (size=1) */ |
139 /* function DebugInt_init size 27 (26) */ |
140 .size DebugInt_init, .-DebugInt_init |
141 .Lscope0: |
GAS LISTING /tmp/ccATXzNG.s page 5 |
142 .stabs "",36,0,0,.Lscope0-DebugInt_init |
143 .stabd 78,0,0 |
144 .stabs "",100,0,0,.Letext0 |
145 .Letext0: |
146 /* File "DebugInterface.c": code 27 = 0x001b ( 26), prologues 0, epilogues 1 */ |
GAS LISTING /tmp/ccATXzNG.s page 6 |
DEFINED SYMBOLS |
*ABS*:00000000 DebugInterface.c |
/tmp/ccATXzNG.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccATXzNG.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccATXzNG.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccATXzNG.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccATXzNG.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccATXzNG.s:76 .text:00000000 DebugInt_init |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
Utility_delay |
/programy/Atmel_C/AVRcam/Executive.lst |
---|
1,4 → 1,4 |
GAS LISTING /tmp/cceEDT7g.s page 1 |
GAS LISTING /tmp/ccyu5Mfw.s page 1 |
1 .file "Executive.c" |
10,7 → 10,7 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0 |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "Executive.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
58,7 → 58,7 |
55 .stabs "int_least8_t:t(8,11)=(8,1)",128,0,152,0 |
56 .stabs "uint_least8_t:t(8,12)=(8,2)",128,0,157,0 |
57 .stabs "int_least16_t:t(8,13)=(8,3)",128,0,162,0 |
GAS LISTING /tmp/cceEDT7g.s page 2 |
GAS LISTING /tmp/ccyu5Mfw.s page 2 |
58 .stabs "uint_least16_t:t(8,14)=(8,4)",128,0,167,0 |
118,7 → 118,7 |
20:Executive.c **** For more information on the AVRcam, please contact: |
21:Executive.c **** |
22:Executive.c **** john@jrobot.net |
GAS LISTING /tmp/cceEDT7g.s page 3 |
GAS LISTING /tmp/ccyu5Mfw.s page 3 |
23:Executive.c **** |
178,7 → 178,7 |
77:Executive.c **** #define IS_DATA_IN_EVENT_FIFO() (!(Exec_eventFifoHead == Exec_eventFifoTail)) |
78:Executive.c **** /*********************************************************** |
79:Executive.c **** Function Name: Exec_run |
GAS LISTING /tmp/cceEDT7g.s page 4 |
GAS LISTING /tmp/ccyu5Mfw.s page 4 |
80:Executive.c **** Function Description: This function is responsible for |
238,7 → 238,7 |
134:Executive.c **** case (EV_ENABLE_TRACKING): |
135:Executive.c **** FrameMgr_dispatchEvent(eventGenerated); |
136:Executive.c **** break; |
GAS LISTING /tmp/cceEDT7g.s page 5 |
GAS LISTING /tmp/ccyu5Mfw.s page 5 |
137:Executive.c **** |
298,7 → 298,7 |
191:Executive.c **** dataByte = Exec_eventFifo[Exec_eventFifoTail]; |
192:Executive.c **** tmpTail = (Exec_eventFifoTail+1) & (EXEC_EVENT_FIFO_MASK); |
193:Executive.c **** Exec_eventFifoTail = tmpTail; |
GAS LISTING /tmp/cceEDT7g.s page 6 |
GAS LISTING /tmp/ccyu5Mfw.s page 6 |
194:Executive.c **** ENABLE_INTS(); |
358,7 → 358,7 |
123 /* function Exec_writeEventFifo size 16 (15) */ |
124 .size Exec_writeEventFifo, .-Exec_writeEventFifo |
125 .Lscope0: |
GAS LISTING /tmp/cceEDT7g.s page 7 |
GAS LISTING /tmp/ccyu5Mfw.s page 7 |
126 .stabs "",36,0,0,.Lscope0-Exec_writeEventFifo |
418,7 → 418,7 |
180 0040 8D7F andi r24,lo8(-3) |
181 0042 8093 0000 sts fastEventBitmask,r24 |
182 .stabn 68,0,120,.LM16-Exec_run |
GAS LISTING /tmp/cceEDT7g.s page 8 |
GAS LISTING /tmp/ccyu5Mfw.s page 8 |
183 .LM16: |
478,7 → 478,7 |
237 0084 59F6 brne .L30 |
238 0086 2BC0 rjmp .L12 |
239 .L22: |
GAS LISTING /tmp/cceEDT7g.s page 9 |
GAS LISTING /tmp/ccyu5Mfw.s page 9 |
240 0088 8430 cpi r24,lo8(4) |
538,7 → 538,7 |
294 00ce 00D0 rcall FrameMgr_dispatchEvent |
295 00d0 A5CF rjmp .L30 |
296 .L15: |
GAS LISTING /tmp/cceEDT7g.s page 10 |
GAS LISTING /tmp/ccyu5Mfw.s page 10 |
297 .stabn 68,0,152,.LM30-Exec_run |
598,7 → 598,7 |
351 .size fastEventBitmask, 1 |
352 fastEventBitmask: |
353 0002 00 .skip 1,0 |
GAS LISTING /tmp/cceEDT7g.s page 11 |
GAS LISTING /tmp/ccyu5Mfw.s page 11 |
354 .comm Exec_eventFifo,8,1 |
610,22 → 610,22 |
360 .stabs "",100,0,0,.Letext0 |
361 .Letext0: |
362 /* File "Executive.c": code 127 = 0x007f ( 126), prologues 0, epilogues 1 */ |
GAS LISTING /tmp/cceEDT7g.s page 12 |
GAS LISTING /tmp/ccyu5Mfw.s page 12 |
DEFINED SYMBOLS |
*ABS*:00000000 Executive.c |
/tmp/cceEDT7g.s:3 *ABS*:0000003f __SREG__ |
/tmp/cceEDT7g.s:4 *ABS*:0000003e __SP_H__ |
/tmp/cceEDT7g.s:5 *ABS*:0000003d __SP_L__ |
/tmp/cceEDT7g.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/cceEDT7g.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/cceEDT7g.s:91 .text:00000000 Exec_writeEventFifo |
/tmp/cceEDT7g.s:340 .bss:00000000 Exec_eventFifoHead |
/tmp/ccyu5Mfw.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccyu5Mfw.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccyu5Mfw.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccyu5Mfw.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccyu5Mfw.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccyu5Mfw.s:91 .text:00000000 Exec_writeEventFifo |
/tmp/ccyu5Mfw.s:340 .bss:00000000 Exec_eventFifoHead |
*COM*:00000008 Exec_eventFifo |
/tmp/cceEDT7g.s:131 .text:0000001c Exec_run |
/tmp/cceEDT7g.s:352 .bss:00000002 fastEventBitmask |
/tmp/cceEDT7g.s:346 .bss:00000001 Exec_eventFifoTail |
/tmp/ccyu5Mfw.s:131 .text:0000001c Exec_run |
/tmp/ccyu5Mfw.s:352 .bss:00000002 fastEventBitmask |
/tmp/ccyu5Mfw.s:346 .bss:00000001 Exec_eventFifoTail |
UNDEFINED SYMBOLS |
__do_copy_data |
/programy/Atmel_C/AVRcam/FrameMgr.lst |
---|
1,4 → 1,4 |
GAS LISTING /tmp/ccf43P2i.s page 1 |
GAS LISTING /tmp/cceB4D4U.s page 1 |
1 .file "FrameMgr.c" |
10,7 → 10,7 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0 |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "FrameMgr.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
58,7 → 58,7 |
55 .stabs "int_least16_t:t(6,13)=(6,3)",128,0,162,0 |
56 .stabs "uint_least16_t:t(6,14)=(6,4)",128,0,167,0 |
57 .stabs "int_least32_t:t(6,15)=(6,5)",128,0,172,0 |
GAS LISTING /tmp/ccf43P2i.s page 2 |
GAS LISTING /tmp/cceB4D4U.s page 2 |
58 .stabs "uint_least32_t:t(6,16)=(6,6)",128,0,177,0 |
118,7 → 118,7 |
20:FrameMgr.c **** For more information on the AVRcam, please contact: |
21:FrameMgr.c **** |
22:FrameMgr.c **** john@jrobot.net |
GAS LISTING /tmp/ccf43P2i.s page 3 |
GAS LISTING /tmp/cceB4D4U.s page 3 |
23:FrameMgr.c **** |
178,7 → 178,7 |
77:FrameMgr.c **** sent out during a frame (one byte per line, 144 lines per frame) |
78:FrameMgr.c **** with the number of bytes in a tracked object (7) + some wiggle |
79:FrameMgr.c **** room :-) ... I guess this could be increased to around 20 if |
GAS LISTING /tmp/ccf43P2i.s page 4 |
GAS LISTING /tmp/cceB4D4U.s page 4 |
80:FrameMgr.c **** we had enough room and cycles to process objects between lines */ |
238,7 → 238,7 |
134:FrameMgr.c **** unsigned char lastLineXStart; |
135:FrameMgr.c **** unsigned char lastLineXFinish; |
136:FrameMgr.c **** unsigned char x_upperLeft; |
GAS LISTING /tmp/ccf43P2i.s page 5 |
GAS LISTING /tmp/cceB4D4U.s page 5 |
137:FrameMgr.c **** unsigned char y_upperLeft; |
298,7 → 298,7 |
191:FrameMgr.c **** { |
192:FrameMgr.c **** memset(trackedObjectTable,0x00,sizeof(trackedObjectTable)); |
193:FrameMgr.c **** } |
GAS LISTING /tmp/ccf43P2i.s page 6 |
GAS LISTING /tmp/cceB4D4U.s page 6 |
194:FrameMgr.c **** |
358,7 → 358,7 |
248:FrameMgr.c **** } |
249:FrameMgr.c **** } |
250:FrameMgr.c **** |
GAS LISTING /tmp/ccf43P2i.s page 7 |
GAS LISTING /tmp/cceB4D4U.s page 7 |
251:FrameMgr.c **** /*********************************************************** |
418,7 → 418,7 |
305:FrameMgr.c **** memset(currentLineBuffer,0x00,LENGTH_OF_LINE_BUFFER); |
306:FrameMgr.c **** memset(previousLineBuffer,0x00,LENGTH_OF_LINE_BUFFER); |
307:FrameMgr.c **** /* wait for another VSYNC so we know which frame to use |
GAS LISTING /tmp/ccf43P2i.s page 8 |
GAS LISTING /tmp/cceB4D4U.s page 8 |
308:FrameMgr.c **** to start looking for a line to receive */ |
478,7 → 478,7 |
362:FrameMgr.c **** UartInt_txByte(lineCount); /* send the line count */ |
363:FrameMgr.c **** for (i=0; i<NUM_PIXELS_IN_A_DUMP_LINE; i+=2) |
364:FrameMgr.c **** { |
GAS LISTING /tmp/ccf43P2i.s page 9 |
GAS LISTING /tmp/cceB4D4U.s page 9 |
365:FrameMgr.c **** /* when a dump line is sampled, the upper byte can potentially |
538,7 → 538,7 |
419:FrameMgr.c **** itoa(trackedLineCount,asciiBuffer,10); |
420:FrameMgr.c **** UIMgr_txBuffer(asciiBuffer,3); |
421:FrameMgr.c **** UIMgr_txBuffer(" ",1); |
GAS LISTING /tmp/ccf43P2i.s page 10 |
GAS LISTING /tmp/cceB4D4U.s page 10 |
422:FrameMgr.c **** while(pixelCount < ACTUAL_NUM_PIXELS_IN_A_LINE) |
598,7 → 598,7 |
476:FrameMgr.c **** /* invalidate the object */ |
477:FrameMgr.c **** *(pTrackedObjectData + VALID_OBJECT_OFFSET) = FALSE; |
478:FrameMgr.c **** numCurrTrackedObjects--; |
GAS LISTING /tmp/ccf43P2i.s page 11 |
GAS LISTING /tmp/cceB4D4U.s page 11 |
479:FrameMgr.c **** } |
658,7 → 658,7 |
522:FrameMgr.c **** #endif |
523:FrameMgr.c **** unsigned char *pTableData = (unsigned char *)pCurrentTrackedObjectTable; |
104 .stabn 68,0,523,.LM1-FrameMgr_processFrame |
GAS LISTING /tmp/ccf43P2i.s page 12 |
GAS LISTING /tmp/cceB4D4U.s page 12 |
105 .LM1: |
718,7 → 718,7 |
123 0026 8091 0000 lds r24,numCurrTrackedObjects |
124 002a 00D0 rcall UIMgr_writeTxFifo |
125 002c DD24 clr r13 |
GAS LISTING /tmp/ccf43P2i.s page 13 |
GAS LISTING /tmp/cceB4D4U.s page 13 |
126 .L4: |
778,7 → 778,7 |
165 0058 0DC0 rjmp .L11 |
166 .L16: |
575:FrameMgr.c **** else if (color == 4) k=5; |
GAS LISTING /tmp/ccf43P2i.s page 14 |
GAS LISTING /tmp/cceB4D4U.s page 14 |
167 .stabn 68,0,575,.LM13-FrameMgr_processFrame |
838,7 → 838,7 |
210 .LM22: |
211 0082 802F mov r24,r16 |
212 0084 00D0 rcall UIMgr_writeTxFifo |
GAS LISTING /tmp/ccf43P2i.s page 15 |
GAS LISTING /tmp/cceB4D4U.s page 15 |
587:FrameMgr.c **** UIMgr_writeTxFifo(tmpLowerRightX); |
898,7 → 898,7 |
248 00ac EF90 pop r14 |
249 00ae DF90 pop r13 |
250 00b0 0895 ret |
GAS LISTING /tmp/ccf43P2i.s page 16 |
GAS LISTING /tmp/cceB4D4U.s page 16 |
251 /* epilogue end (size=8) */ |
958,7 → 958,7 |
305 00ea 1091 0000 lds r17,(pCurrentTrackedObjectTable)+1 |
306 .stabn 68,0,352,.LM31-FrameMgr_processLine |
307 .LM31: |
GAS LISTING /tmp/ccf43P2i.s page 17 |
GAS LISTING /tmp/cceB4D4U.s page 17 |
308 00ee 8091 0000 lds r24,currentState |
1018,7 → 1018,7 |
362 0140 00D0 rcall UartInt_txByte |
363 .stabn 68,0,379,.LM39-FrameMgr_processLine |
364 .LM39: |
GAS LISTING /tmp/ccf43P2i.s page 18 |
GAS LISTING /tmp/cceB4D4U.s page 18 |
365 0142 D801 movw r26,r16 |
1078,7 → 1078,7 |
419 .LM47: |
420 0194 8834 cpi r24,lo8(72) |
421 0196 60F0 brlo .L31 |
GAS LISTING /tmp/ccf43P2i.s page 19 |
GAS LISTING /tmp/cceB4D4U.s page 19 |
422 .stabn 68,0,398,.LM48-FrameMgr_processLine |
1138,7 → 1138,7 |
611:FrameMgr.c **** finding the connectedness between two particular run- |
612:FrameMgr.c **** length encoded lines of pixel data. It updates the |
613:FrameMgr.c **** trackingTable as needed. |
GAS LISTING /tmp/ccf43P2i.s page 20 |
GAS LISTING /tmp/cceB4D4U.s page 20 |
614:FrameMgr.c **** Inputs: none |
1198,7 → 1198,7 |
668:FrameMgr.c **** connectedness */ |
669:FrameMgr.c **** lastLineXStart = *(pTrackedObjectData + LAST_LINE_X_START_OFFSET); |
670:FrameMgr.c **** lastLineXFinish = *(pTrackedObjectData + LAST_LINE_X_FINISH_OFFSET); |
GAS LISTING /tmp/ccf43P2i.s page 21 |
GAS LISTING /tmp/cceB4D4U.s page 21 |
671:FrameMgr.c **** |
1258,7 → 1258,7 |
725:FrameMgr.c **** upper left Y point, since each scan line we process moves from |
726:FrameMgr.c **** top to bottom */ |
727:FrameMgr.c **** *(pTrackedObjectData + X_UPPER_LEFT_OFFSET) = currPixelRunStart; |
GAS LISTING /tmp/ccf43P2i.s page 22 |
GAS LISTING /tmp/cceB4D4U.s page 22 |
728:FrameMgr.c **** } |
1318,7 → 1318,7 |
474 .stabn 68,0,663,.LM59-FrameMgr_processLine |
475 .LM59: |
476 01d6 CF2C mov r12,r15 |
GAS LISTING /tmp/ccf43P2i.s page 23 |
GAS LISTING /tmp/cceB4D4U.s page 23 |
477 01d8 DD24 clr r13 |
1378,7 → 1378,7 |
531 022a A9F5 brne .L40 |
532 022c 0F2E mov __tmp_reg__,r31 |
533 022e F6E0 ldi r31,lo8(6) |
GAS LISTING /tmp/ccf43P2i.s page 24 |
GAS LISTING /tmp/cceB4D4U.s page 24 |
534 0230 AF2E mov r10,r31 |
1438,7 → 1438,7 |
588 027e 8381 ldd r24,Z+3 |
589 0280 5817 cp r21,r24 |
590 0282 08F4 brsh .L50 |
GAS LISTING /tmp/ccf43P2i.s page 25 |
GAS LISTING /tmp/cceB4D4U.s page 25 |
591 .stabn 68,0,727,.LM72-FrameMgr_processLine |
1498,7 → 1498,7 |
645 02b8 FD01 movw r30,r26 |
646 02ba 5183 std Z+1,r21 |
647 .stabn 68,0,776,.LM83-FrameMgr_processLine |
GAS LISTING /tmp/ccf43P2i.s page 26 |
GAS LISTING /tmp/cceB4D4U.s page 26 |
648 .LM83: |
1558,7 → 1558,7 |
690 .LM92: |
691 02e6 8C91 ld r24,X |
692 02e8 8130 cpi r24,lo8(1) |
GAS LISTING /tmp/ccf43P2i.s page 27 |
GAS LISTING /tmp/cceB4D4U.s page 27 |
693 02ea A1F4 brne .L64 |
1618,7 → 1618,7 |
747 .LBB6: |
748 .LBB7: |
749 .stabn 68,0,757,.LM101-FrameMgr_processLine |
GAS LISTING /tmp/ccf43P2i.s page 28 |
GAS LISTING /tmp/cceB4D4U.s page 28 |
750 .LM101: |
1678,7 → 1678,7 |
804 .stabn 68,0,192,.LM103-FrameMgr_init |
805 .LM103: |
806 0372 80E4 ldi r24,lo8(64) |
GAS LISTING /tmp/ccf43P2i.s page 29 |
GAS LISTING /tmp/cceB4D4U.s page 29 |
807 0374 E0E0 ldi r30,lo8(trackedObjectTable) |
1738,7 → 1738,7 |
861 .stabn 68,0,310,.LM110-FrameMgr_acquireLine |
862 .LM110: |
863 03ac 829B sbis 48-0x20,2 |
GAS LISTING /tmp/ccf43P2i.s page 30 |
GAS LISTING /tmp/cceB4D4U.s page 30 |
864 03ae 07C0 rjmp .L110 |
1798,7 → 1798,7 |
918 03ec 0895 ret |
919 /* epilogue: frame size=0 */ |
920 /* epilogue: noreturn */ |
GAS LISTING /tmp/ccf43P2i.s page 31 |
GAS LISTING /tmp/cceB4D4U.s page 31 |
921 /* epilogue end (size=0) */ |
1858,7 → 1858,7 |
975 0420 0895 ret |
976 /* epilogue: frame size=0 */ |
977 /* epilogue: noreturn */ |
GAS LISTING /tmp/ccf43P2i.s page 32 |
GAS LISTING /tmp/cceB4D4U.s page 32 |
978 /* epilogue end (size=0) */ |
1918,7 → 1918,7 |
1032 .stabn 68,0,215,.LM133-FrameMgr_dispatchEvent |
1033 .LM133: |
1034 0454 82E0 ldi r24,lo8(2) |
GAS LISTING /tmp/ccf43P2i.s page 33 |
GAS LISTING /tmp/cceB4D4U.s page 33 |
1035 0456 8093 0000 sts currentState,r24 |
1978,7 → 1978,7 |
1089 .lcomm numCurrTrackedObjects,1 |
1090 .lcomm currentState,1 |
1091 .lcomm lineCount,1 |
GAS LISTING /tmp/ccf43P2i.s page 34 |
GAS LISTING /tmp/cceB4D4U.s page 34 |
1092 .lcomm trackedLineCount,1 |
1995,29 → 1995,29 |
1103 .stabs "",100,0,0,.Letext0 |
1104 .Letext0: |
1105 /* File "FrameMgr.c": code 580 = 0x0244 ( 513), prologues 33, epilogues 34 */ |
GAS LISTING /tmp/ccf43P2i.s page 35 |
GAS LISTING /tmp/cceB4D4U.s page 35 |
DEFINED SYMBOLS |
*ABS*:00000000 FrameMgr.c |
/tmp/ccf43P2i.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccf43P2i.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccf43P2i.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccf43P2i.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccf43P2i.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccf43P2i.s:91 .text:00000000 FrameMgr_processFrame |
/tmp/ccf43P2i.s:1087 .data:00000000 pCurrentTrackedObjectTable |
/tmp/cceB4D4U.s:3 *ABS*:0000003f __SREG__ |
/tmp/cceB4D4U.s:4 *ABS*:0000003e __SP_H__ |
/tmp/cceB4D4U.s:5 *ABS*:0000003d __SP_L__ |
/tmp/cceB4D4U.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/cceB4D4U.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/cceB4D4U.s:91 .text:00000000 FrameMgr_processFrame |
/tmp/cceB4D4U.s:1087 .data:00000000 pCurrentTrackedObjectTable |
.bss:00000000 numCurrTrackedObjects |
/tmp/ccf43P2i.s:270 .text:000000b2 FrameMgr_processLine |
/tmp/ccf43P2i.s:1089 .bss:00000001 currentState |
/tmp/ccf43P2i.s:1090 .bss:00000002 lineCount |
/tmp/ccf43P2i.s:1091 .bss:00000003 trackedLineCount |
/tmp/ccf43P2i.s:798 .text:00000372 FrameMgr_init |
/tmp/ccf43P2i.s:1093 .bss:00000005 trackedObjectTable |
/tmp/ccf43P2i.s:823 .text:00000380 FrameMgr_acquireLine |
/tmp/ccf43P2i.s:933 .text:000003ee FrameMgr_acquireFrame |
/tmp/ccf43P2i.s:1092 .bss:00000004 numPrevTrackedObjects |
/tmp/ccf43P2i.s:988 .text:00000422 FrameMgr_dispatchEvent |
/tmp/cceB4D4U.s:270 .text:000000b2 FrameMgr_processLine |
/tmp/cceB4D4U.s:1089 .bss:00000001 currentState |
/tmp/cceB4D4U.s:1090 .bss:00000002 lineCount |
/tmp/cceB4D4U.s:1091 .bss:00000003 trackedLineCount |
/tmp/cceB4D4U.s:798 .text:00000372 FrameMgr_init |
/tmp/cceB4D4U.s:1093 .bss:00000005 trackedObjectTable |
/tmp/cceB4D4U.s:823 .text:00000380 FrameMgr_acquireLine |
/tmp/cceB4D4U.s:933 .text:000003ee FrameMgr_acquireFrame |
/tmp/cceB4D4U.s:1092 .bss:00000004 numPrevTrackedObjects |
/tmp/cceB4D4U.s:988 .text:00000422 FrameMgr_dispatchEvent |
UNDEFINED SYMBOLS |
__do_copy_data |
/programy/Atmel_C/AVRcam/I2CInterface.c |
---|
46,8 → 46,7 |
/* Includes */ |
#include <avr/io.h> |
#include <avr/twi.h> |
#include <avr/signal.h> |
#include <util/twi.h> |
#include <avr/interrupt.h> |
#include "CamConfig.h" |
#include "CommonDefs.h" |
/programy/Atmel_C/AVRcam/I2CInterface.lst |
---|
0,0 → 1,942 |
GAS LISTING /tmp/ccQb65z2.s page 1 |
1 .file "I2CInterface.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "I2CInterface.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
14 .stabs "gcc2_compiled.",60,0,0,0 |
15 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0 |
16 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0 |
17 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0 |
18 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0 |
19 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0 |
20 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0, |
21 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0 |
22 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0 |
23 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0 |
24 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0 |
25 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0 |
26 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0 |
27 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0 |
28 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0 |
29 .stabs "void:t(0,15)=(0,15)",128,0,0,0 |
30 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0 |
31 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0 |
32 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0 |
33 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0 |
34 .stabs "int8_t:t(4,1)=(0,10)",128,0,116,0 |
35 .stabs "uint8_t:t(4,2)=(0,11)",128,0,117,0 |
36 .stabs "int16_t:t(4,3)=(0,1)",128,0,118,0 |
37 .stabs "uint16_t:t(4,4)=(0,4)",128,0,119,0 |
38 .stabs "int32_t:t(4,5)=(0,3)",128,0,120,0 |
39 .stabs "uint32_t:t(4,6)=(0,5)",128,0,121,0 |
40 .stabs "int64_t:t(4,7)=(0,6)",128,0,122,0 |
41 .stabs "uint64_t:t(4,8)=(0,7)",128,0,123,0 |
42 .stabs "intptr_t:t(4,9)=(4,3)",128,0,135,0 |
43 .stabs "uintptr_t:t(4,10)=(4,4)",128,0,140,0 |
44 .stabs "int_least8_t:t(4,11)=(4,1)",128,0,152,0 |
45 .stabs "uint_least8_t:t(4,12)=(4,2)",128,0,157,0 |
46 .stabs "int_least16_t:t(4,13)=(4,3)",128,0,162,0 |
47 .stabs "uint_least16_t:t(4,14)=(4,4)",128,0,167,0 |
48 .stabs "int_least32_t:t(4,15)=(4,5)",128,0,172,0 |
49 .stabs "uint_least32_t:t(4,16)=(4,6)",128,0,177,0 |
50 .stabs "int_least64_t:t(4,17)=(4,7)",128,0,182,0 |
51 .stabs "uint_least64_t:t(4,18)=(4,8)",128,0,187,0 |
52 .stabs "int_fast8_t:t(4,19)=(4,1)",128,0,200,0 |
53 .stabs "uint_fast8_t:t(4,20)=(4,2)",128,0,205,0 |
54 .stabs "int_fast16_t:t(4,21)=(4,3)",128,0,210,0 |
55 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0 |
56 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0 |
57 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0 |
GAS LISTING /tmp/ccQb65z2.s page 2 |
58 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0 |
59 .stabs "uint_fast64_t:t(4,26)=(4,8)",128,0,235,0 |
60 .stabs "intmax_t:t(4,27)=(4,7)",128,0,249,0 |
61 .stabs "uintmax_t:t(4,28)=(4,8)",128,0,254,0 |
62 .stabn 162,0,0,0 |
63 .stabs "int_farptr_t:t(3,1)=(4,5)",128,0,76,0 |
64 .stabs "uint_farptr_t:t(3,2)=(4,6)",128,0,80,0 |
65 .stabn 162,0,0,0 |
66 .stabn 162,0,0,0 |
67 .stabn 162,0,0,0 |
68 .stabs "CamConfig.h",130,0,0,0 |
69 .stabs "I2CInterface.h",130,0,0,0 |
70 .stabs "CommonDefs.h",130,0,0,0 |
71 .stabs "bool_t:t(7,1)=(0,11)",128,0,56,0 |
72 .stabn 162,0,0,0 |
73 .stabs "i2cCmd_t:t(6,1)=(6,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,0 |
74 .stabn 162,0,0,0 |
75 .stabn 162,0,0,0 |
76 .stabs "I2CInt_init:F(0,15)",36,0,85,I2CInt_init |
77 .global I2CInt_init |
78 .type I2CInt_init, @function |
79 I2CInt_init: |
80 .stabd 46,0,0 |
1:I2CInterface.c **** /* |
2:I2CInterface.c **** Copyright (C) 2004 John Orlando |
3:I2CInterface.c **** |
4:I2CInterface.c **** AVRcam: a small real-time image processing engine. |
5:I2CInterface.c **** |
6:I2CInterface.c **** This program is free software; you can redistribute it and/or |
7:I2CInterface.c **** modify it under the terms of the GNU General Public |
8:I2CInterface.c **** License as published by the Free Software Foundation; either |
9:I2CInterface.c **** version 2 of the License, or (at your option) any later version. |
10:I2CInterface.c **** |
11:I2CInterface.c **** This program is distributed in the hope that it will be useful, |
12:I2CInterface.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of |
13:I2CInterface.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14:I2CInterface.c **** General Public License for more details. |
15:I2CInterface.c **** |
16:I2CInterface.c **** You should have received a copy of the GNU General Public |
17:I2CInterface.c **** License along with this program; if not, write to the Free Software |
18:I2CInterface.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19:I2CInterface.c **** |
20:I2CInterface.c **** For more information on the AVRcam, please contact: |
21:I2CInterface.c **** |
22:I2CInterface.c **** john@jrobot.net |
23:I2CInterface.c **** |
24:I2CInterface.c **** or go to www.jrobot.net for more details regarding the system. |
25:I2CInterface.c **** */ |
26:I2CInterface.c **** /*********************************************************** |
27:I2CInterface.c **** Module Name: I2CInterface.c |
28:I2CInterface.c **** Module Date: 4/10/2004 |
29:I2CInterface.c **** Module Auth: John Orlando |
30:I2CInterface.c **** |
31:I2CInterface.c **** Description: This module is responsible for providing a |
32:I2CInterface.c **** low-level interface to the I2C hardware resident on the |
33:I2CInterface.c **** mega8 processor (also known as the Two-Wire Interface, |
34:I2CInterface.c **** or TWI). The interface is needed to configure the |
GAS LISTING /tmp/ccQb65z2.s page 3 |
35:I2CInterface.c **** needed registers in the OV6620 camera. This interface |
36:I2CInterface.c **** is interrupt-driven based on the events that should |
37:I2CInterface.c **** occur upon successful writing of an I2C register. |
38:I2CInterface.c **** |
39:I2CInterface.c **** Revision History: |
40:I2CInterface.c **** Date Rel Ver. Notes |
41:I2CInterface.c **** 4/10/2004 0.1 Module created |
42:I2CInterface.c **** 6/30/2004 1.0 Initial release for Circuit Cellar |
43:I2CInterface.c **** contest. |
44:I2CInterface.c **** |
45:I2CInterface.c **** ***********************************************************/ |
46:I2CInterface.c **** |
47:I2CInterface.c **** /* Includes */ |
48:I2CInterface.c **** #include <avr/io.h> |
49:I2CInterface.c **** #include <util/twi.h> |
50:I2CInterface.c **** #include <avr/interrupt.h> |
51:I2CInterface.c **** #include "CamConfig.h" |
52:I2CInterface.c **** #include "CommonDefs.h" |
53:I2CInterface.c **** |
54:I2CInterface.c **** /* Local Variables */ |
55:I2CInterface.c **** |
56:I2CInterface.c **** /* These variables are used as storage space for the current |
57:I2CInterface.c **** I2C command being sent over the interface. They need to |
58:I2CInterface.c **** be volatile since they are dealt with an the TWI ISR */ |
59:I2CInterface.c **** volatile static unsigned char twi_address; |
60:I2CInterface.c **** volatile static unsigned char *twi_data; |
61:I2CInterface.c **** volatile static unsigned char twi_ddr; |
62:I2CInterface.c **** volatile static unsigned char twi_bytes; |
63:I2CInterface.c **** volatile static unsigned char status; |
64:I2CInterface.c **** volatile static unsigned char retry_cnt; |
65:I2CInterface.c **** |
66:I2CInterface.c **** /* Local Structures and Typedefs */ |
67:I2CInterface.c **** |
68:I2CInterface.c **** /* Extern Variables */ |
69:I2CInterface.c **** |
70:I2CInterface.c **** /* Definitions */ |
71:I2CInterface.c **** /* Bit definitions for the tw_status register */ |
72:I2CInterface.c **** #define MAX_TWI_RETRIES 2 |
73:I2CInterface.c **** #define BUSY 7 |
74:I2CInterface.c **** |
75:I2CInterface.c **** /*********************************************************** |
76:I2CInterface.c **** Function Name: I2CInt_init |
77:I2CInterface.c **** Function Description: This function is responsible |
78:I2CInterface.c **** for setting up the registers needed for the TWI |
79:I2CInterface.c **** interface |
80:I2CInterface.c **** |
81:I2CInterface.c **** Inputs: none |
82:I2CInterface.c **** Outputs: none |
83:I2CInterface.c **** ***********************************************************/ |
84:I2CInterface.c **** void I2CInt_init(void) |
85:I2CInterface.c **** { |
81 .stabn 68,0,85,.LM0-I2CInt_init |
82 .LM0: |
83 /* prologue: frame size=0 */ |
84 /* prologue end (size=0) */ |
86:I2CInterface.c **** TWSR = 0; |
85 .stabn 68,0,86,.LM1-I2CInt_init |
GAS LISTING /tmp/ccQb65z2.s page 4 |
86 .LM1: |
87 0000 11B8 out 33-0x20,__zero_reg__ |
87:I2CInterface.c **** |
88:I2CInterface.c **** /* init the speed of the I2C interface, running at |
89:I2CInterface.c **** 100 Kbps */ |
90:I2CInterface.c **** TWBR = (FOSC / I2C_SPEED - 16)/2; |
88 .stabn 68,0,90,.LM2-I2CInt_init |
89 .LM2: |
90 0002 88E4 ldi r24,lo8(72) |
91 0004 80B9 out 32-0x20,r24 |
92 /* epilogue: frame size=0 */ |
93 0006 0895 ret |
94 /* epilogue end (size=1) */ |
95 /* function I2CInt_init size 4 (3) */ |
96 .size I2CInt_init, .-I2CInt_init |
97 .Lscope0: |
98 .stabs "",36,0,0,.Lscope0-I2CInt_init |
99 .stabd 78,0,0 |
100 .stabs "I2CInt_writeData:F(0,15)",36,0,108,I2CInt_writeData |
101 .stabs "address:P(0,11)",64,0,107,25 |
102 .stabs "data:P(0,16)=*(0,11)",64,0,107,22 |
103 .stabs "bytes:P(0,11)",64,0,107,20 |
104 .global I2CInt_writeData |
105 .type I2CInt_writeData, @function |
106 I2CInt_writeData: |
107 .stabd 46,0,0 |
91:I2CInterface.c **** } |
92:I2CInterface.c **** |
93:I2CInterface.c **** /*********************************************************** |
94:I2CInterface.c **** Function Name: I2CInt_writeData |
95:I2CInterface.c **** Function Description: This function is responsible for |
96:I2CInterface.c **** initiating the process of writing a sequence of bytes |
97:I2CInterface.c **** an I2C slave address. This function will try to write |
98:I2CInterface.c **** the data three times before giving up. |
99:I2CInterface.c **** Inputs: address: the address of the I2C slave device |
100:I2CInterface.c **** data: a pointer to the data to be written |
101:I2CInterface.c **** to the slave...for camera interfacing, |
102:I2CInterface.c **** the data follows a <register #><data> |
103:I2CInterface.c **** format |
104:I2CInterface.c **** bytes: the number of bytes to write |
105:I2CInterface.c **** Outputs: none |
106:I2CInterface.c **** ***********************************************************/ |
107:I2CInterface.c **** void I2CInt_writeData(unsigned char address, unsigned char *data, unsigned char bytes) |
108:I2CInterface.c **** { |
108 .stabn 68,0,108,.LM3-I2CInt_writeData |
109 .LM3: |
110 /* prologue: frame size=0 */ |
111 /* prologue end (size=0) */ |
112 0008 982F mov r25,r24 |
113 .L5: |
109:I2CInterface.c **** while(status & (1<<BUSY)); /* Bus is busy wait (or exit with error code) */ |
114 .stabn 68,0,109,.LM4-I2CInt_writeData |
115 .LM4: |
116 000a 8091 0000 lds r24,status |
117 000e 8823 tst r24 |
118 0010 E4F3 brlt .L5 |
119 .L9: |
GAS LISTING /tmp/ccQb65z2.s page 5 |
110:I2CInterface.c **** while(TWCR & (1<<TWSTO)); |
120 .stabn 68,0,110,.LM5-I2CInt_writeData |
121 .LM5: |
122 0012 06B6 in __tmp_reg__,86-0x20 |
123 0014 04FC sbrc __tmp_reg__,4 |
124 0016 FDCF rjmp .L9 |
111:I2CInterface.c **** |
112:I2CInterface.c **** /* copy the needed data and state info to our local I2C command structure */ |
113:I2CInterface.c **** twi_address = address; |
125 .stabn 68,0,113,.LM6-I2CInt_writeData |
126 .LM6: |
127 0018 9093 0000 sts twi_address,r25 |
114:I2CInterface.c **** twi_data = data; |
128 .stabn 68,0,114,.LM7-I2CInt_writeData |
129 .LM7: |
130 001c 7093 0000 sts (twi_data)+1,r23 |
131 0020 6093 0000 sts twi_data,r22 |
115:I2CInterface.c **** twi_bytes = bytes; |
132 .stabn 68,0,115,.LM8-I2CInt_writeData |
133 .LM8: |
134 0024 4093 0000 sts twi_bytes,r20 |
116:I2CInterface.c **** twi_ddr = TW_WRITE; |
135 .stabn 68,0,116,.LM9-I2CInt_writeData |
136 .LM9: |
137 0028 1092 0000 sts twi_ddr,__zero_reg__ |
117:I2CInterface.c **** |
118:I2CInterface.c **** retry_cnt = 0; |
138 .stabn 68,0,118,.LM10-I2CInt_writeData |
139 .LM10: |
140 002c 1092 0000 sts retry_cnt,__zero_reg__ |
119:I2CInterface.c **** |
120:I2CInterface.c **** /* Generate start condition, the remainder of the transfer is interrupt driven and |
121:I2CInterface.c **** will be performed in the background */ |
122:I2CInterface.c **** TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE); |
141 .stabn 68,0,122,.LM11-I2CInt_writeData |
142 .LM11: |
143 0030 85EA ldi r24,lo8(-91) |
144 0032 86BF out 86-0x20,r24 |
123:I2CInterface.c **** |
124:I2CInterface.c **** status |= (1<<BUSY); |
145 .stabn 68,0,124,.LM12-I2CInt_writeData |
146 .LM12: |
147 0034 8091 0000 lds r24,status |
148 0038 8068 ori r24,lo8(-128) |
149 003a 8093 0000 sts status,r24 |
150 /* epilogue: frame size=0 */ |
151 003e 0895 ret |
152 /* epilogue end (size=1) */ |
153 /* function I2CInt_writeData size 28 (27) */ |
154 .size I2CInt_writeData, .-I2CInt_writeData |
155 .Lscope1: |
156 .stabs "",36,0,0,.Lscope1-I2CInt_writeData |
157 .stabd 78,0,0 |
158 .stabs "I2CInt_readData:F(0,15)",36,0,138,I2CInt_readData |
159 .stabs "address:P(0,11)",64,0,137,25 |
160 .stabs "data:P(0,16)",64,0,137,22 |
161 .stabs "bytes:P(0,11)",64,0,137,20 |
GAS LISTING /tmp/ccQb65z2.s page 6 |
162 .global I2CInt_readData |
163 .type I2CInt_readData, @function |
164 I2CInt_readData: |
165 .stabd 46,0,0 |
125:I2CInterface.c **** } |
126:I2CInterface.c **** |
127:I2CInterface.c **** /*********************************************************** |
128:I2CInterface.c **** Function Name: I2CInt_readData |
129:I2CInterface.c **** Function Description: This funcion is responsible for |
130:I2CInterface.c **** reading the specified number of bytes from a slave |
131:I2CInterface.c **** device. |
132:I2CInterface.c **** Inputs: address: the slave address to read from |
133:I2CInterface.c **** data: a pointer to where the data will be stored |
134:I2CInterface.c **** bytes: the number of bytes to read |
135:I2CInterface.c **** Outputs: none |
136:I2CInterface.c **** ***********************************************************/ |
137:I2CInterface.c **** void I2CInt_readData(unsigned char address, unsigned char *data, unsigned char bytes) |
138:I2CInterface.c **** { |
166 .stabn 68,0,138,.LM13-I2CInt_readData |
167 .LM13: |
168 /* prologue: frame size=0 */ |
169 /* prologue end (size=0) */ |
170 0040 982F mov r25,r24 |
171 .L15: |
139:I2CInterface.c **** /* Bus is busy wait (or exit with error code) */ |
140:I2CInterface.c **** while(status & (1<<BUSY)); |
172 .stabn 68,0,140,.LM14-I2CInt_readData |
173 .LM14: |
174 0042 8091 0000 lds r24,status |
175 0046 8823 tst r24 |
176 0048 E4F3 brlt .L15 |
141:I2CInterface.c **** |
142:I2CInterface.c **** twi_address = address; |
177 .stabn 68,0,142,.LM15-I2CInt_readData |
178 .LM15: |
179 004a 9093 0000 sts twi_address,r25 |
143:I2CInterface.c **** twi_data = data; |
180 .stabn 68,0,143,.LM16-I2CInt_readData |
181 .LM16: |
182 004e 7093 0000 sts (twi_data)+1,r23 |
183 0052 6093 0000 sts twi_data,r22 |
144:I2CInterface.c **** twi_bytes = bytes; |
184 .stabn 68,0,144,.LM17-I2CInt_readData |
185 .LM17: |
186 0056 4093 0000 sts twi_bytes,r20 |
145:I2CInterface.c **** twi_ddr = TW_READ; |
187 .stabn 68,0,145,.LM18-I2CInt_readData |
188 .LM18: |
189 005a 81E0 ldi r24,lo8(1) |
190 005c 8093 0000 sts twi_ddr,r24 |
146:I2CInterface.c **** |
147:I2CInterface.c **** retry_cnt = 0; |
191 .stabn 68,0,147,.LM19-I2CInt_readData |
192 .LM19: |
193 0060 1092 0000 sts retry_cnt,__zero_reg__ |
148:I2CInterface.c **** |
149:I2CInterface.c **** /* Generate start condition, the remainder of the transfer is interrupt driven and |
GAS LISTING /tmp/ccQb65z2.s page 7 |
150:I2CInterface.c **** will be performed in the background */ |
151:I2CInterface.c **** TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE); |
194 .stabn 68,0,151,.LM20-I2CInt_readData |
195 .LM20: |
196 0064 85EA ldi r24,lo8(-91) |
197 0066 86BF out 86-0x20,r24 |
152:I2CInterface.c **** |
153:I2CInterface.c **** status |= (1<<BUSY); |
198 .stabn 68,0,153,.LM21-I2CInt_readData |
199 .LM21: |
200 0068 8091 0000 lds r24,status |
201 006c 8068 ori r24,lo8(-128) |
202 006e 8093 0000 sts status,r24 |
203 /* epilogue: frame size=0 */ |
204 0072 0895 ret |
205 /* epilogue end (size=1) */ |
206 /* function I2CInt_readData size 26 (25) */ |
207 .size I2CInt_readData, .-I2CInt_readData |
208 .Lscope2: |
209 .stabs "",36,0,0,.Lscope2-I2CInt_readData |
210 .stabd 78,0,0 |
211 .stabs "I2CInt_isI2cBusy:F(7,1)",36,0,166,I2CInt_isI2cBusy |
212 .global I2CInt_isI2cBusy |
213 .type I2CInt_isI2cBusy, @function |
214 I2CInt_isI2cBusy: |
215 .stabd 46,0,0 |
154:I2CInterface.c **** } |
155:I2CInterface.c **** |
156:I2CInterface.c **** /*********************************************************** |
157:I2CInterface.c **** Function Name: I2CInt_isI2cBusy |
158:I2CInterface.c **** Function Description: This funcion is responsible for |
159:I2CInterface.c **** indicating if the I2C bus is currently busy to external |
160:I2CInterface.c **** modules. |
161:I2CInterface.c **** device. |
162:I2CInterface.c **** Inputs: none |
163:I2CInterface.c **** Outputs: bool_t - indicating if bus is busy |
164:I2CInterface.c **** ***********************************************************/ |
165:I2CInterface.c **** bool_t I2CInt_isI2cBusy(void) |
166:I2CInterface.c **** { |
216 .stabn 68,0,166,.LM22-I2CInt_isI2cBusy |
217 .LM22: |
218 /* prologue: frame size=0 */ |
219 /* prologue end (size=0) */ |
167:I2CInterface.c **** bool_t retVal = FALSE; |
168:I2CInterface.c **** if ( (status & (1<<BUSY)) != 0) |
220 .stabn 68,0,168,.LM23-I2CInt_isI2cBusy |
221 .LM23: |
222 0074 8091 0000 lds r24,status |
223 0078 881F rol r24 |
224 007a 8827 clr r24 |
225 007c 881F rol r24 |
169:I2CInterface.c **** { |
170:I2CInterface.c **** retVal = TRUE; |
171:I2CInterface.c **** } |
172:I2CInterface.c **** |
173:I2CInterface.c **** return(retVal); |
174:I2CInterface.c **** } |
GAS LISTING /tmp/ccQb65z2.s page 8 |
226 .stabn 68,0,174,.LM24-I2CInt_isI2cBusy |
227 .LM24: |
228 007e 9927 clr r25 |
229 /* epilogue: frame size=0 */ |
230 0080 0895 ret |
231 /* epilogue end (size=1) */ |
232 /* function I2CInt_isI2cBusy size 7 (6) */ |
233 .size I2CInt_isI2cBusy, .-I2CInt_isI2cBusy |
234 .Lscope3: |
235 .stabs "",36,0,0,.Lscope3-I2CInt_isI2cBusy |
236 .stabd 78,0,0 |
237 .stabs "__vector_17:F(0,15)",36,0,185,__vector_17 |
238 .global __vector_17 |
239 .type __vector_17, @function |
240 __vector_17: |
241 .stabd 46,0,0 |
175:I2CInterface.c **** |
176:I2CInterface.c **** /*********************************************************** |
177:I2CInterface.c **** Function Name: <interrupt handler for I2C> |
178:I2CInterface.c **** Function Description: This function is responsible for |
179:I2CInterface.c **** implementing the control logic needed to perform a |
180:I2CInterface.c **** read or write operation with an I2C slave. |
181:I2CInterface.c **** Inputs: none |
182:I2CInterface.c **** Outputs: none |
183:I2CInterface.c **** ***********************************************************/ |
184:I2CInterface.c **** SIGNAL(SIG_2WIRE_SERIAL) |
185:I2CInterface.c **** { |
242 .stabn 68,0,185,.LM25-__vector_17 |
243 .LM25: |
244 /* prologue: frame size=0 */ |
245 0082 1F92 push __zero_reg__ |
246 0084 0F92 push __tmp_reg__ |
247 0086 0FB6 in __tmp_reg__,__SREG__ |
248 0088 0F92 push __tmp_reg__ |
249 008a 1124 clr __zero_reg__ |
250 008c 8F93 push r24 |
251 008e 9F93 push r25 |
252 0090 AF93 push r26 |
253 0092 BF93 push r27 |
254 0094 EF93 push r30 |
255 0096 FF93 push r31 |
256 /* prologue end (size=11) */ |
186:I2CInterface.c **** unsigned char TWI_status = TWSR & TW_STATUS_MASK; /* grab just the status bits */ |
257 .stabn 68,0,186,.LM26-__vector_17 |
258 .LM26: |
259 0098 81B1 in r24,33-0x20 |
187:I2CInterface.c **** |
188:I2CInterface.c **** /* the entire I2C handler is state-based...determine |
189:I2CInterface.c **** what needs to be done based on TWI_status */ |
190:I2CInterface.c **** switch(TWI_status) |
260 .stabn 68,0,190,.LM27-__vector_17 |
261 .LM27: |
262 009a 9927 clr r25 |
263 009c AA27 clr r26 |
264 009e BB27 clr r27 |
265 00a0 887F andi r24,lo8(248) |
266 00a2 9070 andi r25,hi8(248) |
GAS LISTING /tmp/ccQb65z2.s page 9 |
267 00a4 A070 andi r26,hlo8(248) |
268 00a6 B070 andi r27,hhi8(248) |
269 00a8 FC01 movw r30,r24 |
270 00aa 3897 sbiw r30,8 |
271 00ac E135 cpi r30,81 |
272 00ae F105 cpc r31,__zero_reg__ |
273 00b0 08F0 brlo .+2 |
274 00b2 9AC0 rjmp .L42 |
275 .stabn 68,0,190,.LM28-__vector_17 |
276 .LM28: |
277 00b4 E050 subi r30,lo8(-(pm(.L33))) |
278 00b6 F040 sbci r31,hi8(-(pm(.L33))) |
279 00b8 0994 ijmp |
280 .data |
281 .section .progmem.gcc_sw_table, "ax", @progbits |
282 .p2align 1 |
283 .L33: |
284 .data |
285 .section .progmem.gcc_sw_table, "ax", @progbits |
286 .p2align 1 |
287 0000 00C0 rjmp .L25 |
288 0002 00C0 rjmp .L42 |
289 0004 00C0 rjmp .L42 |
290 0006 00C0 rjmp .L42 |
291 0008 00C0 rjmp .L42 |
292 000a 00C0 rjmp .L42 |
293 000c 00C0 rjmp .L42 |
294 000e 00C0 rjmp .L42 |
295 0010 00C0 rjmp .L25 |
296 0012 00C0 rjmp .L42 |
297 0014 00C0 rjmp .L42 |
298 0016 00C0 rjmp .L42 |
299 0018 00C0 rjmp .L42 |
300 001a 00C0 rjmp .L42 |
301 001c 00C0 rjmp .L42 |
302 001e 00C0 rjmp .L42 |
303 0020 00C0 rjmp .L26 |
304 0022 00C0 rjmp .L42 |
305 0024 00C0 rjmp .L42 |
306 0026 00C0 rjmp .L42 |
307 0028 00C0 rjmp .L42 |
308 002a 00C0 rjmp .L42 |
309 002c 00C0 rjmp .L42 |
310 002e 00C0 rjmp .L42 |
311 0030 00C0 rjmp .L27 |
312 0032 00C0 rjmp .L42 |
313 0034 00C0 rjmp .L42 |
314 0036 00C0 rjmp .L42 |
315 0038 00C0 rjmp .L42 |
316 003a 00C0 rjmp .L42 |
317 003c 00C0 rjmp .L42 |
318 003e 00C0 rjmp .L42 |
319 0040 00C0 rjmp .L28 |
320 0042 00C0 rjmp .L42 |
321 0044 00C0 rjmp .L42 |
322 0046 00C0 rjmp .L42 |
323 0048 00C0 rjmp .L42 |
GAS LISTING /tmp/ccQb65z2.s page 10 |
324 004a 00C0 rjmp .L42 |
325 004c 00C0 rjmp .L42 |
326 004e 00C0 rjmp .L42 |
327 0050 00C0 rjmp .L29 |
328 0052 00C0 rjmp .L42 |
329 0054 00C0 rjmp .L42 |
330 0056 00C0 rjmp .L42 |
331 0058 00C0 rjmp .L42 |
332 005a 00C0 rjmp .L42 |
333 005c 00C0 rjmp .L42 |
334 005e 00C0 rjmp .L42 |
335 0060 00C0 rjmp .L42 |
336 0062 00C0 rjmp .L42 |
337 0064 00C0 rjmp .L42 |
338 0066 00C0 rjmp .L42 |
339 0068 00C0 rjmp .L42 |
340 006a 00C0 rjmp .L42 |
341 006c 00C0 rjmp .L42 |
342 006e 00C0 rjmp .L42 |
343 0070 00C0 rjmp .L30 |
344 0072 00C0 rjmp .L42 |
345 0074 00C0 rjmp .L42 |
346 0076 00C0 rjmp .L42 |
347 0078 00C0 rjmp .L42 |
348 007a 00C0 rjmp .L42 |
349 007c 00C0 rjmp .L42 |
350 007e 00C0 rjmp .L42 |
351 0080 00C0 rjmp .L27 |
352 0082 00C0 rjmp .L42 |
353 0084 00C0 rjmp .L42 |
354 0086 00C0 rjmp .L42 |
355 0088 00C0 rjmp .L42 |
356 008a 00C0 rjmp .L42 |
357 008c 00C0 rjmp .L42 |
358 008e 00C0 rjmp .L42 |
359 0090 00C0 rjmp .L31 |
360 0092 00C0 rjmp .L42 |
361 0094 00C0 rjmp .L42 |
362 0096 00C0 rjmp .L42 |
363 0098 00C0 rjmp .L42 |
364 009a 00C0 rjmp .L42 |
365 009c 00C0 rjmp .L42 |
366 009e 00C0 rjmp .L42 |
367 00a0 00C0 rjmp .L32 |
368 .text |
369 .L25: |
191:I2CInterface.c **** { |
192:I2CInterface.c **** case TW_START: /* Start condition */ |
193:I2CInterface.c **** case TW_REP_START: /* Repeated start condition */ |
194:I2CInterface.c **** if(retry_cnt > MAX_TWI_RETRIES) |
370 .stabn 68,0,194,.LM29-__vector_17 |
371 .LM29: |
372 00ba 8091 0000 lds r24,retry_cnt |
373 00be 8330 cpi r24,lo8(3) |
374 00c0 48F0 brlo .L34 |
195:I2CInterface.c **** { |
196:I2CInterface.c **** /* generate stop condition if we've reached our retry limit */ |
GAS LISTING /tmp/ccQb65z2.s page 11 |
197:I2CInterface.c **** TWCR |= (1<<TWINT)|(1<<TWSTO); |
375 .stabn 68,0,197,.LM30-__vector_17 |
376 .LM30: |
377 00c2 86B7 in r24,86-0x20 |
378 00c4 8069 ori r24,lo8(-112) |
379 00c6 86BF out 86-0x20,r24 |
198:I2CInterface.c **** status &= ~(1<<BUSY); |
380 .stabn 68,0,198,.LM31-__vector_17 |
381 .LM31: |
382 00c8 8091 0000 lds r24,status |
383 00cc 8F77 andi r24,lo8(127) |
384 00ce 8093 0000 sts status,r24 |
385 00d2 8AC0 rjmp .L42 |
386 .L34: |
199:I2CInterface.c **** return; |
200:I2CInterface.c **** } |
201:I2CInterface.c **** /* indicate read or write */ |
202:I2CInterface.c **** TWDR = (twi_address<<1) + twi_ddr; |
387 .stabn 68,0,202,.LM32-__vector_17 |
388 .LM32: |
389 00d4 8091 0000 lds r24,twi_address |
390 00d8 9091 0000 lds r25,twi_ddr |
391 00dc 880F lsl r24 |
392 00de 890F add r24,r25 |
393 00e0 83B9 out 35-0x20,r24 |
203:I2CInterface.c **** /* TWSTA must be cleared...also clears TWINT */ |
204:I2CInterface.c **** TWCR &= ~(1<<TWSTA); |
394 .stabn 68,0,204,.LM33-__vector_17 |
395 .LM33: |
396 00e2 86B7 in r24,86-0x20 |
397 00e4 8F7D andi r24,lo8(-33) |
398 00e6 86BF out 86-0x20,r24 |
399 00e8 7FC0 rjmp .L42 |
400 .L26: |
205:I2CInterface.c **** break; |
206:I2CInterface.c **** |
207:I2CInterface.c **** case TW_MT_SLA_ACK: /* Slave acknowledged address, */ |
208:I2CInterface.c **** retry_cnt = 0; |
401 .stabn 68,0,208,.LM34-__vector_17 |
402 .LM34: |
403 00ea 1092 0000 sts retry_cnt,__zero_reg__ |
209:I2CInterface.c **** /* tx the data, and increment the data pointer */ |
210:I2CInterface.c **** TWDR = *twi_data; |
404 .stabn 68,0,210,.LM35-__vector_17 |
405 .LM35: |
406 00ee E091 0000 lds r30,twi_data |
407 00f2 F091 0000 lds r31,(twi_data)+1 |
408 00f6 8081 ld r24,Z |
409 00f8 83B9 out 35-0x20,r24 |
211:I2CInterface.c **** twi_data++; |
410 .stabn 68,0,211,.LM36-__vector_17 |
411 .LM36: |
412 00fa 3196 adiw r30,1 |
413 00fc F093 0000 sts (twi_data)+1,r31 |
414 0100 E093 0000 sts twi_data,r30 |
212:I2CInterface.c **** |
213:I2CInterface.c **** /* clear the int to continue */ |
GAS LISTING /tmp/ccQb65z2.s page 12 |
214:I2CInterface.c **** TWCR |= (1<<TWINT); |
415 .stabn 68,0,214,.LM37-__vector_17 |
416 .LM37: |
417 0104 86B7 in r24,86-0x20 |
418 0106 8068 ori r24,lo8(-128) |
419 0108 86BF out 86-0x20,r24 |
420 010a 6EC0 rjmp .L42 |
421 .L27: |
215:I2CInterface.c **** break; |
216:I2CInterface.c **** |
217:I2CInterface.c **** case TW_MT_SLA_NACK: /* Slave didn't acknowledge address, */ |
218:I2CInterface.c **** case TW_MR_SLA_NACK: |
219:I2CInterface.c **** retry_cnt++; |
422 .stabn 68,0,219,.LM38-__vector_17 |
423 .LM38: |
424 010c 8091 0000 lds r24,retry_cnt |
425 0110 8F5F subi r24,lo8(-(1)) |
426 0112 8093 0000 sts retry_cnt,r24 |
220:I2CInterface.c **** |
221:I2CInterface.c **** /* retry...*/ |
222:I2CInterface.c **** TWCR |= (1<<TWINT)|(1<<TWSTA)|(1<<TWSTO); |
427 .stabn 68,0,222,.LM39-__vector_17 |
428 .LM39: |
429 0116 86B7 in r24,86-0x20 |
430 0118 806B ori r24,lo8(-80) |
431 011a 86BF out 86-0x20,r24 |
432 011c 65C0 rjmp .L42 |
433 .L28: |
223:I2CInterface.c **** break; |
224:I2CInterface.c **** |
225:I2CInterface.c **** case TW_MT_DATA_ACK: /* Slave Acknowledged data, */ |
226:I2CInterface.c **** if(--twi_bytes > 0) |
434 .stabn 68,0,226,.LM40-__vector_17 |
435 .LM40: |
436 011e 8091 0000 lds r24,twi_bytes |
437 0122 8150 subi r24,lo8(-(-1)) |
438 0124 8093 0000 sts twi_bytes,r24 |
439 0128 8091 0000 lds r24,twi_bytes |
440 012c 8823 tst r24 |
441 012e 79F0 breq .L36 |
227:I2CInterface.c **** { |
228:I2CInterface.c **** /* more data to send, so send it */ |
229:I2CInterface.c **** TWDR = *twi_data; |
442 .stabn 68,0,229,.LM41-__vector_17 |
443 .LM41: |
444 0130 E091 0000 lds r30,twi_data |
445 0134 F091 0000 lds r31,(twi_data)+1 |
446 0138 8081 ld r24,Z |
447 013a 83B9 out 35-0x20,r24 |
230:I2CInterface.c **** twi_data++; |
448 .stabn 68,0,230,.LM42-__vector_17 |
449 .LM42: |
450 013c 3196 adiw r30,1 |
451 013e F093 0000 sts (twi_data)+1,r31 |
452 0142 E093 0000 sts twi_data,r30 |
231:I2CInterface.c **** TWCR |= (1<<TWINT); |
453 .stabn 68,0,231,.LM43-__vector_17 |
GAS LISTING /tmp/ccQb65z2.s page 13 |
454 .LM43: |
455 0146 86B7 in r24,86-0x20 |
456 0148 8068 ori r24,lo8(-128) |
457 014a 86BF out 86-0x20,r24 |
458 014c 4DC0 rjmp .L42 |
459 .L36: |
232:I2CInterface.c **** } |
233:I2CInterface.c **** else |
234:I2CInterface.c **** { |
235:I2CInterface.c **** /* generate the stop condition if needed */ |
236:I2CInterface.c **** TWCR |= (1<<TWSTO)|(1<<TWINT); |
460 .stabn 68,0,236,.LM44-__vector_17 |
461 .LM44: |
462 014e 86B7 in r24,86-0x20 |
463 0150 8069 ori r24,lo8(-112) |
464 0152 86BF out 86-0x20,r24 |
237:I2CInterface.c **** status &= ~(1<<BUSY); |
465 .stabn 68,0,237,.LM45-__vector_17 |
466 .LM45: |
467 0154 8091 0000 lds r24,status |
468 0158 8F77 andi r24,lo8(127) |
469 015a 8093 0000 sts status,r24 |
470 015e 44C0 rjmp .L42 |
471 .L29: |
238:I2CInterface.c **** } |
239:I2CInterface.c **** break; |
240:I2CInterface.c **** |
241:I2CInterface.c **** case TW_MT_DATA_NACK: /* Slave didn't acknowledge data */ |
242:I2CInterface.c **** /* send the stop condition */ |
243:I2CInterface.c **** TWCR |= (1<<TWINT)|(1<<TWSTO); |
472 .stabn 68,0,243,.LM46-__vector_17 |
473 .LM46: |
474 0160 86B7 in r24,86-0x20 |
475 0162 8069 ori r24,lo8(-112) |
476 0164 86BF out 86-0x20,r24 |
244:I2CInterface.c **** status &= ~(1<<BUSY); |
477 .stabn 68,0,244,.LM47-__vector_17 |
478 .LM47: |
479 0166 8091 0000 lds r24,status |
480 016a 8F77 andi r24,lo8(127) |
481 016c 8093 0000 sts status,r24 |
482 0170 3BC0 rjmp .L42 |
483 .L30: |
245:I2CInterface.c **** break; |
246:I2CInterface.c **** |
247:I2CInterface.c **** case TW_MR_SLA_ACK: /* Slave acknowledged address */ |
248:I2CInterface.c **** if(--twi_bytes > 0) |
484 .stabn 68,0,248,.LM48-__vector_17 |
485 .LM48: |
486 0172 8091 0000 lds r24,twi_bytes |
487 0176 8150 subi r24,lo8(-(-1)) |
488 0178 8093 0000 sts twi_bytes,r24 |
489 017c 8091 0000 lds r24,twi_bytes |
490 0180 8823 tst r24 |
491 0182 21F0 breq .L38 |
249:I2CInterface.c **** { |
250:I2CInterface.c **** /* if there is more than one byte to read, acknowledge */ |
GAS LISTING /tmp/ccQb65z2.s page 14 |
251:I2CInterface.c **** TWCR |= (1<<TWEA)|(1<<TWINT); |
492 .stabn 68,0,251,.LM49-__vector_17 |
493 .LM49: |
494 0184 86B7 in r24,86-0x20 |
495 0186 806C ori r24,lo8(-64) |
496 0188 86BF out 86-0x20,r24 |
497 018a 2EC0 rjmp .L42 |
498 .L38: |
252:I2CInterface.c **** } |
253:I2CInterface.c **** else |
254:I2CInterface.c **** { |
255:I2CInterface.c **** /* no acknowledge */ |
256:I2CInterface.c **** TWCR |= (1<<TWINT); |
499 .stabn 68,0,256,.LM50-__vector_17 |
500 .LM50: |
501 018c 86B7 in r24,86-0x20 |
502 018e 8068 ori r24,lo8(-128) |
503 0190 86BF out 86-0x20,r24 |
504 0192 2AC0 rjmp .L42 |
505 .L31: |
257:I2CInterface.c **** } |
258:I2CInterface.c **** break; |
259:I2CInterface.c **** |
260:I2CInterface.c **** case TW_MR_DATA_ACK: /* Master acknowledged data */ |
261:I2CInterface.c **** |
262:I2CInterface.c **** /* grab the received data */ |
263:I2CInterface.c **** *twi_data = TWDR; |
506 .stabn 68,0,263,.LM51-__vector_17 |
507 .LM51: |
508 0194 E091 0000 lds r30,twi_data |
509 0198 F091 0000 lds r31,(twi_data)+1 |
510 019c 83B1 in r24,35-0x20 |
511 019e 8083 st Z,r24 |
264:I2CInterface.c **** twi_data++; |
512 .stabn 68,0,264,.LM52-__vector_17 |
513 .LM52: |
514 01a0 3196 adiw r30,1 |
515 01a2 F093 0000 sts (twi_data)+1,r31 |
516 01a6 E093 0000 sts twi_data,r30 |
265:I2CInterface.c **** if(--twi_bytes > 0) |
517 .stabn 68,0,265,.LM53-__vector_17 |
518 .LM53: |
519 01aa 8091 0000 lds r24,twi_bytes |
520 01ae 8150 subi r24,lo8(-(-1)) |
521 01b0 8093 0000 sts twi_bytes,r24 |
522 01b4 8091 0000 lds r24,twi_bytes |
523 01b8 8823 tst r24 |
524 01ba 21F0 breq .L40 |
266:I2CInterface.c **** { |
267:I2CInterface.c **** /* get the next data byte and ack */ |
268:I2CInterface.c **** TWCR |= (1<<TWEA)|(1<<TWINT); |
525 .stabn 68,0,268,.LM54-__vector_17 |
526 .LM54: |
527 01bc 86B7 in r24,86-0x20 |
528 01be 806C ori r24,lo8(-64) |
529 01c0 86BF out 86-0x20,r24 |
530 01c2 12C0 rjmp .L42 |
GAS LISTING /tmp/ccQb65z2.s page 15 |
531 .L40: |
269:I2CInterface.c **** } |
270:I2CInterface.c **** else |
271:I2CInterface.c **** { |
272:I2CInterface.c **** /* clear out the enable acknowledge bit */ |
273:I2CInterface.c **** TWCR &= ~(1<<TWEA); |
532 .stabn 68,0,273,.LM55-__vector_17 |
533 .LM55: |
534 01c4 86B7 in r24,86-0x20 |
535 01c6 8F7B andi r24,lo8(-65) |
536 01c8 86BF out 86-0x20,r24 |
537 01ca 0EC0 rjmp .L42 |
538 .L32: |
274:I2CInterface.c **** } |
275:I2CInterface.c **** break; |
276:I2CInterface.c **** |
277:I2CInterface.c **** case TW_MR_DATA_NACK: /* Master didn't acknowledge data -> end of read process */ |
278:I2CInterface.c **** /* read data, and generate the stop condition */ |
279:I2CInterface.c **** *twi_data = TWDR; |
539 .stabn 68,0,279,.LM56-__vector_17 |
540 .LM56: |
541 01cc E091 0000 lds r30,twi_data |
542 01d0 F091 0000 lds r31,(twi_data)+1 |
543 01d4 83B1 in r24,35-0x20 |
544 01d6 8083 st Z,r24 |
280:I2CInterface.c **** TWCR |= (1<<TWSTO)|(1<<TWINT); |
545 .stabn 68,0,280,.LM57-__vector_17 |
546 .LM57: |
547 01d8 86B7 in r24,86-0x20 |
548 01da 8069 ori r24,lo8(-112) |
549 01dc 86BF out 86-0x20,r24 |
281:I2CInterface.c **** status &= ~(1<<BUSY); |
550 .stabn 68,0,281,.LM58-__vector_17 |
551 .LM58: |
552 01de 8091 0000 lds r24,status |
553 01e2 8F77 andi r24,lo8(127) |
554 01e4 8093 0000 sts status,r24 |
555 .L42: |
556 /* epilogue: frame size=0 */ |
557 01e8 FF91 pop r31 |
558 01ea EF91 pop r30 |
559 01ec BF91 pop r27 |
560 01ee AF91 pop r26 |
561 01f0 9F91 pop r25 |
562 01f2 8F91 pop r24 |
563 01f4 0F90 pop __tmp_reg__ |
564 01f6 0FBE out __SREG__,__tmp_reg__ |
565 01f8 0F90 pop __tmp_reg__ |
566 01fa 1F90 pop __zero_reg__ |
567 01fc 1895 reti |
568 /* epilogue end (size=11) */ |
569 /* function __vector_17 size 271 (249) */ |
570 .size __vector_17, .-__vector_17 |
571 .Lscope4: |
572 .stabs "",36,0,0,.Lscope4-__vector_17 |
573 .stabd 78,0,0 |
574 .lcomm twi_address,1 |
GAS LISTING /tmp/ccQb65z2.s page 16 |
575 .lcomm twi_data,2 |
576 .lcomm twi_ddr,1 |
577 .lcomm twi_bytes,1 |
578 .lcomm status,1 |
579 .lcomm retry_cnt,1 |
580 .stabs "twi_address:S(0,17)=B(0,11)",40,0,59,twi_address |
581 .stabs "twi_data:S(0,18)=*(0,17)",40,0,60,twi_data |
582 .stabs "twi_ddr:S(0,17)",40,0,61,twi_ddr |
583 .stabs "twi_bytes:S(0,17)",40,0,62,twi_bytes |
584 .stabs "status:S(0,17)",40,0,63,status |
585 .stabs "retry_cnt:S(0,17)",40,0,64,retry_cnt |
586 .stabs "",100,0,0,.Letext0 |
587 .Letext0: |
588 /* File "I2CInterface.c": code 336 = 0x0150 ( 310), prologues 11, epilogues 15 */ |
GAS LISTING /tmp/ccQb65z2.s page 17 |
DEFINED SYMBOLS |
*ABS*:00000000 I2CInterface.c |
/tmp/ccQb65z2.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccQb65z2.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccQb65z2.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccQb65z2.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccQb65z2.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccQb65z2.s:79 .text:00000000 I2CInt_init |
/tmp/ccQb65z2.s:106 .text:00000008 I2CInt_writeData |
/tmp/ccQb65z2.s:577 .bss:00000005 status |
.bss:00000000 twi_address |
/tmp/ccQb65z2.s:574 .bss:00000001 twi_data |
/tmp/ccQb65z2.s:576 .bss:00000004 twi_bytes |
/tmp/ccQb65z2.s:575 .bss:00000003 twi_ddr |
/tmp/ccQb65z2.s:578 .bss:00000006 retry_cnt |
/tmp/ccQb65z2.s:164 .text:00000040 I2CInt_readData |
/tmp/ccQb65z2.s:214 .text:00000074 I2CInt_isI2cBusy |
/tmp/ccQb65z2.s:240 .text:00000082 __vector_17 |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
/programy/Atmel_C/AVRcam/Main.lst |
---|
1,4 → 1,4 |
GAS LISTING /tmp/ccSepUfa.s page 1 |
GAS LISTING /tmp/cciGcq4n.s page 1 |
1 .file "Main.c" |
10,7 → 10,7 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0 |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "Main.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
58,7 → 58,7 |
55 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0 |
56 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0 |
57 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0 |
GAS LISTING /tmp/ccSepUfa.s page 2 |
GAS LISTING /tmp/cciGcq4n.s page 2 |
58 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0 |
118,7 → 118,7 |
25:Main.c **** */ |
26:Main.c **** /*********************************************************** |
27:Main.c **** Module Name: Main.c |
GAS LISTING /tmp/ccSepUfa.s page 3 |
GAS LISTING /tmp/cciGcq4n.s page 3 |
28:Main.c **** Module Date: 04/10/2004 |
178,7 → 178,7 |
97 .LM1: |
98 0008 00D0 rcall DebugInt_init |
73:Main.c **** UartInt_init(); |
GAS LISTING /tmp/ccSepUfa.s page 4 |
GAS LISTING /tmp/cciGcq4n.s page 4 |
99 .stabn 68,0,73,.LM2-main |
238,7 → 238,7 |
132 0020 80E0 ldi r24,lo8(0) |
133 0022 90E0 ldi r25,hi8(0) |
134 /* epilogue: frame size=0 */ |
GAS LISTING /tmp/ccSepUfa.s page 5 |
GAS LISTING /tmp/cciGcq4n.s page 5 |
135 0024 00C0 rjmp exit |
251,17 → 251,17 |
142 .stabs "",100,0,0,.Letext0 |
143 .Letext0: |
144 /* File "Main.c": code 20 = 0x0014 ( 15), prologues 4, epilogues 1 */ |
GAS LISTING /tmp/ccSepUfa.s page 6 |
GAS LISTING /tmp/cciGcq4n.s page 6 |
DEFINED SYMBOLS |
*ABS*:00000000 Main.c |
/tmp/ccSepUfa.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccSepUfa.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccSepUfa.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccSepUfa.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccSepUfa.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccSepUfa.s:86 .text:00000000 main |
/tmp/cciGcq4n.s:3 *ABS*:0000003f __SREG__ |
/tmp/cciGcq4n.s:4 *ABS*:0000003e __SP_H__ |
/tmp/cciGcq4n.s:5 *ABS*:0000003d __SP_L__ |
/tmp/cciGcq4n.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/cciGcq4n.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/cciGcq4n.s:86 .text:00000000 main |
UNDEFINED SYMBOLS |
__do_copy_data |
/programy/Atmel_C/AVRcam/UIMgr.lst |
---|
1,4 → 1,4 |
GAS LISTING /tmp/cc2L16GD.s page 1 |
GAS LISTING /tmp/cct6zTlg.s page 1 |
1 .file "UIMgr.c" |
10,7 → 10,7 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0 |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "UIMgr.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
58,7 → 58,7 |
55 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0 |
56 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0 |
57 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0 |
GAS LISTING /tmp/cc2L16GD.s page 2 |
GAS LISTING /tmp/cct6zTlg.s page 2 |
58 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0 |
118,7 → 118,7 |
17:UIMgr.c **** License along with this program; if not, write to the Free Software |
18:UIMgr.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19:UIMgr.c **** |
GAS LISTING /tmp/cc2L16GD.s page 3 |
GAS LISTING /tmp/cct6zTlg.s page 3 |
20:UIMgr.c **** For more information on the AVRcam, please contact: |
178,7 → 178,7 |
74:UIMgr.c **** dumpFrameCmd, |
75:UIMgr.c **** enableTrackingCmd, |
76:UIMgr.c **** disableTrackingCmd, |
GAS LISTING /tmp/cc2L16GD.s page 4 |
GAS LISTING /tmp/cct6zTlg.s page 4 |
77:UIMgr.c **** setColorMapCmd, |
238,7 → 238,7 |
131:UIMgr.c **** initializing the UIMgr module. It sets up the fifo |
132:UIMgr.c **** used to hold incoming data, etc. |
133:UIMgr.c **** Inputs: none |
GAS LISTING /tmp/cc2L16GD.s page 5 |
GAS LISTING /tmp/cct6zTlg.s page 5 |
134:UIMgr.c **** Outputs: none |
298,7 → 298,7 |
188:UIMgr.c **** parsing any serial data waiting in the rx fifo |
189:UIMgr.c **** Inputs: none |
190:UIMgr.c **** Outputs: none |
GAS LISTING /tmp/cc2L16GD.s page 6 |
GAS LISTING /tmp/cct6zTlg.s page 6 |
191:UIMgr.c **** ***********************************************************/ |
358,7 → 358,7 |
245:UIMgr.c **** means we have received a token, with tokenCount == 0, which means it is a |
246:UIMgr.c **** command...why is this contributing to tokenCount? |
247:UIMgr.c **** This might cause the set color map command to include too much data, since |
GAS LISTING /tmp/cc2L16GD.s page 7 |
GAS LISTING /tmp/cct6zTlg.s page 7 |
248:UIMgr.c **** it sets the color map based on tokenCount...CHECK*/ |
418,7 → 418,7 |
302:UIMgr.c **** executing whatever cmd is stored in the receivedCmd |
303:UIMgr.c **** object. |
304:UIMgr.c **** Inputs: none |
GAS LISTING /tmp/cc2L16GD.s page 8 |
GAS LISTING /tmp/cct6zTlg.s page 8 |
305:UIMgr.c **** Outputs: none |
478,7 → 478,7 |
359:UIMgr.c **** } |
360:UIMgr.c **** else if (receivedCmd == disableTrackingCmd) |
361:UIMgr.c **** { |
GAS LISTING /tmp/cc2L16GD.s page 9 |
GAS LISTING /tmp/cct6zTlg.s page 9 |
362:UIMgr.c **** PUBLISH_EVENT(EV_DISABLE_TRACKING); |
538,7 → 538,7 |
416:UIMgr.c **** access the asciiTokenBuffer directly, and store the |
417:UIMgr.c **** result in the appropriate token buffer. |
418:UIMgr.c **** Inputs: none |
GAS LISTING /tmp/cc2L16GD.s page 10 |
GAS LISTING /tmp/cct6zTlg.s page 10 |
419:UIMgr.c **** Outputs: none |
598,7 → 598,7 |
473:UIMgr.c **** /* the user wants to set registers in the OV6620 */ |
474:UIMgr.c **** receivedCmd = setCameraRegsCmd; |
475:UIMgr.c **** } |
GAS LISTING /tmp/cc2L16GD.s page 11 |
GAS LISTING /tmp/cct6zTlg.s page 11 |
476:UIMgr.c **** else if ( (asciiTokenBuffer[0] == 'E') && |
658,7 → 658,7 |
530:UIMgr.c **** { |
531:UIMgr.c **** UIMgr_writeTxFifo('N'); |
532:UIMgr.c **** UIMgr_writeTxFifo('C'); |
GAS LISTING /tmp/cc2L16GD.s page 12 |
GAS LISTING /tmp/cct6zTlg.s page 12 |
533:UIMgr.c **** UIMgr_writeTxFifo('K'); |
718,7 → 718,7 |
125 001c 8091 0000 lds r24,UIMgr_txFifoHead |
126 0020 FA01 movw r30,r20 |
127 0022 E80F add r30,r24 |
GAS LISTING /tmp/cc2L16GD.s page 13 |
GAS LISTING /tmp/cct6zTlg.s page 13 |
128 0024 F11D adc r31,__zero_reg__ |
778,7 → 778,7 |
579:UIMgr.c **** UartInt_txByte(*pData++); |
580:UIMgr.c **** } |
581:UIMgr.c **** } |
GAS LISTING /tmp/cc2L16GD.s page 14 |
GAS LISTING /tmp/cct6zTlg.s page 14 |
582:UIMgr.c **** |
838,7 → 838,7 |
632:UIMgr.c **** |
633:UIMgr.c **** /* just return the current tail from the tx fifo */ |
634:UIMgr.c **** DISABLE_INTS(); |
GAS LISTING /tmp/cc2L16GD.s page 15 |
GAS LISTING /tmp/cct6zTlg.s page 15 |
165 .stabn 68,0,634,.LM9-UIMgr_readTxFifo |
898,7 → 898,7 |
646:UIMgr.c **** writing a single byte to the TxFifo and |
647:UIMgr.c **** updating the appropriate pointers. |
648:UIMgr.c **** Inputs: data - the byte to write to the Fifo |
GAS LISTING /tmp/cc2L16GD.s page 16 |
GAS LISTING /tmp/cct6zTlg.s page 16 |
649:UIMgr.c **** Outputs: none |
958,7 → 958,7 |
249 .LM19: |
250 /* prologue: frame size=0 */ |
251 /* prologue end (size=0) */ |
GAS LISTING /tmp/cc2L16GD.s page 17 |
GAS LISTING /tmp/cct6zTlg.s page 17 |
252 .stabn 68,0,593,.LM20-UIMgr_flushTxBuffer |
1018,7 → 1018,7 |
306 00ac 0250 subi r16,lo8(-(-2)) |
307 .L22: |
308 .stabn 68,0,579,.LM26-UIMgr_txBuffer |
GAS LISTING /tmp/cc2L16GD.s page 18 |
GAS LISTING /tmp/cct6zTlg.s page 18 |
309 .LM26: |
1078,7 → 1078,7 |
363 .stabn 68,0,450,.LM31-UIMgr_convertTokenToCmd |
364 .LM31: |
365 /* prologue: frame size=0 */ |
GAS LISTING /tmp/cc2L16GD.s page 19 |
GAS LISTING /tmp/cct6zTlg.s page 19 |
366 /* prologue end (size=0) */ |
1138,7 → 1138,7 |
420 .L32: |
421 .stabn 68,0,476,.LM41-UIMgr_convertTokenToCmd |
422 .LM41: |
GAS LISTING /tmp/cc2L16GD.s page 20 |
GAS LISTING /tmp/cct6zTlg.s page 20 |
423 0126 9534 cpi r25,lo8(69) |
1198,7 → 1198,7 |
477 .L34: |
478 .stabn 68,0,503,.LM50-UIMgr_convertTokenToCmd |
479 .LM50: |
GAS LISTING /tmp/cc2L16GD.s page 21 |
GAS LISTING /tmp/cct6zTlg.s page 21 |
480 017c 83E0 ldi r24,lo8(3) |
1258,7 → 1258,7 |
534 01bc E0E0 ldi r30,lo8(UIMgr_rxFifo) |
535 01be F0E0 ldi r31,hi8(UIMgr_rxFifo) |
536 01c0 1192 st Z+,__zero_reg__ |
GAS LISTING /tmp/cc2L16GD.s page 22 |
GAS LISTING /tmp/cct6zTlg.s page 22 |
537 01c2 8A95 dec r24 |
1318,7 → 1318,7 |
591 .stabn 68,0,437,.LM64-UIMgr_convertTokenToValue |
592 .LM64: |
593 01fe 83E0 ldi r24,lo8(3) |
GAS LISTING /tmp/cc2L16GD.s page 23 |
GAS LISTING /tmp/cct6zTlg.s page 23 |
594 0200 E0E0 ldi r30,lo8(asciiTokenBuffer) |
1378,7 → 1378,7 |
648 0230 F040 sbci r31,hi8(-(UIMgr_rxFifo)) |
649 0232 9081 ld r25,Z |
650 .stabn 68,0,615,.LM70-UIMgr_processReceivedData |
GAS LISTING /tmp/cc2L16GD.s page 24 |
GAS LISTING /tmp/cct6zTlg.s page 24 |
651 .LM70: |
1438,7 → 1438,7 |
705 .LM80: |
706 0272 83E4 ldi r24,lo8(67) |
707 0274 F2DE rcall UIMgr_writeTxFifo |
GAS LISTING /tmp/cc2L16GD.s page 25 |
GAS LISTING /tmp/cct6zTlg.s page 25 |
708 .stabn 68,0,533,.LM81-UIMgr_processReceivedData |
1498,7 → 1498,7 |
762 02a6 8091 0000 lds r24,AVRcamVersion |
763 02aa 8823 tst r24 |
764 02ac 09F4 brne .+2 |
GAS LISTING /tmp/cc2L16GD.s page 26 |
GAS LISTING /tmp/cct6zTlg.s page 26 |
765 02ae 73C0 rjmp .L73 |
1558,7 → 1558,7 |
819 02ea FF27 clr r31 |
820 02ec E050 subi r30,lo8(-(tokenBuffer)) |
821 02ee F040 sbci r31,hi8(-(tokenBuffer)) |
GAS LISTING /tmp/cc2L16GD.s page 27 |
GAS LISTING /tmp/cct6zTlg.s page 27 |
822 02f0 6181 ldd r22,Z+1 |
1618,7 → 1618,7 |
876 0334 60E0 ldi r22,lo8(colorMap) |
877 0336 70E0 ldi r23,hi8(colorMap) |
878 .L94: |
GAS LISTING /tmp/cc2L16GD.s page 28 |
GAS LISTING /tmp/cct6zTlg.s page 28 |
879 .stabn 68,0,369,.LM111-UIMgr_processReceivedData |
1678,7 → 1678,7 |
36:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
37:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Contributors: |
38:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** Created by Marek Michalkiewicz <marekm@linux.org.pl> |
GAS LISTING /tmp/cc2L16GD.s page 29 |
GAS LISTING /tmp/cct6zTlg.s page 29 |
39:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** eeprom_write_word and eeprom_write_block added by Artur Lipowski |
1738,7 → 1738,7 |
93:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** mode interface. Applications that require interrupt-controlled |
94:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** EEPROM access to ensure that no time will be wasted in spinloops |
95:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** will have to deploy their own implementation. |
GAS LISTING /tmp/cc2L16GD.s page 30 |
GAS LISTING /tmp/cct6zTlg.s page 30 |
96:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
1798,7 → 1798,7 |
150:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
151:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /*@{*/ |
152:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** |
GAS LISTING /tmp/cc2L16GD.s page 31 |
GAS LISTING /tmp/cct6zTlg.s page 31 |
153:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** /** \def EEMEM |
1858,7 → 1858,7 |
912 035a C1F0 breq .L95 |
913 .LBB32: |
914 .LBB33: |
GAS LISTING /tmp/cc2L16GD.s page 32 |
GAS LISTING /tmp/cct6zTlg.s page 32 |
915 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h",132,0,0,.Ltext3 |
1918,7 → 1918,7 |
245:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** "z" (pointer_ram) |
246:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** : "memory"); |
247:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** } |
GAS LISTING /tmp/cc2L16GD.s page 33 |
GAS LISTING /tmp/cct6zTlg.s page 33 |
248:/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/eeprom.h **** else |
1978,7 → 1978,7 |
932 0364 00D0 rcall __eeprom_read_byte_1C1D1E |
933 0366 802D mov r24,__tmp_reg__ |
934 /* #NOAPP */ |
GAS LISTING /tmp/cc2L16GD.s page 34 |
GAS LISTING /tmp/cct6zTlg.s page 34 |
935 .LBE35: |
2038,7 → 2038,7 |
989 .LBB43: |
990 .stabn 68,0,192,.LM121-UIMgr_processReceivedData |
991 .LM121: |
GAS LISTING /tmp/cc2L16GD.s page 35 |
GAS LISTING /tmp/cct6zTlg.s page 35 |
992 0386 D901 movw r26,r18 |
2098,7 → 2098,7 |
1046 03c4 CF97 sbiw r24,63 |
1047 03c6 4CF0 brlt .L103 |
1048 .stabn 68,0,259,.LM130-UIMgr_processReceivedData |
GAS LISTING /tmp/cc2L16GD.s page 36 |
GAS LISTING /tmp/cct6zTlg.s page 36 |
1049 .LM130: |
2158,7 → 2158,7 |
1103 .stabn 68,0,284,.LM141-UIMgr_processReceivedData |
1104 .LM141: |
1105 0418 F092 0000 sts receivedCmd,r15 |
GAS LISTING /tmp/cc2L16GD.s page 37 |
GAS LISTING /tmp/cct6zTlg.s page 37 |
1106 .stabn 68,0,285,.LM142-UIMgr_processReceivedData |
2218,7 → 2218,7 |
1160 .stabn 68,0,153,.LM148-UIMgr_dispatchEvent |
1161 .LM148: |
1162 0446 8039 cpi r24,lo8(-112) |
GAS LISTING /tmp/cc2L16GD.s page 38 |
GAS LISTING /tmp/cct6zTlg.s page 38 |
1163 0448 39F0 breq .L124 |
2278,7 → 2278,7 |
1217 .data |
1218 .type receivedCmd, @object |
1219 .size receivedCmd, 1 |
GAS LISTING /tmp/cc2L16GD.s page 39 |
GAS LISTING /tmp/cct6zTlg.s page 39 |
1220 receivedCmd: |
2313,40 → 2313,40 |
1246 .stabs "",100,0,0,.Letext0 |
1247 .Letext0: |
1248 /* File "UIMgr.c": code 582 = 0x0246 ( 557), prologues 9, epilogues 16 */ |
GAS LISTING /tmp/cc2L16GD.s page 40 |
GAS LISTING /tmp/cct6zTlg.s page 40 |
DEFINED SYMBOLS |
*ABS*:00000000 UIMgr.c |
/tmp/cc2L16GD.s:3 *ABS*:0000003f __SREG__ |
/tmp/cc2L16GD.s:4 *ABS*:0000003e __SP_H__ |
/tmp/cc2L16GD.s:5 *ABS*:0000003d __SP_L__ |
/tmp/cc2L16GD.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/cc2L16GD.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/cc2L16GD.s:94 .text:00000000 UIMgr_writeBufferToTxFifo |
/tmp/cct6zTlg.s:3 *ABS*:0000003f __SREG__ |
/tmp/cct6zTlg.s:4 *ABS*:0000003e __SP_H__ |
/tmp/cct6zTlg.s:5 *ABS*:0000003d __SP_L__ |
/tmp/cct6zTlg.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/cct6zTlg.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/cct6zTlg.s:94 .text:00000000 UIMgr_writeBufferToTxFifo |
*COM*:00000040 UIMgr_txFifo |
/tmp/cc2L16GD.s:1208 .bss:00000002 UIMgr_txFifoHead |
/tmp/cc2L16GD.s:159 .text:0000003c UIMgr_readTxFifo |
/tmp/cc2L16GD.s:1214 .bss:00000003 UIMgr_txFifoTail |
/tmp/cc2L16GD.s:206 .text:0000005a UIMgr_writeTxFifo |
/tmp/cc2L16GD.s:246 .text:00000076 UIMgr_flushTxBuffer |
/tmp/cc2L16GD.s:284 .text:00000094 UIMgr_txBuffer |
/tmp/cc2L16GD.s:333 .text:000000c2 UIMgr_transmitPendingData |
/tmp/cc2L16GD.s:361 .text:000000d4 UIMgr_convertTokenToCmd |
/tmp/cc2L16GD.s:1223 .bss:00000007 asciiTokenBuffer |
/tmp/cc2L16GD.s:1220 .data:00000000 receivedCmd |
/tmp/cc2L16GD.s:1222 .bss:00000006 charIndex |
/tmp/cc2L16GD.s:1216 .bss:00000005 charCount |
/tmp/cc2L16GD.s:503 .text:00000192 UIMgr_init |
/tmp/cc2L16GD.s:1228 .bss:0000000b tokenBuffer |
/tmp/cct6zTlg.s:1208 .bss:00000002 UIMgr_txFifoHead |
/tmp/cct6zTlg.s:159 .text:0000003c UIMgr_readTxFifo |
/tmp/cct6zTlg.s:1214 .bss:00000003 UIMgr_txFifoTail |
/tmp/cct6zTlg.s:206 .text:0000005a UIMgr_writeTxFifo |
/tmp/cct6zTlg.s:246 .text:00000076 UIMgr_flushTxBuffer |
/tmp/cct6zTlg.s:284 .text:00000094 UIMgr_txBuffer |
/tmp/cct6zTlg.s:333 .text:000000c2 UIMgr_transmitPendingData |
/tmp/cct6zTlg.s:361 .text:000000d4 UIMgr_convertTokenToCmd |
/tmp/cct6zTlg.s:1223 .bss:00000007 asciiTokenBuffer |
/tmp/cct6zTlg.s:1220 .data:00000000 receivedCmd |
/tmp/cct6zTlg.s:1222 .bss:00000006 charIndex |
/tmp/cct6zTlg.s:1216 .bss:00000005 charCount |
/tmp/cct6zTlg.s:503 .text:00000192 UIMgr_init |
/tmp/cct6zTlg.s:1228 .bss:0000000b tokenBuffer |
*COM*:00000020 UIMgr_rxFifo |
/tmp/cc2L16GD.s:549 .text:000001c8 UIMgr_convertTokenToValue |
/tmp/cct6zTlg.s:549 .text:000001c8 UIMgr_convertTokenToValue |
.bss:00000004 tokenCount |
/tmp/cc2L16GD.s:619 .text:00000214 UIMgr_processReceivedData |
/tmp/cc2L16GD.s:1202 .bss:00000001 UIMgr_rxFifoTail |
/tmp/cc2L16GD.s:1226 .data:00000001 AVRcamVersion |
/tmp/cc2L16GD.s:1196 .bss:00000000 UIMgr_rxFifoHead |
/tmp/cc2L16GD.s:1150 .text:00000442 UIMgr_dispatchEvent |
/tmp/cct6zTlg.s:619 .text:00000214 UIMgr_processReceivedData |
/tmp/cct6zTlg.s:1202 .bss:00000001 UIMgr_rxFifoTail |
/tmp/cct6zTlg.s:1226 .data:00000001 AVRcamVersion |
/tmp/cct6zTlg.s:1196 .bss:00000000 UIMgr_rxFifoHead |
/tmp/cct6zTlg.s:1150 .text:00000442 UIMgr_dispatchEvent |
UNDEFINED SYMBOLS |
__do_copy_data |
/programy/Atmel_C/AVRcam/UartInterface.c |
---|
50,7 → 50,6 |
/* Includes */ |
#include <avr/io.h> |
#include <avr/interrupt.h> |
#include <avr/signal.h> |
#include "CommonDefs.h" |
#include "UartInterface.h" |
#include "UIMgr.h" |
/programy/Atmel_C/AVRcam/UartInterface.lst |
---|
1,4 → 1,4 |
GAS LISTING /tmp/ccGIWzET.s page 1 |
GAS LISTING /tmp/ccKNlHA9.s page 1 |
1 .file "UartInterface.c" |
10,7 → 10,7 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0 |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "UartInterface.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
58,7 → 58,7 |
55 .stabs "uint_fast16_t:t(4,22)=(4,4)",128,0,215,0 |
56 .stabs "int_fast32_t:t(4,23)=(4,5)",128,0,220,0 |
57 .stabs "uint_fast32_t:t(4,24)=(4,6)",128,0,225,0 |
GAS LISTING /tmp/ccGIWzET.s page 2 |
GAS LISTING /tmp/ccKNlHA9.s page 2 |
58 .stabs "int_fast64_t:t(4,25)=(4,7)",128,0,230,0 |
74,7 → 74,7 |
68 .stabs "CommonDefs.h",130,0,0,0 |
69 .stabs "bool_t:t(5,1)=(0,11)",128,0,56,0 |
70 .stabn 162,0,0,0 |
71 .stabs "UartInt_init:F(0,15)",36,0,77,UartInt_init |
71 .stabs "UartInt_init:F(0,15)",36,0,76,UartInt_init |
72 .global UartInt_init |
73 .type UartInt_init, @function |
74 UartInt_init: |
118,7 → 118,7 |
37:UartInterface.c **** 4/10/2004 0.1 Module created |
38:UartInterface.c **** 6/30/2004 1.0 Initial release for Circuit Cellar |
39:UartInterface.c **** contest. |
GAS LISTING /tmp/ccGIWzET.s page 3 |
GAS LISTING /tmp/ccKNlHA9.s page 3 |
40:UartInterface.c **** 11/15/2004 1.2 Updated UART baud rate regs so that |
134,74 → 134,73 |
50:UartInterface.c **** /* Includes */ |
51:UartInterface.c **** #include <avr/io.h> |
52:UartInterface.c **** #include <avr/interrupt.h> |
53:UartInterface.c **** #include <avr/signal.h> |
54:UartInterface.c **** #include "CommonDefs.h" |
55:UartInterface.c **** #include "UartInterface.h" |
56:UartInterface.c **** #include "UIMgr.h" |
57:UartInterface.c **** #include "Executive.h" |
58:UartInterface.c **** |
59:UartInterface.c **** /* Local Variables */ |
60:UartInterface.c **** |
61:UartInterface.c **** /* Local Structures and Typedefs */ |
62:UartInterface.c **** |
63:UartInterface.c **** /* Extern Variables */ |
64:UartInterface.c **** |
65:UartInterface.c **** /* Definitions */ |
66:UartInterface.c **** |
67:UartInterface.c **** /*********************************************************** |
68:UartInterface.c **** Function Name: UartInt_init |
69:UartInterface.c **** Function Description: This function is responsible for |
70:UartInterface.c **** initializing the UART interface on the mega8. This |
71:UartInterface.c **** interface is set to communicate at 115.2 Kbps, with an |
72:UartInterface.c **** 8N1 protocol. |
73:UartInterface.c **** Inputs: none |
74:UartInterface.c **** Outputs: none |
75:UartInterface.c **** ***********************************************************/ |
76:UartInterface.c **** void UartInt_init(void) |
77:UartInterface.c **** { |
76 .stabn 68,0,77,.LM0-UartInt_init |
53:UartInterface.c **** #include "CommonDefs.h" |
54:UartInterface.c **** #include "UartInterface.h" |
55:UartInterface.c **** #include "UIMgr.h" |
56:UartInterface.c **** #include "Executive.h" |
57:UartInterface.c **** |
58:UartInterface.c **** /* Local Variables */ |
59:UartInterface.c **** |
60:UartInterface.c **** /* Local Structures and Typedefs */ |
61:UartInterface.c **** |
62:UartInterface.c **** /* Extern Variables */ |
63:UartInterface.c **** |
64:UartInterface.c **** /* Definitions */ |
65:UartInterface.c **** |
66:UartInterface.c **** /*********************************************************** |
67:UartInterface.c **** Function Name: UartInt_init |
68:UartInterface.c **** Function Description: This function is responsible for |
69:UartInterface.c **** initializing the UART interface on the mega8. This |
70:UartInterface.c **** interface is set to communicate at 115.2 Kbps, with an |
71:UartInterface.c **** 8N1 protocol. |
72:UartInterface.c **** Inputs: none |
73:UartInterface.c **** Outputs: none |
74:UartInterface.c **** ***********************************************************/ |
75:UartInterface.c **** void UartInt_init(void) |
76:UartInterface.c **** { |
76 .stabn 68,0,76,.LM0-UartInt_init |
77 .LM0: |
78 /* prologue: frame size=0 */ |
79 /* prologue end (size=0) */ |
78:UartInterface.c **** /* set up the baud rate registers so the UART will operate |
79:UartInterface.c **** at 115.2 Kbps */ |
80:UartInterface.c **** UBRRH = 0x00; |
80 .stabn 68,0,80,.LM1-UartInt_init |
77:UartInterface.c **** /* set up the baud rate registers so the UART will operate |
78:UartInterface.c **** at 115.2 Kbps */ |
79:UartInterface.c **** UBRRH = 0x00; |
80 .stabn 68,0,79,.LM1-UartInt_init |
81 .LM1: |
82 0000 10BC out 64-0x20,__zero_reg__ |
81:UartInterface.c **** |
82:UartInterface.c **** #ifdef NO_CRYSTAL |
83:UartInterface.c **** UBRRL = 18; /* 18 for double clocking at 115.2 kbps */ |
83 .stabn 68,0,83,.LM2-UartInt_init |
80:UartInterface.c **** |
81:UartInterface.c **** #ifdef NO_CRYSTAL |
82:UartInterface.c **** UBRRL = 18; /* 18 for double clocking at 115.2 kbps */ |
83 .stabn 68,0,82,.LM2-UartInt_init |
84 .LM2: |
85 0002 82E1 ldi r24,lo8(18) |
86 0004 89B9 out 41-0x20,r24 |
84:UartInterface.c **** #else |
85:UartInterface.c **** UBRRL = 0x08; /* for 16 MHz crystal at 115.2 kbps */ |
GAS LISTING /tmp/ccGIWzET.s page 4 |
83:UartInterface.c **** #else |
84:UartInterface.c **** UBRRL = 0x08; /* for 16 MHz crystal at 115.2 kbps */ |
85:UartInterface.c **** #endif |
GAS LISTING /tmp/ccKNlHA9.s page 4 |
86:UartInterface.c **** #endif |
87:UartInterface.c **** |
88:UartInterface.c **** /* enable the tx and rx capabilities of the UART...as well |
89:UartInterface.c **** as the receive complete interrupt */ |
90:UartInterface.c **** UCSRB = (1<<RXCIE)|(1<<RXEN)|(1<<TXEN); |
87 .stabn 68,0,90,.LM3-UartInt_init |
86:UartInterface.c **** |
87:UartInterface.c **** /* enable the tx and rx capabilities of the UART...as well |
88:UartInterface.c **** as the receive complete interrupt */ |
89:UartInterface.c **** UCSRB = (1<<RXCIE)|(1<<RXEN)|(1<<TXEN); |
87 .stabn 68,0,89,.LM3-UartInt_init |
88 .LM3: |
89 0006 88E9 ldi r24,lo8(-104) |
90 0008 8AB9 out 42-0x20,r24 |
91:UartInterface.c **** |
92:UartInterface.c **** /* set up the control registers so the UART works at 8N1 */ |
93:UartInterface.c **** UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); |
91 .stabn 68,0,93,.LM4-UartInt_init |
90:UartInterface.c **** |
91:UartInterface.c **** /* set up the control registers so the UART works at 8N1 */ |
92:UartInterface.c **** UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); |
91 .stabn 68,0,92,.LM4-UartInt_init |
92 .LM4: |
93 000a 86E8 ldi r24,lo8(-122) |
94 000c 80BD out 64-0x20,r24 |
94:UartInterface.c **** |
95:UartInterface.c **** #ifdef NO_CRYSTAL |
96:UartInterface.c **** /* set the baud rate to use the double-speed */ |
97:UartInterface.c **** UCSRA = (1<<U2X); |
95 .stabn 68,0,97,.LM5-UartInt_init |
93:UartInterface.c **** |
94:UartInterface.c **** #ifdef NO_CRYSTAL |
95:UartInterface.c **** /* set the baud rate to use the double-speed */ |
96:UartInterface.c **** UCSRA = (1<<U2X); |
95 .stabn 68,0,96,.LM5-UartInt_init |
96 .LM5: |
97 000e 82E0 ldi r24,lo8(2) |
98 0010 8BB9 out 43-0x20,r24 |
213,48 → 212,48 |
104 .Lscope0: |
105 .stabs "",36,0,0,.Lscope0-UartInt_init |
106 .stabd 78,0,0 |
107 .stabs "UartInt_txByte:F(0,15)",36,0,116,UartInt_txByte |
108 .stabs "txByte:P(0,11)",64,0,115,24 |
107 .stabs "UartInt_txByte:F(0,15)",36,0,115,UartInt_txByte |
108 .stabs "txByte:P(0,11)",64,0,114,24 |
109 .global UartInt_txByte |
110 .type UartInt_txByte, @function |
111 UartInt_txByte: |
112 .stabd 46,0,0 |
98:UartInterface.c **** #endif |
99:UartInterface.c **** |
100:UartInterface.c **** } |
101:UartInterface.c **** |
102:UartInterface.c **** /*********************************************************** |
103:UartInterface.c **** Function Name: UartInt_txByte |
104:UartInterface.c **** Function Description: This function is responsible for |
105:UartInterface.c **** transmitting a single byte on the uart. |
106:UartInterface.c **** Inputs: txByte - the byte to send |
107:UartInterface.c **** Outputs: none |
108:UartInterface.c **** NOTES: When the TX UDRE (data register empty) is set, there |
109:UartInterface.c **** is puposefully no interrupt...thus, to send a string of |
110:UartInterface.c **** data out, the calling routine needs to hold up the entire |
111:UartInterface.c **** application while this takes place (or just send one |
112:UartInterface.c **** byte at a time at strtegically timed intervals, like |
113:UartInterface.c **** the stats data is sent out :-) |
114:UartInterface.c **** ***********************************************************/ |
115:UartInterface.c **** void UartInt_txByte(unsigned char txByte) |
116:UartInterface.c **** { |
GAS LISTING /tmp/ccGIWzET.s page 5 |
97:UartInterface.c **** #endif |
98:UartInterface.c **** |
99:UartInterface.c **** } |
100:UartInterface.c **** |
101:UartInterface.c **** /*********************************************************** |
102:UartInterface.c **** Function Name: UartInt_txByte |
103:UartInterface.c **** Function Description: This function is responsible for |
104:UartInterface.c **** transmitting a single byte on the uart. |
105:UartInterface.c **** Inputs: txByte - the byte to send |
106:UartInterface.c **** Outputs: none |
107:UartInterface.c **** NOTES: When the TX UDRE (data register empty) is set, there |
108:UartInterface.c **** is puposefully no interrupt...thus, to send a string of |
109:UartInterface.c **** data out, the calling routine needs to hold up the entire |
110:UartInterface.c **** application while this takes place (or just send one |
111:UartInterface.c **** byte at a time at strtegically timed intervals, like |
112:UartInterface.c **** the stats data is sent out :-) |
113:UartInterface.c **** ***********************************************************/ |
114:UartInterface.c **** void UartInt_txByte(unsigned char txByte) |
115:UartInterface.c **** { |
113 .stabn 68,0,115,.LM6-UartInt_txByte |
GAS LISTING /tmp/ccKNlHA9.s page 5 |
113 .stabn 68,0,116,.LM6-UartInt_txByte |
114 .LM6: |
115 /* prologue: frame size=0 */ |
116 /* prologue end (size=0) */ |
117 .L5: |
117:UartInterface.c **** /* Wait for empty transmit buffer */ |
118:UartInterface.c **** while ( !( UCSRA & (1<<UDRE)) ); |
118 .stabn 68,0,118,.LM7-UartInt_txByte |
116:UartInterface.c **** /* Wait for empty transmit buffer */ |
117:UartInterface.c **** while ( !( UCSRA & (1<<UDRE)) ); |
118 .stabn 68,0,117,.LM7-UartInt_txByte |
119 .LM7: |
120 0014 5D9B sbis 43-0x20,5 |
121 0016 FECF rjmp .L5 |
119:UartInterface.c **** /* Put data into buffer, sends the data */ |
120:UartInterface.c **** UDR = txByte; |
122 .stabn 68,0,120,.LM8-UartInt_txByte |
118:UartInterface.c **** /* Put data into buffer, sends the data */ |
119:UartInterface.c **** UDR = txByte; |
122 .stabn 68,0,119,.LM8-UartInt_txByte |
123 .LM8: |
124 0018 8CB9 out 44-0x20,r24 |
125 /* epilogue: frame size=0 */ |
265,31 → 264,31 |
130 .Lscope1: |
131 .stabs "",36,0,0,.Lscope1-UartInt_txByte |
132 .stabd 78,0,0 |
133 .stabs "__vector_11:F(0,15)",36,0,139,__vector_11 |
133 .stabs "__vector_11:F(0,15)",36,0,138,__vector_11 |
134 .global __vector_11 |
135 .type __vector_11, @function |
136 __vector_11: |
137 .stabd 46,0,0 |
121:UartInterface.c **** } |
122:UartInterface.c **** |
123:UartInterface.c **** /*********************************************************** |
124:UartInterface.c **** Function Name: SIG_UART_RECV ISR |
125:UartInterface.c **** Function Description: This function is responsible for |
126:UartInterface.c **** handling the interrupt caused when a data byte is |
127:UartInterface.c **** received by the UART. |
128:UartInterface.c **** Inputs: none |
129:UartInterface.c **** Outputs: none |
130:UartInterface.c **** NOTES: This function was originally written in assembly, |
131:UartInterface.c **** but moved over to C when the setting of the "T" bit at |
132:UartInterface.c **** the end of the routine was no longer necessary (this |
133:UartInterface.c **** theoretically allowed the AVRcam to respond to serial |
134:UartInterface.c **** bytes in the middle of tracking or dumping a frame. |
135:UartInterface.c **** But it wasn't really needed, and understanding the C |
136:UartInterface.c **** is easier :-) |
137:UartInterface.c **** ***********************************************************/ |
138:UartInterface.c **** SIGNAL(SIG_UART_RECV) |
139:UartInterface.c **** { |
138 .stabn 68,0,139,.LM9-__vector_11 |
120:UartInterface.c **** } |
121:UartInterface.c **** |
122:UartInterface.c **** /*********************************************************** |
123:UartInterface.c **** Function Name: SIG_UART_RECV ISR |
124:UartInterface.c **** Function Description: This function is responsible for |
125:UartInterface.c **** handling the interrupt caused when a data byte is |
126:UartInterface.c **** received by the UART. |
127:UartInterface.c **** Inputs: none |
128:UartInterface.c **** Outputs: none |
129:UartInterface.c **** NOTES: This function was originally written in assembly, |
130:UartInterface.c **** but moved over to C when the setting of the "T" bit at |
131:UartInterface.c **** the end of the routine was no longer necessary (this |
132:UartInterface.c **** theoretically allowed the AVRcam to respond to serial |
133:UartInterface.c **** bytes in the middle of tracking or dumping a frame. |
134:UartInterface.c **** But it wasn't really needed, and understanding the C |
135:UartInterface.c **** is easier :-) |
136:UartInterface.c **** ***********************************************************/ |
137:UartInterface.c **** SIGNAL(SIG_UART_RECV) |
138:UartInterface.c **** { |
138 .stabn 68,0,138,.LM9-__vector_11 |
139 .LM9: |
140 /* prologue: frame size=0 */ |
141 001c 1F92 push __zero_reg__ |
298,19 → 297,19 |
144 0022 0F92 push __tmp_reg__ |
145 0024 1124 clr __zero_reg__ |
146 0026 8F93 push r24 |
GAS LISTING /tmp/ccGIWzET.s page 6 |
147 0028 9F93 push r25 |
GAS LISTING /tmp/ccKNlHA9.s page 6 |
147 0028 9F93 push r25 |
148 002a EF93 push r30 |
149 002c FF93 push r31 |
150 /* prologue end (size=9) */ |
140:UartInterface.c **** unsigned char tmpHead; |
141:UartInterface.c **** /* read the data byte, put it in the serial queue, and |
142:UartInterface.c **** post the event */ |
143:UartInterface.c **** |
144:UartInterface.c **** UIMgr_rxFifo[UIMgr_rxFifoHead] = UDR; |
151 .stabn 68,0,144,.LM10-__vector_11 |
139:UartInterface.c **** unsigned char tmpHead; |
140:UartInterface.c **** /* read the data byte, put it in the serial queue, and |
141:UartInterface.c **** post the event */ |
142:UartInterface.c **** |
143:UartInterface.c **** UIMgr_rxFifo[UIMgr_rxFifoHead] = UDR; |
151 .stabn 68,0,143,.LM10-__vector_11 |
152 .LM10: |
153 002e 8091 0000 lds r24,UIMgr_rxFifoHead |
154 0032 9CB1 in r25,44-0x20 |
319,19 → 318,19 |
157 0038 E80F add r30,r24 |
158 003a F11D adc r31,__zero_reg__ |
159 003c 9083 st Z,r25 |
145:UartInterface.c **** |
146:UartInterface.c **** /* now move the head up */ |
147:UartInterface.c **** tmpHead = (UIMgr_rxFifoHead + 1) & (UI_MGR_RX_FIFO_MASK); |
148:UartInterface.c **** UIMgr_rxFifoHead = tmpHead; |
160 .stabn 68,0,148,.LM11-__vector_11 |
144:UartInterface.c **** |
145:UartInterface.c **** /* now move the head up */ |
146:UartInterface.c **** tmpHead = (UIMgr_rxFifoHead + 1) & (UI_MGR_RX_FIFO_MASK); |
147:UartInterface.c **** UIMgr_rxFifoHead = tmpHead; |
160 .stabn 68,0,147,.LM11-__vector_11 |
161 .LM11: |
162 003e 8F5F subi r24,lo8(-(1)) |
163 0040 8F71 andi r24,lo8(31) |
164 0042 8093 0000 sts UIMgr_rxFifoHead,r24 |
149:UartInterface.c **** |
150:UartInterface.c **** /* write the serial received event to the event fifo */ |
151:UartInterface.c **** Exec_eventFifo[Exec_eventFifoHead] = EV_SERIAL_DATA_RECEIVED; |
165 .stabn 68,0,151,.LM12-__vector_11 |
148:UartInterface.c **** |
149:UartInterface.c **** /* write the serial received event to the event fifo */ |
150:UartInterface.c **** Exec_eventFifo[Exec_eventFifoHead] = EV_SERIAL_DATA_RECEIVED; |
165 .stabn 68,0,150,.LM12-__vector_11 |
166 .LM12: |
167 0046 8091 0000 lds r24,Exec_eventFifoHead |
168 004a E0E0 ldi r30,lo8(Exec_eventFifo) |
340,11 → 339,11 |
171 0050 F11D adc r31,__zero_reg__ |
172 0052 91E0 ldi r25,lo8(1) |
173 0054 9083 st Z,r25 |
152:UartInterface.c **** |
153:UartInterface.c **** /* now move the head up */ |
154:UartInterface.c **** tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK); |
155:UartInterface.c **** Exec_eventFifoHead = tmpHead; |
174 .stabn 68,0,155,.LM13-__vector_11 |
151:UartInterface.c **** |
152:UartInterface.c **** /* now move the head up */ |
153:UartInterface.c **** tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK); |
154:UartInterface.c **** Exec_eventFifoHead = tmpHead; |
174 .stabn 68,0,154,.LM13-__vector_11 |
175 .LM13: |
176 0056 8F5F subi r24,lo8(-(1)) |
177 0058 8770 andi r24,lo8(7) |
358,10 → 357,10 |
185 0068 0FBE out __SREG__,__tmp_reg__ |
186 006a 0F90 pop __tmp_reg__ |
187 006c 1F90 pop __zero_reg__ |
GAS LISTING /tmp/ccGIWzET.s page 7 |
188 006e 1895 reti |
GAS LISTING /tmp/ccKNlHA9.s page 7 |
188 006e 1895 reti |
189 /* epilogue end (size=9) */ |
190 /* function __vector_11 size 42 (24) */ |
191 .size __vector_11, .-__vector_11 |
371,19 → 370,19 |
195 .stabs "",100,0,0,.Letext0 |
196 .Letext0: |
197 /* File "UartInterface.c": code 56 = 0x0038 ( 36), prologues 9, epilogues 11 */ |
GAS LISTING /tmp/ccGIWzET.s page 8 |
GAS LISTING /tmp/ccKNlHA9.s page 8 |
DEFINED SYMBOLS |
*ABS*:00000000 UartInterface.c |
/tmp/ccGIWzET.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccGIWzET.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccGIWzET.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccGIWzET.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccGIWzET.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccGIWzET.s:74 .text:00000000 UartInt_init |
/tmp/ccGIWzET.s:111 .text:00000014 UartInt_txByte |
/tmp/ccGIWzET.s:136 .text:0000001c __vector_11 |
/tmp/ccKNlHA9.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccKNlHA9.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccKNlHA9.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccKNlHA9.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccKNlHA9.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccKNlHA9.s:74 .text:00000000 UartInt_init |
/tmp/ccKNlHA9.s:111 .text:00000014 UartInt_txByte |
/tmp/ccKNlHA9.s:136 .text:0000001c __vector_11 |
UNDEFINED SYMBOLS |
__do_copy_data |
/programy/Atmel_C/AVRcam/Utility.lst |
---|
0,0 → 1,275 |
GAS LISTING /tmp/ccQbezXt.s page 1 |
1 .file "Utility.c" |
2 .arch atmega8 |
3 __SREG__ = 0x3f |
4 __SP_H__ = 0x3e |
5 __SP_L__ = 0x3d |
6 __tmp_reg__ = 0 |
7 __zero_reg__ = 1 |
8 .global __do_copy_data |
9 .global __do_clear_bss |
10 .stabs "/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0 |
11 .stabs "Utility.c",100,0,2,.Ltext0 |
12 .text |
13 .Ltext0: |
14 .stabs "gcc2_compiled.",60,0,0,0 |
15 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0 |
16 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0 |
17 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0 |
18 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0 |
19 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0 |
20 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0, |
21 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0 |
22 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0 |
23 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0 |
24 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0 |
25 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0 |
26 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0 |
27 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0 |
28 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0 |
29 .stabs "void:t(0,15)=(0,15)",128,0,0,0 |
30 .stabs "CommonDefs.h",130,0,0,0 |
31 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/interrupt.h",130,0,0,0 |
32 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0 |
33 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0 |
34 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0 |
35 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0 |
36 .stabs "int8_t:t(6,1)=(0,10)",128,0,116,0 |
37 .stabs "uint8_t:t(6,2)=(0,11)",128,0,117,0 |
38 .stabs "int16_t:t(6,3)=(0,1)",128,0,118,0 |
39 .stabs "uint16_t:t(6,4)=(0,4)",128,0,119,0 |
40 .stabs "int32_t:t(6,5)=(0,3)",128,0,120,0 |
41 .stabs "uint32_t:t(6,6)=(0,5)",128,0,121,0 |
42 .stabs "int64_t:t(6,7)=(0,6)",128,0,122,0 |
43 .stabs "uint64_t:t(6,8)=(0,7)",128,0,123,0 |
44 .stabs "intptr_t:t(6,9)=(6,3)",128,0,135,0 |
45 .stabs "uintptr_t:t(6,10)=(6,4)",128,0,140,0 |
46 .stabs "int_least8_t:t(6,11)=(6,1)",128,0,152,0 |
47 .stabs "uint_least8_t:t(6,12)=(6,2)",128,0,157,0 |
48 .stabs "int_least16_t:t(6,13)=(6,3)",128,0,162,0 |
49 .stabs "uint_least16_t:t(6,14)=(6,4)",128,0,167,0 |
50 .stabs "int_least32_t:t(6,15)=(6,5)",128,0,172,0 |
51 .stabs "uint_least32_t:t(6,16)=(6,6)",128,0,177,0 |
52 .stabs "int_least64_t:t(6,17)=(6,7)",128,0,182,0 |
53 .stabs "uint_least64_t:t(6,18)=(6,8)",128,0,187,0 |
54 .stabs "int_fast8_t:t(6,19)=(6,1)",128,0,200,0 |
55 .stabs "uint_fast8_t:t(6,20)=(6,2)",128,0,205,0 |
56 .stabs "int_fast16_t:t(6,21)=(6,3)",128,0,210,0 |
57 .stabs "uint_fast16_t:t(6,22)=(6,4)",128,0,215,0 |
GAS LISTING /tmp/ccQbezXt.s page 2 |
58 .stabs "int_fast32_t:t(6,23)=(6,5)",128,0,220,0 |
59 .stabs "uint_fast32_t:t(6,24)=(6,6)",128,0,225,0 |
60 .stabs "int_fast64_t:t(6,25)=(6,7)",128,0,230,0 |
61 .stabs "uint_fast64_t:t(6,26)=(6,8)",128,0,235,0 |
62 .stabs "intmax_t:t(6,27)=(6,7)",128,0,249,0 |
63 .stabs "uintmax_t:t(6,28)=(6,8)",128,0,254,0 |
64 .stabn 162,0,0,0 |
65 .stabs "int_farptr_t:t(5,1)=(6,5)",128,0,76,0 |
66 .stabs "uint_farptr_t:t(5,2)=(6,6)",128,0,80,0 |
67 .stabn 162,0,0,0 |
68 .stabn 162,0,0,0 |
69 .stabn 162,0,0,0 |
70 .stabn 162,0,0,0 |
71 .stabs "bool_t:t(1,1)=(0,11)",128,0,56,0 |
72 .stabn 162,0,0,0 |
73 .stabs "Utility_delay:F(0,15)",36,0,65,Utility_delay |
74 .stabs "numMs:P(0,9)",64,0,64,18 |
75 .global Utility_delay |
76 .type Utility_delay, @function |
77 Utility_delay: |
78 .stabd 46,0,0 |
1:Utility.c **** /* |
2:Utility.c **** Copyright (C) 2004 John Orlando |
3:Utility.c **** |
4:Utility.c **** AVRcam: a small real-time image processing engine. |
5:Utility.c **** |
6:Utility.c **** This program is free software; you can redistribute it and/or |
7:Utility.c **** modify it under the terms of the GNU General Public |
8:Utility.c **** License as published by the Free Software Foundation; either |
9:Utility.c **** version 2 of the License, or (at your option) any later version. |
10:Utility.c **** |
11:Utility.c **** This program is distributed in the hope that it will be useful, |
12:Utility.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of |
13:Utility.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14:Utility.c **** General Public License for more details. |
15:Utility.c **** |
16:Utility.c **** You should have received a copy of the GNU General Public |
17:Utility.c **** License along with this program; if not, write to the Free Software |
18:Utility.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19:Utility.c **** |
20:Utility.c **** For more information on the AVRcam, please contact: |
21:Utility.c **** |
22:Utility.c **** john@jrobot.net |
23:Utility.c **** |
24:Utility.c **** or go to www.jrobot.net for more details regarding the system. |
25:Utility.c **** */ |
26:Utility.c **** /*********************************************************** |
27:Utility.c **** Module Name: Utility.c |
28:Utility.c **** Module Date: 04/13/2004 |
29:Utility.c **** Module Auth: John Orlando |
30:Utility.c **** |
31:Utility.c **** Description: This module provides a basic set of |
32:Utility.c **** general purpose utilities that can be used by any |
33:Utility.c **** module needing them. |
34:Utility.c **** |
35:Utility.c **** Revision History: |
36:Utility.c **** Date Rel Ver. Notes |
GAS LISTING /tmp/ccQbezXt.s page 3 |
37:Utility.c **** 4/10/2004 0.1 Module created |
38:Utility.c **** 6/30/2004 1.0 Initial release for Circuit Cellar |
39:Utility.c **** contest. |
40:Utility.c **** ***********************************************************/ |
41:Utility.c **** |
42:Utility.c **** /* Includes */ |
43:Utility.c **** #include "CommonDefs.h" |
44:Utility.c **** |
45:Utility.c **** /* Local Variables */ |
46:Utility.c **** |
47:Utility.c **** /* Local Structures and Typedefs */ |
48:Utility.c **** |
49:Utility.c **** /* Extern Variables */ |
50:Utility.c **** |
51:Utility.c **** /* Definitions */ |
52:Utility.c **** |
53:Utility.c **** /*********************************************************** |
54:Utility.c **** Function Name: Utility_delay |
55:Utility.c **** Function Description: This function provides a busy-wait |
56:Utility.c **** delay for a specified number of milliseconds. |
57:Utility.c **** Inputs: numMs - the number of milliseconds to delay |
58:Utility.c **** Outputs: none |
59:Utility.c **** NOTES: The delay_loop_1 and delay_loop_2 functions found |
60:Utility.c **** in avr/delay.h provide accurate 3 and 4 cycle delay loops |
61:Utility.c **** if needed...this isn't really a millisecond, so DON'T |
62:Utility.c **** depend on it for exact timing... |
63:Utility.c **** ***********************************************************/ |
64:Utility.c **** void Utility_delay(unsigned short numMs) |
65:Utility.c **** { |
79 .stabn 68,0,65,.LM0-Utility_delay |
80 .LM0: |
81 /* prologue: frame size=4 */ |
82 0000 CF93 push r28 |
83 0002 DF93 push r29 |
84 0004 CDB7 in r28,__SP_L__ |
85 0006 DEB7 in r29,__SP_H__ |
86 0008 2497 sbiw r28,4 |
87 000a 0FB6 in __tmp_reg__,__SREG__ |
88 000c F894 cli |
89 000e DEBF out __SP_H__,r29 |
90 0010 0FBE out __SREG__,__tmp_reg__ |
91 0012 CDBF out __SP_L__,r28 |
92 /* prologue end (size=10) */ |
93 0014 9C01 movw r18,r24 |
66:Utility.c **** volatile unsigned short i=0,j=0; |
94 .stabn 68,0,66,.LM1-Utility_delay |
95 .LM1: |
96 0016 1A82 std Y+2,__zero_reg__ |
97 0018 1982 std Y+1,__zero_reg__ |
98 001a 1C82 std Y+4,__zero_reg__ |
99 001c 1B82 std Y+3,__zero_reg__ |
67:Utility.c **** #ifndef SIMULATION |
68:Utility.c **** for (i=0; i<numMs; i++) |
100 .stabn 68,0,68,.LM2-Utility_delay |
101 .LM2: |
102 001e 1A82 std Y+2,__zero_reg__ |
103 0020 1982 std Y+1,__zero_reg__ |
GAS LISTING /tmp/ccQbezXt.s page 4 |
104 0022 8981 ldd r24,Y+1 |
105 0024 9A81 ldd r25,Y+2 |
106 0026 8217 cp r24,r18 |
107 0028 9307 cpc r25,r19 |
108 002a E0F4 brsh .L6 |
109 .L7: |
69:Utility.c **** { |
70:Utility.c **** for (j=0; j<1000; j++) |
110 .stabn 68,0,70,.LM3-Utility_delay |
111 .LM3: |
112 002c 1C82 std Y+4,__zero_reg__ |
113 002e 1B82 std Y+3,__zero_reg__ |
114 0030 8B81 ldd r24,Y+3 |
115 0032 9C81 ldd r25,Y+4 |
116 0034 885E subi r24,lo8(1000) |
117 0036 9340 sbci r25,hi8(1000) |
118 0038 58F4 brsh .L4 |
119 .L8: |
71:Utility.c **** { |
72:Utility.c **** asm volatile("nop"::); |
120 .stabn 68,0,72,.LM4-Utility_delay |
121 .LM4: |
122 /* #APP */ |
123 003a 0000 nop |
124 .stabn 68,0,70,.LM5-Utility_delay |
125 .LM5: |
126 /* #NOAPP */ |
127 003c 8B81 ldd r24,Y+3 |
128 003e 9C81 ldd r25,Y+4 |
129 0040 0196 adiw r24,1 |
130 0042 9C83 std Y+4,r25 |
131 0044 8B83 std Y+3,r24 |
132 0046 8B81 ldd r24,Y+3 |
133 0048 9C81 ldd r25,Y+4 |
134 004a 885E subi r24,lo8(1000) |
135 004c 9340 sbci r25,hi8(1000) |
136 004e A8F3 brlo .L8 |
137 .L4: |
138 .stabn 68,0,68,.LM6-Utility_delay |
139 .LM6: |
140 0050 8981 ldd r24,Y+1 |
141 0052 9A81 ldd r25,Y+2 |
142 0054 0196 adiw r24,1 |
143 0056 9A83 std Y+2,r25 |
144 0058 8983 std Y+1,r24 |
145 005a 8981 ldd r24,Y+1 |
146 005c 9A81 ldd r25,Y+2 |
147 005e 8217 cp r24,r18 |
148 0060 9307 cpc r25,r19 |
149 0062 20F3 brlo .L7 |
150 .L6: |
151 /* epilogue: frame size=4 */ |
152 0064 2496 adiw r28,4 |
153 0066 0FB6 in __tmp_reg__,__SREG__ |
154 0068 F894 cli |
155 006a DEBF out __SP_H__,r29 |
156 006c 0FBE out __SREG__,__tmp_reg__ |
GAS LISTING /tmp/ccQbezXt.s page 5 |
157 006e CDBF out __SP_L__,r28 |
158 0070 DF91 pop r29 |
159 0072 CF91 pop r28 |
160 0074 0895 ret |
161 /* epilogue end (size=9) */ |
162 /* function Utility_delay size 62 (43) */ |
163 .size Utility_delay, .-Utility_delay |
164 .stabs "i:(0,16)=B(0,9)",128,0,66,1 |
165 .stabs "j:(0,16)",128,0,66,3 |
166 .stabn 192,0,0,Utility_delay-Utility_delay |
167 .stabn 224,0,0,.Lscope0-Utility_delay |
168 .Lscope0: |
169 .stabs "",36,0,0,.Lscope0-Utility_delay |
170 .stabd 78,0,0 |
171 .stabs "",100,0,0,.Letext0 |
172 .Letext0: |
173 /* File "Utility.c": code 62 = 0x003e ( 43), prologues 10, epilogues 9 */ |
GAS LISTING /tmp/ccQbezXt.s page 6 |
DEFINED SYMBOLS |
*ABS*:00000000 Utility.c |
/tmp/ccQbezXt.s:3 *ABS*:0000003f __SREG__ |
/tmp/ccQbezXt.s:4 *ABS*:0000003e __SP_H__ |
/tmp/ccQbezXt.s:5 *ABS*:0000003d __SP_L__ |
/tmp/ccQbezXt.s:6 *ABS*:00000000 __tmp_reg__ |
/tmp/ccQbezXt.s:7 *ABS*:00000001 __zero_reg__ |
/tmp/ccQbezXt.s:77 .text:00000000 Utility_delay |
UNDEFINED SYMBOLS |
__do_copy_data |
__do_clear_bss |
/programy/Atmel_C/AVRcam/makefile |
---|
114,9 → 114,11 |
# -lm = math library |
LDFLAGS += -lm |
PROGRAMMER_DEVICE = dapa |
PORT = /dev/parport0 # programmer connected to parallel port |
# Programming support using avrdude. Settings and variables. |
# Programming hardware: avrisp stk500 avr910 pavr stk200 pony-stk200 |
124,16 → 126,6 |
# Type: avrdude -c ? |
# to get a full listing. |
# |
AVRDUDE_PROGRAMMER = dapa |
#AVRDUDE_PORT = com1 # programmer connected to serial device |
AVRDUDE_PORT = /dev/parport0 # programmer connected to parallel port |
AVRDUDE_ERASE = -e |
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) |
# Uncomment the following if you want avrdude's erase cycle counter. |
# Note that this counter needs to be initialized first using -Yn, |
# see avrdude manual. |
147,10 → 139,8 |
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> |
# to submit bug reports. |
#AVRDUDE_FLAGS += -v -v |
# --------------------------------------------------------------------------- |
# Define directories, if needed. |
172,7 → 162,9 |
# Programming support using avrdude. |
AVRDUDE = avrdude |
#PROGRAMMER = avrdude |
# Programming support using uisp. |
PROGRAMMER = uisp |
REMOVE = rm -f |
258,21 → 250,26 |
# file whether the size is > 0, and if so, reprograms the EEPROM as |
# well. Just delete these lines if you don't want this feature (like |
# on the ATmegas with the EESAVE fuse bit set). |
program: $(TARGET).hex $(TARGET).eep |
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_ERASE) |
$(AVRDUDE) $(AVRDUDE_FLAGS) -i $(TARGET).hex |
@$(SIZE) --target=$(FORMAT) $(TARGET).eep | while read line; \ |
do \ |
set -- $$line; \ |
if [ "x$$1" != "x0" ] ; then continue; fi; \ |
if [ "$$2" -ne 0 ] ; then \ |
echo $(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
$(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
break; \ |
fi; \ |
done |
program: $(TARGET).hex $(TARGET).eep |
# if[ "$(PROGRAMMER)" == "avrdude"]; then \ |
# avrdude -p $(MCU) -P $(PORT) -c $(PROGRAMMER_DEVICE) -e # erase AVR device |
# avrdude -p $(MCU) -P $(PORT) -c $(PROGRAMMER_DEVICE) -i $(TARGET).hex # program AVR device |
# fi; \ |
# @$(SIZE) --target=$(FORMAT) $(TARGET).eep | while read line; \ |
# do \ |
# set -- $$line; \ |
# if [ "x$$1" != "x0" ] ; then continue; fi; \ |
# if [ "$$2" -ne 0 ] ; then \ |
# echo $(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
# $(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
# break; \ |
# fi; \ |
# done |
# if[$PROGRAMMER == "uisp"]; then |
uisp -dlpt=$(PORT) -dpart=$(MCU) -dprog=$(PROGRAMMER_DEVICE) if=$(TARGET).hex --upload |
# fi; |
# Create final output files (.hex, .eep) from ELF output file. |
%.hex: %.elf |
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ |