|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482 |
-
- SD_CARD_SPI.elf: file format elf32-littlearm
-
- Sections:
- Idx Name Size VMA LMA File off Algn
- 0 .isr_vector 0000013c 08000000 08000000 00010000 2**0
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 .text 00007914 0800013c 0800013c 0001013c 2**2
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 000005a8 08007a50 08007a50 00017a50 2**2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 08007ff8 08007ff8 00020088 2**0
- CONTENTS
- 4 .ARM 00000008 08007ff8 08007ff8 00017ff8 2**2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 5 .preinit_array 00000000 08008000 08008000 00020088 2**0
- CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 08008000 08008000 00018000 2**2
- CONTENTS, ALLOC, LOAD, DATA
- 7 .fini_array 00000004 08008004 08008004 00018004 2**2
- CONTENTS, ALLOC, LOAD, DATA
- 8 .data 00000088 20000000 08008008 00020000 2**2
- CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 000044cc 20000088 08008090 00020088 2**2
- ALLOC
- 10 ._user_heap_stack 00000604 20004554 08008090 00024554 2**0
- ALLOC
- 11 .ARM.attributes 00000029 00000000 00000000 00020088 2**0
- CONTENTS, READONLY
- 12 .debug_info 000113b4 00000000 00000000 000200b1 2**0
- CONTENTS, READONLY, DEBUGGING
- 13 .debug_abbrev 00002754 00000000 00000000 00031465 2**0
- CONTENTS, READONLY, DEBUGGING
- 14 .debug_aranges 00000cd8 00000000 00000000 00033bc0 2**3
- CONTENTS, READONLY, DEBUGGING
- 15 .debug_ranges 00000ba0 00000000 00000000 00034898 2**3
- CONTENTS, READONLY, DEBUGGING
- 16 .debug_macro 0001807c 00000000 00000000 00035438 2**0
- CONTENTS, READONLY, DEBUGGING
- 17 .debug_line 0000cbe7 00000000 00000000 0004d4b4 2**0
- CONTENTS, READONLY, DEBUGGING
- 18 .debug_str 0008e5ed 00000000 00000000 0005a09b 2**0
- CONTENTS, READONLY, DEBUGGING
- 19 .comment 0000007b 00000000 00000000 000e8688 2**0
- CONTENTS, READONLY
- 20 .debug_frame 0000375c 00000000 00000000 000e8704 2**2
- CONTENTS, READONLY, DEBUGGING
-
- Disassembly of section .text:
-
- 0800013c <__do_global_dtors_aux>:
- 800013c: b510 push {r4, lr}
- 800013e: 4c05 ldr r4, [pc, #20] ; (8000154 <__do_global_dtors_aux+0x18>)
- 8000140: 7823 ldrb r3, [r4, #0]
- 8000142: b933 cbnz r3, 8000152 <__do_global_dtors_aux+0x16>
- 8000144: 4b04 ldr r3, [pc, #16] ; (8000158 <__do_global_dtors_aux+0x1c>)
- 8000146: b113 cbz r3, 800014e <__do_global_dtors_aux+0x12>
- 8000148: 4804 ldr r0, [pc, #16] ; (800015c <__do_global_dtors_aux+0x20>)
- 800014a: f3af 8000 nop.w
- 800014e: 2301 movs r3, #1
- 8000150: 7023 strb r3, [r4, #0]
- 8000152: bd10 pop {r4, pc}
- 8000154: 20000088 .word 0x20000088
- 8000158: 00000000 .word 0x00000000
- 800015c: 08007a38 .word 0x08007a38
-
- 08000160 <frame_dummy>:
- 8000160: b508 push {r3, lr}
- 8000162: 4b03 ldr r3, [pc, #12] ; (8000170 <frame_dummy+0x10>)
- 8000164: b11b cbz r3, 800016e <frame_dummy+0xe>
- 8000166: 4903 ldr r1, [pc, #12] ; (8000174 <frame_dummy+0x14>)
- 8000168: 4803 ldr r0, [pc, #12] ; (8000178 <frame_dummy+0x18>)
- 800016a: f3af 8000 nop.w
- 800016e: bd08 pop {r3, pc}
- 8000170: 00000000 .word 0x00000000
- 8000174: 2000008c .word 0x2000008c
- 8000178: 08007a38 .word 0x08007a38
-
- 0800017c <strlen>:
- 800017c: 4603 mov r3, r0
- 800017e: f813 2b01 ldrb.w r2, [r3], #1
- 8000182: 2a00 cmp r2, #0
- 8000184: d1fb bne.n 800017e <strlen+0x2>
- 8000186: 1a18 subs r0, r3, r0
- 8000188: 3801 subs r0, #1
- 800018a: 4770 bx lr
-
- 0800018c <__aeabi_uldivmod>:
- 800018c: b953 cbnz r3, 80001a4 <__aeabi_uldivmod+0x18>
- 800018e: b94a cbnz r2, 80001a4 <__aeabi_uldivmod+0x18>
- 8000190: 2900 cmp r1, #0
- 8000192: bf08 it eq
- 8000194: 2800 cmpeq r0, #0
- 8000196: bf1c itt ne
- 8000198: f04f 31ff movne.w r1, #4294967295
- 800019c: f04f 30ff movne.w r0, #4294967295
- 80001a0: f000 b974 b.w 800048c <__aeabi_idiv0>
- 80001a4: f1ad 0c08 sub.w ip, sp, #8
- 80001a8: e96d ce04 strd ip, lr, [sp, #-16]!
- 80001ac: f000 f806 bl 80001bc <__udivmoddi4>
- 80001b0: f8dd e004 ldr.w lr, [sp, #4]
- 80001b4: e9dd 2302 ldrd r2, r3, [sp, #8]
- 80001b8: b004 add sp, #16
- 80001ba: 4770 bx lr
-
- 080001bc <__udivmoddi4>:
- 80001bc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 80001c0: 468c mov ip, r1
- 80001c2: 4604 mov r4, r0
- 80001c4: 9e08 ldr r6, [sp, #32]
- 80001c6: 2b00 cmp r3, #0
- 80001c8: d14b bne.n 8000262 <__udivmoddi4+0xa6>
- 80001ca: 428a cmp r2, r1
- 80001cc: 4615 mov r5, r2
- 80001ce: d967 bls.n 80002a0 <__udivmoddi4+0xe4>
- 80001d0: fab2 f282 clz r2, r2
- 80001d4: b14a cbz r2, 80001ea <__udivmoddi4+0x2e>
- 80001d6: f1c2 0720 rsb r7, r2, #32
- 80001da: fa01 f302 lsl.w r3, r1, r2
- 80001de: fa20 f707 lsr.w r7, r0, r7
- 80001e2: 4095 lsls r5, r2
- 80001e4: ea47 0c03 orr.w ip, r7, r3
- 80001e8: 4094 lsls r4, r2
- 80001ea: ea4f 4e15 mov.w lr, r5, lsr #16
- 80001ee: fbbc f7fe udiv r7, ip, lr
- 80001f2: fa1f f885 uxth.w r8, r5
- 80001f6: fb0e c317 mls r3, lr, r7, ip
- 80001fa: fb07 f908 mul.w r9, r7, r8
- 80001fe: 0c21 lsrs r1, r4, #16
- 8000200: ea41 4303 orr.w r3, r1, r3, lsl #16
- 8000204: 4599 cmp r9, r3
- 8000206: d909 bls.n 800021c <__udivmoddi4+0x60>
- 8000208: 18eb adds r3, r5, r3
- 800020a: f107 31ff add.w r1, r7, #4294967295
- 800020e: f080 811c bcs.w 800044a <__udivmoddi4+0x28e>
- 8000212: 4599 cmp r9, r3
- 8000214: f240 8119 bls.w 800044a <__udivmoddi4+0x28e>
- 8000218: 3f02 subs r7, #2
- 800021a: 442b add r3, r5
- 800021c: eba3 0309 sub.w r3, r3, r9
- 8000220: fbb3 f0fe udiv r0, r3, lr
- 8000224: fb0e 3310 mls r3, lr, r0, r3
- 8000228: fb00 f108 mul.w r1, r0, r8
- 800022c: b2a4 uxth r4, r4
- 800022e: ea44 4403 orr.w r4, r4, r3, lsl #16
- 8000232: 42a1 cmp r1, r4
- 8000234: d909 bls.n 800024a <__udivmoddi4+0x8e>
- 8000236: 192c adds r4, r5, r4
- 8000238: f100 33ff add.w r3, r0, #4294967295
- 800023c: f080 8107 bcs.w 800044e <__udivmoddi4+0x292>
- 8000240: 42a1 cmp r1, r4
- 8000242: f240 8104 bls.w 800044e <__udivmoddi4+0x292>
- 8000246: 3802 subs r0, #2
- 8000248: 442c add r4, r5
- 800024a: ea40 4007 orr.w r0, r0, r7, lsl #16
- 800024e: 2700 movs r7, #0
- 8000250: 1a64 subs r4, r4, r1
- 8000252: b11e cbz r6, 800025c <__udivmoddi4+0xa0>
- 8000254: 2300 movs r3, #0
- 8000256: 40d4 lsrs r4, r2
- 8000258: e9c6 4300 strd r4, r3, [r6]
- 800025c: 4639 mov r1, r7
- 800025e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- 8000262: 428b cmp r3, r1
- 8000264: d909 bls.n 800027a <__udivmoddi4+0xbe>
- 8000266: 2e00 cmp r6, #0
- 8000268: f000 80ec beq.w 8000444 <__udivmoddi4+0x288>
- 800026c: 2700 movs r7, #0
- 800026e: e9c6 0100 strd r0, r1, [r6]
- 8000272: 4638 mov r0, r7
- 8000274: 4639 mov r1, r7
- 8000276: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- 800027a: fab3 f783 clz r7, r3
- 800027e: 2f00 cmp r7, #0
- 8000280: d148 bne.n 8000314 <__udivmoddi4+0x158>
- 8000282: 428b cmp r3, r1
- 8000284: d302 bcc.n 800028c <__udivmoddi4+0xd0>
- 8000286: 4282 cmp r2, r0
- 8000288: f200 80fb bhi.w 8000482 <__udivmoddi4+0x2c6>
- 800028c: 1a84 subs r4, r0, r2
- 800028e: eb61 0303 sbc.w r3, r1, r3
- 8000292: 2001 movs r0, #1
- 8000294: 469c mov ip, r3
- 8000296: 2e00 cmp r6, #0
- 8000298: d0e0 beq.n 800025c <__udivmoddi4+0xa0>
- 800029a: e9c6 4c00 strd r4, ip, [r6]
- 800029e: e7dd b.n 800025c <__udivmoddi4+0xa0>
- 80002a0: b902 cbnz r2, 80002a4 <__udivmoddi4+0xe8>
- 80002a2: deff udf #255 ; 0xff
- 80002a4: fab2 f282 clz r2, r2
- 80002a8: 2a00 cmp r2, #0
- 80002aa: f040 808f bne.w 80003cc <__udivmoddi4+0x210>
- 80002ae: 2701 movs r7, #1
- 80002b0: 1b49 subs r1, r1, r5
- 80002b2: ea4f 4815 mov.w r8, r5, lsr #16
- 80002b6: fa1f f985 uxth.w r9, r5
- 80002ba: fbb1 fef8 udiv lr, r1, r8
- 80002be: fb08 111e mls r1, r8, lr, r1
- 80002c2: fb09 f00e mul.w r0, r9, lr
- 80002c6: ea4f 4c14 mov.w ip, r4, lsr #16
- 80002ca: ea4c 4301 orr.w r3, ip, r1, lsl #16
- 80002ce: 4298 cmp r0, r3
- 80002d0: d907 bls.n 80002e2 <__udivmoddi4+0x126>
- 80002d2: 18eb adds r3, r5, r3
- 80002d4: f10e 31ff add.w r1, lr, #4294967295
- 80002d8: d202 bcs.n 80002e0 <__udivmoddi4+0x124>
- 80002da: 4298 cmp r0, r3
- 80002dc: f200 80cd bhi.w 800047a <__udivmoddi4+0x2be>
- 80002e0: 468e mov lr, r1
- 80002e2: 1a1b subs r3, r3, r0
- 80002e4: fbb3 f0f8 udiv r0, r3, r8
- 80002e8: fb08 3310 mls r3, r8, r0, r3
- 80002ec: fb09 f900 mul.w r9, r9, r0
- 80002f0: b2a4 uxth r4, r4
- 80002f2: ea44 4403 orr.w r4, r4, r3, lsl #16
- 80002f6: 45a1 cmp r9, r4
- 80002f8: d907 bls.n 800030a <__udivmoddi4+0x14e>
- 80002fa: 192c adds r4, r5, r4
- 80002fc: f100 33ff add.w r3, r0, #4294967295
- 8000300: d202 bcs.n 8000308 <__udivmoddi4+0x14c>
- 8000302: 45a1 cmp r9, r4
- 8000304: f200 80b6 bhi.w 8000474 <__udivmoddi4+0x2b8>
- 8000308: 4618 mov r0, r3
- 800030a: eba4 0409 sub.w r4, r4, r9
- 800030e: ea40 400e orr.w r0, r0, lr, lsl #16
- 8000312: e79e b.n 8000252 <__udivmoddi4+0x96>
- 8000314: f1c7 0520 rsb r5, r7, #32
- 8000318: 40bb lsls r3, r7
- 800031a: fa22 fc05 lsr.w ip, r2, r5
- 800031e: ea4c 0c03 orr.w ip, ip, r3
- 8000322: fa21 f405 lsr.w r4, r1, r5
- 8000326: ea4f 4e1c mov.w lr, ip, lsr #16
- 800032a: fbb4 f9fe udiv r9, r4, lr
- 800032e: fa1f f88c uxth.w r8, ip
- 8000332: fb0e 4419 mls r4, lr, r9, r4
- 8000336: fa20 f305 lsr.w r3, r0, r5
- 800033a: 40b9 lsls r1, r7
- 800033c: fb09 fa08 mul.w sl, r9, r8
- 8000340: 4319 orrs r1, r3
- 8000342: 0c0b lsrs r3, r1, #16
- 8000344: ea43 4404 orr.w r4, r3, r4, lsl #16
- 8000348: 45a2 cmp sl, r4
- 800034a: fa02 f207 lsl.w r2, r2, r7
- 800034e: fa00 f307 lsl.w r3, r0, r7
- 8000352: d90b bls.n 800036c <__udivmoddi4+0x1b0>
- 8000354: eb1c 0404 adds.w r4, ip, r4
- 8000358: f109 30ff add.w r0, r9, #4294967295
- 800035c: f080 8088 bcs.w 8000470 <__udivmoddi4+0x2b4>
- 8000360: 45a2 cmp sl, r4
- 8000362: f240 8085 bls.w 8000470 <__udivmoddi4+0x2b4>
- 8000366: f1a9 0902 sub.w r9, r9, #2
- 800036a: 4464 add r4, ip
- 800036c: eba4 040a sub.w r4, r4, sl
- 8000370: fbb4 f0fe udiv r0, r4, lr
- 8000374: fb0e 4410 mls r4, lr, r0, r4
- 8000378: fb00 fa08 mul.w sl, r0, r8
- 800037c: b289 uxth r1, r1
- 800037e: ea41 4404 orr.w r4, r1, r4, lsl #16
- 8000382: 45a2 cmp sl, r4
- 8000384: d908 bls.n 8000398 <__udivmoddi4+0x1dc>
- 8000386: eb1c 0404 adds.w r4, ip, r4
- 800038a: f100 31ff add.w r1, r0, #4294967295
- 800038e: d26b bcs.n 8000468 <__udivmoddi4+0x2ac>
- 8000390: 45a2 cmp sl, r4
- 8000392: d969 bls.n 8000468 <__udivmoddi4+0x2ac>
- 8000394: 3802 subs r0, #2
- 8000396: 4464 add r4, ip
- 8000398: ea40 4009 orr.w r0, r0, r9, lsl #16
- 800039c: fba0 8902 umull r8, r9, r0, r2
- 80003a0: eba4 040a sub.w r4, r4, sl
- 80003a4: 454c cmp r4, r9
- 80003a6: 4641 mov r1, r8
- 80003a8: 46ce mov lr, r9
- 80003aa: d354 bcc.n 8000456 <__udivmoddi4+0x29a>
- 80003ac: d051 beq.n 8000452 <__udivmoddi4+0x296>
- 80003ae: 2e00 cmp r6, #0
- 80003b0: d069 beq.n 8000486 <__udivmoddi4+0x2ca>
- 80003b2: 1a5a subs r2, r3, r1
- 80003b4: eb64 040e sbc.w r4, r4, lr
- 80003b8: fa04 f505 lsl.w r5, r4, r5
- 80003bc: fa22 f307 lsr.w r3, r2, r7
- 80003c0: 40fc lsrs r4, r7
- 80003c2: 431d orrs r5, r3
- 80003c4: e9c6 5400 strd r5, r4, [r6]
- 80003c8: 2700 movs r7, #0
- 80003ca: e747 b.n 800025c <__udivmoddi4+0xa0>
- 80003cc: 4095 lsls r5, r2
- 80003ce: f1c2 0320 rsb r3, r2, #32
- 80003d2: fa21 f003 lsr.w r0, r1, r3
- 80003d6: ea4f 4815 mov.w r8, r5, lsr #16
- 80003da: fbb0 f7f8 udiv r7, r0, r8
- 80003de: fa1f f985 uxth.w r9, r5
- 80003e2: fb08 0017 mls r0, r8, r7, r0
- 80003e6: fa24 f303 lsr.w r3, r4, r3
- 80003ea: 4091 lsls r1, r2
- 80003ec: fb07 fc09 mul.w ip, r7, r9
- 80003f0: 430b orrs r3, r1
- 80003f2: 0c19 lsrs r1, r3, #16
- 80003f4: ea41 4100 orr.w r1, r1, r0, lsl #16
- 80003f8: 458c cmp ip, r1
- 80003fa: fa04 f402 lsl.w r4, r4, r2
- 80003fe: d907 bls.n 8000410 <__udivmoddi4+0x254>
- 8000400: 1869 adds r1, r5, r1
- 8000402: f107 30ff add.w r0, r7, #4294967295
- 8000406: d231 bcs.n 800046c <__udivmoddi4+0x2b0>
- 8000408: 458c cmp ip, r1
- 800040a: d92f bls.n 800046c <__udivmoddi4+0x2b0>
- 800040c: 3f02 subs r7, #2
- 800040e: 4429 add r1, r5
- 8000410: eba1 010c sub.w r1, r1, ip
- 8000414: fbb1 f0f8 udiv r0, r1, r8
- 8000418: fb08 1c10 mls ip, r8, r0, r1
- 800041c: fb00 fe09 mul.w lr, r0, r9
- 8000420: b299 uxth r1, r3
- 8000422: ea41 410c orr.w r1, r1, ip, lsl #16
- 8000426: 458e cmp lr, r1
- 8000428: d907 bls.n 800043a <__udivmoddi4+0x27e>
- 800042a: 1869 adds r1, r5, r1
- 800042c: f100 33ff add.w r3, r0, #4294967295
- 8000430: d218 bcs.n 8000464 <__udivmoddi4+0x2a8>
- 8000432: 458e cmp lr, r1
- 8000434: d916 bls.n 8000464 <__udivmoddi4+0x2a8>
- 8000436: 3802 subs r0, #2
- 8000438: 4429 add r1, r5
- 800043a: eba1 010e sub.w r1, r1, lr
- 800043e: ea40 4707 orr.w r7, r0, r7, lsl #16
- 8000442: e73a b.n 80002ba <__udivmoddi4+0xfe>
- 8000444: 4637 mov r7, r6
- 8000446: 4630 mov r0, r6
- 8000448: e708 b.n 800025c <__udivmoddi4+0xa0>
- 800044a: 460f mov r7, r1
- 800044c: e6e6 b.n 800021c <__udivmoddi4+0x60>
- 800044e: 4618 mov r0, r3
- 8000450: e6fb b.n 800024a <__udivmoddi4+0x8e>
- 8000452: 4543 cmp r3, r8
- 8000454: d2ab bcs.n 80003ae <__udivmoddi4+0x1f2>
- 8000456: ebb8 0102 subs.w r1, r8, r2
- 800045a: eb69 020c sbc.w r2, r9, ip
- 800045e: 3801 subs r0, #1
- 8000460: 4696 mov lr, r2
- 8000462: e7a4 b.n 80003ae <__udivmoddi4+0x1f2>
- 8000464: 4618 mov r0, r3
- 8000466: e7e8 b.n 800043a <__udivmoddi4+0x27e>
- 8000468: 4608 mov r0, r1
- 800046a: e795 b.n 8000398 <__udivmoddi4+0x1dc>
- 800046c: 4607 mov r7, r0
- 800046e: e7cf b.n 8000410 <__udivmoddi4+0x254>
- 8000470: 4681 mov r9, r0
- 8000472: e77b b.n 800036c <__udivmoddi4+0x1b0>
- 8000474: 3802 subs r0, #2
- 8000476: 442c add r4, r5
- 8000478: e747 b.n 800030a <__udivmoddi4+0x14e>
- 800047a: f1ae 0e02 sub.w lr, lr, #2
- 800047e: 442b add r3, r5
- 8000480: e72f b.n 80002e2 <__udivmoddi4+0x126>
- 8000482: 4638 mov r0, r7
- 8000484: e707 b.n 8000296 <__udivmoddi4+0xda>
- 8000486: 4637 mov r7, r6
- 8000488: e6e8 b.n 800025c <__udivmoddi4+0xa0>
- 800048a: bf00 nop
-
- 0800048c <__aeabi_idiv0>:
- 800048c: 4770 bx lr
- 800048e: bf00 nop
-
- 08000490 <SELECT>:
- * SPI functions
- **************************************/
-
- /* slave select */
- static void SELECT(void)
- {
- 8000490: b580 push {r7, lr}
- 8000492: af00 add r7, sp, #0
- HAL_GPIO_WritePin(SD_CS_PORT, SD_CS_PIN, GPIO_PIN_RESET);
- 8000494: 2200 movs r2, #0
- 8000496: 2140 movs r1, #64 ; 0x40
- 8000498: 4803 ldr r0, [pc, #12] ; (80004a8 <SELECT+0x18>)
- 800049a: f002 f807 bl 80024ac <HAL_GPIO_WritePin>
- HAL_Delay(1);
- 800049e: 2001 movs r0, #1
- 80004a0: f001 f966 bl 8001770 <HAL_Delay>
- }
- 80004a4: bf00 nop
- 80004a6: bd80 pop {r7, pc}
- 80004a8: 40020400 .word 0x40020400
-
- 080004ac <DESELECT>:
-
- /* slave deselect */
- static void DESELECT(void)
- {
- 80004ac: b580 push {r7, lr}
- 80004ae: af00 add r7, sp, #0
- HAL_GPIO_WritePin(SD_CS_PORT, SD_CS_PIN, GPIO_PIN_SET);
- 80004b0: 2201 movs r2, #1
- 80004b2: 2140 movs r1, #64 ; 0x40
- 80004b4: 4803 ldr r0, [pc, #12] ; (80004c4 <DESELECT+0x18>)
- 80004b6: f001 fff9 bl 80024ac <HAL_GPIO_WritePin>
- HAL_Delay(1);
- 80004ba: 2001 movs r0, #1
- 80004bc: f001 f958 bl 8001770 <HAL_Delay>
- }
- 80004c0: bf00 nop
- 80004c2: bd80 pop {r7, pc}
- 80004c4: 40020400 .word 0x40020400
-
- 080004c8 <SPI_TxByte>:
-
- /* SPI transmit a byte */
- static void SPI_TxByte(uint8_t data)
- {
- 80004c8: b580 push {r7, lr}
- 80004ca: b082 sub sp, #8
- 80004cc: af00 add r7, sp, #0
- 80004ce: 4603 mov r3, r0
- 80004d0: 71fb strb r3, [r7, #7]
- while(!__HAL_SPI_GET_FLAG(HSPI_SDCARD, SPI_FLAG_TXE));
- 80004d2: bf00 nop
- 80004d4: 4b08 ldr r3, [pc, #32] ; (80004f8 <SPI_TxByte+0x30>)
- 80004d6: 681b ldr r3, [r3, #0]
- 80004d8: 689b ldr r3, [r3, #8]
- 80004da: f003 0302 and.w r3, r3, #2
- 80004de: 2b02 cmp r3, #2
- 80004e0: d1f8 bne.n 80004d4 <SPI_TxByte+0xc>
- HAL_SPI_Transmit(HSPI_SDCARD, &data, 1, SPI_TIMEOUT);
- 80004e2: 1df9 adds r1, r7, #7
- 80004e4: 2364 movs r3, #100 ; 0x64
- 80004e6: 2201 movs r2, #1
- 80004e8: 4803 ldr r0, [pc, #12] ; (80004f8 <SPI_TxByte+0x30>)
- 80004ea: f002 fe40 bl 800316e <HAL_SPI_Transmit>
- }
- 80004ee: bf00 nop
- 80004f0: 3708 adds r7, #8
- 80004f2: 46bd mov sp, r7
- 80004f4: bd80 pop {r7, pc}
- 80004f6: bf00 nop
- 80004f8: 200013a0 .word 0x200013a0
-
- 080004fc <SPI_TxBuffer>:
-
- /* SPI transmit buffer */
- static void SPI_TxBuffer(uint8_t *buffer, uint16_t len)
- {
- 80004fc: b580 push {r7, lr}
- 80004fe: b082 sub sp, #8
- 8000500: af00 add r7, sp, #0
- 8000502: 6078 str r0, [r7, #4]
- 8000504: 460b mov r3, r1
- 8000506: 807b strh r3, [r7, #2]
- while(!__HAL_SPI_GET_FLAG(HSPI_SDCARD, SPI_FLAG_TXE));
- 8000508: bf00 nop
- 800050a: 4b08 ldr r3, [pc, #32] ; (800052c <SPI_TxBuffer+0x30>)
- 800050c: 681b ldr r3, [r3, #0]
- 800050e: 689b ldr r3, [r3, #8]
- 8000510: f003 0302 and.w r3, r3, #2
- 8000514: 2b02 cmp r3, #2
- 8000516: d1f8 bne.n 800050a <SPI_TxBuffer+0xe>
- HAL_SPI_Transmit(HSPI_SDCARD, buffer, len, SPI_TIMEOUT);
- 8000518: 887a ldrh r2, [r7, #2]
- 800051a: 2364 movs r3, #100 ; 0x64
- 800051c: 6879 ldr r1, [r7, #4]
- 800051e: 4803 ldr r0, [pc, #12] ; (800052c <SPI_TxBuffer+0x30>)
- 8000520: f002 fe25 bl 800316e <HAL_SPI_Transmit>
- }
- 8000524: bf00 nop
- 8000526: 3708 adds r7, #8
- 8000528: 46bd mov sp, r7
- 800052a: bd80 pop {r7, pc}
- 800052c: 200013a0 .word 0x200013a0
-
- 08000530 <SPI_RxByte>:
-
- /* SPI receive a byte */
- static uint8_t SPI_RxByte(void)
- {
- 8000530: b580 push {r7, lr}
- 8000532: b084 sub sp, #16
- 8000534: af02 add r7, sp, #8
- uint8_t dummy, data;
- dummy = 0xFF;
- 8000536: 23ff movs r3, #255 ; 0xff
- 8000538: 71fb strb r3, [r7, #7]
-
- while(!__HAL_SPI_GET_FLAG(HSPI_SDCARD, SPI_FLAG_TXE));
- 800053a: bf00 nop
- 800053c: 4b09 ldr r3, [pc, #36] ; (8000564 <SPI_RxByte+0x34>)
- 800053e: 681b ldr r3, [r3, #0]
- 8000540: 689b ldr r3, [r3, #8]
- 8000542: f003 0302 and.w r3, r3, #2
- 8000546: 2b02 cmp r3, #2
- 8000548: d1f8 bne.n 800053c <SPI_RxByte+0xc>
- HAL_SPI_TransmitReceive(HSPI_SDCARD, &dummy, &data, 1, SPI_TIMEOUT);
- 800054a: 1dba adds r2, r7, #6
- 800054c: 1df9 adds r1, r7, #7
- 800054e: 2364 movs r3, #100 ; 0x64
- 8000550: 9300 str r3, [sp, #0]
- 8000552: 2301 movs r3, #1
- 8000554: 4803 ldr r0, [pc, #12] ; (8000564 <SPI_RxByte+0x34>)
- 8000556: f002 ff46 bl 80033e6 <HAL_SPI_TransmitReceive>
-
- return data;
- 800055a: 79bb ldrb r3, [r7, #6]
- }
- 800055c: 4618 mov r0, r3
- 800055e: 3708 adds r7, #8
- 8000560: 46bd mov sp, r7
- 8000562: bd80 pop {r7, pc}
- 8000564: 200013a0 .word 0x200013a0
-
- 08000568 <SPI_RxBytePtr>:
-
- /* SPI receive a byte via pointer */
- static void SPI_RxBytePtr(uint8_t *buff)
- {
- 8000568: b580 push {r7, lr}
- 800056a: b082 sub sp, #8
- 800056c: af00 add r7, sp, #0
- 800056e: 6078 str r0, [r7, #4]
- *buff = SPI_RxByte();
- 8000570: f7ff ffde bl 8000530 <SPI_RxByte>
- 8000574: 4603 mov r3, r0
- 8000576: 461a mov r2, r3
- 8000578: 687b ldr r3, [r7, #4]
- 800057a: 701a strb r2, [r3, #0]
- }
- 800057c: bf00 nop
- 800057e: 3708 adds r7, #8
- 8000580: 46bd mov sp, r7
- 8000582: bd80 pop {r7, pc}
-
- 08000584 <SD_ReadyWait>:
- * SD functions
- **************************************/
-
- /* wait SD ready */
- static uint8_t SD_ReadyWait(void)
- {
- 8000584: b580 push {r7, lr}
- 8000586: b082 sub sp, #8
- 8000588: af00 add r7, sp, #0
- uint8_t res;
-
- /* timeout 500ms */
- Timer2 = 500;
- 800058a: 4b0a ldr r3, [pc, #40] ; (80005b4 <SD_ReadyWait+0x30>)
- 800058c: f44f 72fa mov.w r2, #500 ; 0x1f4
- 8000590: 801a strh r2, [r3, #0]
-
- /* if SD goes ready, receives 0xFF */
- do {
- res = SPI_RxByte();
- 8000592: f7ff ffcd bl 8000530 <SPI_RxByte>
- 8000596: 4603 mov r3, r0
- 8000598: 71fb strb r3, [r7, #7]
- } while ((res != 0xFF) && Timer2);
- 800059a: 79fb ldrb r3, [r7, #7]
- 800059c: 2bff cmp r3, #255 ; 0xff
- 800059e: d003 beq.n 80005a8 <SD_ReadyWait+0x24>
- 80005a0: 4b04 ldr r3, [pc, #16] ; (80005b4 <SD_ReadyWait+0x30>)
- 80005a2: 881b ldrh r3, [r3, #0]
- 80005a4: 2b00 cmp r3, #0
- 80005a6: d1f4 bne.n 8000592 <SD_ReadyWait+0xe>
-
- return res;
- 80005a8: 79fb ldrb r3, [r7, #7]
- }
- 80005aa: 4618 mov r0, r3
- 80005ac: 3708 adds r7, #8
- 80005ae: 46bd mov sp, r7
- 80005b0: bd80 pop {r7, pc}
- 80005b2: bf00 nop
- 80005b4: 200002e8 .word 0x200002e8
-
- 080005b8 <SD_PowerOn>:
-
- /* power on */
- static void SD_PowerOn(void)
- {
- 80005b8: b580 push {r7, lr}
- 80005ba: b084 sub sp, #16
- 80005bc: af00 add r7, sp, #0
- uint8_t args[6];
- uint32_t cnt = 0x1FFF;
- 80005be: f641 73ff movw r3, #8191 ; 0x1fff
- 80005c2: 60fb str r3, [r7, #12]
-
- /* transmit bytes to wake up */
- DESELECT();
- 80005c4: f7ff ff72 bl 80004ac <DESELECT>
- for(int i = 0; i < 10; i++)
- 80005c8: 2300 movs r3, #0
- 80005ca: 60bb str r3, [r7, #8]
- 80005cc: e005 b.n 80005da <SD_PowerOn+0x22>
- {
- SPI_TxByte(0xFF);
- 80005ce: 20ff movs r0, #255 ; 0xff
- 80005d0: f7ff ff7a bl 80004c8 <SPI_TxByte>
- for(int i = 0; i < 10; i++)
- 80005d4: 68bb ldr r3, [r7, #8]
- 80005d6: 3301 adds r3, #1
- 80005d8: 60bb str r3, [r7, #8]
- 80005da: 68bb ldr r3, [r7, #8]
- 80005dc: 2b09 cmp r3, #9
- 80005de: ddf6 ble.n 80005ce <SD_PowerOn+0x16>
- }
-
- /* slave select */
- SELECT();
- 80005e0: f7ff ff56 bl 8000490 <SELECT>
-
- /* make idle state */
- args[0] = CMD0; /* CMD0:GO_IDLE_STATE */
- 80005e4: 2340 movs r3, #64 ; 0x40
- 80005e6: 703b strb r3, [r7, #0]
- args[1] = 0;
- 80005e8: 2300 movs r3, #0
- 80005ea: 707b strb r3, [r7, #1]
- args[2] = 0;
- 80005ec: 2300 movs r3, #0
- 80005ee: 70bb strb r3, [r7, #2]
- args[3] = 0;
- 80005f0: 2300 movs r3, #0
- 80005f2: 70fb strb r3, [r7, #3]
- args[4] = 0;
- 80005f4: 2300 movs r3, #0
- 80005f6: 713b strb r3, [r7, #4]
- args[5] = 0x95; /* CRC */
- 80005f8: 2395 movs r3, #149 ; 0x95
- 80005fa: 717b strb r3, [r7, #5]
-
- SPI_TxBuffer(args, sizeof(args));
- 80005fc: 463b mov r3, r7
- 80005fe: 2106 movs r1, #6
- 8000600: 4618 mov r0, r3
- 8000602: f7ff ff7b bl 80004fc <SPI_TxBuffer>
-
- /* wait response */
- while ((SPI_RxByte() != 0x01) && cnt)
- 8000606: e002 b.n 800060e <SD_PowerOn+0x56>
- {
- cnt--;
- 8000608: 68fb ldr r3, [r7, #12]
- 800060a: 3b01 subs r3, #1
- 800060c: 60fb str r3, [r7, #12]
- while ((SPI_RxByte() != 0x01) && cnt)
- 800060e: f7ff ff8f bl 8000530 <SPI_RxByte>
- 8000612: 4603 mov r3, r0
- 8000614: 2b01 cmp r3, #1
- 8000616: d002 beq.n 800061e <SD_PowerOn+0x66>
- 8000618: 68fb ldr r3, [r7, #12]
- 800061a: 2b00 cmp r3, #0
- 800061c: d1f4 bne.n 8000608 <SD_PowerOn+0x50>
- }
-
- DESELECT();
- 800061e: f7ff ff45 bl 80004ac <DESELECT>
- SPI_TxByte(0XFF);
- 8000622: 20ff movs r0, #255 ; 0xff
- 8000624: f7ff ff50 bl 80004c8 <SPI_TxByte>
-
- PowerFlag = 1;
- 8000628: 4b03 ldr r3, [pc, #12] ; (8000638 <SD_PowerOn+0x80>)
- 800062a: 2201 movs r2, #1
- 800062c: 701a strb r2, [r3, #0]
- }
- 800062e: bf00 nop
- 8000630: 3710 adds r7, #16
- 8000632: 46bd mov sp, r7
- 8000634: bd80 pop {r7, pc}
- 8000636: bf00 nop
- 8000638: 200000a5 .word 0x200000a5
-
- 0800063c <SD_PowerOff>:
-
- /* power off */
- static void SD_PowerOff(void)
- {
- 800063c: b480 push {r7}
- 800063e: af00 add r7, sp, #0
- PowerFlag = 0;
- 8000640: 4b03 ldr r3, [pc, #12] ; (8000650 <SD_PowerOff+0x14>)
- 8000642: 2200 movs r2, #0
- 8000644: 701a strb r2, [r3, #0]
- }
- 8000646: bf00 nop
- 8000648: 46bd mov sp, r7
- 800064a: bc80 pop {r7}
- 800064c: 4770 bx lr
- 800064e: bf00 nop
- 8000650: 200000a5 .word 0x200000a5
-
- 08000654 <SD_CheckPower>:
-
- /* check power flag */
- static uint8_t SD_CheckPower(void)
- {
- 8000654: b480 push {r7}
- 8000656: af00 add r7, sp, #0
- return PowerFlag;
- 8000658: 4b02 ldr r3, [pc, #8] ; (8000664 <SD_CheckPower+0x10>)
- 800065a: 781b ldrb r3, [r3, #0]
- }
- 800065c: 4618 mov r0, r3
- 800065e: 46bd mov sp, r7
- 8000660: bc80 pop {r7}
- 8000662: 4770 bx lr
- 8000664: 200000a5 .word 0x200000a5
-
- 08000668 <SD_RxDataBlock>:
-
- /* receive data block */
- static bool SD_RxDataBlock(BYTE *buff, UINT len)
- {
- 8000668: b580 push {r7, lr}
- 800066a: b084 sub sp, #16
- 800066c: af00 add r7, sp, #0
- 800066e: 6078 str r0, [r7, #4]
- 8000670: 6039 str r1, [r7, #0]
- uint8_t token;
-
- /* timeout 200ms */
- Timer1 = 200;
- 8000672: 4b13 ldr r3, [pc, #76] ; (80006c0 <SD_RxDataBlock+0x58>)
- 8000674: 22c8 movs r2, #200 ; 0xc8
- 8000676: 801a strh r2, [r3, #0]
-
- /* loop until receive a response or timeout */
- do {
- token = SPI_RxByte();
- 8000678: f7ff ff5a bl 8000530 <SPI_RxByte>
- 800067c: 4603 mov r3, r0
- 800067e: 73fb strb r3, [r7, #15]
- } while((token == 0xFF) && Timer1);
- 8000680: 7bfb ldrb r3, [r7, #15]
- 8000682: 2bff cmp r3, #255 ; 0xff
- 8000684: d103 bne.n 800068e <SD_RxDataBlock+0x26>
- 8000686: 4b0e ldr r3, [pc, #56] ; (80006c0 <SD_RxDataBlock+0x58>)
- 8000688: 881b ldrh r3, [r3, #0]
- 800068a: 2b00 cmp r3, #0
- 800068c: d1f4 bne.n 8000678 <SD_RxDataBlock+0x10>
-
- /* invalid response */
- if(token != 0xFE) return FALSE;
- 800068e: 7bfb ldrb r3, [r7, #15]
- 8000690: 2bfe cmp r3, #254 ; 0xfe
- 8000692: d001 beq.n 8000698 <SD_RxDataBlock+0x30>
- 8000694: 2300 movs r3, #0
- 8000696: e00f b.n 80006b8 <SD_RxDataBlock+0x50>
-
- /* receive data */
- do {
- SPI_RxBytePtr(buff++);
- 8000698: 687b ldr r3, [r7, #4]
- 800069a: 1c5a adds r2, r3, #1
- 800069c: 607a str r2, [r7, #4]
- 800069e: 4618 mov r0, r3
- 80006a0: f7ff ff62 bl 8000568 <SPI_RxBytePtr>
- } while(len--);
- 80006a4: 683b ldr r3, [r7, #0]
- 80006a6: 1e5a subs r2, r3, #1
- 80006a8: 603a str r2, [r7, #0]
- 80006aa: 2b00 cmp r3, #0
- 80006ac: d1f4 bne.n 8000698 <SD_RxDataBlock+0x30>
-
- /* discard CRC */
- SPI_RxByte();
- 80006ae: f7ff ff3f bl 8000530 <SPI_RxByte>
- SPI_RxByte();
- 80006b2: f7ff ff3d bl 8000530 <SPI_RxByte>
-
- return TRUE;
- 80006b6: 2301 movs r3, #1
- }
- 80006b8: 4618 mov r0, r3
- 80006ba: 3710 adds r7, #16
- 80006bc: 46bd mov sp, r7
- 80006be: bd80 pop {r7, pc}
- 80006c0: 200002ea .word 0x200002ea
-
- 080006c4 <SD_TxDataBlock>:
-
- /* transmit data block */
- #if _USE_WRITE == 1
- static bool SD_TxDataBlock(const uint8_t *buff, BYTE token)
- {
- 80006c4: b580 push {r7, lr}
- 80006c6: b084 sub sp, #16
- 80006c8: af00 add r7, sp, #0
- 80006ca: 6078 str r0, [r7, #4]
- 80006cc: 460b mov r3, r1
- 80006ce: 70fb strb r3, [r7, #3]
- uint8_t resp;
- uint8_t i = 0;
- 80006d0: 2300 movs r3, #0
- 80006d2: 73bb strb r3, [r7, #14]
-
- /* wait SD ready */
- if (SD_ReadyWait() != 0xFF) return FALSE;
- 80006d4: f7ff ff56 bl 8000584 <SD_ReadyWait>
- 80006d8: 4603 mov r3, r0
- 80006da: 2bff cmp r3, #255 ; 0xff
- 80006dc: d001 beq.n 80006e2 <SD_TxDataBlock+0x1e>
- 80006de: 2300 movs r3, #0
- 80006e0: e02f b.n 8000742 <SD_TxDataBlock+0x7e>
-
- /* transmit token */
- SPI_TxByte(token);
- 80006e2: 78fb ldrb r3, [r7, #3]
- 80006e4: 4618 mov r0, r3
- 80006e6: f7ff feef bl 80004c8 <SPI_TxByte>
-
- /* if it's not STOP token, transmit data */
- if (token != 0xFD)
- 80006ea: 78fb ldrb r3, [r7, #3]
- 80006ec: 2bfd cmp r3, #253 ; 0xfd
- 80006ee: d020 beq.n 8000732 <SD_TxDataBlock+0x6e>
- {
- SPI_TxBuffer((uint8_t*)buff, 512);
- 80006f0: f44f 7100 mov.w r1, #512 ; 0x200
- 80006f4: 6878 ldr r0, [r7, #4]
- 80006f6: f7ff ff01 bl 80004fc <SPI_TxBuffer>
-
- /* discard CRC */
- SPI_RxByte();
- 80006fa: f7ff ff19 bl 8000530 <SPI_RxByte>
- SPI_RxByte();
- 80006fe: f7ff ff17 bl 8000530 <SPI_RxByte>
-
- /* receive response */
- while (i <= 64)
- 8000702: e00b b.n 800071c <SD_TxDataBlock+0x58>
- {
- resp = SPI_RxByte();
- 8000704: f7ff ff14 bl 8000530 <SPI_RxByte>
- 8000708: 4603 mov r3, r0
- 800070a: 73fb strb r3, [r7, #15]
-
- /* transmit 0x05 accepted */
- if ((resp & 0x1F) == 0x05) break;
- 800070c: 7bfb ldrb r3, [r7, #15]
- 800070e: f003 031f and.w r3, r3, #31
- 8000712: 2b05 cmp r3, #5
- 8000714: d006 beq.n 8000724 <SD_TxDataBlock+0x60>
- i++;
- 8000716: 7bbb ldrb r3, [r7, #14]
- 8000718: 3301 adds r3, #1
- 800071a: 73bb strb r3, [r7, #14]
- while (i <= 64)
- 800071c: 7bbb ldrb r3, [r7, #14]
- 800071e: 2b40 cmp r3, #64 ; 0x40
- 8000720: d9f0 bls.n 8000704 <SD_TxDataBlock+0x40>
- 8000722: e000 b.n 8000726 <SD_TxDataBlock+0x62>
- if ((resp & 0x1F) == 0x05) break;
- 8000724: bf00 nop
- }
-
- /* recv buffer clear */
- while (SPI_RxByte() == 0);
- 8000726: bf00 nop
- 8000728: f7ff ff02 bl 8000530 <SPI_RxByte>
- 800072c: 4603 mov r3, r0
- 800072e: 2b00 cmp r3, #0
- 8000730: d0fa beq.n 8000728 <SD_TxDataBlock+0x64>
- }
-
- /* transmit 0x05 accepted */
- if ((resp & 0x1F) == 0x05) return TRUE;
- 8000732: 7bfb ldrb r3, [r7, #15]
- 8000734: f003 031f and.w r3, r3, #31
- 8000738: 2b05 cmp r3, #5
- 800073a: d101 bne.n 8000740 <SD_TxDataBlock+0x7c>
- 800073c: 2301 movs r3, #1
- 800073e: e000 b.n 8000742 <SD_TxDataBlock+0x7e>
-
- return FALSE;
- 8000740: 2300 movs r3, #0
- }
- 8000742: 4618 mov r0, r3
- 8000744: 3710 adds r7, #16
- 8000746: 46bd mov sp, r7
- 8000748: bd80 pop {r7, pc}
-
- 0800074a <SD_SendCmd>:
- #endif /* _USE_WRITE */
-
- /* transmit command */
- static BYTE SD_SendCmd(BYTE cmd, uint32_t arg)
- {
- 800074a: b580 push {r7, lr}
- 800074c: b084 sub sp, #16
- 800074e: af00 add r7, sp, #0
- 8000750: 4603 mov r3, r0
- 8000752: 6039 str r1, [r7, #0]
- 8000754: 71fb strb r3, [r7, #7]
- uint8_t crc, res;
-
- /* wait SD ready */
- if (SD_ReadyWait() != 0xFF) return 0xFF;
- 8000756: f7ff ff15 bl 8000584 <SD_ReadyWait>
- 800075a: 4603 mov r3, r0
- 800075c: 2bff cmp r3, #255 ; 0xff
- 800075e: d001 beq.n 8000764 <SD_SendCmd+0x1a>
- 8000760: 23ff movs r3, #255 ; 0xff
- 8000762: e042 b.n 80007ea <SD_SendCmd+0xa0>
-
- /* transmit command */
- SPI_TxByte(cmd); /* Command */
- 8000764: 79fb ldrb r3, [r7, #7]
- 8000766: 4618 mov r0, r3
- 8000768: f7ff feae bl 80004c8 <SPI_TxByte>
- SPI_TxByte((uint8_t)(arg >> 24)); /* Argument[31..24] */
- 800076c: 683b ldr r3, [r7, #0]
- 800076e: 0e1b lsrs r3, r3, #24
- 8000770: b2db uxtb r3, r3
- 8000772: 4618 mov r0, r3
- 8000774: f7ff fea8 bl 80004c8 <SPI_TxByte>
- SPI_TxByte((uint8_t)(arg >> 16)); /* Argument[23..16] */
- 8000778: 683b ldr r3, [r7, #0]
- 800077a: 0c1b lsrs r3, r3, #16
- 800077c: b2db uxtb r3, r3
- 800077e: 4618 mov r0, r3
- 8000780: f7ff fea2 bl 80004c8 <SPI_TxByte>
- SPI_TxByte((uint8_t)(arg >> 8)); /* Argument[15..8] */
- 8000784: 683b ldr r3, [r7, #0]
- 8000786: 0a1b lsrs r3, r3, #8
- 8000788: b2db uxtb r3, r3
- 800078a: 4618 mov r0, r3
- 800078c: f7ff fe9c bl 80004c8 <SPI_TxByte>
- SPI_TxByte((uint8_t)arg); /* Argument[7..0] */
- 8000790: 683b ldr r3, [r7, #0]
- 8000792: b2db uxtb r3, r3
- 8000794: 4618 mov r0, r3
- 8000796: f7ff fe97 bl 80004c8 <SPI_TxByte>
-
- /* prepare CRC */
- if(cmd == CMD0) crc = 0x95; /* CRC for CMD0(0) */
- 800079a: 79fb ldrb r3, [r7, #7]
- 800079c: 2b40 cmp r3, #64 ; 0x40
- 800079e: d102 bne.n 80007a6 <SD_SendCmd+0x5c>
- 80007a0: 2395 movs r3, #149 ; 0x95
- 80007a2: 73fb strb r3, [r7, #15]
- 80007a4: e007 b.n 80007b6 <SD_SendCmd+0x6c>
- else if(cmd == CMD8) crc = 0x87; /* CRC for CMD8(0x1AA) */
- 80007a6: 79fb ldrb r3, [r7, #7]
- 80007a8: 2b48 cmp r3, #72 ; 0x48
- 80007aa: d102 bne.n 80007b2 <SD_SendCmd+0x68>
- 80007ac: 2387 movs r3, #135 ; 0x87
- 80007ae: 73fb strb r3, [r7, #15]
- 80007b0: e001 b.n 80007b6 <SD_SendCmd+0x6c>
- else crc = 1;
- 80007b2: 2301 movs r3, #1
- 80007b4: 73fb strb r3, [r7, #15]
-
- /* transmit CRC */
- SPI_TxByte(crc);
- 80007b6: 7bfb ldrb r3, [r7, #15]
- 80007b8: 4618 mov r0, r3
- 80007ba: f7ff fe85 bl 80004c8 <SPI_TxByte>
-
- /* Skip a stuff byte when STOP_TRANSMISSION */
- if (cmd == CMD12) SPI_RxByte();
- 80007be: 79fb ldrb r3, [r7, #7]
- 80007c0: 2b4c cmp r3, #76 ; 0x4c
- 80007c2: d101 bne.n 80007c8 <SD_SendCmd+0x7e>
- 80007c4: f7ff feb4 bl 8000530 <SPI_RxByte>
-
- /* receive response */
- uint8_t n = 10;
- 80007c8: 230a movs r3, #10
- 80007ca: 73bb strb r3, [r7, #14]
- do {
- res = SPI_RxByte();
- 80007cc: f7ff feb0 bl 8000530 <SPI_RxByte>
- 80007d0: 4603 mov r3, r0
- 80007d2: 737b strb r3, [r7, #13]
- } while ((res & 0x80) && --n);
- 80007d4: f997 300d ldrsb.w r3, [r7, #13]
- 80007d8: 2b00 cmp r3, #0
- 80007da: da05 bge.n 80007e8 <SD_SendCmd+0x9e>
- 80007dc: 7bbb ldrb r3, [r7, #14]
- 80007de: 3b01 subs r3, #1
- 80007e0: 73bb strb r3, [r7, #14]
- 80007e2: 7bbb ldrb r3, [r7, #14]
- 80007e4: 2b00 cmp r3, #0
- 80007e6: d1f1 bne.n 80007cc <SD_SendCmd+0x82>
-
- return res;
- 80007e8: 7b7b ldrb r3, [r7, #13]
- }
- 80007ea: 4618 mov r0, r3
- 80007ec: 3710 adds r7, #16
- 80007ee: 46bd mov sp, r7
- 80007f0: bd80 pop {r7, pc}
- ...
-
- 080007f4 <SD_disk_initialize>:
- * user_diskio.c functions
- **************************************/
-
- /* initialize SD */
- DSTATUS SD_disk_initialize(BYTE drv)
- {
- 80007f4: b590 push {r4, r7, lr}
- 80007f6: b085 sub sp, #20
- 80007f8: af00 add r7, sp, #0
- 80007fa: 4603 mov r3, r0
- 80007fc: 71fb strb r3, [r7, #7]
- uint8_t n, type, ocr[4];
-
- /* single drive, drv should be 0 */
- if(drv) return STA_NOINIT;
- 80007fe: 79fb ldrb r3, [r7, #7]
- 8000800: 2b00 cmp r3, #0
- 8000802: d001 beq.n 8000808 <SD_disk_initialize+0x14>
- 8000804: 2301 movs r3, #1
- 8000806: e0d1 b.n 80009ac <SD_disk_initialize+0x1b8>
-
- /* no disk */
- if(Stat & STA_NODISK) return Stat;
- 8000808: 4b6a ldr r3, [pc, #424] ; (80009b4 <SD_disk_initialize+0x1c0>)
- 800080a: 781b ldrb r3, [r3, #0]
- 800080c: b2db uxtb r3, r3
- 800080e: f003 0302 and.w r3, r3, #2
- 8000812: 2b00 cmp r3, #0
- 8000814: d003 beq.n 800081e <SD_disk_initialize+0x2a>
- 8000816: 4b67 ldr r3, [pc, #412] ; (80009b4 <SD_disk_initialize+0x1c0>)
- 8000818: 781b ldrb r3, [r3, #0]
- 800081a: b2db uxtb r3, r3
- 800081c: e0c6 b.n 80009ac <SD_disk_initialize+0x1b8>
-
- /* power on */
- SD_PowerOn();
- 800081e: f7ff fecb bl 80005b8 <SD_PowerOn>
-
- /* slave select */
- SELECT();
- 8000822: f7ff fe35 bl 8000490 <SELECT>
-
- /* check disk type */
- type = 0;
- 8000826: 2300 movs r3, #0
- 8000828: 73bb strb r3, [r7, #14]
-
- /* send GO_IDLE_STATE command */
- if (SD_SendCmd(CMD0, 0) == 1)
- 800082a: 2100 movs r1, #0
- 800082c: 2040 movs r0, #64 ; 0x40
- 800082e: f7ff ff8c bl 800074a <SD_SendCmd>
- 8000832: 4603 mov r3, r0
- 8000834: 2b01 cmp r3, #1
- 8000836: f040 80a1 bne.w 800097c <SD_disk_initialize+0x188>
- {
- /* timeout 1 sec */
- Timer1 = 1000;
- 800083a: 4b5f ldr r3, [pc, #380] ; (80009b8 <SD_disk_initialize+0x1c4>)
- 800083c: f44f 727a mov.w r2, #1000 ; 0x3e8
- 8000840: 801a strh r2, [r3, #0]
-
- /* SDC V2+ accept CMD8 command, http://elm-chan.org/docs/mmc/mmc_e.html */
- if (SD_SendCmd(CMD8, 0x1AA) == 1)
- 8000842: f44f 71d5 mov.w r1, #426 ; 0x1aa
- 8000846: 2048 movs r0, #72 ; 0x48
- 8000848: f7ff ff7f bl 800074a <SD_SendCmd>
- 800084c: 4603 mov r3, r0
- 800084e: 2b01 cmp r3, #1
- 8000850: d155 bne.n 80008fe <SD_disk_initialize+0x10a>
- {
- /* operation condition register */
- for (n = 0; n < 4; n++)
- 8000852: 2300 movs r3, #0
- 8000854: 73fb strb r3, [r7, #15]
- 8000856: e00c b.n 8000872 <SD_disk_initialize+0x7e>
- {
- ocr[n] = SPI_RxByte();
- 8000858: 7bfc ldrb r4, [r7, #15]
- 800085a: f7ff fe69 bl 8000530 <SPI_RxByte>
- 800085e: 4603 mov r3, r0
- 8000860: 461a mov r2, r3
- 8000862: f107 0310 add.w r3, r7, #16
- 8000866: 4423 add r3, r4
- 8000868: f803 2c08 strb.w r2, [r3, #-8]
- for (n = 0; n < 4; n++)
- 800086c: 7bfb ldrb r3, [r7, #15]
- 800086e: 3301 adds r3, #1
- 8000870: 73fb strb r3, [r7, #15]
- 8000872: 7bfb ldrb r3, [r7, #15]
- 8000874: 2b03 cmp r3, #3
- 8000876: d9ef bls.n 8000858 <SD_disk_initialize+0x64>
- }
-
- /* voltage range 2.7-3.6V */
- if (ocr[2] == 0x01 && ocr[3] == 0xAA)
- 8000878: 7abb ldrb r3, [r7, #10]
- 800087a: 2b01 cmp r3, #1
- 800087c: d17e bne.n 800097c <SD_disk_initialize+0x188>
- 800087e: 7afb ldrb r3, [r7, #11]
- 8000880: 2baa cmp r3, #170 ; 0xaa
- 8000882: d17b bne.n 800097c <SD_disk_initialize+0x188>
- {
- /* ACMD41 with HCS bit */
- do {
- if (SD_SendCmd(CMD55, 0) <= 1 && SD_SendCmd(CMD41, 1UL << 30) == 0) break;
- 8000884: 2100 movs r1, #0
- 8000886: 2077 movs r0, #119 ; 0x77
- 8000888: f7ff ff5f bl 800074a <SD_SendCmd>
- 800088c: 4603 mov r3, r0
- 800088e: 2b01 cmp r3, #1
- 8000890: d807 bhi.n 80008a2 <SD_disk_initialize+0xae>
- 8000892: f04f 4180 mov.w r1, #1073741824 ; 0x40000000
- 8000896: 2069 movs r0, #105 ; 0x69
- 8000898: f7ff ff57 bl 800074a <SD_SendCmd>
- 800089c: 4603 mov r3, r0
- 800089e: 2b00 cmp r3, #0
- 80008a0: d004 beq.n 80008ac <SD_disk_initialize+0xb8>
- } while (Timer1);
- 80008a2: 4b45 ldr r3, [pc, #276] ; (80009b8 <SD_disk_initialize+0x1c4>)
- 80008a4: 881b ldrh r3, [r3, #0]
- 80008a6: 2b00 cmp r3, #0
- 80008a8: d1ec bne.n 8000884 <SD_disk_initialize+0x90>
- 80008aa: e000 b.n 80008ae <SD_disk_initialize+0xba>
- if (SD_SendCmd(CMD55, 0) <= 1 && SD_SendCmd(CMD41, 1UL << 30) == 0) break;
- 80008ac: bf00 nop
-
- /* READ_OCR */
- if (Timer1 && SD_SendCmd(CMD58, 0) == 0)
- 80008ae: 4b42 ldr r3, [pc, #264] ; (80009b8 <SD_disk_initialize+0x1c4>)
- 80008b0: 881b ldrh r3, [r3, #0]
- 80008b2: 2b00 cmp r3, #0
- 80008b4: d062 beq.n 800097c <SD_disk_initialize+0x188>
- 80008b6: 2100 movs r1, #0
- 80008b8: 207a movs r0, #122 ; 0x7a
- 80008ba: f7ff ff46 bl 800074a <SD_SendCmd>
- 80008be: 4603 mov r3, r0
- 80008c0: 2b00 cmp r3, #0
- 80008c2: d15b bne.n 800097c <SD_disk_initialize+0x188>
- {
- /* Check CCS bit */
- for (n = 0; n < 4; n++)
- 80008c4: 2300 movs r3, #0
- 80008c6: 73fb strb r3, [r7, #15]
- 80008c8: e00c b.n 80008e4 <SD_disk_initialize+0xf0>
- {
- ocr[n] = SPI_RxByte();
- 80008ca: 7bfc ldrb r4, [r7, #15]
- 80008cc: f7ff fe30 bl 8000530 <SPI_RxByte>
- 80008d0: 4603 mov r3, r0
- 80008d2: 461a mov r2, r3
- 80008d4: f107 0310 add.w r3, r7, #16
- 80008d8: 4423 add r3, r4
- 80008da: f803 2c08 strb.w r2, [r3, #-8]
- for (n = 0; n < 4; n++)
- 80008de: 7bfb ldrb r3, [r7, #15]
- 80008e0: 3301 adds r3, #1
- 80008e2: 73fb strb r3, [r7, #15]
- 80008e4: 7bfb ldrb r3, [r7, #15]
- 80008e6: 2b03 cmp r3, #3
- 80008e8: d9ef bls.n 80008ca <SD_disk_initialize+0xd6>
- }
-
- /* SDv2 (HC or SC) */
- type = (ocr[0] & 0x40) ? CT_SD2 | CT_BLOCK : CT_SD2;
- 80008ea: 7a3b ldrb r3, [r7, #8]
- 80008ec: f003 0340 and.w r3, r3, #64 ; 0x40
- 80008f0: 2b00 cmp r3, #0
- 80008f2: d001 beq.n 80008f8 <SD_disk_initialize+0x104>
- 80008f4: 230c movs r3, #12
- 80008f6: e000 b.n 80008fa <SD_disk_initialize+0x106>
- 80008f8: 2304 movs r3, #4
- 80008fa: 73bb strb r3, [r7, #14]
- 80008fc: e03e b.n 800097c <SD_disk_initialize+0x188>
- }
- }
- else
- {
- /* SDC V1 or MMC */
- type = (SD_SendCmd(CMD55, 0) <= 1 && SD_SendCmd(CMD41, 0) <= 1) ? CT_SD1 : CT_MMC;
- 80008fe: 2100 movs r1, #0
- 8000900: 2077 movs r0, #119 ; 0x77
- 8000902: f7ff ff22 bl 800074a <SD_SendCmd>
- 8000906: 4603 mov r3, r0
- 8000908: 2b01 cmp r3, #1
- 800090a: d808 bhi.n 800091e <SD_disk_initialize+0x12a>
- 800090c: 2100 movs r1, #0
- 800090e: 2069 movs r0, #105 ; 0x69
- 8000910: f7ff ff1b bl 800074a <SD_SendCmd>
- 8000914: 4603 mov r3, r0
- 8000916: 2b01 cmp r3, #1
- 8000918: d801 bhi.n 800091e <SD_disk_initialize+0x12a>
- 800091a: 2302 movs r3, #2
- 800091c: e000 b.n 8000920 <SD_disk_initialize+0x12c>
- 800091e: 2301 movs r3, #1
- 8000920: 73bb strb r3, [r7, #14]
-
- do
- {
- if (type == CT_SD1)
- 8000922: 7bbb ldrb r3, [r7, #14]
- 8000924: 2b02 cmp r3, #2
- 8000926: d10e bne.n 8000946 <SD_disk_initialize+0x152>
- {
- if (SD_SendCmd(CMD55, 0) <= 1 && SD_SendCmd(CMD41, 0) == 0) break; /* ACMD41 */
- 8000928: 2100 movs r1, #0
- 800092a: 2077 movs r0, #119 ; 0x77
- 800092c: f7ff ff0d bl 800074a <SD_SendCmd>
- 8000930: 4603 mov r3, r0
- 8000932: 2b01 cmp r3, #1
- 8000934: d80e bhi.n 8000954 <SD_disk_initialize+0x160>
- 8000936: 2100 movs r1, #0
- 8000938: 2069 movs r0, #105 ; 0x69
- 800093a: f7ff ff06 bl 800074a <SD_SendCmd>
- 800093e: 4603 mov r3, r0
- 8000940: 2b00 cmp r3, #0
- 8000942: d107 bne.n 8000954 <SD_disk_initialize+0x160>
- 8000944: e00c b.n 8000960 <SD_disk_initialize+0x16c>
- }
- else
- {
- if (SD_SendCmd(CMD1, 0) == 0) break; /* CMD1 */
- 8000946: 2100 movs r1, #0
- 8000948: 2041 movs r0, #65 ; 0x41
- 800094a: f7ff fefe bl 800074a <SD_SendCmd>
- 800094e: 4603 mov r3, r0
- 8000950: 2b00 cmp r3, #0
- 8000952: d004 beq.n 800095e <SD_disk_initialize+0x16a>
- }
-
- } while (Timer1);
- 8000954: 4b18 ldr r3, [pc, #96] ; (80009b8 <SD_disk_initialize+0x1c4>)
- 8000956: 881b ldrh r3, [r3, #0]
- 8000958: 2b00 cmp r3, #0
- 800095a: d1e2 bne.n 8000922 <SD_disk_initialize+0x12e>
- 800095c: e000 b.n 8000960 <SD_disk_initialize+0x16c>
- if (SD_SendCmd(CMD1, 0) == 0) break; /* CMD1 */
- 800095e: bf00 nop
-
- /* SET_BLOCKLEN */
- if (!Timer1 || SD_SendCmd(CMD16, 512) != 0) type = 0;
- 8000960: 4b15 ldr r3, [pc, #84] ; (80009b8 <SD_disk_initialize+0x1c4>)
- 8000962: 881b ldrh r3, [r3, #0]
- 8000964: 2b00 cmp r3, #0
- 8000966: d007 beq.n 8000978 <SD_disk_initialize+0x184>
- 8000968: f44f 7100 mov.w r1, #512 ; 0x200
- 800096c: 2050 movs r0, #80 ; 0x50
- 800096e: f7ff feec bl 800074a <SD_SendCmd>
- 8000972: 4603 mov r3, r0
- 8000974: 2b00 cmp r3, #0
- 8000976: d001 beq.n 800097c <SD_disk_initialize+0x188>
- 8000978: 2300 movs r3, #0
- 800097a: 73bb strb r3, [r7, #14]
- }
- }
-
- CardType = type;
- 800097c: 4a0f ldr r2, [pc, #60] ; (80009bc <SD_disk_initialize+0x1c8>)
- 800097e: 7bbb ldrb r3, [r7, #14]
- 8000980: 7013 strb r3, [r2, #0]
-
- /* Idle */
- DESELECT();
- 8000982: f7ff fd93 bl 80004ac <DESELECT>
- SPI_RxByte();
- 8000986: f7ff fdd3 bl 8000530 <SPI_RxByte>
-
- /* Clear STA_NOINIT */
- if (type)
- 800098a: 7bbb ldrb r3, [r7, #14]
- 800098c: 2b00 cmp r3, #0
- 800098e: d008 beq.n 80009a2 <SD_disk_initialize+0x1ae>
- {
- Stat &= ~STA_NOINIT;
- 8000990: 4b08 ldr r3, [pc, #32] ; (80009b4 <SD_disk_initialize+0x1c0>)
- 8000992: 781b ldrb r3, [r3, #0]
- 8000994: b2db uxtb r3, r3
- 8000996: f023 0301 bic.w r3, r3, #1
- 800099a: b2da uxtb r2, r3
- 800099c: 4b05 ldr r3, [pc, #20] ; (80009b4 <SD_disk_initialize+0x1c0>)
- 800099e: 701a strb r2, [r3, #0]
- 80009a0: e001 b.n 80009a6 <SD_disk_initialize+0x1b2>
- }
- else
- {
- /* Initialization failed */
- SD_PowerOff();
- 80009a2: f7ff fe4b bl 800063c <SD_PowerOff>
- }
-
- return Stat;
- 80009a6: 4b03 ldr r3, [pc, #12] ; (80009b4 <SD_disk_initialize+0x1c0>)
- 80009a8: 781b ldrb r3, [r3, #0]
- 80009aa: b2db uxtb r3, r3
- }
- 80009ac: 4618 mov r0, r3
- 80009ae: 3714 adds r7, #20
- 80009b0: 46bd mov sp, r7
- 80009b2: bd90 pop {r4, r7, pc}
- 80009b4: 20000000 .word 0x20000000
- 80009b8: 200002ea .word 0x200002ea
- 80009bc: 200000a4 .word 0x200000a4
-
- 080009c0 <SD_disk_status>:
-
- /* return disk status */
- DSTATUS SD_disk_status(BYTE drv)
- {
- 80009c0: b480 push {r7}
- 80009c2: b083 sub sp, #12
- 80009c4: af00 add r7, sp, #0
- 80009c6: 4603 mov r3, r0
- 80009c8: 71fb strb r3, [r7, #7]
- if (drv) return STA_NOINIT;
- 80009ca: 79fb ldrb r3, [r7, #7]
- 80009cc: 2b00 cmp r3, #0
- 80009ce: d001 beq.n 80009d4 <SD_disk_status+0x14>
- 80009d0: 2301 movs r3, #1
- 80009d2: e002 b.n 80009da <SD_disk_status+0x1a>
- return Stat;
- 80009d4: 4b03 ldr r3, [pc, #12] ; (80009e4 <SD_disk_status+0x24>)
- 80009d6: 781b ldrb r3, [r3, #0]
- 80009d8: b2db uxtb r3, r3
- }
- 80009da: 4618 mov r0, r3
- 80009dc: 370c adds r7, #12
- 80009de: 46bd mov sp, r7
- 80009e0: bc80 pop {r7}
- 80009e2: 4770 bx lr
- 80009e4: 20000000 .word 0x20000000
-
- 080009e8 <SD_disk_read>:
-
- /* read sector */
- DRESULT SD_disk_read(BYTE pdrv, BYTE* buff, DWORD sector, UINT count)
- {
- 80009e8: b580 push {r7, lr}
- 80009ea: b084 sub sp, #16
- 80009ec: af00 add r7, sp, #0
- 80009ee: 60b9 str r1, [r7, #8]
- 80009f0: 607a str r2, [r7, #4]
- 80009f2: 603b str r3, [r7, #0]
- 80009f4: 4603 mov r3, r0
- 80009f6: 73fb strb r3, [r7, #15]
- /* pdrv should be 0 */
- if (pdrv || !count) return RES_PARERR;
- 80009f8: 7bfb ldrb r3, [r7, #15]
- 80009fa: 2b00 cmp r3, #0
- 80009fc: d102 bne.n 8000a04 <SD_disk_read+0x1c>
- 80009fe: 683b ldr r3, [r7, #0]
- 8000a00: 2b00 cmp r3, #0
- 8000a02: d101 bne.n 8000a08 <SD_disk_read+0x20>
- 8000a04: 2304 movs r3, #4
- 8000a06: e051 b.n 8000aac <SD_disk_read+0xc4>
-
- /* no disk */
- if (Stat & STA_NOINIT) return RES_NOTRDY;
- 8000a08: 4b2a ldr r3, [pc, #168] ; (8000ab4 <SD_disk_read+0xcc>)
- 8000a0a: 781b ldrb r3, [r3, #0]
- 8000a0c: b2db uxtb r3, r3
- 8000a0e: f003 0301 and.w r3, r3, #1
- 8000a12: 2b00 cmp r3, #0
- 8000a14: d001 beq.n 8000a1a <SD_disk_read+0x32>
- 8000a16: 2303 movs r3, #3
- 8000a18: e048 b.n 8000aac <SD_disk_read+0xc4>
-
- /* convert to byte address */
- if (!(CardType & CT_SD2)) sector *= 512;
- 8000a1a: 4b27 ldr r3, [pc, #156] ; (8000ab8 <SD_disk_read+0xd0>)
- 8000a1c: 781b ldrb r3, [r3, #0]
- 8000a1e: f003 0304 and.w r3, r3, #4
- 8000a22: 2b00 cmp r3, #0
- 8000a24: d102 bne.n 8000a2c <SD_disk_read+0x44>
- 8000a26: 687b ldr r3, [r7, #4]
- 8000a28: 025b lsls r3, r3, #9
- 8000a2a: 607b str r3, [r7, #4]
-
- SELECT();
- 8000a2c: f7ff fd30 bl 8000490 <SELECT>
-
- if (count == 1)
- 8000a30: 683b ldr r3, [r7, #0]
- 8000a32: 2b01 cmp r3, #1
- 8000a34: d111 bne.n 8000a5a <SD_disk_read+0x72>
- {
- /* READ_SINGLE_BLOCK */
- if ((SD_SendCmd(CMD17, sector) == 0) && SD_RxDataBlock(buff, 512)) count = 0;
- 8000a36: 6879 ldr r1, [r7, #4]
- 8000a38: 2051 movs r0, #81 ; 0x51
- 8000a3a: f7ff fe86 bl 800074a <SD_SendCmd>
- 8000a3e: 4603 mov r3, r0
- 8000a40: 2b00 cmp r3, #0
- 8000a42: d129 bne.n 8000a98 <SD_disk_read+0xb0>
- 8000a44: f44f 7100 mov.w r1, #512 ; 0x200
- 8000a48: 68b8 ldr r0, [r7, #8]
- 8000a4a: f7ff fe0d bl 8000668 <SD_RxDataBlock>
- 8000a4e: 4603 mov r3, r0
- 8000a50: 2b00 cmp r3, #0
- 8000a52: d021 beq.n 8000a98 <SD_disk_read+0xb0>
- 8000a54: 2300 movs r3, #0
- 8000a56: 603b str r3, [r7, #0]
- 8000a58: e01e b.n 8000a98 <SD_disk_read+0xb0>
- }
- else
- {
- /* READ_MULTIPLE_BLOCK */
- if (SD_SendCmd(CMD18, sector) == 0)
- 8000a5a: 6879 ldr r1, [r7, #4]
- 8000a5c: 2052 movs r0, #82 ; 0x52
- 8000a5e: f7ff fe74 bl 800074a <SD_SendCmd>
- 8000a62: 4603 mov r3, r0
- 8000a64: 2b00 cmp r3, #0
- 8000a66: d117 bne.n 8000a98 <SD_disk_read+0xb0>
- {
- do {
- if (!SD_RxDataBlock(buff, 512)) break;
- 8000a68: f44f 7100 mov.w r1, #512 ; 0x200
- 8000a6c: 68b8 ldr r0, [r7, #8]
- 8000a6e: f7ff fdfb bl 8000668 <SD_RxDataBlock>
- 8000a72: 4603 mov r3, r0
- 8000a74: 2b00 cmp r3, #0
- 8000a76: d00a beq.n 8000a8e <SD_disk_read+0xa6>
- buff += 512;
- 8000a78: 68bb ldr r3, [r7, #8]
- 8000a7a: f503 7300 add.w r3, r3, #512 ; 0x200
- 8000a7e: 60bb str r3, [r7, #8]
- } while (--count);
- 8000a80: 683b ldr r3, [r7, #0]
- 8000a82: 3b01 subs r3, #1
- 8000a84: 603b str r3, [r7, #0]
- 8000a86: 683b ldr r3, [r7, #0]
- 8000a88: 2b00 cmp r3, #0
- 8000a8a: d1ed bne.n 8000a68 <SD_disk_read+0x80>
- 8000a8c: e000 b.n 8000a90 <SD_disk_read+0xa8>
- if (!SD_RxDataBlock(buff, 512)) break;
- 8000a8e: bf00 nop
-
- /* STOP_TRANSMISSION */
- SD_SendCmd(CMD12, 0);
- 8000a90: 2100 movs r1, #0
- 8000a92: 204c movs r0, #76 ; 0x4c
- 8000a94: f7ff fe59 bl 800074a <SD_SendCmd>
- }
- }
-
- /* Idle */
- DESELECT();
- 8000a98: f7ff fd08 bl 80004ac <DESELECT>
- SPI_RxByte();
- 8000a9c: f7ff fd48 bl 8000530 <SPI_RxByte>
-
- return count ? RES_ERROR : RES_OK;
- 8000aa0: 683b ldr r3, [r7, #0]
- 8000aa2: 2b00 cmp r3, #0
- 8000aa4: bf14 ite ne
- 8000aa6: 2301 movne r3, #1
- 8000aa8: 2300 moveq r3, #0
- 8000aaa: b2db uxtb r3, r3
- }
- 8000aac: 4618 mov r0, r3
- 8000aae: 3710 adds r7, #16
- 8000ab0: 46bd mov sp, r7
- 8000ab2: bd80 pop {r7, pc}
- 8000ab4: 20000000 .word 0x20000000
- 8000ab8: 200000a4 .word 0x200000a4
-
- 08000abc <SD_disk_write>:
-
- /* write sector */
- #if _USE_WRITE == 1
- DRESULT SD_disk_write(BYTE pdrv, const BYTE* buff, DWORD sector, UINT count)
- {
- 8000abc: b580 push {r7, lr}
- 8000abe: b084 sub sp, #16
- 8000ac0: af00 add r7, sp, #0
- 8000ac2: 60b9 str r1, [r7, #8]
- 8000ac4: 607a str r2, [r7, #4]
- 8000ac6: 603b str r3, [r7, #0]
- 8000ac8: 4603 mov r3, r0
- 8000aca: 73fb strb r3, [r7, #15]
- /* pdrv should be 0 */
- if (pdrv || !count) return RES_PARERR;
- 8000acc: 7bfb ldrb r3, [r7, #15]
- 8000ace: 2b00 cmp r3, #0
- 8000ad0: d102 bne.n 8000ad8 <SD_disk_write+0x1c>
- 8000ad2: 683b ldr r3, [r7, #0]
- 8000ad4: 2b00 cmp r3, #0
- 8000ad6: d101 bne.n 8000adc <SD_disk_write+0x20>
- 8000ad8: 2304 movs r3, #4
- 8000ada: e06b b.n 8000bb4 <SD_disk_write+0xf8>
-
- /* no disk */
- if (Stat & STA_NOINIT) return RES_NOTRDY;
- 8000adc: 4b37 ldr r3, [pc, #220] ; (8000bbc <SD_disk_write+0x100>)
- 8000ade: 781b ldrb r3, [r3, #0]
- 8000ae0: b2db uxtb r3, r3
- 8000ae2: f003 0301 and.w r3, r3, #1
- 8000ae6: 2b00 cmp r3, #0
- 8000ae8: d001 beq.n 8000aee <SD_disk_write+0x32>
- 8000aea: 2303 movs r3, #3
- 8000aec: e062 b.n 8000bb4 <SD_disk_write+0xf8>
-
- /* write protection */
- if (Stat & STA_PROTECT) return RES_WRPRT;
- 8000aee: 4b33 ldr r3, [pc, #204] ; (8000bbc <SD_disk_write+0x100>)
- 8000af0: 781b ldrb r3, [r3, #0]
- 8000af2: b2db uxtb r3, r3
- 8000af4: f003 0304 and.w r3, r3, #4
- 8000af8: 2b00 cmp r3, #0
- 8000afa: d001 beq.n 8000b00 <SD_disk_write+0x44>
- 8000afc: 2302 movs r3, #2
- 8000afe: e059 b.n 8000bb4 <SD_disk_write+0xf8>
-
- /* convert to byte address */
- if (!(CardType & CT_SD2)) sector *= 512;
- 8000b00: 4b2f ldr r3, [pc, #188] ; (8000bc0 <SD_disk_write+0x104>)
- 8000b02: 781b ldrb r3, [r3, #0]
- 8000b04: f003 0304 and.w r3, r3, #4
- 8000b08: 2b00 cmp r3, #0
- 8000b0a: d102 bne.n 8000b12 <SD_disk_write+0x56>
- 8000b0c: 687b ldr r3, [r7, #4]
- 8000b0e: 025b lsls r3, r3, #9
- 8000b10: 607b str r3, [r7, #4]
-
- SELECT();
- 8000b12: f7ff fcbd bl 8000490 <SELECT>
-
- if (count == 1)
- 8000b16: 683b ldr r3, [r7, #0]
- 8000b18: 2b01 cmp r3, #1
- 8000b1a: d110 bne.n 8000b3e <SD_disk_write+0x82>
- {
- /* WRITE_BLOCK */
- if ((SD_SendCmd(CMD24, sector) == 0) && SD_TxDataBlock(buff, 0xFE))
- 8000b1c: 6879 ldr r1, [r7, #4]
- 8000b1e: 2058 movs r0, #88 ; 0x58
- 8000b20: f7ff fe13 bl 800074a <SD_SendCmd>
- 8000b24: 4603 mov r3, r0
- 8000b26: 2b00 cmp r3, #0
- 8000b28: d13a bne.n 8000ba0 <SD_disk_write+0xe4>
- 8000b2a: 21fe movs r1, #254 ; 0xfe
- 8000b2c: 68b8 ldr r0, [r7, #8]
- 8000b2e: f7ff fdc9 bl 80006c4 <SD_TxDataBlock>
- 8000b32: 4603 mov r3, r0
- 8000b34: 2b00 cmp r3, #0
- 8000b36: d033 beq.n 8000ba0 <SD_disk_write+0xe4>
- count = 0;
- 8000b38: 2300 movs r3, #0
- 8000b3a: 603b str r3, [r7, #0]
- 8000b3c: e030 b.n 8000ba0 <SD_disk_write+0xe4>
- }
- else
- {
- /* WRITE_MULTIPLE_BLOCK */
- if (CardType & CT_SD1)
- 8000b3e: 4b20 ldr r3, [pc, #128] ; (8000bc0 <SD_disk_write+0x104>)
- 8000b40: 781b ldrb r3, [r3, #0]
- 8000b42: f003 0302 and.w r3, r3, #2
- 8000b46: 2b00 cmp r3, #0
- 8000b48: d007 beq.n 8000b5a <SD_disk_write+0x9e>
- {
- SD_SendCmd(CMD55, 0);
- 8000b4a: 2100 movs r1, #0
- 8000b4c: 2077 movs r0, #119 ; 0x77
- 8000b4e: f7ff fdfc bl 800074a <SD_SendCmd>
- SD_SendCmd(CMD23, count); /* ACMD23 */
- 8000b52: 6839 ldr r1, [r7, #0]
- 8000b54: 2057 movs r0, #87 ; 0x57
- 8000b56: f7ff fdf8 bl 800074a <SD_SendCmd>
- }
-
- if (SD_SendCmd(CMD25, sector) == 0)
- 8000b5a: 6879 ldr r1, [r7, #4]
- 8000b5c: 2059 movs r0, #89 ; 0x59
- 8000b5e: f7ff fdf4 bl 800074a <SD_SendCmd>
- 8000b62: 4603 mov r3, r0
- 8000b64: 2b00 cmp r3, #0
- 8000b66: d11b bne.n 8000ba0 <SD_disk_write+0xe4>
- {
- do {
- if(!SD_TxDataBlock(buff, 0xFC)) break;
- 8000b68: 21fc movs r1, #252 ; 0xfc
- 8000b6a: 68b8 ldr r0, [r7, #8]
- 8000b6c: f7ff fdaa bl 80006c4 <SD_TxDataBlock>
- 8000b70: 4603 mov r3, r0
- 8000b72: 2b00 cmp r3, #0
- 8000b74: d00a beq.n 8000b8c <SD_disk_write+0xd0>
- buff += 512;
- 8000b76: 68bb ldr r3, [r7, #8]
- 8000b78: f503 7300 add.w r3, r3, #512 ; 0x200
- 8000b7c: 60bb str r3, [r7, #8]
- } while (--count);
- 8000b7e: 683b ldr r3, [r7, #0]
- 8000b80: 3b01 subs r3, #1
- 8000b82: 603b str r3, [r7, #0]
- 8000b84: 683b ldr r3, [r7, #0]
- 8000b86: 2b00 cmp r3, #0
- 8000b88: d1ee bne.n 8000b68 <SD_disk_write+0xac>
- 8000b8a: e000 b.n 8000b8e <SD_disk_write+0xd2>
- if(!SD_TxDataBlock(buff, 0xFC)) break;
- 8000b8c: bf00 nop
-
- /* STOP_TRAN token */
- if(!SD_TxDataBlock(0, 0xFD))
- 8000b8e: 21fd movs r1, #253 ; 0xfd
- 8000b90: 2000 movs r0, #0
- 8000b92: f7ff fd97 bl 80006c4 <SD_TxDataBlock>
- 8000b96: 4603 mov r3, r0
- 8000b98: 2b00 cmp r3, #0
- 8000b9a: d101 bne.n 8000ba0 <SD_disk_write+0xe4>
- {
- count = 1;
- 8000b9c: 2301 movs r3, #1
- 8000b9e: 603b str r3, [r7, #0]
- }
- }
- }
-
- /* Idle */
- DESELECT();
- 8000ba0: f7ff fc84 bl 80004ac <DESELECT>
- SPI_RxByte();
- 8000ba4: f7ff fcc4 bl 8000530 <SPI_RxByte>
-
- return count ? RES_ERROR : RES_OK;
- 8000ba8: 683b ldr r3, [r7, #0]
- 8000baa: 2b00 cmp r3, #0
- 8000bac: bf14 ite ne
- 8000bae: 2301 movne r3, #1
- 8000bb0: 2300 moveq r3, #0
- 8000bb2: b2db uxtb r3, r3
- }
- 8000bb4: 4618 mov r0, r3
- 8000bb6: 3710 adds r7, #16
- 8000bb8: 46bd mov sp, r7
- 8000bba: bd80 pop {r7, pc}
- 8000bbc: 20000000 .word 0x20000000
- 8000bc0: 200000a4 .word 0x200000a4
-
- 08000bc4 <SD_disk_ioctl>:
- #endif /* _USE_WRITE */
-
- /* ioctl */
- DRESULT SD_disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
- {
- 8000bc4: b590 push {r4, r7, lr}
- 8000bc6: b08b sub sp, #44 ; 0x2c
- 8000bc8: af00 add r7, sp, #0
- 8000bca: 4603 mov r3, r0
- 8000bcc: 603a str r2, [r7, #0]
- 8000bce: 71fb strb r3, [r7, #7]
- 8000bd0: 460b mov r3, r1
- 8000bd2: 71bb strb r3, [r7, #6]
- DRESULT res;
- uint8_t n, csd[16], *ptr = buff;
- 8000bd4: 683b ldr r3, [r7, #0]
- 8000bd6: 623b str r3, [r7, #32]
- WORD csize;
-
- /* pdrv should be 0 */
- if (drv) return RES_PARERR;
- 8000bd8: 79fb ldrb r3, [r7, #7]
- 8000bda: 2b00 cmp r3, #0
- 8000bdc: d001 beq.n 8000be2 <SD_disk_ioctl+0x1e>
- 8000bde: 2304 movs r3, #4
- 8000be0: e113 b.n 8000e0a <SD_disk_ioctl+0x246>
- res = RES_ERROR;
- 8000be2: 2301 movs r3, #1
- 8000be4: f887 3027 strb.w r3, [r7, #39] ; 0x27
-
- if (ctrl == CTRL_POWER)
- 8000be8: 79bb ldrb r3, [r7, #6]
- 8000bea: 2b05 cmp r3, #5
- 8000bec: d121 bne.n 8000c32 <SD_disk_ioctl+0x6e>
- {
- switch (*ptr)
- 8000bee: 6a3b ldr r3, [r7, #32]
- 8000bf0: 781b ldrb r3, [r3, #0]
- 8000bf2: 2b01 cmp r3, #1
- 8000bf4: d009 beq.n 8000c0a <SD_disk_ioctl+0x46>
- 8000bf6: 2b02 cmp r3, #2
- 8000bf8: d00d beq.n 8000c16 <SD_disk_ioctl+0x52>
- 8000bfa: 2b00 cmp r3, #0
- 8000bfc: d115 bne.n 8000c2a <SD_disk_ioctl+0x66>
- {
- case 0:
- SD_PowerOff(); /* Power Off */
- 8000bfe: f7ff fd1d bl 800063c <SD_PowerOff>
- res = RES_OK;
- 8000c02: 2300 movs r3, #0
- 8000c04: f887 3027 strb.w r3, [r7, #39] ; 0x27
- break;
- 8000c08: e0fd b.n 8000e06 <SD_disk_ioctl+0x242>
- case 1:
- SD_PowerOn(); /* Power On */
- 8000c0a: f7ff fcd5 bl 80005b8 <SD_PowerOn>
- res = RES_OK;
- 8000c0e: 2300 movs r3, #0
- 8000c10: f887 3027 strb.w r3, [r7, #39] ; 0x27
- break;
- 8000c14: e0f7 b.n 8000e06 <SD_disk_ioctl+0x242>
- case 2:
- *(ptr + 1) = SD_CheckPower();
- 8000c16: 6a3b ldr r3, [r7, #32]
- 8000c18: 1c5c adds r4, r3, #1
- 8000c1a: f7ff fd1b bl 8000654 <SD_CheckPower>
- 8000c1e: 4603 mov r3, r0
- 8000c20: 7023 strb r3, [r4, #0]
- res = RES_OK; /* Power Check */
- 8000c22: 2300 movs r3, #0
- 8000c24: f887 3027 strb.w r3, [r7, #39] ; 0x27
- break;
- 8000c28: e0ed b.n 8000e06 <SD_disk_ioctl+0x242>
- default:
- res = RES_PARERR;
- 8000c2a: 2304 movs r3, #4
- 8000c2c: f887 3027 strb.w r3, [r7, #39] ; 0x27
- 8000c30: e0e9 b.n 8000e06 <SD_disk_ioctl+0x242>
- }
- }
- else
- {
- /* no disk */
- if (Stat & STA_NOINIT) return RES_NOTRDY;
- 8000c32: 4b78 ldr r3, [pc, #480] ; (8000e14 <SD_disk_ioctl+0x250>)
- 8000c34: 781b ldrb r3, [r3, #0]
- 8000c36: b2db uxtb r3, r3
- 8000c38: f003 0301 and.w r3, r3, #1
- 8000c3c: 2b00 cmp r3, #0
- 8000c3e: d001 beq.n 8000c44 <SD_disk_ioctl+0x80>
- 8000c40: 2303 movs r3, #3
- 8000c42: e0e2 b.n 8000e0a <SD_disk_ioctl+0x246>
-
- SELECT();
- 8000c44: f7ff fc24 bl 8000490 <SELECT>
-
- switch (ctrl)
- 8000c48: 79bb ldrb r3, [r7, #6]
- 8000c4a: 2b0d cmp r3, #13
- 8000c4c: f200 80cc bhi.w 8000de8 <SD_disk_ioctl+0x224>
- 8000c50: a201 add r2, pc, #4 ; (adr r2, 8000c58 <SD_disk_ioctl+0x94>)
- 8000c52: f852 f023 ldr.w pc, [r2, r3, lsl #2]
- 8000c56: bf00 nop
- 8000c58: 08000d53 .word 0x08000d53
- 8000c5c: 08000c91 .word 0x08000c91
- 8000c60: 08000d43 .word 0x08000d43
- 8000c64: 08000de9 .word 0x08000de9
- 8000c68: 08000de9 .word 0x08000de9
- 8000c6c: 08000de9 .word 0x08000de9
- 8000c70: 08000de9 .word 0x08000de9
- 8000c74: 08000de9 .word 0x08000de9
- 8000c78: 08000de9 .word 0x08000de9
- 8000c7c: 08000de9 .word 0x08000de9
- 8000c80: 08000de9 .word 0x08000de9
- 8000c84: 08000d65 .word 0x08000d65
- 8000c88: 08000d89 .word 0x08000d89
- 8000c8c: 08000dad .word 0x08000dad
- {
- case GET_SECTOR_COUNT:
- /* SEND_CSD */
- if ((SD_SendCmd(CMD9, 0) == 0) && SD_RxDataBlock(csd, 16))
- 8000c90: 2100 movs r1, #0
- 8000c92: 2049 movs r0, #73 ; 0x49
- 8000c94: f7ff fd59 bl 800074a <SD_SendCmd>
- 8000c98: 4603 mov r3, r0
- 8000c9a: 2b00 cmp r3, #0
- 8000c9c: f040 80a8 bne.w 8000df0 <SD_disk_ioctl+0x22c>
- 8000ca0: f107 030c add.w r3, r7, #12
- 8000ca4: 2110 movs r1, #16
- 8000ca6: 4618 mov r0, r3
- 8000ca8: f7ff fcde bl 8000668 <SD_RxDataBlock>
- 8000cac: 4603 mov r3, r0
- 8000cae: 2b00 cmp r3, #0
- 8000cb0: f000 809e beq.w 8000df0 <SD_disk_ioctl+0x22c>
- {
- if ((csd[0] >> 6) == 1)
- 8000cb4: 7b3b ldrb r3, [r7, #12]
- 8000cb6: 099b lsrs r3, r3, #6
- 8000cb8: b2db uxtb r3, r3
- 8000cba: 2b01 cmp r3, #1
- 8000cbc: d10e bne.n 8000cdc <SD_disk_ioctl+0x118>
- {
- /* SDC V2 */
- csize = csd[9] + ((WORD) csd[8] << 8) + 1;
- 8000cbe: 7d7b ldrb r3, [r7, #21]
- 8000cc0: b29a uxth r2, r3
- 8000cc2: 7d3b ldrb r3, [r7, #20]
- 8000cc4: b29b uxth r3, r3
- 8000cc6: 021b lsls r3, r3, #8
- 8000cc8: b29b uxth r3, r3
- 8000cca: 4413 add r3, r2
- 8000ccc: b29b uxth r3, r3
- 8000cce: 3301 adds r3, #1
- 8000cd0: 83fb strh r3, [r7, #30]
- *(DWORD*) buff = (DWORD) csize << 10;
- 8000cd2: 8bfb ldrh r3, [r7, #30]
- 8000cd4: 029a lsls r2, r3, #10
- 8000cd6: 683b ldr r3, [r7, #0]
- 8000cd8: 601a str r2, [r3, #0]
- 8000cda: e02e b.n 8000d3a <SD_disk_ioctl+0x176>
- }
- else
- {
- /* MMC or SDC V1 */
- n = (csd[5] & 15) + ((csd[10] & 128) >> 7) + ((csd[9] & 3) << 1) + 2;
- 8000cdc: 7c7b ldrb r3, [r7, #17]
- 8000cde: f003 030f and.w r3, r3, #15
- 8000ce2: b2da uxtb r2, r3
- 8000ce4: 7dbb ldrb r3, [r7, #22]
- 8000ce6: 09db lsrs r3, r3, #7
- 8000ce8: b2db uxtb r3, r3
- 8000cea: 4413 add r3, r2
- 8000cec: b2da uxtb r2, r3
- 8000cee: 7d7b ldrb r3, [r7, #21]
- 8000cf0: 005b lsls r3, r3, #1
- 8000cf2: b2db uxtb r3, r3
- 8000cf4: f003 0306 and.w r3, r3, #6
- 8000cf8: b2db uxtb r3, r3
- 8000cfa: 4413 add r3, r2
- 8000cfc: b2db uxtb r3, r3
- 8000cfe: 3302 adds r3, #2
- 8000d00: f887 3026 strb.w r3, [r7, #38] ; 0x26
- csize = (csd[8] >> 6) + ((WORD) csd[7] << 2) + ((WORD) (csd[6] & 3) << 10) + 1;
- 8000d04: 7d3b ldrb r3, [r7, #20]
- 8000d06: 099b lsrs r3, r3, #6
- 8000d08: b2db uxtb r3, r3
- 8000d0a: b29a uxth r2, r3
- 8000d0c: 7cfb ldrb r3, [r7, #19]
- 8000d0e: b29b uxth r3, r3
- 8000d10: 009b lsls r3, r3, #2
- 8000d12: b29b uxth r3, r3
- 8000d14: 4413 add r3, r2
- 8000d16: b29a uxth r2, r3
- 8000d18: 7cbb ldrb r3, [r7, #18]
- 8000d1a: 029b lsls r3, r3, #10
- 8000d1c: b29b uxth r3, r3
- 8000d1e: f403 6340 and.w r3, r3, #3072 ; 0xc00
- 8000d22: b29b uxth r3, r3
- 8000d24: 4413 add r3, r2
- 8000d26: b29b uxth r3, r3
- 8000d28: 3301 adds r3, #1
- 8000d2a: 83fb strh r3, [r7, #30]
- *(DWORD*) buff = (DWORD) csize << (n - 9);
- 8000d2c: 8bfa ldrh r2, [r7, #30]
- 8000d2e: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 8000d32: 3b09 subs r3, #9
- 8000d34: 409a lsls r2, r3
- 8000d36: 683b ldr r3, [r7, #0]
- 8000d38: 601a str r2, [r3, #0]
- }
- res = RES_OK;
- 8000d3a: 2300 movs r3, #0
- 8000d3c: f887 3027 strb.w r3, [r7, #39] ; 0x27
- }
- break;
- 8000d40: e056 b.n 8000df0 <SD_disk_ioctl+0x22c>
- case GET_SECTOR_SIZE:
- *(WORD*) buff = 512;
- 8000d42: 683b ldr r3, [r7, #0]
- 8000d44: f44f 7200 mov.w r2, #512 ; 0x200
- 8000d48: 801a strh r2, [r3, #0]
- res = RES_OK;
- 8000d4a: 2300 movs r3, #0
- 8000d4c: f887 3027 strb.w r3, [r7, #39] ; 0x27
- break;
- 8000d50: e055 b.n 8000dfe <SD_disk_ioctl+0x23a>
- case CTRL_SYNC:
- if (SD_ReadyWait() == 0xFF) res = RES_OK;
- 8000d52: f7ff fc17 bl 8000584 <SD_ReadyWait>
- 8000d56: 4603 mov r3, r0
- 8000d58: 2bff cmp r3, #255 ; 0xff
- 8000d5a: d14b bne.n 8000df4 <SD_disk_ioctl+0x230>
- 8000d5c: 2300 movs r3, #0
- 8000d5e: f887 3027 strb.w r3, [r7, #39] ; 0x27
- break;
- 8000d62: e047 b.n 8000df4 <SD_disk_ioctl+0x230>
- case MMC_GET_CSD:
- /* SEND_CSD */
- if (SD_SendCmd(CMD9, 0) == 0 && SD_RxDataBlock(ptr, 16)) res = RES_OK;
- 8000d64: 2100 movs r1, #0
- 8000d66: 2049 movs r0, #73 ; 0x49
- 8000d68: f7ff fcef bl 800074a <SD_SendCmd>
- 8000d6c: 4603 mov r3, r0
- 8000d6e: 2b00 cmp r3, #0
- 8000d70: d142 bne.n 8000df8 <SD_disk_ioctl+0x234>
- 8000d72: 2110 movs r1, #16
- 8000d74: 6a38 ldr r0, [r7, #32]
- 8000d76: f7ff fc77 bl 8000668 <SD_RxDataBlock>
- 8000d7a: 4603 mov r3, r0
- 8000d7c: 2b00 cmp r3, #0
- 8000d7e: d03b beq.n 8000df8 <SD_disk_ioctl+0x234>
- 8000d80: 2300 movs r3, #0
- 8000d82: f887 3027 strb.w r3, [r7, #39] ; 0x27
- break;
- 8000d86: e037 b.n 8000df8 <SD_disk_ioctl+0x234>
- case MMC_GET_CID:
- /* SEND_CID */
- if (SD_SendCmd(CMD10, 0) == 0 && SD_RxDataBlock(ptr, 16)) res = RES_OK;
- 8000d88: 2100 movs r1, #0
- 8000d8a: 204a movs r0, #74 ; 0x4a
- 8000d8c: f7ff fcdd bl 800074a <SD_SendCmd>
- 8000d90: 4603 mov r3, r0
- 8000d92: 2b00 cmp r3, #0
- 8000d94: d132 bne.n 8000dfc <SD_disk_ioctl+0x238>
- 8000d96: 2110 movs r1, #16
- 8000d98: 6a38 ldr r0, [r7, #32]
- 8000d9a: f7ff fc65 bl 8000668 <SD_RxDataBlock>
- 8000d9e: 4603 mov r3, r0
- 8000da0: 2b00 cmp r3, #0
- 8000da2: d02b beq.n 8000dfc <SD_disk_ioctl+0x238>
- 8000da4: 2300 movs r3, #0
- 8000da6: f887 3027 strb.w r3, [r7, #39] ; 0x27
- break;
- 8000daa: e027 b.n 8000dfc <SD_disk_ioctl+0x238>
- case MMC_GET_OCR:
- /* READ_OCR */
- if (SD_SendCmd(CMD58, 0) == 0)
- 8000dac: 2100 movs r1, #0
- 8000dae: 207a movs r0, #122 ; 0x7a
- 8000db0: f7ff fccb bl 800074a <SD_SendCmd>
- 8000db4: 4603 mov r3, r0
- 8000db6: 2b00 cmp r3, #0
- 8000db8: d116 bne.n 8000de8 <SD_disk_ioctl+0x224>
- {
- for (n = 0; n < 4; n++)
- 8000dba: 2300 movs r3, #0
- 8000dbc: f887 3026 strb.w r3, [r7, #38] ; 0x26
- 8000dc0: e00b b.n 8000dda <SD_disk_ioctl+0x216>
- {
- *ptr++ = SPI_RxByte();
- 8000dc2: 6a3c ldr r4, [r7, #32]
- 8000dc4: 1c63 adds r3, r4, #1
- 8000dc6: 623b str r3, [r7, #32]
- 8000dc8: f7ff fbb2 bl 8000530 <SPI_RxByte>
- 8000dcc: 4603 mov r3, r0
- 8000dce: 7023 strb r3, [r4, #0]
- for (n = 0; n < 4; n++)
- 8000dd0: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 8000dd4: 3301 adds r3, #1
- 8000dd6: f887 3026 strb.w r3, [r7, #38] ; 0x26
- 8000dda: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 8000dde: 2b03 cmp r3, #3
- 8000de0: d9ef bls.n 8000dc2 <SD_disk_ioctl+0x1fe>
- }
- res = RES_OK;
- 8000de2: 2300 movs r3, #0
- 8000de4: f887 3027 strb.w r3, [r7, #39] ; 0x27
- }
- default:
- res = RES_PARERR;
- 8000de8: 2304 movs r3, #4
- 8000dea: f887 3027 strb.w r3, [r7, #39] ; 0x27
- 8000dee: e006 b.n 8000dfe <SD_disk_ioctl+0x23a>
- break;
- 8000df0: bf00 nop
- 8000df2: e004 b.n 8000dfe <SD_disk_ioctl+0x23a>
- break;
- 8000df4: bf00 nop
- 8000df6: e002 b.n 8000dfe <SD_disk_ioctl+0x23a>
- break;
- 8000df8: bf00 nop
- 8000dfa: e000 b.n 8000dfe <SD_disk_ioctl+0x23a>
- break;
- 8000dfc: bf00 nop
- }
-
- DESELECT();
- 8000dfe: f7ff fb55 bl 80004ac <DESELECT>
- SPI_RxByte();
- 8000e02: f7ff fb95 bl 8000530 <SPI_RxByte>
- }
-
- return res;
- 8000e06: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- }
- 8000e0a: 4618 mov r0, r3
- 8000e0c: 372c adds r7, #44 ; 0x2c
- 8000e0e: 46bd mov sp, r7
- 8000e10: bd90 pop {r4, r7, pc}
- 8000e12: bf00 nop
- 8000e14: 20000000 .word 0x20000000
-
- 08000e18 <transmit_uart>:
-
- /* Private user code ---------------------------------------------------------*/
- /* USER CODE BEGIN 0 */
-
- // sending to UART
- void transmit_uart(char *string){
- 8000e18: b580 push {r7, lr}
- 8000e1a: b084 sub sp, #16
- 8000e1c: af00 add r7, sp, #0
- 8000e1e: 6078 str r0, [r7, #4]
- uint8_t len = strlen(string);
- 8000e20: 6878 ldr r0, [r7, #4]
- 8000e22: f7ff f9ab bl 800017c <strlen>
- 8000e26: 4603 mov r3, r0
- 8000e28: 73fb strb r3, [r7, #15]
- HAL_UART_Transmit(&huart2, (uint8_t*) string, len, 200);
- 8000e2a: 7bfb ldrb r3, [r7, #15]
- 8000e2c: b29a uxth r2, r3
- 8000e2e: 23c8 movs r3, #200 ; 0xc8
- 8000e30: 6879 ldr r1, [r7, #4]
- 8000e32: 4803 ldr r0, [pc, #12] ; (8000e40 <transmit_uart+0x28>)
- 8000e34: f002 fd91 bl 800395a <HAL_UART_Transmit>
- }
- 8000e38: bf00 nop
- 8000e3a: 3710 adds r7, #16
- 8000e3c: 46bd mov sp, r7
- 8000e3e: bd80 pop {r7, pc}
- 8000e40: 200013f8 .word 0x200013f8
-
- 08000e44 <main>:
- /**
- * @brief The application entry point.
- * @retval int
- */
- int main(void)
- {
- 8000e44: b580 push {r7, lr}
- 8000e46: b08e sub sp, #56 ; 0x38
- 8000e48: af00 add r7, sp, #0
- /* USER CODE END 1 */
-
- /* MCU Configuration--------------------------------------------------------*/
-
- /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
- HAL_Init();
- 8000e4a: f000 fc22 bl 8001692 <HAL_Init>
- /* USER CODE BEGIN Init */
-
- /* USER CODE END Init */
-
- /* Configure the system clock */
- SystemClock_Config();
- 8000e4e: f000 f907 bl 8001060 <SystemClock_Config>
- /* USER CODE BEGIN SysInit */
-
- /* USER CODE END SysInit */
-
- /* Initialize all configured peripherals */
- MX_GPIO_Init();
- 8000e52: f000 fa0d bl 8001270 <MX_GPIO_Init>
- MX_USART2_UART_Init();
- 8000e56: f000 f9e1 bl 800121c <MX_USART2_UART_Init>
- MX_SPI1_Init();
- 8000e5a: f000 f9a9 bl 80011b0 <MX_SPI1_Init>
- MX_FATFS_Init();
- 8000e5e: f002 ff43 bl 8003ce8 <MX_FATFS_Init>
- MX_ADC_Init();
- 8000e62: f000 f94b bl 80010fc <MX_ADC_Init>
- /* USER CODE BEGIN 2 */
-
- fres = f_mount(&fs, "", 0);
- 8000e66: 2200 movs r2, #0
- 8000e68: 4967 ldr r1, [pc, #412] ; (8001008 <main+0x1c4>)
- 8000e6a: 4868 ldr r0, [pc, #416] ; (800100c <main+0x1c8>)
- 8000e6c: f005 f96a bl 8006144 <f_mount>
- 8000e70: 4603 mov r3, r0
- 8000e72: 461a mov r2, r3
- 8000e74: 4b66 ldr r3, [pc, #408] ; (8001010 <main+0x1cc>)
- 8000e76: 701a strb r2, [r3, #0]
- if (fres == FR_OK) {
- 8000e78: 4b65 ldr r3, [pc, #404] ; (8001010 <main+0x1cc>)
- 8000e7a: 781b ldrb r3, [r3, #0]
- 8000e7c: 2b00 cmp r3, #0
- 8000e7e: d103 bne.n 8000e88 <main+0x44>
- transmit_uart("SD card is mounted successfully!\r\n");
- 8000e80: 4864 ldr r0, [pc, #400] ; (8001014 <main+0x1d0>)
- 8000e82: f7ff ffc9 bl 8000e18 <transmit_uart>
- 8000e86: e006 b.n 8000e96 <main+0x52>
- } else if (fres != FR_OK) {
- 8000e88: 4b61 ldr r3, [pc, #388] ; (8001010 <main+0x1cc>)
- 8000e8a: 781b ldrb r3, [r3, #0]
- 8000e8c: 2b00 cmp r3, #0
- 8000e8e: d002 beq.n 8000e96 <main+0x52>
- transmit_uart("SD card is not mounted!\r\n");
- 8000e90: 4861 ldr r0, [pc, #388] ; (8001018 <main+0x1d4>)
- 8000e92: f7ff ffc1 bl 8000e18 <transmit_uart>
- transmit_uart("SD card is unmounted!\r\n");
- } else if (fres != FR_OK) {
- transmit_uart("SD card was not unmounted!\r\n");
- }*/
-
- int day = 12;
- 8000e96: 230c movs r3, #12
- 8000e98: 637b str r3, [r7, #52] ; 0x34
- int month = 2;
- 8000e9a: 2302 movs r3, #2
- 8000e9c: 633b str r3, [r7, #48] ; 0x30
- int year = 21;
- 8000e9e: 2315 movs r3, #21
- 8000ea0: 62fb str r3, [r7, #44] ; 0x2c
- char str_month[20];
- char str_year[20];
-
-
-
- sprintf(txtVar, "%ld", day);
- 8000ea2: 6b7a ldr r2, [r7, #52] ; 0x34
- 8000ea4: 495d ldr r1, [pc, #372] ; (800101c <main+0x1d8>)
- 8000ea6: 485e ldr r0, [pc, #376] ; (8001020 <main+0x1dc>)
- 8000ea8: f006 f9a4 bl 80071f4 <siprintf>
- sprintf(str_month, "%ld", month);
- 8000eac: f107 0318 add.w r3, r7, #24
- 8000eb0: 6b3a ldr r2, [r7, #48] ; 0x30
- 8000eb2: 495a ldr r1, [pc, #360] ; (800101c <main+0x1d8>)
- 8000eb4: 4618 mov r0, r3
- 8000eb6: f006 f99d bl 80071f4 <siprintf>
- sprintf(str_year, "%ld", year);
- 8000eba: 1d3b adds r3, r7, #4
- 8000ebc: 6afa ldr r2, [r7, #44] ; 0x2c
- 8000ebe: 4957 ldr r1, [pc, #348] ; (800101c <main+0x1d8>)
- 8000ec0: 4618 mov r0, r3
- 8000ec2: f006 f997 bl 80071f4 <siprintf>
-
-
- strcat(txtVar, ".");
- 8000ec6: 4856 ldr r0, [pc, #344] ; (8001020 <main+0x1dc>)
- 8000ec8: f7ff f958 bl 800017c <strlen>
- 8000ecc: 4603 mov r3, r0
- 8000ece: 461a mov r2, r3
- 8000ed0: 4b53 ldr r3, [pc, #332] ; (8001020 <main+0x1dc>)
- 8000ed2: 4413 add r3, r2
- 8000ed4: 4953 ldr r1, [pc, #332] ; (8001024 <main+0x1e0>)
- 8000ed6: 461a mov r2, r3
- 8000ed8: 460b mov r3, r1
- 8000eda: 881b ldrh r3, [r3, #0]
- 8000edc: 8013 strh r3, [r2, #0]
- strcat(str_month, ".");
- 8000ede: f107 0318 add.w r3, r7, #24
- 8000ee2: 4618 mov r0, r3
- 8000ee4: f7ff f94a bl 800017c <strlen>
- 8000ee8: 4603 mov r3, r0
- 8000eea: 461a mov r2, r3
- 8000eec: f107 0318 add.w r3, r7, #24
- 8000ef0: 4413 add r3, r2
- 8000ef2: 494c ldr r1, [pc, #304] ; (8001024 <main+0x1e0>)
- 8000ef4: 461a mov r2, r3
- 8000ef6: 460b mov r3, r1
- 8000ef8: 881b ldrh r3, [r3, #0]
- 8000efa: 8013 strh r3, [r2, #0]
- strcat(str_year, "_");
- 8000efc: 1d3b adds r3, r7, #4
- 8000efe: 4618 mov r0, r3
- 8000f00: f7ff f93c bl 800017c <strlen>
- 8000f04: 4603 mov r3, r0
- 8000f06: 461a mov r2, r3
- 8000f08: 1d3b adds r3, r7, #4
- 8000f0a: 4413 add r3, r2
- 8000f0c: 4946 ldr r1, [pc, #280] ; (8001028 <main+0x1e4>)
- 8000f0e: 461a mov r2, r3
- 8000f10: 460b mov r3, r1
- 8000f12: 881b ldrh r3, [r3, #0]
- 8000f14: 8013 strh r3, [r2, #0]
-
- strcat(txtVar, str_month);
- 8000f16: f107 0318 add.w r3, r7, #24
- 8000f1a: 4619 mov r1, r3
- 8000f1c: 4840 ldr r0, [pc, #256] ; (8001020 <main+0x1dc>)
- 8000f1e: f006 f989 bl 8007234 <strcat>
- strcat(txtVar, str_year);
- 8000f22: 1d3b adds r3, r7, #4
- 8000f24: 4619 mov r1, r3
- 8000f26: 483e ldr r0, [pc, #248] ; (8001020 <main+0x1dc>)
- 8000f28: f006 f984 bl 8007234 <strcat>
- strcat(txtVar, "Values.txt");
- 8000f2c: 483c ldr r0, [pc, #240] ; (8001020 <main+0x1dc>)
- 8000f2e: f7ff f925 bl 800017c <strlen>
- 8000f32: 4603 mov r3, r0
- 8000f34: 461a mov r2, r3
- 8000f36: 4b3a ldr r3, [pc, #232] ; (8001020 <main+0x1dc>)
- 8000f38: 4413 add r3, r2
- 8000f3a: 493c ldr r1, [pc, #240] ; (800102c <main+0x1e8>)
- 8000f3c: 461a mov r2, r3
- 8000f3e: 460b mov r3, r1
- 8000f40: cb03 ldmia r3!, {r0, r1}
- 8000f42: 6010 str r0, [r2, #0]
- 8000f44: 6051 str r1, [r2, #4]
- 8000f46: 8819 ldrh r1, [r3, #0]
- 8000f48: 789b ldrb r3, [r3, #2]
- 8000f4a: 8111 strh r1, [r2, #8]
- 8000f4c: 7293 strb r3, [r2, #10]
- /* Infinite loop */
- /* USER CODE BEGIN WHILE */
- while (1)
- {
- /* USER CODE END WHILE */
- HAL_Delay(5000);
- 8000f4e: f241 3088 movw r0, #5000 ; 0x1388
- 8000f52: f000 fc0d bl 8001770 <HAL_Delay>
-
- // Start ADC Conversion
- HAL_ADC_Start(&hadc);
- 8000f56: 4836 ldr r0, [pc, #216] ; (8001030 <main+0x1ec>)
- 8000f58: f000 fd72 bl 8001a40 <HAL_ADC_Start>
- // Poll ADC1 Perihperal & TimeOut = 1mSec
- HAL_ADC_PollForConversion(&hadc, 1);
- 8000f5c: 2101 movs r1, #1
- 8000f5e: 4834 ldr r0, [pc, #208] ; (8001030 <main+0x1ec>)
- 8000f60: f000 fdce bl 8001b00 <HAL_ADC_PollForConversion>
- // Read The ADC Conversion Result
- AD_RES = HAL_ADC_GetValue(&hadc);
- 8000f64: 4832 ldr r0, [pc, #200] ; (8001030 <main+0x1ec>)
- 8000f66: f000 fe54 bl 8001c12 <HAL_ADC_GetValue>
- 8000f6a: 4603 mov r3, r0
- 8000f6c: b29a uxth r2, r3
- 8000f6e: 4b31 ldr r3, [pc, #196] ; (8001034 <main+0x1f0>)
- 8000f70: 801a strh r2, [r3, #0]
-
- num++;
- 8000f72: 4b31 ldr r3, [pc, #196] ; (8001038 <main+0x1f4>)
- 8000f74: 681b ldr r3, [r3, #0]
- 8000f76: 3301 adds r3, #1
- 8000f78: 4a2f ldr r2, [pc, #188] ; (8001038 <main+0x1f4>)
- 8000f7a: 6013 str r3, [r2, #0]
-
- // FA_OPEN_APPEND opens file if it exists and if not then creates it,
- // the pointer is set at the end of the file for appending
- fres = f_open(&fil, txtVar, FA_OPEN_APPEND | FA_WRITE | FA_READ);
- 8000f7c: 2233 movs r2, #51 ; 0x33
- 8000f7e: 4928 ldr r1, [pc, #160] ; (8001020 <main+0x1dc>)
- 8000f80: 482e ldr r0, [pc, #184] ; (800103c <main+0x1f8>)
- 8000f82: f005 f925 bl 80061d0 <f_open>
- 8000f86: 4603 mov r3, r0
- 8000f88: 461a mov r2, r3
- 8000f8a: 4b21 ldr r3, [pc, #132] ; (8001010 <main+0x1cc>)
- 8000f8c: 701a strb r2, [r3, #0]
- if (fres == FR_OK) {
- 8000f8e: 4b20 ldr r3, [pc, #128] ; (8001010 <main+0x1cc>)
- 8000f90: 781b ldrb r3, [r3, #0]
- 8000f92: 2b00 cmp r3, #0
- 8000f94: d103 bne.n 8000f9e <main+0x15a>
- transmit_uart("File opened.\r\n");
- 8000f96: 482a ldr r0, [pc, #168] ; (8001040 <main+0x1fc>)
- 8000f98: f7ff ff3e bl 8000e18 <transmit_uart>
- 8000f9c: e006 b.n 8000fac <main+0x168>
- } else if (fres != FR_OK) {
- 8000f9e: 4b1c ldr r3, [pc, #112] ; (8001010 <main+0x1cc>)
- 8000fa0: 781b ldrb r3, [r3, #0]
- 8000fa2: 2b00 cmp r3, #0
- 8000fa4: d002 beq.n 8000fac <main+0x168>
- transmit_uart("File was not opened!\r\n");
- 8000fa6: 4827 ldr r0, [pc, #156] ; (8001044 <main+0x200>)
- 8000fa8: f7ff ff36 bl 8000e18 <transmit_uart>
- }
-
- f_puts("ADC_value_", &fil);
- 8000fac: 4923 ldr r1, [pc, #140] ; (800103c <main+0x1f8>)
- 8000fae: 4826 ldr r0, [pc, #152] ; (8001048 <main+0x204>)
- 8000fb0: f005 fd8d bl 8006ace <f_puts>
- f_printf(&fil, "%d", num);
- 8000fb4: 4b20 ldr r3, [pc, #128] ; (8001038 <main+0x1f4>)
- 8000fb6: 681b ldr r3, [r3, #0]
- 8000fb8: 461a mov r2, r3
- 8000fba: 4924 ldr r1, [pc, #144] ; (800104c <main+0x208>)
- 8000fbc: 481f ldr r0, [pc, #124] ; (800103c <main+0x1f8>)
- 8000fbe: f005 fdab bl 8006b18 <f_printf>
- f_puts(" = ", &fil);
- 8000fc2: 491e ldr r1, [pc, #120] ; (800103c <main+0x1f8>)
- 8000fc4: 4822 ldr r0, [pc, #136] ; (8001050 <main+0x20c>)
- 8000fc6: f005 fd82 bl 8006ace <f_puts>
- f_printf(&fil, "%d\n", AD_RES);
- 8000fca: 4b1a ldr r3, [pc, #104] ; (8001034 <main+0x1f0>)
- 8000fcc: 881b ldrh r3, [r3, #0]
- 8000fce: 461a mov r2, r3
- 8000fd0: 4920 ldr r1, [pc, #128] ; (8001054 <main+0x210>)
- 8000fd2: 481a ldr r0, [pc, #104] ; (800103c <main+0x1f8>)
- 8000fd4: f005 fda0 bl 8006b18 <f_printf>
-
- /* Close file */
- fres = f_close(&fil);
- 8000fd8: 4818 ldr r0, [pc, #96] ; (800103c <main+0x1f8>)
- 8000fda: f005 fcd7 bl 800698c <f_close>
- 8000fde: 4603 mov r3, r0
- 8000fe0: 461a mov r2, r3
- 8000fe2: 4b0b ldr r3, [pc, #44] ; (8001010 <main+0x1cc>)
- 8000fe4: 701a strb r2, [r3, #0]
- if (fres == FR_OK) {
- 8000fe6: 4b0a ldr r3, [pc, #40] ; (8001010 <main+0x1cc>)
- 8000fe8: 781b ldrb r3, [r3, #0]
- 8000fea: 2b00 cmp r3, #0
- 8000fec: d103 bne.n 8000ff6 <main+0x1b2>
- transmit_uart("File is closed.\r\n");
- 8000fee: 481a ldr r0, [pc, #104] ; (8001058 <main+0x214>)
- 8000ff0: f7ff ff12 bl 8000e18 <transmit_uart>
- 8000ff4: e7ab b.n 8000f4e <main+0x10a>
- } else if (fres != FR_OK) {
- 8000ff6: 4b06 ldr r3, [pc, #24] ; (8001010 <main+0x1cc>)
- 8000ff8: 781b ldrb r3, [r3, #0]
- 8000ffa: 2b00 cmp r3, #0
- 8000ffc: d0a7 beq.n 8000f4e <main+0x10a>
- transmit_uart("File was not closed.\r\n");
- 8000ffe: 4817 ldr r0, [pc, #92] ; (800105c <main+0x218>)
- 8001000: f7ff ff0a bl 8000e18 <transmit_uart>
- HAL_Delay(5000);
- 8001004: e7a3 b.n 8000f4e <main+0x10a>
- 8001006: bf00 nop
- 8001008: 08007a50 .word 0x08007a50
- 800100c: 200002f4 .word 0x200002f4
- 8001010: 20001438 .word 0x20001438
- 8001014: 08007a54 .word 0x08007a54
- 8001018: 08007a78 .word 0x08007a78
- 800101c: 08007a94 .word 0x08007a94
- 8001020: 2000143c .word 0x2000143c
- 8001024: 08007a98 .word 0x08007a98
- 8001028: 08007a9c .word 0x08007a9c
- 800102c: 08007aa0 .word 0x08007aa0
- 8001030: 20001458 .word 0x20001458
- 8001034: 200002f0 .word 0x200002f0
- 8001038: 20001394 .word 0x20001394
- 800103c: 200014ac .word 0x200014ac
- 8001040: 08007aac .word 0x08007aac
- 8001044: 08007abc .word 0x08007abc
- 8001048: 08007ad4 .word 0x08007ad4
- 800104c: 08007ae0 .word 0x08007ae0
- 8001050: 08007ae4 .word 0x08007ae4
- 8001054: 08007ae8 .word 0x08007ae8
- 8001058: 08007aec .word 0x08007aec
- 800105c: 08007b00 .word 0x08007b00
-
- 08001060 <SystemClock_Config>:
- /**
- * @brief System Clock Configuration
- * @retval None
- */
- void SystemClock_Config(void)
- {
- 8001060: b580 push {r7, lr}
- 8001062: b092 sub sp, #72 ; 0x48
- 8001064: af00 add r7, sp, #0
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- 8001066: f107 0314 add.w r3, r7, #20
- 800106a: 2234 movs r2, #52 ; 0x34
- 800106c: 2100 movs r1, #0
- 800106e: 4618 mov r0, r3
- 8001070: f006 f8b8 bl 80071e4 <memset>
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- 8001074: 463b mov r3, r7
- 8001076: 2200 movs r2, #0
- 8001078: 601a str r2, [r3, #0]
- 800107a: 605a str r2, [r3, #4]
- 800107c: 609a str r2, [r3, #8]
- 800107e: 60da str r2, [r3, #12]
- 8001080: 611a str r2, [r3, #16]
-
- /** Configure the main internal regulator output voltage
- */
- __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
- 8001082: 4b1d ldr r3, [pc, #116] ; (80010f8 <SystemClock_Config+0x98>)
- 8001084: 681b ldr r3, [r3, #0]
- 8001086: f423 53c0 bic.w r3, r3, #6144 ; 0x1800
- 800108a: 4a1b ldr r2, [pc, #108] ; (80010f8 <SystemClock_Config+0x98>)
- 800108c: f443 6300 orr.w r3, r3, #2048 ; 0x800
- 8001090: 6013 str r3, [r2, #0]
- /** Initializes the RCC Oscillators according to the specified parameters
- * in the RCC_OscInitTypeDef structure.
- */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
- 8001092: 2302 movs r3, #2
- 8001094: 617b str r3, [r7, #20]
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- 8001096: 2301 movs r3, #1
- 8001098: 623b str r3, [r7, #32]
- RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- 800109a: 2310 movs r3, #16
- 800109c: 627b str r3, [r7, #36] ; 0x24
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- 800109e: 2302 movs r3, #2
- 80010a0: 63bb str r3, [r7, #56] ; 0x38
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
- 80010a2: 2300 movs r3, #0
- 80010a4: 63fb str r3, [r7, #60] ; 0x3c
- RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
- 80010a6: f44f 2300 mov.w r3, #524288 ; 0x80000
- 80010aa: 643b str r3, [r7, #64] ; 0x40
- RCC_OscInitStruct.PLL.PLLDIV = RCC_PLL_DIV3;
- 80010ac: f44f 0300 mov.w r3, #8388608 ; 0x800000
- 80010b0: 647b str r3, [r7, #68] ; 0x44
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- 80010b2: f107 0314 add.w r3, r7, #20
- 80010b6: 4618 mov r0, r3
- 80010b8: f001 fa10 bl 80024dc <HAL_RCC_OscConfig>
- 80010bc: 4603 mov r3, r0
- 80010be: 2b00 cmp r3, #0
- 80010c0: d001 beq.n 80010c6 <SystemClock_Config+0x66>
- {
- Error_Handler();
- 80010c2: f000 f93d bl 8001340 <Error_Handler>
- }
- /** Initializes the CPU, AHB and APB buses clocks
- */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- 80010c6: 230f movs r3, #15
- 80010c8: 603b str r3, [r7, #0]
- |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- 80010ca: 2303 movs r3, #3
- 80010cc: 607b str r3, [r7, #4]
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- 80010ce: 2300 movs r3, #0
- 80010d0: 60bb str r3, [r7, #8]
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- 80010d2: 2300 movs r3, #0
- 80010d4: 60fb str r3, [r7, #12]
- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- 80010d6: 2300 movs r3, #0
- 80010d8: 613b str r3, [r7, #16]
-
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK)
- 80010da: 463b mov r3, r7
- 80010dc: 2101 movs r1, #1
- 80010de: 4618 mov r0, r3
- 80010e0: f001 fd2c bl 8002b3c <HAL_RCC_ClockConfig>
- 80010e4: 4603 mov r3, r0
- 80010e6: 2b00 cmp r3, #0
- 80010e8: d001 beq.n 80010ee <SystemClock_Config+0x8e>
- {
- Error_Handler();
- 80010ea: f000 f929 bl 8001340 <Error_Handler>
- }
- }
- 80010ee: bf00 nop
- 80010f0: 3748 adds r7, #72 ; 0x48
- 80010f2: 46bd mov sp, r7
- 80010f4: bd80 pop {r7, pc}
- 80010f6: bf00 nop
- 80010f8: 40007000 .word 0x40007000
-
- 080010fc <MX_ADC_Init>:
- * @brief ADC Initialization Function
- * @param None
- * @retval None
- */
- static void MX_ADC_Init(void)
- {
- 80010fc: b580 push {r7, lr}
- 80010fe: b084 sub sp, #16
- 8001100: af00 add r7, sp, #0
-
- /* USER CODE BEGIN ADC_Init 0 */
-
- /* USER CODE END ADC_Init 0 */
-
- ADC_ChannelConfTypeDef sConfig = {0};
- 8001102: 1d3b adds r3, r7, #4
- 8001104: 2200 movs r2, #0
- 8001106: 601a str r2, [r3, #0]
- 8001108: 605a str r2, [r3, #4]
- 800110a: 609a str r2, [r3, #8]
- /* USER CODE BEGIN ADC_Init 1 */
-
- /* USER CODE END ADC_Init 1 */
- /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
- */
- hadc.Instance = ADC1;
- 800110c: 4b26 ldr r3, [pc, #152] ; (80011a8 <MX_ADC_Init+0xac>)
- 800110e: 4a27 ldr r2, [pc, #156] ; (80011ac <MX_ADC_Init+0xb0>)
- 8001110: 601a str r2, [r3, #0]
- hadc.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1;
- 8001112: 4b25 ldr r3, [pc, #148] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001114: 2200 movs r2, #0
- 8001116: 605a str r2, [r3, #4]
- hadc.Init.Resolution = ADC_RESOLUTION_12B;
- 8001118: 4b23 ldr r3, [pc, #140] ; (80011a8 <MX_ADC_Init+0xac>)
- 800111a: 2200 movs r2, #0
- 800111c: 609a str r2, [r3, #8]
- hadc.Init.DataAlign = ADC_DATAALIGN_RIGHT;
- 800111e: 4b22 ldr r3, [pc, #136] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001120: 2200 movs r2, #0
- 8001122: 60da str r2, [r3, #12]
- hadc.Init.ScanConvMode = ADC_SCAN_DISABLE;
- 8001124: 4b20 ldr r3, [pc, #128] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001126: 2200 movs r2, #0
- 8001128: 611a str r2, [r3, #16]
- hadc.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
- 800112a: 4b1f ldr r3, [pc, #124] ; (80011a8 <MX_ADC_Init+0xac>)
- 800112c: f44f 6280 mov.w r2, #1024 ; 0x400
- 8001130: 615a str r2, [r3, #20]
- hadc.Init.LowPowerAutoWait = ADC_AUTOWAIT_DISABLE;
- 8001132: 4b1d ldr r3, [pc, #116] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001134: 2200 movs r2, #0
- 8001136: 619a str r2, [r3, #24]
- hadc.Init.LowPowerAutoPowerOff = ADC_AUTOPOWEROFF_DISABLE;
- 8001138: 4b1b ldr r3, [pc, #108] ; (80011a8 <MX_ADC_Init+0xac>)
- 800113a: 2200 movs r2, #0
- 800113c: 61da str r2, [r3, #28]
- hadc.Init.ChannelsBank = ADC_CHANNELS_BANK_A;
- 800113e: 4b1a ldr r3, [pc, #104] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001140: 2200 movs r2, #0
- 8001142: 621a str r2, [r3, #32]
- hadc.Init.ContinuousConvMode = DISABLE;
- 8001144: 4b18 ldr r3, [pc, #96] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001146: 2200 movs r2, #0
- 8001148: f883 2024 strb.w r2, [r3, #36] ; 0x24
- hadc.Init.NbrOfConversion = 1;
- 800114c: 4b16 ldr r3, [pc, #88] ; (80011a8 <MX_ADC_Init+0xac>)
- 800114e: 2201 movs r2, #1
- 8001150: 629a str r2, [r3, #40] ; 0x28
- hadc.Init.DiscontinuousConvMode = DISABLE;
- 8001152: 4b15 ldr r3, [pc, #84] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001154: 2200 movs r2, #0
- 8001156: f883 202c strb.w r2, [r3, #44] ; 0x2c
- hadc.Init.ExternalTrigConv = ADC_SOFTWARE_START;
- 800115a: 4b13 ldr r3, [pc, #76] ; (80011a8 <MX_ADC_Init+0xac>)
- 800115c: 2210 movs r2, #16
- 800115e: 635a str r2, [r3, #52] ; 0x34
- hadc.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
- 8001160: 4b11 ldr r3, [pc, #68] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001162: 2200 movs r2, #0
- 8001164: 639a str r2, [r3, #56] ; 0x38
- hadc.Init.DMAContinuousRequests = DISABLE;
- 8001166: 4b10 ldr r3, [pc, #64] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001168: 2200 movs r2, #0
- 800116a: f883 203c strb.w r2, [r3, #60] ; 0x3c
- if (HAL_ADC_Init(&hadc) != HAL_OK)
- 800116e: 480e ldr r0, [pc, #56] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001170: f000 fb20 bl 80017b4 <HAL_ADC_Init>
- 8001174: 4603 mov r3, r0
- 8001176: 2b00 cmp r3, #0
- 8001178: d001 beq.n 800117e <MX_ADC_Init+0x82>
- {
- Error_Handler();
- 800117a: f000 f8e1 bl 8001340 <Error_Handler>
- }
- /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
- */
- sConfig.Channel = ADC_CHANNEL_0;
- 800117e: 2300 movs r3, #0
- 8001180: 607b str r3, [r7, #4]
- sConfig.Rank = ADC_REGULAR_RANK_1;
- 8001182: 2301 movs r3, #1
- 8001184: 60bb str r3, [r7, #8]
- sConfig.SamplingTime = ADC_SAMPLETIME_384CYCLES;
- 8001186: 2307 movs r3, #7
- 8001188: 60fb str r3, [r7, #12]
- if (HAL_ADC_ConfigChannel(&hadc, &sConfig) != HAL_OK)
- 800118a: 1d3b adds r3, r7, #4
- 800118c: 4619 mov r1, r3
- 800118e: 4806 ldr r0, [pc, #24] ; (80011a8 <MX_ADC_Init+0xac>)
- 8001190: f000 fd4c bl 8001c2c <HAL_ADC_ConfigChannel>
- 8001194: 4603 mov r3, r0
- 8001196: 2b00 cmp r3, #0
- 8001198: d001 beq.n 800119e <MX_ADC_Init+0xa2>
- {
- Error_Handler();
- 800119a: f000 f8d1 bl 8001340 <Error_Handler>
- }
- /* USER CODE BEGIN ADC_Init 2 */
-
- /* USER CODE END ADC_Init 2 */
-
- }
- 800119e: bf00 nop
- 80011a0: 3710 adds r7, #16
- 80011a2: 46bd mov sp, r7
- 80011a4: bd80 pop {r7, pc}
- 80011a6: bf00 nop
- 80011a8: 20001458 .word 0x20001458
- 80011ac: 40012400 .word 0x40012400
-
- 080011b0 <MX_SPI1_Init>:
- * @brief SPI1 Initialization Function
- * @param None
- * @retval None
- */
- static void MX_SPI1_Init(void)
- {
- 80011b0: b580 push {r7, lr}
- 80011b2: af00 add r7, sp, #0
-
- /* USER CODE BEGIN SPI1_Init 1 */
-
- /* USER CODE END SPI1_Init 1 */
- /* SPI1 parameter configuration*/
- hspi1.Instance = SPI1;
- 80011b4: 4b17 ldr r3, [pc, #92] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011b6: 4a18 ldr r2, [pc, #96] ; (8001218 <MX_SPI1_Init+0x68>)
- 80011b8: 601a str r2, [r3, #0]
- hspi1.Init.Mode = SPI_MODE_MASTER;
- 80011ba: 4b16 ldr r3, [pc, #88] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011bc: f44f 7282 mov.w r2, #260 ; 0x104
- 80011c0: 605a str r2, [r3, #4]
- hspi1.Init.Direction = SPI_DIRECTION_2LINES;
- 80011c2: 4b14 ldr r3, [pc, #80] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011c4: 2200 movs r2, #0
- 80011c6: 609a str r2, [r3, #8]
- hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
- 80011c8: 4b12 ldr r3, [pc, #72] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011ca: 2200 movs r2, #0
- 80011cc: 60da str r2, [r3, #12]
- hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
- 80011ce: 4b11 ldr r3, [pc, #68] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011d0: 2200 movs r2, #0
- 80011d2: 611a str r2, [r3, #16]
- hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
- 80011d4: 4b0f ldr r3, [pc, #60] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011d6: 2200 movs r2, #0
- 80011d8: 615a str r2, [r3, #20]
- hspi1.Init.NSS = SPI_NSS_SOFT;
- 80011da: 4b0e ldr r3, [pc, #56] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011dc: f44f 7200 mov.w r2, #512 ; 0x200
- 80011e0: 619a str r2, [r3, #24]
- hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
- 80011e2: 4b0c ldr r3, [pc, #48] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011e4: 2208 movs r2, #8
- 80011e6: 61da str r2, [r3, #28]
- hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
- 80011e8: 4b0a ldr r3, [pc, #40] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011ea: 2200 movs r2, #0
- 80011ec: 621a str r2, [r3, #32]
- hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
- 80011ee: 4b09 ldr r3, [pc, #36] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011f0: 2200 movs r2, #0
- 80011f2: 625a str r2, [r3, #36] ; 0x24
- hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
- 80011f4: 4b07 ldr r3, [pc, #28] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011f6: 2200 movs r2, #0
- 80011f8: 629a str r2, [r3, #40] ; 0x28
- hspi1.Init.CRCPolynomial = 10;
- 80011fa: 4b06 ldr r3, [pc, #24] ; (8001214 <MX_SPI1_Init+0x64>)
- 80011fc: 220a movs r2, #10
- 80011fe: 62da str r2, [r3, #44] ; 0x2c
- if (HAL_SPI_Init(&hspi1) != HAL_OK)
- 8001200: 4804 ldr r0, [pc, #16] ; (8001214 <MX_SPI1_Init+0x64>)
- 8001202: f001 ff2b bl 800305c <HAL_SPI_Init>
- 8001206: 4603 mov r3, r0
- 8001208: 2b00 cmp r3, #0
- 800120a: d001 beq.n 8001210 <MX_SPI1_Init+0x60>
- {
- Error_Handler();
- 800120c: f000 f898 bl 8001340 <Error_Handler>
- }
- /* USER CODE BEGIN SPI1_Init 2 */
-
- /* USER CODE END SPI1_Init 2 */
-
- }
- 8001210: bf00 nop
- 8001212: bd80 pop {r7, pc}
- 8001214: 200013a0 .word 0x200013a0
- 8001218: 40013000 .word 0x40013000
-
- 0800121c <MX_USART2_UART_Init>:
- * @brief USART2 Initialization Function
- * @param None
- * @retval None
- */
- static void MX_USART2_UART_Init(void)
- {
- 800121c: b580 push {r7, lr}
- 800121e: af00 add r7, sp, #0
- /* USER CODE END USART2_Init 0 */
-
- /* USER CODE BEGIN USART2_Init 1 */
-
- /* USER CODE END USART2_Init 1 */
- huart2.Instance = USART2;
- 8001220: 4b11 ldr r3, [pc, #68] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 8001222: 4a12 ldr r2, [pc, #72] ; (800126c <MX_USART2_UART_Init+0x50>)
- 8001224: 601a str r2, [r3, #0]
- huart2.Init.BaudRate = 115200;
- 8001226: 4b10 ldr r3, [pc, #64] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 8001228: f44f 32e1 mov.w r2, #115200 ; 0x1c200
- 800122c: 605a str r2, [r3, #4]
- huart2.Init.WordLength = UART_WORDLENGTH_8B;
- 800122e: 4b0e ldr r3, [pc, #56] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 8001230: 2200 movs r2, #0
- 8001232: 609a str r2, [r3, #8]
- huart2.Init.StopBits = UART_STOPBITS_1;
- 8001234: 4b0c ldr r3, [pc, #48] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 8001236: 2200 movs r2, #0
- 8001238: 60da str r2, [r3, #12]
- huart2.Init.Parity = UART_PARITY_NONE;
- 800123a: 4b0b ldr r3, [pc, #44] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 800123c: 2200 movs r2, #0
- 800123e: 611a str r2, [r3, #16]
- huart2.Init.Mode = UART_MODE_TX_RX;
- 8001240: 4b09 ldr r3, [pc, #36] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 8001242: 220c movs r2, #12
- 8001244: 615a str r2, [r3, #20]
- huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- 8001246: 4b08 ldr r3, [pc, #32] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 8001248: 2200 movs r2, #0
- 800124a: 619a str r2, [r3, #24]
- huart2.Init.OverSampling = UART_OVERSAMPLING_16;
- 800124c: 4b06 ldr r3, [pc, #24] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 800124e: 2200 movs r2, #0
- 8001250: 61da str r2, [r3, #28]
- if (HAL_UART_Init(&huart2) != HAL_OK)
- 8001252: 4805 ldr r0, [pc, #20] ; (8001268 <MX_USART2_UART_Init+0x4c>)
- 8001254: f002 fb34 bl 80038c0 <HAL_UART_Init>
- 8001258: 4603 mov r3, r0
- 800125a: 2b00 cmp r3, #0
- 800125c: d001 beq.n 8001262 <MX_USART2_UART_Init+0x46>
- {
- Error_Handler();
- 800125e: f000 f86f bl 8001340 <Error_Handler>
- }
- /* USER CODE BEGIN USART2_Init 2 */
-
- /* USER CODE END USART2_Init 2 */
-
- }
- 8001262: bf00 nop
- 8001264: bd80 pop {r7, pc}
- 8001266: bf00 nop
- 8001268: 200013f8 .word 0x200013f8
- 800126c: 40004400 .word 0x40004400
-
- 08001270 <MX_GPIO_Init>:
- * @brief GPIO Initialization Function
- * @param None
- * @retval None
- */
- static void MX_GPIO_Init(void)
- {
- 8001270: b580 push {r7, lr}
- 8001272: b08a sub sp, #40 ; 0x28
- 8001274: af00 add r7, sp, #0
- GPIO_InitTypeDef GPIO_InitStruct = {0};
- 8001276: f107 0314 add.w r3, r7, #20
- 800127a: 2200 movs r2, #0
- 800127c: 601a str r2, [r3, #0]
- 800127e: 605a str r2, [r3, #4]
- 8001280: 609a str r2, [r3, #8]
- 8001282: 60da str r2, [r3, #12]
- 8001284: 611a str r2, [r3, #16]
-
- /* GPIO Ports Clock Enable */
- __HAL_RCC_GPIOC_CLK_ENABLE();
- 8001286: 4b2a ldr r3, [pc, #168] ; (8001330 <MX_GPIO_Init+0xc0>)
- 8001288: 69db ldr r3, [r3, #28]
- 800128a: 4a29 ldr r2, [pc, #164] ; (8001330 <MX_GPIO_Init+0xc0>)
- 800128c: f043 0304 orr.w r3, r3, #4
- 8001290: 61d3 str r3, [r2, #28]
- 8001292: 4b27 ldr r3, [pc, #156] ; (8001330 <MX_GPIO_Init+0xc0>)
- 8001294: 69db ldr r3, [r3, #28]
- 8001296: f003 0304 and.w r3, r3, #4
- 800129a: 613b str r3, [r7, #16]
- 800129c: 693b ldr r3, [r7, #16]
- __HAL_RCC_GPIOH_CLK_ENABLE();
- 800129e: 4b24 ldr r3, [pc, #144] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012a0: 69db ldr r3, [r3, #28]
- 80012a2: 4a23 ldr r2, [pc, #140] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012a4: f043 0320 orr.w r3, r3, #32
- 80012a8: 61d3 str r3, [r2, #28]
- 80012aa: 4b21 ldr r3, [pc, #132] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012ac: 69db ldr r3, [r3, #28]
- 80012ae: f003 0320 and.w r3, r3, #32
- 80012b2: 60fb str r3, [r7, #12]
- 80012b4: 68fb ldr r3, [r7, #12]
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 80012b6: 4b1e ldr r3, [pc, #120] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012b8: 69db ldr r3, [r3, #28]
- 80012ba: 4a1d ldr r2, [pc, #116] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012bc: f043 0301 orr.w r3, r3, #1
- 80012c0: 61d3 str r3, [r2, #28]
- 80012c2: 4b1b ldr r3, [pc, #108] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012c4: 69db ldr r3, [r3, #28]
- 80012c6: f003 0301 and.w r3, r3, #1
- 80012ca: 60bb str r3, [r7, #8]
- 80012cc: 68bb ldr r3, [r7, #8]
- __HAL_RCC_GPIOB_CLK_ENABLE();
- 80012ce: 4b18 ldr r3, [pc, #96] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012d0: 69db ldr r3, [r3, #28]
- 80012d2: 4a17 ldr r2, [pc, #92] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012d4: f043 0302 orr.w r3, r3, #2
- 80012d8: 61d3 str r3, [r2, #28]
- 80012da: 4b15 ldr r3, [pc, #84] ; (8001330 <MX_GPIO_Init+0xc0>)
- 80012dc: 69db ldr r3, [r3, #28]
- 80012de: f003 0302 and.w r3, r3, #2
- 80012e2: 607b str r3, [r7, #4]
- 80012e4: 687b ldr r3, [r7, #4]
-
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_SET);
- 80012e6: 2201 movs r2, #1
- 80012e8: 2140 movs r1, #64 ; 0x40
- 80012ea: 4812 ldr r0, [pc, #72] ; (8001334 <MX_GPIO_Init+0xc4>)
- 80012ec: f001 f8de bl 80024ac <HAL_GPIO_WritePin>
-
- /*Configure GPIO pin : B1_Pin */
- GPIO_InitStruct.Pin = B1_Pin;
- 80012f0: f44f 5300 mov.w r3, #8192 ; 0x2000
- 80012f4: 617b str r3, [r7, #20]
- GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
- 80012f6: 4b10 ldr r3, [pc, #64] ; (8001338 <MX_GPIO_Init+0xc8>)
- 80012f8: 61bb str r3, [r7, #24]
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 80012fa: 2300 movs r3, #0
- 80012fc: 61fb str r3, [r7, #28]
- HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
- 80012fe: f107 0314 add.w r3, r7, #20
- 8001302: 4619 mov r1, r3
- 8001304: 480d ldr r0, [pc, #52] ; (800133c <MX_GPIO_Init+0xcc>)
- 8001306: f000 ff43 bl 8002190 <HAL_GPIO_Init>
-
- /*Configure GPIO pin : PB6 */
- GPIO_InitStruct.Pin = GPIO_PIN_6;
- 800130a: 2340 movs r3, #64 ; 0x40
- 800130c: 617b str r3, [r7, #20]
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- 800130e: 2301 movs r3, #1
- 8001310: 61bb str r3, [r7, #24]
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 8001312: 2300 movs r3, #0
- 8001314: 61fb str r3, [r7, #28]
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
- 8001316: 2302 movs r3, #2
- 8001318: 623b str r3, [r7, #32]
- HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
- 800131a: f107 0314 add.w r3, r7, #20
- 800131e: 4619 mov r1, r3
- 8001320: 4804 ldr r0, [pc, #16] ; (8001334 <MX_GPIO_Init+0xc4>)
- 8001322: f000 ff35 bl 8002190 <HAL_GPIO_Init>
-
- }
- 8001326: bf00 nop
- 8001328: 3728 adds r7, #40 ; 0x28
- 800132a: 46bd mov sp, r7
- 800132c: bd80 pop {r7, pc}
- 800132e: bf00 nop
- 8001330: 40023800 .word 0x40023800
- 8001334: 40020400 .word 0x40020400
- 8001338: 10110000 .word 0x10110000
- 800133c: 40020800 .word 0x40020800
-
- 08001340 <Error_Handler>:
- /**
- * @brief This function is executed in case of error occurrence.
- * @retval None
- */
- void Error_Handler(void)
- {
- 8001340: b480 push {r7}
- 8001342: af00 add r7, sp, #0
- /* USER CODE BEGIN Error_Handler_Debug */
- /* User can add his own implementation to report the HAL error return state */
-
- /* USER CODE END Error_Handler_Debug */
- }
- 8001344: bf00 nop
- 8001346: 46bd mov sp, r7
- 8001348: bc80 pop {r7}
- 800134a: 4770 bx lr
-
- 0800134c <HAL_MspInit>:
- /* USER CODE END 0 */
- /**
- * Initializes the Global MSP.
- */
- void HAL_MspInit(void)
- {
- 800134c: b580 push {r7, lr}
- 800134e: b084 sub sp, #16
- 8001350: af00 add r7, sp, #0
- /* USER CODE BEGIN MspInit 0 */
-
- /* USER CODE END MspInit 0 */
-
- __HAL_RCC_COMP_CLK_ENABLE();
- 8001352: 4b15 ldr r3, [pc, #84] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001354: 6a5b ldr r3, [r3, #36] ; 0x24
- 8001356: 4a14 ldr r2, [pc, #80] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001358: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000
- 800135c: 6253 str r3, [r2, #36] ; 0x24
- 800135e: 4b12 ldr r3, [pc, #72] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001360: 6a5b ldr r3, [r3, #36] ; 0x24
- 8001362: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
- 8001366: 60fb str r3, [r7, #12]
- 8001368: 68fb ldr r3, [r7, #12]
- __HAL_RCC_SYSCFG_CLK_ENABLE();
- 800136a: 4b0f ldr r3, [pc, #60] ; (80013a8 <HAL_MspInit+0x5c>)
- 800136c: 6a1b ldr r3, [r3, #32]
- 800136e: 4a0e ldr r2, [pc, #56] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001370: f043 0301 orr.w r3, r3, #1
- 8001374: 6213 str r3, [r2, #32]
- 8001376: 4b0c ldr r3, [pc, #48] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001378: 6a1b ldr r3, [r3, #32]
- 800137a: f003 0301 and.w r3, r3, #1
- 800137e: 60bb str r3, [r7, #8]
- 8001380: 68bb ldr r3, [r7, #8]
- __HAL_RCC_PWR_CLK_ENABLE();
- 8001382: 4b09 ldr r3, [pc, #36] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001384: 6a5b ldr r3, [r3, #36] ; 0x24
- 8001386: 4a08 ldr r2, [pc, #32] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001388: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
- 800138c: 6253 str r3, [r2, #36] ; 0x24
- 800138e: 4b06 ldr r3, [pc, #24] ; (80013a8 <HAL_MspInit+0x5c>)
- 8001390: 6a5b ldr r3, [r3, #36] ; 0x24
- 8001392: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 8001396: 607b str r3, [r7, #4]
- 8001398: 687b ldr r3, [r7, #4]
-
- HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
- 800139a: 2007 movs r0, #7
- 800139c: f000 feb8 bl 8002110 <HAL_NVIC_SetPriorityGrouping>
- /* System interrupt init*/
-
- /* USER CODE BEGIN MspInit 1 */
-
- /* USER CODE END MspInit 1 */
- }
- 80013a0: bf00 nop
- 80013a2: 3710 adds r7, #16
- 80013a4: 46bd mov sp, r7
- 80013a6: bd80 pop {r7, pc}
- 80013a8: 40023800 .word 0x40023800
-
- 080013ac <HAL_ADC_MspInit>:
- * This function configures the hardware resources used in this example
- * @param hadc: ADC handle pointer
- * @retval None
- */
- void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
- {
- 80013ac: b580 push {r7, lr}
- 80013ae: b08a sub sp, #40 ; 0x28
- 80013b0: af00 add r7, sp, #0
- 80013b2: 6078 str r0, [r7, #4]
- GPIO_InitTypeDef GPIO_InitStruct = {0};
- 80013b4: f107 0314 add.w r3, r7, #20
- 80013b8: 2200 movs r2, #0
- 80013ba: 601a str r2, [r3, #0]
- 80013bc: 605a str r2, [r3, #4]
- 80013be: 609a str r2, [r3, #8]
- 80013c0: 60da str r2, [r3, #12]
- 80013c2: 611a str r2, [r3, #16]
- if(hadc->Instance==ADC1)
- 80013c4: 687b ldr r3, [r7, #4]
- 80013c6: 681b ldr r3, [r3, #0]
- 80013c8: 4a15 ldr r2, [pc, #84] ; (8001420 <HAL_ADC_MspInit+0x74>)
- 80013ca: 4293 cmp r3, r2
- 80013cc: d123 bne.n 8001416 <HAL_ADC_MspInit+0x6a>
- {
- /* USER CODE BEGIN ADC1_MspInit 0 */
-
- /* USER CODE END ADC1_MspInit 0 */
- /* Peripheral clock enable */
- __HAL_RCC_ADC1_CLK_ENABLE();
- 80013ce: 4b15 ldr r3, [pc, #84] ; (8001424 <HAL_ADC_MspInit+0x78>)
- 80013d0: 6a1b ldr r3, [r3, #32]
- 80013d2: 4a14 ldr r2, [pc, #80] ; (8001424 <HAL_ADC_MspInit+0x78>)
- 80013d4: f443 7300 orr.w r3, r3, #512 ; 0x200
- 80013d8: 6213 str r3, [r2, #32]
- 80013da: 4b12 ldr r3, [pc, #72] ; (8001424 <HAL_ADC_MspInit+0x78>)
- 80013dc: 6a1b ldr r3, [r3, #32]
- 80013de: f403 7300 and.w r3, r3, #512 ; 0x200
- 80013e2: 613b str r3, [r7, #16]
- 80013e4: 693b ldr r3, [r7, #16]
-
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 80013e6: 4b0f ldr r3, [pc, #60] ; (8001424 <HAL_ADC_MspInit+0x78>)
- 80013e8: 69db ldr r3, [r3, #28]
- 80013ea: 4a0e ldr r2, [pc, #56] ; (8001424 <HAL_ADC_MspInit+0x78>)
- 80013ec: f043 0301 orr.w r3, r3, #1
- 80013f0: 61d3 str r3, [r2, #28]
- 80013f2: 4b0c ldr r3, [pc, #48] ; (8001424 <HAL_ADC_MspInit+0x78>)
- 80013f4: 69db ldr r3, [r3, #28]
- 80013f6: f003 0301 and.w r3, r3, #1
- 80013fa: 60fb str r3, [r7, #12]
- 80013fc: 68fb ldr r3, [r7, #12]
- /**ADC GPIO Configuration
- PA0-WKUP1 ------> ADC_IN0
- */
- GPIO_InitStruct.Pin = GPIO_PIN_0;
- 80013fe: 2301 movs r3, #1
- 8001400: 617b str r3, [r7, #20]
- GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
- 8001402: 2303 movs r3, #3
- 8001404: 61bb str r3, [r7, #24]
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 8001406: 2300 movs r3, #0
- 8001408: 61fb str r3, [r7, #28]
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- 800140a: f107 0314 add.w r3, r7, #20
- 800140e: 4619 mov r1, r3
- 8001410: 4805 ldr r0, [pc, #20] ; (8001428 <HAL_ADC_MspInit+0x7c>)
- 8001412: f000 febd bl 8002190 <HAL_GPIO_Init>
- /* USER CODE BEGIN ADC1_MspInit 1 */
-
- /* USER CODE END ADC1_MspInit 1 */
- }
-
- }
- 8001416: bf00 nop
- 8001418: 3728 adds r7, #40 ; 0x28
- 800141a: 46bd mov sp, r7
- 800141c: bd80 pop {r7, pc}
- 800141e: bf00 nop
- 8001420: 40012400 .word 0x40012400
- 8001424: 40023800 .word 0x40023800
- 8001428: 40020000 .word 0x40020000
-
- 0800142c <HAL_SPI_MspInit>:
- * This function configures the hardware resources used in this example
- * @param hspi: SPI handle pointer
- * @retval None
- */
- void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
- {
- 800142c: b580 push {r7, lr}
- 800142e: b08a sub sp, #40 ; 0x28
- 8001430: af00 add r7, sp, #0
- 8001432: 6078 str r0, [r7, #4]
- GPIO_InitTypeDef GPIO_InitStruct = {0};
- 8001434: f107 0314 add.w r3, r7, #20
- 8001438: 2200 movs r2, #0
- 800143a: 601a str r2, [r3, #0]
- 800143c: 605a str r2, [r3, #4]
- 800143e: 609a str r2, [r3, #8]
- 8001440: 60da str r2, [r3, #12]
- 8001442: 611a str r2, [r3, #16]
- if(hspi->Instance==SPI1)
- 8001444: 687b ldr r3, [r7, #4]
- 8001446: 681b ldr r3, [r3, #0]
- 8001448: 4a17 ldr r2, [pc, #92] ; (80014a8 <HAL_SPI_MspInit+0x7c>)
- 800144a: 4293 cmp r3, r2
- 800144c: d127 bne.n 800149e <HAL_SPI_MspInit+0x72>
- {
- /* USER CODE BEGIN SPI1_MspInit 0 */
-
- /* USER CODE END SPI1_MspInit 0 */
- /* Peripheral clock enable */
- __HAL_RCC_SPI1_CLK_ENABLE();
- 800144e: 4b17 ldr r3, [pc, #92] ; (80014ac <HAL_SPI_MspInit+0x80>)
- 8001450: 6a1b ldr r3, [r3, #32]
- 8001452: 4a16 ldr r2, [pc, #88] ; (80014ac <HAL_SPI_MspInit+0x80>)
- 8001454: f443 5380 orr.w r3, r3, #4096 ; 0x1000
- 8001458: 6213 str r3, [r2, #32]
- 800145a: 4b14 ldr r3, [pc, #80] ; (80014ac <HAL_SPI_MspInit+0x80>)
- 800145c: 6a1b ldr r3, [r3, #32]
- 800145e: f403 5380 and.w r3, r3, #4096 ; 0x1000
- 8001462: 613b str r3, [r7, #16]
- 8001464: 693b ldr r3, [r7, #16]
-
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 8001466: 4b11 ldr r3, [pc, #68] ; (80014ac <HAL_SPI_MspInit+0x80>)
- 8001468: 69db ldr r3, [r3, #28]
- 800146a: 4a10 ldr r2, [pc, #64] ; (80014ac <HAL_SPI_MspInit+0x80>)
- 800146c: f043 0301 orr.w r3, r3, #1
- 8001470: 61d3 str r3, [r2, #28]
- 8001472: 4b0e ldr r3, [pc, #56] ; (80014ac <HAL_SPI_MspInit+0x80>)
- 8001474: 69db ldr r3, [r3, #28]
- 8001476: f003 0301 and.w r3, r3, #1
- 800147a: 60fb str r3, [r7, #12]
- 800147c: 68fb ldr r3, [r7, #12]
- /**SPI1 GPIO Configuration
- PA5 ------> SPI1_SCK
- PA6 ------> SPI1_MISO
- PA7 ------> SPI1_MOSI
- */
- GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
- 800147e: 23e0 movs r3, #224 ; 0xe0
- 8001480: 617b str r3, [r7, #20]
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 8001482: 2302 movs r3, #2
- 8001484: 61bb str r3, [r7, #24]
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 8001486: 2300 movs r3, #0
- 8001488: 61fb str r3, [r7, #28]
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 800148a: 2303 movs r3, #3
- 800148c: 623b str r3, [r7, #32]
- GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
- 800148e: 2305 movs r3, #5
- 8001490: 627b str r3, [r7, #36] ; 0x24
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- 8001492: f107 0314 add.w r3, r7, #20
- 8001496: 4619 mov r1, r3
- 8001498: 4805 ldr r0, [pc, #20] ; (80014b0 <HAL_SPI_MspInit+0x84>)
- 800149a: f000 fe79 bl 8002190 <HAL_GPIO_Init>
- /* USER CODE BEGIN SPI1_MspInit 1 */
-
- /* USER CODE END SPI1_MspInit 1 */
- }
-
- }
- 800149e: bf00 nop
- 80014a0: 3728 adds r7, #40 ; 0x28
- 80014a2: 46bd mov sp, r7
- 80014a4: bd80 pop {r7, pc}
- 80014a6: bf00 nop
- 80014a8: 40013000 .word 0x40013000
- 80014ac: 40023800 .word 0x40023800
- 80014b0: 40020000 .word 0x40020000
-
- 080014b4 <HAL_UART_MspInit>:
- * This function configures the hardware resources used in this example
- * @param huart: UART handle pointer
- * @retval None
- */
- void HAL_UART_MspInit(UART_HandleTypeDef* huart)
- {
- 80014b4: b580 push {r7, lr}
- 80014b6: b08a sub sp, #40 ; 0x28
- 80014b8: af00 add r7, sp, #0
- 80014ba: 6078 str r0, [r7, #4]
- GPIO_InitTypeDef GPIO_InitStruct = {0};
- 80014bc: f107 0314 add.w r3, r7, #20
- 80014c0: 2200 movs r2, #0
- 80014c2: 601a str r2, [r3, #0]
- 80014c4: 605a str r2, [r3, #4]
- 80014c6: 609a str r2, [r3, #8]
- 80014c8: 60da str r2, [r3, #12]
- 80014ca: 611a str r2, [r3, #16]
- if(huart->Instance==USART2)
- 80014cc: 687b ldr r3, [r7, #4]
- 80014ce: 681b ldr r3, [r3, #0]
- 80014d0: 4a17 ldr r2, [pc, #92] ; (8001530 <HAL_UART_MspInit+0x7c>)
- 80014d2: 4293 cmp r3, r2
- 80014d4: d127 bne.n 8001526 <HAL_UART_MspInit+0x72>
- {
- /* USER CODE BEGIN USART2_MspInit 0 */
-
- /* USER CODE END USART2_MspInit 0 */
- /* Peripheral clock enable */
- __HAL_RCC_USART2_CLK_ENABLE();
- 80014d6: 4b17 ldr r3, [pc, #92] ; (8001534 <HAL_UART_MspInit+0x80>)
- 80014d8: 6a5b ldr r3, [r3, #36] ; 0x24
- 80014da: 4a16 ldr r2, [pc, #88] ; (8001534 <HAL_UART_MspInit+0x80>)
- 80014dc: f443 3300 orr.w r3, r3, #131072 ; 0x20000
- 80014e0: 6253 str r3, [r2, #36] ; 0x24
- 80014e2: 4b14 ldr r3, [pc, #80] ; (8001534 <HAL_UART_MspInit+0x80>)
- 80014e4: 6a5b ldr r3, [r3, #36] ; 0x24
- 80014e6: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 80014ea: 613b str r3, [r7, #16]
- 80014ec: 693b ldr r3, [r7, #16]
-
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 80014ee: 4b11 ldr r3, [pc, #68] ; (8001534 <HAL_UART_MspInit+0x80>)
- 80014f0: 69db ldr r3, [r3, #28]
- 80014f2: 4a10 ldr r2, [pc, #64] ; (8001534 <HAL_UART_MspInit+0x80>)
- 80014f4: f043 0301 orr.w r3, r3, #1
- 80014f8: 61d3 str r3, [r2, #28]
- 80014fa: 4b0e ldr r3, [pc, #56] ; (8001534 <HAL_UART_MspInit+0x80>)
- 80014fc: 69db ldr r3, [r3, #28]
- 80014fe: f003 0301 and.w r3, r3, #1
- 8001502: 60fb str r3, [r7, #12]
- 8001504: 68fb ldr r3, [r7, #12]
- /**USART2 GPIO Configuration
- PA2 ------> USART2_TX
- PA3 ------> USART2_RX
- */
- GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin;
- 8001506: 230c movs r3, #12
- 8001508: 617b str r3, [r7, #20]
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- 800150a: 2302 movs r3, #2
- 800150c: 61bb str r3, [r7, #24]
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- 800150e: 2300 movs r3, #0
- 8001510: 61fb str r3, [r7, #28]
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- 8001512: 2303 movs r3, #3
- 8001514: 623b str r3, [r7, #32]
- GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
- 8001516: 2307 movs r3, #7
- 8001518: 627b str r3, [r7, #36] ; 0x24
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- 800151a: f107 0314 add.w r3, r7, #20
- 800151e: 4619 mov r1, r3
- 8001520: 4805 ldr r0, [pc, #20] ; (8001538 <HAL_UART_MspInit+0x84>)
- 8001522: f000 fe35 bl 8002190 <HAL_GPIO_Init>
- /* USER CODE BEGIN USART2_MspInit 1 */
-
- /* USER CODE END USART2_MspInit 1 */
- }
-
- }
- 8001526: bf00 nop
- 8001528: 3728 adds r7, #40 ; 0x28
- 800152a: 46bd mov sp, r7
- 800152c: bd80 pop {r7, pc}
- 800152e: bf00 nop
- 8001530: 40004400 .word 0x40004400
- 8001534: 40023800 .word 0x40023800
- 8001538: 40020000 .word 0x40020000
-
- 0800153c <NMI_Handler>:
- /******************************************************************************/
- /**
- * @brief This function handles Non maskable interrupt.
- */
- void NMI_Handler(void)
- {
- 800153c: b480 push {r7}
- 800153e: af00 add r7, sp, #0
-
- /* USER CODE END NonMaskableInt_IRQn 0 */
- /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
-
- /* USER CODE END NonMaskableInt_IRQn 1 */
- }
- 8001540: bf00 nop
- 8001542: 46bd mov sp, r7
- 8001544: bc80 pop {r7}
- 8001546: 4770 bx lr
-
- 08001548 <HardFault_Handler>:
-
- /**
- * @brief This function handles Hard fault interrupt.
- */
- void HardFault_Handler(void)
- {
- 8001548: b480 push {r7}
- 800154a: af00 add r7, sp, #0
- /* USER CODE BEGIN HardFault_IRQn 0 */
-
- /* USER CODE END HardFault_IRQn 0 */
- while (1)
- 800154c: e7fe b.n 800154c <HardFault_Handler+0x4>
-
- 0800154e <MemManage_Handler>:
-
- /**
- * @brief This function handles Memory management fault.
- */
- void MemManage_Handler(void)
- {
- 800154e: b480 push {r7}
- 8001550: af00 add r7, sp, #0
- /* USER CODE BEGIN MemoryManagement_IRQn 0 */
-
- /* USER CODE END MemoryManagement_IRQn 0 */
- while (1)
- 8001552: e7fe b.n 8001552 <MemManage_Handler+0x4>
-
- 08001554 <BusFault_Handler>:
-
- /**
- * @brief This function handles Pre-fetch fault, memory access fault.
- */
- void BusFault_Handler(void)
- {
- 8001554: b480 push {r7}
- 8001556: af00 add r7, sp, #0
- /* USER CODE BEGIN BusFault_IRQn 0 */
-
- /* USER CODE END BusFault_IRQn 0 */
- while (1)
- 8001558: e7fe b.n 8001558 <BusFault_Handler+0x4>
-
- 0800155a <UsageFault_Handler>:
-
- /**
- * @brief This function handles Undefined instruction or illegal state.
- */
- void UsageFault_Handler(void)
- {
- 800155a: b480 push {r7}
- 800155c: af00 add r7, sp, #0
- /* USER CODE BEGIN UsageFault_IRQn 0 */
-
- /* USER CODE END UsageFault_IRQn 0 */
- while (1)
- 800155e: e7fe b.n 800155e <UsageFault_Handler+0x4>
-
- 08001560 <SVC_Handler>:
-
- /**
- * @brief This function handles System service call via SWI instruction.
- */
- void SVC_Handler(void)
- {
- 8001560: b480 push {r7}
- 8001562: af00 add r7, sp, #0
-
- /* USER CODE END SVC_IRQn 0 */
- /* USER CODE BEGIN SVC_IRQn 1 */
-
- /* USER CODE END SVC_IRQn 1 */
- }
- 8001564: bf00 nop
- 8001566: 46bd mov sp, r7
- 8001568: bc80 pop {r7}
- 800156a: 4770 bx lr
-
- 0800156c <DebugMon_Handler>:
-
- /**
- * @brief This function handles Debug monitor.
- */
- void DebugMon_Handler(void)
- {
- 800156c: b480 push {r7}
- 800156e: af00 add r7, sp, #0
-
- /* USER CODE END DebugMonitor_IRQn 0 */
- /* USER CODE BEGIN DebugMonitor_IRQn 1 */
-
- /* USER CODE END DebugMonitor_IRQn 1 */
- }
- 8001570: bf00 nop
- 8001572: 46bd mov sp, r7
- 8001574: bc80 pop {r7}
- 8001576: 4770 bx lr
-
- 08001578 <PendSV_Handler>:
-
- /**
- * @brief This function handles Pendable request for system service.
- */
- void PendSV_Handler(void)
- {
- 8001578: b480 push {r7}
- 800157a: af00 add r7, sp, #0
-
- /* USER CODE END PendSV_IRQn 0 */
- /* USER CODE BEGIN PendSV_IRQn 1 */
-
- /* USER CODE END PendSV_IRQn 1 */
- }
- 800157c: bf00 nop
- 800157e: 46bd mov sp, r7
- 8001580: bc80 pop {r7}
- 8001582: 4770 bx lr
-
- 08001584 <SysTick_Handler>:
-
- /**
- * @brief This function handles System tick timer.
- */
- void SysTick_Handler(void)
- {
- 8001584: b580 push {r7, lr}
- 8001586: af00 add r7, sp, #0
- /* USER CODE BEGIN SysTick_IRQn 0 */
-
- if (Timer1 > 0){
- 8001588: 4b0c ldr r3, [pc, #48] ; (80015bc <SysTick_Handler+0x38>)
- 800158a: 881b ldrh r3, [r3, #0]
- 800158c: 2b00 cmp r3, #0
- 800158e: d005 beq.n 800159c <SysTick_Handler+0x18>
- Timer1--;
- 8001590: 4b0a ldr r3, [pc, #40] ; (80015bc <SysTick_Handler+0x38>)
- 8001592: 881b ldrh r3, [r3, #0]
- 8001594: 3b01 subs r3, #1
- 8001596: b29a uxth r2, r3
- 8001598: 4b08 ldr r3, [pc, #32] ; (80015bc <SysTick_Handler+0x38>)
- 800159a: 801a strh r2, [r3, #0]
- }
-
- if (Timer2 > 0){
- 800159c: 4b08 ldr r3, [pc, #32] ; (80015c0 <SysTick_Handler+0x3c>)
- 800159e: 881b ldrh r3, [r3, #0]
- 80015a0: 2b00 cmp r3, #0
- 80015a2: d005 beq.n 80015b0 <SysTick_Handler+0x2c>
- Timer2--;
- 80015a4: 4b06 ldr r3, [pc, #24] ; (80015c0 <SysTick_Handler+0x3c>)
- 80015a6: 881b ldrh r3, [r3, #0]
- 80015a8: 3b01 subs r3, #1
- 80015aa: b29a uxth r2, r3
- 80015ac: 4b04 ldr r3, [pc, #16] ; (80015c0 <SysTick_Handler+0x3c>)
- 80015ae: 801a strh r2, [r3, #0]
- }
-
- /* USER CODE END SysTick_IRQn 0 */
- HAL_IncTick();
- 80015b0: f000 f8c2 bl 8001738 <HAL_IncTick>
- /* USER CODE BEGIN SysTick_IRQn 1 */
-
- HAL_SYSTICK_IRQHandler();
- 80015b4: f000 fddf bl 8002176 <HAL_SYSTICK_IRQHandler>
-
- /* USER CODE END SysTick_IRQn 1 */
- }
- 80015b8: bf00 nop
- 80015ba: bd80 pop {r7, pc}
- 80015bc: 200002ea .word 0x200002ea
- 80015c0: 200002e8 .word 0x200002e8
-
- 080015c4 <_sbrk>:
- *
- * @param incr Memory size
- * @return Pointer to allocated memory
- */
- void *_sbrk(ptrdiff_t incr)
- {
- 80015c4: b580 push {r7, lr}
- 80015c6: b086 sub sp, #24
- 80015c8: af00 add r7, sp, #0
- 80015ca: 6078 str r0, [r7, #4]
- extern uint8_t _end; /* Symbol defined in the linker script */
- extern uint8_t _estack; /* Symbol defined in the linker script */
- extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
- const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
- 80015cc: 4a14 ldr r2, [pc, #80] ; (8001620 <_sbrk+0x5c>)
- 80015ce: 4b15 ldr r3, [pc, #84] ; (8001624 <_sbrk+0x60>)
- 80015d0: 1ad3 subs r3, r2, r3
- 80015d2: 617b str r3, [r7, #20]
- const uint8_t *max_heap = (uint8_t *)stack_limit;
- 80015d4: 697b ldr r3, [r7, #20]
- 80015d6: 613b str r3, [r7, #16]
- uint8_t *prev_heap_end;
-
- /* Initalize heap end at first call */
- if (NULL == __sbrk_heap_end)
- 80015d8: 4b13 ldr r3, [pc, #76] ; (8001628 <_sbrk+0x64>)
- 80015da: 681b ldr r3, [r3, #0]
- 80015dc: 2b00 cmp r3, #0
- 80015de: d102 bne.n 80015e6 <_sbrk+0x22>
- {
- __sbrk_heap_end = &_end;
- 80015e0: 4b11 ldr r3, [pc, #68] ; (8001628 <_sbrk+0x64>)
- 80015e2: 4a12 ldr r2, [pc, #72] ; (800162c <_sbrk+0x68>)
- 80015e4: 601a str r2, [r3, #0]
- }
-
- /* Protect heap from growing into the reserved MSP stack */
- if (__sbrk_heap_end + incr > max_heap)
- 80015e6: 4b10 ldr r3, [pc, #64] ; (8001628 <_sbrk+0x64>)
- 80015e8: 681a ldr r2, [r3, #0]
- 80015ea: 687b ldr r3, [r7, #4]
- 80015ec: 4413 add r3, r2
- 80015ee: 693a ldr r2, [r7, #16]
- 80015f0: 429a cmp r2, r3
- 80015f2: d207 bcs.n 8001604 <_sbrk+0x40>
- {
- errno = ENOMEM;
- 80015f4: f005 fdcc bl 8007190 <__errno>
- 80015f8: 4602 mov r2, r0
- 80015fa: 230c movs r3, #12
- 80015fc: 6013 str r3, [r2, #0]
- return (void *)-1;
- 80015fe: f04f 33ff mov.w r3, #4294967295
- 8001602: e009 b.n 8001618 <_sbrk+0x54>
- }
-
- prev_heap_end = __sbrk_heap_end;
- 8001604: 4b08 ldr r3, [pc, #32] ; (8001628 <_sbrk+0x64>)
- 8001606: 681b ldr r3, [r3, #0]
- 8001608: 60fb str r3, [r7, #12]
- __sbrk_heap_end += incr;
- 800160a: 4b07 ldr r3, [pc, #28] ; (8001628 <_sbrk+0x64>)
- 800160c: 681a ldr r2, [r3, #0]
- 800160e: 687b ldr r3, [r7, #4]
- 8001610: 4413 add r3, r2
- 8001612: 4a05 ldr r2, [pc, #20] ; (8001628 <_sbrk+0x64>)
- 8001614: 6013 str r3, [r2, #0]
-
- return (void *)prev_heap_end;
- 8001616: 68fb ldr r3, [r7, #12]
- }
- 8001618: 4618 mov r0, r3
- 800161a: 3718 adds r7, #24
- 800161c: 46bd mov sp, r7
- 800161e: bd80 pop {r7, pc}
- 8001620: 20014000 .word 0x20014000
- 8001624: 00000400 .word 0x00000400
- 8001628: 200000a8 .word 0x200000a8
- 800162c: 20004558 .word 0x20004558
-
- 08001630 <SystemInit>:
- * SystemCoreClock variable.
- * @param None
- * @retval None
- */
- void SystemInit (void)
- {
- 8001630: b480 push {r7}
- 8001632: af00 add r7, sp, #0
- #endif /* DATA_IN_ExtSRAM */
-
- #ifdef VECT_TAB_SRAM
- SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
- #else
- SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
- 8001634: 4b03 ldr r3, [pc, #12] ; (8001644 <SystemInit+0x14>)
- 8001636: f04f 6200 mov.w r2, #134217728 ; 0x8000000
- 800163a: 609a str r2, [r3, #8]
- #endif
- }
- 800163c: bf00 nop
- 800163e: 46bd mov sp, r7
- 8001640: bc80 pop {r7}
- 8001642: 4770 bx lr
- 8001644: e000ed00 .word 0xe000ed00
-
- 08001648 <Reset_Handler>:
- .weak Reset_Handler
- .type Reset_Handler, %function
- Reset_Handler:
-
- /* Copy the data segment initializers from flash to SRAM */
- movs r1, #0
- 8001648: 2100 movs r1, #0
- b LoopCopyDataInit
- 800164a: e003 b.n 8001654 <LoopCopyDataInit>
-
- 0800164c <CopyDataInit>:
-
- CopyDataInit:
- ldr r3, =_sidata
- 800164c: 4b0b ldr r3, [pc, #44] ; (800167c <LoopFillZerobss+0x14>)
- ldr r3, [r3, r1]
- 800164e: 585b ldr r3, [r3, r1]
- str r3, [r0, r1]
- 8001650: 5043 str r3, [r0, r1]
- adds r1, r1, #4
- 8001652: 3104 adds r1, #4
-
- 08001654 <LoopCopyDataInit>:
-
- LoopCopyDataInit:
- ldr r0, =_sdata
- 8001654: 480a ldr r0, [pc, #40] ; (8001680 <LoopFillZerobss+0x18>)
- ldr r3, =_edata
- 8001656: 4b0b ldr r3, [pc, #44] ; (8001684 <LoopFillZerobss+0x1c>)
- adds r2, r0, r1
- 8001658: 1842 adds r2, r0, r1
- cmp r2, r3
- 800165a: 429a cmp r2, r3
- bcc CopyDataInit
- 800165c: d3f6 bcc.n 800164c <CopyDataInit>
- ldr r2, =_sbss
- 800165e: 4a0a ldr r2, [pc, #40] ; (8001688 <LoopFillZerobss+0x20>)
- b LoopFillZerobss
- 8001660: e002 b.n 8001668 <LoopFillZerobss>
-
- 08001662 <FillZerobss>:
- /* Zero fill the bss segment. */
- FillZerobss:
- movs r3, #0
- 8001662: 2300 movs r3, #0
- str r3, [r2], #4
- 8001664: f842 3b04 str.w r3, [r2], #4
-
- 08001668 <LoopFillZerobss>:
-
- LoopFillZerobss:
- ldr r3, = _ebss
- 8001668: 4b08 ldr r3, [pc, #32] ; (800168c <LoopFillZerobss+0x24>)
- cmp r2, r3
- 800166a: 429a cmp r2, r3
- bcc FillZerobss
- 800166c: d3f9 bcc.n 8001662 <FillZerobss>
-
- /* Call the clock system intitialization function.*/
- bl SystemInit
- 800166e: f7ff ffdf bl 8001630 <SystemInit>
- /* Call static constructors */
- bl __libc_init_array
- 8001672: f005 fd93 bl 800719c <__libc_init_array>
- /* Call the application's entry point.*/
- bl main
- 8001676: f7ff fbe5 bl 8000e44 <main>
- bx lr
- 800167a: 4770 bx lr
- ldr r3, =_sidata
- 800167c: 08008008 .word 0x08008008
- ldr r0, =_sdata
- 8001680: 20000000 .word 0x20000000
- ldr r3, =_edata
- 8001684: 20000088 .word 0x20000088
- ldr r2, =_sbss
- 8001688: 20000088 .word 0x20000088
- ldr r3, = _ebss
- 800168c: 20004554 .word 0x20004554
-
- 08001690 <ADC1_IRQHandler>:
- * @retval : None
- */
- .section .text.Default_Handler,"ax",%progbits
- Default_Handler:
- Infinite_Loop:
- b Infinite_Loop
- 8001690: e7fe b.n 8001690 <ADC1_IRQHandler>
-
- 08001692 <HAL_Init>:
- * In the default implementation,Systick is used as source of time base.
- * the tick variable is incremented each 1ms in its ISR.
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_Init(void)
- {
- 8001692: b580 push {r7, lr}
- 8001694: b082 sub sp, #8
- 8001696: af00 add r7, sp, #0
- HAL_StatusTypeDef status = HAL_OK;
- 8001698: 2300 movs r3, #0
- 800169a: 71fb strb r3, [r7, #7]
- #if (PREFETCH_ENABLE != 0)
- __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
- #endif /* PREFETCH_ENABLE */
-
- /* Set Interrupt Group Priority */
- HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
- 800169c: 2003 movs r0, #3
- 800169e: f000 fd37 bl 8002110 <HAL_NVIC_SetPriorityGrouping>
-
- /* Use systick as time base source and configure 1ms tick (default clock after Reset is MSI) */
- if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
- 80016a2: 2000 movs r0, #0
- 80016a4: f000 f80e bl 80016c4 <HAL_InitTick>
- 80016a8: 4603 mov r3, r0
- 80016aa: 2b00 cmp r3, #0
- 80016ac: d002 beq.n 80016b4 <HAL_Init+0x22>
- {
- status = HAL_ERROR;
- 80016ae: 2301 movs r3, #1
- 80016b0: 71fb strb r3, [r7, #7]
- 80016b2: e001 b.n 80016b8 <HAL_Init+0x26>
- }
- else
- {
- /* Init the low level hardware */
- HAL_MspInit();
- 80016b4: f7ff fe4a bl 800134c <HAL_MspInit>
- }
-
- /* Return function status */
- return status;
- 80016b8: 79fb ldrb r3, [r7, #7]
- }
- 80016ba: 4618 mov r0, r3
- 80016bc: 3708 adds r7, #8
- 80016be: 46bd mov sp, r7
- 80016c0: bd80 pop {r7, pc}
- ...
-
- 080016c4 <HAL_InitTick>:
- * implementation in user file.
- * @param TickPriority Tick interrupt priority.
- * @retval HAL status
- */
- __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
- {
- 80016c4: b580 push {r7, lr}
- 80016c6: b084 sub sp, #16
- 80016c8: af00 add r7, sp, #0
- 80016ca: 6078 str r0, [r7, #4]
- HAL_StatusTypeDef status = HAL_OK;
- 80016cc: 2300 movs r3, #0
- 80016ce: 73fb strb r3, [r7, #15]
-
- if (uwTickFreq != 0U)
- 80016d0: 4b16 ldr r3, [pc, #88] ; (800172c <HAL_InitTick+0x68>)
- 80016d2: 681b ldr r3, [r3, #0]
- 80016d4: 2b00 cmp r3, #0
- 80016d6: d022 beq.n 800171e <HAL_InitTick+0x5a>
- {
- /*Configure the SysTick to have interrupt in 1ms time basis*/
- if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) == 0U)
- 80016d8: 4b15 ldr r3, [pc, #84] ; (8001730 <HAL_InitTick+0x6c>)
- 80016da: 681a ldr r2, [r3, #0]
- 80016dc: 4b13 ldr r3, [pc, #76] ; (800172c <HAL_InitTick+0x68>)
- 80016de: 681b ldr r3, [r3, #0]
- 80016e0: f44f 717a mov.w r1, #1000 ; 0x3e8
- 80016e4: fbb1 f3f3 udiv r3, r1, r3
- 80016e8: fbb2 f3f3 udiv r3, r2, r3
- 80016ec: 4618 mov r0, r3
- 80016ee: f000 fd36 bl 800215e <HAL_SYSTICK_Config>
- 80016f2: 4603 mov r3, r0
- 80016f4: 2b00 cmp r3, #0
- 80016f6: d10f bne.n 8001718 <HAL_InitTick+0x54>
- {
- /* Configure the SysTick IRQ priority */
- if (TickPriority < (1UL << __NVIC_PRIO_BITS))
- 80016f8: 687b ldr r3, [r7, #4]
- 80016fa: 2b0f cmp r3, #15
- 80016fc: d809 bhi.n 8001712 <HAL_InitTick+0x4e>
- {
- HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
- 80016fe: 2200 movs r2, #0
- 8001700: 6879 ldr r1, [r7, #4]
- 8001702: f04f 30ff mov.w r0, #4294967295
- 8001706: f000 fd0e bl 8002126 <HAL_NVIC_SetPriority>
- uwTickPrio = TickPriority;
- 800170a: 4a0a ldr r2, [pc, #40] ; (8001734 <HAL_InitTick+0x70>)
- 800170c: 687b ldr r3, [r7, #4]
- 800170e: 6013 str r3, [r2, #0]
- 8001710: e007 b.n 8001722 <HAL_InitTick+0x5e>
- }
- else
- {
- status = HAL_ERROR;
- 8001712: 2301 movs r3, #1
- 8001714: 73fb strb r3, [r7, #15]
- 8001716: e004 b.n 8001722 <HAL_InitTick+0x5e>
- }
- }
- else
- {
- status = HAL_ERROR;
- 8001718: 2301 movs r3, #1
- 800171a: 73fb strb r3, [r7, #15]
- 800171c: e001 b.n 8001722 <HAL_InitTick+0x5e>
- }
- }
- else
- {
- status = HAL_ERROR;
- 800171e: 2301 movs r3, #1
- 8001720: 73fb strb r3, [r7, #15]
- }
-
- /* Return function status */
- return status;
- 8001722: 7bfb ldrb r3, [r7, #15]
- }
- 8001724: 4618 mov r0, r3
- 8001726: 3710 adds r7, #16
- 8001728: 46bd mov sp, r7
- 800172a: bd80 pop {r7, pc}
- 800172c: 2000000c .word 0x2000000c
- 8001730: 20000004 .word 0x20000004
- 8001734: 20000008 .word 0x20000008
-
- 08001738 <HAL_IncTick>:
- * @note This function is declared as __weak to be overwritten in case of other
- * implementations in user file.
- * @retval None
- */
- __weak void HAL_IncTick(void)
- {
- 8001738: b480 push {r7}
- 800173a: af00 add r7, sp, #0
- uwTick += uwTickFreq;
- 800173c: 4b05 ldr r3, [pc, #20] ; (8001754 <HAL_IncTick+0x1c>)
- 800173e: 681a ldr r2, [r3, #0]
- 8001740: 4b05 ldr r3, [pc, #20] ; (8001758 <HAL_IncTick+0x20>)
- 8001742: 681b ldr r3, [r3, #0]
- 8001744: 4413 add r3, r2
- 8001746: 4a03 ldr r2, [pc, #12] ; (8001754 <HAL_IncTick+0x1c>)
- 8001748: 6013 str r3, [r2, #0]
- }
- 800174a: bf00 nop
- 800174c: 46bd mov sp, r7
- 800174e: bc80 pop {r7}
- 8001750: 4770 bx lr
- 8001752: bf00 nop
- 8001754: 200024dc .word 0x200024dc
- 8001758: 2000000c .word 0x2000000c
-
- 0800175c <HAL_GetTick>:
- * @note This function is declared as __weak to be overwritten in case of other
- * implementations in user file.
- * @retval tick value
- */
- __weak uint32_t HAL_GetTick(void)
- {
- 800175c: b480 push {r7}
- 800175e: af00 add r7, sp, #0
- return uwTick;
- 8001760: 4b02 ldr r3, [pc, #8] ; (800176c <HAL_GetTick+0x10>)
- 8001762: 681b ldr r3, [r3, #0]
- }
- 8001764: 4618 mov r0, r3
- 8001766: 46bd mov sp, r7
- 8001768: bc80 pop {r7}
- 800176a: 4770 bx lr
- 800176c: 200024dc .word 0x200024dc
-
- 08001770 <HAL_Delay>:
- * implementations in user file.
- * @param Delay specifies the delay time length, in milliseconds.
- * @retval None
- */
- __weak void HAL_Delay(uint32_t Delay)
- {
- 8001770: b580 push {r7, lr}
- 8001772: b084 sub sp, #16
- 8001774: af00 add r7, sp, #0
- 8001776: 6078 str r0, [r7, #4]
- uint32_t tickstart = HAL_GetTick();
- 8001778: f7ff fff0 bl 800175c <HAL_GetTick>
- 800177c: 60b8 str r0, [r7, #8]
- uint32_t wait = Delay;
- 800177e: 687b ldr r3, [r7, #4]
- 8001780: 60fb str r3, [r7, #12]
-
- /* Add a period to guaranty minimum wait */
- if (wait < HAL_MAX_DELAY)
- 8001782: 68fb ldr r3, [r7, #12]
- 8001784: f1b3 3fff cmp.w r3, #4294967295
- 8001788: d004 beq.n 8001794 <HAL_Delay+0x24>
- {
- wait += (uint32_t)(uwTickFreq);
- 800178a: 4b09 ldr r3, [pc, #36] ; (80017b0 <HAL_Delay+0x40>)
- 800178c: 681b ldr r3, [r3, #0]
- 800178e: 68fa ldr r2, [r7, #12]
- 8001790: 4413 add r3, r2
- 8001792: 60fb str r3, [r7, #12]
- }
-
- while((HAL_GetTick() - tickstart) < wait)
- 8001794: bf00 nop
- 8001796: f7ff ffe1 bl 800175c <HAL_GetTick>
- 800179a: 4602 mov r2, r0
- 800179c: 68bb ldr r3, [r7, #8]
- 800179e: 1ad3 subs r3, r2, r3
- 80017a0: 68fa ldr r2, [r7, #12]
- 80017a2: 429a cmp r2, r3
- 80017a4: d8f7 bhi.n 8001796 <HAL_Delay+0x26>
- {
- }
- }
- 80017a6: bf00 nop
- 80017a8: 3710 adds r7, #16
- 80017aa: 46bd mov sp, r7
- 80017ac: bd80 pop {r7, pc}
- 80017ae: bf00 nop
- 80017b0: 2000000c .word 0x2000000c
-
- 080017b4 <HAL_ADC_Init>:
- * of structure "ADC_InitTypeDef".
- * @param hadc ADC handle
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
- {
- 80017b4: b580 push {r7, lr}
- 80017b6: b08e sub sp, #56 ; 0x38
- 80017b8: af00 add r7, sp, #0
- 80017ba: 6078 str r0, [r7, #4]
- HAL_StatusTypeDef tmp_hal_status = HAL_OK;
- 80017bc: 2300 movs r3, #0
- 80017be: f887 3037 strb.w r3, [r7, #55] ; 0x37
- uint32_t tmp_cr1 = 0;
- 80017c2: 2300 movs r3, #0
- 80017c4: 633b str r3, [r7, #48] ; 0x30
- uint32_t tmp_cr2 = 0;
- 80017c6: 2300 movs r3, #0
- 80017c8: 62fb str r3, [r7, #44] ; 0x2c
-
- /* Check ADC handle */
- if(hadc == NULL)
- 80017ca: 687b ldr r3, [r7, #4]
- 80017cc: 2b00 cmp r3, #0
- 80017ce: d101 bne.n 80017d4 <HAL_ADC_Init+0x20>
- {
- return HAL_ERROR;
- 80017d0: 2301 movs r3, #1
- 80017d2: e127 b.n 8001a24 <HAL_ADC_Init+0x270>
- assert_param(IS_ADC_CHANNELSBANK(hadc->Init.ChannelsBank));
- assert_param(IS_FUNCTIONAL_STATE(hadc->Init.ContinuousConvMode));
- assert_param(IS_ADC_EXTTRIG(hadc->Init.ExternalTrigConv));
- assert_param(IS_FUNCTIONAL_STATE(hadc->Init.DMAContinuousRequests));
-
- if(hadc->Init.ScanConvMode != ADC_SCAN_DISABLE)
- 80017d4: 687b ldr r3, [r7, #4]
- 80017d6: 691b ldr r3, [r3, #16]
- 80017d8: 2b00 cmp r3, #0
- /* Refer to header of this file for more details on clock enabling */
- /* procedure. */
-
- /* Actions performed only if ADC is coming from state reset: */
- /* - Initialization of ADC MSP */
- if (hadc->State == HAL_ADC_STATE_RESET)
- 80017da: 687b ldr r3, [r7, #4]
- 80017dc: 6cdb ldr r3, [r3, #76] ; 0x4c
- 80017de: 2b00 cmp r3, #0
- 80017e0: d115 bne.n 800180e <HAL_ADC_Init+0x5a>
- {
- /* Initialize ADC error code */
- ADC_CLEAR_ERRORCODE(hadc);
- 80017e2: 687b ldr r3, [r7, #4]
- 80017e4: 2200 movs r2, #0
- 80017e6: 651a str r2, [r3, #80] ; 0x50
-
- /* Allocate lock resource and initialize it */
- hadc->Lock = HAL_UNLOCKED;
- 80017e8: 687b ldr r3, [r7, #4]
- 80017ea: 2200 movs r2, #0
- 80017ec: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
- /* Enable SYSCFG clock to control the routing Interface (RI) */
- __HAL_RCC_SYSCFG_CLK_ENABLE();
- 80017f0: 4b8e ldr r3, [pc, #568] ; (8001a2c <HAL_ADC_Init+0x278>)
- 80017f2: 6a1b ldr r3, [r3, #32]
- 80017f4: 4a8d ldr r2, [pc, #564] ; (8001a2c <HAL_ADC_Init+0x278>)
- 80017f6: f043 0301 orr.w r3, r3, #1
- 80017fa: 6213 str r3, [r2, #32]
- 80017fc: 4b8b ldr r3, [pc, #556] ; (8001a2c <HAL_ADC_Init+0x278>)
- 80017fe: 6a1b ldr r3, [r3, #32]
- 8001800: f003 0301 and.w r3, r3, #1
- 8001804: 60bb str r3, [r7, #8]
- 8001806: 68bb ldr r3, [r7, #8]
-
- /* Init the low level hardware */
- hadc->MspInitCallback(hadc);
- #else
- /* Init the low level hardware */
- HAL_ADC_MspInit(hadc);
- 8001808: 6878 ldr r0, [r7, #4]
- 800180a: f7ff fdcf bl 80013ac <HAL_ADC_MspInit>
- #endif /* USE_HAL_ADC_REGISTER_CALLBACKS */
- }
-
- /* Configuration of ADC parameters if previous preliminary actions are */
- /* correctly completed. */
- if (HAL_IS_BIT_CLR(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL))
- 800180e: 687b ldr r3, [r7, #4]
- 8001810: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001812: f003 0310 and.w r3, r3, #16
- 8001816: 2b00 cmp r3, #0
- 8001818: f040 80ff bne.w 8001a1a <HAL_ADC_Init+0x266>
- {
- /* Set ADC state */
- ADC_STATE_CLR_SET(hadc->State,
- 800181c: 687b ldr r3, [r7, #4]
- 800181e: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001820: f423 5388 bic.w r3, r3, #4352 ; 0x1100
- 8001824: f023 0302 bic.w r3, r3, #2
- 8001828: f043 0202 orr.w r2, r3, #2
- 800182c: 687b ldr r3, [r7, #4]
- 800182e: 64da str r2, [r3, #76] ; 0x4c
-
- /* Set ADC parameters */
-
- /* Configuration of common ADC clock: clock source HSI with selectable */
- /* prescaler */
- MODIFY_REG(ADC->CCR ,
- 8001830: 4b7f ldr r3, [pc, #508] ; (8001a30 <HAL_ADC_Init+0x27c>)
- 8001832: 685b ldr r3, [r3, #4]
- 8001834: f423 3240 bic.w r2, r3, #196608 ; 0x30000
- 8001838: 687b ldr r3, [r7, #4]
- 800183a: 685b ldr r3, [r3, #4]
- 800183c: 497c ldr r1, [pc, #496] ; (8001a30 <HAL_ADC_Init+0x27c>)
- 800183e: 4313 orrs r3, r2
- 8001840: 604b str r3, [r1, #4]
- /* - external trigger polarity */
- /* - End of conversion selection */
- /* - DMA continuous request */
- /* - Channels bank (Banks availability depends on devices categories) */
- /* - continuous conversion mode */
- tmp_cr2 |= (hadc->Init.DataAlign |
- 8001842: 687b ldr r3, [r7, #4]
- 8001844: 68da ldr r2, [r3, #12]
- hadc->Init.EOCSelection |
- 8001846: 687b ldr r3, [r7, #4]
- 8001848: 695b ldr r3, [r3, #20]
- tmp_cr2 |= (hadc->Init.DataAlign |
- 800184a: 431a orrs r2, r3
- ADC_CR2_DMACONTREQ((uint32_t)hadc->Init.DMAContinuousRequests) |
- 800184c: 687b ldr r3, [r7, #4]
- 800184e: f893 303c ldrb.w r3, [r3, #60] ; 0x3c
- 8001852: 4619 mov r1, r3
- 8001854: f44f 7300 mov.w r3, #512 ; 0x200
- 8001858: 623b str r3, [r7, #32]
- uint32_t result;
-
- #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
- (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
- (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) )
- __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
- 800185a: 6a3b ldr r3, [r7, #32]
- 800185c: fa93 f3a3 rbit r3, r3
- 8001860: 61fb str r3, [r7, #28]
- result |= value & 1U;
- s--;
- }
- result <<= s; /* shift when v's highest bits are zero */
- #endif
- return result;
- 8001862: 69fb ldr r3, [r7, #28]
- 8001864: fab3 f383 clz r3, r3
- 8001868: b2db uxtb r3, r3
- 800186a: fa01 f303 lsl.w r3, r1, r3
- hadc->Init.EOCSelection |
- 800186e: 431a orrs r2, r3
- hadc->Init.ChannelsBank |
- 8001870: 687b ldr r3, [r7, #4]
- 8001872: 6a1b ldr r3, [r3, #32]
- ADC_CR2_DMACONTREQ((uint32_t)hadc->Init.DMAContinuousRequests) |
- 8001874: 431a orrs r2, r3
- ADC_CR2_CONTINUOUS((uint32_t)hadc->Init.ContinuousConvMode) );
- 8001876: 687b ldr r3, [r7, #4]
- 8001878: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
- 800187c: 4619 mov r1, r3
- 800187e: 2302 movs r3, #2
- 8001880: 62bb str r3, [r7, #40] ; 0x28
- __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
- 8001882: 6abb ldr r3, [r7, #40] ; 0x28
- 8001884: fa93 f3a3 rbit r3, r3
- 8001888: 627b str r3, [r7, #36] ; 0x24
- return result;
- 800188a: 6a7b ldr r3, [r7, #36] ; 0x24
- 800188c: fab3 f383 clz r3, r3
- 8001890: b2db uxtb r3, r3
- 8001892: fa01 f303 lsl.w r3, r1, r3
- hadc->Init.ChannelsBank |
- 8001896: 4313 orrs r3, r2
- tmp_cr2 |= (hadc->Init.DataAlign |
- 8001898: 6afa ldr r2, [r7, #44] ; 0x2c
- 800189a: 4313 orrs r3, r2
- 800189c: 62fb str r3, [r7, #44] ; 0x2c
- /* Enable external trigger if trigger selection is different of software */
- /* start. */
- /* Note: This configuration keeps the hardware feature of parameter */
- /* ExternalTrigConvEdge "trigger edge none" equivalent to */
- /* software start. */
- if (hadc->Init.ExternalTrigConv != ADC_SOFTWARE_START)
- 800189e: 687b ldr r3, [r7, #4]
- 80018a0: 6b5b ldr r3, [r3, #52] ; 0x34
- 80018a2: 2b10 cmp r3, #16
- 80018a4: d007 beq.n 80018b6 <HAL_ADC_Init+0x102>
- {
- tmp_cr2 |= ( hadc->Init.ExternalTrigConv |
- 80018a6: 687b ldr r3, [r7, #4]
- 80018a8: 6b5a ldr r2, [r3, #52] ; 0x34
- hadc->Init.ExternalTrigConvEdge );
- 80018aa: 687b ldr r3, [r7, #4]
- 80018ac: 6b9b ldr r3, [r3, #56] ; 0x38
- tmp_cr2 |= ( hadc->Init.ExternalTrigConv |
- 80018ae: 4313 orrs r3, r2
- 80018b0: 6afa ldr r2, [r7, #44] ; 0x2c
- 80018b2: 4313 orrs r3, r2
- 80018b4: 62fb str r3, [r7, #44] ; 0x2c
- /* - resolution */
- /* - auto power off (LowPowerAutoPowerOff mode) */
- /* - scan mode */
- /* - discontinuous mode disable/enable */
- /* - discontinuous mode number of conversions */
- if ((ADC_IS_ENABLE(hadc) == RESET))
- 80018b6: 687b ldr r3, [r7, #4]
- 80018b8: 681b ldr r3, [r3, #0]
- 80018ba: 681b ldr r3, [r3, #0]
- 80018bc: f003 0340 and.w r3, r3, #64 ; 0x40
- 80018c0: 2b40 cmp r3, #64 ; 0x40
- 80018c2: d04f beq.n 8001964 <HAL_ADC_Init+0x1b0>
- {
- tmp_cr2 |= hadc->Init.LowPowerAutoWait;
- 80018c4: 687b ldr r3, [r7, #4]
- 80018c6: 699b ldr r3, [r3, #24]
- 80018c8: 6afa ldr r2, [r7, #44] ; 0x2c
- 80018ca: 4313 orrs r3, r2
- 80018cc: 62fb str r3, [r7, #44] ; 0x2c
-
- tmp_cr1 |= (hadc->Init.Resolution |
- 80018ce: 687b ldr r3, [r7, #4]
- 80018d0: 689a ldr r2, [r3, #8]
- hadc->Init.LowPowerAutoPowerOff |
- 80018d2: 687b ldr r3, [r7, #4]
- 80018d4: 69db ldr r3, [r3, #28]
- tmp_cr1 |= (hadc->Init.Resolution |
- 80018d6: 4313 orrs r3, r2
- ADC_CR1_SCAN_SET(hadc->Init.ScanConvMode) );
- 80018d8: 687a ldr r2, [r7, #4]
- 80018da: 6912 ldr r2, [r2, #16]
- 80018dc: f5b2 7f80 cmp.w r2, #256 ; 0x100
- 80018e0: d003 beq.n 80018ea <HAL_ADC_Init+0x136>
- 80018e2: 687a ldr r2, [r7, #4]
- 80018e4: 6912 ldr r2, [r2, #16]
- 80018e6: 2a01 cmp r2, #1
- 80018e8: d102 bne.n 80018f0 <HAL_ADC_Init+0x13c>
- 80018ea: f44f 7280 mov.w r2, #256 ; 0x100
- 80018ee: e000 b.n 80018f2 <HAL_ADC_Init+0x13e>
- 80018f0: 2200 movs r2, #0
- hadc->Init.LowPowerAutoPowerOff |
- 80018f2: 4313 orrs r3, r2
- tmp_cr1 |= (hadc->Init.Resolution |
- 80018f4: 6b3a ldr r2, [r7, #48] ; 0x30
- 80018f6: 4313 orrs r3, r2
- 80018f8: 633b str r3, [r7, #48] ; 0x30
-
- /* Enable discontinuous mode only if continuous mode is disabled */
- /* Note: If parameter "Init.ScanConvMode" is set to disable, parameter */
- /* discontinuous is set anyway, but has no effect on ADC HW. */
- if (hadc->Init.DiscontinuousConvMode == ENABLE)
- 80018fa: 687b ldr r3, [r7, #4]
- 80018fc: f893 302c ldrb.w r3, [r3, #44] ; 0x2c
- 8001900: 2b01 cmp r3, #1
- 8001902: d125 bne.n 8001950 <HAL_ADC_Init+0x19c>
- {
- if (hadc->Init.ContinuousConvMode == DISABLE)
- 8001904: 687b ldr r3, [r7, #4]
- 8001906: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
- 800190a: 2b00 cmp r3, #0
- 800190c: d114 bne.n 8001938 <HAL_ADC_Init+0x184>
- {
- /* Enable the selected ADC regular discontinuous mode */
- /* Set the number of channels to be converted in discontinuous mode */
- SET_BIT(tmp_cr1, ADC_CR1_DISCEN |
- 800190e: 687b ldr r3, [r7, #4]
- 8001910: 6b1b ldr r3, [r3, #48] ; 0x30
- 8001912: 3b01 subs r3, #1
- 8001914: f44f 4260 mov.w r2, #57344 ; 0xe000
- 8001918: 61ba str r2, [r7, #24]
- __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
- 800191a: 69ba ldr r2, [r7, #24]
- 800191c: fa92 f2a2 rbit r2, r2
- 8001920: 617a str r2, [r7, #20]
- return result;
- 8001922: 697a ldr r2, [r7, #20]
- 8001924: fab2 f282 clz r2, r2
- 8001928: b2d2 uxtb r2, r2
- 800192a: 4093 lsls r3, r2
- 800192c: f443 6300 orr.w r3, r3, #2048 ; 0x800
- 8001930: 6b3a ldr r2, [r7, #48] ; 0x30
- 8001932: 4313 orrs r3, r2
- 8001934: 633b str r3, [r7, #48] ; 0x30
- 8001936: e00b b.n 8001950 <HAL_ADC_Init+0x19c>
- {
- /* ADC regular group settings continuous and sequencer discontinuous*/
- /* cannot be enabled simultaneously. */
-
- /* Update ADC state machine to error */
- SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
- 8001938: 687b ldr r3, [r7, #4]
- 800193a: 6cdb ldr r3, [r3, #76] ; 0x4c
- 800193c: f043 0220 orr.w r2, r3, #32
- 8001940: 687b ldr r3, [r7, #4]
- 8001942: 64da str r2, [r3, #76] ; 0x4c
-
- /* Set ADC error code to ADC IP internal error */
- SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
- 8001944: 687b ldr r3, [r7, #4]
- 8001946: 6d1b ldr r3, [r3, #80] ; 0x50
- 8001948: f043 0201 orr.w r2, r3, #1
- 800194c: 687b ldr r3, [r7, #4]
- 800194e: 651a str r2, [r3, #80] ; 0x50
- }
- }
-
- /* Update ADC configuration register CR1 with previous settings */
- MODIFY_REG(hadc->Instance->CR1,
- 8001950: 687b ldr r3, [r7, #4]
- 8001952: 681b ldr r3, [r3, #0]
- 8001954: 685a ldr r2, [r3, #4]
- 8001956: 4b37 ldr r3, [pc, #220] ; (8001a34 <HAL_ADC_Init+0x280>)
- 8001958: 4013 ands r3, r2
- 800195a: 687a ldr r2, [r7, #4]
- 800195c: 6812 ldr r2, [r2, #0]
- 800195e: 6b39 ldr r1, [r7, #48] ; 0x30
- 8001960: 430b orrs r3, r1
- 8001962: 6053 str r3, [r2, #4]
- ADC_CR1_SCAN ,
- tmp_cr1 );
- }
-
- /* Update ADC configuration register CR2 with previous settings */
- MODIFY_REG(hadc->Instance->CR2 ,
- 8001964: 687b ldr r3, [r7, #4]
- 8001966: 681b ldr r3, [r3, #0]
- 8001968: 689a ldr r2, [r3, #8]
- 800196a: 4b33 ldr r3, [pc, #204] ; (8001a38 <HAL_ADC_Init+0x284>)
- 800196c: 4013 ands r3, r2
- 800196e: 687a ldr r2, [r7, #4]
- 8001970: 6812 ldr r2, [r2, #0]
- 8001972: 6af9 ldr r1, [r7, #44] ; 0x2c
- 8001974: 430b orrs r3, r1
- 8001976: 6093 str r3, [r2, #8]
- /* Note: Scan mode is present by hardware on this device and, if */
- /* disabled, discards automatically nb of conversions. Anyway, nb of */
- /* conversions is forced to 0x00 for alignment over all STM32 devices. */
- /* - if scan mode is enabled, regular channels sequence length is set to */
- /* parameter "NbrOfConversion" */
- if (ADC_CR1_SCAN_SET(hadc->Init.ScanConvMode) == ADC_SCAN_ENABLE)
- 8001978: 687b ldr r3, [r7, #4]
- 800197a: 691b ldr r3, [r3, #16]
- 800197c: f5b3 7f80 cmp.w r3, #256 ; 0x100
- 8001980: d003 beq.n 800198a <HAL_ADC_Init+0x1d6>
- 8001982: 687b ldr r3, [r7, #4]
- 8001984: 691b ldr r3, [r3, #16]
- 8001986: 2b01 cmp r3, #1
- 8001988: d119 bne.n 80019be <HAL_ADC_Init+0x20a>
- {
- MODIFY_REG(hadc->Instance->SQR1 ,
- 800198a: 687b ldr r3, [r7, #4]
- 800198c: 681b ldr r3, [r3, #0]
- 800198e: 6b1b ldr r3, [r3, #48] ; 0x30
- 8001990: f023 71f8 bic.w r1, r3, #32505856 ; 0x1f00000
- 8001994: 687b ldr r3, [r7, #4]
- 8001996: 6a9b ldr r3, [r3, #40] ; 0x28
- 8001998: 3b01 subs r3, #1
- 800199a: f04f 72f8 mov.w r2, #32505856 ; 0x1f00000
- 800199e: 613a str r2, [r7, #16]
- __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
- 80019a0: 693a ldr r2, [r7, #16]
- 80019a2: fa92 f2a2 rbit r2, r2
- 80019a6: 60fa str r2, [r7, #12]
- return result;
- 80019a8: 68fa ldr r2, [r7, #12]
- 80019aa: fab2 f282 clz r2, r2
- 80019ae: b2d2 uxtb r2, r2
- 80019b0: fa03 f202 lsl.w r2, r3, r2
- 80019b4: 687b ldr r3, [r7, #4]
- 80019b6: 681b ldr r3, [r3, #0]
- 80019b8: 430a orrs r2, r1
- 80019ba: 631a str r2, [r3, #48] ; 0x30
- 80019bc: e007 b.n 80019ce <HAL_ADC_Init+0x21a>
- ADC_SQR1_L ,
- ADC_SQR1_L_SHIFT(hadc->Init.NbrOfConversion) );
- }
- else
- {
- MODIFY_REG(hadc->Instance->SQR1,
- 80019be: 687b ldr r3, [r7, #4]
- 80019c0: 681b ldr r3, [r3, #0]
- 80019c2: 6b1a ldr r2, [r3, #48] ; 0x30
- 80019c4: 687b ldr r3, [r7, #4]
- 80019c6: 681b ldr r3, [r3, #0]
- 80019c8: f022 72f8 bic.w r2, r2, #32505856 ; 0x1f00000
- 80019cc: 631a str r2, [r3, #48] ; 0x30
-
- /* Check back that ADC registers have effectively been configured to */
- /* ensure of no potential problem of ADC core IP clocking. */
- /* Check through register CR2 (excluding execution control bits ADON, */
- /* JSWSTART, SWSTART and injected trigger bits JEXTEN and JEXTSEL). */
- if ((READ_REG(hadc->Instance->CR2) & ~(ADC_CR2_ADON |
- 80019ce: 687b ldr r3, [r7, #4]
- 80019d0: 681b ldr r3, [r3, #0]
- 80019d2: 689a ldr r2, [r3, #8]
- 80019d4: 4b19 ldr r3, [pc, #100] ; (8001a3c <HAL_ADC_Init+0x288>)
- 80019d6: 4013 ands r3, r2
- 80019d8: 6afa ldr r2, [r7, #44] ; 0x2c
- 80019da: 429a cmp r2, r3
- 80019dc: d10b bne.n 80019f6 <HAL_ADC_Init+0x242>
- ADC_CR2_SWSTART | ADC_CR2_JSWSTART |
- ADC_CR2_JEXTEN | ADC_CR2_JEXTSEL ))
- == tmp_cr2)
- {
- /* Set ADC error code to none */
- ADC_CLEAR_ERRORCODE(hadc);
- 80019de: 687b ldr r3, [r7, #4]
- 80019e0: 2200 movs r2, #0
- 80019e2: 651a str r2, [r3, #80] ; 0x50
-
- /* Set the ADC state */
- ADC_STATE_CLR_SET(hadc->State,
- 80019e4: 687b ldr r3, [r7, #4]
- 80019e6: 6cdb ldr r3, [r3, #76] ; 0x4c
- 80019e8: f023 0303 bic.w r3, r3, #3
- 80019ec: f043 0201 orr.w r2, r3, #1
- 80019f0: 687b ldr r3, [r7, #4]
- 80019f2: 64da str r2, [r3, #76] ; 0x4c
- 80019f4: e014 b.n 8001a20 <HAL_ADC_Init+0x26c>
- HAL_ADC_STATE_READY);
- }
- else
- {
- /* Update ADC state machine to error */
- ADC_STATE_CLR_SET(hadc->State,
- 80019f6: 687b ldr r3, [r7, #4]
- 80019f8: 6cdb ldr r3, [r3, #76] ; 0x4c
- 80019fa: f023 0312 bic.w r3, r3, #18
- 80019fe: f043 0210 orr.w r2, r3, #16
- 8001a02: 687b ldr r3, [r7, #4]
- 8001a04: 64da str r2, [r3, #76] ; 0x4c
- HAL_ADC_STATE_BUSY_INTERNAL,
- HAL_ADC_STATE_ERROR_INTERNAL);
-
- /* Set ADC error code to ADC IP internal error */
- SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
- 8001a06: 687b ldr r3, [r7, #4]
- 8001a08: 6d1b ldr r3, [r3, #80] ; 0x50
- 8001a0a: f043 0201 orr.w r2, r3, #1
- 8001a0e: 687b ldr r3, [r7, #4]
- 8001a10: 651a str r2, [r3, #80] ; 0x50
-
- tmp_hal_status = HAL_ERROR;
- 8001a12: 2301 movs r3, #1
- 8001a14: f887 3037 strb.w r3, [r7, #55] ; 0x37
- 8001a18: e002 b.n 8001a20 <HAL_ADC_Init+0x26c>
- }
-
- }
- else
- {
- tmp_hal_status = HAL_ERROR;
- 8001a1a: 2301 movs r3, #1
- 8001a1c: f887 3037 strb.w r3, [r7, #55] ; 0x37
- }
-
- /* Return function status */
- return tmp_hal_status;
- 8001a20: f897 3037 ldrb.w r3, [r7, #55] ; 0x37
- }
- 8001a24: 4618 mov r0, r3
- 8001a26: 3738 adds r7, #56 ; 0x38
- 8001a28: 46bd mov sp, r7
- 8001a2a: bd80 pop {r7, pc}
- 8001a2c: 40023800 .word 0x40023800
- 8001a30: 40012700 .word 0x40012700
- 8001a34: fcfc16ff .word 0xfcfc16ff
- 8001a38: c0fff189 .word 0xc0fff189
- 8001a3c: bf80fffe .word 0xbf80fffe
-
- 08001a40 <HAL_ADC_Start>:
- * Interruptions enabled in this function: None.
- * @param hadc ADC handle
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
- {
- 8001a40: b580 push {r7, lr}
- 8001a42: b084 sub sp, #16
- 8001a44: af00 add r7, sp, #0
- 8001a46: 6078 str r0, [r7, #4]
- HAL_StatusTypeDef tmp_hal_status = HAL_OK;
- 8001a48: 2300 movs r3, #0
- 8001a4a: 73fb strb r3, [r7, #15]
-
- /* Check the parameters */
- assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance));
-
- /* Process locked */
- __HAL_LOCK(hadc);
- 8001a4c: 687b ldr r3, [r7, #4]
- 8001a4e: f893 3048 ldrb.w r3, [r3, #72] ; 0x48
- 8001a52: 2b01 cmp r3, #1
- 8001a54: d101 bne.n 8001a5a <HAL_ADC_Start+0x1a>
- 8001a56: 2302 movs r3, #2
- 8001a58: e04e b.n 8001af8 <HAL_ADC_Start+0xb8>
- 8001a5a: 687b ldr r3, [r7, #4]
- 8001a5c: 2201 movs r2, #1
- 8001a5e: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
- /* Enable the ADC peripheral */
- tmp_hal_status = ADC_Enable(hadc);
- 8001a62: 6878 ldr r0, [r7, #4]
- 8001a64: f000 fa4e bl 8001f04 <ADC_Enable>
- 8001a68: 4603 mov r3, r0
- 8001a6a: 73fb strb r3, [r7, #15]
-
- /* Start conversion if ADC is effectively enabled */
- if (tmp_hal_status == HAL_OK)
- 8001a6c: 7bfb ldrb r3, [r7, #15]
- 8001a6e: 2b00 cmp r3, #0
- 8001a70: d141 bne.n 8001af6 <HAL_ADC_Start+0xb6>
- {
- /* Set ADC state */
- /* - Clear state bitfield related to regular group conversion results */
- /* - Set state bitfield related to regular group operation */
- ADC_STATE_CLR_SET(hadc->State,
- 8001a72: 687b ldr r3, [r7, #4]
- 8001a74: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001a76: f423 63e0 bic.w r3, r3, #1792 ; 0x700
- 8001a7a: f023 0301 bic.w r3, r3, #1
- 8001a7e: f443 7280 orr.w r2, r3, #256 ; 0x100
- 8001a82: 687b ldr r3, [r7, #4]
- 8001a84: 64da str r2, [r3, #76] ; 0x4c
- HAL_ADC_STATE_READY | HAL_ADC_STATE_REG_EOC | HAL_ADC_STATE_REG_OVR,
- HAL_ADC_STATE_REG_BUSY);
-
- /* If conversions on group regular are also triggering group injected, */
- /* update ADC state. */
- if (READ_BIT(hadc->Instance->CR1, ADC_CR1_JAUTO) != RESET)
- 8001a86: 687b ldr r3, [r7, #4]
- 8001a88: 681b ldr r3, [r3, #0]
- 8001a8a: 685b ldr r3, [r3, #4]
- 8001a8c: f403 6380 and.w r3, r3, #1024 ; 0x400
- 8001a90: 2b00 cmp r3, #0
- 8001a92: d007 beq.n 8001aa4 <HAL_ADC_Start+0x64>
- {
- ADC_STATE_CLR_SET(hadc->State, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_INJ_BUSY);
- 8001a94: 687b ldr r3, [r7, #4]
- 8001a96: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001a98: f423 5340 bic.w r3, r3, #12288 ; 0x3000
- 8001a9c: f443 5280 orr.w r2, r3, #4096 ; 0x1000
- 8001aa0: 687b ldr r3, [r7, #4]
- 8001aa2: 64da str r2, [r3, #76] ; 0x4c
- }
-
- /* State machine update: Check if an injected conversion is ongoing */
- if (HAL_IS_BIT_SET(hadc->State, HAL_ADC_STATE_INJ_BUSY))
- 8001aa4: 687b ldr r3, [r7, #4]
- 8001aa6: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001aa8: f403 5380 and.w r3, r3, #4096 ; 0x1000
- 8001aac: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
- 8001ab0: d106 bne.n 8001ac0 <HAL_ADC_Start+0x80>
- {
- /* Reset ADC error code fields related to conversions on group regular */
- CLEAR_BIT(hadc->ErrorCode, (HAL_ADC_ERROR_OVR | HAL_ADC_ERROR_DMA));
- 8001ab2: 687b ldr r3, [r7, #4]
- 8001ab4: 6d1b ldr r3, [r3, #80] ; 0x50
- 8001ab6: f023 0206 bic.w r2, r3, #6
- 8001aba: 687b ldr r3, [r7, #4]
- 8001abc: 651a str r2, [r3, #80] ; 0x50
- 8001abe: e002 b.n 8001ac6 <HAL_ADC_Start+0x86>
- }
- else
- {
- /* Reset ADC all error code fields */
- ADC_CLEAR_ERRORCODE(hadc);
- 8001ac0: 687b ldr r3, [r7, #4]
- 8001ac2: 2200 movs r2, #0
- 8001ac4: 651a str r2, [r3, #80] ; 0x50
- }
-
- /* Process unlocked */
- /* Unlock before starting ADC conversions: in case of potential */
- /* interruption, to let the process to ADC IRQ Handler. */
- __HAL_UNLOCK(hadc);
- 8001ac6: 687b ldr r3, [r7, #4]
- 8001ac8: 2200 movs r2, #0
- 8001aca: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
- /* Clear regular group conversion flag and overrun flag */
- /* (To ensure of no unknown state from potential previous ADC operations) */
- __HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_EOC | ADC_FLAG_OVR);
- 8001ace: 687b ldr r3, [r7, #4]
- 8001ad0: 681b ldr r3, [r3, #0]
- 8001ad2: f06f 0222 mvn.w r2, #34 ; 0x22
- 8001ad6: 601a str r2, [r3, #0]
-
- /* Enable conversion of regular group. */
- /* If software start has been selected, conversion starts immediately. */
- /* If external trigger has been selected, conversion will start at next */
- /* trigger event. */
- if (ADC_IS_SOFTWARE_START_REGULAR(hadc))
- 8001ad8: 687b ldr r3, [r7, #4]
- 8001ada: 681b ldr r3, [r3, #0]
- 8001adc: 689b ldr r3, [r3, #8]
- 8001ade: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
- 8001ae2: 2b00 cmp r3, #0
- 8001ae4: d107 bne.n 8001af6 <HAL_ADC_Start+0xb6>
- {
- /* Start ADC conversion on regular group */
- SET_BIT(hadc->Instance->CR2, ADC_CR2_SWSTART);
- 8001ae6: 687b ldr r3, [r7, #4]
- 8001ae8: 681b ldr r3, [r3, #0]
- 8001aea: 689a ldr r2, [r3, #8]
- 8001aec: 687b ldr r3, [r7, #4]
- 8001aee: 681b ldr r3, [r3, #0]
- 8001af0: f042 4280 orr.w r2, r2, #1073741824 ; 0x40000000
- 8001af4: 609a str r2, [r3, #8]
- }
- }
-
- /* Return function status */
- return tmp_hal_status;
- 8001af6: 7bfb ldrb r3, [r7, #15]
- }
- 8001af8: 4618 mov r0, r3
- 8001afa: 3710 adds r7, #16
- 8001afc: 46bd mov sp, r7
- 8001afe: bd80 pop {r7, pc}
-
- 08001b00 <HAL_ADC_PollForConversion>:
- * @param hadc ADC handle
- * @param Timeout Timeout value in millisecond.
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout)
- {
- 8001b00: b580 push {r7, lr}
- 8001b02: b084 sub sp, #16
- 8001b04: af00 add r7, sp, #0
- 8001b06: 6078 str r0, [r7, #4]
- 8001b08: 6039 str r1, [r7, #0]
- uint32_t tickstart = 0;
- 8001b0a: 2300 movs r3, #0
- 8001b0c: 60fb str r3, [r7, #12]
- /* each conversion: */
- /* Particular case is ADC configured in DMA mode and ADC sequencer with */
- /* several ranks and polling for end of each conversion. */
- /* For code simplicity sake, this particular case is generalized to */
- /* ADC configured in DMA mode and and polling for end of each conversion. */
- if (HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_EOCS) &&
- 8001b0e: 687b ldr r3, [r7, #4]
- 8001b10: 681b ldr r3, [r3, #0]
- 8001b12: 689b ldr r3, [r3, #8]
- 8001b14: f403 6380 and.w r3, r3, #1024 ; 0x400
- 8001b18: f5b3 6f80 cmp.w r3, #1024 ; 0x400
- 8001b1c: d113 bne.n 8001b46 <HAL_ADC_PollForConversion+0x46>
- HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_DMA) )
- 8001b1e: 687b ldr r3, [r7, #4]
- 8001b20: 681b ldr r3, [r3, #0]
- 8001b22: 689b ldr r3, [r3, #8]
- 8001b24: f403 7380 and.w r3, r3, #256 ; 0x100
- if (HAL_IS_BIT_SET(hadc->Instance->CR2, ADC_CR2_EOCS) &&
- 8001b28: f5b3 7f80 cmp.w r3, #256 ; 0x100
- 8001b2c: d10b bne.n 8001b46 <HAL_ADC_PollForConversion+0x46>
- {
- /* Update ADC state machine to error */
- SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
- 8001b2e: 687b ldr r3, [r7, #4]
- 8001b30: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001b32: f043 0220 orr.w r2, r3, #32
- 8001b36: 687b ldr r3, [r7, #4]
- 8001b38: 64da str r2, [r3, #76] ; 0x4c
-
- /* Process unlocked */
- __HAL_UNLOCK(hadc);
- 8001b3a: 687b ldr r3, [r7, #4]
- 8001b3c: 2200 movs r2, #0
- 8001b3e: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
- return HAL_ERROR;
- 8001b42: 2301 movs r3, #1
- 8001b44: e061 b.n 8001c0a <HAL_ADC_PollForConversion+0x10a>
- }
-
- /* Get tick count */
- tickstart = HAL_GetTick();
- 8001b46: f7ff fe09 bl 800175c <HAL_GetTick>
- 8001b4a: 60f8 str r0, [r7, #12]
-
- /* Wait until End of Conversion flag is raised */
- while(HAL_IS_BIT_CLR(hadc->Instance->SR, ADC_FLAG_EOC))
- 8001b4c: e01a b.n 8001b84 <HAL_ADC_PollForConversion+0x84>
- {
- /* Check if timeout is disabled (set to infinite wait) */
- if(Timeout != HAL_MAX_DELAY)
- 8001b4e: 683b ldr r3, [r7, #0]
- 8001b50: f1b3 3fff cmp.w r3, #4294967295
- 8001b54: d016 beq.n 8001b84 <HAL_ADC_PollForConversion+0x84>
- {
- if((Timeout == 0) || ((HAL_GetTick() - tickstart ) > Timeout))
- 8001b56: 683b ldr r3, [r7, #0]
- 8001b58: 2b00 cmp r3, #0
- 8001b5a: d007 beq.n 8001b6c <HAL_ADC_PollForConversion+0x6c>
- 8001b5c: f7ff fdfe bl 800175c <HAL_GetTick>
- 8001b60: 4602 mov r2, r0
- 8001b62: 68fb ldr r3, [r7, #12]
- 8001b64: 1ad3 subs r3, r2, r3
- 8001b66: 683a ldr r2, [r7, #0]
- 8001b68: 429a cmp r2, r3
- 8001b6a: d20b bcs.n 8001b84 <HAL_ADC_PollForConversion+0x84>
- {
- /* Update ADC state machine to timeout */
- SET_BIT(hadc->State, HAL_ADC_STATE_TIMEOUT);
- 8001b6c: 687b ldr r3, [r7, #4]
- 8001b6e: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001b70: f043 0204 orr.w r2, r3, #4
- 8001b74: 687b ldr r3, [r7, #4]
- 8001b76: 64da str r2, [r3, #76] ; 0x4c
-
- /* Process unlocked */
- __HAL_UNLOCK(hadc);
- 8001b78: 687b ldr r3, [r7, #4]
- 8001b7a: 2200 movs r2, #0
- 8001b7c: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
- return HAL_TIMEOUT;
- 8001b80: 2303 movs r3, #3
- 8001b82: e042 b.n 8001c0a <HAL_ADC_PollForConversion+0x10a>
- while(HAL_IS_BIT_CLR(hadc->Instance->SR, ADC_FLAG_EOC))
- 8001b84: 687b ldr r3, [r7, #4]
- 8001b86: 681b ldr r3, [r3, #0]
- 8001b88: 681b ldr r3, [r3, #0]
- 8001b8a: f003 0302 and.w r3, r3, #2
- 8001b8e: 2b00 cmp r3, #0
- 8001b90: d0dd beq.n 8001b4e <HAL_ADC_PollForConversion+0x4e>
- }
-
- /* Clear end of conversion flag of regular group if low power feature */
- /* "Auto Wait" is disabled, to not interfere with this feature until data */
- /* register is read using function HAL_ADC_GetValue(). */
- if (hadc->Init.LowPowerAutoWait == DISABLE)
- 8001b92: 687b ldr r3, [r7, #4]
- 8001b94: 699b ldr r3, [r3, #24]
- 8001b96: 2b00 cmp r3, #0
- 8001b98: d104 bne.n 8001ba4 <HAL_ADC_PollForConversion+0xa4>
- {
- /* Clear regular group conversion flag */
- __HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_STRT | ADC_FLAG_EOC);
- 8001b9a: 687b ldr r3, [r7, #4]
- 8001b9c: 681b ldr r3, [r3, #0]
- 8001b9e: f06f 0212 mvn.w r2, #18
- 8001ba2: 601a str r2, [r3, #0]
- }
-
- /* Update ADC state machine */
- SET_BIT(hadc->State, HAL_ADC_STATE_REG_EOC);
- 8001ba4: 687b ldr r3, [r7, #4]
- 8001ba6: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001ba8: f443 7200 orr.w r2, r3, #512 ; 0x200
- 8001bac: 687b ldr r3, [r7, #4]
- 8001bae: 64da str r2, [r3, #76] ; 0x4c
- /* by external trigger, continuous mode or scan sequence on going. */
- /* Note: On STM32L1, there is no independent flag of end of sequence. */
- /* The test of scan sequence on going is done either with scan */
- /* sequence disabled or with end of conversion flag set to */
- /* of end of sequence. */
- if(ADC_IS_SOFTWARE_START_REGULAR(hadc) &&
- 8001bb0: 687b ldr r3, [r7, #4]
- 8001bb2: 681b ldr r3, [r3, #0]
- 8001bb4: 689b ldr r3, [r3, #8]
- 8001bb6: f003 5340 and.w r3, r3, #805306368 ; 0x30000000
- 8001bba: 2b00 cmp r3, #0
- 8001bbc: d124 bne.n 8001c08 <HAL_ADC_PollForConversion+0x108>
- (hadc->Init.ContinuousConvMode == DISABLE) &&
- 8001bbe: 687b ldr r3, [r7, #4]
- 8001bc0: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
- if(ADC_IS_SOFTWARE_START_REGULAR(hadc) &&
- 8001bc4: 2b00 cmp r3, #0
- 8001bc6: d11f bne.n 8001c08 <HAL_ADC_PollForConversion+0x108>
- (HAL_IS_BIT_CLR(hadc->Instance->SQR1, ADC_SQR1_L) ||
- 8001bc8: 687b ldr r3, [r7, #4]
- 8001bca: 681b ldr r3, [r3, #0]
- 8001bcc: 6b1b ldr r3, [r3, #48] ; 0x30
- 8001bce: f003 73f8 and.w r3, r3, #32505856 ; 0x1f00000
- (hadc->Init.ContinuousConvMode == DISABLE) &&
- 8001bd2: 2b00 cmp r3, #0
- 8001bd4: d006 beq.n 8001be4 <HAL_ADC_PollForConversion+0xe4>
- HAL_IS_BIT_CLR(hadc->Instance->CR2, ADC_CR2_EOCS) ) )
- 8001bd6: 687b ldr r3, [r7, #4]
- 8001bd8: 681b ldr r3, [r3, #0]
- 8001bda: 689b ldr r3, [r3, #8]
- 8001bdc: f403 6380 and.w r3, r3, #1024 ; 0x400
- (HAL_IS_BIT_CLR(hadc->Instance->SQR1, ADC_SQR1_L) ||
- 8001be0: 2b00 cmp r3, #0
- 8001be2: d111 bne.n 8001c08 <HAL_ADC_PollForConversion+0x108>
- {
- /* Set ADC state */
- CLEAR_BIT(hadc->State, HAL_ADC_STATE_REG_BUSY);
- 8001be4: 687b ldr r3, [r7, #4]
- 8001be6: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001be8: f423 7280 bic.w r2, r3, #256 ; 0x100
- 8001bec: 687b ldr r3, [r7, #4]
- 8001bee: 64da str r2, [r3, #76] ; 0x4c
-
- if (HAL_IS_BIT_CLR(hadc->State, HAL_ADC_STATE_INJ_BUSY))
- 8001bf0: 687b ldr r3, [r7, #4]
- 8001bf2: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001bf4: f403 5380 and.w r3, r3, #4096 ; 0x1000
- 8001bf8: 2b00 cmp r3, #0
- 8001bfa: d105 bne.n 8001c08 <HAL_ADC_PollForConversion+0x108>
- {
- SET_BIT(hadc->State, HAL_ADC_STATE_READY);
- 8001bfc: 687b ldr r3, [r7, #4]
- 8001bfe: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001c00: f043 0201 orr.w r2, r3, #1
- 8001c04: 687b ldr r3, [r7, #4]
- 8001c06: 64da str r2, [r3, #76] ; 0x4c
- }
- }
-
- /* Return ADC state */
- return HAL_OK;
- 8001c08: 2300 movs r3, #0
- }
- 8001c0a: 4618 mov r0, r3
- 8001c0c: 3710 adds r7, #16
- 8001c0e: 46bd mov sp, r7
- 8001c10: bd80 pop {r7, pc}
-
- 08001c12 <HAL_ADC_GetValue>:
- * or @ref __HAL_ADC_CLEAR_FLAG(&hadc, ADC_FLAG_EOS).
- * @param hadc ADC handle
- * @retval ADC group regular conversion data
- */
- uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
- {
- 8001c12: b480 push {r7}
- 8001c14: b083 sub sp, #12
- 8001c16: af00 add r7, sp, #0
- 8001c18: 6078 str r0, [r7, #4]
-
- /* Note: EOC flag is not cleared here by software because automatically */
- /* cleared by hardware when reading register DR. */
-
- /* Return ADC converted value */
- return hadc->Instance->DR;
- 8001c1a: 687b ldr r3, [r7, #4]
- 8001c1c: 681b ldr r3, [r3, #0]
- 8001c1e: 6d9b ldr r3, [r3, #88] ; 0x58
- }
- 8001c20: 4618 mov r0, r3
- 8001c22: 370c adds r7, #12
- 8001c24: 46bd mov sp, r7
- 8001c26: bc80 pop {r7}
- 8001c28: 4770 bx lr
- ...
-
- 08001c2c <HAL_ADC_ConfigChannel>:
- * @param hadc ADC handle
- * @param sConfig Structure of ADC channel for regular group.
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig)
- {
- 8001c2c: b480 push {r7}
- 8001c2e: b085 sub sp, #20
- 8001c30: af00 add r7, sp, #0
- 8001c32: 6078 str r0, [r7, #4]
- 8001c34: 6039 str r1, [r7, #0]
- HAL_StatusTypeDef tmp_hal_status = HAL_OK;
- 8001c36: 2300 movs r3, #0
- 8001c38: 73fb strb r3, [r7, #15]
- __IO uint32_t wait_loop_index = 0;
- 8001c3a: 2300 movs r3, #0
- 8001c3c: 60bb str r3, [r7, #8]
- assert_param(IS_ADC_CHANNEL(sConfig->Channel));
- assert_param(IS_ADC_REGULAR_RANK(sConfig->Rank));
- assert_param(IS_ADC_SAMPLE_TIME(sConfig->SamplingTime));
-
- /* Process locked */
- __HAL_LOCK(hadc);
- 8001c3e: 687b ldr r3, [r7, #4]
- 8001c40: f893 3048 ldrb.w r3, [r3, #72] ; 0x48
- 8001c44: 2b01 cmp r3, #1
- 8001c46: d101 bne.n 8001c4c <HAL_ADC_ConfigChannel+0x20>
- 8001c48: 2302 movs r3, #2
- 8001c4a: e14f b.n 8001eec <HAL_ADC_ConfigChannel+0x2c0>
- 8001c4c: 687b ldr r3, [r7, #4]
- 8001c4e: 2201 movs r2, #1
- 8001c50: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
-
- /* Regular sequence configuration */
- /* For Rank 1 to 6 */
- if (sConfig->Rank < 7)
- 8001c54: 683b ldr r3, [r7, #0]
- 8001c56: 685b ldr r3, [r3, #4]
- 8001c58: 2b06 cmp r3, #6
- 8001c5a: d81c bhi.n 8001c96 <HAL_ADC_ConfigChannel+0x6a>
- {
- MODIFY_REG(hadc->Instance->SQR5,
- 8001c5c: 687b ldr r3, [r7, #4]
- 8001c5e: 681b ldr r3, [r3, #0]
- 8001c60: 6c19 ldr r1, [r3, #64] ; 0x40
- 8001c62: 683b ldr r3, [r7, #0]
- 8001c64: 685a ldr r2, [r3, #4]
- 8001c66: 4613 mov r3, r2
- 8001c68: 009b lsls r3, r3, #2
- 8001c6a: 4413 add r3, r2
- 8001c6c: 3b05 subs r3, #5
- 8001c6e: 221f movs r2, #31
- 8001c70: fa02 f303 lsl.w r3, r2, r3
- 8001c74: 43db mvns r3, r3
- 8001c76: 4019 ands r1, r3
- 8001c78: 683b ldr r3, [r7, #0]
- 8001c7a: 6818 ldr r0, [r3, #0]
- 8001c7c: 683b ldr r3, [r7, #0]
- 8001c7e: 685a ldr r2, [r3, #4]
- 8001c80: 4613 mov r3, r2
- 8001c82: 009b lsls r3, r3, #2
- 8001c84: 4413 add r3, r2
- 8001c86: 3b05 subs r3, #5
- 8001c88: fa00 f203 lsl.w r2, r0, r3
- 8001c8c: 687b ldr r3, [r7, #4]
- 8001c8e: 681b ldr r3, [r3, #0]
- 8001c90: 430a orrs r2, r1
- 8001c92: 641a str r2, [r3, #64] ; 0x40
- 8001c94: e07e b.n 8001d94 <HAL_ADC_ConfigChannel+0x168>
- ADC_SQR5_RK(ADC_SQR5_SQ1, sConfig->Rank),
- ADC_SQR5_RK(sConfig->Channel, sConfig->Rank) );
- }
- /* For Rank 7 to 12 */
- else if (sConfig->Rank < 13)
- 8001c96: 683b ldr r3, [r7, #0]
- 8001c98: 685b ldr r3, [r3, #4]
- 8001c9a: 2b0c cmp r3, #12
- 8001c9c: d81c bhi.n 8001cd8 <HAL_ADC_ConfigChannel+0xac>
- {
- MODIFY_REG(hadc->Instance->SQR4,
- 8001c9e: 687b ldr r3, [r7, #4]
- 8001ca0: 681b ldr r3, [r3, #0]
- 8001ca2: 6bd9 ldr r1, [r3, #60] ; 0x3c
- 8001ca4: 683b ldr r3, [r7, #0]
- 8001ca6: 685a ldr r2, [r3, #4]
- 8001ca8: 4613 mov r3, r2
- 8001caa: 009b lsls r3, r3, #2
- 8001cac: 4413 add r3, r2
- 8001cae: 3b23 subs r3, #35 ; 0x23
- 8001cb0: 221f movs r2, #31
- 8001cb2: fa02 f303 lsl.w r3, r2, r3
- 8001cb6: 43db mvns r3, r3
- 8001cb8: 4019 ands r1, r3
- 8001cba: 683b ldr r3, [r7, #0]
- 8001cbc: 6818 ldr r0, [r3, #0]
- 8001cbe: 683b ldr r3, [r7, #0]
- 8001cc0: 685a ldr r2, [r3, #4]
- 8001cc2: 4613 mov r3, r2
- 8001cc4: 009b lsls r3, r3, #2
- 8001cc6: 4413 add r3, r2
- 8001cc8: 3b23 subs r3, #35 ; 0x23
- 8001cca: fa00 f203 lsl.w r2, r0, r3
- 8001cce: 687b ldr r3, [r7, #4]
- 8001cd0: 681b ldr r3, [r3, #0]
- 8001cd2: 430a orrs r2, r1
- 8001cd4: 63da str r2, [r3, #60] ; 0x3c
- 8001cd6: e05d b.n 8001d94 <HAL_ADC_ConfigChannel+0x168>
- ADC_SQR4_RK(ADC_SQR4_SQ7, sConfig->Rank),
- ADC_SQR4_RK(sConfig->Channel, sConfig->Rank) );
- }
- /* For Rank 13 to 18 */
- else if (sConfig->Rank < 19)
- 8001cd8: 683b ldr r3, [r7, #0]
- 8001cda: 685b ldr r3, [r3, #4]
- 8001cdc: 2b12 cmp r3, #18
- 8001cde: d81c bhi.n 8001d1a <HAL_ADC_ConfigChannel+0xee>
- {
- MODIFY_REG(hadc->Instance->SQR3,
- 8001ce0: 687b ldr r3, [r7, #4]
- 8001ce2: 681b ldr r3, [r3, #0]
- 8001ce4: 6b99 ldr r1, [r3, #56] ; 0x38
- 8001ce6: 683b ldr r3, [r7, #0]
- 8001ce8: 685a ldr r2, [r3, #4]
- 8001cea: 4613 mov r3, r2
- 8001cec: 009b lsls r3, r3, #2
- 8001cee: 4413 add r3, r2
- 8001cf0: 3b41 subs r3, #65 ; 0x41
- 8001cf2: 221f movs r2, #31
- 8001cf4: fa02 f303 lsl.w r3, r2, r3
- 8001cf8: 43db mvns r3, r3
- 8001cfa: 4019 ands r1, r3
- 8001cfc: 683b ldr r3, [r7, #0]
- 8001cfe: 6818 ldr r0, [r3, #0]
- 8001d00: 683b ldr r3, [r7, #0]
- 8001d02: 685a ldr r2, [r3, #4]
- 8001d04: 4613 mov r3, r2
- 8001d06: 009b lsls r3, r3, #2
- 8001d08: 4413 add r3, r2
- 8001d0a: 3b41 subs r3, #65 ; 0x41
- 8001d0c: fa00 f203 lsl.w r2, r0, r3
- 8001d10: 687b ldr r3, [r7, #4]
- 8001d12: 681b ldr r3, [r3, #0]
- 8001d14: 430a orrs r2, r1
- 8001d16: 639a str r2, [r3, #56] ; 0x38
- 8001d18: e03c b.n 8001d94 <HAL_ADC_ConfigChannel+0x168>
- ADC_SQR3_RK(ADC_SQR3_SQ13, sConfig->Rank),
- ADC_SQR3_RK(sConfig->Channel, sConfig->Rank) );
- }
- /* For Rank 19 to 24 */
- else if (sConfig->Rank < 25)
- 8001d1a: 683b ldr r3, [r7, #0]
- 8001d1c: 685b ldr r3, [r3, #4]
- 8001d1e: 2b18 cmp r3, #24
- 8001d20: d81c bhi.n 8001d5c <HAL_ADC_ConfigChannel+0x130>
- {
- MODIFY_REG(hadc->Instance->SQR2,
- 8001d22: 687b ldr r3, [r7, #4]
- 8001d24: 681b ldr r3, [r3, #0]
- 8001d26: 6b59 ldr r1, [r3, #52] ; 0x34
- 8001d28: 683b ldr r3, [r7, #0]
- 8001d2a: 685a ldr r2, [r3, #4]
- 8001d2c: 4613 mov r3, r2
- 8001d2e: 009b lsls r3, r3, #2
- 8001d30: 4413 add r3, r2
- 8001d32: 3b5f subs r3, #95 ; 0x5f
- 8001d34: 221f movs r2, #31
- 8001d36: fa02 f303 lsl.w r3, r2, r3
- 8001d3a: 43db mvns r3, r3
- 8001d3c: 4019 ands r1, r3
- 8001d3e: 683b ldr r3, [r7, #0]
- 8001d40: 6818 ldr r0, [r3, #0]
- 8001d42: 683b ldr r3, [r7, #0]
- 8001d44: 685a ldr r2, [r3, #4]
- 8001d46: 4613 mov r3, r2
- 8001d48: 009b lsls r3, r3, #2
- 8001d4a: 4413 add r3, r2
- 8001d4c: 3b5f subs r3, #95 ; 0x5f
- 8001d4e: fa00 f203 lsl.w r2, r0, r3
- 8001d52: 687b ldr r3, [r7, #4]
- 8001d54: 681b ldr r3, [r3, #0]
- 8001d56: 430a orrs r2, r1
- 8001d58: 635a str r2, [r3, #52] ; 0x34
- 8001d5a: e01b b.n 8001d94 <HAL_ADC_ConfigChannel+0x168>
- ADC_SQR2_RK(sConfig->Channel, sConfig->Rank) );
- }
- /* For Rank 25 to 28 */
- else
- {
- MODIFY_REG(hadc->Instance->SQR1,
- 8001d5c: 687b ldr r3, [r7, #4]
- 8001d5e: 681b ldr r3, [r3, #0]
- 8001d60: 6b19 ldr r1, [r3, #48] ; 0x30
- 8001d62: 683b ldr r3, [r7, #0]
- 8001d64: 685a ldr r2, [r3, #4]
- 8001d66: 4613 mov r3, r2
- 8001d68: 009b lsls r3, r3, #2
- 8001d6a: 4413 add r3, r2
- 8001d6c: 3b7d subs r3, #125 ; 0x7d
- 8001d6e: 221f movs r2, #31
- 8001d70: fa02 f303 lsl.w r3, r2, r3
- 8001d74: 43db mvns r3, r3
- 8001d76: 4019 ands r1, r3
- 8001d78: 683b ldr r3, [r7, #0]
- 8001d7a: 6818 ldr r0, [r3, #0]
- 8001d7c: 683b ldr r3, [r7, #0]
- 8001d7e: 685a ldr r2, [r3, #4]
- 8001d80: 4613 mov r3, r2
- 8001d82: 009b lsls r3, r3, #2
- 8001d84: 4413 add r3, r2
- 8001d86: 3b7d subs r3, #125 ; 0x7d
- 8001d88: fa00 f203 lsl.w r2, r0, r3
- 8001d8c: 687b ldr r3, [r7, #4]
- 8001d8e: 681b ldr r3, [r3, #0]
- 8001d90: 430a orrs r2, r1
- 8001d92: 631a str r2, [r3, #48] ; 0x30
- }
-
-
- /* Channel sampling time configuration */
- /* For channels 0 to 9 */
- if (sConfig->Channel < ADC_CHANNEL_10)
- 8001d94: 683b ldr r3, [r7, #0]
- 8001d96: 681b ldr r3, [r3, #0]
- 8001d98: 2b09 cmp r3, #9
- 8001d9a: d81a bhi.n 8001dd2 <HAL_ADC_ConfigChannel+0x1a6>
- {
- MODIFY_REG(hadc->Instance->SMPR3,
- 8001d9c: 687b ldr r3, [r7, #4]
- 8001d9e: 681b ldr r3, [r3, #0]
- 8001da0: 6959 ldr r1, [r3, #20]
- 8001da2: 683b ldr r3, [r7, #0]
- 8001da4: 681a ldr r2, [r3, #0]
- 8001da6: 4613 mov r3, r2
- 8001da8: 005b lsls r3, r3, #1
- 8001daa: 4413 add r3, r2
- 8001dac: 2207 movs r2, #7
- 8001dae: fa02 f303 lsl.w r3, r2, r3
- 8001db2: 43db mvns r3, r3
- 8001db4: 4019 ands r1, r3
- 8001db6: 683b ldr r3, [r7, #0]
- 8001db8: 6898 ldr r0, [r3, #8]
- 8001dba: 683b ldr r3, [r7, #0]
- 8001dbc: 681a ldr r2, [r3, #0]
- 8001dbe: 4613 mov r3, r2
- 8001dc0: 005b lsls r3, r3, #1
- 8001dc2: 4413 add r3, r2
- 8001dc4: fa00 f203 lsl.w r2, r0, r3
- 8001dc8: 687b ldr r3, [r7, #4]
- 8001dca: 681b ldr r3, [r3, #0]
- 8001dcc: 430a orrs r2, r1
- 8001dce: 615a str r2, [r3, #20]
- 8001dd0: e05d b.n 8001e8e <HAL_ADC_ConfigChannel+0x262>
- ADC_SMPR3(ADC_SMPR3_SMP0, sConfig->Channel),
- ADC_SMPR3(sConfig->SamplingTime, sConfig->Channel) );
- }
- /* For channels 10 to 19 */
- else if (sConfig->Channel < ADC_CHANNEL_20)
- 8001dd2: 683b ldr r3, [r7, #0]
- 8001dd4: 681b ldr r3, [r3, #0]
- 8001dd6: 2b13 cmp r3, #19
- 8001dd8: d81c bhi.n 8001e14 <HAL_ADC_ConfigChannel+0x1e8>
- {
- MODIFY_REG(hadc->Instance->SMPR2,
- 8001dda: 687b ldr r3, [r7, #4]
- 8001ddc: 681b ldr r3, [r3, #0]
- 8001dde: 6919 ldr r1, [r3, #16]
- 8001de0: 683b ldr r3, [r7, #0]
- 8001de2: 681a ldr r2, [r3, #0]
- 8001de4: 4613 mov r3, r2
- 8001de6: 005b lsls r3, r3, #1
- 8001de8: 4413 add r3, r2
- 8001dea: 3b1e subs r3, #30
- 8001dec: 2207 movs r2, #7
- 8001dee: fa02 f303 lsl.w r3, r2, r3
- 8001df2: 43db mvns r3, r3
- 8001df4: 4019 ands r1, r3
- 8001df6: 683b ldr r3, [r7, #0]
- 8001df8: 6898 ldr r0, [r3, #8]
- 8001dfa: 683b ldr r3, [r7, #0]
- 8001dfc: 681a ldr r2, [r3, #0]
- 8001dfe: 4613 mov r3, r2
- 8001e00: 005b lsls r3, r3, #1
- 8001e02: 4413 add r3, r2
- 8001e04: 3b1e subs r3, #30
- 8001e06: fa00 f203 lsl.w r2, r0, r3
- 8001e0a: 687b ldr r3, [r7, #4]
- 8001e0c: 681b ldr r3, [r3, #0]
- 8001e0e: 430a orrs r2, r1
- 8001e10: 611a str r2, [r3, #16]
- 8001e12: e03c b.n 8001e8e <HAL_ADC_ConfigChannel+0x262>
- ADC_SMPR2(ADC_SMPR2_SMP10, sConfig->Channel),
- ADC_SMPR2(sConfig->SamplingTime, sConfig->Channel) );
- }
- /* For channels 20 to 26 for devices Cat.1, Cat.2, Cat.3 */
- /* For channels 20 to 29 for devices Cat4, Cat.5 */
- else if (sConfig->Channel <= ADC_SMPR1_CHANNEL_MAX)
- 8001e14: 683b ldr r3, [r7, #0]
- 8001e16: 681b ldr r3, [r3, #0]
- 8001e18: 2b1d cmp r3, #29
- 8001e1a: d81c bhi.n 8001e56 <HAL_ADC_ConfigChannel+0x22a>
- {
- MODIFY_REG(hadc->Instance->SMPR1,
- 8001e1c: 687b ldr r3, [r7, #4]
- 8001e1e: 681b ldr r3, [r3, #0]
- 8001e20: 68d9 ldr r1, [r3, #12]
- 8001e22: 683b ldr r3, [r7, #0]
- 8001e24: 681a ldr r2, [r3, #0]
- 8001e26: 4613 mov r3, r2
- 8001e28: 005b lsls r3, r3, #1
- 8001e2a: 4413 add r3, r2
- 8001e2c: 3b3c subs r3, #60 ; 0x3c
- 8001e2e: 2207 movs r2, #7
- 8001e30: fa02 f303 lsl.w r3, r2, r3
- 8001e34: 43db mvns r3, r3
- 8001e36: 4019 ands r1, r3
- 8001e38: 683b ldr r3, [r7, #0]
- 8001e3a: 6898 ldr r0, [r3, #8]
- 8001e3c: 683b ldr r3, [r7, #0]
- 8001e3e: 681a ldr r2, [r3, #0]
- 8001e40: 4613 mov r3, r2
- 8001e42: 005b lsls r3, r3, #1
- 8001e44: 4413 add r3, r2
- 8001e46: 3b3c subs r3, #60 ; 0x3c
- 8001e48: fa00 f203 lsl.w r2, r0, r3
- 8001e4c: 687b ldr r3, [r7, #4]
- 8001e4e: 681b ldr r3, [r3, #0]
- 8001e50: 430a orrs r2, r1
- 8001e52: 60da str r2, [r3, #12]
- 8001e54: e01b b.n 8001e8e <HAL_ADC_ConfigChannel+0x262>
- ADC_SMPR1(sConfig->SamplingTime, sConfig->Channel) );
- }
- /* For channels 30 to 31 for devices Cat4, Cat.5 */
- else
- {
- ADC_SMPR0_CHANNEL_SET(hadc, sConfig->SamplingTime, sConfig->Channel);
- 8001e56: 687b ldr r3, [r7, #4]
- 8001e58: 681b ldr r3, [r3, #0]
- 8001e5a: 6dd9 ldr r1, [r3, #92] ; 0x5c
- 8001e5c: 683b ldr r3, [r7, #0]
- 8001e5e: 681a ldr r2, [r3, #0]
- 8001e60: 4613 mov r3, r2
- 8001e62: 005b lsls r3, r3, #1
- 8001e64: 4413 add r3, r2
- 8001e66: 3b5a subs r3, #90 ; 0x5a
- 8001e68: 2207 movs r2, #7
- 8001e6a: fa02 f303 lsl.w r3, r2, r3
- 8001e6e: 43db mvns r3, r3
- 8001e70: 4019 ands r1, r3
- 8001e72: 683b ldr r3, [r7, #0]
- 8001e74: 6898 ldr r0, [r3, #8]
- 8001e76: 683b ldr r3, [r7, #0]
- 8001e78: 681a ldr r2, [r3, #0]
- 8001e7a: 4613 mov r3, r2
- 8001e7c: 005b lsls r3, r3, #1
- 8001e7e: 4413 add r3, r2
- 8001e80: 3b5a subs r3, #90 ; 0x5a
- 8001e82: fa00 f203 lsl.w r2, r0, r3
- 8001e86: 687b ldr r3, [r7, #4]
- 8001e88: 681b ldr r3, [r3, #0]
- 8001e8a: 430a orrs r2, r1
- 8001e8c: 65da str r2, [r3, #92] ; 0x5c
- }
-
- /* If ADC1 Channel_16 or Channel_17 is selected, enable Temperature sensor */
- /* and VREFINT measurement path. */
- if ((sConfig->Channel == ADC_CHANNEL_TEMPSENSOR) ||
- 8001e8e: 683b ldr r3, [r7, #0]
- 8001e90: 681b ldr r3, [r3, #0]
- 8001e92: 2b10 cmp r3, #16
- 8001e94: d003 beq.n 8001e9e <HAL_ADC_ConfigChannel+0x272>
- (sConfig->Channel == ADC_CHANNEL_VREFINT) )
- 8001e96: 683b ldr r3, [r7, #0]
- 8001e98: 681b ldr r3, [r3, #0]
- if ((sConfig->Channel == ADC_CHANNEL_TEMPSENSOR) ||
- 8001e9a: 2b11 cmp r3, #17
- 8001e9c: d121 bne.n 8001ee2 <HAL_ADC_ConfigChannel+0x2b6>
- {
- if (READ_BIT(ADC->CCR, ADC_CCR_TSVREFE) == RESET)
- 8001e9e: 4b16 ldr r3, [pc, #88] ; (8001ef8 <HAL_ADC_ConfigChannel+0x2cc>)
- 8001ea0: 685b ldr r3, [r3, #4]
- 8001ea2: f403 0300 and.w r3, r3, #8388608 ; 0x800000
- 8001ea6: 2b00 cmp r3, #0
- 8001ea8: d11b bne.n 8001ee2 <HAL_ADC_ConfigChannel+0x2b6>
- {
- SET_BIT(ADC->CCR, ADC_CCR_TSVREFE);
- 8001eaa: 4b13 ldr r3, [pc, #76] ; (8001ef8 <HAL_ADC_ConfigChannel+0x2cc>)
- 8001eac: 685b ldr r3, [r3, #4]
- 8001eae: 4a12 ldr r2, [pc, #72] ; (8001ef8 <HAL_ADC_ConfigChannel+0x2cc>)
- 8001eb0: f443 0300 orr.w r3, r3, #8388608 ; 0x800000
- 8001eb4: 6053 str r3, [r2, #4]
-
- if ((sConfig->Channel == ADC_CHANNEL_TEMPSENSOR))
- 8001eb6: 683b ldr r3, [r7, #0]
- 8001eb8: 681b ldr r3, [r3, #0]
- 8001eba: 2b10 cmp r3, #16
- 8001ebc: d111 bne.n 8001ee2 <HAL_ADC_ConfigChannel+0x2b6>
- {
- /* Delay for temperature sensor stabilization time */
- /* Compute number of CPU cycles to wait for */
- wait_loop_index = (ADC_TEMPSENSOR_DELAY_US * (SystemCoreClock / 1000000));
- 8001ebe: 4b0f ldr r3, [pc, #60] ; (8001efc <HAL_ADC_ConfigChannel+0x2d0>)
- 8001ec0: 681b ldr r3, [r3, #0]
- 8001ec2: 4a0f ldr r2, [pc, #60] ; (8001f00 <HAL_ADC_ConfigChannel+0x2d4>)
- 8001ec4: fba2 2303 umull r2, r3, r2, r3
- 8001ec8: 0c9a lsrs r2, r3, #18
- 8001eca: 4613 mov r3, r2
- 8001ecc: 009b lsls r3, r3, #2
- 8001ece: 4413 add r3, r2
- 8001ed0: 005b lsls r3, r3, #1
- 8001ed2: 60bb str r3, [r7, #8]
- while(wait_loop_index != 0)
- 8001ed4: e002 b.n 8001edc <HAL_ADC_ConfigChannel+0x2b0>
- {
- wait_loop_index--;
- 8001ed6: 68bb ldr r3, [r7, #8]
- 8001ed8: 3b01 subs r3, #1
- 8001eda: 60bb str r3, [r7, #8]
- while(wait_loop_index != 0)
- 8001edc: 68bb ldr r3, [r7, #8]
- 8001ede: 2b00 cmp r3, #0
- 8001ee0: d1f9 bne.n 8001ed6 <HAL_ADC_ConfigChannel+0x2aa>
- }
- }
- }
-
- /* Process unlocked */
- __HAL_UNLOCK(hadc);
- 8001ee2: 687b ldr r3, [r7, #4]
- 8001ee4: 2200 movs r2, #0
- 8001ee6: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
- /* Return function status */
- return tmp_hal_status;
- 8001eea: 7bfb ldrb r3, [r7, #15]
- }
- 8001eec: 4618 mov r0, r3
- 8001eee: 3714 adds r7, #20
- 8001ef0: 46bd mov sp, r7
- 8001ef2: bc80 pop {r7}
- 8001ef4: 4770 bx lr
- 8001ef6: bf00 nop
- 8001ef8: 40012700 .word 0x40012700
- 8001efc: 20000004 .word 0x20000004
- 8001f00: 431bde83 .word 0x431bde83
-
- 08001f04 <ADC_Enable>:
- * "if (hadc->Init.LowPowerAutoPowerOff != ENABLE)".
- * @param hadc ADC handle
- * @retval HAL status.
- */
- HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef* hadc)
- {
- 8001f04: b580 push {r7, lr}
- 8001f06: b084 sub sp, #16
- 8001f08: af00 add r7, sp, #0
- 8001f0a: 6078 str r0, [r7, #4]
- uint32_t tickstart = 0;
- 8001f0c: 2300 movs r3, #0
- 8001f0e: 60fb str r3, [r7, #12]
- __IO uint32_t wait_loop_index = 0;
- 8001f10: 2300 movs r3, #0
- 8001f12: 60bb str r3, [r7, #8]
-
- /* ADC enable and wait for ADC ready (in case of ADC is disabled or */
- /* enabling phase not yet completed: flag ADC ready not yet set). */
- /* Timeout implemented to not be stuck if ADC cannot be enabled (possible */
- /* causes: ADC clock not running, ...). */
- if (ADC_IS_ENABLE(hadc) == RESET)
- 8001f14: 687b ldr r3, [r7, #4]
- 8001f16: 681b ldr r3, [r3, #0]
- 8001f18: 681b ldr r3, [r3, #0]
- 8001f1a: f003 0340 and.w r3, r3, #64 ; 0x40
- 8001f1e: 2b40 cmp r3, #64 ; 0x40
- 8001f20: d03c beq.n 8001f9c <ADC_Enable+0x98>
- {
- /* Enable the Peripheral */
- __HAL_ADC_ENABLE(hadc);
- 8001f22: 687b ldr r3, [r7, #4]
- 8001f24: 681b ldr r3, [r3, #0]
- 8001f26: 689a ldr r2, [r3, #8]
- 8001f28: 687b ldr r3, [r7, #4]
- 8001f2a: 681b ldr r3, [r3, #0]
- 8001f2c: f042 0201 orr.w r2, r2, #1
- 8001f30: 609a str r2, [r3, #8]
-
- /* Delay for ADC stabilization time */
- /* Compute number of CPU cycles to wait for */
- wait_loop_index = (ADC_STAB_DELAY_US * (SystemCoreClock / 1000000));
- 8001f32: 4b1d ldr r3, [pc, #116] ; (8001fa8 <ADC_Enable+0xa4>)
- 8001f34: 681b ldr r3, [r3, #0]
- 8001f36: 4a1d ldr r2, [pc, #116] ; (8001fac <ADC_Enable+0xa8>)
- 8001f38: fba2 2303 umull r2, r3, r2, r3
- 8001f3c: 0c9a lsrs r2, r3, #18
- 8001f3e: 4613 mov r3, r2
- 8001f40: 005b lsls r3, r3, #1
- 8001f42: 4413 add r3, r2
- 8001f44: 60bb str r3, [r7, #8]
- while(wait_loop_index != 0)
- 8001f46: e002 b.n 8001f4e <ADC_Enable+0x4a>
- {
- wait_loop_index--;
- 8001f48: 68bb ldr r3, [r7, #8]
- 8001f4a: 3b01 subs r3, #1
- 8001f4c: 60bb str r3, [r7, #8]
- while(wait_loop_index != 0)
- 8001f4e: 68bb ldr r3, [r7, #8]
- 8001f50: 2b00 cmp r3, #0
- 8001f52: d1f9 bne.n 8001f48 <ADC_Enable+0x44>
- }
-
- /* Get tick count */
- tickstart = HAL_GetTick();
- 8001f54: f7ff fc02 bl 800175c <HAL_GetTick>
- 8001f58: 60f8 str r0, [r7, #12]
-
- /* Wait for ADC effectively enabled */
- while(ADC_IS_ENABLE(hadc) == RESET)
- 8001f5a: e018 b.n 8001f8e <ADC_Enable+0x8a>
- {
- if((HAL_GetTick() - tickstart ) > ADC_ENABLE_TIMEOUT)
- 8001f5c: f7ff fbfe bl 800175c <HAL_GetTick>
- 8001f60: 4602 mov r2, r0
- 8001f62: 68fb ldr r3, [r7, #12]
- 8001f64: 1ad3 subs r3, r2, r3
- 8001f66: 2b02 cmp r3, #2
- 8001f68: d911 bls.n 8001f8e <ADC_Enable+0x8a>
- {
- /* Update ADC state machine to error */
- SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_INTERNAL);
- 8001f6a: 687b ldr r3, [r7, #4]
- 8001f6c: 6cdb ldr r3, [r3, #76] ; 0x4c
- 8001f6e: f043 0210 orr.w r2, r3, #16
- 8001f72: 687b ldr r3, [r7, #4]
- 8001f74: 64da str r2, [r3, #76] ; 0x4c
-
- /* Set ADC error code to ADC IP internal error */
- SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_INTERNAL);
- 8001f76: 687b ldr r3, [r7, #4]
- 8001f78: 6d1b ldr r3, [r3, #80] ; 0x50
- 8001f7a: f043 0201 orr.w r2, r3, #1
- 8001f7e: 687b ldr r3, [r7, #4]
- 8001f80: 651a str r2, [r3, #80] ; 0x50
-
- /* Process unlocked */
- __HAL_UNLOCK(hadc);
- 8001f82: 687b ldr r3, [r7, #4]
- 8001f84: 2200 movs r2, #0
- 8001f86: f883 2048 strb.w r2, [r3, #72] ; 0x48
-
- return HAL_ERROR;
- 8001f8a: 2301 movs r3, #1
- 8001f8c: e007 b.n 8001f9e <ADC_Enable+0x9a>
- while(ADC_IS_ENABLE(hadc) == RESET)
- 8001f8e: 687b ldr r3, [r7, #4]
- 8001f90: 681b ldr r3, [r3, #0]
- 8001f92: 681b ldr r3, [r3, #0]
- 8001f94: f003 0340 and.w r3, r3, #64 ; 0x40
- 8001f98: 2b40 cmp r3, #64 ; 0x40
- 8001f9a: d1df bne.n 8001f5c <ADC_Enable+0x58>
- }
- }
- }
-
- /* Return HAL status */
- return HAL_OK;
- 8001f9c: 2300 movs r3, #0
- }
- 8001f9e: 4618 mov r0, r3
- 8001fa0: 3710 adds r7, #16
- 8001fa2: 46bd mov sp, r7
- 8001fa4: bd80 pop {r7, pc}
- 8001fa6: bf00 nop
- 8001fa8: 20000004 .word 0x20000004
- 8001fac: 431bde83 .word 0x431bde83
-
- 08001fb0 <__NVIC_SetPriorityGrouping>:
- In case of a conflict between priority grouping and available
- priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
- \param [in] PriorityGroup Priority grouping field.
- */
- __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
- {
- 8001fb0: b480 push {r7}
- 8001fb2: b085 sub sp, #20
- 8001fb4: af00 add r7, sp, #0
- 8001fb6: 6078 str r0, [r7, #4]
- uint32_t reg_value;
- uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
- 8001fb8: 687b ldr r3, [r7, #4]
- 8001fba: f003 0307 and.w r3, r3, #7
- 8001fbe: 60fb str r3, [r7, #12]
-
- reg_value = SCB->AIRCR; /* read old register configuration */
- 8001fc0: 4b0c ldr r3, [pc, #48] ; (8001ff4 <__NVIC_SetPriorityGrouping+0x44>)
- 8001fc2: 68db ldr r3, [r3, #12]
- 8001fc4: 60bb str r3, [r7, #8]
- reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
- 8001fc6: 68ba ldr r2, [r7, #8]
- 8001fc8: f64f 03ff movw r3, #63743 ; 0xf8ff
- 8001fcc: 4013 ands r3, r2
- 8001fce: 60bb str r3, [r7, #8]
- reg_value = (reg_value |
- ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
- (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
- 8001fd0: 68fb ldr r3, [r7, #12]
- 8001fd2: 021a lsls r2, r3, #8
- ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
- 8001fd4: 68bb ldr r3, [r7, #8]
- 8001fd6: 4313 orrs r3, r2
- reg_value = (reg_value |
- 8001fd8: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000
- 8001fdc: f443 3300 orr.w r3, r3, #131072 ; 0x20000
- 8001fe0: 60bb str r3, [r7, #8]
- SCB->AIRCR = reg_value;
- 8001fe2: 4a04 ldr r2, [pc, #16] ; (8001ff4 <__NVIC_SetPriorityGrouping+0x44>)
- 8001fe4: 68bb ldr r3, [r7, #8]
- 8001fe6: 60d3 str r3, [r2, #12]
- }
- 8001fe8: bf00 nop
- 8001fea: 3714 adds r7, #20
- 8001fec: 46bd mov sp, r7
- 8001fee: bc80 pop {r7}
- 8001ff0: 4770 bx lr
- 8001ff2: bf00 nop
- 8001ff4: e000ed00 .word 0xe000ed00
-
- 08001ff8 <__NVIC_GetPriorityGrouping>:
- \brief Get Priority Grouping
- \details Reads the priority grouping field from the NVIC Interrupt Controller.
- \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
- */
- __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void)
- {
- 8001ff8: b480 push {r7}
- 8001ffa: af00 add r7, sp, #0
- return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
- 8001ffc: 4b04 ldr r3, [pc, #16] ; (8002010 <__NVIC_GetPriorityGrouping+0x18>)
- 8001ffe: 68db ldr r3, [r3, #12]
- 8002000: 0a1b lsrs r3, r3, #8
- 8002002: f003 0307 and.w r3, r3, #7
- }
- 8002006: 4618 mov r0, r3
- 8002008: 46bd mov sp, r7
- 800200a: bc80 pop {r7}
- 800200c: 4770 bx lr
- 800200e: bf00 nop
- 8002010: e000ed00 .word 0xe000ed00
-
- 08002014 <__NVIC_SetPriority>:
- \param [in] IRQn Interrupt number.
- \param [in] priority Priority to set.
- \note The priority cannot be set for every processor exception.
- */
- __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
- {
- 8002014: b480 push {r7}
- 8002016: b083 sub sp, #12
- 8002018: af00 add r7, sp, #0
- 800201a: 4603 mov r3, r0
- 800201c: 6039 str r1, [r7, #0]
- 800201e: 71fb strb r3, [r7, #7]
- if ((int32_t)(IRQn) >= 0)
- 8002020: f997 3007 ldrsb.w r3, [r7, #7]
- 8002024: 2b00 cmp r3, #0
- 8002026: db0a blt.n 800203e <__NVIC_SetPriority+0x2a>
- {
- NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
- 8002028: 683b ldr r3, [r7, #0]
- 800202a: b2da uxtb r2, r3
- 800202c: 490c ldr r1, [pc, #48] ; (8002060 <__NVIC_SetPriority+0x4c>)
- 800202e: f997 3007 ldrsb.w r3, [r7, #7]
- 8002032: 0112 lsls r2, r2, #4
- 8002034: b2d2 uxtb r2, r2
- 8002036: 440b add r3, r1
- 8002038: f883 2300 strb.w r2, [r3, #768] ; 0x300
- }
- else
- {
- SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
- }
- }
- 800203c: e00a b.n 8002054 <__NVIC_SetPriority+0x40>
- SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
- 800203e: 683b ldr r3, [r7, #0]
- 8002040: b2da uxtb r2, r3
- 8002042: 4908 ldr r1, [pc, #32] ; (8002064 <__NVIC_SetPriority+0x50>)
- 8002044: 79fb ldrb r3, [r7, #7]
- 8002046: f003 030f and.w r3, r3, #15
- 800204a: 3b04 subs r3, #4
- 800204c: 0112 lsls r2, r2, #4
- 800204e: b2d2 uxtb r2, r2
- 8002050: 440b add r3, r1
- 8002052: 761a strb r2, [r3, #24]
- }
- 8002054: bf00 nop
- 8002056: 370c adds r7, #12
- 8002058: 46bd mov sp, r7
- 800205a: bc80 pop {r7}
- 800205c: 4770 bx lr
- 800205e: bf00 nop
- 8002060: e000e100 .word 0xe000e100
- 8002064: e000ed00 .word 0xe000ed00
-
- 08002068 <NVIC_EncodePriority>:
- \param [in] PreemptPriority Preemptive priority value (starting from 0).
- \param [in] SubPriority Subpriority value (starting from 0).
- \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
- */
- __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
- {
- 8002068: b480 push {r7}
- 800206a: b089 sub sp, #36 ; 0x24
- 800206c: af00 add r7, sp, #0
- 800206e: 60f8 str r0, [r7, #12]
- 8002070: 60b9 str r1, [r7, #8]
- 8002072: 607a str r2, [r7, #4]
- uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
- 8002074: 68fb ldr r3, [r7, #12]
- 8002076: f003 0307 and.w r3, r3, #7
- 800207a: 61fb str r3, [r7, #28]
- uint32_t PreemptPriorityBits;
- uint32_t SubPriorityBits;
-
- PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
- 800207c: 69fb ldr r3, [r7, #28]
- 800207e: f1c3 0307 rsb r3, r3, #7
- 8002082: 2b04 cmp r3, #4
- 8002084: bf28 it cs
- 8002086: 2304 movcs r3, #4
- 8002088: 61bb str r3, [r7, #24]
- SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
- 800208a: 69fb ldr r3, [r7, #28]
- 800208c: 3304 adds r3, #4
- 800208e: 2b06 cmp r3, #6
- 8002090: d902 bls.n 8002098 <NVIC_EncodePriority+0x30>
- 8002092: 69fb ldr r3, [r7, #28]
- 8002094: 3b03 subs r3, #3
- 8002096: e000 b.n 800209a <NVIC_EncodePriority+0x32>
- 8002098: 2300 movs r3, #0
- 800209a: 617b str r3, [r7, #20]
-
- return (
- ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
- 800209c: f04f 32ff mov.w r2, #4294967295
- 80020a0: 69bb ldr r3, [r7, #24]
- 80020a2: fa02 f303 lsl.w r3, r2, r3
- 80020a6: 43da mvns r2, r3
- 80020a8: 68bb ldr r3, [r7, #8]
- 80020aa: 401a ands r2, r3
- 80020ac: 697b ldr r3, [r7, #20]
- 80020ae: 409a lsls r2, r3
- ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
- 80020b0: f04f 31ff mov.w r1, #4294967295
- 80020b4: 697b ldr r3, [r7, #20]
- 80020b6: fa01 f303 lsl.w r3, r1, r3
- 80020ba: 43d9 mvns r1, r3
- 80020bc: 687b ldr r3, [r7, #4]
- 80020be: 400b ands r3, r1
- ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
- 80020c0: 4313 orrs r3, r2
- );
- }
- 80020c2: 4618 mov r0, r3
- 80020c4: 3724 adds r7, #36 ; 0x24
- 80020c6: 46bd mov sp, r7
- 80020c8: bc80 pop {r7}
- 80020ca: 4770 bx lr
-
- 080020cc <SysTick_Config>:
- \note When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
- function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
- must contain a vendor-specific implementation of this function.
- */
- __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
- {
- 80020cc: b580 push {r7, lr}
- 80020ce: b082 sub sp, #8
- 80020d0: af00 add r7, sp, #0
- 80020d2: 6078 str r0, [r7, #4]
- if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
- 80020d4: 687b ldr r3, [r7, #4]
- 80020d6: 3b01 subs r3, #1
- 80020d8: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000
- 80020dc: d301 bcc.n 80020e2 <SysTick_Config+0x16>
- {
- return (1UL); /* Reload value impossible */
- 80020de: 2301 movs r3, #1
- 80020e0: e00f b.n 8002102 <SysTick_Config+0x36>
- }
-
- SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
- 80020e2: 4a0a ldr r2, [pc, #40] ; (800210c <SysTick_Config+0x40>)
- 80020e4: 687b ldr r3, [r7, #4]
- 80020e6: 3b01 subs r3, #1
- 80020e8: 6053 str r3, [r2, #4]
- NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
- 80020ea: 210f movs r1, #15
- 80020ec: f04f 30ff mov.w r0, #4294967295
- 80020f0: f7ff ff90 bl 8002014 <__NVIC_SetPriority>
- SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
- 80020f4: 4b05 ldr r3, [pc, #20] ; (800210c <SysTick_Config+0x40>)
- 80020f6: 2200 movs r2, #0
- 80020f8: 609a str r2, [r3, #8]
- SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
- 80020fa: 4b04 ldr r3, [pc, #16] ; (800210c <SysTick_Config+0x40>)
- 80020fc: 2207 movs r2, #7
- 80020fe: 601a str r2, [r3, #0]
- SysTick_CTRL_TICKINT_Msk |
- SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
- return (0UL); /* Function successful */
- 8002100: 2300 movs r3, #0
- }
- 8002102: 4618 mov r0, r3
- 8002104: 3708 adds r7, #8
- 8002106: 46bd mov sp, r7
- 8002108: bd80 pop {r7, pc}
- 800210a: bf00 nop
- 800210c: e000e010 .word 0xe000e010
-
- 08002110 <HAL_NVIC_SetPriorityGrouping>:
- * @note When the NVIC_PriorityGroup_0 is selected, IRQ pre-emption is no more possible.
- * The pending IRQ priority will be managed only by the subpriority.
- * @retval None
- */
- void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
- {
- 8002110: b580 push {r7, lr}
- 8002112: b082 sub sp, #8
- 8002114: af00 add r7, sp, #0
- 8002116: 6078 str r0, [r7, #4]
- /* Check the parameters */
- assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup));
-
- /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
- NVIC_SetPriorityGrouping(PriorityGroup);
- 8002118: 6878 ldr r0, [r7, #4]
- 800211a: f7ff ff49 bl 8001fb0 <__NVIC_SetPriorityGrouping>
- }
- 800211e: bf00 nop
- 8002120: 3708 adds r7, #8
- 8002122: 46bd mov sp, r7
- 8002124: bd80 pop {r7, pc}
-
- 08002126 <HAL_NVIC_SetPriority>:
- * This parameter can be a value between 0 and 15
- * A lower priority value indicates a higher priority.
- * @retval None
- */
- void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
- {
- 8002126: b580 push {r7, lr}
- 8002128: b086 sub sp, #24
- 800212a: af00 add r7, sp, #0
- 800212c: 4603 mov r3, r0
- 800212e: 60b9 str r1, [r7, #8]
- 8002130: 607a str r2, [r7, #4]
- 8002132: 73fb strb r3, [r7, #15]
- uint32_t prioritygroup = 0x00;
- 8002134: 2300 movs r3, #0
- 8002136: 617b str r3, [r7, #20]
-
- /* Check the parameters */
- assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
- assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
-
- prioritygroup = NVIC_GetPriorityGrouping();
- 8002138: f7ff ff5e bl 8001ff8 <__NVIC_GetPriorityGrouping>
- 800213c: 6178 str r0, [r7, #20]
-
- NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
- 800213e: 687a ldr r2, [r7, #4]
- 8002140: 68b9 ldr r1, [r7, #8]
- 8002142: 6978 ldr r0, [r7, #20]
- 8002144: f7ff ff90 bl 8002068 <NVIC_EncodePriority>
- 8002148: 4602 mov r2, r0
- 800214a: f997 300f ldrsb.w r3, [r7, #15]
- 800214e: 4611 mov r1, r2
- 8002150: 4618 mov r0, r3
- 8002152: f7ff ff5f bl 8002014 <__NVIC_SetPriority>
- }
- 8002156: bf00 nop
- 8002158: 3718 adds r7, #24
- 800215a: 46bd mov sp, r7
- 800215c: bd80 pop {r7, pc}
-
- 0800215e <HAL_SYSTICK_Config>:
- * @param TicksNumb Specifies the ticks Number of ticks between two interrupts.
- * @retval status: - 0 Function succeeded.
- * - 1 Function failed.
- */
- uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
- {
- 800215e: b580 push {r7, lr}
- 8002160: b082 sub sp, #8
- 8002162: af00 add r7, sp, #0
- 8002164: 6078 str r0, [r7, #4]
- return SysTick_Config(TicksNumb);
- 8002166: 6878 ldr r0, [r7, #4]
- 8002168: f7ff ffb0 bl 80020cc <SysTick_Config>
- 800216c: 4603 mov r3, r0
- }
- 800216e: 4618 mov r0, r3
- 8002170: 3708 adds r7, #8
- 8002172: 46bd mov sp, r7
- 8002174: bd80 pop {r7, pc}
-
- 08002176 <HAL_SYSTICK_IRQHandler>:
- /**
- * @brief This function handles SYSTICK interrupt request.
- * @retval None
- */
- void HAL_SYSTICK_IRQHandler(void)
- {
- 8002176: b580 push {r7, lr}
- 8002178: af00 add r7, sp, #0
- HAL_SYSTICK_Callback();
- 800217a: f000 f802 bl 8002182 <HAL_SYSTICK_Callback>
- }
- 800217e: bf00 nop
- 8002180: bd80 pop {r7, pc}
-
- 08002182 <HAL_SYSTICK_Callback>:
- /**
- * @brief SYSTICK callback.
- * @retval None
- */
- __weak void HAL_SYSTICK_Callback(void)
- {
- 8002182: b480 push {r7}
- 8002184: af00 add r7, sp, #0
- /* NOTE : This function Should not be modified, when the callback is needed,
- the HAL_SYSTICK_Callback could be implemented in the user file
- */
- }
- 8002186: bf00 nop
- 8002188: 46bd mov sp, r7
- 800218a: bc80 pop {r7}
- 800218c: 4770 bx lr
- ...
-
- 08002190 <HAL_GPIO_Init>:
- * @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
- * the configuration information for the specified GPIO peripheral.
- * @retval None
- */
- void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
- {
- 8002190: b480 push {r7}
- 8002192: b087 sub sp, #28
- 8002194: af00 add r7, sp, #0
- 8002196: 6078 str r0, [r7, #4]
- 8002198: 6039 str r1, [r7, #0]
- uint32_t position = 0x00;
- 800219a: 2300 movs r3, #0
- 800219c: 617b str r3, [r7, #20]
- uint32_t iocurrent = 0x00;
- 800219e: 2300 movs r3, #0
- 80021a0: 60fb str r3, [r7, #12]
- uint32_t temp = 0x00;
- 80021a2: 2300 movs r3, #0
- 80021a4: 613b str r3, [r7, #16]
- assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
- assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
- assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
-
- /* Configure the port pins */
- while (((GPIO_Init->Pin) >> position) != 0)
- 80021a6: e160 b.n 800246a <HAL_GPIO_Init+0x2da>
- {
- /* Get current io position */
- iocurrent = (GPIO_Init->Pin) & (1U << position);
- 80021a8: 683b ldr r3, [r7, #0]
- 80021aa: 681a ldr r2, [r3, #0]
- 80021ac: 2101 movs r1, #1
- 80021ae: 697b ldr r3, [r7, #20]
- 80021b0: fa01 f303 lsl.w r3, r1, r3
- 80021b4: 4013 ands r3, r2
- 80021b6: 60fb str r3, [r7, #12]
-
- if (iocurrent)
- 80021b8: 68fb ldr r3, [r7, #12]
- 80021ba: 2b00 cmp r3, #0
- 80021bc: f000 8152 beq.w 8002464 <HAL_GPIO_Init+0x2d4>
- {
- /*--------------------- GPIO Mode Configuration ------------------------*/
- /* In case of Output or Alternate function mode selection */
- if ((GPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_PP) ||
- 80021c0: 683b ldr r3, [r7, #0]
- 80021c2: 685b ldr r3, [r3, #4]
- 80021c4: 2b01 cmp r3, #1
- 80021c6: d00b beq.n 80021e0 <HAL_GPIO_Init+0x50>
- 80021c8: 683b ldr r3, [r7, #0]
- 80021ca: 685b ldr r3, [r3, #4]
- 80021cc: 2b02 cmp r3, #2
- 80021ce: d007 beq.n 80021e0 <HAL_GPIO_Init+0x50>
- (GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
- 80021d0: 683b ldr r3, [r7, #0]
- 80021d2: 685b ldr r3, [r3, #4]
- if ((GPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_PP) ||
- 80021d4: 2b11 cmp r3, #17
- 80021d6: d003 beq.n 80021e0 <HAL_GPIO_Init+0x50>
- (GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
- 80021d8: 683b ldr r3, [r7, #0]
- 80021da: 685b ldr r3, [r3, #4]
- 80021dc: 2b12 cmp r3, #18
- 80021de: d130 bne.n 8002242 <HAL_GPIO_Init+0xb2>
- {
- /* Check the Speed parameter */
- assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
- /* Configure the IO Speed */
- temp = GPIOx->OSPEEDR;
- 80021e0: 687b ldr r3, [r7, #4]
- 80021e2: 689b ldr r3, [r3, #8]
- 80021e4: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
- 80021e6: 697b ldr r3, [r7, #20]
- 80021e8: 005b lsls r3, r3, #1
- 80021ea: 2203 movs r2, #3
- 80021ec: fa02 f303 lsl.w r3, r2, r3
- 80021f0: 43db mvns r3, r3
- 80021f2: 693a ldr r2, [r7, #16]
- 80021f4: 4013 ands r3, r2
- 80021f6: 613b str r3, [r7, #16]
- SET_BIT(temp, GPIO_Init->Speed << (position * 2));
- 80021f8: 683b ldr r3, [r7, #0]
- 80021fa: 68da ldr r2, [r3, #12]
- 80021fc: 697b ldr r3, [r7, #20]
- 80021fe: 005b lsls r3, r3, #1
- 8002200: fa02 f303 lsl.w r3, r2, r3
- 8002204: 693a ldr r2, [r7, #16]
- 8002206: 4313 orrs r3, r2
- 8002208: 613b str r3, [r7, #16]
- GPIOx->OSPEEDR = temp;
- 800220a: 687b ldr r3, [r7, #4]
- 800220c: 693a ldr r2, [r7, #16]
- 800220e: 609a str r2, [r3, #8]
-
- /* Configure the IO Output Type */
- temp = GPIOx->OTYPER;
- 8002210: 687b ldr r3, [r7, #4]
- 8002212: 685b ldr r3, [r3, #4]
- 8002214: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, GPIO_OTYPER_OT_0 << position) ;
- 8002216: 2201 movs r2, #1
- 8002218: 697b ldr r3, [r7, #20]
- 800221a: fa02 f303 lsl.w r3, r2, r3
- 800221e: 43db mvns r3, r3
- 8002220: 693a ldr r2, [r7, #16]
- 8002222: 4013 ands r3, r2
- 8002224: 613b str r3, [r7, #16]
- SET_BIT(temp, ((GPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4) << position);
- 8002226: 683b ldr r3, [r7, #0]
- 8002228: 685b ldr r3, [r3, #4]
- 800222a: 091b lsrs r3, r3, #4
- 800222c: f003 0201 and.w r2, r3, #1
- 8002230: 697b ldr r3, [r7, #20]
- 8002232: fa02 f303 lsl.w r3, r2, r3
- 8002236: 693a ldr r2, [r7, #16]
- 8002238: 4313 orrs r3, r2
- 800223a: 613b str r3, [r7, #16]
- GPIOx->OTYPER = temp;
- 800223c: 687b ldr r3, [r7, #4]
- 800223e: 693a ldr r2, [r7, #16]
- 8002240: 605a str r2, [r3, #4]
- }
-
- /* Activate the Pull-up or Pull down resistor for the current IO */
- temp = GPIOx->PUPDR;
- 8002242: 687b ldr r3, [r7, #4]
- 8002244: 68db ldr r3, [r3, #12]
- 8002246: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, GPIO_PUPDR_PUPDR0 << (position * 2));
- 8002248: 697b ldr r3, [r7, #20]
- 800224a: 005b lsls r3, r3, #1
- 800224c: 2203 movs r2, #3
- 800224e: fa02 f303 lsl.w r3, r2, r3
- 8002252: 43db mvns r3, r3
- 8002254: 693a ldr r2, [r7, #16]
- 8002256: 4013 ands r3, r2
- 8002258: 613b str r3, [r7, #16]
- SET_BIT(temp, (GPIO_Init->Pull) << (position * 2));
- 800225a: 683b ldr r3, [r7, #0]
- 800225c: 689a ldr r2, [r3, #8]
- 800225e: 697b ldr r3, [r7, #20]
- 8002260: 005b lsls r3, r3, #1
- 8002262: fa02 f303 lsl.w r3, r2, r3
- 8002266: 693a ldr r2, [r7, #16]
- 8002268: 4313 orrs r3, r2
- 800226a: 613b str r3, [r7, #16]
- GPIOx->PUPDR = temp;
- 800226c: 687b ldr r3, [r7, #4]
- 800226e: 693a ldr r2, [r7, #16]
- 8002270: 60da str r2, [r3, #12]
-
- /* In case of Alternate function mode selection */
- if ((GPIO_Init->Mode == GPIO_MODE_AF_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
- 8002272: 683b ldr r3, [r7, #0]
- 8002274: 685b ldr r3, [r3, #4]
- 8002276: 2b02 cmp r3, #2
- 8002278: d003 beq.n 8002282 <HAL_GPIO_Init+0xf2>
- 800227a: 683b ldr r3, [r7, #0]
- 800227c: 685b ldr r3, [r3, #4]
- 800227e: 2b12 cmp r3, #18
- 8002280: d123 bne.n 80022ca <HAL_GPIO_Init+0x13a>
- assert_param(IS_GPIO_AF_INSTANCE(GPIOx));
- assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
-
- /* Configure Alternate function mapped with the current IO */
- /* Identify AFRL or AFRH register based on IO position*/
- temp = GPIOx->AFR[position >> 3];
- 8002282: 697b ldr r3, [r7, #20]
- 8002284: 08da lsrs r2, r3, #3
- 8002286: 687b ldr r3, [r7, #4]
- 8002288: 3208 adds r2, #8
- 800228a: f853 3022 ldr.w r3, [r3, r2, lsl #2]
- 800228e: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, 0xFU << ((uint32_t)(position & 0x07U) * 4));
- 8002290: 697b ldr r3, [r7, #20]
- 8002292: f003 0307 and.w r3, r3, #7
- 8002296: 009b lsls r3, r3, #2
- 8002298: 220f movs r2, #15
- 800229a: fa02 f303 lsl.w r3, r2, r3
- 800229e: 43db mvns r3, r3
- 80022a0: 693a ldr r2, [r7, #16]
- 80022a2: 4013 ands r3, r2
- 80022a4: 613b str r3, [r7, #16]
- SET_BIT(temp, (uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & 0x07U) * 4));
- 80022a6: 683b ldr r3, [r7, #0]
- 80022a8: 691a ldr r2, [r3, #16]
- 80022aa: 697b ldr r3, [r7, #20]
- 80022ac: f003 0307 and.w r3, r3, #7
- 80022b0: 009b lsls r3, r3, #2
- 80022b2: fa02 f303 lsl.w r3, r2, r3
- 80022b6: 693a ldr r2, [r7, #16]
- 80022b8: 4313 orrs r3, r2
- 80022ba: 613b str r3, [r7, #16]
- GPIOx->AFR[position >> 3] = temp;
- 80022bc: 697b ldr r3, [r7, #20]
- 80022be: 08da lsrs r2, r3, #3
- 80022c0: 687b ldr r3, [r7, #4]
- 80022c2: 3208 adds r2, #8
- 80022c4: 6939 ldr r1, [r7, #16]
- 80022c6: f843 1022 str.w r1, [r3, r2, lsl #2]
- }
-
- /* Configure IO Direction mode (Input, Output, Alternate or Analog) */
- temp = GPIOx->MODER;
- 80022ca: 687b ldr r3, [r7, #4]
- 80022cc: 681b ldr r3, [r3, #0]
- 80022ce: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, GPIO_MODER_MODER0 << (position * 2));
- 80022d0: 697b ldr r3, [r7, #20]
- 80022d2: 005b lsls r3, r3, #1
- 80022d4: 2203 movs r2, #3
- 80022d6: fa02 f303 lsl.w r3, r2, r3
- 80022da: 43db mvns r3, r3
- 80022dc: 693a ldr r2, [r7, #16]
- 80022de: 4013 ands r3, r2
- 80022e0: 613b str r3, [r7, #16]
- SET_BIT(temp, (GPIO_Init->Mode & GPIO_MODE) << (position * 2));
- 80022e2: 683b ldr r3, [r7, #0]
- 80022e4: 685b ldr r3, [r3, #4]
- 80022e6: f003 0203 and.w r2, r3, #3
- 80022ea: 697b ldr r3, [r7, #20]
- 80022ec: 005b lsls r3, r3, #1
- 80022ee: fa02 f303 lsl.w r3, r2, r3
- 80022f2: 693a ldr r2, [r7, #16]
- 80022f4: 4313 orrs r3, r2
- 80022f6: 613b str r3, [r7, #16]
- GPIOx->MODER = temp;
- 80022f8: 687b ldr r3, [r7, #4]
- 80022fa: 693a ldr r2, [r7, #16]
- 80022fc: 601a str r2, [r3, #0]
-
- /*--------------------- EXTI Mode Configuration ------------------------*/
- /* Configure the External Interrupt or event for the current IO */
- if ((GPIO_Init->Mode & EXTI_MODE) == EXTI_MODE)
- 80022fe: 683b ldr r3, [r7, #0]
- 8002300: 685b ldr r3, [r3, #4]
- 8002302: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 8002306: 2b00 cmp r3, #0
- 8002308: f000 80ac beq.w 8002464 <HAL_GPIO_Init+0x2d4>
- {
- /* Enable SYSCFG Clock */
- __HAL_RCC_SYSCFG_CLK_ENABLE();
- 800230c: 4b5d ldr r3, [pc, #372] ; (8002484 <HAL_GPIO_Init+0x2f4>)
- 800230e: 6a1b ldr r3, [r3, #32]
- 8002310: 4a5c ldr r2, [pc, #368] ; (8002484 <HAL_GPIO_Init+0x2f4>)
- 8002312: f043 0301 orr.w r3, r3, #1
- 8002316: 6213 str r3, [r2, #32]
- 8002318: 4b5a ldr r3, [pc, #360] ; (8002484 <HAL_GPIO_Init+0x2f4>)
- 800231a: 6a1b ldr r3, [r3, #32]
- 800231c: f003 0301 and.w r3, r3, #1
- 8002320: 60bb str r3, [r7, #8]
- 8002322: 68bb ldr r3, [r7, #8]
-
- temp = SYSCFG->EXTICR[position >> 2];
- 8002324: 4a58 ldr r2, [pc, #352] ; (8002488 <HAL_GPIO_Init+0x2f8>)
- 8002326: 697b ldr r3, [r7, #20]
- 8002328: 089b lsrs r3, r3, #2
- 800232a: 3302 adds r3, #2
- 800232c: f852 3023 ldr.w r3, [r2, r3, lsl #2]
- 8002330: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, (0x0FU) << (4 * (position & 0x03)));
- 8002332: 697b ldr r3, [r7, #20]
- 8002334: f003 0303 and.w r3, r3, #3
- 8002338: 009b lsls r3, r3, #2
- 800233a: 220f movs r2, #15
- 800233c: fa02 f303 lsl.w r3, r2, r3
- 8002340: 43db mvns r3, r3
- 8002342: 693a ldr r2, [r7, #16]
- 8002344: 4013 ands r3, r2
- 8002346: 613b str r3, [r7, #16]
- SET_BIT(temp, (GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03)));
- 8002348: 687b ldr r3, [r7, #4]
- 800234a: 4a50 ldr r2, [pc, #320] ; (800248c <HAL_GPIO_Init+0x2fc>)
- 800234c: 4293 cmp r3, r2
- 800234e: d025 beq.n 800239c <HAL_GPIO_Init+0x20c>
- 8002350: 687b ldr r3, [r7, #4]
- 8002352: 4a4f ldr r2, [pc, #316] ; (8002490 <HAL_GPIO_Init+0x300>)
- 8002354: 4293 cmp r3, r2
- 8002356: d01f beq.n 8002398 <HAL_GPIO_Init+0x208>
- 8002358: 687b ldr r3, [r7, #4]
- 800235a: 4a4e ldr r2, [pc, #312] ; (8002494 <HAL_GPIO_Init+0x304>)
- 800235c: 4293 cmp r3, r2
- 800235e: d019 beq.n 8002394 <HAL_GPIO_Init+0x204>
- 8002360: 687b ldr r3, [r7, #4]
- 8002362: 4a4d ldr r2, [pc, #308] ; (8002498 <HAL_GPIO_Init+0x308>)
- 8002364: 4293 cmp r3, r2
- 8002366: d013 beq.n 8002390 <HAL_GPIO_Init+0x200>
- 8002368: 687b ldr r3, [r7, #4]
- 800236a: 4a4c ldr r2, [pc, #304] ; (800249c <HAL_GPIO_Init+0x30c>)
- 800236c: 4293 cmp r3, r2
- 800236e: d00d beq.n 800238c <HAL_GPIO_Init+0x1fc>
- 8002370: 687b ldr r3, [r7, #4]
- 8002372: 4a4b ldr r2, [pc, #300] ; (80024a0 <HAL_GPIO_Init+0x310>)
- 8002374: 4293 cmp r3, r2
- 8002376: d007 beq.n 8002388 <HAL_GPIO_Init+0x1f8>
- 8002378: 687b ldr r3, [r7, #4]
- 800237a: 4a4a ldr r2, [pc, #296] ; (80024a4 <HAL_GPIO_Init+0x314>)
- 800237c: 4293 cmp r3, r2
- 800237e: d101 bne.n 8002384 <HAL_GPIO_Init+0x1f4>
- 8002380: 2306 movs r3, #6
- 8002382: e00c b.n 800239e <HAL_GPIO_Init+0x20e>
- 8002384: 2307 movs r3, #7
- 8002386: e00a b.n 800239e <HAL_GPIO_Init+0x20e>
- 8002388: 2305 movs r3, #5
- 800238a: e008 b.n 800239e <HAL_GPIO_Init+0x20e>
- 800238c: 2304 movs r3, #4
- 800238e: e006 b.n 800239e <HAL_GPIO_Init+0x20e>
- 8002390: 2303 movs r3, #3
- 8002392: e004 b.n 800239e <HAL_GPIO_Init+0x20e>
- 8002394: 2302 movs r3, #2
- 8002396: e002 b.n 800239e <HAL_GPIO_Init+0x20e>
- 8002398: 2301 movs r3, #1
- 800239a: e000 b.n 800239e <HAL_GPIO_Init+0x20e>
- 800239c: 2300 movs r3, #0
- 800239e: 697a ldr r2, [r7, #20]
- 80023a0: f002 0203 and.w r2, r2, #3
- 80023a4: 0092 lsls r2, r2, #2
- 80023a6: 4093 lsls r3, r2
- 80023a8: 693a ldr r2, [r7, #16]
- 80023aa: 4313 orrs r3, r2
- 80023ac: 613b str r3, [r7, #16]
- SYSCFG->EXTICR[position >> 2] = temp;
- 80023ae: 4936 ldr r1, [pc, #216] ; (8002488 <HAL_GPIO_Init+0x2f8>)
- 80023b0: 697b ldr r3, [r7, #20]
- 80023b2: 089b lsrs r3, r3, #2
- 80023b4: 3302 adds r3, #2
- 80023b6: 693a ldr r2, [r7, #16]
- 80023b8: f841 2023 str.w r2, [r1, r3, lsl #2]
-
- /* Clear EXTI line configuration */
- temp = EXTI->IMR;
- 80023bc: 4b3a ldr r3, [pc, #232] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 80023be: 681b ldr r3, [r3, #0]
- 80023c0: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, (uint32_t)iocurrent);
- 80023c2: 68fb ldr r3, [r7, #12]
- 80023c4: 43db mvns r3, r3
- 80023c6: 693a ldr r2, [r7, #16]
- 80023c8: 4013 ands r3, r2
- 80023ca: 613b str r3, [r7, #16]
- if ((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
- 80023cc: 683b ldr r3, [r7, #0]
- 80023ce: 685b ldr r3, [r3, #4]
- 80023d0: f403 3380 and.w r3, r3, #65536 ; 0x10000
- 80023d4: 2b00 cmp r3, #0
- 80023d6: d003 beq.n 80023e0 <HAL_GPIO_Init+0x250>
- {
- SET_BIT(temp, iocurrent);
- 80023d8: 693a ldr r2, [r7, #16]
- 80023da: 68fb ldr r3, [r7, #12]
- 80023dc: 4313 orrs r3, r2
- 80023de: 613b str r3, [r7, #16]
- }
- EXTI->IMR = temp;
- 80023e0: 4a31 ldr r2, [pc, #196] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 80023e2: 693b ldr r3, [r7, #16]
- 80023e4: 6013 str r3, [r2, #0]
-
- temp = EXTI->EMR;
- 80023e6: 4b30 ldr r3, [pc, #192] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 80023e8: 685b ldr r3, [r3, #4]
- 80023ea: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, (uint32_t)iocurrent);
- 80023ec: 68fb ldr r3, [r7, #12]
- 80023ee: 43db mvns r3, r3
- 80023f0: 693a ldr r2, [r7, #16]
- 80023f2: 4013 ands r3, r2
- 80023f4: 613b str r3, [r7, #16]
- if ((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
- 80023f6: 683b ldr r3, [r7, #0]
- 80023f8: 685b ldr r3, [r3, #4]
- 80023fa: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 80023fe: 2b00 cmp r3, #0
- 8002400: d003 beq.n 800240a <HAL_GPIO_Init+0x27a>
- {
- SET_BIT(temp, iocurrent);
- 8002402: 693a ldr r2, [r7, #16]
- 8002404: 68fb ldr r3, [r7, #12]
- 8002406: 4313 orrs r3, r2
- 8002408: 613b str r3, [r7, #16]
- }
- EXTI->EMR = temp;
- 800240a: 4a27 ldr r2, [pc, #156] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 800240c: 693b ldr r3, [r7, #16]
- 800240e: 6053 str r3, [r2, #4]
-
- /* Clear Rising Falling edge configuration */
- temp = EXTI->RTSR;
- 8002410: 4b25 ldr r3, [pc, #148] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 8002412: 689b ldr r3, [r3, #8]
- 8002414: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, (uint32_t)iocurrent);
- 8002416: 68fb ldr r3, [r7, #12]
- 8002418: 43db mvns r3, r3
- 800241a: 693a ldr r2, [r7, #16]
- 800241c: 4013 ands r3, r2
- 800241e: 613b str r3, [r7, #16]
- if ((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
- 8002420: 683b ldr r3, [r7, #0]
- 8002422: 685b ldr r3, [r3, #4]
- 8002424: f403 1380 and.w r3, r3, #1048576 ; 0x100000
- 8002428: 2b00 cmp r3, #0
- 800242a: d003 beq.n 8002434 <HAL_GPIO_Init+0x2a4>
- {
- SET_BIT(temp, iocurrent);
- 800242c: 693a ldr r2, [r7, #16]
- 800242e: 68fb ldr r3, [r7, #12]
- 8002430: 4313 orrs r3, r2
- 8002432: 613b str r3, [r7, #16]
- }
- EXTI->RTSR = temp;
- 8002434: 4a1c ldr r2, [pc, #112] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 8002436: 693b ldr r3, [r7, #16]
- 8002438: 6093 str r3, [r2, #8]
-
- temp = EXTI->FTSR;
- 800243a: 4b1b ldr r3, [pc, #108] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 800243c: 68db ldr r3, [r3, #12]
- 800243e: 613b str r3, [r7, #16]
- CLEAR_BIT(temp, (uint32_t)iocurrent);
- 8002440: 68fb ldr r3, [r7, #12]
- 8002442: 43db mvns r3, r3
- 8002444: 693a ldr r2, [r7, #16]
- 8002446: 4013 ands r3, r2
- 8002448: 613b str r3, [r7, #16]
- if ((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
- 800244a: 683b ldr r3, [r7, #0]
- 800244c: 685b ldr r3, [r3, #4]
- 800244e: f403 1300 and.w r3, r3, #2097152 ; 0x200000
- 8002452: 2b00 cmp r3, #0
- 8002454: d003 beq.n 800245e <HAL_GPIO_Init+0x2ce>
- {
- SET_BIT(temp, iocurrent);
- 8002456: 693a ldr r2, [r7, #16]
- 8002458: 68fb ldr r3, [r7, #12]
- 800245a: 4313 orrs r3, r2
- 800245c: 613b str r3, [r7, #16]
- }
- EXTI->FTSR = temp;
- 800245e: 4a12 ldr r2, [pc, #72] ; (80024a8 <HAL_GPIO_Init+0x318>)
- 8002460: 693b ldr r3, [r7, #16]
- 8002462: 60d3 str r3, [r2, #12]
- }
- }
-
- position++;
- 8002464: 697b ldr r3, [r7, #20]
- 8002466: 3301 adds r3, #1
- 8002468: 617b str r3, [r7, #20]
- while (((GPIO_Init->Pin) >> position) != 0)
- 800246a: 683b ldr r3, [r7, #0]
- 800246c: 681a ldr r2, [r3, #0]
- 800246e: 697b ldr r3, [r7, #20]
- 8002470: fa22 f303 lsr.w r3, r2, r3
- 8002474: 2b00 cmp r3, #0
- 8002476: f47f ae97 bne.w 80021a8 <HAL_GPIO_Init+0x18>
- }
- }
- 800247a: bf00 nop
- 800247c: 371c adds r7, #28
- 800247e: 46bd mov sp, r7
- 8002480: bc80 pop {r7}
- 8002482: 4770 bx lr
- 8002484: 40023800 .word 0x40023800
- 8002488: 40010000 .word 0x40010000
- 800248c: 40020000 .word 0x40020000
- 8002490: 40020400 .word 0x40020400
- 8002494: 40020800 .word 0x40020800
- 8002498: 40020c00 .word 0x40020c00
- 800249c: 40021000 .word 0x40021000
- 80024a0: 40021400 .word 0x40021400
- 80024a4: 40021800 .word 0x40021800
- 80024a8: 40010400 .word 0x40010400
-
- 080024ac <HAL_GPIO_WritePin>:
- * @arg GPIO_PIN_RESET: to clear the port pin
- * @arg GPIO_PIN_SET: to set the port pin
- * @retval None
- */
- void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
- {
- 80024ac: b480 push {r7}
- 80024ae: b083 sub sp, #12
- 80024b0: af00 add r7, sp, #0
- 80024b2: 6078 str r0, [r7, #4]
- 80024b4: 460b mov r3, r1
- 80024b6: 807b strh r3, [r7, #2]
- 80024b8: 4613 mov r3, r2
- 80024ba: 707b strb r3, [r7, #1]
- /* Check the parameters */
- assert_param(IS_GPIO_PIN(GPIO_Pin));
- assert_param(IS_GPIO_PIN_ACTION(PinState));
-
- if (PinState != GPIO_PIN_RESET)
- 80024bc: 787b ldrb r3, [r7, #1]
- 80024be: 2b00 cmp r3, #0
- 80024c0: d003 beq.n 80024ca <HAL_GPIO_WritePin+0x1e>
- {
- GPIOx->BSRR = (uint32_t)GPIO_Pin;
- 80024c2: 887a ldrh r2, [r7, #2]
- 80024c4: 687b ldr r3, [r7, #4]
- 80024c6: 619a str r2, [r3, #24]
- }
- else
- {
- GPIOx->BSRR = (uint32_t)GPIO_Pin << 16 ;
- }
- }
- 80024c8: e003 b.n 80024d2 <HAL_GPIO_WritePin+0x26>
- GPIOx->BSRR = (uint32_t)GPIO_Pin << 16 ;
- 80024ca: 887b ldrh r3, [r7, #2]
- 80024cc: 041a lsls r2, r3, #16
- 80024ce: 687b ldr r3, [r7, #4]
- 80024d0: 619a str r2, [r3, #24]
- }
- 80024d2: bf00 nop
- 80024d4: 370c adds r7, #12
- 80024d6: 46bd mov sp, r7
- 80024d8: bc80 pop {r7}
- 80024da: 4770 bx lr
-
- 080024dc <HAL_RCC_OscConfig>:
- * supported by this macro. User should request a transition to HSE Off
- * first and then HSE On or HSE Bypass.
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
- {
- 80024dc: b580 push {r7, lr}
- 80024de: b088 sub sp, #32
- 80024e0: af00 add r7, sp, #0
- 80024e2: 6078 str r0, [r7, #4]
- uint32_t tickstart;
- HAL_StatusTypeDef status;
- uint32_t sysclk_source, pll_config;
-
- /* Check the parameters */
- if(RCC_OscInitStruct == NULL)
- 80024e4: 687b ldr r3, [r7, #4]
- 80024e6: 2b00 cmp r3, #0
- 80024e8: d101 bne.n 80024ee <HAL_RCC_OscConfig+0x12>
- {
- return HAL_ERROR;
- 80024ea: 2301 movs r3, #1
- 80024ec: e31d b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- }
-
- assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
-
- sysclk_source = __HAL_RCC_GET_SYSCLK_SOURCE();
- 80024ee: 4b94 ldr r3, [pc, #592] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80024f0: 689b ldr r3, [r3, #8]
- 80024f2: f003 030c and.w r3, r3, #12
- 80024f6: 61bb str r3, [r7, #24]
- pll_config = __HAL_RCC_GET_PLL_OSCSOURCE();
- 80024f8: 4b91 ldr r3, [pc, #580] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80024fa: 689b ldr r3, [r3, #8]
- 80024fc: f403 3380 and.w r3, r3, #65536 ; 0x10000
- 8002500: 617b str r3, [r7, #20]
-
- /*------------------------------- HSE Configuration ------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
- 8002502: 687b ldr r3, [r7, #4]
- 8002504: 681b ldr r3, [r3, #0]
- 8002506: f003 0301 and.w r3, r3, #1
- 800250a: 2b00 cmp r3, #0
- 800250c: d07b beq.n 8002606 <HAL_RCC_OscConfig+0x12a>
- {
- /* Check the parameters */
- assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
-
- /* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */
- if((sysclk_source == RCC_SYSCLKSOURCE_STATUS_HSE)
- 800250e: 69bb ldr r3, [r7, #24]
- 8002510: 2b08 cmp r3, #8
- 8002512: d006 beq.n 8002522 <HAL_RCC_OscConfig+0x46>
- || ((sysclk_source == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (pll_config == RCC_PLLSOURCE_HSE)))
- 8002514: 69bb ldr r3, [r7, #24]
- 8002516: 2b0c cmp r3, #12
- 8002518: d10f bne.n 800253a <HAL_RCC_OscConfig+0x5e>
- 800251a: 697b ldr r3, [r7, #20]
- 800251c: f5b3 3f80 cmp.w r3, #65536 ; 0x10000
- 8002520: d10b bne.n 800253a <HAL_RCC_OscConfig+0x5e>
- {
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
- 8002522: 4b87 ldr r3, [pc, #540] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002524: 681b ldr r3, [r3, #0]
- 8002526: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 800252a: 2b00 cmp r3, #0
- 800252c: d06a beq.n 8002604 <HAL_RCC_OscConfig+0x128>
- 800252e: 687b ldr r3, [r7, #4]
- 8002530: 685b ldr r3, [r3, #4]
- 8002532: 2b00 cmp r3, #0
- 8002534: d166 bne.n 8002604 <HAL_RCC_OscConfig+0x128>
- {
- return HAL_ERROR;
- 8002536: 2301 movs r3, #1
- 8002538: e2f7 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- }
- }
- else
- {
- /* Set the new HSE configuration ---------------------------------------*/
- __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
- 800253a: 687b ldr r3, [r7, #4]
- 800253c: 685b ldr r3, [r3, #4]
- 800253e: 2b01 cmp r3, #1
- 8002540: d106 bne.n 8002550 <HAL_RCC_OscConfig+0x74>
- 8002542: 4b7f ldr r3, [pc, #508] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002544: 681b ldr r3, [r3, #0]
- 8002546: 4a7e ldr r2, [pc, #504] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002548: f443 3380 orr.w r3, r3, #65536 ; 0x10000
- 800254c: 6013 str r3, [r2, #0]
- 800254e: e02d b.n 80025ac <HAL_RCC_OscConfig+0xd0>
- 8002550: 687b ldr r3, [r7, #4]
- 8002552: 685b ldr r3, [r3, #4]
- 8002554: 2b00 cmp r3, #0
- 8002556: d10c bne.n 8002572 <HAL_RCC_OscConfig+0x96>
- 8002558: 4b79 ldr r3, [pc, #484] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800255a: 681b ldr r3, [r3, #0]
- 800255c: 4a78 ldr r2, [pc, #480] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800255e: f423 3380 bic.w r3, r3, #65536 ; 0x10000
- 8002562: 6013 str r3, [r2, #0]
- 8002564: 4b76 ldr r3, [pc, #472] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002566: 681b ldr r3, [r3, #0]
- 8002568: 4a75 ldr r2, [pc, #468] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800256a: f423 2380 bic.w r3, r3, #262144 ; 0x40000
- 800256e: 6013 str r3, [r2, #0]
- 8002570: e01c b.n 80025ac <HAL_RCC_OscConfig+0xd0>
- 8002572: 687b ldr r3, [r7, #4]
- 8002574: 685b ldr r3, [r3, #4]
- 8002576: 2b05 cmp r3, #5
- 8002578: d10c bne.n 8002594 <HAL_RCC_OscConfig+0xb8>
- 800257a: 4b71 ldr r3, [pc, #452] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800257c: 681b ldr r3, [r3, #0]
- 800257e: 4a70 ldr r2, [pc, #448] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002580: f443 2380 orr.w r3, r3, #262144 ; 0x40000
- 8002584: 6013 str r3, [r2, #0]
- 8002586: 4b6e ldr r3, [pc, #440] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002588: 681b ldr r3, [r3, #0]
- 800258a: 4a6d ldr r2, [pc, #436] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800258c: f443 3380 orr.w r3, r3, #65536 ; 0x10000
- 8002590: 6013 str r3, [r2, #0]
- 8002592: e00b b.n 80025ac <HAL_RCC_OscConfig+0xd0>
- 8002594: 4b6a ldr r3, [pc, #424] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002596: 681b ldr r3, [r3, #0]
- 8002598: 4a69 ldr r2, [pc, #420] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800259a: f423 3380 bic.w r3, r3, #65536 ; 0x10000
- 800259e: 6013 str r3, [r2, #0]
- 80025a0: 4b67 ldr r3, [pc, #412] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80025a2: 681b ldr r3, [r3, #0]
- 80025a4: 4a66 ldr r2, [pc, #408] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80025a6: f423 2380 bic.w r3, r3, #262144 ; 0x40000
- 80025aa: 6013 str r3, [r2, #0]
-
- /* Check the HSE State */
- if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
- 80025ac: 687b ldr r3, [r7, #4]
- 80025ae: 685b ldr r3, [r3, #4]
- 80025b0: 2b00 cmp r3, #0
- 80025b2: d013 beq.n 80025dc <HAL_RCC_OscConfig+0x100>
- {
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 80025b4: f7ff f8d2 bl 800175c <HAL_GetTick>
- 80025b8: 6138 str r0, [r7, #16]
-
- /* Wait till HSE is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
- 80025ba: e008 b.n 80025ce <HAL_RCC_OscConfig+0xf2>
- {
- if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
- 80025bc: f7ff f8ce bl 800175c <HAL_GetTick>
- 80025c0: 4602 mov r2, r0
- 80025c2: 693b ldr r3, [r7, #16]
- 80025c4: 1ad3 subs r3, r2, r3
- 80025c6: 2b64 cmp r3, #100 ; 0x64
- 80025c8: d901 bls.n 80025ce <HAL_RCC_OscConfig+0xf2>
- {
- return HAL_TIMEOUT;
- 80025ca: 2303 movs r3, #3
- 80025cc: e2ad b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
- 80025ce: 4b5c ldr r3, [pc, #368] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80025d0: 681b ldr r3, [r3, #0]
- 80025d2: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 80025d6: 2b00 cmp r3, #0
- 80025d8: d0f0 beq.n 80025bc <HAL_RCC_OscConfig+0xe0>
- 80025da: e014 b.n 8002606 <HAL_RCC_OscConfig+0x12a>
- }
- }
- else
- {
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 80025dc: f7ff f8be bl 800175c <HAL_GetTick>
- 80025e0: 6138 str r0, [r7, #16]
-
- /* Wait till HSE is disabled */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U)
- 80025e2: e008 b.n 80025f6 <HAL_RCC_OscConfig+0x11a>
- {
- if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
- 80025e4: f7ff f8ba bl 800175c <HAL_GetTick>
- 80025e8: 4602 mov r2, r0
- 80025ea: 693b ldr r3, [r7, #16]
- 80025ec: 1ad3 subs r3, r2, r3
- 80025ee: 2b64 cmp r3, #100 ; 0x64
- 80025f0: d901 bls.n 80025f6 <HAL_RCC_OscConfig+0x11a>
- {
- return HAL_TIMEOUT;
- 80025f2: 2303 movs r3, #3
- 80025f4: e299 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U)
- 80025f6: 4b52 ldr r3, [pc, #328] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80025f8: 681b ldr r3, [r3, #0]
- 80025fa: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 80025fe: 2b00 cmp r3, #0
- 8002600: d1f0 bne.n 80025e4 <HAL_RCC_OscConfig+0x108>
- 8002602: e000 b.n 8002606 <HAL_RCC_OscConfig+0x12a>
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
- 8002604: bf00 nop
- }
- }
- }
- }
- /*----------------------------- HSI Configuration --------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
- 8002606: 687b ldr r3, [r7, #4]
- 8002608: 681b ldr r3, [r3, #0]
- 800260a: f003 0302 and.w r3, r3, #2
- 800260e: 2b00 cmp r3, #0
- 8002610: d05a beq.n 80026c8 <HAL_RCC_OscConfig+0x1ec>
- /* Check the parameters */
- assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
- assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
-
- /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
- if((sysclk_source == RCC_SYSCLKSOURCE_STATUS_HSI)
- 8002612: 69bb ldr r3, [r7, #24]
- 8002614: 2b04 cmp r3, #4
- 8002616: d005 beq.n 8002624 <HAL_RCC_OscConfig+0x148>
- || ((sysclk_source == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (pll_config == RCC_PLLSOURCE_HSI)))
- 8002618: 69bb ldr r3, [r7, #24]
- 800261a: 2b0c cmp r3, #12
- 800261c: d119 bne.n 8002652 <HAL_RCC_OscConfig+0x176>
- 800261e: 697b ldr r3, [r7, #20]
- 8002620: 2b00 cmp r3, #0
- 8002622: d116 bne.n 8002652 <HAL_RCC_OscConfig+0x176>
- {
- /* When HSI is used as system clock it will not disabled */
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
- 8002624: 4b46 ldr r3, [pc, #280] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002626: 681b ldr r3, [r3, #0]
- 8002628: f003 0302 and.w r3, r3, #2
- 800262c: 2b00 cmp r3, #0
- 800262e: d005 beq.n 800263c <HAL_RCC_OscConfig+0x160>
- 8002630: 687b ldr r3, [r7, #4]
- 8002632: 68db ldr r3, [r3, #12]
- 8002634: 2b01 cmp r3, #1
- 8002636: d001 beq.n 800263c <HAL_RCC_OscConfig+0x160>
- {
- return HAL_ERROR;
- 8002638: 2301 movs r3, #1
- 800263a: e276 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- }
- /* Otherwise, just the calibration is allowed */
- else
- {
- /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
- __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
- 800263c: 4b40 ldr r3, [pc, #256] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800263e: 685b ldr r3, [r3, #4]
- 8002640: f423 52f8 bic.w r2, r3, #7936 ; 0x1f00
- 8002644: 687b ldr r3, [r7, #4]
- 8002646: 691b ldr r3, [r3, #16]
- 8002648: 021b lsls r3, r3, #8
- 800264a: 493d ldr r1, [pc, #244] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800264c: 4313 orrs r3, r2
- 800264e: 604b str r3, [r1, #4]
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
- 8002650: e03a b.n 80026c8 <HAL_RCC_OscConfig+0x1ec>
- }
- }
- else
- {
- /* Check the HSI State */
- if(RCC_OscInitStruct->HSIState != RCC_HSI_OFF)
- 8002652: 687b ldr r3, [r7, #4]
- 8002654: 68db ldr r3, [r3, #12]
- 8002656: 2b00 cmp r3, #0
- 8002658: d020 beq.n 800269c <HAL_RCC_OscConfig+0x1c0>
- {
- /* Enable the Internal High Speed oscillator (HSI). */
- __HAL_RCC_HSI_ENABLE();
- 800265a: 4b3a ldr r3, [pc, #232] ; (8002744 <HAL_RCC_OscConfig+0x268>)
- 800265c: 2201 movs r2, #1
- 800265e: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 8002660: f7ff f87c bl 800175c <HAL_GetTick>
- 8002664: 6138 str r0, [r7, #16]
-
- /* Wait till HSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
- 8002666: e008 b.n 800267a <HAL_RCC_OscConfig+0x19e>
- {
- if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
- 8002668: f7ff f878 bl 800175c <HAL_GetTick>
- 800266c: 4602 mov r2, r0
- 800266e: 693b ldr r3, [r7, #16]
- 8002670: 1ad3 subs r3, r2, r3
- 8002672: 2b02 cmp r3, #2
- 8002674: d901 bls.n 800267a <HAL_RCC_OscConfig+0x19e>
- {
- return HAL_TIMEOUT;
- 8002676: 2303 movs r3, #3
- 8002678: e257 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
- 800267a: 4b31 ldr r3, [pc, #196] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800267c: 681b ldr r3, [r3, #0]
- 800267e: f003 0302 and.w r3, r3, #2
- 8002682: 2b00 cmp r3, #0
- 8002684: d0f0 beq.n 8002668 <HAL_RCC_OscConfig+0x18c>
- }
- }
-
- /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
- __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
- 8002686: 4b2e ldr r3, [pc, #184] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002688: 685b ldr r3, [r3, #4]
- 800268a: f423 52f8 bic.w r2, r3, #7936 ; 0x1f00
- 800268e: 687b ldr r3, [r7, #4]
- 8002690: 691b ldr r3, [r3, #16]
- 8002692: 021b lsls r3, r3, #8
- 8002694: 492a ldr r1, [pc, #168] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002696: 4313 orrs r3, r2
- 8002698: 604b str r3, [r1, #4]
- 800269a: e015 b.n 80026c8 <HAL_RCC_OscConfig+0x1ec>
- }
- else
- {
- /* Disable the Internal High Speed oscillator (HSI). */
- __HAL_RCC_HSI_DISABLE();
- 800269c: 4b29 ldr r3, [pc, #164] ; (8002744 <HAL_RCC_OscConfig+0x268>)
- 800269e: 2200 movs r2, #0
- 80026a0: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 80026a2: f7ff f85b bl 800175c <HAL_GetTick>
- 80026a6: 6138 str r0, [r7, #16]
-
- /* Wait till HSI is disabled */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U)
- 80026a8: e008 b.n 80026bc <HAL_RCC_OscConfig+0x1e0>
- {
- if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
- 80026aa: f7ff f857 bl 800175c <HAL_GetTick>
- 80026ae: 4602 mov r2, r0
- 80026b0: 693b ldr r3, [r7, #16]
- 80026b2: 1ad3 subs r3, r2, r3
- 80026b4: 2b02 cmp r3, #2
- 80026b6: d901 bls.n 80026bc <HAL_RCC_OscConfig+0x1e0>
- {
- return HAL_TIMEOUT;
- 80026b8: 2303 movs r3, #3
- 80026ba: e236 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U)
- 80026bc: 4b20 ldr r3, [pc, #128] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80026be: 681b ldr r3, [r3, #0]
- 80026c0: f003 0302 and.w r3, r3, #2
- 80026c4: 2b00 cmp r3, #0
- 80026c6: d1f0 bne.n 80026aa <HAL_RCC_OscConfig+0x1ce>
- }
- }
- }
- }
- /*----------------------------- MSI Configuration --------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_MSI) == RCC_OSCILLATORTYPE_MSI)
- 80026c8: 687b ldr r3, [r7, #4]
- 80026ca: 681b ldr r3, [r3, #0]
- 80026cc: f003 0310 and.w r3, r3, #16
- 80026d0: 2b00 cmp r3, #0
- 80026d2: f000 80b8 beq.w 8002846 <HAL_RCC_OscConfig+0x36a>
- {
- /* When the MSI is used as system clock it will not be disabled */
- if(sysclk_source == RCC_CFGR_SWS_MSI)
- 80026d6: 69bb ldr r3, [r7, #24]
- 80026d8: 2b00 cmp r3, #0
- 80026da: d170 bne.n 80027be <HAL_RCC_OscConfig+0x2e2>
- {
- if((__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) != 0U) && (RCC_OscInitStruct->MSIState == RCC_MSI_OFF))
- 80026dc: 4b18 ldr r3, [pc, #96] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80026de: 681b ldr r3, [r3, #0]
- 80026e0: f403 7300 and.w r3, r3, #512 ; 0x200
- 80026e4: 2b00 cmp r3, #0
- 80026e6: d005 beq.n 80026f4 <HAL_RCC_OscConfig+0x218>
- 80026e8: 687b ldr r3, [r7, #4]
- 80026ea: 699b ldr r3, [r3, #24]
- 80026ec: 2b00 cmp r3, #0
- 80026ee: d101 bne.n 80026f4 <HAL_RCC_OscConfig+0x218>
- {
- return HAL_ERROR;
- 80026f0: 2301 movs r3, #1
- 80026f2: e21a b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- assert_param(IS_RCC_MSI_CLOCK_RANGE(RCC_OscInitStruct->MSIClockRange));
-
- /* To correctly read data from FLASH memory, the number of wait states (LATENCY)
- must be correctly programmed according to the frequency of the CPU clock
- (HCLK) and the supply voltage of the device. */
- if(RCC_OscInitStruct->MSIClockRange > __HAL_RCC_GET_MSI_RANGE())
- 80026f4: 687b ldr r3, [r7, #4]
- 80026f6: 6a1a ldr r2, [r3, #32]
- 80026f8: 4b11 ldr r3, [pc, #68] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 80026fa: 685b ldr r3, [r3, #4]
- 80026fc: f403 4360 and.w r3, r3, #57344 ; 0xe000
- 8002700: 429a cmp r2, r3
- 8002702: d921 bls.n 8002748 <HAL_RCC_OscConfig+0x26c>
- {
- /* First increase number of wait states update if necessary */
- if(RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK)
- 8002704: 687b ldr r3, [r7, #4]
- 8002706: 6a1b ldr r3, [r3, #32]
- 8002708: 4618 mov r0, r3
- 800270a: f000 fc47 bl 8002f9c <RCC_SetFlashLatencyFromMSIRange>
- 800270e: 4603 mov r3, r0
- 8002710: 2b00 cmp r3, #0
- 8002712: d001 beq.n 8002718 <HAL_RCC_OscConfig+0x23c>
- {
- return HAL_ERROR;
- 8002714: 2301 movs r3, #1
- 8002716: e208 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- }
-
- /* Selects the Multiple Speed oscillator (MSI) clock range .*/
- __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
- 8002718: 4b09 ldr r3, [pc, #36] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800271a: 685b ldr r3, [r3, #4]
- 800271c: f423 4260 bic.w r2, r3, #57344 ; 0xe000
- 8002720: 687b ldr r3, [r7, #4]
- 8002722: 6a1b ldr r3, [r3, #32]
- 8002724: 4906 ldr r1, [pc, #24] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 8002726: 4313 orrs r3, r2
- 8002728: 604b str r3, [r1, #4]
- /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
- __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
- 800272a: 4b05 ldr r3, [pc, #20] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800272c: 685b ldr r3, [r3, #4]
- 800272e: f023 427f bic.w r2, r3, #4278190080 ; 0xff000000
- 8002732: 687b ldr r3, [r7, #4]
- 8002734: 69db ldr r3, [r3, #28]
- 8002736: 061b lsls r3, r3, #24
- 8002738: 4901 ldr r1, [pc, #4] ; (8002740 <HAL_RCC_OscConfig+0x264>)
- 800273a: 4313 orrs r3, r2
- 800273c: 604b str r3, [r1, #4]
- 800273e: e020 b.n 8002782 <HAL_RCC_OscConfig+0x2a6>
- 8002740: 40023800 .word 0x40023800
- 8002744: 42470000 .word 0x42470000
- }
- else
- {
- /* Else, keep current flash latency while decreasing applies */
- /* Selects the Multiple Speed oscillator (MSI) clock range .*/
- __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
- 8002748: 4ba4 ldr r3, [pc, #656] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800274a: 685b ldr r3, [r3, #4]
- 800274c: f423 4260 bic.w r2, r3, #57344 ; 0xe000
- 8002750: 687b ldr r3, [r7, #4]
- 8002752: 6a1b ldr r3, [r3, #32]
- 8002754: 49a1 ldr r1, [pc, #644] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002756: 4313 orrs r3, r2
- 8002758: 604b str r3, [r1, #4]
- /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
- __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
- 800275a: 4ba0 ldr r3, [pc, #640] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800275c: 685b ldr r3, [r3, #4]
- 800275e: f023 427f bic.w r2, r3, #4278190080 ; 0xff000000
- 8002762: 687b ldr r3, [r7, #4]
- 8002764: 69db ldr r3, [r3, #28]
- 8002766: 061b lsls r3, r3, #24
- 8002768: 499c ldr r1, [pc, #624] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800276a: 4313 orrs r3, r2
- 800276c: 604b str r3, [r1, #4]
-
- /* Decrease number of wait states update if necessary */
- if(RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK)
- 800276e: 687b ldr r3, [r7, #4]
- 8002770: 6a1b ldr r3, [r3, #32]
- 8002772: 4618 mov r0, r3
- 8002774: f000 fc12 bl 8002f9c <RCC_SetFlashLatencyFromMSIRange>
- 8002778: 4603 mov r3, r0
- 800277a: 2b00 cmp r3, #0
- 800277c: d001 beq.n 8002782 <HAL_RCC_OscConfig+0x2a6>
- {
- return HAL_ERROR;
- 800277e: 2301 movs r3, #1
- 8002780: e1d3 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- }
- }
-
- /* Update the SystemCoreClock global variable */
- SystemCoreClock = (32768U * (1UL << ((RCC_OscInitStruct->MSIClockRange >> RCC_ICSCR_MSIRANGE_Pos) + 1U)))
- 8002782: 687b ldr r3, [r7, #4]
- 8002784: 6a1b ldr r3, [r3, #32]
- 8002786: 0b5b lsrs r3, r3, #13
- 8002788: 3301 adds r3, #1
- 800278a: f44f 4200 mov.w r2, #32768 ; 0x8000
- 800278e: fa02 f303 lsl.w r3, r2, r3
- >> AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos)];
- 8002792: 4a92 ldr r2, [pc, #584] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002794: 6892 ldr r2, [r2, #8]
- 8002796: 0912 lsrs r2, r2, #4
- 8002798: f002 020f and.w r2, r2, #15
- 800279c: 4990 ldr r1, [pc, #576] ; (80029e0 <HAL_RCC_OscConfig+0x504>)
- 800279e: 5c8a ldrb r2, [r1, r2]
- 80027a0: 40d3 lsrs r3, r2
- SystemCoreClock = (32768U * (1UL << ((RCC_OscInitStruct->MSIClockRange >> RCC_ICSCR_MSIRANGE_Pos) + 1U)))
- 80027a2: 4a90 ldr r2, [pc, #576] ; (80029e4 <HAL_RCC_OscConfig+0x508>)
- 80027a4: 6013 str r3, [r2, #0]
-
- /* Configure the source of time base considering new system clocks settings*/
- status = HAL_InitTick(uwTickPrio);
- 80027a6: 4b90 ldr r3, [pc, #576] ; (80029e8 <HAL_RCC_OscConfig+0x50c>)
- 80027a8: 681b ldr r3, [r3, #0]
- 80027aa: 4618 mov r0, r3
- 80027ac: f7fe ff8a bl 80016c4 <HAL_InitTick>
- 80027b0: 4603 mov r3, r0
- 80027b2: 73fb strb r3, [r7, #15]
- if(status != HAL_OK)
- 80027b4: 7bfb ldrb r3, [r7, #15]
- 80027b6: 2b00 cmp r3, #0
- 80027b8: d045 beq.n 8002846 <HAL_RCC_OscConfig+0x36a>
- {
- return status;
- 80027ba: 7bfb ldrb r3, [r7, #15]
- 80027bc: e1b5 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- {
- /* Check MSI State */
- assert_param(IS_RCC_MSI(RCC_OscInitStruct->MSIState));
-
- /* Check the MSI State */
- if(RCC_OscInitStruct->MSIState != RCC_MSI_OFF)
- 80027be: 687b ldr r3, [r7, #4]
- 80027c0: 699b ldr r3, [r3, #24]
- 80027c2: 2b00 cmp r3, #0
- 80027c4: d029 beq.n 800281a <HAL_RCC_OscConfig+0x33e>
- {
- /* Enable the Multi Speed oscillator (MSI). */
- __HAL_RCC_MSI_ENABLE();
- 80027c6: 4b89 ldr r3, [pc, #548] ; (80029ec <HAL_RCC_OscConfig+0x510>)
- 80027c8: 2201 movs r2, #1
- 80027ca: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 80027cc: f7fe ffc6 bl 800175c <HAL_GetTick>
- 80027d0: 6138 str r0, [r7, #16]
-
- /* Wait till MSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) == 0U)
- 80027d2: e008 b.n 80027e6 <HAL_RCC_OscConfig+0x30a>
- {
- if((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE)
- 80027d4: f7fe ffc2 bl 800175c <HAL_GetTick>
- 80027d8: 4602 mov r2, r0
- 80027da: 693b ldr r3, [r7, #16]
- 80027dc: 1ad3 subs r3, r2, r3
- 80027de: 2b02 cmp r3, #2
- 80027e0: d901 bls.n 80027e6 <HAL_RCC_OscConfig+0x30a>
- {
- return HAL_TIMEOUT;
- 80027e2: 2303 movs r3, #3
- 80027e4: e1a1 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) == 0U)
- 80027e6: 4b7d ldr r3, [pc, #500] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80027e8: 681b ldr r3, [r3, #0]
- 80027ea: f403 7300 and.w r3, r3, #512 ; 0x200
- 80027ee: 2b00 cmp r3, #0
- 80027f0: d0f0 beq.n 80027d4 <HAL_RCC_OscConfig+0x2f8>
- /* Check MSICalibrationValue and MSIClockRange input parameters */
- assert_param(IS_RCC_MSICALIBRATION_VALUE(RCC_OscInitStruct->MSICalibrationValue));
- assert_param(IS_RCC_MSI_CLOCK_RANGE(RCC_OscInitStruct->MSIClockRange));
-
- /* Selects the Multiple Speed oscillator (MSI) clock range .*/
- __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange);
- 80027f2: 4b7a ldr r3, [pc, #488] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80027f4: 685b ldr r3, [r3, #4]
- 80027f6: f423 4260 bic.w r2, r3, #57344 ; 0xe000
- 80027fa: 687b ldr r3, [r7, #4]
- 80027fc: 6a1b ldr r3, [r3, #32]
- 80027fe: 4977 ldr r1, [pc, #476] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002800: 4313 orrs r3, r2
- 8002802: 604b str r3, [r1, #4]
- /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/
- __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue);
- 8002804: 4b75 ldr r3, [pc, #468] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002806: 685b ldr r3, [r3, #4]
- 8002808: f023 427f bic.w r2, r3, #4278190080 ; 0xff000000
- 800280c: 687b ldr r3, [r7, #4]
- 800280e: 69db ldr r3, [r3, #28]
- 8002810: 061b lsls r3, r3, #24
- 8002812: 4972 ldr r1, [pc, #456] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002814: 4313 orrs r3, r2
- 8002816: 604b str r3, [r1, #4]
- 8002818: e015 b.n 8002846 <HAL_RCC_OscConfig+0x36a>
-
- }
- else
- {
- /* Disable the Multi Speed oscillator (MSI). */
- __HAL_RCC_MSI_DISABLE();
- 800281a: 4b74 ldr r3, [pc, #464] ; (80029ec <HAL_RCC_OscConfig+0x510>)
- 800281c: 2200 movs r2, #0
- 800281e: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 8002820: f7fe ff9c bl 800175c <HAL_GetTick>
- 8002824: 6138 str r0, [r7, #16]
-
- /* Wait till MSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) != 0U)
- 8002826: e008 b.n 800283a <HAL_RCC_OscConfig+0x35e>
- {
- if((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE)
- 8002828: f7fe ff98 bl 800175c <HAL_GetTick>
- 800282c: 4602 mov r2, r0
- 800282e: 693b ldr r3, [r7, #16]
- 8002830: 1ad3 subs r3, r2, r3
- 8002832: 2b02 cmp r3, #2
- 8002834: d901 bls.n 800283a <HAL_RCC_OscConfig+0x35e>
- {
- return HAL_TIMEOUT;
- 8002836: 2303 movs r3, #3
- 8002838: e177 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) != 0U)
- 800283a: 4b68 ldr r3, [pc, #416] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800283c: 681b ldr r3, [r3, #0]
- 800283e: f403 7300 and.w r3, r3, #512 ; 0x200
- 8002842: 2b00 cmp r3, #0
- 8002844: d1f0 bne.n 8002828 <HAL_RCC_OscConfig+0x34c>
- }
- }
- }
- }
- /*------------------------------ LSI Configuration -------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
- 8002846: 687b ldr r3, [r7, #4]
- 8002848: 681b ldr r3, [r3, #0]
- 800284a: f003 0308 and.w r3, r3, #8
- 800284e: 2b00 cmp r3, #0
- 8002850: d030 beq.n 80028b4 <HAL_RCC_OscConfig+0x3d8>
- {
- /* Check the parameters */
- assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
-
- /* Check the LSI State */
- if(RCC_OscInitStruct->LSIState != RCC_LSI_OFF)
- 8002852: 687b ldr r3, [r7, #4]
- 8002854: 695b ldr r3, [r3, #20]
- 8002856: 2b00 cmp r3, #0
- 8002858: d016 beq.n 8002888 <HAL_RCC_OscConfig+0x3ac>
- {
- /* Enable the Internal Low Speed oscillator (LSI). */
- __HAL_RCC_LSI_ENABLE();
- 800285a: 4b65 ldr r3, [pc, #404] ; (80029f0 <HAL_RCC_OscConfig+0x514>)
- 800285c: 2201 movs r2, #1
- 800285e: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 8002860: f7fe ff7c bl 800175c <HAL_GetTick>
- 8002864: 6138 str r0, [r7, #16]
-
- /* Wait till LSI is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U)
- 8002866: e008 b.n 800287a <HAL_RCC_OscConfig+0x39e>
- {
- if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
- 8002868: f7fe ff78 bl 800175c <HAL_GetTick>
- 800286c: 4602 mov r2, r0
- 800286e: 693b ldr r3, [r7, #16]
- 8002870: 1ad3 subs r3, r2, r3
- 8002872: 2b02 cmp r3, #2
- 8002874: d901 bls.n 800287a <HAL_RCC_OscConfig+0x39e>
- {
- return HAL_TIMEOUT;
- 8002876: 2303 movs r3, #3
- 8002878: e157 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U)
- 800287a: 4b58 ldr r3, [pc, #352] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800287c: 6b5b ldr r3, [r3, #52] ; 0x34
- 800287e: f003 0302 and.w r3, r3, #2
- 8002882: 2b00 cmp r3, #0
- 8002884: d0f0 beq.n 8002868 <HAL_RCC_OscConfig+0x38c>
- 8002886: e015 b.n 80028b4 <HAL_RCC_OscConfig+0x3d8>
- }
- }
- else
- {
- /* Disable the Internal Low Speed oscillator (LSI). */
- __HAL_RCC_LSI_DISABLE();
- 8002888: 4b59 ldr r3, [pc, #356] ; (80029f0 <HAL_RCC_OscConfig+0x514>)
- 800288a: 2200 movs r2, #0
- 800288c: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 800288e: f7fe ff65 bl 800175c <HAL_GetTick>
- 8002892: 6138 str r0, [r7, #16]
-
- /* Wait till LSI is disabled */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U)
- 8002894: e008 b.n 80028a8 <HAL_RCC_OscConfig+0x3cc>
- {
- if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
- 8002896: f7fe ff61 bl 800175c <HAL_GetTick>
- 800289a: 4602 mov r2, r0
- 800289c: 693b ldr r3, [r7, #16]
- 800289e: 1ad3 subs r3, r2, r3
- 80028a0: 2b02 cmp r3, #2
- 80028a2: d901 bls.n 80028a8 <HAL_RCC_OscConfig+0x3cc>
- {
- return HAL_TIMEOUT;
- 80028a4: 2303 movs r3, #3
- 80028a6: e140 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U)
- 80028a8: 4b4c ldr r3, [pc, #304] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80028aa: 6b5b ldr r3, [r3, #52] ; 0x34
- 80028ac: f003 0302 and.w r3, r3, #2
- 80028b0: 2b00 cmp r3, #0
- 80028b2: d1f0 bne.n 8002896 <HAL_RCC_OscConfig+0x3ba>
- }
- }
- }
- }
- /*------------------------------ LSE Configuration -------------------------*/
- if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
- 80028b4: 687b ldr r3, [r7, #4]
- 80028b6: 681b ldr r3, [r3, #0]
- 80028b8: f003 0304 and.w r3, r3, #4
- 80028bc: 2b00 cmp r3, #0
- 80028be: f000 80b5 beq.w 8002a2c <HAL_RCC_OscConfig+0x550>
- {
- FlagStatus pwrclkchanged = RESET;
- 80028c2: 2300 movs r3, #0
- 80028c4: 77fb strb r3, [r7, #31]
- /* Check the parameters */
- assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState));
-
- /* Update LSE configuration in Backup Domain control register */
- /* Requires to enable write access to Backup Domain of necessary */
- if(__HAL_RCC_PWR_IS_CLK_DISABLED())
- 80028c6: 4b45 ldr r3, [pc, #276] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80028c8: 6a5b ldr r3, [r3, #36] ; 0x24
- 80028ca: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 80028ce: 2b00 cmp r3, #0
- 80028d0: d10d bne.n 80028ee <HAL_RCC_OscConfig+0x412>
- {
- __HAL_RCC_PWR_CLK_ENABLE();
- 80028d2: 4b42 ldr r3, [pc, #264] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80028d4: 6a5b ldr r3, [r3, #36] ; 0x24
- 80028d6: 4a41 ldr r2, [pc, #260] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80028d8: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
- 80028dc: 6253 str r3, [r2, #36] ; 0x24
- 80028de: 4b3f ldr r3, [pc, #252] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80028e0: 6a5b ldr r3, [r3, #36] ; 0x24
- 80028e2: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 80028e6: 60bb str r3, [r7, #8]
- 80028e8: 68bb ldr r3, [r7, #8]
- pwrclkchanged = SET;
- 80028ea: 2301 movs r3, #1
- 80028ec: 77fb strb r3, [r7, #31]
- }
-
- if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
- 80028ee: 4b41 ldr r3, [pc, #260] ; (80029f4 <HAL_RCC_OscConfig+0x518>)
- 80028f0: 681b ldr r3, [r3, #0]
- 80028f2: f403 7380 and.w r3, r3, #256 ; 0x100
- 80028f6: 2b00 cmp r3, #0
- 80028f8: d118 bne.n 800292c <HAL_RCC_OscConfig+0x450>
- {
- /* Enable write access to Backup domain */
- SET_BIT(PWR->CR, PWR_CR_DBP);
- 80028fa: 4b3e ldr r3, [pc, #248] ; (80029f4 <HAL_RCC_OscConfig+0x518>)
- 80028fc: 681b ldr r3, [r3, #0]
- 80028fe: 4a3d ldr r2, [pc, #244] ; (80029f4 <HAL_RCC_OscConfig+0x518>)
- 8002900: f443 7380 orr.w r3, r3, #256 ; 0x100
- 8002904: 6013 str r3, [r2, #0]
-
- /* Wait for Backup domain Write protection disable */
- tickstart = HAL_GetTick();
- 8002906: f7fe ff29 bl 800175c <HAL_GetTick>
- 800290a: 6138 str r0, [r7, #16]
-
- while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
- 800290c: e008 b.n 8002920 <HAL_RCC_OscConfig+0x444>
- {
- if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE)
- 800290e: f7fe ff25 bl 800175c <HAL_GetTick>
- 8002912: 4602 mov r2, r0
- 8002914: 693b ldr r3, [r7, #16]
- 8002916: 1ad3 subs r3, r2, r3
- 8002918: 2b64 cmp r3, #100 ; 0x64
- 800291a: d901 bls.n 8002920 <HAL_RCC_OscConfig+0x444>
- {
- return HAL_TIMEOUT;
- 800291c: 2303 movs r3, #3
- 800291e: e104 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP))
- 8002920: 4b34 ldr r3, [pc, #208] ; (80029f4 <HAL_RCC_OscConfig+0x518>)
- 8002922: 681b ldr r3, [r3, #0]
- 8002924: f403 7380 and.w r3, r3, #256 ; 0x100
- 8002928: 2b00 cmp r3, #0
- 800292a: d0f0 beq.n 800290e <HAL_RCC_OscConfig+0x432>
- }
- }
- }
-
- /* Set the new LSE configuration -----------------------------------------*/
- __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
- 800292c: 687b ldr r3, [r7, #4]
- 800292e: 689b ldr r3, [r3, #8]
- 8002930: 2b01 cmp r3, #1
- 8002932: d106 bne.n 8002942 <HAL_RCC_OscConfig+0x466>
- 8002934: 4b29 ldr r3, [pc, #164] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002936: 6b5b ldr r3, [r3, #52] ; 0x34
- 8002938: 4a28 ldr r2, [pc, #160] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800293a: f443 7380 orr.w r3, r3, #256 ; 0x100
- 800293e: 6353 str r3, [r2, #52] ; 0x34
- 8002940: e02d b.n 800299e <HAL_RCC_OscConfig+0x4c2>
- 8002942: 687b ldr r3, [r7, #4]
- 8002944: 689b ldr r3, [r3, #8]
- 8002946: 2b00 cmp r3, #0
- 8002948: d10c bne.n 8002964 <HAL_RCC_OscConfig+0x488>
- 800294a: 4b24 ldr r3, [pc, #144] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800294c: 6b5b ldr r3, [r3, #52] ; 0x34
- 800294e: 4a23 ldr r2, [pc, #140] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002950: f423 7380 bic.w r3, r3, #256 ; 0x100
- 8002954: 6353 str r3, [r2, #52] ; 0x34
- 8002956: 4b21 ldr r3, [pc, #132] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002958: 6b5b ldr r3, [r3, #52] ; 0x34
- 800295a: 4a20 ldr r2, [pc, #128] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800295c: f423 6380 bic.w r3, r3, #1024 ; 0x400
- 8002960: 6353 str r3, [r2, #52] ; 0x34
- 8002962: e01c b.n 800299e <HAL_RCC_OscConfig+0x4c2>
- 8002964: 687b ldr r3, [r7, #4]
- 8002966: 689b ldr r3, [r3, #8]
- 8002968: 2b05 cmp r3, #5
- 800296a: d10c bne.n 8002986 <HAL_RCC_OscConfig+0x4aa>
- 800296c: 4b1b ldr r3, [pc, #108] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800296e: 6b5b ldr r3, [r3, #52] ; 0x34
- 8002970: 4a1a ldr r2, [pc, #104] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002972: f443 6380 orr.w r3, r3, #1024 ; 0x400
- 8002976: 6353 str r3, [r2, #52] ; 0x34
- 8002978: 4b18 ldr r3, [pc, #96] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800297a: 6b5b ldr r3, [r3, #52] ; 0x34
- 800297c: 4a17 ldr r2, [pc, #92] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800297e: f443 7380 orr.w r3, r3, #256 ; 0x100
- 8002982: 6353 str r3, [r2, #52] ; 0x34
- 8002984: e00b b.n 800299e <HAL_RCC_OscConfig+0x4c2>
- 8002986: 4b15 ldr r3, [pc, #84] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002988: 6b5b ldr r3, [r3, #52] ; 0x34
- 800298a: 4a14 ldr r2, [pc, #80] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 800298c: f423 7380 bic.w r3, r3, #256 ; 0x100
- 8002990: 6353 str r3, [r2, #52] ; 0x34
- 8002992: 4b12 ldr r3, [pc, #72] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002994: 6b5b ldr r3, [r3, #52] ; 0x34
- 8002996: 4a11 ldr r2, [pc, #68] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 8002998: f423 6380 bic.w r3, r3, #1024 ; 0x400
- 800299c: 6353 str r3, [r2, #52] ; 0x34
- /* Check the LSE State */
- if(RCC_OscInitStruct->LSEState != RCC_LSE_OFF)
- 800299e: 687b ldr r3, [r7, #4]
- 80029a0: 689b ldr r3, [r3, #8]
- 80029a2: 2b00 cmp r3, #0
- 80029a4: d015 beq.n 80029d2 <HAL_RCC_OscConfig+0x4f6>
- {
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 80029a6: f7fe fed9 bl 800175c <HAL_GetTick>
- 80029aa: 6138 str r0, [r7, #16]
-
- /* Wait till LSE is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U)
- 80029ac: e00a b.n 80029c4 <HAL_RCC_OscConfig+0x4e8>
- {
- if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
- 80029ae: f7fe fed5 bl 800175c <HAL_GetTick>
- 80029b2: 4602 mov r2, r0
- 80029b4: 693b ldr r3, [r7, #16]
- 80029b6: 1ad3 subs r3, r2, r3
- 80029b8: f241 3288 movw r2, #5000 ; 0x1388
- 80029bc: 4293 cmp r3, r2
- 80029be: d901 bls.n 80029c4 <HAL_RCC_OscConfig+0x4e8>
- {
- return HAL_TIMEOUT;
- 80029c0: 2303 movs r3, #3
- 80029c2: e0b2 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U)
- 80029c4: 4b05 ldr r3, [pc, #20] ; (80029dc <HAL_RCC_OscConfig+0x500>)
- 80029c6: 6b5b ldr r3, [r3, #52] ; 0x34
- 80029c8: f403 7300 and.w r3, r3, #512 ; 0x200
- 80029cc: 2b00 cmp r3, #0
- 80029ce: d0ee beq.n 80029ae <HAL_RCC_OscConfig+0x4d2>
- 80029d0: e023 b.n 8002a1a <HAL_RCC_OscConfig+0x53e>
- }
- }
- else
- {
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 80029d2: f7fe fec3 bl 800175c <HAL_GetTick>
- 80029d6: 6138 str r0, [r7, #16]
-
- /* Wait till LSE is disabled */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U)
- 80029d8: e019 b.n 8002a0e <HAL_RCC_OscConfig+0x532>
- 80029da: bf00 nop
- 80029dc: 40023800 .word 0x40023800
- 80029e0: 08007b6c .word 0x08007b6c
- 80029e4: 20000004 .word 0x20000004
- 80029e8: 20000008 .word 0x20000008
- 80029ec: 42470020 .word 0x42470020
- 80029f0: 42470680 .word 0x42470680
- 80029f4: 40007000 .word 0x40007000
- {
- if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
- 80029f8: f7fe feb0 bl 800175c <HAL_GetTick>
- 80029fc: 4602 mov r2, r0
- 80029fe: 693b ldr r3, [r7, #16]
- 8002a00: 1ad3 subs r3, r2, r3
- 8002a02: f241 3288 movw r2, #5000 ; 0x1388
- 8002a06: 4293 cmp r3, r2
- 8002a08: d901 bls.n 8002a0e <HAL_RCC_OscConfig+0x532>
- {
- return HAL_TIMEOUT;
- 8002a0a: 2303 movs r3, #3
- 8002a0c: e08d b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U)
- 8002a0e: 4b49 ldr r3, [pc, #292] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002a10: 6b5b ldr r3, [r3, #52] ; 0x34
- 8002a12: f403 7300 and.w r3, r3, #512 ; 0x200
- 8002a16: 2b00 cmp r3, #0
- 8002a18: d1ee bne.n 80029f8 <HAL_RCC_OscConfig+0x51c>
- }
- }
- }
-
- /* Require to disable power clock if necessary */
- if(pwrclkchanged == SET)
- 8002a1a: 7ffb ldrb r3, [r7, #31]
- 8002a1c: 2b01 cmp r3, #1
- 8002a1e: d105 bne.n 8002a2c <HAL_RCC_OscConfig+0x550>
- {
- __HAL_RCC_PWR_CLK_DISABLE();
- 8002a20: 4b44 ldr r3, [pc, #272] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002a22: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002a24: 4a43 ldr r2, [pc, #268] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002a26: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
- 8002a2a: 6253 str r3, [r2, #36] ; 0x24
- }
-
- /*-------------------------------- PLL Configuration -----------------------*/
- /* Check the parameters */
- assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
- if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
- 8002a2c: 687b ldr r3, [r7, #4]
- 8002a2e: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002a30: 2b00 cmp r3, #0
- 8002a32: d079 beq.n 8002b28 <HAL_RCC_OscConfig+0x64c>
- {
- /* Check if the PLL is used as system clock or not */
- if(sysclk_source != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
- 8002a34: 69bb ldr r3, [r7, #24]
- 8002a36: 2b0c cmp r3, #12
- 8002a38: d056 beq.n 8002ae8 <HAL_RCC_OscConfig+0x60c>
- {
- if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
- 8002a3a: 687b ldr r3, [r7, #4]
- 8002a3c: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002a3e: 2b02 cmp r3, #2
- 8002a40: d13b bne.n 8002aba <HAL_RCC_OscConfig+0x5de>
- assert_param(IS_RCC_PLLSOURCE(RCC_OscInitStruct->PLL.PLLSource));
- assert_param(IS_RCC_PLL_MUL(RCC_OscInitStruct->PLL.PLLMUL));
- assert_param(IS_RCC_PLL_DIV(RCC_OscInitStruct->PLL.PLLDIV));
-
- /* Disable the main PLL. */
- __HAL_RCC_PLL_DISABLE();
- 8002a42: 4b3d ldr r3, [pc, #244] ; (8002b38 <HAL_RCC_OscConfig+0x65c>)
- 8002a44: 2200 movs r2, #0
- 8002a46: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 8002a48: f7fe fe88 bl 800175c <HAL_GetTick>
- 8002a4c: 6138 str r0, [r7, #16]
-
- /* Wait till PLL is disabled */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
- 8002a4e: e008 b.n 8002a62 <HAL_RCC_OscConfig+0x586>
- {
- if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
- 8002a50: f7fe fe84 bl 800175c <HAL_GetTick>
- 8002a54: 4602 mov r2, r0
- 8002a56: 693b ldr r3, [r7, #16]
- 8002a58: 1ad3 subs r3, r2, r3
- 8002a5a: 2b02 cmp r3, #2
- 8002a5c: d901 bls.n 8002a62 <HAL_RCC_OscConfig+0x586>
- {
- return HAL_TIMEOUT;
- 8002a5e: 2303 movs r3, #3
- 8002a60: e063 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
- 8002a62: 4b34 ldr r3, [pc, #208] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002a64: 681b ldr r3, [r3, #0]
- 8002a66: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
- 8002a6a: 2b00 cmp r3, #0
- 8002a6c: d1f0 bne.n 8002a50 <HAL_RCC_OscConfig+0x574>
- }
- }
-
- /* Configure the main PLL clock source, multiplication and division factors. */
- __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
- 8002a6e: 4b31 ldr r3, [pc, #196] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002a70: 689b ldr r3, [r3, #8]
- 8002a72: f423 027d bic.w r2, r3, #16580608 ; 0xfd0000
- 8002a76: 687b ldr r3, [r7, #4]
- 8002a78: 6a99 ldr r1, [r3, #40] ; 0x28
- 8002a7a: 687b ldr r3, [r7, #4]
- 8002a7c: 6adb ldr r3, [r3, #44] ; 0x2c
- 8002a7e: 4319 orrs r1, r3
- 8002a80: 687b ldr r3, [r7, #4]
- 8002a82: 6b1b ldr r3, [r3, #48] ; 0x30
- 8002a84: 430b orrs r3, r1
- 8002a86: 492b ldr r1, [pc, #172] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002a88: 4313 orrs r3, r2
- 8002a8a: 608b str r3, [r1, #8]
- RCC_OscInitStruct->PLL.PLLMUL,
- RCC_OscInitStruct->PLL.PLLDIV);
- /* Enable the main PLL. */
- __HAL_RCC_PLL_ENABLE();
- 8002a8c: 4b2a ldr r3, [pc, #168] ; (8002b38 <HAL_RCC_OscConfig+0x65c>)
- 8002a8e: 2201 movs r2, #1
- 8002a90: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 8002a92: f7fe fe63 bl 800175c <HAL_GetTick>
- 8002a96: 6138 str r0, [r7, #16]
-
- /* Wait till PLL is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
- 8002a98: e008 b.n 8002aac <HAL_RCC_OscConfig+0x5d0>
- {
- if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
- 8002a9a: f7fe fe5f bl 800175c <HAL_GetTick>
- 8002a9e: 4602 mov r2, r0
- 8002aa0: 693b ldr r3, [r7, #16]
- 8002aa2: 1ad3 subs r3, r2, r3
- 8002aa4: 2b02 cmp r3, #2
- 8002aa6: d901 bls.n 8002aac <HAL_RCC_OscConfig+0x5d0>
- {
- return HAL_TIMEOUT;
- 8002aa8: 2303 movs r3, #3
- 8002aaa: e03e b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
- 8002aac: 4b21 ldr r3, [pc, #132] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002aae: 681b ldr r3, [r3, #0]
- 8002ab0: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
- 8002ab4: 2b00 cmp r3, #0
- 8002ab6: d0f0 beq.n 8002a9a <HAL_RCC_OscConfig+0x5be>
- 8002ab8: e036 b.n 8002b28 <HAL_RCC_OscConfig+0x64c>
- }
- }
- else
- {
- /* Disable the main PLL. */
- __HAL_RCC_PLL_DISABLE();
- 8002aba: 4b1f ldr r3, [pc, #124] ; (8002b38 <HAL_RCC_OscConfig+0x65c>)
- 8002abc: 2200 movs r2, #0
- 8002abe: 601a str r2, [r3, #0]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 8002ac0: f7fe fe4c bl 800175c <HAL_GetTick>
- 8002ac4: 6138 str r0, [r7, #16]
-
- /* Wait till PLL is disabled */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
- 8002ac6: e008 b.n 8002ada <HAL_RCC_OscConfig+0x5fe>
- {
- if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
- 8002ac8: f7fe fe48 bl 800175c <HAL_GetTick>
- 8002acc: 4602 mov r2, r0
- 8002ace: 693b ldr r3, [r7, #16]
- 8002ad0: 1ad3 subs r3, r2, r3
- 8002ad2: 2b02 cmp r3, #2
- 8002ad4: d901 bls.n 8002ada <HAL_RCC_OscConfig+0x5fe>
- {
- return HAL_TIMEOUT;
- 8002ad6: 2303 movs r3, #3
- 8002ad8: e027 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
- 8002ada: 4b16 ldr r3, [pc, #88] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002adc: 681b ldr r3, [r3, #0]
- 8002ade: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
- 8002ae2: 2b00 cmp r3, #0
- 8002ae4: d1f0 bne.n 8002ac8 <HAL_RCC_OscConfig+0x5ec>
- 8002ae6: e01f b.n 8002b28 <HAL_RCC_OscConfig+0x64c>
- }
- }
- else
- {
- /* Check if there is a request to disable the PLL used as System clock source */
- if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF)
- 8002ae8: 687b ldr r3, [r7, #4]
- 8002aea: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002aec: 2b01 cmp r3, #1
- 8002aee: d101 bne.n 8002af4 <HAL_RCC_OscConfig+0x618>
- {
- return HAL_ERROR;
- 8002af0: 2301 movs r3, #1
- 8002af2: e01a b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- }
- else
- {
- /* Do not return HAL_ERROR if request repeats the current configuration */
- pll_config = RCC->CFGR;
- 8002af4: 4b0f ldr r3, [pc, #60] ; (8002b34 <HAL_RCC_OscConfig+0x658>)
- 8002af6: 689b ldr r3, [r3, #8]
- 8002af8: 617b str r3, [r7, #20]
- if((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
- 8002afa: 697b ldr r3, [r7, #20]
- 8002afc: f403 3280 and.w r2, r3, #65536 ; 0x10000
- 8002b00: 687b ldr r3, [r7, #4]
- 8002b02: 6a9b ldr r3, [r3, #40] ; 0x28
- 8002b04: 429a cmp r2, r3
- 8002b06: d10d bne.n 8002b24 <HAL_RCC_OscConfig+0x648>
- (READ_BIT(pll_config, RCC_CFGR_PLLMUL) != RCC_OscInitStruct->PLL.PLLMUL) ||
- 8002b08: 697b ldr r3, [r7, #20]
- 8002b0a: f403 1270 and.w r2, r3, #3932160 ; 0x3c0000
- 8002b0e: 687b ldr r3, [r7, #4]
- 8002b10: 6adb ldr r3, [r3, #44] ; 0x2c
- if((READ_BIT(pll_config, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
- 8002b12: 429a cmp r2, r3
- 8002b14: d106 bne.n 8002b24 <HAL_RCC_OscConfig+0x648>
- (READ_BIT(pll_config, RCC_CFGR_PLLDIV) != RCC_OscInitStruct->PLL.PLLDIV))
- 8002b16: 697b ldr r3, [r7, #20]
- 8002b18: f403 0240 and.w r2, r3, #12582912 ; 0xc00000
- 8002b1c: 687b ldr r3, [r7, #4]
- 8002b1e: 6b1b ldr r3, [r3, #48] ; 0x30
- (READ_BIT(pll_config, RCC_CFGR_PLLMUL) != RCC_OscInitStruct->PLL.PLLMUL) ||
- 8002b20: 429a cmp r2, r3
- 8002b22: d001 beq.n 8002b28 <HAL_RCC_OscConfig+0x64c>
- {
- return HAL_ERROR;
- 8002b24: 2301 movs r3, #1
- 8002b26: e000 b.n 8002b2a <HAL_RCC_OscConfig+0x64e>
- }
- }
- }
- }
-
- return HAL_OK;
- 8002b28: 2300 movs r3, #0
- }
- 8002b2a: 4618 mov r0, r3
- 8002b2c: 3720 adds r7, #32
- 8002b2e: 46bd mov sp, r7
- 8002b30: bd80 pop {r7, pc}
- 8002b32: bf00 nop
- 8002b34: 40023800 .word 0x40023800
- 8002b38: 42470060 .word 0x42470060
-
- 08002b3c <HAL_RCC_ClockConfig>:
- * HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency
- * (for more details refer to section above "Initialization/de-initialization functions")
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
- {
- 8002b3c: b580 push {r7, lr}
- 8002b3e: b084 sub sp, #16
- 8002b40: af00 add r7, sp, #0
- 8002b42: 6078 str r0, [r7, #4]
- 8002b44: 6039 str r1, [r7, #0]
- uint32_t tickstart;
- HAL_StatusTypeDef status;
-
- /* Check the parameters */
- if(RCC_ClkInitStruct == NULL)
- 8002b46: 687b ldr r3, [r7, #4]
- 8002b48: 2b00 cmp r3, #0
- 8002b4a: d101 bne.n 8002b50 <HAL_RCC_ClockConfig+0x14>
- {
- return HAL_ERROR;
- 8002b4c: 2301 movs r3, #1
- 8002b4e: e11a b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- /* To correctly read data from FLASH memory, the number of wait states (LATENCY)
- must be correctly programmed according to the frequency of the CPU clock
- (HCLK) and the supply voltage of the device. */
-
- /* Increasing the number of wait states because of higher CPU frequency */
- if(FLatency > __HAL_FLASH_GET_LATENCY())
- 8002b50: 4b8f ldr r3, [pc, #572] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002b52: 681b ldr r3, [r3, #0]
- 8002b54: f003 0301 and.w r3, r3, #1
- 8002b58: 683a ldr r2, [r7, #0]
- 8002b5a: 429a cmp r2, r3
- 8002b5c: d919 bls.n 8002b92 <HAL_RCC_ClockConfig+0x56>
- {
- /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
- __HAL_FLASH_SET_LATENCY(FLatency);
- 8002b5e: 683b ldr r3, [r7, #0]
- 8002b60: 2b01 cmp r3, #1
- 8002b62: d105 bne.n 8002b70 <HAL_RCC_ClockConfig+0x34>
- 8002b64: 4b8a ldr r3, [pc, #552] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002b66: 681b ldr r3, [r3, #0]
- 8002b68: 4a89 ldr r2, [pc, #548] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002b6a: f043 0304 orr.w r3, r3, #4
- 8002b6e: 6013 str r3, [r2, #0]
- 8002b70: 4b87 ldr r3, [pc, #540] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002b72: 681b ldr r3, [r3, #0]
- 8002b74: f023 0201 bic.w r2, r3, #1
- 8002b78: 4985 ldr r1, [pc, #532] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002b7a: 683b ldr r3, [r7, #0]
- 8002b7c: 4313 orrs r3, r2
- 8002b7e: 600b str r3, [r1, #0]
-
- /* Check that the new number of wait states is taken into account to access the Flash
- memory by reading the FLASH_ACR register */
- if(__HAL_FLASH_GET_LATENCY() != FLatency)
- 8002b80: 4b83 ldr r3, [pc, #524] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002b82: 681b ldr r3, [r3, #0]
- 8002b84: f003 0301 and.w r3, r3, #1
- 8002b88: 683a ldr r2, [r7, #0]
- 8002b8a: 429a cmp r2, r3
- 8002b8c: d001 beq.n 8002b92 <HAL_RCC_ClockConfig+0x56>
- {
- return HAL_ERROR;
- 8002b8e: 2301 movs r3, #1
- 8002b90: e0f9 b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- }
- }
-
- /*-------------------------- HCLK Configuration --------------------------*/
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
- 8002b92: 687b ldr r3, [r7, #4]
- 8002b94: 681b ldr r3, [r3, #0]
- 8002b96: f003 0302 and.w r3, r3, #2
- 8002b9a: 2b00 cmp r3, #0
- 8002b9c: d008 beq.n 8002bb0 <HAL_RCC_ClockConfig+0x74>
- {
- assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider));
- MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
- 8002b9e: 4b7d ldr r3, [pc, #500] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002ba0: 689b ldr r3, [r3, #8]
- 8002ba2: f023 02f0 bic.w r2, r3, #240 ; 0xf0
- 8002ba6: 687b ldr r3, [r7, #4]
- 8002ba8: 689b ldr r3, [r3, #8]
- 8002baa: 497a ldr r1, [pc, #488] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002bac: 4313 orrs r3, r2
- 8002bae: 608b str r3, [r1, #8]
- }
-
- /*------------------------- SYSCLK Configuration ---------------------------*/
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
- 8002bb0: 687b ldr r3, [r7, #4]
- 8002bb2: 681b ldr r3, [r3, #0]
- 8002bb4: f003 0301 and.w r3, r3, #1
- 8002bb8: 2b00 cmp r3, #0
- 8002bba: f000 808e beq.w 8002cda <HAL_RCC_ClockConfig+0x19e>
- {
- assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource));
-
- /* HSE is selected as System Clock Source */
- if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
- 8002bbe: 687b ldr r3, [r7, #4]
- 8002bc0: 685b ldr r3, [r3, #4]
- 8002bc2: 2b02 cmp r3, #2
- 8002bc4: d107 bne.n 8002bd6 <HAL_RCC_ClockConfig+0x9a>
- {
- /* Check the HSE ready flag */
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
- 8002bc6: 4b73 ldr r3, [pc, #460] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002bc8: 681b ldr r3, [r3, #0]
- 8002bca: f403 3300 and.w r3, r3, #131072 ; 0x20000
- 8002bce: 2b00 cmp r3, #0
- 8002bd0: d121 bne.n 8002c16 <HAL_RCC_ClockConfig+0xda>
- {
- return HAL_ERROR;
- 8002bd2: 2301 movs r3, #1
- 8002bd4: e0d7 b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- }
- }
- /* PLL is selected as System Clock Source */
- else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
- 8002bd6: 687b ldr r3, [r7, #4]
- 8002bd8: 685b ldr r3, [r3, #4]
- 8002bda: 2b03 cmp r3, #3
- 8002bdc: d107 bne.n 8002bee <HAL_RCC_ClockConfig+0xb2>
- {
- /* Check the PLL ready flag */
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
- 8002bde: 4b6d ldr r3, [pc, #436] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002be0: 681b ldr r3, [r3, #0]
- 8002be2: f003 7300 and.w r3, r3, #33554432 ; 0x2000000
- 8002be6: 2b00 cmp r3, #0
- 8002be8: d115 bne.n 8002c16 <HAL_RCC_ClockConfig+0xda>
- {
- return HAL_ERROR;
- 8002bea: 2301 movs r3, #1
- 8002bec: e0cb b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- }
- }
- /* HSI is selected as System Clock Source */
- else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSI)
- 8002bee: 687b ldr r3, [r7, #4]
- 8002bf0: 685b ldr r3, [r3, #4]
- 8002bf2: 2b01 cmp r3, #1
- 8002bf4: d107 bne.n 8002c06 <HAL_RCC_ClockConfig+0xca>
- {
- /* Check the HSI ready flag */
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
- 8002bf6: 4b67 ldr r3, [pc, #412] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002bf8: 681b ldr r3, [r3, #0]
- 8002bfa: f003 0302 and.w r3, r3, #2
- 8002bfe: 2b00 cmp r3, #0
- 8002c00: d109 bne.n 8002c16 <HAL_RCC_ClockConfig+0xda>
- {
- return HAL_ERROR;
- 8002c02: 2301 movs r3, #1
- 8002c04: e0bf b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- }
- /* MSI is selected as System Clock Source */
- else
- {
- /* Check the MSI ready flag */
- if(__HAL_RCC_GET_FLAG(RCC_FLAG_MSIRDY) == 0U)
- 8002c06: 4b63 ldr r3, [pc, #396] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002c08: 681b ldr r3, [r3, #0]
- 8002c0a: f403 7300 and.w r3, r3, #512 ; 0x200
- 8002c0e: 2b00 cmp r3, #0
- 8002c10: d101 bne.n 8002c16 <HAL_RCC_ClockConfig+0xda>
- {
- return HAL_ERROR;
- 8002c12: 2301 movs r3, #1
- 8002c14: e0b7 b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- }
- }
- __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource);
- 8002c16: 4b5f ldr r3, [pc, #380] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002c18: 689b ldr r3, [r3, #8]
- 8002c1a: f023 0203 bic.w r2, r3, #3
- 8002c1e: 687b ldr r3, [r7, #4]
- 8002c20: 685b ldr r3, [r3, #4]
- 8002c22: 495c ldr r1, [pc, #368] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002c24: 4313 orrs r3, r2
- 8002c26: 608b str r3, [r1, #8]
-
- /* Get Start Tick */
- tickstart = HAL_GetTick();
- 8002c28: f7fe fd98 bl 800175c <HAL_GetTick>
- 8002c2c: 60f8 str r0, [r7, #12]
-
- if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
- 8002c2e: 687b ldr r3, [r7, #4]
- 8002c30: 685b ldr r3, [r3, #4]
- 8002c32: 2b02 cmp r3, #2
- 8002c34: d112 bne.n 8002c5c <HAL_RCC_ClockConfig+0x120>
- {
- while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSE)
- 8002c36: e00a b.n 8002c4e <HAL_RCC_ClockConfig+0x112>
- {
- if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
- 8002c38: f7fe fd90 bl 800175c <HAL_GetTick>
- 8002c3c: 4602 mov r2, r0
- 8002c3e: 68fb ldr r3, [r7, #12]
- 8002c40: 1ad3 subs r3, r2, r3
- 8002c42: f241 3288 movw r2, #5000 ; 0x1388
- 8002c46: 4293 cmp r3, r2
- 8002c48: d901 bls.n 8002c4e <HAL_RCC_ClockConfig+0x112>
- {
- return HAL_TIMEOUT;
- 8002c4a: 2303 movs r3, #3
- 8002c4c: e09b b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSE)
- 8002c4e: 4b51 ldr r3, [pc, #324] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002c50: 689b ldr r3, [r3, #8]
- 8002c52: f003 030c and.w r3, r3, #12
- 8002c56: 2b08 cmp r3, #8
- 8002c58: d1ee bne.n 8002c38 <HAL_RCC_ClockConfig+0xfc>
- 8002c5a: e03e b.n 8002cda <HAL_RCC_ClockConfig+0x19e>
- }
- }
- }
- else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
- 8002c5c: 687b ldr r3, [r7, #4]
- 8002c5e: 685b ldr r3, [r3, #4]
- 8002c60: 2b03 cmp r3, #3
- 8002c62: d112 bne.n 8002c8a <HAL_RCC_ClockConfig+0x14e>
- {
- while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
- 8002c64: e00a b.n 8002c7c <HAL_RCC_ClockConfig+0x140>
- {
- if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
- 8002c66: f7fe fd79 bl 800175c <HAL_GetTick>
- 8002c6a: 4602 mov r2, r0
- 8002c6c: 68fb ldr r3, [r7, #12]
- 8002c6e: 1ad3 subs r3, r2, r3
- 8002c70: f241 3288 movw r2, #5000 ; 0x1388
- 8002c74: 4293 cmp r3, r2
- 8002c76: d901 bls.n 8002c7c <HAL_RCC_ClockConfig+0x140>
- {
- return HAL_TIMEOUT;
- 8002c78: 2303 movs r3, #3
- 8002c7a: e084 b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
- 8002c7c: 4b45 ldr r3, [pc, #276] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002c7e: 689b ldr r3, [r3, #8]
- 8002c80: f003 030c and.w r3, r3, #12
- 8002c84: 2b0c cmp r3, #12
- 8002c86: d1ee bne.n 8002c66 <HAL_RCC_ClockConfig+0x12a>
- 8002c88: e027 b.n 8002cda <HAL_RCC_ClockConfig+0x19e>
- }
- }
- }
- else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSI)
- 8002c8a: 687b ldr r3, [r7, #4]
- 8002c8c: 685b ldr r3, [r3, #4]
- 8002c8e: 2b01 cmp r3, #1
- 8002c90: d11d bne.n 8002cce <HAL_RCC_ClockConfig+0x192>
- {
- while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSI)
- 8002c92: e00a b.n 8002caa <HAL_RCC_ClockConfig+0x16e>
- {
- if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
- 8002c94: f7fe fd62 bl 800175c <HAL_GetTick>
- 8002c98: 4602 mov r2, r0
- 8002c9a: 68fb ldr r3, [r7, #12]
- 8002c9c: 1ad3 subs r3, r2, r3
- 8002c9e: f241 3288 movw r2, #5000 ; 0x1388
- 8002ca2: 4293 cmp r3, r2
- 8002ca4: d901 bls.n 8002caa <HAL_RCC_ClockConfig+0x16e>
- {
- return HAL_TIMEOUT;
- 8002ca6: 2303 movs r3, #3
- 8002ca8: e06d b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_HSI)
- 8002caa: 4b3a ldr r3, [pc, #232] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002cac: 689b ldr r3, [r3, #8]
- 8002cae: f003 030c and.w r3, r3, #12
- 8002cb2: 2b04 cmp r3, #4
- 8002cb4: d1ee bne.n 8002c94 <HAL_RCC_ClockConfig+0x158>
- 8002cb6: e010 b.n 8002cda <HAL_RCC_ClockConfig+0x19e>
- }
- else
- {
- while(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_MSI)
- {
- if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
- 8002cb8: f7fe fd50 bl 800175c <HAL_GetTick>
- 8002cbc: 4602 mov r2, r0
- 8002cbe: 68fb ldr r3, [r7, #12]
- 8002cc0: 1ad3 subs r3, r2, r3
- 8002cc2: f241 3288 movw r2, #5000 ; 0x1388
- 8002cc6: 4293 cmp r3, r2
- 8002cc8: d901 bls.n 8002cce <HAL_RCC_ClockConfig+0x192>
- {
- return HAL_TIMEOUT;
- 8002cca: 2303 movs r3, #3
- 8002ccc: e05b b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- while(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_MSI)
- 8002cce: 4b31 ldr r3, [pc, #196] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002cd0: 689b ldr r3, [r3, #8]
- 8002cd2: f003 030c and.w r3, r3, #12
- 8002cd6: 2b00 cmp r3, #0
- 8002cd8: d1ee bne.n 8002cb8 <HAL_RCC_ClockConfig+0x17c>
- }
- }
- }
- }
- /* Decreasing the number of wait states because of lower CPU frequency */
- if(FLatency < __HAL_FLASH_GET_LATENCY())
- 8002cda: 4b2d ldr r3, [pc, #180] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002cdc: 681b ldr r3, [r3, #0]
- 8002cde: f003 0301 and.w r3, r3, #1
- 8002ce2: 683a ldr r2, [r7, #0]
- 8002ce4: 429a cmp r2, r3
- 8002ce6: d219 bcs.n 8002d1c <HAL_RCC_ClockConfig+0x1e0>
- {
- /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
- __HAL_FLASH_SET_LATENCY(FLatency);
- 8002ce8: 683b ldr r3, [r7, #0]
- 8002cea: 2b01 cmp r3, #1
- 8002cec: d105 bne.n 8002cfa <HAL_RCC_ClockConfig+0x1be>
- 8002cee: 4b28 ldr r3, [pc, #160] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002cf0: 681b ldr r3, [r3, #0]
- 8002cf2: 4a27 ldr r2, [pc, #156] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002cf4: f043 0304 orr.w r3, r3, #4
- 8002cf8: 6013 str r3, [r2, #0]
- 8002cfa: 4b25 ldr r3, [pc, #148] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002cfc: 681b ldr r3, [r3, #0]
- 8002cfe: f023 0201 bic.w r2, r3, #1
- 8002d02: 4923 ldr r1, [pc, #140] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002d04: 683b ldr r3, [r7, #0]
- 8002d06: 4313 orrs r3, r2
- 8002d08: 600b str r3, [r1, #0]
-
- /* Check that the new number of wait states is taken into account to access the Flash
- memory by reading the FLASH_ACR register */
- if(__HAL_FLASH_GET_LATENCY() != FLatency)
- 8002d0a: 4b21 ldr r3, [pc, #132] ; (8002d90 <HAL_RCC_ClockConfig+0x254>)
- 8002d0c: 681b ldr r3, [r3, #0]
- 8002d0e: f003 0301 and.w r3, r3, #1
- 8002d12: 683a ldr r2, [r7, #0]
- 8002d14: 429a cmp r2, r3
- 8002d16: d001 beq.n 8002d1c <HAL_RCC_ClockConfig+0x1e0>
- {
- return HAL_ERROR;
- 8002d18: 2301 movs r3, #1
- 8002d1a: e034 b.n 8002d86 <HAL_RCC_ClockConfig+0x24a>
- }
- }
-
- /*-------------------------- PCLK1 Configuration ---------------------------*/
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
- 8002d1c: 687b ldr r3, [r7, #4]
- 8002d1e: 681b ldr r3, [r3, #0]
- 8002d20: f003 0304 and.w r3, r3, #4
- 8002d24: 2b00 cmp r3, #0
- 8002d26: d008 beq.n 8002d3a <HAL_RCC_ClockConfig+0x1fe>
- {
- assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider));
- MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider);
- 8002d28: 4b1a ldr r3, [pc, #104] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002d2a: 689b ldr r3, [r3, #8]
- 8002d2c: f423 62e0 bic.w r2, r3, #1792 ; 0x700
- 8002d30: 687b ldr r3, [r7, #4]
- 8002d32: 68db ldr r3, [r3, #12]
- 8002d34: 4917 ldr r1, [pc, #92] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002d36: 4313 orrs r3, r2
- 8002d38: 608b str r3, [r1, #8]
- }
-
- /*-------------------------- PCLK2 Configuration ---------------------------*/
- if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
- 8002d3a: 687b ldr r3, [r7, #4]
- 8002d3c: 681b ldr r3, [r3, #0]
- 8002d3e: f003 0308 and.w r3, r3, #8
- 8002d42: 2b00 cmp r3, #0
- 8002d44: d009 beq.n 8002d5a <HAL_RCC_ClockConfig+0x21e>
- {
- assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider));
- MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U));
- 8002d46: 4b13 ldr r3, [pc, #76] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002d48: 689b ldr r3, [r3, #8]
- 8002d4a: f423 5260 bic.w r2, r3, #14336 ; 0x3800
- 8002d4e: 687b ldr r3, [r7, #4]
- 8002d50: 691b ldr r3, [r3, #16]
- 8002d52: 00db lsls r3, r3, #3
- 8002d54: 490f ldr r1, [pc, #60] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002d56: 4313 orrs r3, r2
- 8002d58: 608b str r3, [r1, #8]
- }
-
- /* Update the SystemCoreClock global variable */
- SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_Pos];
- 8002d5a: f000 f823 bl 8002da4 <HAL_RCC_GetSysClockFreq>
- 8002d5e: 4601 mov r1, r0
- 8002d60: 4b0c ldr r3, [pc, #48] ; (8002d94 <HAL_RCC_ClockConfig+0x258>)
- 8002d62: 689b ldr r3, [r3, #8]
- 8002d64: 091b lsrs r3, r3, #4
- 8002d66: f003 030f and.w r3, r3, #15
- 8002d6a: 4a0b ldr r2, [pc, #44] ; (8002d98 <HAL_RCC_ClockConfig+0x25c>)
- 8002d6c: 5cd3 ldrb r3, [r2, r3]
- 8002d6e: fa21 f303 lsr.w r3, r1, r3
- 8002d72: 4a0a ldr r2, [pc, #40] ; (8002d9c <HAL_RCC_ClockConfig+0x260>)
- 8002d74: 6013 str r3, [r2, #0]
-
- /* Configure the source of time base considering new system clocks settings*/
- status = HAL_InitTick(uwTickPrio);
- 8002d76: 4b0a ldr r3, [pc, #40] ; (8002da0 <HAL_RCC_ClockConfig+0x264>)
- 8002d78: 681b ldr r3, [r3, #0]
- 8002d7a: 4618 mov r0, r3
- 8002d7c: f7fe fca2 bl 80016c4 <HAL_InitTick>
- 8002d80: 4603 mov r3, r0
- 8002d82: 72fb strb r3, [r7, #11]
-
- return status;
- 8002d84: 7afb ldrb r3, [r7, #11]
- }
- 8002d86: 4618 mov r0, r3
- 8002d88: 3710 adds r7, #16
- 8002d8a: 46bd mov sp, r7
- 8002d8c: bd80 pop {r7, pc}
- 8002d8e: bf00 nop
- 8002d90: 40023c00 .word 0x40023c00
- 8002d94: 40023800 .word 0x40023800
- 8002d98: 08007b6c .word 0x08007b6c
- 8002d9c: 20000004 .word 0x20000004
- 8002da0: 20000008 .word 0x20000008
-
- 08002da4 <HAL_RCC_GetSysClockFreq>:
- * right SYSCLK value. Otherwise, any configuration based on this function will be incorrect.
- *
- * @retval SYSCLK frequency
- */
- uint32_t HAL_RCC_GetSysClockFreq(void)
- {
- 8002da4: b5f0 push {r4, r5, r6, r7, lr}
- 8002da6: b087 sub sp, #28
- 8002da8: af00 add r7, sp, #0
- uint32_t tmpreg, pllm, plld, pllvco, msiclkrange, sysclockfreq;
-
- tmpreg = RCC->CFGR;
- 8002daa: 4b5f ldr r3, [pc, #380] ; (8002f28 <HAL_RCC_GetSysClockFreq+0x184>)
- 8002dac: 689b ldr r3, [r3, #8]
- 8002dae: 60fb str r3, [r7, #12]
-
- /* Get SYSCLK source -------------------------------------------------------*/
- switch (tmpreg & RCC_CFGR_SWS)
- 8002db0: 68fb ldr r3, [r7, #12]
- 8002db2: f003 030c and.w r3, r3, #12
- 8002db6: 2b08 cmp r3, #8
- 8002db8: d007 beq.n 8002dca <HAL_RCC_GetSysClockFreq+0x26>
- 8002dba: 2b0c cmp r3, #12
- 8002dbc: d008 beq.n 8002dd0 <HAL_RCC_GetSysClockFreq+0x2c>
- 8002dbe: 2b04 cmp r3, #4
- 8002dc0: f040 809f bne.w 8002f02 <HAL_RCC_GetSysClockFreq+0x15e>
- {
- case RCC_SYSCLKSOURCE_STATUS_HSI: /* HSI used as system clock source */
- {
- sysclockfreq = HSI_VALUE;
- 8002dc4: 4b59 ldr r3, [pc, #356] ; (8002f2c <HAL_RCC_GetSysClockFreq+0x188>)
- 8002dc6: 613b str r3, [r7, #16]
- break;
- 8002dc8: e0a9 b.n 8002f1e <HAL_RCC_GetSysClockFreq+0x17a>
- }
- case RCC_SYSCLKSOURCE_STATUS_HSE: /* HSE used as system clock */
- {
- sysclockfreq = HSE_VALUE;
- 8002dca: 4b59 ldr r3, [pc, #356] ; (8002f30 <HAL_RCC_GetSysClockFreq+0x18c>)
- 8002dcc: 613b str r3, [r7, #16]
- break;
- 8002dce: e0a6 b.n 8002f1e <HAL_RCC_GetSysClockFreq+0x17a>
- }
- case RCC_SYSCLKSOURCE_STATUS_PLLCLK: /* PLL used as system clock */
- {
- pllm = PLLMulTable[(uint32_t)(tmpreg & RCC_CFGR_PLLMUL) >> RCC_CFGR_PLLMUL_Pos];
- 8002dd0: 68fb ldr r3, [r7, #12]
- 8002dd2: 0c9b lsrs r3, r3, #18
- 8002dd4: f003 030f and.w r3, r3, #15
- 8002dd8: 4a56 ldr r2, [pc, #344] ; (8002f34 <HAL_RCC_GetSysClockFreq+0x190>)
- 8002dda: 5cd3 ldrb r3, [r2, r3]
- 8002ddc: 60bb str r3, [r7, #8]
- plld = ((uint32_t)(tmpreg & RCC_CFGR_PLLDIV) >> RCC_CFGR_PLLDIV_Pos) + 1U;
- 8002dde: 68fb ldr r3, [r7, #12]
- 8002de0: 0d9b lsrs r3, r3, #22
- 8002de2: f003 0303 and.w r3, r3, #3
- 8002de6: 3301 adds r3, #1
- 8002de8: 607b str r3, [r7, #4]
- if (__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI)
- 8002dea: 4b4f ldr r3, [pc, #316] ; (8002f28 <HAL_RCC_GetSysClockFreq+0x184>)
- 8002dec: 689b ldr r3, [r3, #8]
- 8002dee: f403 3380 and.w r3, r3, #65536 ; 0x10000
- 8002df2: 2b00 cmp r3, #0
- 8002df4: d041 beq.n 8002e7a <HAL_RCC_GetSysClockFreq+0xd6>
- {
- /* HSE used as PLL clock source */
- pllvco = (uint32_t)(((uint64_t)HSE_VALUE * (uint64_t)pllm) / (uint64_t)plld);
- 8002df6: 68bb ldr r3, [r7, #8]
- 8002df8: 461d mov r5, r3
- 8002dfa: f04f 0600 mov.w r6, #0
- 8002dfe: 4629 mov r1, r5
- 8002e00: 4632 mov r2, r6
- 8002e02: f04f 0300 mov.w r3, #0
- 8002e06: f04f 0400 mov.w r4, #0
- 8002e0a: 0154 lsls r4, r2, #5
- 8002e0c: ea44 64d1 orr.w r4, r4, r1, lsr #27
- 8002e10: 014b lsls r3, r1, #5
- 8002e12: 4619 mov r1, r3
- 8002e14: 4622 mov r2, r4
- 8002e16: 1b49 subs r1, r1, r5
- 8002e18: eb62 0206 sbc.w r2, r2, r6
- 8002e1c: f04f 0300 mov.w r3, #0
- 8002e20: f04f 0400 mov.w r4, #0
- 8002e24: 0194 lsls r4, r2, #6
- 8002e26: ea44 6491 orr.w r4, r4, r1, lsr #26
- 8002e2a: 018b lsls r3, r1, #6
- 8002e2c: 1a5b subs r3, r3, r1
- 8002e2e: eb64 0402 sbc.w r4, r4, r2
- 8002e32: f04f 0100 mov.w r1, #0
- 8002e36: f04f 0200 mov.w r2, #0
- 8002e3a: 00e2 lsls r2, r4, #3
- 8002e3c: ea42 7253 orr.w r2, r2, r3, lsr #29
- 8002e40: 00d9 lsls r1, r3, #3
- 8002e42: 460b mov r3, r1
- 8002e44: 4614 mov r4, r2
- 8002e46: 195b adds r3, r3, r5
- 8002e48: eb44 0406 adc.w r4, r4, r6
- 8002e4c: f04f 0100 mov.w r1, #0
- 8002e50: f04f 0200 mov.w r2, #0
- 8002e54: 0262 lsls r2, r4, #9
- 8002e56: ea42 52d3 orr.w r2, r2, r3, lsr #23
- 8002e5a: 0259 lsls r1, r3, #9
- 8002e5c: 460b mov r3, r1
- 8002e5e: 4614 mov r4, r2
- 8002e60: 4618 mov r0, r3
- 8002e62: 4621 mov r1, r4
- 8002e64: 687b ldr r3, [r7, #4]
- 8002e66: f04f 0400 mov.w r4, #0
- 8002e6a: 461a mov r2, r3
- 8002e6c: 4623 mov r3, r4
- 8002e6e: f7fd f98d bl 800018c <__aeabi_uldivmod>
- 8002e72: 4603 mov r3, r0
- 8002e74: 460c mov r4, r1
- 8002e76: 617b str r3, [r7, #20]
- 8002e78: e040 b.n 8002efc <HAL_RCC_GetSysClockFreq+0x158>
- }
- else
- {
- /* HSI used as PLL clock source */
- pllvco = (uint32_t)(((uint64_t)HSI_VALUE * (uint64_t)pllm) / (uint64_t)plld);
- 8002e7a: 68bb ldr r3, [r7, #8]
- 8002e7c: 461d mov r5, r3
- 8002e7e: f04f 0600 mov.w r6, #0
- 8002e82: 4629 mov r1, r5
- 8002e84: 4632 mov r2, r6
- 8002e86: f04f 0300 mov.w r3, #0
- 8002e8a: f04f 0400 mov.w r4, #0
- 8002e8e: 0154 lsls r4, r2, #5
- 8002e90: ea44 64d1 orr.w r4, r4, r1, lsr #27
- 8002e94: 014b lsls r3, r1, #5
- 8002e96: 4619 mov r1, r3
- 8002e98: 4622 mov r2, r4
- 8002e9a: 1b49 subs r1, r1, r5
- 8002e9c: eb62 0206 sbc.w r2, r2, r6
- 8002ea0: f04f 0300 mov.w r3, #0
- 8002ea4: f04f 0400 mov.w r4, #0
- 8002ea8: 0194 lsls r4, r2, #6
- 8002eaa: ea44 6491 orr.w r4, r4, r1, lsr #26
- 8002eae: 018b lsls r3, r1, #6
- 8002eb0: 1a5b subs r3, r3, r1
- 8002eb2: eb64 0402 sbc.w r4, r4, r2
- 8002eb6: f04f 0100 mov.w r1, #0
- 8002eba: f04f 0200 mov.w r2, #0
- 8002ebe: 00e2 lsls r2, r4, #3
- 8002ec0: ea42 7253 orr.w r2, r2, r3, lsr #29
- 8002ec4: 00d9 lsls r1, r3, #3
- 8002ec6: 460b mov r3, r1
- 8002ec8: 4614 mov r4, r2
- 8002eca: 195b adds r3, r3, r5
- 8002ecc: eb44 0406 adc.w r4, r4, r6
- 8002ed0: f04f 0100 mov.w r1, #0
- 8002ed4: f04f 0200 mov.w r2, #0
- 8002ed8: 02a2 lsls r2, r4, #10
- 8002eda: ea42 5293 orr.w r2, r2, r3, lsr #22
- 8002ede: 0299 lsls r1, r3, #10
- 8002ee0: 460b mov r3, r1
- 8002ee2: 4614 mov r4, r2
- 8002ee4: 4618 mov r0, r3
- 8002ee6: 4621 mov r1, r4
- 8002ee8: 687b ldr r3, [r7, #4]
- 8002eea: f04f 0400 mov.w r4, #0
- 8002eee: 461a mov r2, r3
- 8002ef0: 4623 mov r3, r4
- 8002ef2: f7fd f94b bl 800018c <__aeabi_uldivmod>
- 8002ef6: 4603 mov r3, r0
- 8002ef8: 460c mov r4, r1
- 8002efa: 617b str r3, [r7, #20]
- }
- sysclockfreq = pllvco;
- 8002efc: 697b ldr r3, [r7, #20]
- 8002efe: 613b str r3, [r7, #16]
- break;
- 8002f00: e00d b.n 8002f1e <HAL_RCC_GetSysClockFreq+0x17a>
- }
- case RCC_SYSCLKSOURCE_STATUS_MSI: /* MSI used as system clock source */
- default: /* MSI used as system clock */
- {
- msiclkrange = (RCC->ICSCR & RCC_ICSCR_MSIRANGE ) >> RCC_ICSCR_MSIRANGE_Pos;
- 8002f02: 4b09 ldr r3, [pc, #36] ; (8002f28 <HAL_RCC_GetSysClockFreq+0x184>)
- 8002f04: 685b ldr r3, [r3, #4]
- 8002f06: 0b5b lsrs r3, r3, #13
- 8002f08: f003 0307 and.w r3, r3, #7
- 8002f0c: 603b str r3, [r7, #0]
- sysclockfreq = (32768U * (1UL << (msiclkrange + 1U)));
- 8002f0e: 683b ldr r3, [r7, #0]
- 8002f10: 3301 adds r3, #1
- 8002f12: f44f 4200 mov.w r2, #32768 ; 0x8000
- 8002f16: fa02 f303 lsl.w r3, r2, r3
- 8002f1a: 613b str r3, [r7, #16]
- break;
- 8002f1c: bf00 nop
- }
- }
- return sysclockfreq;
- 8002f1e: 693b ldr r3, [r7, #16]
- }
- 8002f20: 4618 mov r0, r3
- 8002f22: 371c adds r7, #28
- 8002f24: 46bd mov sp, r7
- 8002f26: bdf0 pop {r4, r5, r6, r7, pc}
- 8002f28: 40023800 .word 0x40023800
- 8002f2c: 00f42400 .word 0x00f42400
- 8002f30: 007a1200 .word 0x007a1200
- 8002f34: 08007b60 .word 0x08007b60
-
- 08002f38 <HAL_RCC_GetHCLKFreq>:
- * @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency
- * and updated within this function
- * @retval HCLK frequency
- */
- uint32_t HAL_RCC_GetHCLKFreq(void)
- {
- 8002f38: b480 push {r7}
- 8002f3a: af00 add r7, sp, #0
- return SystemCoreClock;
- 8002f3c: 4b02 ldr r3, [pc, #8] ; (8002f48 <HAL_RCC_GetHCLKFreq+0x10>)
- 8002f3e: 681b ldr r3, [r3, #0]
- }
- 8002f40: 4618 mov r0, r3
- 8002f42: 46bd mov sp, r7
- 8002f44: bc80 pop {r7}
- 8002f46: 4770 bx lr
- 8002f48: 20000004 .word 0x20000004
-
- 08002f4c <HAL_RCC_GetPCLK1Freq>:
- * @note Each time PCLK1 changes, this function must be called to update the
- * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
- * @retval PCLK1 frequency
- */
- uint32_t HAL_RCC_GetPCLK1Freq(void)
- {
- 8002f4c: b580 push {r7, lr}
- 8002f4e: af00 add r7, sp, #0
- /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
- return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1) >> RCC_CFGR_PPRE1_Pos]);
- 8002f50: f7ff fff2 bl 8002f38 <HAL_RCC_GetHCLKFreq>
- 8002f54: 4601 mov r1, r0
- 8002f56: 4b05 ldr r3, [pc, #20] ; (8002f6c <HAL_RCC_GetPCLK1Freq+0x20>)
- 8002f58: 689b ldr r3, [r3, #8]
- 8002f5a: 0a1b lsrs r3, r3, #8
- 8002f5c: f003 0307 and.w r3, r3, #7
- 8002f60: 4a03 ldr r2, [pc, #12] ; (8002f70 <HAL_RCC_GetPCLK1Freq+0x24>)
- 8002f62: 5cd3 ldrb r3, [r2, r3]
- 8002f64: fa21 f303 lsr.w r3, r1, r3
- }
- 8002f68: 4618 mov r0, r3
- 8002f6a: bd80 pop {r7, pc}
- 8002f6c: 40023800 .word 0x40023800
- 8002f70: 08007b7c .word 0x08007b7c
-
- 08002f74 <HAL_RCC_GetPCLK2Freq>:
- * @note Each time PCLK2 changes, this function must be called to update the
- * right PCLK2 value. Otherwise, any configuration based on this function will be incorrect.
- * @retval PCLK2 frequency
- */
- uint32_t HAL_RCC_GetPCLK2Freq(void)
- {
- 8002f74: b580 push {r7, lr}
- 8002f76: af00 add r7, sp, #0
- /* Get HCLK source and Compute PCLK2 frequency ---------------------------*/
- return (HAL_RCC_GetHCLKFreq()>> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2) >> RCC_CFGR_PPRE2_Pos]);
- 8002f78: f7ff ffde bl 8002f38 <HAL_RCC_GetHCLKFreq>
- 8002f7c: 4601 mov r1, r0
- 8002f7e: 4b05 ldr r3, [pc, #20] ; (8002f94 <HAL_RCC_GetPCLK2Freq+0x20>)
- 8002f80: 689b ldr r3, [r3, #8]
- 8002f82: 0adb lsrs r3, r3, #11
- 8002f84: f003 0307 and.w r3, r3, #7
- 8002f88: 4a03 ldr r2, [pc, #12] ; (8002f98 <HAL_RCC_GetPCLK2Freq+0x24>)
- 8002f8a: 5cd3 ldrb r3, [r2, r3]
- 8002f8c: fa21 f303 lsr.w r3, r1, r3
- }
- 8002f90: 4618 mov r0, r3
- 8002f92: bd80 pop {r7, pc}
- 8002f94: 40023800 .word 0x40023800
- 8002f98: 08007b7c .word 0x08007b7c
-
- 08002f9c <RCC_SetFlashLatencyFromMSIRange>:
- voltage range
- * @param MSIrange MSI range value from RCC_MSIRANGE_0 to RCC_MSIRANGE_6
- * @retval HAL status
- */
- static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange(uint32_t MSIrange)
- {
- 8002f9c: b480 push {r7}
- 8002f9e: b087 sub sp, #28
- 8002fa0: af00 add r7, sp, #0
- 8002fa2: 6078 str r0, [r7, #4]
- uint32_t vos;
- uint32_t latency = FLASH_LATENCY_0; /* default value 0WS */
- 8002fa4: 2300 movs r3, #0
- 8002fa6: 613b str r3, [r7, #16]
-
- /* HCLK can reach 4 MHz only if AHB prescaler = 1 */
- if (READ_BIT(RCC->CFGR, RCC_CFGR_HPRE) == RCC_SYSCLK_DIV1)
- 8002fa8: 4b29 ldr r3, [pc, #164] ; (8003050 <RCC_SetFlashLatencyFromMSIRange+0xb4>)
- 8002faa: 689b ldr r3, [r3, #8]
- 8002fac: f003 03f0 and.w r3, r3, #240 ; 0xf0
- 8002fb0: 2b00 cmp r3, #0
- 8002fb2: d12c bne.n 800300e <RCC_SetFlashLatencyFromMSIRange+0x72>
- {
- if(__HAL_RCC_PWR_IS_CLK_ENABLED())
- 8002fb4: 4b26 ldr r3, [pc, #152] ; (8003050 <RCC_SetFlashLatencyFromMSIRange+0xb4>)
- 8002fb6: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002fb8: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 8002fbc: 2b00 cmp r3, #0
- 8002fbe: d005 beq.n 8002fcc <RCC_SetFlashLatencyFromMSIRange+0x30>
- {
- vos = READ_BIT(PWR->CR, PWR_CR_VOS);
- 8002fc0: 4b24 ldr r3, [pc, #144] ; (8003054 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
- 8002fc2: 681b ldr r3, [r3, #0]
- 8002fc4: f403 53c0 and.w r3, r3, #6144 ; 0x1800
- 8002fc8: 617b str r3, [r7, #20]
- 8002fca: e016 b.n 8002ffa <RCC_SetFlashLatencyFromMSIRange+0x5e>
- }
- else
- {
- __HAL_RCC_PWR_CLK_ENABLE();
- 8002fcc: 4b20 ldr r3, [pc, #128] ; (8003050 <RCC_SetFlashLatencyFromMSIRange+0xb4>)
- 8002fce: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002fd0: 4a1f ldr r2, [pc, #124] ; (8003050 <RCC_SetFlashLatencyFromMSIRange+0xb4>)
- 8002fd2: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
- 8002fd6: 6253 str r3, [r2, #36] ; 0x24
- 8002fd8: 4b1d ldr r3, [pc, #116] ; (8003050 <RCC_SetFlashLatencyFromMSIRange+0xb4>)
- 8002fda: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002fdc: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
- 8002fe0: 60fb str r3, [r7, #12]
- 8002fe2: 68fb ldr r3, [r7, #12]
- vos = READ_BIT(PWR->CR, PWR_CR_VOS);
- 8002fe4: 4b1b ldr r3, [pc, #108] ; (8003054 <RCC_SetFlashLatencyFromMSIRange+0xb8>)
- 8002fe6: 681b ldr r3, [r3, #0]
- 8002fe8: f403 53c0 and.w r3, r3, #6144 ; 0x1800
- 8002fec: 617b str r3, [r7, #20]
- __HAL_RCC_PWR_CLK_DISABLE();
- 8002fee: 4b18 ldr r3, [pc, #96] ; (8003050 <RCC_SetFlashLatencyFromMSIRange+0xb4>)
- 8002ff0: 6a5b ldr r3, [r3, #36] ; 0x24
- 8002ff2: 4a17 ldr r2, [pc, #92] ; (8003050 <RCC_SetFlashLatencyFromMSIRange+0xb4>)
- 8002ff4: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000
- 8002ff8: 6253 str r3, [r2, #36] ; 0x24
- }
-
- /* Check if need to set latency 1 only for Range 3 & HCLK = 4MHz */
- if((vos == PWR_REGULATOR_VOLTAGE_SCALE3) && (MSIrange == RCC_MSIRANGE_6))
- 8002ffa: 697b ldr r3, [r7, #20]
- 8002ffc: f5b3 5fc0 cmp.w r3, #6144 ; 0x1800
- 8003000: d105 bne.n 800300e <RCC_SetFlashLatencyFromMSIRange+0x72>
- 8003002: 687b ldr r3, [r7, #4]
- 8003004: f5b3 4f40 cmp.w r3, #49152 ; 0xc000
- 8003008: d101 bne.n 800300e <RCC_SetFlashLatencyFromMSIRange+0x72>
- {
- latency = FLASH_LATENCY_1; /* 1WS */
- 800300a: 2301 movs r3, #1
- 800300c: 613b str r3, [r7, #16]
- }
- }
-
- __HAL_FLASH_SET_LATENCY(latency);
- 800300e: 693b ldr r3, [r7, #16]
- 8003010: 2b01 cmp r3, #1
- 8003012: d105 bne.n 8003020 <RCC_SetFlashLatencyFromMSIRange+0x84>
- 8003014: 4b10 ldr r3, [pc, #64] ; (8003058 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
- 8003016: 681b ldr r3, [r3, #0]
- 8003018: 4a0f ldr r2, [pc, #60] ; (8003058 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
- 800301a: f043 0304 orr.w r3, r3, #4
- 800301e: 6013 str r3, [r2, #0]
- 8003020: 4b0d ldr r3, [pc, #52] ; (8003058 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
- 8003022: 681b ldr r3, [r3, #0]
- 8003024: f023 0201 bic.w r2, r3, #1
- 8003028: 490b ldr r1, [pc, #44] ; (8003058 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
- 800302a: 693b ldr r3, [r7, #16]
- 800302c: 4313 orrs r3, r2
- 800302e: 600b str r3, [r1, #0]
-
- /* Check that the new number of wait states is taken into account to access the Flash
- memory by reading the FLASH_ACR register */
- if(__HAL_FLASH_GET_LATENCY() != latency)
- 8003030: 4b09 ldr r3, [pc, #36] ; (8003058 <RCC_SetFlashLatencyFromMSIRange+0xbc>)
- 8003032: 681b ldr r3, [r3, #0]
- 8003034: f003 0301 and.w r3, r3, #1
- 8003038: 693a ldr r2, [r7, #16]
- 800303a: 429a cmp r2, r3
- 800303c: d001 beq.n 8003042 <RCC_SetFlashLatencyFromMSIRange+0xa6>
- {
- return HAL_ERROR;
- 800303e: 2301 movs r3, #1
- 8003040: e000 b.n 8003044 <RCC_SetFlashLatencyFromMSIRange+0xa8>
- }
-
- return HAL_OK;
- 8003042: 2300 movs r3, #0
- }
- 8003044: 4618 mov r0, r3
- 8003046: 371c adds r7, #28
- 8003048: 46bd mov sp, r7
- 800304a: bc80 pop {r7}
- 800304c: 4770 bx lr
- 800304e: bf00 nop
- 8003050: 40023800 .word 0x40023800
- 8003054: 40007000 .word 0x40007000
- 8003058: 40023c00 .word 0x40023c00
-
- 0800305c <HAL_SPI_Init>:
- * @param hspi pointer to a SPI_HandleTypeDef structure that contains
- * the configuration information for SPI module.
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
- {
- 800305c: b580 push {r7, lr}
- 800305e: b082 sub sp, #8
- 8003060: af00 add r7, sp, #0
- 8003062: 6078 str r0, [r7, #4]
- /* Check the SPI handle allocation */
- if (hspi == NULL)
- 8003064: 687b ldr r3, [r7, #4]
- 8003066: 2b00 cmp r3, #0
- 8003068: d101 bne.n 800306e <HAL_SPI_Init+0x12>
- {
- return HAL_ERROR;
- 800306a: 2301 movs r3, #1
- 800306c: e07b b.n 8003166 <HAL_SPI_Init+0x10a>
- assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
- assert_param(IS_SPI_FIRST_BIT(hspi->Init.FirstBit));
- /* TI mode is not supported on all devices in stm32l1xx serie.
- TIMode parameter is mandatory equal to SPI_TIMODE_DISABLE if TI mode is not supported */
- assert_param(IS_SPI_TIMODE(hspi->Init.TIMode));
- if (hspi->Init.TIMode == SPI_TIMODE_DISABLE)
- 800306e: 687b ldr r3, [r7, #4]
- 8003070: 6a5b ldr r3, [r3, #36] ; 0x24
- 8003072: 2b00 cmp r3, #0
- 8003074: d108 bne.n 8003088 <HAL_SPI_Init+0x2c>
- {
- assert_param(IS_SPI_CPOL(hspi->Init.CLKPolarity));
- assert_param(IS_SPI_CPHA(hspi->Init.CLKPhase));
-
- if (hspi->Init.Mode == SPI_MODE_MASTER)
- 8003076: 687b ldr r3, [r7, #4]
- 8003078: 685b ldr r3, [r3, #4]
- 800307a: f5b3 7f82 cmp.w r3, #260 ; 0x104
- 800307e: d009 beq.n 8003094 <HAL_SPI_Init+0x38>
- assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
- }
- else
- {
- /* Baudrate prescaler not use in Motoraola Slave mode. force to default value */
- hspi->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
- 8003080: 687b ldr r3, [r7, #4]
- 8003082: 2200 movs r2, #0
- 8003084: 61da str r2, [r3, #28]
- 8003086: e005 b.n 8003094 <HAL_SPI_Init+0x38>
- else
- {
- assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler));
-
- /* Force polarity and phase to TI protocaol requirements */
- hspi->Init.CLKPolarity = SPI_POLARITY_LOW;
- 8003088: 687b ldr r3, [r7, #4]
- 800308a: 2200 movs r2, #0
- 800308c: 611a str r2, [r3, #16]
- hspi->Init.CLKPhase = SPI_PHASE_1EDGE;
- 800308e: 687b ldr r3, [r7, #4]
- 8003090: 2200 movs r2, #0
- 8003092: 615a str r2, [r3, #20]
- if (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)
- {
- assert_param(IS_SPI_CRC_POLYNOMIAL(hspi->Init.CRCPolynomial));
- }
- #else
- hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
- 8003094: 687b ldr r3, [r7, #4]
- 8003096: 2200 movs r2, #0
- 8003098: 629a str r2, [r3, #40] ; 0x28
- #endif /* USE_SPI_CRC */
-
- if (hspi->State == HAL_SPI_STATE_RESET)
- 800309a: 687b ldr r3, [r7, #4]
- 800309c: f893 3051 ldrb.w r3, [r3, #81] ; 0x51
- 80030a0: b2db uxtb r3, r3
- 80030a2: 2b00 cmp r3, #0
- 80030a4: d106 bne.n 80030b4 <HAL_SPI_Init+0x58>
- {
- /* Allocate lock resource and initialize it */
- hspi->Lock = HAL_UNLOCKED;
- 80030a6: 687b ldr r3, [r7, #4]
- 80030a8: 2200 movs r2, #0
- 80030aa: f883 2050 strb.w r2, [r3, #80] ; 0x50
-
- /* Init the low level hardware : GPIO, CLOCK, NVIC... */
- hspi->MspInitCallback(hspi);
- #else
- /* Init the low level hardware : GPIO, CLOCK, NVIC... */
- HAL_SPI_MspInit(hspi);
- 80030ae: 6878 ldr r0, [r7, #4]
- 80030b0: f7fe f9bc bl 800142c <HAL_SPI_MspInit>
- #endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
- }
-
- hspi->State = HAL_SPI_STATE_BUSY;
- 80030b4: 687b ldr r3, [r7, #4]
- 80030b6: 2202 movs r2, #2
- 80030b8: f883 2051 strb.w r2, [r3, #81] ; 0x51
-
- /* Disable the selected SPI peripheral */
- __HAL_SPI_DISABLE(hspi);
- 80030bc: 687b ldr r3, [r7, #4]
- 80030be: 681b ldr r3, [r3, #0]
- 80030c0: 681a ldr r2, [r3, #0]
- 80030c2: 687b ldr r3, [r7, #4]
- 80030c4: 681b ldr r3, [r3, #0]
- 80030c6: f022 0240 bic.w r2, r2, #64 ; 0x40
- 80030ca: 601a str r2, [r3, #0]
-
- /*----------------------- SPIx CR1 & CR2 Configuration ---------------------*/
- /* Configure : SPI Mode, Communication Mode, Data size, Clock polarity and phase, NSS management,
- Communication speed, First bit and CRC calculation state */
- WRITE_REG(hspi->Instance->CR1, ((hspi->Init.Mode & (SPI_CR1_MSTR | SPI_CR1_SSI)) |
- 80030cc: 687b ldr r3, [r7, #4]
- 80030ce: 685b ldr r3, [r3, #4]
- 80030d0: f403 7282 and.w r2, r3, #260 ; 0x104
- 80030d4: 687b ldr r3, [r7, #4]
- 80030d6: 689b ldr r3, [r3, #8]
- 80030d8: f403 4304 and.w r3, r3, #33792 ; 0x8400
- 80030dc: 431a orrs r2, r3
- 80030de: 687b ldr r3, [r7, #4]
- 80030e0: 68db ldr r3, [r3, #12]
- 80030e2: f403 6300 and.w r3, r3, #2048 ; 0x800
- 80030e6: 431a orrs r2, r3
- 80030e8: 687b ldr r3, [r7, #4]
- 80030ea: 691b ldr r3, [r3, #16]
- 80030ec: f003 0302 and.w r3, r3, #2
- 80030f0: 431a orrs r2, r3
- 80030f2: 687b ldr r3, [r7, #4]
- 80030f4: 695b ldr r3, [r3, #20]
- 80030f6: f003 0301 and.w r3, r3, #1
- 80030fa: 431a orrs r2, r3
- 80030fc: 687b ldr r3, [r7, #4]
- 80030fe: 699b ldr r3, [r3, #24]
- 8003100: f403 7300 and.w r3, r3, #512 ; 0x200
- 8003104: 431a orrs r2, r3
- 8003106: 687b ldr r3, [r7, #4]
- 8003108: 69db ldr r3, [r3, #28]
- 800310a: f003 0338 and.w r3, r3, #56 ; 0x38
- 800310e: 431a orrs r2, r3
- 8003110: 687b ldr r3, [r7, #4]
- 8003112: 6a1b ldr r3, [r3, #32]
- 8003114: f003 0380 and.w r3, r3, #128 ; 0x80
- 8003118: ea42 0103 orr.w r1, r2, r3
- 800311c: 687b ldr r3, [r7, #4]
- 800311e: 6a9b ldr r3, [r3, #40] ; 0x28
- 8003120: f403 5200 and.w r2, r3, #8192 ; 0x2000
- 8003124: 687b ldr r3, [r7, #4]
- 8003126: 681b ldr r3, [r3, #0]
- 8003128: 430a orrs r2, r1
- 800312a: 601a str r2, [r3, #0]
- (hspi->Init.FirstBit & SPI_CR1_LSBFIRST) |
- (hspi->Init.CRCCalculation & SPI_CR1_CRCEN)));
-
- #if defined(SPI_CR2_FRF)
- /* Configure : NSS management, TI Mode */
- WRITE_REG(hspi->Instance->CR2, (((hspi->Init.NSS >> 16U) & SPI_CR2_SSOE) | (hspi->Init.TIMode & SPI_CR2_FRF)));
- 800312c: 687b ldr r3, [r7, #4]
- 800312e: 699b ldr r3, [r3, #24]
- 8003130: 0c1b lsrs r3, r3, #16
- 8003132: f003 0104 and.w r1, r3, #4
- 8003136: 687b ldr r3, [r7, #4]
- 8003138: 6a5b ldr r3, [r3, #36] ; 0x24
- 800313a: f003 0210 and.w r2, r3, #16
- 800313e: 687b ldr r3, [r7, #4]
- 8003140: 681b ldr r3, [r3, #0]
- 8003142: 430a orrs r2, r1
- 8003144: 605a str r2, [r3, #4]
- }
- #endif /* USE_SPI_CRC */
-
- #if defined(SPI_I2SCFGR_I2SMOD)
- /* Activate the SPI mode (Make sure that I2SMOD bit in I2SCFGR register is reset) */
- CLEAR_BIT(hspi->Instance->I2SCFGR, SPI_I2SCFGR_I2SMOD);
- 8003146: 687b ldr r3, [r7, #4]
- 8003148: 681b ldr r3, [r3, #0]
- 800314a: 69da ldr r2, [r3, #28]
- 800314c: 687b ldr r3, [r7, #4]
- 800314e: 681b ldr r3, [r3, #0]
- 8003150: f422 6200 bic.w r2, r2, #2048 ; 0x800
- 8003154: 61da str r2, [r3, #28]
- #endif /* SPI_I2SCFGR_I2SMOD */
-
- hspi->ErrorCode = HAL_SPI_ERROR_NONE;
- 8003156: 687b ldr r3, [r7, #4]
- 8003158: 2200 movs r2, #0
- 800315a: 655a str r2, [r3, #84] ; 0x54
- hspi->State = HAL_SPI_STATE_READY;
- 800315c: 687b ldr r3, [r7, #4]
- 800315e: 2201 movs r2, #1
- 8003160: f883 2051 strb.w r2, [r3, #81] ; 0x51
-
- return HAL_OK;
- 8003164: 2300 movs r3, #0
- }
- 8003166: 4618 mov r0, r3
- 8003168: 3708 adds r7, #8
- 800316a: 46bd mov sp, r7
- 800316c: bd80 pop {r7, pc}
-
- 0800316e <HAL_SPI_Transmit>:
- * @param Size amount of data to be sent
- * @param Timeout Timeout duration
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
- {
- 800316e: b580 push {r7, lr}
- 8003170: b088 sub sp, #32
- 8003172: af00 add r7, sp, #0
- 8003174: 60f8 str r0, [r7, #12]
- 8003176: 60b9 str r1, [r7, #8]
- 8003178: 603b str r3, [r7, #0]
- 800317a: 4613 mov r3, r2
- 800317c: 80fb strh r3, [r7, #6]
- uint32_t tickstart;
- HAL_StatusTypeDef errorcode = HAL_OK;
- 800317e: 2300 movs r3, #0
- 8003180: 77fb strb r3, [r7, #31]
-
- /* Check Direction parameter */
- assert_param(IS_SPI_DIRECTION_2LINES_OR_1LINE(hspi->Init.Direction));
-
- /* Process Locked */
- __HAL_LOCK(hspi);
- 8003182: 68fb ldr r3, [r7, #12]
- 8003184: f893 3050 ldrb.w r3, [r3, #80] ; 0x50
- 8003188: 2b01 cmp r3, #1
- 800318a: d101 bne.n 8003190 <HAL_SPI_Transmit+0x22>
- 800318c: 2302 movs r3, #2
- 800318e: e126 b.n 80033de <HAL_SPI_Transmit+0x270>
- 8003190: 68fb ldr r3, [r7, #12]
- 8003192: 2201 movs r2, #1
- 8003194: f883 2050 strb.w r2, [r3, #80] ; 0x50
-
- /* Init tickstart for timeout management*/
- tickstart = HAL_GetTick();
- 8003198: f7fe fae0 bl 800175c <HAL_GetTick>
- 800319c: 61b8 str r0, [r7, #24]
- initial_TxXferCount = Size;
- 800319e: 88fb ldrh r3, [r7, #6]
- 80031a0: 82fb strh r3, [r7, #22]
-
- if (hspi->State != HAL_SPI_STATE_READY)
- 80031a2: 68fb ldr r3, [r7, #12]
- 80031a4: f893 3051 ldrb.w r3, [r3, #81] ; 0x51
- 80031a8: b2db uxtb r3, r3
- 80031aa: 2b01 cmp r3, #1
- 80031ac: d002 beq.n 80031b4 <HAL_SPI_Transmit+0x46>
- {
- errorcode = HAL_BUSY;
- 80031ae: 2302 movs r3, #2
- 80031b0: 77fb strb r3, [r7, #31]
- goto error;
- 80031b2: e10b b.n 80033cc <HAL_SPI_Transmit+0x25e>
- }
-
- if ((pData == NULL) || (Size == 0U))
- 80031b4: 68bb ldr r3, [r7, #8]
- 80031b6: 2b00 cmp r3, #0
- 80031b8: d002 beq.n 80031c0 <HAL_SPI_Transmit+0x52>
- 80031ba: 88fb ldrh r3, [r7, #6]
- 80031bc: 2b00 cmp r3, #0
- 80031be: d102 bne.n 80031c6 <HAL_SPI_Transmit+0x58>
- {
- errorcode = HAL_ERROR;
- 80031c0: 2301 movs r3, #1
- 80031c2: 77fb strb r3, [r7, #31]
- goto error;
- 80031c4: e102 b.n 80033cc <HAL_SPI_Transmit+0x25e>
- }
-
- /* Set the transaction information */
- hspi->State = HAL_SPI_STATE_BUSY_TX;
- 80031c6: 68fb ldr r3, [r7, #12]
- 80031c8: 2203 movs r2, #3
- 80031ca: f883 2051 strb.w r2, [r3, #81] ; 0x51
- hspi->ErrorCode = HAL_SPI_ERROR_NONE;
- 80031ce: 68fb ldr r3, [r7, #12]
- 80031d0: 2200 movs r2, #0
- 80031d2: 655a str r2, [r3, #84] ; 0x54
- hspi->pTxBuffPtr = (uint8_t *)pData;
- 80031d4: 68fb ldr r3, [r7, #12]
- 80031d6: 68ba ldr r2, [r7, #8]
- 80031d8: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferSize = Size;
- 80031da: 68fb ldr r3, [r7, #12]
- 80031dc: 88fa ldrh r2, [r7, #6]
- 80031de: 869a strh r2, [r3, #52] ; 0x34
- hspi->TxXferCount = Size;
- 80031e0: 68fb ldr r3, [r7, #12]
- 80031e2: 88fa ldrh r2, [r7, #6]
- 80031e4: 86da strh r2, [r3, #54] ; 0x36
-
- /*Init field not used in handle to zero */
- hspi->pRxBuffPtr = (uint8_t *)NULL;
- 80031e6: 68fb ldr r3, [r7, #12]
- 80031e8: 2200 movs r2, #0
- 80031ea: 639a str r2, [r3, #56] ; 0x38
- hspi->RxXferSize = 0U;
- 80031ec: 68fb ldr r3, [r7, #12]
- 80031ee: 2200 movs r2, #0
- 80031f0: 879a strh r2, [r3, #60] ; 0x3c
- hspi->RxXferCount = 0U;
- 80031f2: 68fb ldr r3, [r7, #12]
- 80031f4: 2200 movs r2, #0
- 80031f6: 87da strh r2, [r3, #62] ; 0x3e
- hspi->TxISR = NULL;
- 80031f8: 68fb ldr r3, [r7, #12]
- 80031fa: 2200 movs r2, #0
- 80031fc: 645a str r2, [r3, #68] ; 0x44
- hspi->RxISR = NULL;
- 80031fe: 68fb ldr r3, [r7, #12]
- 8003200: 2200 movs r2, #0
- 8003202: 641a str r2, [r3, #64] ; 0x40
-
- /* Configure communication direction : 1Line */
- if (hspi->Init.Direction == SPI_DIRECTION_1LINE)
- 8003204: 68fb ldr r3, [r7, #12]
- 8003206: 689b ldr r3, [r3, #8]
- 8003208: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
- 800320c: d10f bne.n 800322e <HAL_SPI_Transmit+0xc0>
- {
- /* Disable SPI Peripheral before set 1Line direction (BIDIOE bit) */
- __HAL_SPI_DISABLE(hspi);
- 800320e: 68fb ldr r3, [r7, #12]
- 8003210: 681b ldr r3, [r3, #0]
- 8003212: 681a ldr r2, [r3, #0]
- 8003214: 68fb ldr r3, [r7, #12]
- 8003216: 681b ldr r3, [r3, #0]
- 8003218: f022 0240 bic.w r2, r2, #64 ; 0x40
- 800321c: 601a str r2, [r3, #0]
- SPI_1LINE_TX(hspi);
- 800321e: 68fb ldr r3, [r7, #12]
- 8003220: 681b ldr r3, [r3, #0]
- 8003222: 681a ldr r2, [r3, #0]
- 8003224: 68fb ldr r3, [r7, #12]
- 8003226: 681b ldr r3, [r3, #0]
- 8003228: f442 4280 orr.w r2, r2, #16384 ; 0x4000
- 800322c: 601a str r2, [r3, #0]
- SPI_RESET_CRC(hspi);
- }
- #endif /* USE_SPI_CRC */
-
- /* Check if the SPI is already enabled */
- if ((hspi->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE)
- 800322e: 68fb ldr r3, [r7, #12]
- 8003230: 681b ldr r3, [r3, #0]
- 8003232: 681b ldr r3, [r3, #0]
- 8003234: f003 0340 and.w r3, r3, #64 ; 0x40
- 8003238: 2b40 cmp r3, #64 ; 0x40
- 800323a: d007 beq.n 800324c <HAL_SPI_Transmit+0xde>
- {
- /* Enable SPI peripheral */
- __HAL_SPI_ENABLE(hspi);
- 800323c: 68fb ldr r3, [r7, #12]
- 800323e: 681b ldr r3, [r3, #0]
- 8003240: 681a ldr r2, [r3, #0]
- 8003242: 68fb ldr r3, [r7, #12]
- 8003244: 681b ldr r3, [r3, #0]
- 8003246: f042 0240 orr.w r2, r2, #64 ; 0x40
- 800324a: 601a str r2, [r3, #0]
- }
-
- /* Transmit data in 16 Bit mode */
- if (hspi->Init.DataSize == SPI_DATASIZE_16BIT)
- 800324c: 68fb ldr r3, [r7, #12]
- 800324e: 68db ldr r3, [r3, #12]
- 8003250: f5b3 6f00 cmp.w r3, #2048 ; 0x800
- 8003254: d14b bne.n 80032ee <HAL_SPI_Transmit+0x180>
- {
- if ((hspi->Init.Mode == SPI_MODE_SLAVE) || (initial_TxXferCount == 0x01U))
- 8003256: 68fb ldr r3, [r7, #12]
- 8003258: 685b ldr r3, [r3, #4]
- 800325a: 2b00 cmp r3, #0
- 800325c: d002 beq.n 8003264 <HAL_SPI_Transmit+0xf6>
- 800325e: 8afb ldrh r3, [r7, #22]
- 8003260: 2b01 cmp r3, #1
- 8003262: d13e bne.n 80032e2 <HAL_SPI_Transmit+0x174>
- {
- hspi->Instance->DR = *((uint16_t *)hspi->pTxBuffPtr);
- 8003264: 68fb ldr r3, [r7, #12]
- 8003266: 6b1b ldr r3, [r3, #48] ; 0x30
- 8003268: 881a ldrh r2, [r3, #0]
- 800326a: 68fb ldr r3, [r7, #12]
- 800326c: 681b ldr r3, [r3, #0]
- 800326e: 60da str r2, [r3, #12]
- hspi->pTxBuffPtr += sizeof(uint16_t);
- 8003270: 68fb ldr r3, [r7, #12]
- 8003272: 6b1b ldr r3, [r3, #48] ; 0x30
- 8003274: 1c9a adds r2, r3, #2
- 8003276: 68fb ldr r3, [r7, #12]
- 8003278: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 800327a: 68fb ldr r3, [r7, #12]
- 800327c: 8edb ldrh r3, [r3, #54] ; 0x36
- 800327e: b29b uxth r3, r3
- 8003280: 3b01 subs r3, #1
- 8003282: b29a uxth r2, r3
- 8003284: 68fb ldr r3, [r7, #12]
- 8003286: 86da strh r2, [r3, #54] ; 0x36
- }
- /* Transmit data in 16 Bit mode */
- while (hspi->TxXferCount > 0U)
- 8003288: e02b b.n 80032e2 <HAL_SPI_Transmit+0x174>
- {
- /* Wait until TXE flag is set to send data */
- if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE))
- 800328a: 68fb ldr r3, [r7, #12]
- 800328c: 681b ldr r3, [r3, #0]
- 800328e: 689b ldr r3, [r3, #8]
- 8003290: f003 0302 and.w r3, r3, #2
- 8003294: 2b02 cmp r3, #2
- 8003296: d112 bne.n 80032be <HAL_SPI_Transmit+0x150>
- {
- hspi->Instance->DR = *((uint16_t *)hspi->pTxBuffPtr);
- 8003298: 68fb ldr r3, [r7, #12]
- 800329a: 6b1b ldr r3, [r3, #48] ; 0x30
- 800329c: 881a ldrh r2, [r3, #0]
- 800329e: 68fb ldr r3, [r7, #12]
- 80032a0: 681b ldr r3, [r3, #0]
- 80032a2: 60da str r2, [r3, #12]
- hspi->pTxBuffPtr += sizeof(uint16_t);
- 80032a4: 68fb ldr r3, [r7, #12]
- 80032a6: 6b1b ldr r3, [r3, #48] ; 0x30
- 80032a8: 1c9a adds r2, r3, #2
- 80032aa: 68fb ldr r3, [r7, #12]
- 80032ac: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 80032ae: 68fb ldr r3, [r7, #12]
- 80032b0: 8edb ldrh r3, [r3, #54] ; 0x36
- 80032b2: b29b uxth r3, r3
- 80032b4: 3b01 subs r3, #1
- 80032b6: b29a uxth r2, r3
- 80032b8: 68fb ldr r3, [r7, #12]
- 80032ba: 86da strh r2, [r3, #54] ; 0x36
- 80032bc: e011 b.n 80032e2 <HAL_SPI_Transmit+0x174>
- }
- else
- {
- /* Timeout management */
- if ((((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY)) || (Timeout == 0U))
- 80032be: f7fe fa4d bl 800175c <HAL_GetTick>
- 80032c2: 4602 mov r2, r0
- 80032c4: 69bb ldr r3, [r7, #24]
- 80032c6: 1ad3 subs r3, r2, r3
- 80032c8: 683a ldr r2, [r7, #0]
- 80032ca: 429a cmp r2, r3
- 80032cc: d803 bhi.n 80032d6 <HAL_SPI_Transmit+0x168>
- 80032ce: 683b ldr r3, [r7, #0]
- 80032d0: f1b3 3fff cmp.w r3, #4294967295
- 80032d4: d102 bne.n 80032dc <HAL_SPI_Transmit+0x16e>
- 80032d6: 683b ldr r3, [r7, #0]
- 80032d8: 2b00 cmp r3, #0
- 80032da: d102 bne.n 80032e2 <HAL_SPI_Transmit+0x174>
- {
- errorcode = HAL_TIMEOUT;
- 80032dc: 2303 movs r3, #3
- 80032de: 77fb strb r3, [r7, #31]
- goto error;
- 80032e0: e074 b.n 80033cc <HAL_SPI_Transmit+0x25e>
- while (hspi->TxXferCount > 0U)
- 80032e2: 68fb ldr r3, [r7, #12]
- 80032e4: 8edb ldrh r3, [r3, #54] ; 0x36
- 80032e6: b29b uxth r3, r3
- 80032e8: 2b00 cmp r3, #0
- 80032ea: d1ce bne.n 800328a <HAL_SPI_Transmit+0x11c>
- 80032ec: e04c b.n 8003388 <HAL_SPI_Transmit+0x21a>
- }
- }
- /* Transmit data in 8 Bit mode */
- else
- {
- if ((hspi->Init.Mode == SPI_MODE_SLAVE) || (initial_TxXferCount == 0x01U))
- 80032ee: 68fb ldr r3, [r7, #12]
- 80032f0: 685b ldr r3, [r3, #4]
- 80032f2: 2b00 cmp r3, #0
- 80032f4: d002 beq.n 80032fc <HAL_SPI_Transmit+0x18e>
- 80032f6: 8afb ldrh r3, [r7, #22]
- 80032f8: 2b01 cmp r3, #1
- 80032fa: d140 bne.n 800337e <HAL_SPI_Transmit+0x210>
- {
- *((__IO uint8_t *)&hspi->Instance->DR) = (*hspi->pTxBuffPtr);
- 80032fc: 68fb ldr r3, [r7, #12]
- 80032fe: 6b1a ldr r2, [r3, #48] ; 0x30
- 8003300: 68fb ldr r3, [r7, #12]
- 8003302: 681b ldr r3, [r3, #0]
- 8003304: 330c adds r3, #12
- 8003306: 7812 ldrb r2, [r2, #0]
- 8003308: 701a strb r2, [r3, #0]
- hspi->pTxBuffPtr += sizeof(uint8_t);
- 800330a: 68fb ldr r3, [r7, #12]
- 800330c: 6b1b ldr r3, [r3, #48] ; 0x30
- 800330e: 1c5a adds r2, r3, #1
- 8003310: 68fb ldr r3, [r7, #12]
- 8003312: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 8003314: 68fb ldr r3, [r7, #12]
- 8003316: 8edb ldrh r3, [r3, #54] ; 0x36
- 8003318: b29b uxth r3, r3
- 800331a: 3b01 subs r3, #1
- 800331c: b29a uxth r2, r3
- 800331e: 68fb ldr r3, [r7, #12]
- 8003320: 86da strh r2, [r3, #54] ; 0x36
- }
- while (hspi->TxXferCount > 0U)
- 8003322: e02c b.n 800337e <HAL_SPI_Transmit+0x210>
- {
- /* Wait until TXE flag is set to send data */
- if (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE))
- 8003324: 68fb ldr r3, [r7, #12]
- 8003326: 681b ldr r3, [r3, #0]
- 8003328: 689b ldr r3, [r3, #8]
- 800332a: f003 0302 and.w r3, r3, #2
- 800332e: 2b02 cmp r3, #2
- 8003330: d113 bne.n 800335a <HAL_SPI_Transmit+0x1ec>
- {
- *((__IO uint8_t *)&hspi->Instance->DR) = (*hspi->pTxBuffPtr);
- 8003332: 68fb ldr r3, [r7, #12]
- 8003334: 6b1a ldr r2, [r3, #48] ; 0x30
- 8003336: 68fb ldr r3, [r7, #12]
- 8003338: 681b ldr r3, [r3, #0]
- 800333a: 330c adds r3, #12
- 800333c: 7812 ldrb r2, [r2, #0]
- 800333e: 701a strb r2, [r3, #0]
- hspi->pTxBuffPtr += sizeof(uint8_t);
- 8003340: 68fb ldr r3, [r7, #12]
- 8003342: 6b1b ldr r3, [r3, #48] ; 0x30
- 8003344: 1c5a adds r2, r3, #1
- 8003346: 68fb ldr r3, [r7, #12]
- 8003348: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 800334a: 68fb ldr r3, [r7, #12]
- 800334c: 8edb ldrh r3, [r3, #54] ; 0x36
- 800334e: b29b uxth r3, r3
- 8003350: 3b01 subs r3, #1
- 8003352: b29a uxth r2, r3
- 8003354: 68fb ldr r3, [r7, #12]
- 8003356: 86da strh r2, [r3, #54] ; 0x36
- 8003358: e011 b.n 800337e <HAL_SPI_Transmit+0x210>
- }
- else
- {
- /* Timeout management */
- if ((((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY)) || (Timeout == 0U))
- 800335a: f7fe f9ff bl 800175c <HAL_GetTick>
- 800335e: 4602 mov r2, r0
- 8003360: 69bb ldr r3, [r7, #24]
- 8003362: 1ad3 subs r3, r2, r3
- 8003364: 683a ldr r2, [r7, #0]
- 8003366: 429a cmp r2, r3
- 8003368: d803 bhi.n 8003372 <HAL_SPI_Transmit+0x204>
- 800336a: 683b ldr r3, [r7, #0]
- 800336c: f1b3 3fff cmp.w r3, #4294967295
- 8003370: d102 bne.n 8003378 <HAL_SPI_Transmit+0x20a>
- 8003372: 683b ldr r3, [r7, #0]
- 8003374: 2b00 cmp r3, #0
- 8003376: d102 bne.n 800337e <HAL_SPI_Transmit+0x210>
- {
- errorcode = HAL_TIMEOUT;
- 8003378: 2303 movs r3, #3
- 800337a: 77fb strb r3, [r7, #31]
- goto error;
- 800337c: e026 b.n 80033cc <HAL_SPI_Transmit+0x25e>
- while (hspi->TxXferCount > 0U)
- 800337e: 68fb ldr r3, [r7, #12]
- 8003380: 8edb ldrh r3, [r3, #54] ; 0x36
- 8003382: b29b uxth r3, r3
- 8003384: 2b00 cmp r3, #0
- 8003386: d1cd bne.n 8003324 <HAL_SPI_Transmit+0x1b6>
- SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT);
- }
- #endif /* USE_SPI_CRC */
-
- /* Check the end of the transaction */
- if (SPI_EndRxTxTransaction(hspi, Timeout, tickstart) != HAL_OK)
- 8003388: 69ba ldr r2, [r7, #24]
- 800338a: 6839 ldr r1, [r7, #0]
- 800338c: 68f8 ldr r0, [r7, #12]
- 800338e: f000 fa55 bl 800383c <SPI_EndRxTxTransaction>
- 8003392: 4603 mov r3, r0
- 8003394: 2b00 cmp r3, #0
- 8003396: d002 beq.n 800339e <HAL_SPI_Transmit+0x230>
- {
- hspi->ErrorCode = HAL_SPI_ERROR_FLAG;
- 8003398: 68fb ldr r3, [r7, #12]
- 800339a: 2220 movs r2, #32
- 800339c: 655a str r2, [r3, #84] ; 0x54
- }
-
- /* Clear overrun flag in 2 Lines communication mode because received is not read */
- if (hspi->Init.Direction == SPI_DIRECTION_2LINES)
- 800339e: 68fb ldr r3, [r7, #12]
- 80033a0: 689b ldr r3, [r3, #8]
- 80033a2: 2b00 cmp r3, #0
- 80033a4: d10a bne.n 80033bc <HAL_SPI_Transmit+0x24e>
- {
- __HAL_SPI_CLEAR_OVRFLAG(hspi);
- 80033a6: 2300 movs r3, #0
- 80033a8: 613b str r3, [r7, #16]
- 80033aa: 68fb ldr r3, [r7, #12]
- 80033ac: 681b ldr r3, [r3, #0]
- 80033ae: 68db ldr r3, [r3, #12]
- 80033b0: 613b str r3, [r7, #16]
- 80033b2: 68fb ldr r3, [r7, #12]
- 80033b4: 681b ldr r3, [r3, #0]
- 80033b6: 689b ldr r3, [r3, #8]
- 80033b8: 613b str r3, [r7, #16]
- 80033ba: 693b ldr r3, [r7, #16]
- }
-
- if (hspi->ErrorCode != HAL_SPI_ERROR_NONE)
- 80033bc: 68fb ldr r3, [r7, #12]
- 80033be: 6d5b ldr r3, [r3, #84] ; 0x54
- 80033c0: 2b00 cmp r3, #0
- 80033c2: d002 beq.n 80033ca <HAL_SPI_Transmit+0x25c>
- {
- errorcode = HAL_ERROR;
- 80033c4: 2301 movs r3, #1
- 80033c6: 77fb strb r3, [r7, #31]
- 80033c8: e000 b.n 80033cc <HAL_SPI_Transmit+0x25e>
- }
-
- error:
- 80033ca: bf00 nop
- hspi->State = HAL_SPI_STATE_READY;
- 80033cc: 68fb ldr r3, [r7, #12]
- 80033ce: 2201 movs r2, #1
- 80033d0: f883 2051 strb.w r2, [r3, #81] ; 0x51
- /* Process Unlocked */
- __HAL_UNLOCK(hspi);
- 80033d4: 68fb ldr r3, [r7, #12]
- 80033d6: 2200 movs r2, #0
- 80033d8: f883 2050 strb.w r2, [r3, #80] ; 0x50
- return errorcode;
- 80033dc: 7ffb ldrb r3, [r7, #31]
- }
- 80033de: 4618 mov r0, r3
- 80033e0: 3720 adds r7, #32
- 80033e2: 46bd mov sp, r7
- 80033e4: bd80 pop {r7, pc}
-
- 080033e6 <HAL_SPI_TransmitReceive>:
- * @param Timeout Timeout duration
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size,
- uint32_t Timeout)
- {
- 80033e6: b580 push {r7, lr}
- 80033e8: b08c sub sp, #48 ; 0x30
- 80033ea: af00 add r7, sp, #0
- 80033ec: 60f8 str r0, [r7, #12]
- 80033ee: 60b9 str r1, [r7, #8]
- 80033f0: 607a str r2, [r7, #4]
- 80033f2: 807b strh r3, [r7, #2]
- uint32_t tmp_mode;
- HAL_SPI_StateTypeDef tmp_state;
- uint32_t tickstart;
-
- /* Variable used to alternate Rx and Tx during transfer */
- uint32_t txallowed = 1U;
- 80033f4: 2301 movs r3, #1
- 80033f6: 62fb str r3, [r7, #44] ; 0x2c
- HAL_StatusTypeDef errorcode = HAL_OK;
- 80033f8: 2300 movs r3, #0
- 80033fa: f887 302b strb.w r3, [r7, #43] ; 0x2b
-
- /* Check Direction parameter */
- assert_param(IS_SPI_DIRECTION_2LINES(hspi->Init.Direction));
-
- /* Process Locked */
- __HAL_LOCK(hspi);
- 80033fe: 68fb ldr r3, [r7, #12]
- 8003400: f893 3050 ldrb.w r3, [r3, #80] ; 0x50
- 8003404: 2b01 cmp r3, #1
- 8003406: d101 bne.n 800340c <HAL_SPI_TransmitReceive+0x26>
- 8003408: 2302 movs r3, #2
- 800340a: e18a b.n 8003722 <HAL_SPI_TransmitReceive+0x33c>
- 800340c: 68fb ldr r3, [r7, #12]
- 800340e: 2201 movs r2, #1
- 8003410: f883 2050 strb.w r2, [r3, #80] ; 0x50
-
- /* Init tickstart for timeout management*/
- tickstart = HAL_GetTick();
- 8003414: f7fe f9a2 bl 800175c <HAL_GetTick>
- 8003418: 6278 str r0, [r7, #36] ; 0x24
-
- /* Init temporary variables */
- tmp_state = hspi->State;
- 800341a: 68fb ldr r3, [r7, #12]
- 800341c: f893 3051 ldrb.w r3, [r3, #81] ; 0x51
- 8003420: f887 3023 strb.w r3, [r7, #35] ; 0x23
- tmp_mode = hspi->Init.Mode;
- 8003424: 68fb ldr r3, [r7, #12]
- 8003426: 685b ldr r3, [r3, #4]
- 8003428: 61fb str r3, [r7, #28]
- initial_TxXferCount = Size;
- 800342a: 887b ldrh r3, [r7, #2]
- 800342c: 837b strh r3, [r7, #26]
-
- if (!((tmp_state == HAL_SPI_STATE_READY) || \
- 800342e: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
- 8003432: 2b01 cmp r3, #1
- 8003434: d00f beq.n 8003456 <HAL_SPI_TransmitReceive+0x70>
- 8003436: 69fb ldr r3, [r7, #28]
- 8003438: f5b3 7f82 cmp.w r3, #260 ; 0x104
- 800343c: d107 bne.n 800344e <HAL_SPI_TransmitReceive+0x68>
- ((tmp_mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES) && (tmp_state == HAL_SPI_STATE_BUSY_RX))))
- 800343e: 68fb ldr r3, [r7, #12]
- 8003440: 689b ldr r3, [r3, #8]
- 8003442: 2b00 cmp r3, #0
- 8003444: d103 bne.n 800344e <HAL_SPI_TransmitReceive+0x68>
- 8003446: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
- 800344a: 2b04 cmp r3, #4
- 800344c: d003 beq.n 8003456 <HAL_SPI_TransmitReceive+0x70>
- {
- errorcode = HAL_BUSY;
- 800344e: 2302 movs r3, #2
- 8003450: f887 302b strb.w r3, [r7, #43] ; 0x2b
- goto error;
- 8003454: e15b b.n 800370e <HAL_SPI_TransmitReceive+0x328>
- }
-
- if ((pTxData == NULL) || (pRxData == NULL) || (Size == 0U))
- 8003456: 68bb ldr r3, [r7, #8]
- 8003458: 2b00 cmp r3, #0
- 800345a: d005 beq.n 8003468 <HAL_SPI_TransmitReceive+0x82>
- 800345c: 687b ldr r3, [r7, #4]
- 800345e: 2b00 cmp r3, #0
- 8003460: d002 beq.n 8003468 <HAL_SPI_TransmitReceive+0x82>
- 8003462: 887b ldrh r3, [r7, #2]
- 8003464: 2b00 cmp r3, #0
- 8003466: d103 bne.n 8003470 <HAL_SPI_TransmitReceive+0x8a>
- {
- errorcode = HAL_ERROR;
- 8003468: 2301 movs r3, #1
- 800346a: f887 302b strb.w r3, [r7, #43] ; 0x2b
- goto error;
- 800346e: e14e b.n 800370e <HAL_SPI_TransmitReceive+0x328>
- }
-
- /* Don't overwrite in case of HAL_SPI_STATE_BUSY_RX */
- if (hspi->State != HAL_SPI_STATE_BUSY_RX)
- 8003470: 68fb ldr r3, [r7, #12]
- 8003472: f893 3051 ldrb.w r3, [r3, #81] ; 0x51
- 8003476: b2db uxtb r3, r3
- 8003478: 2b04 cmp r3, #4
- 800347a: d003 beq.n 8003484 <HAL_SPI_TransmitReceive+0x9e>
- {
- hspi->State = HAL_SPI_STATE_BUSY_TX_RX;
- 800347c: 68fb ldr r3, [r7, #12]
- 800347e: 2205 movs r2, #5
- 8003480: f883 2051 strb.w r2, [r3, #81] ; 0x51
- }
-
- /* Set the transaction information */
- hspi->ErrorCode = HAL_SPI_ERROR_NONE;
- 8003484: 68fb ldr r3, [r7, #12]
- 8003486: 2200 movs r2, #0
- 8003488: 655a str r2, [r3, #84] ; 0x54
- hspi->pRxBuffPtr = (uint8_t *)pRxData;
- 800348a: 68fb ldr r3, [r7, #12]
- 800348c: 687a ldr r2, [r7, #4]
- 800348e: 639a str r2, [r3, #56] ; 0x38
- hspi->RxXferCount = Size;
- 8003490: 68fb ldr r3, [r7, #12]
- 8003492: 887a ldrh r2, [r7, #2]
- 8003494: 87da strh r2, [r3, #62] ; 0x3e
- hspi->RxXferSize = Size;
- 8003496: 68fb ldr r3, [r7, #12]
- 8003498: 887a ldrh r2, [r7, #2]
- 800349a: 879a strh r2, [r3, #60] ; 0x3c
- hspi->pTxBuffPtr = (uint8_t *)pTxData;
- 800349c: 68fb ldr r3, [r7, #12]
- 800349e: 68ba ldr r2, [r7, #8]
- 80034a0: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount = Size;
- 80034a2: 68fb ldr r3, [r7, #12]
- 80034a4: 887a ldrh r2, [r7, #2]
- 80034a6: 86da strh r2, [r3, #54] ; 0x36
- hspi->TxXferSize = Size;
- 80034a8: 68fb ldr r3, [r7, #12]
- 80034aa: 887a ldrh r2, [r7, #2]
- 80034ac: 869a strh r2, [r3, #52] ; 0x34
-
- /*Init field not used in handle to zero */
- hspi->RxISR = NULL;
- 80034ae: 68fb ldr r3, [r7, #12]
- 80034b0: 2200 movs r2, #0
- 80034b2: 641a str r2, [r3, #64] ; 0x40
- hspi->TxISR = NULL;
- 80034b4: 68fb ldr r3, [r7, #12]
- 80034b6: 2200 movs r2, #0
- 80034b8: 645a str r2, [r3, #68] ; 0x44
- SPI_RESET_CRC(hspi);
- }
- #endif /* USE_SPI_CRC */
-
- /* Check if the SPI is already enabled */
- if ((hspi->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE)
- 80034ba: 68fb ldr r3, [r7, #12]
- 80034bc: 681b ldr r3, [r3, #0]
- 80034be: 681b ldr r3, [r3, #0]
- 80034c0: f003 0340 and.w r3, r3, #64 ; 0x40
- 80034c4: 2b40 cmp r3, #64 ; 0x40
- 80034c6: d007 beq.n 80034d8 <HAL_SPI_TransmitReceive+0xf2>
- {
- /* Enable SPI peripheral */
- __HAL_SPI_ENABLE(hspi);
- 80034c8: 68fb ldr r3, [r7, #12]
- 80034ca: 681b ldr r3, [r3, #0]
- 80034cc: 681a ldr r2, [r3, #0]
- 80034ce: 68fb ldr r3, [r7, #12]
- 80034d0: 681b ldr r3, [r3, #0]
- 80034d2: f042 0240 orr.w r2, r2, #64 ; 0x40
- 80034d6: 601a str r2, [r3, #0]
- }
-
- /* Transmit and Receive data in 16 Bit mode */
- if (hspi->Init.DataSize == SPI_DATASIZE_16BIT)
- 80034d8: 68fb ldr r3, [r7, #12]
- 80034da: 68db ldr r3, [r3, #12]
- 80034dc: f5b3 6f00 cmp.w r3, #2048 ; 0x800
- 80034e0: d178 bne.n 80035d4 <HAL_SPI_TransmitReceive+0x1ee>
- {
- if ((hspi->Init.Mode == SPI_MODE_SLAVE) || (initial_TxXferCount == 0x01U))
- 80034e2: 68fb ldr r3, [r7, #12]
- 80034e4: 685b ldr r3, [r3, #4]
- 80034e6: 2b00 cmp r3, #0
- 80034e8: d002 beq.n 80034f0 <HAL_SPI_TransmitReceive+0x10a>
- 80034ea: 8b7b ldrh r3, [r7, #26]
- 80034ec: 2b01 cmp r3, #1
- 80034ee: d166 bne.n 80035be <HAL_SPI_TransmitReceive+0x1d8>
- {
- hspi->Instance->DR = *((uint16_t *)hspi->pTxBuffPtr);
- 80034f0: 68fb ldr r3, [r7, #12]
- 80034f2: 6b1b ldr r3, [r3, #48] ; 0x30
- 80034f4: 881a ldrh r2, [r3, #0]
- 80034f6: 68fb ldr r3, [r7, #12]
- 80034f8: 681b ldr r3, [r3, #0]
- 80034fa: 60da str r2, [r3, #12]
- hspi->pTxBuffPtr += sizeof(uint16_t);
- 80034fc: 68fb ldr r3, [r7, #12]
- 80034fe: 6b1b ldr r3, [r3, #48] ; 0x30
- 8003500: 1c9a adds r2, r3, #2
- 8003502: 68fb ldr r3, [r7, #12]
- 8003504: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 8003506: 68fb ldr r3, [r7, #12]
- 8003508: 8edb ldrh r3, [r3, #54] ; 0x36
- 800350a: b29b uxth r3, r3
- 800350c: 3b01 subs r3, #1
- 800350e: b29a uxth r2, r3
- 8003510: 68fb ldr r3, [r7, #12]
- 8003512: 86da strh r2, [r3, #54] ; 0x36
- }
- while ((hspi->TxXferCount > 0U) || (hspi->RxXferCount > 0U))
- 8003514: e053 b.n 80035be <HAL_SPI_TransmitReceive+0x1d8>
- {
- /* Check TXE flag */
- if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE)) && (hspi->TxXferCount > 0U) && (txallowed == 1U))
- 8003516: 68fb ldr r3, [r7, #12]
- 8003518: 681b ldr r3, [r3, #0]
- 800351a: 689b ldr r3, [r3, #8]
- 800351c: f003 0302 and.w r3, r3, #2
- 8003520: 2b02 cmp r3, #2
- 8003522: d11b bne.n 800355c <HAL_SPI_TransmitReceive+0x176>
- 8003524: 68fb ldr r3, [r7, #12]
- 8003526: 8edb ldrh r3, [r3, #54] ; 0x36
- 8003528: b29b uxth r3, r3
- 800352a: 2b00 cmp r3, #0
- 800352c: d016 beq.n 800355c <HAL_SPI_TransmitReceive+0x176>
- 800352e: 6afb ldr r3, [r7, #44] ; 0x2c
- 8003530: 2b01 cmp r3, #1
- 8003532: d113 bne.n 800355c <HAL_SPI_TransmitReceive+0x176>
- {
- hspi->Instance->DR = *((uint16_t *)hspi->pTxBuffPtr);
- 8003534: 68fb ldr r3, [r7, #12]
- 8003536: 6b1b ldr r3, [r3, #48] ; 0x30
- 8003538: 881a ldrh r2, [r3, #0]
- 800353a: 68fb ldr r3, [r7, #12]
- 800353c: 681b ldr r3, [r3, #0]
- 800353e: 60da str r2, [r3, #12]
- hspi->pTxBuffPtr += sizeof(uint16_t);
- 8003540: 68fb ldr r3, [r7, #12]
- 8003542: 6b1b ldr r3, [r3, #48] ; 0x30
- 8003544: 1c9a adds r2, r3, #2
- 8003546: 68fb ldr r3, [r7, #12]
- 8003548: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 800354a: 68fb ldr r3, [r7, #12]
- 800354c: 8edb ldrh r3, [r3, #54] ; 0x36
- 800354e: b29b uxth r3, r3
- 8003550: 3b01 subs r3, #1
- 8003552: b29a uxth r2, r3
- 8003554: 68fb ldr r3, [r7, #12]
- 8003556: 86da strh r2, [r3, #54] ; 0x36
- /* Next Data is a reception (Rx). Tx not allowed */
- txallowed = 0U;
- 8003558: 2300 movs r3, #0
- 800355a: 62fb str r3, [r7, #44] ; 0x2c
- }
- #endif /* USE_SPI_CRC */
- }
-
- /* Check RXNE flag */
- if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE)) && (hspi->RxXferCount > 0U))
- 800355c: 68fb ldr r3, [r7, #12]
- 800355e: 681b ldr r3, [r3, #0]
- 8003560: 689b ldr r3, [r3, #8]
- 8003562: f003 0301 and.w r3, r3, #1
- 8003566: 2b01 cmp r3, #1
- 8003568: d119 bne.n 800359e <HAL_SPI_TransmitReceive+0x1b8>
- 800356a: 68fb ldr r3, [r7, #12]
- 800356c: 8fdb ldrh r3, [r3, #62] ; 0x3e
- 800356e: b29b uxth r3, r3
- 8003570: 2b00 cmp r3, #0
- 8003572: d014 beq.n 800359e <HAL_SPI_TransmitReceive+0x1b8>
- {
- *((uint16_t *)hspi->pRxBuffPtr) = (uint16_t)hspi->Instance->DR;
- 8003574: 68fb ldr r3, [r7, #12]
- 8003576: 681b ldr r3, [r3, #0]
- 8003578: 68da ldr r2, [r3, #12]
- 800357a: 68fb ldr r3, [r7, #12]
- 800357c: 6b9b ldr r3, [r3, #56] ; 0x38
- 800357e: b292 uxth r2, r2
- 8003580: 801a strh r2, [r3, #0]
- hspi->pRxBuffPtr += sizeof(uint16_t);
- 8003582: 68fb ldr r3, [r7, #12]
- 8003584: 6b9b ldr r3, [r3, #56] ; 0x38
- 8003586: 1c9a adds r2, r3, #2
- 8003588: 68fb ldr r3, [r7, #12]
- 800358a: 639a str r2, [r3, #56] ; 0x38
- hspi->RxXferCount--;
- 800358c: 68fb ldr r3, [r7, #12]
- 800358e: 8fdb ldrh r3, [r3, #62] ; 0x3e
- 8003590: b29b uxth r3, r3
- 8003592: 3b01 subs r3, #1
- 8003594: b29a uxth r2, r3
- 8003596: 68fb ldr r3, [r7, #12]
- 8003598: 87da strh r2, [r3, #62] ; 0x3e
- /* Next Data is a Transmission (Tx). Tx is allowed */
- txallowed = 1U;
- 800359a: 2301 movs r3, #1
- 800359c: 62fb str r3, [r7, #44] ; 0x2c
- }
- if (((HAL_GetTick() - tickstart) >= Timeout) && (Timeout != HAL_MAX_DELAY))
- 800359e: f7fe f8dd bl 800175c <HAL_GetTick>
- 80035a2: 4602 mov r2, r0
- 80035a4: 6a7b ldr r3, [r7, #36] ; 0x24
- 80035a6: 1ad3 subs r3, r2, r3
- 80035a8: 6bba ldr r2, [r7, #56] ; 0x38
- 80035aa: 429a cmp r2, r3
- 80035ac: d807 bhi.n 80035be <HAL_SPI_TransmitReceive+0x1d8>
- 80035ae: 6bbb ldr r3, [r7, #56] ; 0x38
- 80035b0: f1b3 3fff cmp.w r3, #4294967295
- 80035b4: d003 beq.n 80035be <HAL_SPI_TransmitReceive+0x1d8>
- {
- errorcode = HAL_TIMEOUT;
- 80035b6: 2303 movs r3, #3
- 80035b8: f887 302b strb.w r3, [r7, #43] ; 0x2b
- goto error;
- 80035bc: e0a7 b.n 800370e <HAL_SPI_TransmitReceive+0x328>
- while ((hspi->TxXferCount > 0U) || (hspi->RxXferCount > 0U))
- 80035be: 68fb ldr r3, [r7, #12]
- 80035c0: 8edb ldrh r3, [r3, #54] ; 0x36
- 80035c2: b29b uxth r3, r3
- 80035c4: 2b00 cmp r3, #0
- 80035c6: d1a6 bne.n 8003516 <HAL_SPI_TransmitReceive+0x130>
- 80035c8: 68fb ldr r3, [r7, #12]
- 80035ca: 8fdb ldrh r3, [r3, #62] ; 0x3e
- 80035cc: b29b uxth r3, r3
- 80035ce: 2b00 cmp r3, #0
- 80035d0: d1a1 bne.n 8003516 <HAL_SPI_TransmitReceive+0x130>
- 80035d2: e07c b.n 80036ce <HAL_SPI_TransmitReceive+0x2e8>
- }
- }
- /* Transmit and Receive data in 8 Bit mode */
- else
- {
- if ((hspi->Init.Mode == SPI_MODE_SLAVE) || (initial_TxXferCount == 0x01U))
- 80035d4: 68fb ldr r3, [r7, #12]
- 80035d6: 685b ldr r3, [r3, #4]
- 80035d8: 2b00 cmp r3, #0
- 80035da: d002 beq.n 80035e2 <HAL_SPI_TransmitReceive+0x1fc>
- 80035dc: 8b7b ldrh r3, [r7, #26]
- 80035de: 2b01 cmp r3, #1
- 80035e0: d16b bne.n 80036ba <HAL_SPI_TransmitReceive+0x2d4>
- {
- *((__IO uint8_t *)&hspi->Instance->DR) = (*hspi->pTxBuffPtr);
- 80035e2: 68fb ldr r3, [r7, #12]
- 80035e4: 6b1a ldr r2, [r3, #48] ; 0x30
- 80035e6: 68fb ldr r3, [r7, #12]
- 80035e8: 681b ldr r3, [r3, #0]
- 80035ea: 330c adds r3, #12
- 80035ec: 7812 ldrb r2, [r2, #0]
- 80035ee: 701a strb r2, [r3, #0]
- hspi->pTxBuffPtr += sizeof(uint8_t);
- 80035f0: 68fb ldr r3, [r7, #12]
- 80035f2: 6b1b ldr r3, [r3, #48] ; 0x30
- 80035f4: 1c5a adds r2, r3, #1
- 80035f6: 68fb ldr r3, [r7, #12]
- 80035f8: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 80035fa: 68fb ldr r3, [r7, #12]
- 80035fc: 8edb ldrh r3, [r3, #54] ; 0x36
- 80035fe: b29b uxth r3, r3
- 8003600: 3b01 subs r3, #1
- 8003602: b29a uxth r2, r3
- 8003604: 68fb ldr r3, [r7, #12]
- 8003606: 86da strh r2, [r3, #54] ; 0x36
- }
- while ((hspi->TxXferCount > 0U) || (hspi->RxXferCount > 0U))
- 8003608: e057 b.n 80036ba <HAL_SPI_TransmitReceive+0x2d4>
- {
- /* Check TXE flag */
- if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE)) && (hspi->TxXferCount > 0U) && (txallowed == 1U))
- 800360a: 68fb ldr r3, [r7, #12]
- 800360c: 681b ldr r3, [r3, #0]
- 800360e: 689b ldr r3, [r3, #8]
- 8003610: f003 0302 and.w r3, r3, #2
- 8003614: 2b02 cmp r3, #2
- 8003616: d11c bne.n 8003652 <HAL_SPI_TransmitReceive+0x26c>
- 8003618: 68fb ldr r3, [r7, #12]
- 800361a: 8edb ldrh r3, [r3, #54] ; 0x36
- 800361c: b29b uxth r3, r3
- 800361e: 2b00 cmp r3, #0
- 8003620: d017 beq.n 8003652 <HAL_SPI_TransmitReceive+0x26c>
- 8003622: 6afb ldr r3, [r7, #44] ; 0x2c
- 8003624: 2b01 cmp r3, #1
- 8003626: d114 bne.n 8003652 <HAL_SPI_TransmitReceive+0x26c>
- {
- *(__IO uint8_t *)&hspi->Instance->DR = (*hspi->pTxBuffPtr);
- 8003628: 68fb ldr r3, [r7, #12]
- 800362a: 6b1a ldr r2, [r3, #48] ; 0x30
- 800362c: 68fb ldr r3, [r7, #12]
- 800362e: 681b ldr r3, [r3, #0]
- 8003630: 330c adds r3, #12
- 8003632: 7812 ldrb r2, [r2, #0]
- 8003634: 701a strb r2, [r3, #0]
- hspi->pTxBuffPtr++;
- 8003636: 68fb ldr r3, [r7, #12]
- 8003638: 6b1b ldr r3, [r3, #48] ; 0x30
- 800363a: 1c5a adds r2, r3, #1
- 800363c: 68fb ldr r3, [r7, #12]
- 800363e: 631a str r2, [r3, #48] ; 0x30
- hspi->TxXferCount--;
- 8003640: 68fb ldr r3, [r7, #12]
- 8003642: 8edb ldrh r3, [r3, #54] ; 0x36
- 8003644: b29b uxth r3, r3
- 8003646: 3b01 subs r3, #1
- 8003648: b29a uxth r2, r3
- 800364a: 68fb ldr r3, [r7, #12]
- 800364c: 86da strh r2, [r3, #54] ; 0x36
- /* Next Data is a reception (Rx). Tx not allowed */
- txallowed = 0U;
- 800364e: 2300 movs r3, #0
- 8003650: 62fb str r3, [r7, #44] ; 0x2c
- }
- #endif /* USE_SPI_CRC */
- }
-
- /* Wait until RXNE flag is reset */
- if ((__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE)) && (hspi->RxXferCount > 0U))
- 8003652: 68fb ldr r3, [r7, #12]
- 8003654: 681b ldr r3, [r3, #0]
- 8003656: 689b ldr r3, [r3, #8]
- 8003658: f003 0301 and.w r3, r3, #1
- 800365c: 2b01 cmp r3, #1
- 800365e: d119 bne.n 8003694 <HAL_SPI_TransmitReceive+0x2ae>
- 8003660: 68fb ldr r3, [r7, #12]
- 8003662: 8fdb ldrh r3, [r3, #62] ; 0x3e
- 8003664: b29b uxth r3, r3
- 8003666: 2b00 cmp r3, #0
- 8003668: d014 beq.n 8003694 <HAL_SPI_TransmitReceive+0x2ae>
- {
- (*(uint8_t *)hspi->pRxBuffPtr) = hspi->Instance->DR;
- 800366a: 68fb ldr r3, [r7, #12]
- 800366c: 681b ldr r3, [r3, #0]
- 800366e: 68da ldr r2, [r3, #12]
- 8003670: 68fb ldr r3, [r7, #12]
- 8003672: 6b9b ldr r3, [r3, #56] ; 0x38
- 8003674: b2d2 uxtb r2, r2
- 8003676: 701a strb r2, [r3, #0]
- hspi->pRxBuffPtr++;
- 8003678: 68fb ldr r3, [r7, #12]
- 800367a: 6b9b ldr r3, [r3, #56] ; 0x38
- 800367c: 1c5a adds r2, r3, #1
- 800367e: 68fb ldr r3, [r7, #12]
- 8003680: 639a str r2, [r3, #56] ; 0x38
- hspi->RxXferCount--;
- 8003682: 68fb ldr r3, [r7, #12]
- 8003684: 8fdb ldrh r3, [r3, #62] ; 0x3e
- 8003686: b29b uxth r3, r3
- 8003688: 3b01 subs r3, #1
- 800368a: b29a uxth r2, r3
- 800368c: 68fb ldr r3, [r7, #12]
- 800368e: 87da strh r2, [r3, #62] ; 0x3e
- /* Next Data is a Transmission (Tx). Tx is allowed */
- txallowed = 1U;
- 8003690: 2301 movs r3, #1
- 8003692: 62fb str r3, [r7, #44] ; 0x2c
- }
- if ((((HAL_GetTick() - tickstart) >= Timeout) && ((Timeout != HAL_MAX_DELAY))) || (Timeout == 0U))
- 8003694: f7fe f862 bl 800175c <HAL_GetTick>
- 8003698: 4602 mov r2, r0
- 800369a: 6a7b ldr r3, [r7, #36] ; 0x24
- 800369c: 1ad3 subs r3, r2, r3
- 800369e: 6bba ldr r2, [r7, #56] ; 0x38
- 80036a0: 429a cmp r2, r3
- 80036a2: d803 bhi.n 80036ac <HAL_SPI_TransmitReceive+0x2c6>
- 80036a4: 6bbb ldr r3, [r7, #56] ; 0x38
- 80036a6: f1b3 3fff cmp.w r3, #4294967295
- 80036aa: d102 bne.n 80036b2 <HAL_SPI_TransmitReceive+0x2cc>
- 80036ac: 6bbb ldr r3, [r7, #56] ; 0x38
- 80036ae: 2b00 cmp r3, #0
- 80036b0: d103 bne.n 80036ba <HAL_SPI_TransmitReceive+0x2d4>
- {
- errorcode = HAL_TIMEOUT;
- 80036b2: 2303 movs r3, #3
- 80036b4: f887 302b strb.w r3, [r7, #43] ; 0x2b
- goto error;
- 80036b8: e029 b.n 800370e <HAL_SPI_TransmitReceive+0x328>
- while ((hspi->TxXferCount > 0U) || (hspi->RxXferCount > 0U))
- 80036ba: 68fb ldr r3, [r7, #12]
- 80036bc: 8edb ldrh r3, [r3, #54] ; 0x36
- 80036be: b29b uxth r3, r3
- 80036c0: 2b00 cmp r3, #0
- 80036c2: d1a2 bne.n 800360a <HAL_SPI_TransmitReceive+0x224>
- 80036c4: 68fb ldr r3, [r7, #12]
- 80036c6: 8fdb ldrh r3, [r3, #62] ; 0x3e
- 80036c8: b29b uxth r3, r3
- 80036ca: 2b00 cmp r3, #0
- 80036cc: d19d bne.n 800360a <HAL_SPI_TransmitReceive+0x224>
- errorcode = HAL_ERROR;
- }
- #endif /* USE_SPI_CRC */
-
- /* Check the end of the transaction */
- if (SPI_EndRxTxTransaction(hspi, Timeout, tickstart) != HAL_OK)
- 80036ce: 6a7a ldr r2, [r7, #36] ; 0x24
- 80036d0: 6bb9 ldr r1, [r7, #56] ; 0x38
- 80036d2: 68f8 ldr r0, [r7, #12]
- 80036d4: f000 f8b2 bl 800383c <SPI_EndRxTxTransaction>
- 80036d8: 4603 mov r3, r0
- 80036da: 2b00 cmp r3, #0
- 80036dc: d006 beq.n 80036ec <HAL_SPI_TransmitReceive+0x306>
- {
- errorcode = HAL_ERROR;
- 80036de: 2301 movs r3, #1
- 80036e0: f887 302b strb.w r3, [r7, #43] ; 0x2b
- hspi->ErrorCode = HAL_SPI_ERROR_FLAG;
- 80036e4: 68fb ldr r3, [r7, #12]
- 80036e6: 2220 movs r2, #32
- 80036e8: 655a str r2, [r3, #84] ; 0x54
- goto error;
- 80036ea: e010 b.n 800370e <HAL_SPI_TransmitReceive+0x328>
- }
-
- /* Clear overrun flag in 2 Lines communication mode because received is not read */
- if (hspi->Init.Direction == SPI_DIRECTION_2LINES)
- 80036ec: 68fb ldr r3, [r7, #12]
- 80036ee: 689b ldr r3, [r3, #8]
- 80036f0: 2b00 cmp r3, #0
- 80036f2: d10b bne.n 800370c <HAL_SPI_TransmitReceive+0x326>
- {
- __HAL_SPI_CLEAR_OVRFLAG(hspi);
- 80036f4: 2300 movs r3, #0
- 80036f6: 617b str r3, [r7, #20]
- 80036f8: 68fb ldr r3, [r7, #12]
- 80036fa: 681b ldr r3, [r3, #0]
- 80036fc: 68db ldr r3, [r3, #12]
- 80036fe: 617b str r3, [r7, #20]
- 8003700: 68fb ldr r3, [r7, #12]
- 8003702: 681b ldr r3, [r3, #0]
- 8003704: 689b ldr r3, [r3, #8]
- 8003706: 617b str r3, [r7, #20]
- 8003708: 697b ldr r3, [r7, #20]
- 800370a: e000 b.n 800370e <HAL_SPI_TransmitReceive+0x328>
- }
-
- error :
- 800370c: bf00 nop
- hspi->State = HAL_SPI_STATE_READY;
- 800370e: 68fb ldr r3, [r7, #12]
- 8003710: 2201 movs r2, #1
- 8003712: f883 2051 strb.w r2, [r3, #81] ; 0x51
- __HAL_UNLOCK(hspi);
- 8003716: 68fb ldr r3, [r7, #12]
- 8003718: 2200 movs r2, #0
- 800371a: f883 2050 strb.w r2, [r3, #80] ; 0x50
- return errorcode;
- 800371e: f897 302b ldrb.w r3, [r7, #43] ; 0x2b
- }
- 8003722: 4618 mov r0, r3
- 8003724: 3730 adds r7, #48 ; 0x30
- 8003726: 46bd mov sp, r7
- 8003728: bd80 pop {r7, pc}
- ...
-
- 0800372c <SPI_WaitFlagStateUntilTimeout>:
- * @param Tickstart tick start value
- * @retval HAL status
- */
- static HAL_StatusTypeDef SPI_WaitFlagStateUntilTimeout(SPI_HandleTypeDef *hspi, uint32_t Flag, FlagStatus State,
- uint32_t Timeout, uint32_t Tickstart)
- {
- 800372c: b580 push {r7, lr}
- 800372e: b088 sub sp, #32
- 8003730: af00 add r7, sp, #0
- 8003732: 60f8 str r0, [r7, #12]
- 8003734: 60b9 str r1, [r7, #8]
- 8003736: 603b str r3, [r7, #0]
- 8003738: 4613 mov r3, r2
- 800373a: 71fb strb r3, [r7, #7]
- __IO uint32_t count;
- uint32_t tmp_timeout;
- uint32_t tmp_tickstart;
-
- /* Adjust Timeout value in case of end of transfer */
- tmp_timeout = Timeout - (HAL_GetTick() - Tickstart);
- 800373c: f7fe f80e bl 800175c <HAL_GetTick>
- 8003740: 4602 mov r2, r0
- 8003742: 6abb ldr r3, [r7, #40] ; 0x28
- 8003744: 1a9b subs r3, r3, r2
- 8003746: 683a ldr r2, [r7, #0]
- 8003748: 4413 add r3, r2
- 800374a: 61fb str r3, [r7, #28]
- tmp_tickstart = HAL_GetTick();
- 800374c: f7fe f806 bl 800175c <HAL_GetTick>
- 8003750: 61b8 str r0, [r7, #24]
-
- /* Calculate Timeout based on a software loop to avoid blocking issue if Systick is disabled */
- count = tmp_timeout * ((SystemCoreClock * 32U) >> 20U);
- 8003752: 4b39 ldr r3, [pc, #228] ; (8003838 <SPI_WaitFlagStateUntilTimeout+0x10c>)
- 8003754: 681b ldr r3, [r3, #0]
- 8003756: 015b lsls r3, r3, #5
- 8003758: 0d1b lsrs r3, r3, #20
- 800375a: 69fa ldr r2, [r7, #28]
- 800375c: fb02 f303 mul.w r3, r2, r3
- 8003760: 617b str r3, [r7, #20]
-
- while ((__HAL_SPI_GET_FLAG(hspi, Flag) ? SET : RESET) != State)
- 8003762: e054 b.n 800380e <SPI_WaitFlagStateUntilTimeout+0xe2>
- {
- if (Timeout != HAL_MAX_DELAY)
- 8003764: 683b ldr r3, [r7, #0]
- 8003766: f1b3 3fff cmp.w r3, #4294967295
- 800376a: d050 beq.n 800380e <SPI_WaitFlagStateUntilTimeout+0xe2>
- {
- if (((HAL_GetTick() - tmp_tickstart) >= tmp_timeout) || (tmp_timeout == 0U))
- 800376c: f7fd fff6 bl 800175c <HAL_GetTick>
- 8003770: 4602 mov r2, r0
- 8003772: 69bb ldr r3, [r7, #24]
- 8003774: 1ad3 subs r3, r2, r3
- 8003776: 69fa ldr r2, [r7, #28]
- 8003778: 429a cmp r2, r3
- 800377a: d902 bls.n 8003782 <SPI_WaitFlagStateUntilTimeout+0x56>
- 800377c: 69fb ldr r3, [r7, #28]
- 800377e: 2b00 cmp r3, #0
- 8003780: d13d bne.n 80037fe <SPI_WaitFlagStateUntilTimeout+0xd2>
- /* Disable the SPI and reset the CRC: the CRC value should be cleared
- on both master and slave sides in order to resynchronize the master
- and slave for their respective CRC calculation */
-
- /* Disable TXE, RXNE and ERR interrupts for the interrupt process */
- __HAL_SPI_DISABLE_IT(hspi, (SPI_IT_TXE | SPI_IT_RXNE | SPI_IT_ERR));
- 8003782: 68fb ldr r3, [r7, #12]
- 8003784: 681b ldr r3, [r3, #0]
- 8003786: 685a ldr r2, [r3, #4]
- 8003788: 68fb ldr r3, [r7, #12]
- 800378a: 681b ldr r3, [r3, #0]
- 800378c: f022 02e0 bic.w r2, r2, #224 ; 0xe0
- 8003790: 605a str r2, [r3, #4]
-
- if ((hspi->Init.Mode == SPI_MODE_MASTER) && ((hspi->Init.Direction == SPI_DIRECTION_1LINE)
- 8003792: 68fb ldr r3, [r7, #12]
- 8003794: 685b ldr r3, [r3, #4]
- 8003796: f5b3 7f82 cmp.w r3, #260 ; 0x104
- 800379a: d111 bne.n 80037c0 <SPI_WaitFlagStateUntilTimeout+0x94>
- 800379c: 68fb ldr r3, [r7, #12]
- 800379e: 689b ldr r3, [r3, #8]
- 80037a0: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
- 80037a4: d004 beq.n 80037b0 <SPI_WaitFlagStateUntilTimeout+0x84>
- || (hspi->Init.Direction == SPI_DIRECTION_2LINES_RXONLY)))
- 80037a6: 68fb ldr r3, [r7, #12]
- 80037a8: 689b ldr r3, [r3, #8]
- 80037aa: f5b3 6f80 cmp.w r3, #1024 ; 0x400
- 80037ae: d107 bne.n 80037c0 <SPI_WaitFlagStateUntilTimeout+0x94>
- {
- /* Disable SPI peripheral */
- __HAL_SPI_DISABLE(hspi);
- 80037b0: 68fb ldr r3, [r7, #12]
- 80037b2: 681b ldr r3, [r3, #0]
- 80037b4: 681a ldr r2, [r3, #0]
- 80037b6: 68fb ldr r3, [r7, #12]
- 80037b8: 681b ldr r3, [r3, #0]
- 80037ba: f022 0240 bic.w r2, r2, #64 ; 0x40
- 80037be: 601a str r2, [r3, #0]
- }
-
- /* Reset CRC Calculation */
- if (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)
- 80037c0: 68fb ldr r3, [r7, #12]
- 80037c2: 6a9b ldr r3, [r3, #40] ; 0x28
- 80037c4: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
- 80037c8: d10f bne.n 80037ea <SPI_WaitFlagStateUntilTimeout+0xbe>
- {
- SPI_RESET_CRC(hspi);
- 80037ca: 68fb ldr r3, [r7, #12]
- 80037cc: 681b ldr r3, [r3, #0]
- 80037ce: 681a ldr r2, [r3, #0]
- 80037d0: 68fb ldr r3, [r7, #12]
- 80037d2: 681b ldr r3, [r3, #0]
- 80037d4: f422 5200 bic.w r2, r2, #8192 ; 0x2000
- 80037d8: 601a str r2, [r3, #0]
- 80037da: 68fb ldr r3, [r7, #12]
- 80037dc: 681b ldr r3, [r3, #0]
- 80037de: 681a ldr r2, [r3, #0]
- 80037e0: 68fb ldr r3, [r7, #12]
- 80037e2: 681b ldr r3, [r3, #0]
- 80037e4: f442 5200 orr.w r2, r2, #8192 ; 0x2000
- 80037e8: 601a str r2, [r3, #0]
- }
-
- hspi->State = HAL_SPI_STATE_READY;
- 80037ea: 68fb ldr r3, [r7, #12]
- 80037ec: 2201 movs r2, #1
- 80037ee: f883 2051 strb.w r2, [r3, #81] ; 0x51
-
- /* Process Unlocked */
- __HAL_UNLOCK(hspi);
- 80037f2: 68fb ldr r3, [r7, #12]
- 80037f4: 2200 movs r2, #0
- 80037f6: f883 2050 strb.w r2, [r3, #80] ; 0x50
-
- return HAL_TIMEOUT;
- 80037fa: 2303 movs r3, #3
- 80037fc: e017 b.n 800382e <SPI_WaitFlagStateUntilTimeout+0x102>
- }
- /* If Systick is disabled or not incremented, deactivate timeout to go in disable loop procedure */
- if(count == 0U)
- 80037fe: 697b ldr r3, [r7, #20]
- 8003800: 2b00 cmp r3, #0
- 8003802: d101 bne.n 8003808 <SPI_WaitFlagStateUntilTimeout+0xdc>
- {
- tmp_timeout = 0U;
- 8003804: 2300 movs r3, #0
- 8003806: 61fb str r3, [r7, #28]
- }
- count--;
- 8003808: 697b ldr r3, [r7, #20]
- 800380a: 3b01 subs r3, #1
- 800380c: 617b str r3, [r7, #20]
- while ((__HAL_SPI_GET_FLAG(hspi, Flag) ? SET : RESET) != State)
- 800380e: 68fb ldr r3, [r7, #12]
- 8003810: 681b ldr r3, [r3, #0]
- 8003812: 689a ldr r2, [r3, #8]
- 8003814: 68bb ldr r3, [r7, #8]
- 8003816: 4013 ands r3, r2
- 8003818: 68ba ldr r2, [r7, #8]
- 800381a: 429a cmp r2, r3
- 800381c: bf0c ite eq
- 800381e: 2301 moveq r3, #1
- 8003820: 2300 movne r3, #0
- 8003822: b2db uxtb r3, r3
- 8003824: 461a mov r2, r3
- 8003826: 79fb ldrb r3, [r7, #7]
- 8003828: 429a cmp r2, r3
- 800382a: d19b bne.n 8003764 <SPI_WaitFlagStateUntilTimeout+0x38>
- }
- }
-
- return HAL_OK;
- 800382c: 2300 movs r3, #0
- }
- 800382e: 4618 mov r0, r3
- 8003830: 3720 adds r7, #32
- 8003832: 46bd mov sp, r7
- 8003834: bd80 pop {r7, pc}
- 8003836: bf00 nop
- 8003838: 20000004 .word 0x20000004
-
- 0800383c <SPI_EndRxTxTransaction>:
- * @param Timeout Timeout duration
- * @param Tickstart tick start value
- * @retval HAL status
- */
- static HAL_StatusTypeDef SPI_EndRxTxTransaction(SPI_HandleTypeDef *hspi, uint32_t Timeout, uint32_t Tickstart)
- {
- 800383c: b580 push {r7, lr}
- 800383e: b088 sub sp, #32
- 8003840: af02 add r7, sp, #8
- 8003842: 60f8 str r0, [r7, #12]
- 8003844: 60b9 str r1, [r7, #8]
- 8003846: 607a str r2, [r7, #4]
- /* Timeout in µs */
- __IO uint32_t count = SPI_BSY_FLAG_WORKAROUND_TIMEOUT * (SystemCoreClock / 24U / 1000000U);
- 8003848: 4b1b ldr r3, [pc, #108] ; (80038b8 <SPI_EndRxTxTransaction+0x7c>)
- 800384a: 681b ldr r3, [r3, #0]
- 800384c: 4a1b ldr r2, [pc, #108] ; (80038bc <SPI_EndRxTxTransaction+0x80>)
- 800384e: fba2 2303 umull r2, r3, r2, r3
- 8003852: 0d5b lsrs r3, r3, #21
- 8003854: f44f 727a mov.w r2, #1000 ; 0x3e8
- 8003858: fb02 f303 mul.w r3, r2, r3
- 800385c: 617b str r3, [r7, #20]
- /* Erratasheet: BSY bit may stay high at the end of a data transfer in Slave mode */
- if (hspi->Init.Mode == SPI_MODE_MASTER)
- 800385e: 68fb ldr r3, [r7, #12]
- 8003860: 685b ldr r3, [r3, #4]
- 8003862: f5b3 7f82 cmp.w r3, #260 ; 0x104
- 8003866: d112 bne.n 800388e <SPI_EndRxTxTransaction+0x52>
- {
- /* Control the BSY flag */
- if (SPI_WaitFlagStateUntilTimeout(hspi, SPI_FLAG_BSY, RESET, Timeout, Tickstart) != HAL_OK)
- 8003868: 687b ldr r3, [r7, #4]
- 800386a: 9300 str r3, [sp, #0]
- 800386c: 68bb ldr r3, [r7, #8]
- 800386e: 2200 movs r2, #0
- 8003870: 2180 movs r1, #128 ; 0x80
- 8003872: 68f8 ldr r0, [r7, #12]
- 8003874: f7ff ff5a bl 800372c <SPI_WaitFlagStateUntilTimeout>
- 8003878: 4603 mov r3, r0
- 800387a: 2b00 cmp r3, #0
- 800387c: d016 beq.n 80038ac <SPI_EndRxTxTransaction+0x70>
- {
- SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG);
- 800387e: 68fb ldr r3, [r7, #12]
- 8003880: 6d5b ldr r3, [r3, #84] ; 0x54
- 8003882: f043 0220 orr.w r2, r3, #32
- 8003886: 68fb ldr r3, [r7, #12]
- 8003888: 655a str r2, [r3, #84] ; 0x54
- return HAL_TIMEOUT;
- 800388a: 2303 movs r3, #3
- 800388c: e00f b.n 80038ae <SPI_EndRxTxTransaction+0x72>
- * User have to calculate the timeout value to fit with the time of 1 byte transfer.
- * This time is directly link with the SPI clock from Master device.
- */
- do
- {
- if (count == 0U)
- 800388e: 697b ldr r3, [r7, #20]
- 8003890: 2b00 cmp r3, #0
- 8003892: d00a beq.n 80038aa <SPI_EndRxTxTransaction+0x6e>
- {
- break;
- }
- count--;
- 8003894: 697b ldr r3, [r7, #20]
- 8003896: 3b01 subs r3, #1
- 8003898: 617b str r3, [r7, #20]
- } while (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_BSY) != RESET);
- 800389a: 68fb ldr r3, [r7, #12]
- 800389c: 681b ldr r3, [r3, #0]
- 800389e: 689b ldr r3, [r3, #8]
- 80038a0: f003 0380 and.w r3, r3, #128 ; 0x80
- 80038a4: 2b80 cmp r3, #128 ; 0x80
- 80038a6: d0f2 beq.n 800388e <SPI_EndRxTxTransaction+0x52>
- 80038a8: e000 b.n 80038ac <SPI_EndRxTxTransaction+0x70>
- break;
- 80038aa: bf00 nop
- }
-
- return HAL_OK;
- 80038ac: 2300 movs r3, #0
- }
- 80038ae: 4618 mov r0, r3
- 80038b0: 3718 adds r7, #24
- 80038b2: 46bd mov sp, r7
- 80038b4: bd80 pop {r7, pc}
- 80038b6: bf00 nop
- 80038b8: 20000004 .word 0x20000004
- 80038bc: 165e9f81 .word 0x165e9f81
-
- 080038c0 <HAL_UART_Init>:
- * @param huart Pointer to a UART_HandleTypeDef structure that contains
- * the configuration information for the specified UART module.
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
- {
- 80038c0: b580 push {r7, lr}
- 80038c2: b082 sub sp, #8
- 80038c4: af00 add r7, sp, #0
- 80038c6: 6078 str r0, [r7, #4]
- /* Check the UART handle allocation */
- if (huart == NULL)
- 80038c8: 687b ldr r3, [r7, #4]
- 80038ca: 2b00 cmp r3, #0
- 80038cc: d101 bne.n 80038d2 <HAL_UART_Init+0x12>
- {
- return HAL_ERROR;
- 80038ce: 2301 movs r3, #1
- 80038d0: e03f b.n 8003952 <HAL_UART_Init+0x92>
- assert_param(IS_UART_INSTANCE(huart->Instance));
- }
- assert_param(IS_UART_WORD_LENGTH(huart->Init.WordLength));
- assert_param(IS_UART_OVERSAMPLING(huart->Init.OverSampling));
-
- if (huart->gState == HAL_UART_STATE_RESET)
- 80038d2: 687b ldr r3, [r7, #4]
- 80038d4: f893 3039 ldrb.w r3, [r3, #57] ; 0x39
- 80038d8: b2db uxtb r3, r3
- 80038da: 2b00 cmp r3, #0
- 80038dc: d106 bne.n 80038ec <HAL_UART_Init+0x2c>
- {
- /* Allocate lock resource and initialize it */
- huart->Lock = HAL_UNLOCKED;
- 80038de: 687b ldr r3, [r7, #4]
- 80038e0: 2200 movs r2, #0
- 80038e2: f883 2038 strb.w r2, [r3, #56] ; 0x38
-
- /* Init the low level hardware */
- huart->MspInitCallback(huart);
- #else
- /* Init the low level hardware : GPIO, CLOCK */
- HAL_UART_MspInit(huart);
- 80038e6: 6878 ldr r0, [r7, #4]
- 80038e8: f7fd fde4 bl 80014b4 <HAL_UART_MspInit>
- #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
- }
-
- huart->gState = HAL_UART_STATE_BUSY;
- 80038ec: 687b ldr r3, [r7, #4]
- 80038ee: 2224 movs r2, #36 ; 0x24
- 80038f0: f883 2039 strb.w r2, [r3, #57] ; 0x39
-
- /* Disable the peripheral */
- __HAL_UART_DISABLE(huart);
- 80038f4: 687b ldr r3, [r7, #4]
- 80038f6: 681b ldr r3, [r3, #0]
- 80038f8: 68da ldr r2, [r3, #12]
- 80038fa: 687b ldr r3, [r7, #4]
- 80038fc: 681b ldr r3, [r3, #0]
- 80038fe: f422 5200 bic.w r2, r2, #8192 ; 0x2000
- 8003902: 60da str r2, [r3, #12]
-
- /* Set the UART Communication parameters */
- UART_SetConfig(huart);
- 8003904: 6878 ldr r0, [r7, #4]
- 8003906: f000 f90b bl 8003b20 <UART_SetConfig>
-
- /* In asynchronous mode, the following bits must be kept cleared:
- - LINEN and CLKEN bits in the USART_CR2 register,
- - SCEN, HDSEL and IREN bits in the USART_CR3 register.*/
- CLEAR_BIT(huart->Instance->CR2, (USART_CR2_LINEN | USART_CR2_CLKEN));
- 800390a: 687b ldr r3, [r7, #4]
- 800390c: 681b ldr r3, [r3, #0]
- 800390e: 691a ldr r2, [r3, #16]
- 8003910: 687b ldr r3, [r7, #4]
- 8003912: 681b ldr r3, [r3, #0]
- 8003914: f422 4290 bic.w r2, r2, #18432 ; 0x4800
- 8003918: 611a str r2, [r3, #16]
- CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN));
- 800391a: 687b ldr r3, [r7, #4]
- 800391c: 681b ldr r3, [r3, #0]
- 800391e: 695a ldr r2, [r3, #20]
- 8003920: 687b ldr r3, [r7, #4]
- 8003922: 681b ldr r3, [r3, #0]
- 8003924: f022 022a bic.w r2, r2, #42 ; 0x2a
- 8003928: 615a str r2, [r3, #20]
-
- /* Enable the peripheral */
- __HAL_UART_ENABLE(huart);
- 800392a: 687b ldr r3, [r7, #4]
- 800392c: 681b ldr r3, [r3, #0]
- 800392e: 68da ldr r2, [r3, #12]
- 8003930: 687b ldr r3, [r7, #4]
- 8003932: 681b ldr r3, [r3, #0]
- 8003934: f442 5200 orr.w r2, r2, #8192 ; 0x2000
- 8003938: 60da str r2, [r3, #12]
-
- /* Initialize the UART state */
- huart->ErrorCode = HAL_UART_ERROR_NONE;
- 800393a: 687b ldr r3, [r7, #4]
- 800393c: 2200 movs r2, #0
- 800393e: 63da str r2, [r3, #60] ; 0x3c
- huart->gState = HAL_UART_STATE_READY;
- 8003940: 687b ldr r3, [r7, #4]
- 8003942: 2220 movs r2, #32
- 8003944: f883 2039 strb.w r2, [r3, #57] ; 0x39
- huart->RxState = HAL_UART_STATE_READY;
- 8003948: 687b ldr r3, [r7, #4]
- 800394a: 2220 movs r2, #32
- 800394c: f883 203a strb.w r2, [r3, #58] ; 0x3a
-
- return HAL_OK;
- 8003950: 2300 movs r3, #0
- }
- 8003952: 4618 mov r0, r3
- 8003954: 3708 adds r7, #8
- 8003956: 46bd mov sp, r7
- 8003958: bd80 pop {r7, pc}
-
- 0800395a <HAL_UART_Transmit>:
- * @param Size Amount of data elements (u8 or u16) to be sent
- * @param Timeout Timeout duration
- * @retval HAL status
- */
- HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout)
- {
- 800395a: b580 push {r7, lr}
- 800395c: b088 sub sp, #32
- 800395e: af02 add r7, sp, #8
- 8003960: 60f8 str r0, [r7, #12]
- 8003962: 60b9 str r1, [r7, #8]
- 8003964: 603b str r3, [r7, #0]
- 8003966: 4613 mov r3, r2
- 8003968: 80fb strh r3, [r7, #6]
- uint16_t *tmp;
- uint32_t tickstart = 0U;
- 800396a: 2300 movs r3, #0
- 800396c: 617b str r3, [r7, #20]
-
- /* Check that a Tx process is not already ongoing */
- if (huart->gState == HAL_UART_STATE_READY)
- 800396e: 68fb ldr r3, [r7, #12]
- 8003970: f893 3039 ldrb.w r3, [r3, #57] ; 0x39
- 8003974: b2db uxtb r3, r3
- 8003976: 2b20 cmp r3, #32
- 8003978: f040 8083 bne.w 8003a82 <HAL_UART_Transmit+0x128>
- {
- if ((pData == NULL) || (Size == 0U))
- 800397c: 68bb ldr r3, [r7, #8]
- 800397e: 2b00 cmp r3, #0
- 8003980: d002 beq.n 8003988 <HAL_UART_Transmit+0x2e>
- 8003982: 88fb ldrh r3, [r7, #6]
- 8003984: 2b00 cmp r3, #0
- 8003986: d101 bne.n 800398c <HAL_UART_Transmit+0x32>
- {
- return HAL_ERROR;
- 8003988: 2301 movs r3, #1
- 800398a: e07b b.n 8003a84 <HAL_UART_Transmit+0x12a>
- }
-
- /* Process Locked */
- __HAL_LOCK(huart);
- 800398c: 68fb ldr r3, [r7, #12]
- 800398e: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
- 8003992: 2b01 cmp r3, #1
- 8003994: d101 bne.n 800399a <HAL_UART_Transmit+0x40>
- 8003996: 2302 movs r3, #2
- 8003998: e074 b.n 8003a84 <HAL_UART_Transmit+0x12a>
- 800399a: 68fb ldr r3, [r7, #12]
- 800399c: 2201 movs r2, #1
- 800399e: f883 2038 strb.w r2, [r3, #56] ; 0x38
-
- huart->ErrorCode = HAL_UART_ERROR_NONE;
- 80039a2: 68fb ldr r3, [r7, #12]
- 80039a4: 2200 movs r2, #0
- 80039a6: 63da str r2, [r3, #60] ; 0x3c
- huart->gState = HAL_UART_STATE_BUSY_TX;
- 80039a8: 68fb ldr r3, [r7, #12]
- 80039aa: 2221 movs r2, #33 ; 0x21
- 80039ac: f883 2039 strb.w r2, [r3, #57] ; 0x39
-
- /* Init tickstart for timeout managment */
- tickstart = HAL_GetTick();
- 80039b0: f7fd fed4 bl 800175c <HAL_GetTick>
- 80039b4: 6178 str r0, [r7, #20]
-
- huart->TxXferSize = Size;
- 80039b6: 68fb ldr r3, [r7, #12]
- 80039b8: 88fa ldrh r2, [r7, #6]
- 80039ba: 849a strh r2, [r3, #36] ; 0x24
- huart->TxXferCount = Size;
- 80039bc: 68fb ldr r3, [r7, #12]
- 80039be: 88fa ldrh r2, [r7, #6]
- 80039c0: 84da strh r2, [r3, #38] ; 0x26
-
- /* Process Unlocked */
- __HAL_UNLOCK(huart);
- 80039c2: 68fb ldr r3, [r7, #12]
- 80039c4: 2200 movs r2, #0
- 80039c6: f883 2038 strb.w r2, [r3, #56] ; 0x38
-
- while (huart->TxXferCount > 0U)
- 80039ca: e042 b.n 8003a52 <HAL_UART_Transmit+0xf8>
- {
- huart->TxXferCount--;
- 80039cc: 68fb ldr r3, [r7, #12]
- 80039ce: 8cdb ldrh r3, [r3, #38] ; 0x26
- 80039d0: b29b uxth r3, r3
- 80039d2: 3b01 subs r3, #1
- 80039d4: b29a uxth r2, r3
- 80039d6: 68fb ldr r3, [r7, #12]
- 80039d8: 84da strh r2, [r3, #38] ; 0x26
- if (huart->Init.WordLength == UART_WORDLENGTH_9B)
- 80039da: 68fb ldr r3, [r7, #12]
- 80039dc: 689b ldr r3, [r3, #8]
- 80039de: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
- 80039e2: d122 bne.n 8003a2a <HAL_UART_Transmit+0xd0>
- {
- if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK)
- 80039e4: 683b ldr r3, [r7, #0]
- 80039e6: 9300 str r3, [sp, #0]
- 80039e8: 697b ldr r3, [r7, #20]
- 80039ea: 2200 movs r2, #0
- 80039ec: 2180 movs r1, #128 ; 0x80
- 80039ee: 68f8 ldr r0, [r7, #12]
- 80039f0: f000 f84c bl 8003a8c <UART_WaitOnFlagUntilTimeout>
- 80039f4: 4603 mov r3, r0
- 80039f6: 2b00 cmp r3, #0
- 80039f8: d001 beq.n 80039fe <HAL_UART_Transmit+0xa4>
- {
- return HAL_TIMEOUT;
- 80039fa: 2303 movs r3, #3
- 80039fc: e042 b.n 8003a84 <HAL_UART_Transmit+0x12a>
- }
- tmp = (uint16_t *) pData;
- 80039fe: 68bb ldr r3, [r7, #8]
- 8003a00: 613b str r3, [r7, #16]
- huart->Instance->DR = (*tmp & (uint16_t)0x01FF);
- 8003a02: 693b ldr r3, [r7, #16]
- 8003a04: 881b ldrh r3, [r3, #0]
- 8003a06: 461a mov r2, r3
- 8003a08: 68fb ldr r3, [r7, #12]
- 8003a0a: 681b ldr r3, [r3, #0]
- 8003a0c: f3c2 0208 ubfx r2, r2, #0, #9
- 8003a10: 605a str r2, [r3, #4]
- if (huart->Init.Parity == UART_PARITY_NONE)
- 8003a12: 68fb ldr r3, [r7, #12]
- 8003a14: 691b ldr r3, [r3, #16]
- 8003a16: 2b00 cmp r3, #0
- 8003a18: d103 bne.n 8003a22 <HAL_UART_Transmit+0xc8>
- {
- pData += 2U;
- 8003a1a: 68bb ldr r3, [r7, #8]
- 8003a1c: 3302 adds r3, #2
- 8003a1e: 60bb str r3, [r7, #8]
- 8003a20: e017 b.n 8003a52 <HAL_UART_Transmit+0xf8>
- }
- else
- {
- pData += 1U;
- 8003a22: 68bb ldr r3, [r7, #8]
- 8003a24: 3301 adds r3, #1
- 8003a26: 60bb str r3, [r7, #8]
- 8003a28: e013 b.n 8003a52 <HAL_UART_Transmit+0xf8>
- }
- }
- else
- {
- if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK)
- 8003a2a: 683b ldr r3, [r7, #0]
- 8003a2c: 9300 str r3, [sp, #0]
- 8003a2e: 697b ldr r3, [r7, #20]
- 8003a30: 2200 movs r2, #0
- 8003a32: 2180 movs r1, #128 ; 0x80
- 8003a34: 68f8 ldr r0, [r7, #12]
- 8003a36: f000 f829 bl 8003a8c <UART_WaitOnFlagUntilTimeout>
- 8003a3a: 4603 mov r3, r0
- 8003a3c: 2b00 cmp r3, #0
- 8003a3e: d001 beq.n 8003a44 <HAL_UART_Transmit+0xea>
- {
- return HAL_TIMEOUT;
- 8003a40: 2303 movs r3, #3
- 8003a42: e01f b.n 8003a84 <HAL_UART_Transmit+0x12a>
- }
- huart->Instance->DR = (*pData++ & (uint8_t)0xFF);
- 8003a44: 68bb ldr r3, [r7, #8]
- 8003a46: 1c5a adds r2, r3, #1
- 8003a48: 60ba str r2, [r7, #8]
- 8003a4a: 781a ldrb r2, [r3, #0]
- 8003a4c: 68fb ldr r3, [r7, #12]
- 8003a4e: 681b ldr r3, [r3, #0]
- 8003a50: 605a str r2, [r3, #4]
- while (huart->TxXferCount > 0U)
- 8003a52: 68fb ldr r3, [r7, #12]
- 8003a54: 8cdb ldrh r3, [r3, #38] ; 0x26
- 8003a56: b29b uxth r3, r3
- 8003a58: 2b00 cmp r3, #0
- 8003a5a: d1b7 bne.n 80039cc <HAL_UART_Transmit+0x72>
- }
- }
-
- if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TC, RESET, tickstart, Timeout) != HAL_OK)
- 8003a5c: 683b ldr r3, [r7, #0]
- 8003a5e: 9300 str r3, [sp, #0]
- 8003a60: 697b ldr r3, [r7, #20]
- 8003a62: 2200 movs r2, #0
- 8003a64: 2140 movs r1, #64 ; 0x40
- 8003a66: 68f8 ldr r0, [r7, #12]
- 8003a68: f000 f810 bl 8003a8c <UART_WaitOnFlagUntilTimeout>
- 8003a6c: 4603 mov r3, r0
- 8003a6e: 2b00 cmp r3, #0
- 8003a70: d001 beq.n 8003a76 <HAL_UART_Transmit+0x11c>
- {
- return HAL_TIMEOUT;
- 8003a72: 2303 movs r3, #3
- 8003a74: e006 b.n 8003a84 <HAL_UART_Transmit+0x12a>
- }
-
- /* At end of Tx process, restore huart->gState to Ready */
- huart->gState = HAL_UART_STATE_READY;
- 8003a76: 68fb ldr r3, [r7, #12]
- 8003a78: 2220 movs r2, #32
- 8003a7a: f883 2039 strb.w r2, [r3, #57] ; 0x39
-
- return HAL_OK;
- 8003a7e: 2300 movs r3, #0
- 8003a80: e000 b.n 8003a84 <HAL_UART_Transmit+0x12a>
- }
- else
- {
- return HAL_BUSY;
- 8003a82: 2302 movs r3, #2
- }
- }
- 8003a84: 4618 mov r0, r3
- 8003a86: 3718 adds r7, #24
- 8003a88: 46bd mov sp, r7
- 8003a8a: bd80 pop {r7, pc}
-
- 08003a8c <UART_WaitOnFlagUntilTimeout>:
- * @param Tickstart Tick start value
- * @param Timeout Timeout duration
- * @retval HAL status
- */
- static HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout)
- {
- 8003a8c: b580 push {r7, lr}
- 8003a8e: b084 sub sp, #16
- 8003a90: af00 add r7, sp, #0
- 8003a92: 60f8 str r0, [r7, #12]
- 8003a94: 60b9 str r1, [r7, #8]
- 8003a96: 603b str r3, [r7, #0]
- 8003a98: 4613 mov r3, r2
- 8003a9a: 71fb strb r3, [r7, #7]
- /* Wait until flag is set */
- while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
- 8003a9c: e02c b.n 8003af8 <UART_WaitOnFlagUntilTimeout+0x6c>
- {
- /* Check for the Timeout */
- if (Timeout != HAL_MAX_DELAY)
- 8003a9e: 69bb ldr r3, [r7, #24]
- 8003aa0: f1b3 3fff cmp.w r3, #4294967295
- 8003aa4: d028 beq.n 8003af8 <UART_WaitOnFlagUntilTimeout+0x6c>
- {
- if ((Timeout == 0U) || ((HAL_GetTick() - Tickstart) > Timeout))
- 8003aa6: 69bb ldr r3, [r7, #24]
- 8003aa8: 2b00 cmp r3, #0
- 8003aaa: d007 beq.n 8003abc <UART_WaitOnFlagUntilTimeout+0x30>
- 8003aac: f7fd fe56 bl 800175c <HAL_GetTick>
- 8003ab0: 4602 mov r2, r0
- 8003ab2: 683b ldr r3, [r7, #0]
- 8003ab4: 1ad3 subs r3, r2, r3
- 8003ab6: 69ba ldr r2, [r7, #24]
- 8003ab8: 429a cmp r2, r3
- 8003aba: d21d bcs.n 8003af8 <UART_WaitOnFlagUntilTimeout+0x6c>
- {
- /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */
- CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
- 8003abc: 68fb ldr r3, [r7, #12]
- 8003abe: 681b ldr r3, [r3, #0]
- 8003ac0: 68da ldr r2, [r3, #12]
- 8003ac2: 68fb ldr r3, [r7, #12]
- 8003ac4: 681b ldr r3, [r3, #0]
- 8003ac6: f422 72d0 bic.w r2, r2, #416 ; 0x1a0
- 8003aca: 60da str r2, [r3, #12]
- CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
- 8003acc: 68fb ldr r3, [r7, #12]
- 8003ace: 681b ldr r3, [r3, #0]
- 8003ad0: 695a ldr r2, [r3, #20]
- 8003ad2: 68fb ldr r3, [r7, #12]
- 8003ad4: 681b ldr r3, [r3, #0]
- 8003ad6: f022 0201 bic.w r2, r2, #1
- 8003ada: 615a str r2, [r3, #20]
-
- huart->gState = HAL_UART_STATE_READY;
- 8003adc: 68fb ldr r3, [r7, #12]
- 8003ade: 2220 movs r2, #32
- 8003ae0: f883 2039 strb.w r2, [r3, #57] ; 0x39
- huart->RxState = HAL_UART_STATE_READY;
- 8003ae4: 68fb ldr r3, [r7, #12]
- 8003ae6: 2220 movs r2, #32
- 8003ae8: f883 203a strb.w r2, [r3, #58] ; 0x3a
-
- /* Process Unlocked */
- __HAL_UNLOCK(huart);
- 8003aec: 68fb ldr r3, [r7, #12]
- 8003aee: 2200 movs r2, #0
- 8003af0: f883 2038 strb.w r2, [r3, #56] ; 0x38
-
- return HAL_TIMEOUT;
- 8003af4: 2303 movs r3, #3
- 8003af6: e00f b.n 8003b18 <UART_WaitOnFlagUntilTimeout+0x8c>
- while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
- 8003af8: 68fb ldr r3, [r7, #12]
- 8003afa: 681b ldr r3, [r3, #0]
- 8003afc: 681a ldr r2, [r3, #0]
- 8003afe: 68bb ldr r3, [r7, #8]
- 8003b00: 4013 ands r3, r2
- 8003b02: 68ba ldr r2, [r7, #8]
- 8003b04: 429a cmp r2, r3
- 8003b06: bf0c ite eq
- 8003b08: 2301 moveq r3, #1
- 8003b0a: 2300 movne r3, #0
- 8003b0c: b2db uxtb r3, r3
- 8003b0e: 461a mov r2, r3
- 8003b10: 79fb ldrb r3, [r7, #7]
- 8003b12: 429a cmp r2, r3
- 8003b14: d0c3 beq.n 8003a9e <UART_WaitOnFlagUntilTimeout+0x12>
- }
- }
- }
- return HAL_OK;
- 8003b16: 2300 movs r3, #0
- }
- 8003b18: 4618 mov r0, r3
- 8003b1a: 3710 adds r7, #16
- 8003b1c: 46bd mov sp, r7
- 8003b1e: bd80 pop {r7, pc}
-
- 08003b20 <UART_SetConfig>:
- * @param huart Pointer to a UART_HandleTypeDef structure that contains
- * the configuration information for the specified UART module.
- * @retval None
- */
- static void UART_SetConfig(UART_HandleTypeDef *huart)
- {
- 8003b20: b580 push {r7, lr}
- 8003b22: b084 sub sp, #16
- 8003b24: af00 add r7, sp, #0
- 8003b26: 6078 str r0, [r7, #4]
- assert_param(IS_UART_MODE(huart->Init.Mode));
-
- /*-------------------------- USART CR2 Configuration -----------------------*/
- /* Configure the UART Stop Bits: Set STOP[13:12] bits
- according to huart->Init.StopBits value */
- MODIFY_REG(huart->Instance->CR2, USART_CR2_STOP, huart->Init.StopBits);
- 8003b28: 687b ldr r3, [r7, #4]
- 8003b2a: 681b ldr r3, [r3, #0]
- 8003b2c: 691b ldr r3, [r3, #16]
- 8003b2e: f423 5140 bic.w r1, r3, #12288 ; 0x3000
- 8003b32: 687b ldr r3, [r7, #4]
- 8003b34: 68da ldr r2, [r3, #12]
- 8003b36: 687b ldr r3, [r7, #4]
- 8003b38: 681b ldr r3, [r3, #0]
- 8003b3a: 430a orrs r2, r1
- 8003b3c: 611a str r2, [r3, #16]
- Set the M bits according to huart->Init.WordLength value
- Set PCE and PS bits according to huart->Init.Parity value
- Set TE and RE bits according to huart->Init.Mode value
- Set OVER8 bit according to huart->Init.OverSampling value */
-
- tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode | huart->Init.OverSampling;
- 8003b3e: 687b ldr r3, [r7, #4]
- 8003b40: 689a ldr r2, [r3, #8]
- 8003b42: 687b ldr r3, [r7, #4]
- 8003b44: 691b ldr r3, [r3, #16]
- 8003b46: 431a orrs r2, r3
- 8003b48: 687b ldr r3, [r7, #4]
- 8003b4a: 695b ldr r3, [r3, #20]
- 8003b4c: 431a orrs r2, r3
- 8003b4e: 687b ldr r3, [r7, #4]
- 8003b50: 69db ldr r3, [r3, #28]
- 8003b52: 4313 orrs r3, r2
- 8003b54: 60bb str r3, [r7, #8]
- MODIFY_REG(huart->Instance->CR1,
- 8003b56: 687b ldr r3, [r7, #4]
- 8003b58: 681b ldr r3, [r3, #0]
- 8003b5a: 68db ldr r3, [r3, #12]
- 8003b5c: f423 4316 bic.w r3, r3, #38400 ; 0x9600
- 8003b60: f023 030c bic.w r3, r3, #12
- 8003b64: 687a ldr r2, [r7, #4]
- 8003b66: 6812 ldr r2, [r2, #0]
- 8003b68: 68b9 ldr r1, [r7, #8]
- 8003b6a: 430b orrs r3, r1
- 8003b6c: 60d3 str r3, [r2, #12]
- (uint32_t)(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS | USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8),
- tmpreg);
-
- /*-------------------------- USART CR3 Configuration -----------------------*/
- /* Configure the UART HFC: Set CTSE and RTSE bits according to huart->Init.HwFlowCtl value */
- MODIFY_REG(huart->Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE), huart->Init.HwFlowCtl);
- 8003b6e: 687b ldr r3, [r7, #4]
- 8003b70: 681b ldr r3, [r3, #0]
- 8003b72: 695b ldr r3, [r3, #20]
- 8003b74: f423 7140 bic.w r1, r3, #768 ; 0x300
- 8003b78: 687b ldr r3, [r7, #4]
- 8003b7a: 699a ldr r2, [r3, #24]
- 8003b7c: 687b ldr r3, [r7, #4]
- 8003b7e: 681b ldr r3, [r3, #0]
- 8003b80: 430a orrs r2, r1
- 8003b82: 615a str r2, [r3, #20]
-
-
- if((huart->Instance == USART1))
- 8003b84: 687b ldr r3, [r7, #4]
- 8003b86: 681b ldr r3, [r3, #0]
- 8003b88: 4a55 ldr r2, [pc, #340] ; (8003ce0 <UART_SetConfig+0x1c0>)
- 8003b8a: 4293 cmp r3, r2
- 8003b8c: d103 bne.n 8003b96 <UART_SetConfig+0x76>
- {
- pclk = HAL_RCC_GetPCLK2Freq();
- 8003b8e: f7ff f9f1 bl 8002f74 <HAL_RCC_GetPCLK2Freq>
- 8003b92: 60f8 str r0, [r7, #12]
- 8003b94: e002 b.n 8003b9c <UART_SetConfig+0x7c>
- }
- else
- {
- pclk = HAL_RCC_GetPCLK1Freq();
- 8003b96: f7ff f9d9 bl 8002f4c <HAL_RCC_GetPCLK1Freq>
- 8003b9a: 60f8 str r0, [r7, #12]
- }
-
- /*-------------------------- USART BRR Configuration ---------------------*/
- if (huart->Init.OverSampling == UART_OVERSAMPLING_8)
- 8003b9c: 687b ldr r3, [r7, #4]
- 8003b9e: 69db ldr r3, [r3, #28]
- 8003ba0: f5b3 4f00 cmp.w r3, #32768 ; 0x8000
- 8003ba4: d14c bne.n 8003c40 <UART_SetConfig+0x120>
- {
- huart->Instance->BRR = UART_BRR_SAMPLING8(pclk, huart->Init.BaudRate);
- 8003ba6: 68fa ldr r2, [r7, #12]
- 8003ba8: 4613 mov r3, r2
- 8003baa: 009b lsls r3, r3, #2
- 8003bac: 4413 add r3, r2
- 8003bae: 009a lsls r2, r3, #2
- 8003bb0: 441a add r2, r3
- 8003bb2: 687b ldr r3, [r7, #4]
- 8003bb4: 685b ldr r3, [r3, #4]
- 8003bb6: 005b lsls r3, r3, #1
- 8003bb8: fbb2 f3f3 udiv r3, r2, r3
- 8003bbc: 4a49 ldr r2, [pc, #292] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003bbe: fba2 2303 umull r2, r3, r2, r3
- 8003bc2: 095b lsrs r3, r3, #5
- 8003bc4: 0119 lsls r1, r3, #4
- 8003bc6: 68fa ldr r2, [r7, #12]
- 8003bc8: 4613 mov r3, r2
- 8003bca: 009b lsls r3, r3, #2
- 8003bcc: 4413 add r3, r2
- 8003bce: 009a lsls r2, r3, #2
- 8003bd0: 441a add r2, r3
- 8003bd2: 687b ldr r3, [r7, #4]
- 8003bd4: 685b ldr r3, [r3, #4]
- 8003bd6: 005b lsls r3, r3, #1
- 8003bd8: fbb2 f2f3 udiv r2, r2, r3
- 8003bdc: 4b41 ldr r3, [pc, #260] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003bde: fba3 0302 umull r0, r3, r3, r2
- 8003be2: 095b lsrs r3, r3, #5
- 8003be4: 2064 movs r0, #100 ; 0x64
- 8003be6: fb00 f303 mul.w r3, r0, r3
- 8003bea: 1ad3 subs r3, r2, r3
- 8003bec: 00db lsls r3, r3, #3
- 8003bee: 3332 adds r3, #50 ; 0x32
- 8003bf0: 4a3c ldr r2, [pc, #240] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003bf2: fba2 2303 umull r2, r3, r2, r3
- 8003bf6: 095b lsrs r3, r3, #5
- 8003bf8: 005b lsls r3, r3, #1
- 8003bfa: f403 73f8 and.w r3, r3, #496 ; 0x1f0
- 8003bfe: 4419 add r1, r3
- 8003c00: 68fa ldr r2, [r7, #12]
- 8003c02: 4613 mov r3, r2
- 8003c04: 009b lsls r3, r3, #2
- 8003c06: 4413 add r3, r2
- 8003c08: 009a lsls r2, r3, #2
- 8003c0a: 441a add r2, r3
- 8003c0c: 687b ldr r3, [r7, #4]
- 8003c0e: 685b ldr r3, [r3, #4]
- 8003c10: 005b lsls r3, r3, #1
- 8003c12: fbb2 f2f3 udiv r2, r2, r3
- 8003c16: 4b33 ldr r3, [pc, #204] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003c18: fba3 0302 umull r0, r3, r3, r2
- 8003c1c: 095b lsrs r3, r3, #5
- 8003c1e: 2064 movs r0, #100 ; 0x64
- 8003c20: fb00 f303 mul.w r3, r0, r3
- 8003c24: 1ad3 subs r3, r2, r3
- 8003c26: 00db lsls r3, r3, #3
- 8003c28: 3332 adds r3, #50 ; 0x32
- 8003c2a: 4a2e ldr r2, [pc, #184] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003c2c: fba2 2303 umull r2, r3, r2, r3
- 8003c30: 095b lsrs r3, r3, #5
- 8003c32: f003 0207 and.w r2, r3, #7
- 8003c36: 687b ldr r3, [r7, #4]
- 8003c38: 681b ldr r3, [r3, #0]
- 8003c3a: 440a add r2, r1
- 8003c3c: 609a str r2, [r3, #8]
- }
- else
- {
- huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
- }
- }
- 8003c3e: e04a b.n 8003cd6 <UART_SetConfig+0x1b6>
- huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate);
- 8003c40: 68fa ldr r2, [r7, #12]
- 8003c42: 4613 mov r3, r2
- 8003c44: 009b lsls r3, r3, #2
- 8003c46: 4413 add r3, r2
- 8003c48: 009a lsls r2, r3, #2
- 8003c4a: 441a add r2, r3
- 8003c4c: 687b ldr r3, [r7, #4]
- 8003c4e: 685b ldr r3, [r3, #4]
- 8003c50: 009b lsls r3, r3, #2
- 8003c52: fbb2 f3f3 udiv r3, r2, r3
- 8003c56: 4a23 ldr r2, [pc, #140] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003c58: fba2 2303 umull r2, r3, r2, r3
- 8003c5c: 095b lsrs r3, r3, #5
- 8003c5e: 0119 lsls r1, r3, #4
- 8003c60: 68fa ldr r2, [r7, #12]
- 8003c62: 4613 mov r3, r2
- 8003c64: 009b lsls r3, r3, #2
- 8003c66: 4413 add r3, r2
- 8003c68: 009a lsls r2, r3, #2
- 8003c6a: 441a add r2, r3
- 8003c6c: 687b ldr r3, [r7, #4]
- 8003c6e: 685b ldr r3, [r3, #4]
- 8003c70: 009b lsls r3, r3, #2
- 8003c72: fbb2 f2f3 udiv r2, r2, r3
- 8003c76: 4b1b ldr r3, [pc, #108] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003c78: fba3 0302 umull r0, r3, r3, r2
- 8003c7c: 095b lsrs r3, r3, #5
- 8003c7e: 2064 movs r0, #100 ; 0x64
- 8003c80: fb00 f303 mul.w r3, r0, r3
- 8003c84: 1ad3 subs r3, r2, r3
- 8003c86: 011b lsls r3, r3, #4
- 8003c88: 3332 adds r3, #50 ; 0x32
- 8003c8a: 4a16 ldr r2, [pc, #88] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003c8c: fba2 2303 umull r2, r3, r2, r3
- 8003c90: 095b lsrs r3, r3, #5
- 8003c92: f003 03f0 and.w r3, r3, #240 ; 0xf0
- 8003c96: 4419 add r1, r3
- 8003c98: 68fa ldr r2, [r7, #12]
- 8003c9a: 4613 mov r3, r2
- 8003c9c: 009b lsls r3, r3, #2
- 8003c9e: 4413 add r3, r2
- 8003ca0: 009a lsls r2, r3, #2
- 8003ca2: 441a add r2, r3
- 8003ca4: 687b ldr r3, [r7, #4]
- 8003ca6: 685b ldr r3, [r3, #4]
- 8003ca8: 009b lsls r3, r3, #2
- 8003caa: fbb2 f2f3 udiv r2, r2, r3
- 8003cae: 4b0d ldr r3, [pc, #52] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003cb0: fba3 0302 umull r0, r3, r3, r2
- 8003cb4: 095b lsrs r3, r3, #5
- 8003cb6: 2064 movs r0, #100 ; 0x64
- 8003cb8: fb00 f303 mul.w r3, r0, r3
- 8003cbc: 1ad3 subs r3, r2, r3
- 8003cbe: 011b lsls r3, r3, #4
- 8003cc0: 3332 adds r3, #50 ; 0x32
- 8003cc2: 4a08 ldr r2, [pc, #32] ; (8003ce4 <UART_SetConfig+0x1c4>)
- 8003cc4: fba2 2303 umull r2, r3, r2, r3
- 8003cc8: 095b lsrs r3, r3, #5
- 8003cca: f003 020f and.w r2, r3, #15
- 8003cce: 687b ldr r3, [r7, #4]
- 8003cd0: 681b ldr r3, [r3, #0]
- 8003cd2: 440a add r2, r1
- 8003cd4: 609a str r2, [r3, #8]
- }
- 8003cd6: bf00 nop
- 8003cd8: 3710 adds r7, #16
- 8003cda: 46bd mov sp, r7
- 8003cdc: bd80 pop {r7, pc}
- 8003cde: bf00 nop
- 8003ce0: 40013800 .word 0x40013800
- 8003ce4: 51eb851f .word 0x51eb851f
-
- 08003ce8 <MX_FATFS_Init>:
- /* USER CODE BEGIN Variables */
-
- /* USER CODE END Variables */
-
- void MX_FATFS_Init(void)
- {
- 8003ce8: b580 push {r7, lr}
- 8003cea: af00 add r7, sp, #0
- /*## FatFS: Link the USER driver ###########################*/
- retUSER = FATFS_LinkDriver(&USER_Driver, USERPath);
- 8003cec: 4904 ldr r1, [pc, #16] ; (8003d00 <MX_FATFS_Init+0x18>)
- 8003cee: 4805 ldr r0, [pc, #20] ; (8003d04 <MX_FATFS_Init+0x1c>)
- 8003cf0: f003 f97c bl 8006fec <FATFS_LinkDriver>
- 8003cf4: 4603 mov r3, r0
- 8003cf6: 461a mov r2, r3
- 8003cf8: 4b03 ldr r3, [pc, #12] ; (8003d08 <MX_FATFS_Init+0x20>)
- 8003cfa: 701a strb r2, [r3, #0]
-
- /* USER CODE BEGIN Init */
- /* additional user code for init */
- /* USER CODE END Init */
- }
- 8003cfc: bf00 nop
- 8003cfe: bd80 pop {r7, pc}
- 8003d00: 200024e0 .word 0x200024e0
- 8003d04: 20000010 .word 0x20000010
- 8003d08: 200024e4 .word 0x200024e4
-
- 08003d0c <get_fattime>:
- * @brief Gets Time from RTC
- * @param None
- * @retval Time in DWORD
- */
- DWORD get_fattime(void)
- {
- 8003d0c: b480 push {r7}
- 8003d0e: af00 add r7, sp, #0
- /* USER CODE BEGIN get_fattime */
- return 0;
- 8003d10: 2300 movs r3, #0
- /* USER CODE END get_fattime */
- }
- 8003d12: 4618 mov r0, r3
- 8003d14: 46bd mov sp, r7
- 8003d16: bc80 pop {r7}
- 8003d18: 4770 bx lr
-
- 08003d1a <USER_initialize>:
- * @retval DSTATUS: Operation status
- */
- DSTATUS USER_initialize (
- BYTE pdrv /* Physical drive nmuber to identify the drive */
- )
- {
- 8003d1a: b580 push {r7, lr}
- 8003d1c: b082 sub sp, #8
- 8003d1e: af00 add r7, sp, #0
- 8003d20: 4603 mov r3, r0
- 8003d22: 71fb strb r3, [r7, #7]
- /* USER CODE BEGIN INIT */
- //Stat = STA_NOINIT;
- //return Stat;
- SD_disk_initialize (pdrv);
- 8003d24: 79fb ldrb r3, [r7, #7]
- 8003d26: 4618 mov r0, r3
- 8003d28: f7fc fd64 bl 80007f4 <SD_disk_initialize>
- /* USER CODE END INIT */
- }
- 8003d2c: bf00 nop
- 8003d2e: 4618 mov r0, r3
- 8003d30: 3708 adds r7, #8
- 8003d32: 46bd mov sp, r7
- 8003d34: bd80 pop {r7, pc}
-
- 08003d36 <USER_status>:
- * @retval DSTATUS: Operation status
- */
- DSTATUS USER_status (
- BYTE pdrv /* Physical drive number to identify the drive */
- )
- {
- 8003d36: b580 push {r7, lr}
- 8003d38: b082 sub sp, #8
- 8003d3a: af00 add r7, sp, #0
- 8003d3c: 4603 mov r3, r0
- 8003d3e: 71fb strb r3, [r7, #7]
- /* USER CODE BEGIN STATUS */
- //Stat = STA_NOINIT;
- //return Stat;
- SD_disk_status (pdrv);
- 8003d40: 79fb ldrb r3, [r7, #7]
- 8003d42: 4618 mov r0, r3
- 8003d44: f7fc fe3c bl 80009c0 <SD_disk_status>
- /* USER CODE END STATUS */
- }
- 8003d48: bf00 nop
- 8003d4a: 4618 mov r0, r3
- 8003d4c: 3708 adds r7, #8
- 8003d4e: 46bd mov sp, r7
- 8003d50: bd80 pop {r7, pc}
-
- 08003d52 <USER_read>:
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- BYTE *buff, /* Data buffer to store read data */
- DWORD sector, /* Sector address in LBA */
- UINT count /* Number of sectors to read */
- )
- {
- 8003d52: b580 push {r7, lr}
- 8003d54: b084 sub sp, #16
- 8003d56: af00 add r7, sp, #0
- 8003d58: 60b9 str r1, [r7, #8]
- 8003d5a: 607a str r2, [r7, #4]
- 8003d5c: 603b str r3, [r7, #0]
- 8003d5e: 4603 mov r3, r0
- 8003d60: 73fb strb r3, [r7, #15]
- /* USER CODE BEGIN READ */
- //return RES_OK;
- SD_disk_read (pdrv, buff, sector, count);
- 8003d62: 7bf8 ldrb r0, [r7, #15]
- 8003d64: 683b ldr r3, [r7, #0]
- 8003d66: 687a ldr r2, [r7, #4]
- 8003d68: 68b9 ldr r1, [r7, #8]
- 8003d6a: f7fc fe3d bl 80009e8 <SD_disk_read>
- /* USER CODE END READ */
- }
- 8003d6e: bf00 nop
- 8003d70: 4618 mov r0, r3
- 8003d72: 3710 adds r7, #16
- 8003d74: 46bd mov sp, r7
- 8003d76: bd80 pop {r7, pc}
-
- 08003d78 <USER_write>:
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- const BYTE *buff, /* Data to be written */
- DWORD sector, /* Sector address in LBA */
- UINT count /* Number of sectors to write */
- )
- {
- 8003d78: b580 push {r7, lr}
- 8003d7a: b084 sub sp, #16
- 8003d7c: af00 add r7, sp, #0
- 8003d7e: 60b9 str r1, [r7, #8]
- 8003d80: 607a str r2, [r7, #4]
- 8003d82: 603b str r3, [r7, #0]
- 8003d84: 4603 mov r3, r0
- 8003d86: 73fb strb r3, [r7, #15]
- /* USER CODE BEGIN WRITE */
- /* USER CODE HERE */
- //return RES_OK;
- SD_disk_write (pdrv, buff, sector, count);
- 8003d88: 7bf8 ldrb r0, [r7, #15]
- 8003d8a: 683b ldr r3, [r7, #0]
- 8003d8c: 687a ldr r2, [r7, #4]
- 8003d8e: 68b9 ldr r1, [r7, #8]
- 8003d90: f7fc fe94 bl 8000abc <SD_disk_write>
- /* USER CODE END WRITE */
- }
- 8003d94: bf00 nop
- 8003d96: 4618 mov r0, r3
- 8003d98: 3710 adds r7, #16
- 8003d9a: 46bd mov sp, r7
- 8003d9c: bd80 pop {r7, pc}
-
- 08003d9e <USER_ioctl>:
- DRESULT USER_ioctl (
- BYTE pdrv, /* Physical drive nmuber (0..) */
- BYTE cmd, /* Control code */
- void *buff /* Buffer to send/receive control data */
- )
- {
- 8003d9e: b580 push {r7, lr}
- 8003da0: b082 sub sp, #8
- 8003da2: af00 add r7, sp, #0
- 8003da4: 4603 mov r3, r0
- 8003da6: 603a str r2, [r7, #0]
- 8003da8: 71fb strb r3, [r7, #7]
- 8003daa: 460b mov r3, r1
- 8003dac: 71bb strb r3, [r7, #6]
- /* USER CODE BEGIN IOCTL */
- //DRESULT res = RES_ERROR;
- //return res;
- SD_disk_ioctl (pdrv, cmd, buff);
- 8003dae: 79fb ldrb r3, [r7, #7]
- 8003db0: 79b9 ldrb r1, [r7, #6]
- 8003db2: 683a ldr r2, [r7, #0]
- 8003db4: 4618 mov r0, r3
- 8003db6: f7fc ff05 bl 8000bc4 <SD_disk_ioctl>
- /* USER CODE END IOCTL */
- }
- 8003dba: bf00 nop
- 8003dbc: 4618 mov r0, r3
- 8003dbe: 3708 adds r7, #8
- 8003dc0: 46bd mov sp, r7
- 8003dc2: bd80 pop {r7, pc}
-
- 08003dc4 <disk_status>:
- * @retval DSTATUS: Operation status
- */
- DSTATUS disk_status (
- BYTE pdrv /* Physical drive number to identify the drive */
- )
- {
- 8003dc4: b580 push {r7, lr}
- 8003dc6: b084 sub sp, #16
- 8003dc8: af00 add r7, sp, #0
- 8003dca: 4603 mov r3, r0
- 8003dcc: 71fb strb r3, [r7, #7]
- DSTATUS stat;
-
- stat = disk.drv[pdrv]->disk_status(disk.lun[pdrv]);
- 8003dce: 79fb ldrb r3, [r7, #7]
- 8003dd0: 4a08 ldr r2, [pc, #32] ; (8003df4 <disk_status+0x30>)
- 8003dd2: 009b lsls r3, r3, #2
- 8003dd4: 4413 add r3, r2
- 8003dd6: 685b ldr r3, [r3, #4]
- 8003dd8: 685b ldr r3, [r3, #4]
- 8003dda: 79fa ldrb r2, [r7, #7]
- 8003ddc: 4905 ldr r1, [pc, #20] ; (8003df4 <disk_status+0x30>)
- 8003dde: 440a add r2, r1
- 8003de0: 7a12 ldrb r2, [r2, #8]
- 8003de2: 4610 mov r0, r2
- 8003de4: 4798 blx r3
- 8003de6: 4603 mov r3, r0
- 8003de8: 73fb strb r3, [r7, #15]
- return stat;
- 8003dea: 7bfb ldrb r3, [r7, #15]
- }
- 8003dec: 4618 mov r0, r3
- 8003dee: 3710 adds r7, #16
- 8003df0: 46bd mov sp, r7
- 8003df2: bd80 pop {r7, pc}
- 8003df4: 200002d4 .word 0x200002d4
-
- 08003df8 <disk_initialize>:
- * @retval DSTATUS: Operation status
- */
- DSTATUS disk_initialize (
- BYTE pdrv /* Physical drive nmuber to identify the drive */
- )
- {
- 8003df8: b580 push {r7, lr}
- 8003dfa: b084 sub sp, #16
- 8003dfc: af00 add r7, sp, #0
- 8003dfe: 4603 mov r3, r0
- 8003e00: 71fb strb r3, [r7, #7]
- DSTATUS stat = RES_OK;
- 8003e02: 2300 movs r3, #0
- 8003e04: 73fb strb r3, [r7, #15]
-
- if(disk.is_initialized[pdrv] == 0)
- 8003e06: 79fb ldrb r3, [r7, #7]
- 8003e08: 4a0d ldr r2, [pc, #52] ; (8003e40 <disk_initialize+0x48>)
- 8003e0a: 5cd3 ldrb r3, [r2, r3]
- 8003e0c: 2b00 cmp r3, #0
- 8003e0e: d111 bne.n 8003e34 <disk_initialize+0x3c>
- {
- disk.is_initialized[pdrv] = 1;
- 8003e10: 79fb ldrb r3, [r7, #7]
- 8003e12: 4a0b ldr r2, [pc, #44] ; (8003e40 <disk_initialize+0x48>)
- 8003e14: 2101 movs r1, #1
- 8003e16: 54d1 strb r1, [r2, r3]
- stat = disk.drv[pdrv]->disk_initialize(disk.lun[pdrv]);
- 8003e18: 79fb ldrb r3, [r7, #7]
- 8003e1a: 4a09 ldr r2, [pc, #36] ; (8003e40 <disk_initialize+0x48>)
- 8003e1c: 009b lsls r3, r3, #2
- 8003e1e: 4413 add r3, r2
- 8003e20: 685b ldr r3, [r3, #4]
- 8003e22: 681b ldr r3, [r3, #0]
- 8003e24: 79fa ldrb r2, [r7, #7]
- 8003e26: 4906 ldr r1, [pc, #24] ; (8003e40 <disk_initialize+0x48>)
- 8003e28: 440a add r2, r1
- 8003e2a: 7a12 ldrb r2, [r2, #8]
- 8003e2c: 4610 mov r0, r2
- 8003e2e: 4798 blx r3
- 8003e30: 4603 mov r3, r0
- 8003e32: 73fb strb r3, [r7, #15]
- }
- return stat;
- 8003e34: 7bfb ldrb r3, [r7, #15]
- }
- 8003e36: 4618 mov r0, r3
- 8003e38: 3710 adds r7, #16
- 8003e3a: 46bd mov sp, r7
- 8003e3c: bd80 pop {r7, pc}
- 8003e3e: bf00 nop
- 8003e40: 200002d4 .word 0x200002d4
-
- 08003e44 <disk_read>:
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- BYTE *buff, /* Data buffer to store read data */
- DWORD sector, /* Sector address in LBA */
- UINT count /* Number of sectors to read */
- )
- {
- 8003e44: b590 push {r4, r7, lr}
- 8003e46: b087 sub sp, #28
- 8003e48: af00 add r7, sp, #0
- 8003e4a: 60b9 str r1, [r7, #8]
- 8003e4c: 607a str r2, [r7, #4]
- 8003e4e: 603b str r3, [r7, #0]
- 8003e50: 4603 mov r3, r0
- 8003e52: 73fb strb r3, [r7, #15]
- DRESULT res;
-
- res = disk.drv[pdrv]->disk_read(disk.lun[pdrv], buff, sector, count);
- 8003e54: 7bfb ldrb r3, [r7, #15]
- 8003e56: 4a0a ldr r2, [pc, #40] ; (8003e80 <disk_read+0x3c>)
- 8003e58: 009b lsls r3, r3, #2
- 8003e5a: 4413 add r3, r2
- 8003e5c: 685b ldr r3, [r3, #4]
- 8003e5e: 689c ldr r4, [r3, #8]
- 8003e60: 7bfb ldrb r3, [r7, #15]
- 8003e62: 4a07 ldr r2, [pc, #28] ; (8003e80 <disk_read+0x3c>)
- 8003e64: 4413 add r3, r2
- 8003e66: 7a18 ldrb r0, [r3, #8]
- 8003e68: 683b ldr r3, [r7, #0]
- 8003e6a: 687a ldr r2, [r7, #4]
- 8003e6c: 68b9 ldr r1, [r7, #8]
- 8003e6e: 47a0 blx r4
- 8003e70: 4603 mov r3, r0
- 8003e72: 75fb strb r3, [r7, #23]
- return res;
- 8003e74: 7dfb ldrb r3, [r7, #23]
- }
- 8003e76: 4618 mov r0, r3
- 8003e78: 371c adds r7, #28
- 8003e7a: 46bd mov sp, r7
- 8003e7c: bd90 pop {r4, r7, pc}
- 8003e7e: bf00 nop
- 8003e80: 200002d4 .word 0x200002d4
-
- 08003e84 <disk_write>:
- BYTE pdrv, /* Physical drive nmuber to identify the drive */
- const BYTE *buff, /* Data to be written */
- DWORD sector, /* Sector address in LBA */
- UINT count /* Number of sectors to write */
- )
- {
- 8003e84: b590 push {r4, r7, lr}
- 8003e86: b087 sub sp, #28
- 8003e88: af00 add r7, sp, #0
- 8003e8a: 60b9 str r1, [r7, #8]
- 8003e8c: 607a str r2, [r7, #4]
- 8003e8e: 603b str r3, [r7, #0]
- 8003e90: 4603 mov r3, r0
- 8003e92: 73fb strb r3, [r7, #15]
- DRESULT res;
-
- res = disk.drv[pdrv]->disk_write(disk.lun[pdrv], buff, sector, count);
- 8003e94: 7bfb ldrb r3, [r7, #15]
- 8003e96: 4a0a ldr r2, [pc, #40] ; (8003ec0 <disk_write+0x3c>)
- 8003e98: 009b lsls r3, r3, #2
- 8003e9a: 4413 add r3, r2
- 8003e9c: 685b ldr r3, [r3, #4]
- 8003e9e: 68dc ldr r4, [r3, #12]
- 8003ea0: 7bfb ldrb r3, [r7, #15]
- 8003ea2: 4a07 ldr r2, [pc, #28] ; (8003ec0 <disk_write+0x3c>)
- 8003ea4: 4413 add r3, r2
- 8003ea6: 7a18 ldrb r0, [r3, #8]
- 8003ea8: 683b ldr r3, [r7, #0]
- 8003eaa: 687a ldr r2, [r7, #4]
- 8003eac: 68b9 ldr r1, [r7, #8]
- 8003eae: 47a0 blx r4
- 8003eb0: 4603 mov r3, r0
- 8003eb2: 75fb strb r3, [r7, #23]
- return res;
- 8003eb4: 7dfb ldrb r3, [r7, #23]
- }
- 8003eb6: 4618 mov r0, r3
- 8003eb8: 371c adds r7, #28
- 8003eba: 46bd mov sp, r7
- 8003ebc: bd90 pop {r4, r7, pc}
- 8003ebe: bf00 nop
- 8003ec0: 200002d4 .word 0x200002d4
-
- 08003ec4 <disk_ioctl>:
- DRESULT disk_ioctl (
- BYTE pdrv, /* Physical drive nmuber (0..) */
- BYTE cmd, /* Control code */
- void *buff /* Buffer to send/receive control data */
- )
- {
- 8003ec4: b580 push {r7, lr}
- 8003ec6: b084 sub sp, #16
- 8003ec8: af00 add r7, sp, #0
- 8003eca: 4603 mov r3, r0
- 8003ecc: 603a str r2, [r7, #0]
- 8003ece: 71fb strb r3, [r7, #7]
- 8003ed0: 460b mov r3, r1
- 8003ed2: 71bb strb r3, [r7, #6]
- DRESULT res;
-
- res = disk.drv[pdrv]->disk_ioctl(disk.lun[pdrv], cmd, buff);
- 8003ed4: 79fb ldrb r3, [r7, #7]
- 8003ed6: 4a09 ldr r2, [pc, #36] ; (8003efc <disk_ioctl+0x38>)
- 8003ed8: 009b lsls r3, r3, #2
- 8003eda: 4413 add r3, r2
- 8003edc: 685b ldr r3, [r3, #4]
- 8003ede: 691b ldr r3, [r3, #16]
- 8003ee0: 79fa ldrb r2, [r7, #7]
- 8003ee2: 4906 ldr r1, [pc, #24] ; (8003efc <disk_ioctl+0x38>)
- 8003ee4: 440a add r2, r1
- 8003ee6: 7a10 ldrb r0, [r2, #8]
- 8003ee8: 79b9 ldrb r1, [r7, #6]
- 8003eea: 683a ldr r2, [r7, #0]
- 8003eec: 4798 blx r3
- 8003eee: 4603 mov r3, r0
- 8003ef0: 73fb strb r3, [r7, #15]
- return res;
- 8003ef2: 7bfb ldrb r3, [r7, #15]
- }
- 8003ef4: 4618 mov r0, r3
- 8003ef6: 3710 adds r7, #16
- 8003ef8: 46bd mov sp, r7
- 8003efa: bd80 pop {r7, pc}
- 8003efc: 200002d4 .word 0x200002d4
-
- 08003f00 <ld_word>:
- /* Load/Store multi-byte word in the FAT structure */
- /*-----------------------------------------------------------------------*/
-
- static
- WORD ld_word (const BYTE* ptr) /* Load a 2-byte little-endian word */
- {
- 8003f00: b480 push {r7}
- 8003f02: b085 sub sp, #20
- 8003f04: af00 add r7, sp, #0
- 8003f06: 6078 str r0, [r7, #4]
- WORD rv;
-
- rv = ptr[1];
- 8003f08: 687b ldr r3, [r7, #4]
- 8003f0a: 3301 adds r3, #1
- 8003f0c: 781b ldrb r3, [r3, #0]
- 8003f0e: 81fb strh r3, [r7, #14]
- rv = rv << 8 | ptr[0];
- 8003f10: 89fb ldrh r3, [r7, #14]
- 8003f12: 021b lsls r3, r3, #8
- 8003f14: b21a sxth r2, r3
- 8003f16: 687b ldr r3, [r7, #4]
- 8003f18: 781b ldrb r3, [r3, #0]
- 8003f1a: b21b sxth r3, r3
- 8003f1c: 4313 orrs r3, r2
- 8003f1e: b21b sxth r3, r3
- 8003f20: 81fb strh r3, [r7, #14]
- return rv;
- 8003f22: 89fb ldrh r3, [r7, #14]
- }
- 8003f24: 4618 mov r0, r3
- 8003f26: 3714 adds r7, #20
- 8003f28: 46bd mov sp, r7
- 8003f2a: bc80 pop {r7}
- 8003f2c: 4770 bx lr
-
- 08003f2e <ld_dword>:
-
- static
- DWORD ld_dword (const BYTE* ptr) /* Load a 4-byte little-endian word */
- {
- 8003f2e: b480 push {r7}
- 8003f30: b085 sub sp, #20
- 8003f32: af00 add r7, sp, #0
- 8003f34: 6078 str r0, [r7, #4]
- DWORD rv;
-
- rv = ptr[3];
- 8003f36: 687b ldr r3, [r7, #4]
- 8003f38: 3303 adds r3, #3
- 8003f3a: 781b ldrb r3, [r3, #0]
- 8003f3c: 60fb str r3, [r7, #12]
- rv = rv << 8 | ptr[2];
- 8003f3e: 68fb ldr r3, [r7, #12]
- 8003f40: 021b lsls r3, r3, #8
- 8003f42: 687a ldr r2, [r7, #4]
- 8003f44: 3202 adds r2, #2
- 8003f46: 7812 ldrb r2, [r2, #0]
- 8003f48: 4313 orrs r3, r2
- 8003f4a: 60fb str r3, [r7, #12]
- rv = rv << 8 | ptr[1];
- 8003f4c: 68fb ldr r3, [r7, #12]
- 8003f4e: 021b lsls r3, r3, #8
- 8003f50: 687a ldr r2, [r7, #4]
- 8003f52: 3201 adds r2, #1
- 8003f54: 7812 ldrb r2, [r2, #0]
- 8003f56: 4313 orrs r3, r2
- 8003f58: 60fb str r3, [r7, #12]
- rv = rv << 8 | ptr[0];
- 8003f5a: 68fb ldr r3, [r7, #12]
- 8003f5c: 021b lsls r3, r3, #8
- 8003f5e: 687a ldr r2, [r7, #4]
- 8003f60: 7812 ldrb r2, [r2, #0]
- 8003f62: 4313 orrs r3, r2
- 8003f64: 60fb str r3, [r7, #12]
- return rv;
- 8003f66: 68fb ldr r3, [r7, #12]
- }
- 8003f68: 4618 mov r0, r3
- 8003f6a: 3714 adds r7, #20
- 8003f6c: 46bd mov sp, r7
- 8003f6e: bc80 pop {r7}
- 8003f70: 4770 bx lr
-
- 08003f72 <st_word>:
- #endif
-
- #if !_FS_READONLY
- static
- void st_word (BYTE* ptr, WORD val) /* Store a 2-byte word in little-endian */
- {
- 8003f72: b480 push {r7}
- 8003f74: b083 sub sp, #12
- 8003f76: af00 add r7, sp, #0
- 8003f78: 6078 str r0, [r7, #4]
- 8003f7a: 460b mov r3, r1
- 8003f7c: 807b strh r3, [r7, #2]
- *ptr++ = (BYTE)val; val >>= 8;
- 8003f7e: 687b ldr r3, [r7, #4]
- 8003f80: 1c5a adds r2, r3, #1
- 8003f82: 607a str r2, [r7, #4]
- 8003f84: 887a ldrh r2, [r7, #2]
- 8003f86: b2d2 uxtb r2, r2
- 8003f88: 701a strb r2, [r3, #0]
- 8003f8a: 887b ldrh r3, [r7, #2]
- 8003f8c: 0a1b lsrs r3, r3, #8
- 8003f8e: 807b strh r3, [r7, #2]
- *ptr++ = (BYTE)val;
- 8003f90: 687b ldr r3, [r7, #4]
- 8003f92: 1c5a adds r2, r3, #1
- 8003f94: 607a str r2, [r7, #4]
- 8003f96: 887a ldrh r2, [r7, #2]
- 8003f98: b2d2 uxtb r2, r2
- 8003f9a: 701a strb r2, [r3, #0]
- }
- 8003f9c: bf00 nop
- 8003f9e: 370c adds r7, #12
- 8003fa0: 46bd mov sp, r7
- 8003fa2: bc80 pop {r7}
- 8003fa4: 4770 bx lr
-
- 08003fa6 <st_dword>:
-
- static
- void st_dword (BYTE* ptr, DWORD val) /* Store a 4-byte word in little-endian */
- {
- 8003fa6: b480 push {r7}
- 8003fa8: b083 sub sp, #12
- 8003faa: af00 add r7, sp, #0
- 8003fac: 6078 str r0, [r7, #4]
- 8003fae: 6039 str r1, [r7, #0]
- *ptr++ = (BYTE)val; val >>= 8;
- 8003fb0: 687b ldr r3, [r7, #4]
- 8003fb2: 1c5a adds r2, r3, #1
- 8003fb4: 607a str r2, [r7, #4]
- 8003fb6: 683a ldr r2, [r7, #0]
- 8003fb8: b2d2 uxtb r2, r2
- 8003fba: 701a strb r2, [r3, #0]
- 8003fbc: 683b ldr r3, [r7, #0]
- 8003fbe: 0a1b lsrs r3, r3, #8
- 8003fc0: 603b str r3, [r7, #0]
- *ptr++ = (BYTE)val; val >>= 8;
- 8003fc2: 687b ldr r3, [r7, #4]
- 8003fc4: 1c5a adds r2, r3, #1
- 8003fc6: 607a str r2, [r7, #4]
- 8003fc8: 683a ldr r2, [r7, #0]
- 8003fca: b2d2 uxtb r2, r2
- 8003fcc: 701a strb r2, [r3, #0]
- 8003fce: 683b ldr r3, [r7, #0]
- 8003fd0: 0a1b lsrs r3, r3, #8
- 8003fd2: 603b str r3, [r7, #0]
- *ptr++ = (BYTE)val; val >>= 8;
- 8003fd4: 687b ldr r3, [r7, #4]
- 8003fd6: 1c5a adds r2, r3, #1
- 8003fd8: 607a str r2, [r7, #4]
- 8003fda: 683a ldr r2, [r7, #0]
- 8003fdc: b2d2 uxtb r2, r2
- 8003fde: 701a strb r2, [r3, #0]
- 8003fe0: 683b ldr r3, [r7, #0]
- 8003fe2: 0a1b lsrs r3, r3, #8
- 8003fe4: 603b str r3, [r7, #0]
- *ptr++ = (BYTE)val;
- 8003fe6: 687b ldr r3, [r7, #4]
- 8003fe8: 1c5a adds r2, r3, #1
- 8003fea: 607a str r2, [r7, #4]
- 8003fec: 683a ldr r2, [r7, #0]
- 8003fee: b2d2 uxtb r2, r2
- 8003ff0: 701a strb r2, [r3, #0]
- }
- 8003ff2: bf00 nop
- 8003ff4: 370c adds r7, #12
- 8003ff6: 46bd mov sp, r7
- 8003ff8: bc80 pop {r7}
- 8003ffa: 4770 bx lr
-
- 08003ffc <mem_cpy>:
- /* String functions */
- /*-----------------------------------------------------------------------*/
-
- /* Copy memory to memory */
- static
- void mem_cpy (void* dst, const void* src, UINT cnt) {
- 8003ffc: b480 push {r7}
- 8003ffe: b087 sub sp, #28
- 8004000: af00 add r7, sp, #0
- 8004002: 60f8 str r0, [r7, #12]
- 8004004: 60b9 str r1, [r7, #8]
- 8004006: 607a str r2, [r7, #4]
- BYTE *d = (BYTE*)dst;
- 8004008: 68fb ldr r3, [r7, #12]
- 800400a: 617b str r3, [r7, #20]
- const BYTE *s = (const BYTE*)src;
- 800400c: 68bb ldr r3, [r7, #8]
- 800400e: 613b str r3, [r7, #16]
-
- if (cnt) {
- 8004010: 687b ldr r3, [r7, #4]
- 8004012: 2b00 cmp r3, #0
- 8004014: d00d beq.n 8004032 <mem_cpy+0x36>
- do {
- *d++ = *s++;
- 8004016: 693a ldr r2, [r7, #16]
- 8004018: 1c53 adds r3, r2, #1
- 800401a: 613b str r3, [r7, #16]
- 800401c: 697b ldr r3, [r7, #20]
- 800401e: 1c59 adds r1, r3, #1
- 8004020: 6179 str r1, [r7, #20]
- 8004022: 7812 ldrb r2, [r2, #0]
- 8004024: 701a strb r2, [r3, #0]
- } while (--cnt);
- 8004026: 687b ldr r3, [r7, #4]
- 8004028: 3b01 subs r3, #1
- 800402a: 607b str r3, [r7, #4]
- 800402c: 687b ldr r3, [r7, #4]
- 800402e: 2b00 cmp r3, #0
- 8004030: d1f1 bne.n 8004016 <mem_cpy+0x1a>
- }
- }
- 8004032: bf00 nop
- 8004034: 371c adds r7, #28
- 8004036: 46bd mov sp, r7
- 8004038: bc80 pop {r7}
- 800403a: 4770 bx lr
-
- 0800403c <mem_set>:
-
- /* Fill memory block */
- static
- void mem_set (void* dst, int val, UINT cnt) {
- 800403c: b480 push {r7}
- 800403e: b087 sub sp, #28
- 8004040: af00 add r7, sp, #0
- 8004042: 60f8 str r0, [r7, #12]
- 8004044: 60b9 str r1, [r7, #8]
- 8004046: 607a str r2, [r7, #4]
- BYTE *d = (BYTE*)dst;
- 8004048: 68fb ldr r3, [r7, #12]
- 800404a: 617b str r3, [r7, #20]
-
- do {
- *d++ = (BYTE)val;
- 800404c: 697b ldr r3, [r7, #20]
- 800404e: 1c5a adds r2, r3, #1
- 8004050: 617a str r2, [r7, #20]
- 8004052: 68ba ldr r2, [r7, #8]
- 8004054: b2d2 uxtb r2, r2
- 8004056: 701a strb r2, [r3, #0]
- } while (--cnt);
- 8004058: 687b ldr r3, [r7, #4]
- 800405a: 3b01 subs r3, #1
- 800405c: 607b str r3, [r7, #4]
- 800405e: 687b ldr r3, [r7, #4]
- 8004060: 2b00 cmp r3, #0
- 8004062: d1f3 bne.n 800404c <mem_set+0x10>
- }
- 8004064: bf00 nop
- 8004066: 371c adds r7, #28
- 8004068: 46bd mov sp, r7
- 800406a: bc80 pop {r7}
- 800406c: 4770 bx lr
-
- 0800406e <mem_cmp>:
-
- /* Compare memory block */
- static
- int mem_cmp (const void* dst, const void* src, UINT cnt) { /* ZR:same, NZ:different */
- 800406e: b480 push {r7}
- 8004070: b089 sub sp, #36 ; 0x24
- 8004072: af00 add r7, sp, #0
- 8004074: 60f8 str r0, [r7, #12]
- 8004076: 60b9 str r1, [r7, #8]
- 8004078: 607a str r2, [r7, #4]
- const BYTE *d = (const BYTE *)dst, *s = (const BYTE *)src;
- 800407a: 68fb ldr r3, [r7, #12]
- 800407c: 61fb str r3, [r7, #28]
- 800407e: 68bb ldr r3, [r7, #8]
- 8004080: 61bb str r3, [r7, #24]
- int r = 0;
- 8004082: 2300 movs r3, #0
- 8004084: 617b str r3, [r7, #20]
-
- do {
- r = *d++ - *s++;
- 8004086: 69fb ldr r3, [r7, #28]
- 8004088: 1c5a adds r2, r3, #1
- 800408a: 61fa str r2, [r7, #28]
- 800408c: 781b ldrb r3, [r3, #0]
- 800408e: 4619 mov r1, r3
- 8004090: 69bb ldr r3, [r7, #24]
- 8004092: 1c5a adds r2, r3, #1
- 8004094: 61ba str r2, [r7, #24]
- 8004096: 781b ldrb r3, [r3, #0]
- 8004098: 1acb subs r3, r1, r3
- 800409a: 617b str r3, [r7, #20]
- } while (--cnt && r == 0);
- 800409c: 687b ldr r3, [r7, #4]
- 800409e: 3b01 subs r3, #1
- 80040a0: 607b str r3, [r7, #4]
- 80040a2: 687b ldr r3, [r7, #4]
- 80040a4: 2b00 cmp r3, #0
- 80040a6: d002 beq.n 80040ae <mem_cmp+0x40>
- 80040a8: 697b ldr r3, [r7, #20]
- 80040aa: 2b00 cmp r3, #0
- 80040ac: d0eb beq.n 8004086 <mem_cmp+0x18>
-
- return r;
- 80040ae: 697b ldr r3, [r7, #20]
- }
- 80040b0: 4618 mov r0, r3
- 80040b2: 3724 adds r7, #36 ; 0x24
- 80040b4: 46bd mov sp, r7
- 80040b6: bc80 pop {r7}
- 80040b8: 4770 bx lr
-
- 080040ba <chk_chr>:
-
- /* Check if chr is contained in the string */
- static
- int chk_chr (const char* str, int chr) { /* NZ:contained, ZR:not contained */
- 80040ba: b480 push {r7}
- 80040bc: b083 sub sp, #12
- 80040be: af00 add r7, sp, #0
- 80040c0: 6078 str r0, [r7, #4]
- 80040c2: 6039 str r1, [r7, #0]
- while (*str && *str != chr) str++;
- 80040c4: e002 b.n 80040cc <chk_chr+0x12>
- 80040c6: 687b ldr r3, [r7, #4]
- 80040c8: 3301 adds r3, #1
- 80040ca: 607b str r3, [r7, #4]
- 80040cc: 687b ldr r3, [r7, #4]
- 80040ce: 781b ldrb r3, [r3, #0]
- 80040d0: 2b00 cmp r3, #0
- 80040d2: d005 beq.n 80040e0 <chk_chr+0x26>
- 80040d4: 687b ldr r3, [r7, #4]
- 80040d6: 781b ldrb r3, [r3, #0]
- 80040d8: 461a mov r2, r3
- 80040da: 683b ldr r3, [r7, #0]
- 80040dc: 4293 cmp r3, r2
- 80040de: d1f2 bne.n 80040c6 <chk_chr+0xc>
- return *str;
- 80040e0: 687b ldr r3, [r7, #4]
- 80040e2: 781b ldrb r3, [r3, #0]
- }
- 80040e4: 4618 mov r0, r3
- 80040e6: 370c adds r7, #12
- 80040e8: 46bd mov sp, r7
- 80040ea: bc80 pop {r7}
- 80040ec: 4770 bx lr
- ...
-
- 080040f0 <chk_lock>:
- static
- FRESULT chk_lock ( /* Check if the file can be accessed */
- DIR* dp, /* Directory object pointing the file to be checked */
- int acc /* Desired access type (0:Read, 1:Write, 2:Delete/Rename) */
- )
- {
- 80040f0: b480 push {r7}
- 80040f2: b085 sub sp, #20
- 80040f4: af00 add r7, sp, #0
- 80040f6: 6078 str r0, [r7, #4]
- 80040f8: 6039 str r1, [r7, #0]
- UINT i, be;
-
- /* Search file semaphore table */
- for (i = be = 0; i < _FS_LOCK; i++) {
- 80040fa: 2300 movs r3, #0
- 80040fc: 60bb str r3, [r7, #8]
- 80040fe: 68bb ldr r3, [r7, #8]
- 8004100: 60fb str r3, [r7, #12]
- 8004102: e029 b.n 8004158 <chk_lock+0x68>
- if (Files[i].fs) { /* Existing entry */
- 8004104: 4a26 ldr r2, [pc, #152] ; (80041a0 <chk_lock+0xb0>)
- 8004106: 68fb ldr r3, [r7, #12]
- 8004108: 011b lsls r3, r3, #4
- 800410a: 4413 add r3, r2
- 800410c: 681b ldr r3, [r3, #0]
- 800410e: 2b00 cmp r3, #0
- 8004110: d01d beq.n 800414e <chk_lock+0x5e>
- if (Files[i].fs == dp->obj.fs && /* Check if the object matched with an open object */
- 8004112: 4a23 ldr r2, [pc, #140] ; (80041a0 <chk_lock+0xb0>)
- 8004114: 68fb ldr r3, [r7, #12]
- 8004116: 011b lsls r3, r3, #4
- 8004118: 4413 add r3, r2
- 800411a: 681a ldr r2, [r3, #0]
- 800411c: 687b ldr r3, [r7, #4]
- 800411e: 681b ldr r3, [r3, #0]
- 8004120: 429a cmp r2, r3
- 8004122: d116 bne.n 8004152 <chk_lock+0x62>
- Files[i].clu == dp->obj.sclust &&
- 8004124: 4a1e ldr r2, [pc, #120] ; (80041a0 <chk_lock+0xb0>)
- 8004126: 68fb ldr r3, [r7, #12]
- 8004128: 011b lsls r3, r3, #4
- 800412a: 4413 add r3, r2
- 800412c: 3304 adds r3, #4
- 800412e: 681a ldr r2, [r3, #0]
- 8004130: 687b ldr r3, [r7, #4]
- 8004132: 689b ldr r3, [r3, #8]
- if (Files[i].fs == dp->obj.fs && /* Check if the object matched with an open object */
- 8004134: 429a cmp r2, r3
- 8004136: d10c bne.n 8004152 <chk_lock+0x62>
- Files[i].ofs == dp->dptr) break;
- 8004138: 4a19 ldr r2, [pc, #100] ; (80041a0 <chk_lock+0xb0>)
- 800413a: 68fb ldr r3, [r7, #12]
- 800413c: 011b lsls r3, r3, #4
- 800413e: 4413 add r3, r2
- 8004140: 3308 adds r3, #8
- 8004142: 681a ldr r2, [r3, #0]
- 8004144: 687b ldr r3, [r7, #4]
- 8004146: 695b ldr r3, [r3, #20]
- Files[i].clu == dp->obj.sclust &&
- 8004148: 429a cmp r2, r3
- 800414a: d102 bne.n 8004152 <chk_lock+0x62>
- Files[i].ofs == dp->dptr) break;
- 800414c: e007 b.n 800415e <chk_lock+0x6e>
- } else { /* Blank entry */
- be = 1;
- 800414e: 2301 movs r3, #1
- 8004150: 60bb str r3, [r7, #8]
- for (i = be = 0; i < _FS_LOCK; i++) {
- 8004152: 68fb ldr r3, [r7, #12]
- 8004154: 3301 adds r3, #1
- 8004156: 60fb str r3, [r7, #12]
- 8004158: 68fb ldr r3, [r7, #12]
- 800415a: 2b01 cmp r3, #1
- 800415c: d9d2 bls.n 8004104 <chk_lock+0x14>
- }
- }
- if (i == _FS_LOCK) { /* The object is not opened */
- 800415e: 68fb ldr r3, [r7, #12]
- 8004160: 2b02 cmp r3, #2
- 8004162: d109 bne.n 8004178 <chk_lock+0x88>
- return (be || acc == 2) ? FR_OK : FR_TOO_MANY_OPEN_FILES; /* Is there a blank entry for new object? */
- 8004164: 68bb ldr r3, [r7, #8]
- 8004166: 2b00 cmp r3, #0
- 8004168: d102 bne.n 8004170 <chk_lock+0x80>
- 800416a: 683b ldr r3, [r7, #0]
- 800416c: 2b02 cmp r3, #2
- 800416e: d101 bne.n 8004174 <chk_lock+0x84>
- 8004170: 2300 movs r3, #0
- 8004172: e010 b.n 8004196 <chk_lock+0xa6>
- 8004174: 2312 movs r3, #18
- 8004176: e00e b.n 8004196 <chk_lock+0xa6>
- }
-
- /* The object has been opened. Reject any open against writing file and all write mode open */
- return (acc || Files[i].ctr == 0x100) ? FR_LOCKED : FR_OK;
- 8004178: 683b ldr r3, [r7, #0]
- 800417a: 2b00 cmp r3, #0
- 800417c: d108 bne.n 8004190 <chk_lock+0xa0>
- 800417e: 4a08 ldr r2, [pc, #32] ; (80041a0 <chk_lock+0xb0>)
- 8004180: 68fb ldr r3, [r7, #12]
- 8004182: 011b lsls r3, r3, #4
- 8004184: 4413 add r3, r2
- 8004186: 330c adds r3, #12
- 8004188: 881b ldrh r3, [r3, #0]
- 800418a: f5b3 7f80 cmp.w r3, #256 ; 0x100
- 800418e: d101 bne.n 8004194 <chk_lock+0xa4>
- 8004190: 2310 movs r3, #16
- 8004192: e000 b.n 8004196 <chk_lock+0xa6>
- 8004194: 2300 movs r3, #0
- }
- 8004196: 4618 mov r0, r3
- 8004198: 3714 adds r7, #20
- 800419a: 46bd mov sp, r7
- 800419c: bc80 pop {r7}
- 800419e: 4770 bx lr
- 80041a0: 200000b4 .word 0x200000b4
-
- 080041a4 <enq_lock>:
-
-
- static
- int enq_lock (void) /* Check if an entry is available for a new object */
- {
- 80041a4: b480 push {r7}
- 80041a6: b083 sub sp, #12
- 80041a8: af00 add r7, sp, #0
- UINT i;
-
- for (i = 0; i < _FS_LOCK && Files[i].fs; i++) ;
- 80041aa: 2300 movs r3, #0
- 80041ac: 607b str r3, [r7, #4]
- 80041ae: e002 b.n 80041b6 <enq_lock+0x12>
- 80041b0: 687b ldr r3, [r7, #4]
- 80041b2: 3301 adds r3, #1
- 80041b4: 607b str r3, [r7, #4]
- 80041b6: 687b ldr r3, [r7, #4]
- 80041b8: 2b01 cmp r3, #1
- 80041ba: d806 bhi.n 80041ca <enq_lock+0x26>
- 80041bc: 4a08 ldr r2, [pc, #32] ; (80041e0 <enq_lock+0x3c>)
- 80041be: 687b ldr r3, [r7, #4]
- 80041c0: 011b lsls r3, r3, #4
- 80041c2: 4413 add r3, r2
- 80041c4: 681b ldr r3, [r3, #0]
- 80041c6: 2b00 cmp r3, #0
- 80041c8: d1f2 bne.n 80041b0 <enq_lock+0xc>
- return (i == _FS_LOCK) ? 0 : 1;
- 80041ca: 687b ldr r3, [r7, #4]
- 80041cc: 2b02 cmp r3, #2
- 80041ce: bf14 ite ne
- 80041d0: 2301 movne r3, #1
- 80041d2: 2300 moveq r3, #0
- 80041d4: b2db uxtb r3, r3
- }
- 80041d6: 4618 mov r0, r3
- 80041d8: 370c adds r7, #12
- 80041da: 46bd mov sp, r7
- 80041dc: bc80 pop {r7}
- 80041de: 4770 bx lr
- 80041e0: 200000b4 .word 0x200000b4
-
- 080041e4 <inc_lock>:
- static
- UINT inc_lock ( /* Increment object open counter and returns its index (0:Internal error) */
- DIR* dp, /* Directory object pointing the file to register or increment */
- int acc /* Desired access (0:Read, 1:Write, 2:Delete/Rename) */
- )
- {
- 80041e4: b480 push {r7}
- 80041e6: b085 sub sp, #20
- 80041e8: af00 add r7, sp, #0
- 80041ea: 6078 str r0, [r7, #4]
- 80041ec: 6039 str r1, [r7, #0]
- UINT i;
-
-
- for (i = 0; i < _FS_LOCK; i++) { /* Find the object */
- 80041ee: 2300 movs r3, #0
- 80041f0: 60fb str r3, [r7, #12]
- 80041f2: e01f b.n 8004234 <inc_lock+0x50>
- if (Files[i].fs == dp->obj.fs &&
- 80041f4: 4a41 ldr r2, [pc, #260] ; (80042fc <inc_lock+0x118>)
- 80041f6: 68fb ldr r3, [r7, #12]
- 80041f8: 011b lsls r3, r3, #4
- 80041fa: 4413 add r3, r2
- 80041fc: 681a ldr r2, [r3, #0]
- 80041fe: 687b ldr r3, [r7, #4]
- 8004200: 681b ldr r3, [r3, #0]
- 8004202: 429a cmp r2, r3
- 8004204: d113 bne.n 800422e <inc_lock+0x4a>
- Files[i].clu == dp->obj.sclust &&
- 8004206: 4a3d ldr r2, [pc, #244] ; (80042fc <inc_lock+0x118>)
- 8004208: 68fb ldr r3, [r7, #12]
- 800420a: 011b lsls r3, r3, #4
- 800420c: 4413 add r3, r2
- 800420e: 3304 adds r3, #4
- 8004210: 681a ldr r2, [r3, #0]
- 8004212: 687b ldr r3, [r7, #4]
- 8004214: 689b ldr r3, [r3, #8]
- if (Files[i].fs == dp->obj.fs &&
- 8004216: 429a cmp r2, r3
- 8004218: d109 bne.n 800422e <inc_lock+0x4a>
- Files[i].ofs == dp->dptr) break;
- 800421a: 4a38 ldr r2, [pc, #224] ; (80042fc <inc_lock+0x118>)
- 800421c: 68fb ldr r3, [r7, #12]
- 800421e: 011b lsls r3, r3, #4
- 8004220: 4413 add r3, r2
- 8004222: 3308 adds r3, #8
- 8004224: 681a ldr r2, [r3, #0]
- 8004226: 687b ldr r3, [r7, #4]
- 8004228: 695b ldr r3, [r3, #20]
- Files[i].clu == dp->obj.sclust &&
- 800422a: 429a cmp r2, r3
- 800422c: d006 beq.n 800423c <inc_lock+0x58>
- for (i = 0; i < _FS_LOCK; i++) { /* Find the object */
- 800422e: 68fb ldr r3, [r7, #12]
- 8004230: 3301 adds r3, #1
- 8004232: 60fb str r3, [r7, #12]
- 8004234: 68fb ldr r3, [r7, #12]
- 8004236: 2b01 cmp r3, #1
- 8004238: d9dc bls.n 80041f4 <inc_lock+0x10>
- 800423a: e000 b.n 800423e <inc_lock+0x5a>
- Files[i].ofs == dp->dptr) break;
- 800423c: bf00 nop
- }
-
- if (i == _FS_LOCK) { /* Not opened. Register it as new. */
- 800423e: 68fb ldr r3, [r7, #12]
- 8004240: 2b02 cmp r3, #2
- 8004242: d132 bne.n 80042aa <inc_lock+0xc6>
- for (i = 0; i < _FS_LOCK && Files[i].fs; i++) ;
- 8004244: 2300 movs r3, #0
- 8004246: 60fb str r3, [r7, #12]
- 8004248: e002 b.n 8004250 <inc_lock+0x6c>
- 800424a: 68fb ldr r3, [r7, #12]
- 800424c: 3301 adds r3, #1
- 800424e: 60fb str r3, [r7, #12]
- 8004250: 68fb ldr r3, [r7, #12]
- 8004252: 2b01 cmp r3, #1
- 8004254: d806 bhi.n 8004264 <inc_lock+0x80>
- 8004256: 4a29 ldr r2, [pc, #164] ; (80042fc <inc_lock+0x118>)
- 8004258: 68fb ldr r3, [r7, #12]
- 800425a: 011b lsls r3, r3, #4
- 800425c: 4413 add r3, r2
- 800425e: 681b ldr r3, [r3, #0]
- 8004260: 2b00 cmp r3, #0
- 8004262: d1f2 bne.n 800424a <inc_lock+0x66>
- if (i == _FS_LOCK) return 0; /* No free entry to register (int err) */
- 8004264: 68fb ldr r3, [r7, #12]
- 8004266: 2b02 cmp r3, #2
- 8004268: d101 bne.n 800426e <inc_lock+0x8a>
- 800426a: 2300 movs r3, #0
- 800426c: e040 b.n 80042f0 <inc_lock+0x10c>
- Files[i].fs = dp->obj.fs;
- 800426e: 687b ldr r3, [r7, #4]
- 8004270: 681a ldr r2, [r3, #0]
- 8004272: 4922 ldr r1, [pc, #136] ; (80042fc <inc_lock+0x118>)
- 8004274: 68fb ldr r3, [r7, #12]
- 8004276: 011b lsls r3, r3, #4
- 8004278: 440b add r3, r1
- 800427a: 601a str r2, [r3, #0]
- Files[i].clu = dp->obj.sclust;
- 800427c: 687b ldr r3, [r7, #4]
- 800427e: 689a ldr r2, [r3, #8]
- 8004280: 491e ldr r1, [pc, #120] ; (80042fc <inc_lock+0x118>)
- 8004282: 68fb ldr r3, [r7, #12]
- 8004284: 011b lsls r3, r3, #4
- 8004286: 440b add r3, r1
- 8004288: 3304 adds r3, #4
- 800428a: 601a str r2, [r3, #0]
- Files[i].ofs = dp->dptr;
- 800428c: 687b ldr r3, [r7, #4]
- 800428e: 695a ldr r2, [r3, #20]
- 8004290: 491a ldr r1, [pc, #104] ; (80042fc <inc_lock+0x118>)
- 8004292: 68fb ldr r3, [r7, #12]
- 8004294: 011b lsls r3, r3, #4
- 8004296: 440b add r3, r1
- 8004298: 3308 adds r3, #8
- 800429a: 601a str r2, [r3, #0]
- Files[i].ctr = 0;
- 800429c: 4a17 ldr r2, [pc, #92] ; (80042fc <inc_lock+0x118>)
- 800429e: 68fb ldr r3, [r7, #12]
- 80042a0: 011b lsls r3, r3, #4
- 80042a2: 4413 add r3, r2
- 80042a4: 330c adds r3, #12
- 80042a6: 2200 movs r2, #0
- 80042a8: 801a strh r2, [r3, #0]
- }
-
- if (acc && Files[i].ctr) return 0; /* Access violation (int err) */
- 80042aa: 683b ldr r3, [r7, #0]
- 80042ac: 2b00 cmp r3, #0
- 80042ae: d009 beq.n 80042c4 <inc_lock+0xe0>
- 80042b0: 4a12 ldr r2, [pc, #72] ; (80042fc <inc_lock+0x118>)
- 80042b2: 68fb ldr r3, [r7, #12]
- 80042b4: 011b lsls r3, r3, #4
- 80042b6: 4413 add r3, r2
- 80042b8: 330c adds r3, #12
- 80042ba: 881b ldrh r3, [r3, #0]
- 80042bc: 2b00 cmp r3, #0
- 80042be: d001 beq.n 80042c4 <inc_lock+0xe0>
- 80042c0: 2300 movs r3, #0
- 80042c2: e015 b.n 80042f0 <inc_lock+0x10c>
-
- Files[i].ctr = acc ? 0x100 : Files[i].ctr + 1; /* Set semaphore value */
- 80042c4: 683b ldr r3, [r7, #0]
- 80042c6: 2b00 cmp r3, #0
- 80042c8: d108 bne.n 80042dc <inc_lock+0xf8>
- 80042ca: 4a0c ldr r2, [pc, #48] ; (80042fc <inc_lock+0x118>)
- 80042cc: 68fb ldr r3, [r7, #12]
- 80042ce: 011b lsls r3, r3, #4
- 80042d0: 4413 add r3, r2
- 80042d2: 330c adds r3, #12
- 80042d4: 881b ldrh r3, [r3, #0]
- 80042d6: 3301 adds r3, #1
- 80042d8: b29a uxth r2, r3
- 80042da: e001 b.n 80042e0 <inc_lock+0xfc>
- 80042dc: f44f 7280 mov.w r2, #256 ; 0x100
- 80042e0: 4906 ldr r1, [pc, #24] ; (80042fc <inc_lock+0x118>)
- 80042e2: 68fb ldr r3, [r7, #12]
- 80042e4: 011b lsls r3, r3, #4
- 80042e6: 440b add r3, r1
- 80042e8: 330c adds r3, #12
- 80042ea: 801a strh r2, [r3, #0]
-
- return i + 1;
- 80042ec: 68fb ldr r3, [r7, #12]
- 80042ee: 3301 adds r3, #1
- }
- 80042f0: 4618 mov r0, r3
- 80042f2: 3714 adds r7, #20
- 80042f4: 46bd mov sp, r7
- 80042f6: bc80 pop {r7}
- 80042f8: 4770 bx lr
- 80042fa: bf00 nop
- 80042fc: 200000b4 .word 0x200000b4
-
- 08004300 <dec_lock>:
-
- static
- FRESULT dec_lock ( /* Decrement object open counter */
- UINT i /* Semaphore index (1..) */
- )
- {
- 8004300: b480 push {r7}
- 8004302: b085 sub sp, #20
- 8004304: af00 add r7, sp, #0
- 8004306: 6078 str r0, [r7, #4]
- WORD n;
- FRESULT res;
-
-
- if (--i < _FS_LOCK) { /* Shift index number origin from 0 */
- 8004308: 687b ldr r3, [r7, #4]
- 800430a: 3b01 subs r3, #1
- 800430c: 607b str r3, [r7, #4]
- 800430e: 687b ldr r3, [r7, #4]
- 8004310: 2b01 cmp r3, #1
- 8004312: d825 bhi.n 8004360 <dec_lock+0x60>
- n = Files[i].ctr;
- 8004314: 4a16 ldr r2, [pc, #88] ; (8004370 <dec_lock+0x70>)
- 8004316: 687b ldr r3, [r7, #4]
- 8004318: 011b lsls r3, r3, #4
- 800431a: 4413 add r3, r2
- 800431c: 330c adds r3, #12
- 800431e: 881b ldrh r3, [r3, #0]
- 8004320: 81fb strh r3, [r7, #14]
- if (n == 0x100) n = 0; /* If write mode open, delete the entry */
- 8004322: 89fb ldrh r3, [r7, #14]
- 8004324: f5b3 7f80 cmp.w r3, #256 ; 0x100
- 8004328: d101 bne.n 800432e <dec_lock+0x2e>
- 800432a: 2300 movs r3, #0
- 800432c: 81fb strh r3, [r7, #14]
- if (n > 0) n--; /* Decrement read mode open count */
- 800432e: 89fb ldrh r3, [r7, #14]
- 8004330: 2b00 cmp r3, #0
- 8004332: d002 beq.n 800433a <dec_lock+0x3a>
- 8004334: 89fb ldrh r3, [r7, #14]
- 8004336: 3b01 subs r3, #1
- 8004338: 81fb strh r3, [r7, #14]
- Files[i].ctr = n;
- 800433a: 4a0d ldr r2, [pc, #52] ; (8004370 <dec_lock+0x70>)
- 800433c: 687b ldr r3, [r7, #4]
- 800433e: 011b lsls r3, r3, #4
- 8004340: 4413 add r3, r2
- 8004342: 330c adds r3, #12
- 8004344: 89fa ldrh r2, [r7, #14]
- 8004346: 801a strh r2, [r3, #0]
- if (n == 0) Files[i].fs = 0; /* Delete the entry if open count gets zero */
- 8004348: 89fb ldrh r3, [r7, #14]
- 800434a: 2b00 cmp r3, #0
- 800434c: d105 bne.n 800435a <dec_lock+0x5a>
- 800434e: 4a08 ldr r2, [pc, #32] ; (8004370 <dec_lock+0x70>)
- 8004350: 687b ldr r3, [r7, #4]
- 8004352: 011b lsls r3, r3, #4
- 8004354: 4413 add r3, r2
- 8004356: 2200 movs r2, #0
- 8004358: 601a str r2, [r3, #0]
- res = FR_OK;
- 800435a: 2300 movs r3, #0
- 800435c: 737b strb r3, [r7, #13]
- 800435e: e001 b.n 8004364 <dec_lock+0x64>
- } else {
- res = FR_INT_ERR; /* Invalid index nunber */
- 8004360: 2302 movs r3, #2
- 8004362: 737b strb r3, [r7, #13]
- }
- return res;
- 8004364: 7b7b ldrb r3, [r7, #13]
- }
- 8004366: 4618 mov r0, r3
- 8004368: 3714 adds r7, #20
- 800436a: 46bd mov sp, r7
- 800436c: bc80 pop {r7}
- 800436e: 4770 bx lr
- 8004370: 200000b4 .word 0x200000b4
-
- 08004374 <clear_lock>:
-
- static
- void clear_lock ( /* Clear lock entries of the volume */
- FATFS *fs
- )
- {
- 8004374: b480 push {r7}
- 8004376: b085 sub sp, #20
- 8004378: af00 add r7, sp, #0
- 800437a: 6078 str r0, [r7, #4]
- UINT i;
-
- for (i = 0; i < _FS_LOCK; i++) {
- 800437c: 2300 movs r3, #0
- 800437e: 60fb str r3, [r7, #12]
- 8004380: e010 b.n 80043a4 <clear_lock+0x30>
- if (Files[i].fs == fs) Files[i].fs = 0;
- 8004382: 4a0c ldr r2, [pc, #48] ; (80043b4 <clear_lock+0x40>)
- 8004384: 68fb ldr r3, [r7, #12]
- 8004386: 011b lsls r3, r3, #4
- 8004388: 4413 add r3, r2
- 800438a: 681b ldr r3, [r3, #0]
- 800438c: 687a ldr r2, [r7, #4]
- 800438e: 429a cmp r2, r3
- 8004390: d105 bne.n 800439e <clear_lock+0x2a>
- 8004392: 4a08 ldr r2, [pc, #32] ; (80043b4 <clear_lock+0x40>)
- 8004394: 68fb ldr r3, [r7, #12]
- 8004396: 011b lsls r3, r3, #4
- 8004398: 4413 add r3, r2
- 800439a: 2200 movs r2, #0
- 800439c: 601a str r2, [r3, #0]
- for (i = 0; i < _FS_LOCK; i++) {
- 800439e: 68fb ldr r3, [r7, #12]
- 80043a0: 3301 adds r3, #1
- 80043a2: 60fb str r3, [r7, #12]
- 80043a4: 68fb ldr r3, [r7, #12]
- 80043a6: 2b01 cmp r3, #1
- 80043a8: d9eb bls.n 8004382 <clear_lock+0xe>
- }
- }
- 80043aa: bf00 nop
- 80043ac: 3714 adds r7, #20
- 80043ae: 46bd mov sp, r7
- 80043b0: bc80 pop {r7}
- 80043b2: 4770 bx lr
- 80043b4: 200000b4 .word 0x200000b4
-
- 080043b8 <sync_window>:
- #if !_FS_READONLY
- static
- FRESULT sync_window ( /* Returns FR_OK or FR_DISK_ERROR */
- FATFS* fs /* File system object */
- )
- {
- 80043b8: b580 push {r7, lr}
- 80043ba: b086 sub sp, #24
- 80043bc: af00 add r7, sp, #0
- 80043be: 6078 str r0, [r7, #4]
- DWORD wsect;
- UINT nf;
- FRESULT res = FR_OK;
- 80043c0: 2300 movs r3, #0
- 80043c2: 73fb strb r3, [r7, #15]
-
-
- if (fs->wflag) { /* Write back the sector if it is dirty */
- 80043c4: 687b ldr r3, [r7, #4]
- 80043c6: 78db ldrb r3, [r3, #3]
- 80043c8: 2b00 cmp r3, #0
- 80043ca: d034 beq.n 8004436 <sync_window+0x7e>
- wsect = fs->winsect; /* Current sector number */
- 80043cc: 687b ldr r3, [r7, #4]
- 80043ce: 6b5b ldr r3, [r3, #52] ; 0x34
- 80043d0: 617b str r3, [r7, #20]
- if (disk_write(fs->drv, fs->win, wsect, 1) != RES_OK) {
- 80043d2: 687b ldr r3, [r7, #4]
- 80043d4: 7858 ldrb r0, [r3, #1]
- 80043d6: 687b ldr r3, [r7, #4]
- 80043d8: f103 0138 add.w r1, r3, #56 ; 0x38
- 80043dc: 2301 movs r3, #1
- 80043de: 697a ldr r2, [r7, #20]
- 80043e0: f7ff fd50 bl 8003e84 <disk_write>
- 80043e4: 4603 mov r3, r0
- 80043e6: 2b00 cmp r3, #0
- 80043e8: d002 beq.n 80043f0 <sync_window+0x38>
- res = FR_DISK_ERR;
- 80043ea: 2301 movs r3, #1
- 80043ec: 73fb strb r3, [r7, #15]
- 80043ee: e022 b.n 8004436 <sync_window+0x7e>
- } else {
- fs->wflag = 0;
- 80043f0: 687b ldr r3, [r7, #4]
- 80043f2: 2200 movs r2, #0
- 80043f4: 70da strb r2, [r3, #3]
- if (wsect - fs->fatbase < fs->fsize) { /* Is it in the FAT area? */
- 80043f6: 687b ldr r3, [r7, #4]
- 80043f8: 6a9b ldr r3, [r3, #40] ; 0x28
- 80043fa: 697a ldr r2, [r7, #20]
- 80043fc: 1ad2 subs r2, r2, r3
- 80043fe: 687b ldr r3, [r7, #4]
- 8004400: 6a1b ldr r3, [r3, #32]
- 8004402: 429a cmp r2, r3
- 8004404: d217 bcs.n 8004436 <sync_window+0x7e>
- for (nf = fs->n_fats; nf >= 2; nf--) { /* Reflect the change to all FAT copies */
- 8004406: 687b ldr r3, [r7, #4]
- 8004408: 789b ldrb r3, [r3, #2]
- 800440a: 613b str r3, [r7, #16]
- 800440c: e010 b.n 8004430 <sync_window+0x78>
- wsect += fs->fsize;
- 800440e: 687b ldr r3, [r7, #4]
- 8004410: 6a1b ldr r3, [r3, #32]
- 8004412: 697a ldr r2, [r7, #20]
- 8004414: 4413 add r3, r2
- 8004416: 617b str r3, [r7, #20]
- disk_write(fs->drv, fs->win, wsect, 1);
- 8004418: 687b ldr r3, [r7, #4]
- 800441a: 7858 ldrb r0, [r3, #1]
- 800441c: 687b ldr r3, [r7, #4]
- 800441e: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004422: 2301 movs r3, #1
- 8004424: 697a ldr r2, [r7, #20]
- 8004426: f7ff fd2d bl 8003e84 <disk_write>
- for (nf = fs->n_fats; nf >= 2; nf--) { /* Reflect the change to all FAT copies */
- 800442a: 693b ldr r3, [r7, #16]
- 800442c: 3b01 subs r3, #1
- 800442e: 613b str r3, [r7, #16]
- 8004430: 693b ldr r3, [r7, #16]
- 8004432: 2b01 cmp r3, #1
- 8004434: d8eb bhi.n 800440e <sync_window+0x56>
- }
- }
- }
- }
- return res;
- 8004436: 7bfb ldrb r3, [r7, #15]
- }
- 8004438: 4618 mov r0, r3
- 800443a: 3718 adds r7, #24
- 800443c: 46bd mov sp, r7
- 800443e: bd80 pop {r7, pc}
-
- 08004440 <move_window>:
- static
- FRESULT move_window ( /* Returns FR_OK or FR_DISK_ERROR */
- FATFS* fs, /* File system object */
- DWORD sector /* Sector number to make appearance in the fs->win[] */
- )
- {
- 8004440: b580 push {r7, lr}
- 8004442: b084 sub sp, #16
- 8004444: af00 add r7, sp, #0
- 8004446: 6078 str r0, [r7, #4]
- 8004448: 6039 str r1, [r7, #0]
- FRESULT res = FR_OK;
- 800444a: 2300 movs r3, #0
- 800444c: 73fb strb r3, [r7, #15]
-
-
- if (sector != fs->winsect) { /* Window offset changed? */
- 800444e: 687b ldr r3, [r7, #4]
- 8004450: 6b5b ldr r3, [r3, #52] ; 0x34
- 8004452: 683a ldr r2, [r7, #0]
- 8004454: 429a cmp r2, r3
- 8004456: d01b beq.n 8004490 <move_window+0x50>
- #if !_FS_READONLY
- res = sync_window(fs); /* Write-back changes */
- 8004458: 6878 ldr r0, [r7, #4]
- 800445a: f7ff ffad bl 80043b8 <sync_window>
- 800445e: 4603 mov r3, r0
- 8004460: 73fb strb r3, [r7, #15]
- #endif
- if (res == FR_OK) { /* Fill sector window with new data */
- 8004462: 7bfb ldrb r3, [r7, #15]
- 8004464: 2b00 cmp r3, #0
- 8004466: d113 bne.n 8004490 <move_window+0x50>
- if (disk_read(fs->drv, fs->win, sector, 1) != RES_OK) {
- 8004468: 687b ldr r3, [r7, #4]
- 800446a: 7858 ldrb r0, [r3, #1]
- 800446c: 687b ldr r3, [r7, #4]
- 800446e: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004472: 2301 movs r3, #1
- 8004474: 683a ldr r2, [r7, #0]
- 8004476: f7ff fce5 bl 8003e44 <disk_read>
- 800447a: 4603 mov r3, r0
- 800447c: 2b00 cmp r3, #0
- 800447e: d004 beq.n 800448a <move_window+0x4a>
- sector = 0xFFFFFFFF; /* Invalidate window if data is not reliable */
- 8004480: f04f 33ff mov.w r3, #4294967295
- 8004484: 603b str r3, [r7, #0]
- res = FR_DISK_ERR;
- 8004486: 2301 movs r3, #1
- 8004488: 73fb strb r3, [r7, #15]
- }
- fs->winsect = sector;
- 800448a: 687b ldr r3, [r7, #4]
- 800448c: 683a ldr r2, [r7, #0]
- 800448e: 635a str r2, [r3, #52] ; 0x34
- }
- }
- return res;
- 8004490: 7bfb ldrb r3, [r7, #15]
- }
- 8004492: 4618 mov r0, r3
- 8004494: 3710 adds r7, #16
- 8004496: 46bd mov sp, r7
- 8004498: bd80 pop {r7, pc}
- ...
-
- 0800449c <sync_fs>:
-
- static
- FRESULT sync_fs ( /* FR_OK:succeeded, !=0:error */
- FATFS* fs /* File system object */
- )
- {
- 800449c: b580 push {r7, lr}
- 800449e: b084 sub sp, #16
- 80044a0: af00 add r7, sp, #0
- 80044a2: 6078 str r0, [r7, #4]
- FRESULT res;
-
-
- res = sync_window(fs);
- 80044a4: 6878 ldr r0, [r7, #4]
- 80044a6: f7ff ff87 bl 80043b8 <sync_window>
- 80044aa: 4603 mov r3, r0
- 80044ac: 73fb strb r3, [r7, #15]
- if (res == FR_OK) {
- 80044ae: 7bfb ldrb r3, [r7, #15]
- 80044b0: 2b00 cmp r3, #0
- 80044b2: d159 bne.n 8004568 <sync_fs+0xcc>
- /* Update FSInfo sector if needed */
- if (fs->fs_type == FS_FAT32 && fs->fsi_flag == 1) {
- 80044b4: 687b ldr r3, [r7, #4]
- 80044b6: 781b ldrb r3, [r3, #0]
- 80044b8: 2b03 cmp r3, #3
- 80044ba: d149 bne.n 8004550 <sync_fs+0xb4>
- 80044bc: 687b ldr r3, [r7, #4]
- 80044be: 791b ldrb r3, [r3, #4]
- 80044c0: 2b01 cmp r3, #1
- 80044c2: d145 bne.n 8004550 <sync_fs+0xb4>
- /* Create FSInfo structure */
- mem_set(fs->win, 0, SS(fs));
- 80044c4: 687b ldr r3, [r7, #4]
- 80044c6: f103 0038 add.w r0, r3, #56 ; 0x38
- 80044ca: 687b ldr r3, [r7, #4]
- 80044cc: 899b ldrh r3, [r3, #12]
- 80044ce: 461a mov r2, r3
- 80044d0: 2100 movs r1, #0
- 80044d2: f7ff fdb3 bl 800403c <mem_set>
- st_word(fs->win + BS_55AA, 0xAA55);
- 80044d6: 687b ldr r3, [r7, #4]
- 80044d8: 3338 adds r3, #56 ; 0x38
- 80044da: f503 73ff add.w r3, r3, #510 ; 0x1fe
- 80044de: f64a 2155 movw r1, #43605 ; 0xaa55
- 80044e2: 4618 mov r0, r3
- 80044e4: f7ff fd45 bl 8003f72 <st_word>
- st_dword(fs->win + FSI_LeadSig, 0x41615252);
- 80044e8: 687b ldr r3, [r7, #4]
- 80044ea: 3338 adds r3, #56 ; 0x38
- 80044ec: 4921 ldr r1, [pc, #132] ; (8004574 <sync_fs+0xd8>)
- 80044ee: 4618 mov r0, r3
- 80044f0: f7ff fd59 bl 8003fa6 <st_dword>
- st_dword(fs->win + FSI_StrucSig, 0x61417272);
- 80044f4: 687b ldr r3, [r7, #4]
- 80044f6: 3338 adds r3, #56 ; 0x38
- 80044f8: f503 73f2 add.w r3, r3, #484 ; 0x1e4
- 80044fc: 491e ldr r1, [pc, #120] ; (8004578 <sync_fs+0xdc>)
- 80044fe: 4618 mov r0, r3
- 8004500: f7ff fd51 bl 8003fa6 <st_dword>
- st_dword(fs->win + FSI_Free_Count, fs->free_clst);
- 8004504: 687b ldr r3, [r7, #4]
- 8004506: 3338 adds r3, #56 ; 0x38
- 8004508: f503 72f4 add.w r2, r3, #488 ; 0x1e8
- 800450c: 687b ldr r3, [r7, #4]
- 800450e: 699b ldr r3, [r3, #24]
- 8004510: 4619 mov r1, r3
- 8004512: 4610 mov r0, r2
- 8004514: f7ff fd47 bl 8003fa6 <st_dword>
- st_dword(fs->win + FSI_Nxt_Free, fs->last_clst);
- 8004518: 687b ldr r3, [r7, #4]
- 800451a: 3338 adds r3, #56 ; 0x38
- 800451c: f503 72f6 add.w r2, r3, #492 ; 0x1ec
- 8004520: 687b ldr r3, [r7, #4]
- 8004522: 695b ldr r3, [r3, #20]
- 8004524: 4619 mov r1, r3
- 8004526: 4610 mov r0, r2
- 8004528: f7ff fd3d bl 8003fa6 <st_dword>
- /* Write it into the FSInfo sector */
- fs->winsect = fs->volbase + 1;
- 800452c: 687b ldr r3, [r7, #4]
- 800452e: 6a5b ldr r3, [r3, #36] ; 0x24
- 8004530: 1c5a adds r2, r3, #1
- 8004532: 687b ldr r3, [r7, #4]
- 8004534: 635a str r2, [r3, #52] ; 0x34
- disk_write(fs->drv, fs->win, fs->winsect, 1);
- 8004536: 687b ldr r3, [r7, #4]
- 8004538: 7858 ldrb r0, [r3, #1]
- 800453a: 687b ldr r3, [r7, #4]
- 800453c: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004540: 687b ldr r3, [r7, #4]
- 8004542: 6b5a ldr r2, [r3, #52] ; 0x34
- 8004544: 2301 movs r3, #1
- 8004546: f7ff fc9d bl 8003e84 <disk_write>
- fs->fsi_flag = 0;
- 800454a: 687b ldr r3, [r7, #4]
- 800454c: 2200 movs r2, #0
- 800454e: 711a strb r2, [r3, #4]
- }
- /* Make sure that no pending write process in the physical drive */
- if (disk_ioctl(fs->drv, CTRL_SYNC, 0) != RES_OK) res = FR_DISK_ERR;
- 8004550: 687b ldr r3, [r7, #4]
- 8004552: 785b ldrb r3, [r3, #1]
- 8004554: 2200 movs r2, #0
- 8004556: 2100 movs r1, #0
- 8004558: 4618 mov r0, r3
- 800455a: f7ff fcb3 bl 8003ec4 <disk_ioctl>
- 800455e: 4603 mov r3, r0
- 8004560: 2b00 cmp r3, #0
- 8004562: d001 beq.n 8004568 <sync_fs+0xcc>
- 8004564: 2301 movs r3, #1
- 8004566: 73fb strb r3, [r7, #15]
- }
-
- return res;
- 8004568: 7bfb ldrb r3, [r7, #15]
- }
- 800456a: 4618 mov r0, r3
- 800456c: 3710 adds r7, #16
- 800456e: 46bd mov sp, r7
- 8004570: bd80 pop {r7, pc}
- 8004572: bf00 nop
- 8004574: 41615252 .word 0x41615252
- 8004578: 61417272 .word 0x61417272
-
- 0800457c <clust2sect>:
- static
- DWORD clust2sect ( /* !=0:Sector number, 0:Failed (invalid cluster#) */
- FATFS* fs, /* File system object */
- DWORD clst /* Cluster# to be converted */
- )
- {
- 800457c: b480 push {r7}
- 800457e: b083 sub sp, #12
- 8004580: af00 add r7, sp, #0
- 8004582: 6078 str r0, [r7, #4]
- 8004584: 6039 str r1, [r7, #0]
- clst -= 2;
- 8004586: 683b ldr r3, [r7, #0]
- 8004588: 3b02 subs r3, #2
- 800458a: 603b str r3, [r7, #0]
- if (clst >= fs->n_fatent - 2) return 0; /* Invalid cluster# */
- 800458c: 687b ldr r3, [r7, #4]
- 800458e: 69db ldr r3, [r3, #28]
- 8004590: 3b02 subs r3, #2
- 8004592: 683a ldr r2, [r7, #0]
- 8004594: 429a cmp r2, r3
- 8004596: d301 bcc.n 800459c <clust2sect+0x20>
- 8004598: 2300 movs r3, #0
- 800459a: e008 b.n 80045ae <clust2sect+0x32>
- return clst * fs->csize + fs->database;
- 800459c: 687b ldr r3, [r7, #4]
- 800459e: 895b ldrh r3, [r3, #10]
- 80045a0: 461a mov r2, r3
- 80045a2: 683b ldr r3, [r7, #0]
- 80045a4: fb03 f202 mul.w r2, r3, r2
- 80045a8: 687b ldr r3, [r7, #4]
- 80045aa: 6b1b ldr r3, [r3, #48] ; 0x30
- 80045ac: 4413 add r3, r2
- }
- 80045ae: 4618 mov r0, r3
- 80045b0: 370c adds r7, #12
- 80045b2: 46bd mov sp, r7
- 80045b4: bc80 pop {r7}
- 80045b6: 4770 bx lr
-
- 080045b8 <get_fat>:
- static
- DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x7FFFFFFF:Cluster status */
- _FDID* obj, /* Corresponding object */
- DWORD clst /* Cluster number to get the value */
- )
- {
- 80045b8: b580 push {r7, lr}
- 80045ba: b086 sub sp, #24
- 80045bc: af00 add r7, sp, #0
- 80045be: 6078 str r0, [r7, #4]
- 80045c0: 6039 str r1, [r7, #0]
- UINT wc, bc;
- DWORD val;
- FATFS *fs = obj->fs;
- 80045c2: 687b ldr r3, [r7, #4]
- 80045c4: 681b ldr r3, [r3, #0]
- 80045c6: 613b str r3, [r7, #16]
-
-
- if (clst < 2 || clst >= fs->n_fatent) { /* Check if in valid range */
- 80045c8: 683b ldr r3, [r7, #0]
- 80045ca: 2b01 cmp r3, #1
- 80045cc: d904 bls.n 80045d8 <get_fat+0x20>
- 80045ce: 693b ldr r3, [r7, #16]
- 80045d0: 69db ldr r3, [r3, #28]
- 80045d2: 683a ldr r2, [r7, #0]
- 80045d4: 429a cmp r2, r3
- 80045d6: d302 bcc.n 80045de <get_fat+0x26>
- val = 1; /* Internal error */
- 80045d8: 2301 movs r3, #1
- 80045da: 617b str r3, [r7, #20]
- 80045dc: e0b7 b.n 800474e <get_fat+0x196>
-
- } else {
- val = 0xFFFFFFFF; /* Default value falls on disk error */
- 80045de: f04f 33ff mov.w r3, #4294967295
- 80045e2: 617b str r3, [r7, #20]
-
- switch (fs->fs_type) {
- 80045e4: 693b ldr r3, [r7, #16]
- 80045e6: 781b ldrb r3, [r3, #0]
- 80045e8: 2b02 cmp r3, #2
- 80045ea: d05a beq.n 80046a2 <get_fat+0xea>
- 80045ec: 2b03 cmp r3, #3
- 80045ee: d07d beq.n 80046ec <get_fat+0x134>
- 80045f0: 2b01 cmp r3, #1
- 80045f2: f040 80a2 bne.w 800473a <get_fat+0x182>
- case FS_FAT12 :
- bc = (UINT)clst; bc += bc / 2;
- 80045f6: 683b ldr r3, [r7, #0]
- 80045f8: 60fb str r3, [r7, #12]
- 80045fa: 68fb ldr r3, [r7, #12]
- 80045fc: 085b lsrs r3, r3, #1
- 80045fe: 68fa ldr r2, [r7, #12]
- 8004600: 4413 add r3, r2
- 8004602: 60fb str r3, [r7, #12]
- if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break;
- 8004604: 693b ldr r3, [r7, #16]
- 8004606: 6a9a ldr r2, [r3, #40] ; 0x28
- 8004608: 693b ldr r3, [r7, #16]
- 800460a: 899b ldrh r3, [r3, #12]
- 800460c: 4619 mov r1, r3
- 800460e: 68fb ldr r3, [r7, #12]
- 8004610: fbb3 f3f1 udiv r3, r3, r1
- 8004614: 4413 add r3, r2
- 8004616: 4619 mov r1, r3
- 8004618: 6938 ldr r0, [r7, #16]
- 800461a: f7ff ff11 bl 8004440 <move_window>
- 800461e: 4603 mov r3, r0
- 8004620: 2b00 cmp r3, #0
- 8004622: f040 808d bne.w 8004740 <get_fat+0x188>
- wc = fs->win[bc++ % SS(fs)];
- 8004626: 68fb ldr r3, [r7, #12]
- 8004628: 1c5a adds r2, r3, #1
- 800462a: 60fa str r2, [r7, #12]
- 800462c: 693a ldr r2, [r7, #16]
- 800462e: 8992 ldrh r2, [r2, #12]
- 8004630: fbb3 f1f2 udiv r1, r3, r2
- 8004634: fb02 f201 mul.w r2, r2, r1
- 8004638: 1a9b subs r3, r3, r2
- 800463a: 693a ldr r2, [r7, #16]
- 800463c: 4413 add r3, r2
- 800463e: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
- 8004642: 60bb str r3, [r7, #8]
- if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break;
- 8004644: 693b ldr r3, [r7, #16]
- 8004646: 6a9a ldr r2, [r3, #40] ; 0x28
- 8004648: 693b ldr r3, [r7, #16]
- 800464a: 899b ldrh r3, [r3, #12]
- 800464c: 4619 mov r1, r3
- 800464e: 68fb ldr r3, [r7, #12]
- 8004650: fbb3 f3f1 udiv r3, r3, r1
- 8004654: 4413 add r3, r2
- 8004656: 4619 mov r1, r3
- 8004658: 6938 ldr r0, [r7, #16]
- 800465a: f7ff fef1 bl 8004440 <move_window>
- 800465e: 4603 mov r3, r0
- 8004660: 2b00 cmp r3, #0
- 8004662: d16f bne.n 8004744 <get_fat+0x18c>
- wc |= fs->win[bc % SS(fs)] << 8;
- 8004664: 693b ldr r3, [r7, #16]
- 8004666: 899b ldrh r3, [r3, #12]
- 8004668: 461a mov r2, r3
- 800466a: 68fb ldr r3, [r7, #12]
- 800466c: fbb3 f1f2 udiv r1, r3, r2
- 8004670: fb02 f201 mul.w r2, r2, r1
- 8004674: 1a9b subs r3, r3, r2
- 8004676: 693a ldr r2, [r7, #16]
- 8004678: 4413 add r3, r2
- 800467a: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
- 800467e: 021b lsls r3, r3, #8
- 8004680: 461a mov r2, r3
- 8004682: 68bb ldr r3, [r7, #8]
- 8004684: 4313 orrs r3, r2
- 8004686: 60bb str r3, [r7, #8]
- val = (clst & 1) ? (wc >> 4) : (wc & 0xFFF);
- 8004688: 683b ldr r3, [r7, #0]
- 800468a: f003 0301 and.w r3, r3, #1
- 800468e: 2b00 cmp r3, #0
- 8004690: d002 beq.n 8004698 <get_fat+0xe0>
- 8004692: 68bb ldr r3, [r7, #8]
- 8004694: 091b lsrs r3, r3, #4
- 8004696: e002 b.n 800469e <get_fat+0xe6>
- 8004698: 68bb ldr r3, [r7, #8]
- 800469a: f3c3 030b ubfx r3, r3, #0, #12
- 800469e: 617b str r3, [r7, #20]
- break;
- 80046a0: e055 b.n 800474e <get_fat+0x196>
-
- case FS_FAT16 :
- if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 2))) != FR_OK) break;
- 80046a2: 693b ldr r3, [r7, #16]
- 80046a4: 6a9a ldr r2, [r3, #40] ; 0x28
- 80046a6: 693b ldr r3, [r7, #16]
- 80046a8: 899b ldrh r3, [r3, #12]
- 80046aa: 085b lsrs r3, r3, #1
- 80046ac: b29b uxth r3, r3
- 80046ae: 4619 mov r1, r3
- 80046b0: 683b ldr r3, [r7, #0]
- 80046b2: fbb3 f3f1 udiv r3, r3, r1
- 80046b6: 4413 add r3, r2
- 80046b8: 4619 mov r1, r3
- 80046ba: 6938 ldr r0, [r7, #16]
- 80046bc: f7ff fec0 bl 8004440 <move_window>
- 80046c0: 4603 mov r3, r0
- 80046c2: 2b00 cmp r3, #0
- 80046c4: d140 bne.n 8004748 <get_fat+0x190>
- val = ld_word(fs->win + clst * 2 % SS(fs));
- 80046c6: 693b ldr r3, [r7, #16]
- 80046c8: f103 0138 add.w r1, r3, #56 ; 0x38
- 80046cc: 683b ldr r3, [r7, #0]
- 80046ce: 005b lsls r3, r3, #1
- 80046d0: 693a ldr r2, [r7, #16]
- 80046d2: 8992 ldrh r2, [r2, #12]
- 80046d4: fbb3 f0f2 udiv r0, r3, r2
- 80046d8: fb02 f200 mul.w r2, r2, r0
- 80046dc: 1a9b subs r3, r3, r2
- 80046de: 440b add r3, r1
- 80046e0: 4618 mov r0, r3
- 80046e2: f7ff fc0d bl 8003f00 <ld_word>
- 80046e6: 4603 mov r3, r0
- 80046e8: 617b str r3, [r7, #20]
- break;
- 80046ea: e030 b.n 800474e <get_fat+0x196>
-
- case FS_FAT32 :
- if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4))) != FR_OK) break;
- 80046ec: 693b ldr r3, [r7, #16]
- 80046ee: 6a9a ldr r2, [r3, #40] ; 0x28
- 80046f0: 693b ldr r3, [r7, #16]
- 80046f2: 899b ldrh r3, [r3, #12]
- 80046f4: 089b lsrs r3, r3, #2
- 80046f6: b29b uxth r3, r3
- 80046f8: 4619 mov r1, r3
- 80046fa: 683b ldr r3, [r7, #0]
- 80046fc: fbb3 f3f1 udiv r3, r3, r1
- 8004700: 4413 add r3, r2
- 8004702: 4619 mov r1, r3
- 8004704: 6938 ldr r0, [r7, #16]
- 8004706: f7ff fe9b bl 8004440 <move_window>
- 800470a: 4603 mov r3, r0
- 800470c: 2b00 cmp r3, #0
- 800470e: d11d bne.n 800474c <get_fat+0x194>
- val = ld_dword(fs->win + clst * 4 % SS(fs)) & 0x0FFFFFFF;
- 8004710: 693b ldr r3, [r7, #16]
- 8004712: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004716: 683b ldr r3, [r7, #0]
- 8004718: 009b lsls r3, r3, #2
- 800471a: 693a ldr r2, [r7, #16]
- 800471c: 8992 ldrh r2, [r2, #12]
- 800471e: fbb3 f0f2 udiv r0, r3, r2
- 8004722: fb02 f200 mul.w r2, r2, r0
- 8004726: 1a9b subs r3, r3, r2
- 8004728: 440b add r3, r1
- 800472a: 4618 mov r0, r3
- 800472c: f7ff fbff bl 8003f2e <ld_dword>
- 8004730: 4603 mov r3, r0
- 8004732: f023 4370 bic.w r3, r3, #4026531840 ; 0xf0000000
- 8004736: 617b str r3, [r7, #20]
- break;
- 8004738: e009 b.n 800474e <get_fat+0x196>
- }
- }
- /* go to default */
- #endif
- default:
- val = 1; /* Internal error */
- 800473a: 2301 movs r3, #1
- 800473c: 617b str r3, [r7, #20]
- 800473e: e006 b.n 800474e <get_fat+0x196>
- if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break;
- 8004740: bf00 nop
- 8004742: e004 b.n 800474e <get_fat+0x196>
- if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break;
- 8004744: bf00 nop
- 8004746: e002 b.n 800474e <get_fat+0x196>
- if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 2))) != FR_OK) break;
- 8004748: bf00 nop
- 800474a: e000 b.n 800474e <get_fat+0x196>
- if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4))) != FR_OK) break;
- 800474c: bf00 nop
- }
- }
-
- return val;
- 800474e: 697b ldr r3, [r7, #20]
- }
- 8004750: 4618 mov r0, r3
- 8004752: 3718 adds r7, #24
- 8004754: 46bd mov sp, r7
- 8004756: bd80 pop {r7, pc}
-
- 08004758 <put_fat>:
- FRESULT put_fat ( /* FR_OK(0):succeeded, !=0:error */
- FATFS* fs, /* Corresponding file system object */
- DWORD clst, /* FAT index number (cluster number) to be changed */
- DWORD val /* New value to be set to the entry */
- )
- {
- 8004758: b590 push {r4, r7, lr}
- 800475a: b089 sub sp, #36 ; 0x24
- 800475c: af00 add r7, sp, #0
- 800475e: 60f8 str r0, [r7, #12]
- 8004760: 60b9 str r1, [r7, #8]
- 8004762: 607a str r2, [r7, #4]
- UINT bc;
- BYTE *p;
- FRESULT res = FR_INT_ERR;
- 8004764: 2302 movs r3, #2
- 8004766: 77fb strb r3, [r7, #31]
-
- if (clst >= 2 && clst < fs->n_fatent) { /* Check if in valid range */
- 8004768: 68bb ldr r3, [r7, #8]
- 800476a: 2b01 cmp r3, #1
- 800476c: f240 8106 bls.w 800497c <put_fat+0x224>
- 8004770: 68fb ldr r3, [r7, #12]
- 8004772: 69db ldr r3, [r3, #28]
- 8004774: 68ba ldr r2, [r7, #8]
- 8004776: 429a cmp r2, r3
- 8004778: f080 8100 bcs.w 800497c <put_fat+0x224>
- switch (fs->fs_type) {
- 800477c: 68fb ldr r3, [r7, #12]
- 800477e: 781b ldrb r3, [r3, #0]
- 8004780: 2b02 cmp r3, #2
- 8004782: f000 8088 beq.w 8004896 <put_fat+0x13e>
- 8004786: 2b03 cmp r3, #3
- 8004788: f000 80b0 beq.w 80048ec <put_fat+0x194>
- 800478c: 2b01 cmp r3, #1
- 800478e: f040 80f5 bne.w 800497c <put_fat+0x224>
- case FS_FAT12 : /* Bitfield items */
- bc = (UINT)clst; bc += bc / 2;
- 8004792: 68bb ldr r3, [r7, #8]
- 8004794: 61bb str r3, [r7, #24]
- 8004796: 69bb ldr r3, [r7, #24]
- 8004798: 085b lsrs r3, r3, #1
- 800479a: 69ba ldr r2, [r7, #24]
- 800479c: 4413 add r3, r2
- 800479e: 61bb str r3, [r7, #24]
- res = move_window(fs, fs->fatbase + (bc / SS(fs)));
- 80047a0: 68fb ldr r3, [r7, #12]
- 80047a2: 6a9a ldr r2, [r3, #40] ; 0x28
- 80047a4: 68fb ldr r3, [r7, #12]
- 80047a6: 899b ldrh r3, [r3, #12]
- 80047a8: 4619 mov r1, r3
- 80047aa: 69bb ldr r3, [r7, #24]
- 80047ac: fbb3 f3f1 udiv r3, r3, r1
- 80047b0: 4413 add r3, r2
- 80047b2: 4619 mov r1, r3
- 80047b4: 68f8 ldr r0, [r7, #12]
- 80047b6: f7ff fe43 bl 8004440 <move_window>
- 80047ba: 4603 mov r3, r0
- 80047bc: 77fb strb r3, [r7, #31]
- if (res != FR_OK) break;
- 80047be: 7ffb ldrb r3, [r7, #31]
- 80047c0: 2b00 cmp r3, #0
- 80047c2: f040 80d4 bne.w 800496e <put_fat+0x216>
- p = fs->win + bc++ % SS(fs);
- 80047c6: 68fb ldr r3, [r7, #12]
- 80047c8: f103 0138 add.w r1, r3, #56 ; 0x38
- 80047cc: 69bb ldr r3, [r7, #24]
- 80047ce: 1c5a adds r2, r3, #1
- 80047d0: 61ba str r2, [r7, #24]
- 80047d2: 68fa ldr r2, [r7, #12]
- 80047d4: 8992 ldrh r2, [r2, #12]
- 80047d6: fbb3 f0f2 udiv r0, r3, r2
- 80047da: fb02 f200 mul.w r2, r2, r0
- 80047de: 1a9b subs r3, r3, r2
- 80047e0: 440b add r3, r1
- 80047e2: 617b str r3, [r7, #20]
- *p = (clst & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val;
- 80047e4: 68bb ldr r3, [r7, #8]
- 80047e6: f003 0301 and.w r3, r3, #1
- 80047ea: 2b00 cmp r3, #0
- 80047ec: d00d beq.n 800480a <put_fat+0xb2>
- 80047ee: 697b ldr r3, [r7, #20]
- 80047f0: 781b ldrb r3, [r3, #0]
- 80047f2: b25b sxtb r3, r3
- 80047f4: f003 030f and.w r3, r3, #15
- 80047f8: b25a sxtb r2, r3
- 80047fa: 687b ldr r3, [r7, #4]
- 80047fc: b2db uxtb r3, r3
- 80047fe: 011b lsls r3, r3, #4
- 8004800: b25b sxtb r3, r3
- 8004802: 4313 orrs r3, r2
- 8004804: b25b sxtb r3, r3
- 8004806: b2db uxtb r3, r3
- 8004808: e001 b.n 800480e <put_fat+0xb6>
- 800480a: 687b ldr r3, [r7, #4]
- 800480c: b2db uxtb r3, r3
- 800480e: 697a ldr r2, [r7, #20]
- 8004810: 7013 strb r3, [r2, #0]
- fs->wflag = 1;
- 8004812: 68fb ldr r3, [r7, #12]
- 8004814: 2201 movs r2, #1
- 8004816: 70da strb r2, [r3, #3]
- res = move_window(fs, fs->fatbase + (bc / SS(fs)));
- 8004818: 68fb ldr r3, [r7, #12]
- 800481a: 6a9a ldr r2, [r3, #40] ; 0x28
- 800481c: 68fb ldr r3, [r7, #12]
- 800481e: 899b ldrh r3, [r3, #12]
- 8004820: 4619 mov r1, r3
- 8004822: 69bb ldr r3, [r7, #24]
- 8004824: fbb3 f3f1 udiv r3, r3, r1
- 8004828: 4413 add r3, r2
- 800482a: 4619 mov r1, r3
- 800482c: 68f8 ldr r0, [r7, #12]
- 800482e: f7ff fe07 bl 8004440 <move_window>
- 8004832: 4603 mov r3, r0
- 8004834: 77fb strb r3, [r7, #31]
- if (res != FR_OK) break;
- 8004836: 7ffb ldrb r3, [r7, #31]
- 8004838: 2b00 cmp r3, #0
- 800483a: f040 809a bne.w 8004972 <put_fat+0x21a>
- p = fs->win + bc % SS(fs);
- 800483e: 68fb ldr r3, [r7, #12]
- 8004840: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004844: 68fb ldr r3, [r7, #12]
- 8004846: 899b ldrh r3, [r3, #12]
- 8004848: 461a mov r2, r3
- 800484a: 69bb ldr r3, [r7, #24]
- 800484c: fbb3 f0f2 udiv r0, r3, r2
- 8004850: fb02 f200 mul.w r2, r2, r0
- 8004854: 1a9b subs r3, r3, r2
- 8004856: 440b add r3, r1
- 8004858: 617b str r3, [r7, #20]
- *p = (clst & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F));
- 800485a: 68bb ldr r3, [r7, #8]
- 800485c: f003 0301 and.w r3, r3, #1
- 8004860: 2b00 cmp r3, #0
- 8004862: d003 beq.n 800486c <put_fat+0x114>
- 8004864: 687b ldr r3, [r7, #4]
- 8004866: 091b lsrs r3, r3, #4
- 8004868: b2db uxtb r3, r3
- 800486a: e00e b.n 800488a <put_fat+0x132>
- 800486c: 697b ldr r3, [r7, #20]
- 800486e: 781b ldrb r3, [r3, #0]
- 8004870: b25b sxtb r3, r3
- 8004872: f023 030f bic.w r3, r3, #15
- 8004876: b25a sxtb r2, r3
- 8004878: 687b ldr r3, [r7, #4]
- 800487a: 0a1b lsrs r3, r3, #8
- 800487c: b25b sxtb r3, r3
- 800487e: f003 030f and.w r3, r3, #15
- 8004882: b25b sxtb r3, r3
- 8004884: 4313 orrs r3, r2
- 8004886: b25b sxtb r3, r3
- 8004888: b2db uxtb r3, r3
- 800488a: 697a ldr r2, [r7, #20]
- 800488c: 7013 strb r3, [r2, #0]
- fs->wflag = 1;
- 800488e: 68fb ldr r3, [r7, #12]
- 8004890: 2201 movs r2, #1
- 8004892: 70da strb r2, [r3, #3]
- break;
- 8004894: e072 b.n 800497c <put_fat+0x224>
-
- case FS_FAT16 : /* WORD aligned items */
- res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 2)));
- 8004896: 68fb ldr r3, [r7, #12]
- 8004898: 6a9a ldr r2, [r3, #40] ; 0x28
- 800489a: 68fb ldr r3, [r7, #12]
- 800489c: 899b ldrh r3, [r3, #12]
- 800489e: 085b lsrs r3, r3, #1
- 80048a0: b29b uxth r3, r3
- 80048a2: 4619 mov r1, r3
- 80048a4: 68bb ldr r3, [r7, #8]
- 80048a6: fbb3 f3f1 udiv r3, r3, r1
- 80048aa: 4413 add r3, r2
- 80048ac: 4619 mov r1, r3
- 80048ae: 68f8 ldr r0, [r7, #12]
- 80048b0: f7ff fdc6 bl 8004440 <move_window>
- 80048b4: 4603 mov r3, r0
- 80048b6: 77fb strb r3, [r7, #31]
- if (res != FR_OK) break;
- 80048b8: 7ffb ldrb r3, [r7, #31]
- 80048ba: 2b00 cmp r3, #0
- 80048bc: d15b bne.n 8004976 <put_fat+0x21e>
- st_word(fs->win + clst * 2 % SS(fs), (WORD)val);
- 80048be: 68fb ldr r3, [r7, #12]
- 80048c0: f103 0138 add.w r1, r3, #56 ; 0x38
- 80048c4: 68bb ldr r3, [r7, #8]
- 80048c6: 005b lsls r3, r3, #1
- 80048c8: 68fa ldr r2, [r7, #12]
- 80048ca: 8992 ldrh r2, [r2, #12]
- 80048cc: fbb3 f0f2 udiv r0, r3, r2
- 80048d0: fb02 f200 mul.w r2, r2, r0
- 80048d4: 1a9b subs r3, r3, r2
- 80048d6: 440b add r3, r1
- 80048d8: 687a ldr r2, [r7, #4]
- 80048da: b292 uxth r2, r2
- 80048dc: 4611 mov r1, r2
- 80048de: 4618 mov r0, r3
- 80048e0: f7ff fb47 bl 8003f72 <st_word>
- fs->wflag = 1;
- 80048e4: 68fb ldr r3, [r7, #12]
- 80048e6: 2201 movs r2, #1
- 80048e8: 70da strb r2, [r3, #3]
- break;
- 80048ea: e047 b.n 800497c <put_fat+0x224>
-
- case FS_FAT32 : /* DWORD aligned items */
- #if _FS_EXFAT
- case FS_EXFAT :
- #endif
- res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 4)));
- 80048ec: 68fb ldr r3, [r7, #12]
- 80048ee: 6a9a ldr r2, [r3, #40] ; 0x28
- 80048f0: 68fb ldr r3, [r7, #12]
- 80048f2: 899b ldrh r3, [r3, #12]
- 80048f4: 089b lsrs r3, r3, #2
- 80048f6: b29b uxth r3, r3
- 80048f8: 4619 mov r1, r3
- 80048fa: 68bb ldr r3, [r7, #8]
- 80048fc: fbb3 f3f1 udiv r3, r3, r1
- 8004900: 4413 add r3, r2
- 8004902: 4619 mov r1, r3
- 8004904: 68f8 ldr r0, [r7, #12]
- 8004906: f7ff fd9b bl 8004440 <move_window>
- 800490a: 4603 mov r3, r0
- 800490c: 77fb strb r3, [r7, #31]
- if (res != FR_OK) break;
- 800490e: 7ffb ldrb r3, [r7, #31]
- 8004910: 2b00 cmp r3, #0
- 8004912: d132 bne.n 800497a <put_fat+0x222>
- if (!_FS_EXFAT || fs->fs_type != FS_EXFAT) {
- val = (val & 0x0FFFFFFF) | (ld_dword(fs->win + clst * 4 % SS(fs)) & 0xF0000000);
- 8004914: 687b ldr r3, [r7, #4]
- 8004916: f023 4470 bic.w r4, r3, #4026531840 ; 0xf0000000
- 800491a: 68fb ldr r3, [r7, #12]
- 800491c: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004920: 68bb ldr r3, [r7, #8]
- 8004922: 009b lsls r3, r3, #2
- 8004924: 68fa ldr r2, [r7, #12]
- 8004926: 8992 ldrh r2, [r2, #12]
- 8004928: fbb3 f0f2 udiv r0, r3, r2
- 800492c: fb02 f200 mul.w r2, r2, r0
- 8004930: 1a9b subs r3, r3, r2
- 8004932: 440b add r3, r1
- 8004934: 4618 mov r0, r3
- 8004936: f7ff fafa bl 8003f2e <ld_dword>
- 800493a: 4603 mov r3, r0
- 800493c: f003 4370 and.w r3, r3, #4026531840 ; 0xf0000000
- 8004940: 4323 orrs r3, r4
- 8004942: 607b str r3, [r7, #4]
- }
- st_dword(fs->win + clst * 4 % SS(fs), val);
- 8004944: 68fb ldr r3, [r7, #12]
- 8004946: f103 0138 add.w r1, r3, #56 ; 0x38
- 800494a: 68bb ldr r3, [r7, #8]
- 800494c: 009b lsls r3, r3, #2
- 800494e: 68fa ldr r2, [r7, #12]
- 8004950: 8992 ldrh r2, [r2, #12]
- 8004952: fbb3 f0f2 udiv r0, r3, r2
- 8004956: fb02 f200 mul.w r2, r2, r0
- 800495a: 1a9b subs r3, r3, r2
- 800495c: 440b add r3, r1
- 800495e: 6879 ldr r1, [r7, #4]
- 8004960: 4618 mov r0, r3
- 8004962: f7ff fb20 bl 8003fa6 <st_dword>
- fs->wflag = 1;
- 8004966: 68fb ldr r3, [r7, #12]
- 8004968: 2201 movs r2, #1
- 800496a: 70da strb r2, [r3, #3]
- break;
- 800496c: e006 b.n 800497c <put_fat+0x224>
- if (res != FR_OK) break;
- 800496e: bf00 nop
- 8004970: e004 b.n 800497c <put_fat+0x224>
- if (res != FR_OK) break;
- 8004972: bf00 nop
- 8004974: e002 b.n 800497c <put_fat+0x224>
- if (res != FR_OK) break;
- 8004976: bf00 nop
- 8004978: e000 b.n 800497c <put_fat+0x224>
- if (res != FR_OK) break;
- 800497a: bf00 nop
- }
- }
- return res;
- 800497c: 7ffb ldrb r3, [r7, #31]
- }
- 800497e: 4618 mov r0, r3
- 8004980: 3724 adds r7, #36 ; 0x24
- 8004982: 46bd mov sp, r7
- 8004984: bd90 pop {r4, r7, pc}
-
- 08004986 <remove_chain>:
- FRESULT remove_chain ( /* FR_OK(0):succeeded, !=0:error */
- _FDID* obj, /* Corresponding object */
- DWORD clst, /* Cluster to remove a chain from */
- DWORD pclst /* Previous cluster of clst (0:an entire chain) */
- )
- {
- 8004986: b580 push {r7, lr}
- 8004988: b088 sub sp, #32
- 800498a: af00 add r7, sp, #0
- 800498c: 60f8 str r0, [r7, #12]
- 800498e: 60b9 str r1, [r7, #8]
- 8004990: 607a str r2, [r7, #4]
- FRESULT res = FR_OK;
- 8004992: 2300 movs r3, #0
- 8004994: 77fb strb r3, [r7, #31]
- DWORD nxt;
- FATFS *fs = obj->fs;
- 8004996: 68fb ldr r3, [r7, #12]
- 8004998: 681b ldr r3, [r3, #0]
- 800499a: 61bb str r3, [r7, #24]
- #endif
- #if _USE_TRIM
- DWORD rt[2];
- #endif
-
- if (clst < 2 || clst >= fs->n_fatent) return FR_INT_ERR; /* Check if in valid range */
- 800499c: 68bb ldr r3, [r7, #8]
- 800499e: 2b01 cmp r3, #1
- 80049a0: d904 bls.n 80049ac <remove_chain+0x26>
- 80049a2: 69bb ldr r3, [r7, #24]
- 80049a4: 69db ldr r3, [r3, #28]
- 80049a6: 68ba ldr r2, [r7, #8]
- 80049a8: 429a cmp r2, r3
- 80049aa: d301 bcc.n 80049b0 <remove_chain+0x2a>
- 80049ac: 2302 movs r3, #2
- 80049ae: e04b b.n 8004a48 <remove_chain+0xc2>
-
- /* Mark the previous cluster 'EOC' on the FAT if it exists */
- if (pclst && (!_FS_EXFAT || fs->fs_type != FS_EXFAT || obj->stat != 2)) {
- 80049b0: 687b ldr r3, [r7, #4]
- 80049b2: 2b00 cmp r3, #0
- 80049b4: d00c beq.n 80049d0 <remove_chain+0x4a>
- res = put_fat(fs, pclst, 0xFFFFFFFF);
- 80049b6: f04f 32ff mov.w r2, #4294967295
- 80049ba: 6879 ldr r1, [r7, #4]
- 80049bc: 69b8 ldr r0, [r7, #24]
- 80049be: f7ff fecb bl 8004758 <put_fat>
- 80049c2: 4603 mov r3, r0
- 80049c4: 77fb strb r3, [r7, #31]
- if (res != FR_OK) return res;
- 80049c6: 7ffb ldrb r3, [r7, #31]
- 80049c8: 2b00 cmp r3, #0
- 80049ca: d001 beq.n 80049d0 <remove_chain+0x4a>
- 80049cc: 7ffb ldrb r3, [r7, #31]
- 80049ce: e03b b.n 8004a48 <remove_chain+0xc2>
- }
-
- /* Remove the chain */
- do {
- nxt = get_fat(obj, clst); /* Get cluster status */
- 80049d0: 68b9 ldr r1, [r7, #8]
- 80049d2: 68f8 ldr r0, [r7, #12]
- 80049d4: f7ff fdf0 bl 80045b8 <get_fat>
- 80049d8: 6178 str r0, [r7, #20]
- if (nxt == 0) break; /* Empty cluster? */
- 80049da: 697b ldr r3, [r7, #20]
- 80049dc: 2b00 cmp r3, #0
- 80049de: d031 beq.n 8004a44 <remove_chain+0xbe>
- if (nxt == 1) return FR_INT_ERR; /* Internal error? */
- 80049e0: 697b ldr r3, [r7, #20]
- 80049e2: 2b01 cmp r3, #1
- 80049e4: d101 bne.n 80049ea <remove_chain+0x64>
- 80049e6: 2302 movs r3, #2
- 80049e8: e02e b.n 8004a48 <remove_chain+0xc2>
- if (nxt == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error? */
- 80049ea: 697b ldr r3, [r7, #20]
- 80049ec: f1b3 3fff cmp.w r3, #4294967295
- 80049f0: d101 bne.n 80049f6 <remove_chain+0x70>
- 80049f2: 2301 movs r3, #1
- 80049f4: e028 b.n 8004a48 <remove_chain+0xc2>
- if (!_FS_EXFAT || fs->fs_type != FS_EXFAT) {
- res = put_fat(fs, clst, 0); /* Mark the cluster 'free' on the FAT */
- 80049f6: 2200 movs r2, #0
- 80049f8: 68b9 ldr r1, [r7, #8]
- 80049fa: 69b8 ldr r0, [r7, #24]
- 80049fc: f7ff feac bl 8004758 <put_fat>
- 8004a00: 4603 mov r3, r0
- 8004a02: 77fb strb r3, [r7, #31]
- if (res != FR_OK) return res;
- 8004a04: 7ffb ldrb r3, [r7, #31]
- 8004a06: 2b00 cmp r3, #0
- 8004a08: d001 beq.n 8004a0e <remove_chain+0x88>
- 8004a0a: 7ffb ldrb r3, [r7, #31]
- 8004a0c: e01c b.n 8004a48 <remove_chain+0xc2>
- }
- if (fs->free_clst < fs->n_fatent - 2) { /* Update FSINFO */
- 8004a0e: 69bb ldr r3, [r7, #24]
- 8004a10: 699a ldr r2, [r3, #24]
- 8004a12: 69bb ldr r3, [r7, #24]
- 8004a14: 69db ldr r3, [r3, #28]
- 8004a16: 3b02 subs r3, #2
- 8004a18: 429a cmp r2, r3
- 8004a1a: d20b bcs.n 8004a34 <remove_chain+0xae>
- fs->free_clst++;
- 8004a1c: 69bb ldr r3, [r7, #24]
- 8004a1e: 699b ldr r3, [r3, #24]
- 8004a20: 1c5a adds r2, r3, #1
- 8004a22: 69bb ldr r3, [r7, #24]
- 8004a24: 619a str r2, [r3, #24]
- fs->fsi_flag |= 1;
- 8004a26: 69bb ldr r3, [r7, #24]
- 8004a28: 791b ldrb r3, [r3, #4]
- 8004a2a: f043 0301 orr.w r3, r3, #1
- 8004a2e: b2da uxtb r2, r3
- 8004a30: 69bb ldr r3, [r7, #24]
- 8004a32: 711a strb r2, [r3, #4]
- disk_ioctl(fs->drv, CTRL_TRIM, rt); /* Inform device the block can be erased */
- #endif
- scl = ecl = nxt;
- }
- #endif
- clst = nxt; /* Next cluster */
- 8004a34: 697b ldr r3, [r7, #20]
- 8004a36: 60bb str r3, [r7, #8]
- } while (clst < fs->n_fatent); /* Repeat while not the last link */
- 8004a38: 69bb ldr r3, [r7, #24]
- 8004a3a: 69db ldr r3, [r3, #28]
- 8004a3c: 68ba ldr r2, [r7, #8]
- 8004a3e: 429a cmp r2, r3
- 8004a40: d3c6 bcc.n 80049d0 <remove_chain+0x4a>
- 8004a42: e000 b.n 8004a46 <remove_chain+0xc0>
- if (nxt == 0) break; /* Empty cluster? */
- 8004a44: bf00 nop
- obj->stat = 2; /* Change the object status 'contiguous' */
- }
- }
- }
- #endif
- return FR_OK;
- 8004a46: 2300 movs r3, #0
- }
- 8004a48: 4618 mov r0, r3
- 8004a4a: 3720 adds r7, #32
- 8004a4c: 46bd mov sp, r7
- 8004a4e: bd80 pop {r7, pc}
-
- 08004a50 <create_chain>:
- static
- DWORD create_chain ( /* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */
- _FDID* obj, /* Corresponding object */
- DWORD clst /* Cluster# to stretch, 0:Create a new chain */
- )
- {
- 8004a50: b580 push {r7, lr}
- 8004a52: b088 sub sp, #32
- 8004a54: af00 add r7, sp, #0
- 8004a56: 6078 str r0, [r7, #4]
- 8004a58: 6039 str r1, [r7, #0]
- DWORD cs, ncl, scl;
- FRESULT res;
- FATFS *fs = obj->fs;
- 8004a5a: 687b ldr r3, [r7, #4]
- 8004a5c: 681b ldr r3, [r3, #0]
- 8004a5e: 613b str r3, [r7, #16]
-
-
- if (clst == 0) { /* Create a new chain */
- 8004a60: 683b ldr r3, [r7, #0]
- 8004a62: 2b00 cmp r3, #0
- 8004a64: d10d bne.n 8004a82 <create_chain+0x32>
- scl = fs->last_clst; /* Get suggested cluster to start from */
- 8004a66: 693b ldr r3, [r7, #16]
- 8004a68: 695b ldr r3, [r3, #20]
- 8004a6a: 61bb str r3, [r7, #24]
- if (scl == 0 || scl >= fs->n_fatent) scl = 1;
- 8004a6c: 69bb ldr r3, [r7, #24]
- 8004a6e: 2b00 cmp r3, #0
- 8004a70: d004 beq.n 8004a7c <create_chain+0x2c>
- 8004a72: 693b ldr r3, [r7, #16]
- 8004a74: 69db ldr r3, [r3, #28]
- 8004a76: 69ba ldr r2, [r7, #24]
- 8004a78: 429a cmp r2, r3
- 8004a7a: d31b bcc.n 8004ab4 <create_chain+0x64>
- 8004a7c: 2301 movs r3, #1
- 8004a7e: 61bb str r3, [r7, #24]
- 8004a80: e018 b.n 8004ab4 <create_chain+0x64>
- }
- else { /* Stretch current chain */
- cs = get_fat(obj, clst); /* Check the cluster status */
- 8004a82: 6839 ldr r1, [r7, #0]
- 8004a84: 6878 ldr r0, [r7, #4]
- 8004a86: f7ff fd97 bl 80045b8 <get_fat>
- 8004a8a: 60f8 str r0, [r7, #12]
- if (cs < 2) return 1; /* Invalid FAT value */
- 8004a8c: 68fb ldr r3, [r7, #12]
- 8004a8e: 2b01 cmp r3, #1
- 8004a90: d801 bhi.n 8004a96 <create_chain+0x46>
- 8004a92: 2301 movs r3, #1
- 8004a94: e070 b.n 8004b78 <create_chain+0x128>
- if (cs == 0xFFFFFFFF) return cs; /* A disk error occurred */
- 8004a96: 68fb ldr r3, [r7, #12]
- 8004a98: f1b3 3fff cmp.w r3, #4294967295
- 8004a9c: d101 bne.n 8004aa2 <create_chain+0x52>
- 8004a9e: 68fb ldr r3, [r7, #12]
- 8004aa0: e06a b.n 8004b78 <create_chain+0x128>
- if (cs < fs->n_fatent) return cs; /* It is already followed by next cluster */
- 8004aa2: 693b ldr r3, [r7, #16]
- 8004aa4: 69db ldr r3, [r3, #28]
- 8004aa6: 68fa ldr r2, [r7, #12]
- 8004aa8: 429a cmp r2, r3
- 8004aaa: d201 bcs.n 8004ab0 <create_chain+0x60>
- 8004aac: 68fb ldr r3, [r7, #12]
- 8004aae: e063 b.n 8004b78 <create_chain+0x128>
- scl = clst;
- 8004ab0: 683b ldr r3, [r7, #0]
- 8004ab2: 61bb str r3, [r7, #24]
- }
- }
- } else
- #endif
- { /* On the FAT12/16/32 volume */
- ncl = scl; /* Start cluster */
- 8004ab4: 69bb ldr r3, [r7, #24]
- 8004ab6: 61fb str r3, [r7, #28]
- for (;;) {
- ncl++; /* Next cluster */
- 8004ab8: 69fb ldr r3, [r7, #28]
- 8004aba: 3301 adds r3, #1
- 8004abc: 61fb str r3, [r7, #28]
- if (ncl >= fs->n_fatent) { /* Check wrap-around */
- 8004abe: 693b ldr r3, [r7, #16]
- 8004ac0: 69db ldr r3, [r3, #28]
- 8004ac2: 69fa ldr r2, [r7, #28]
- 8004ac4: 429a cmp r2, r3
- 8004ac6: d307 bcc.n 8004ad8 <create_chain+0x88>
- ncl = 2;
- 8004ac8: 2302 movs r3, #2
- 8004aca: 61fb str r3, [r7, #28]
- if (ncl > scl) return 0; /* No free cluster */
- 8004acc: 69fa ldr r2, [r7, #28]
- 8004ace: 69bb ldr r3, [r7, #24]
- 8004ad0: 429a cmp r2, r3
- 8004ad2: d901 bls.n 8004ad8 <create_chain+0x88>
- 8004ad4: 2300 movs r3, #0
- 8004ad6: e04f b.n 8004b78 <create_chain+0x128>
- }
- cs = get_fat(obj, ncl); /* Get the cluster status */
- 8004ad8: 69f9 ldr r1, [r7, #28]
- 8004ada: 6878 ldr r0, [r7, #4]
- 8004adc: f7ff fd6c bl 80045b8 <get_fat>
- 8004ae0: 60f8 str r0, [r7, #12]
- if (cs == 0) break; /* Found a free cluster */
- 8004ae2: 68fb ldr r3, [r7, #12]
- 8004ae4: 2b00 cmp r3, #0
- 8004ae6: d00e beq.n 8004b06 <create_chain+0xb6>
- if (cs == 1 || cs == 0xFFFFFFFF) return cs; /* An error occurred */
- 8004ae8: 68fb ldr r3, [r7, #12]
- 8004aea: 2b01 cmp r3, #1
- 8004aec: d003 beq.n 8004af6 <create_chain+0xa6>
- 8004aee: 68fb ldr r3, [r7, #12]
- 8004af0: f1b3 3fff cmp.w r3, #4294967295
- 8004af4: d101 bne.n 8004afa <create_chain+0xaa>
- 8004af6: 68fb ldr r3, [r7, #12]
- 8004af8: e03e b.n 8004b78 <create_chain+0x128>
- if (ncl == scl) return 0; /* No free cluster */
- 8004afa: 69fa ldr r2, [r7, #28]
- 8004afc: 69bb ldr r3, [r7, #24]
- 8004afe: 429a cmp r2, r3
- 8004b00: d1da bne.n 8004ab8 <create_chain+0x68>
- 8004b02: 2300 movs r3, #0
- 8004b04: e038 b.n 8004b78 <create_chain+0x128>
- if (cs == 0) break; /* Found a free cluster */
- 8004b06: bf00 nop
- }
- res = put_fat(fs, ncl, 0xFFFFFFFF); /* Mark the new cluster 'EOC' */
- 8004b08: f04f 32ff mov.w r2, #4294967295
- 8004b0c: 69f9 ldr r1, [r7, #28]
- 8004b0e: 6938 ldr r0, [r7, #16]
- 8004b10: f7ff fe22 bl 8004758 <put_fat>
- 8004b14: 4603 mov r3, r0
- 8004b16: 75fb strb r3, [r7, #23]
- if (res == FR_OK && clst != 0) {
- 8004b18: 7dfb ldrb r3, [r7, #23]
- 8004b1a: 2b00 cmp r3, #0
- 8004b1c: d109 bne.n 8004b32 <create_chain+0xe2>
- 8004b1e: 683b ldr r3, [r7, #0]
- 8004b20: 2b00 cmp r3, #0
- 8004b22: d006 beq.n 8004b32 <create_chain+0xe2>
- res = put_fat(fs, clst, ncl); /* Link it from the previous one if needed */
- 8004b24: 69fa ldr r2, [r7, #28]
- 8004b26: 6839 ldr r1, [r7, #0]
- 8004b28: 6938 ldr r0, [r7, #16]
- 8004b2a: f7ff fe15 bl 8004758 <put_fat>
- 8004b2e: 4603 mov r3, r0
- 8004b30: 75fb strb r3, [r7, #23]
- }
- }
-
- if (res == FR_OK) { /* Update FSINFO if function succeeded. */
- 8004b32: 7dfb ldrb r3, [r7, #23]
- 8004b34: 2b00 cmp r3, #0
- 8004b36: d116 bne.n 8004b66 <create_chain+0x116>
- fs->last_clst = ncl;
- 8004b38: 693b ldr r3, [r7, #16]
- 8004b3a: 69fa ldr r2, [r7, #28]
- 8004b3c: 615a str r2, [r3, #20]
- if (fs->free_clst <= fs->n_fatent - 2) fs->free_clst--;
- 8004b3e: 693b ldr r3, [r7, #16]
- 8004b40: 699a ldr r2, [r3, #24]
- 8004b42: 693b ldr r3, [r7, #16]
- 8004b44: 69db ldr r3, [r3, #28]
- 8004b46: 3b02 subs r3, #2
- 8004b48: 429a cmp r2, r3
- 8004b4a: d804 bhi.n 8004b56 <create_chain+0x106>
- 8004b4c: 693b ldr r3, [r7, #16]
- 8004b4e: 699b ldr r3, [r3, #24]
- 8004b50: 1e5a subs r2, r3, #1
- 8004b52: 693b ldr r3, [r7, #16]
- 8004b54: 619a str r2, [r3, #24]
- fs->fsi_flag |= 1;
- 8004b56: 693b ldr r3, [r7, #16]
- 8004b58: 791b ldrb r3, [r3, #4]
- 8004b5a: f043 0301 orr.w r3, r3, #1
- 8004b5e: b2da uxtb r2, r3
- 8004b60: 693b ldr r3, [r7, #16]
- 8004b62: 711a strb r2, [r3, #4]
- 8004b64: e007 b.n 8004b76 <create_chain+0x126>
- } else {
- ncl = (res == FR_DISK_ERR) ? 0xFFFFFFFF : 1; /* Failed. Generate error status */
- 8004b66: 7dfb ldrb r3, [r7, #23]
- 8004b68: 2b01 cmp r3, #1
- 8004b6a: d102 bne.n 8004b72 <create_chain+0x122>
- 8004b6c: f04f 33ff mov.w r3, #4294967295
- 8004b70: e000 b.n 8004b74 <create_chain+0x124>
- 8004b72: 2301 movs r3, #1
- 8004b74: 61fb str r3, [r7, #28]
- }
-
- return ncl; /* Return new cluster number or error status */
- 8004b76: 69fb ldr r3, [r7, #28]
- }
- 8004b78: 4618 mov r0, r3
- 8004b7a: 3720 adds r7, #32
- 8004b7c: 46bd mov sp, r7
- 8004b7e: bd80 pop {r7, pc}
-
- 08004b80 <clmt_clust>:
- static
- DWORD clmt_clust ( /* <2:Error, >=2:Cluster number */
- FIL* fp, /* Pointer to the file object */
- FSIZE_t ofs /* File offset to be converted to cluster# */
- )
- {
- 8004b80: b480 push {r7}
- 8004b82: b087 sub sp, #28
- 8004b84: af00 add r7, sp, #0
- 8004b86: 6078 str r0, [r7, #4]
- 8004b88: 6039 str r1, [r7, #0]
- DWORD cl, ncl, *tbl;
- FATFS *fs = fp->obj.fs;
- 8004b8a: 687b ldr r3, [r7, #4]
- 8004b8c: 681b ldr r3, [r3, #0]
- 8004b8e: 60fb str r3, [r7, #12]
-
-
- tbl = fp->cltbl + 1; /* Top of CLMT */
- 8004b90: 687b ldr r3, [r7, #4]
- 8004b92: 6adb ldr r3, [r3, #44] ; 0x2c
- 8004b94: 3304 adds r3, #4
- 8004b96: 613b str r3, [r7, #16]
- cl = (DWORD)(ofs / SS(fs) / fs->csize); /* Cluster order from top of the file */
- 8004b98: 68fb ldr r3, [r7, #12]
- 8004b9a: 899b ldrh r3, [r3, #12]
- 8004b9c: 461a mov r2, r3
- 8004b9e: 683b ldr r3, [r7, #0]
- 8004ba0: fbb3 f3f2 udiv r3, r3, r2
- 8004ba4: 68fa ldr r2, [r7, #12]
- 8004ba6: 8952 ldrh r2, [r2, #10]
- 8004ba8: fbb3 f3f2 udiv r3, r3, r2
- 8004bac: 617b str r3, [r7, #20]
- for (;;) {
- ncl = *tbl++; /* Number of cluters in the fragment */
- 8004bae: 693b ldr r3, [r7, #16]
- 8004bb0: 1d1a adds r2, r3, #4
- 8004bb2: 613a str r2, [r7, #16]
- 8004bb4: 681b ldr r3, [r3, #0]
- 8004bb6: 60bb str r3, [r7, #8]
- if (ncl == 0) return 0; /* End of table? (error) */
- 8004bb8: 68bb ldr r3, [r7, #8]
- 8004bba: 2b00 cmp r3, #0
- 8004bbc: d101 bne.n 8004bc2 <clmt_clust+0x42>
- 8004bbe: 2300 movs r3, #0
- 8004bc0: e010 b.n 8004be4 <clmt_clust+0x64>
- if (cl < ncl) break; /* In this fragment? */
- 8004bc2: 697a ldr r2, [r7, #20]
- 8004bc4: 68bb ldr r3, [r7, #8]
- 8004bc6: 429a cmp r2, r3
- 8004bc8: d307 bcc.n 8004bda <clmt_clust+0x5a>
- cl -= ncl; tbl++; /* Next fragment */
- 8004bca: 697a ldr r2, [r7, #20]
- 8004bcc: 68bb ldr r3, [r7, #8]
- 8004bce: 1ad3 subs r3, r2, r3
- 8004bd0: 617b str r3, [r7, #20]
- 8004bd2: 693b ldr r3, [r7, #16]
- 8004bd4: 3304 adds r3, #4
- 8004bd6: 613b str r3, [r7, #16]
- ncl = *tbl++; /* Number of cluters in the fragment */
- 8004bd8: e7e9 b.n 8004bae <clmt_clust+0x2e>
- if (cl < ncl) break; /* In this fragment? */
- 8004bda: bf00 nop
- }
- return cl + *tbl; /* Return the cluster number */
- 8004bdc: 693b ldr r3, [r7, #16]
- 8004bde: 681a ldr r2, [r3, #0]
- 8004be0: 697b ldr r3, [r7, #20]
- 8004be2: 4413 add r3, r2
- }
- 8004be4: 4618 mov r0, r3
- 8004be6: 371c adds r7, #28
- 8004be8: 46bd mov sp, r7
- 8004bea: bc80 pop {r7}
- 8004bec: 4770 bx lr
-
- 08004bee <dir_sdi>:
- static
- FRESULT dir_sdi ( /* FR_OK(0):succeeded, !=0:error */
- DIR* dp, /* Pointer to directory object */
- DWORD ofs /* Offset of directory table */
- )
- {
- 8004bee: b580 push {r7, lr}
- 8004bf0: b086 sub sp, #24
- 8004bf2: af00 add r7, sp, #0
- 8004bf4: 6078 str r0, [r7, #4]
- 8004bf6: 6039 str r1, [r7, #0]
- DWORD csz, clst;
- FATFS *fs = dp->obj.fs;
- 8004bf8: 687b ldr r3, [r7, #4]
- 8004bfa: 681b ldr r3, [r3, #0]
- 8004bfc: 613b str r3, [r7, #16]
-
-
- if (ofs >= (DWORD)((_FS_EXFAT && fs->fs_type == FS_EXFAT) ? MAX_DIR_EX : MAX_DIR) || ofs % SZDIRE) { /* Check range of offset and alignment */
- 8004bfe: 683b ldr r3, [r7, #0]
- 8004c00: f5b3 1f00 cmp.w r3, #2097152 ; 0x200000
- 8004c04: d204 bcs.n 8004c10 <dir_sdi+0x22>
- 8004c06: 683b ldr r3, [r7, #0]
- 8004c08: f003 031f and.w r3, r3, #31
- 8004c0c: 2b00 cmp r3, #0
- 8004c0e: d001 beq.n 8004c14 <dir_sdi+0x26>
- return FR_INT_ERR;
- 8004c10: 2302 movs r3, #2
- 8004c12: e071 b.n 8004cf8 <dir_sdi+0x10a>
- }
- dp->dptr = ofs; /* Set current offset */
- 8004c14: 687b ldr r3, [r7, #4]
- 8004c16: 683a ldr r2, [r7, #0]
- 8004c18: 615a str r2, [r3, #20]
- clst = dp->obj.sclust; /* Table start cluster (0:root) */
- 8004c1a: 687b ldr r3, [r7, #4]
- 8004c1c: 689b ldr r3, [r3, #8]
- 8004c1e: 617b str r3, [r7, #20]
- if (clst == 0 && fs->fs_type >= FS_FAT32) { /* Replace cluster# 0 with root cluster# */
- 8004c20: 697b ldr r3, [r7, #20]
- 8004c22: 2b00 cmp r3, #0
- 8004c24: d106 bne.n 8004c34 <dir_sdi+0x46>
- 8004c26: 693b ldr r3, [r7, #16]
- 8004c28: 781b ldrb r3, [r3, #0]
- 8004c2a: 2b02 cmp r3, #2
- 8004c2c: d902 bls.n 8004c34 <dir_sdi+0x46>
- clst = fs->dirbase;
- 8004c2e: 693b ldr r3, [r7, #16]
- 8004c30: 6adb ldr r3, [r3, #44] ; 0x2c
- 8004c32: 617b str r3, [r7, #20]
- if (_FS_EXFAT) dp->obj.stat = 0; /* exFAT: Root dir has an FAT chain */
- }
-
- if (clst == 0) { /* Static table (root-directory in FAT12/16) */
- 8004c34: 697b ldr r3, [r7, #20]
- 8004c36: 2b00 cmp r3, #0
- 8004c38: d10c bne.n 8004c54 <dir_sdi+0x66>
- if (ofs / SZDIRE >= fs->n_rootdir) return FR_INT_ERR; /* Is index out of range? */
- 8004c3a: 683b ldr r3, [r7, #0]
- 8004c3c: 095b lsrs r3, r3, #5
- 8004c3e: 693a ldr r2, [r7, #16]
- 8004c40: 8912 ldrh r2, [r2, #8]
- 8004c42: 4293 cmp r3, r2
- 8004c44: d301 bcc.n 8004c4a <dir_sdi+0x5c>
- 8004c46: 2302 movs r3, #2
- 8004c48: e056 b.n 8004cf8 <dir_sdi+0x10a>
- dp->sect = fs->dirbase;
- 8004c4a: 693b ldr r3, [r7, #16]
- 8004c4c: 6ada ldr r2, [r3, #44] ; 0x2c
- 8004c4e: 687b ldr r3, [r7, #4]
- 8004c50: 61da str r2, [r3, #28]
- 8004c52: e02d b.n 8004cb0 <dir_sdi+0xc2>
-
- } else { /* Dynamic table (sub-directory or root-directory in FAT32+) */
- csz = (DWORD)fs->csize * SS(fs); /* Bytes per cluster */
- 8004c54: 693b ldr r3, [r7, #16]
- 8004c56: 895b ldrh r3, [r3, #10]
- 8004c58: 461a mov r2, r3
- 8004c5a: 693b ldr r3, [r7, #16]
- 8004c5c: 899b ldrh r3, [r3, #12]
- 8004c5e: fb03 f302 mul.w r3, r3, r2
- 8004c62: 60fb str r3, [r7, #12]
- while (ofs >= csz) { /* Follow cluster chain */
- 8004c64: e019 b.n 8004c9a <dir_sdi+0xac>
- clst = get_fat(&dp->obj, clst); /* Get next cluster */
- 8004c66: 687b ldr r3, [r7, #4]
- 8004c68: 6979 ldr r1, [r7, #20]
- 8004c6a: 4618 mov r0, r3
- 8004c6c: f7ff fca4 bl 80045b8 <get_fat>
- 8004c70: 6178 str r0, [r7, #20]
- if (clst == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error */
- 8004c72: 697b ldr r3, [r7, #20]
- 8004c74: f1b3 3fff cmp.w r3, #4294967295
- 8004c78: d101 bne.n 8004c7e <dir_sdi+0x90>
- 8004c7a: 2301 movs r3, #1
- 8004c7c: e03c b.n 8004cf8 <dir_sdi+0x10a>
- if (clst < 2 || clst >= fs->n_fatent) return FR_INT_ERR; /* Reached to end of table or internal error */
- 8004c7e: 697b ldr r3, [r7, #20]
- 8004c80: 2b01 cmp r3, #1
- 8004c82: d904 bls.n 8004c8e <dir_sdi+0xa0>
- 8004c84: 693b ldr r3, [r7, #16]
- 8004c86: 69db ldr r3, [r3, #28]
- 8004c88: 697a ldr r2, [r7, #20]
- 8004c8a: 429a cmp r2, r3
- 8004c8c: d301 bcc.n 8004c92 <dir_sdi+0xa4>
- 8004c8e: 2302 movs r3, #2
- 8004c90: e032 b.n 8004cf8 <dir_sdi+0x10a>
- ofs -= csz;
- 8004c92: 683a ldr r2, [r7, #0]
- 8004c94: 68fb ldr r3, [r7, #12]
- 8004c96: 1ad3 subs r3, r2, r3
- 8004c98: 603b str r3, [r7, #0]
- while (ofs >= csz) { /* Follow cluster chain */
- 8004c9a: 683a ldr r2, [r7, #0]
- 8004c9c: 68fb ldr r3, [r7, #12]
- 8004c9e: 429a cmp r2, r3
- 8004ca0: d2e1 bcs.n 8004c66 <dir_sdi+0x78>
- }
- dp->sect = clust2sect(fs, clst);
- 8004ca2: 6979 ldr r1, [r7, #20]
- 8004ca4: 6938 ldr r0, [r7, #16]
- 8004ca6: f7ff fc69 bl 800457c <clust2sect>
- 8004caa: 4602 mov r2, r0
- 8004cac: 687b ldr r3, [r7, #4]
- 8004cae: 61da str r2, [r3, #28]
- }
- dp->clust = clst; /* Current cluster# */
- 8004cb0: 687b ldr r3, [r7, #4]
- 8004cb2: 697a ldr r2, [r7, #20]
- 8004cb4: 619a str r2, [r3, #24]
- if (!dp->sect) return FR_INT_ERR;
- 8004cb6: 687b ldr r3, [r7, #4]
- 8004cb8: 69db ldr r3, [r3, #28]
- 8004cba: 2b00 cmp r3, #0
- 8004cbc: d101 bne.n 8004cc2 <dir_sdi+0xd4>
- 8004cbe: 2302 movs r3, #2
- 8004cc0: e01a b.n 8004cf8 <dir_sdi+0x10a>
- dp->sect += ofs / SS(fs); /* Sector# of the directory entry */
- 8004cc2: 687b ldr r3, [r7, #4]
- 8004cc4: 69da ldr r2, [r3, #28]
- 8004cc6: 693b ldr r3, [r7, #16]
- 8004cc8: 899b ldrh r3, [r3, #12]
- 8004cca: 4619 mov r1, r3
- 8004ccc: 683b ldr r3, [r7, #0]
- 8004cce: fbb3 f3f1 udiv r3, r3, r1
- 8004cd2: 441a add r2, r3
- 8004cd4: 687b ldr r3, [r7, #4]
- 8004cd6: 61da str r2, [r3, #28]
- dp->dir = fs->win + (ofs % SS(fs)); /* Pointer to the entry in the win[] */
- 8004cd8: 693b ldr r3, [r7, #16]
- 8004cda: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004cde: 693b ldr r3, [r7, #16]
- 8004ce0: 899b ldrh r3, [r3, #12]
- 8004ce2: 461a mov r2, r3
- 8004ce4: 683b ldr r3, [r7, #0]
- 8004ce6: fbb3 f0f2 udiv r0, r3, r2
- 8004cea: fb02 f200 mul.w r2, r2, r0
- 8004cee: 1a9b subs r3, r3, r2
- 8004cf0: 18ca adds r2, r1, r3
- 8004cf2: 687b ldr r3, [r7, #4]
- 8004cf4: 621a str r2, [r3, #32]
-
- return FR_OK;
- 8004cf6: 2300 movs r3, #0
- }
- 8004cf8: 4618 mov r0, r3
- 8004cfa: 3718 adds r7, #24
- 8004cfc: 46bd mov sp, r7
- 8004cfe: bd80 pop {r7, pc}
-
- 08004d00 <dir_next>:
- static
- FRESULT dir_next ( /* FR_OK(0):succeeded, FR_NO_FILE:End of table, FR_DENIED:Could not stretch */
- DIR* dp, /* Pointer to the directory object */
- int stretch /* 0: Do not stretch table, 1: Stretch table if needed */
- )
- {
- 8004d00: b580 push {r7, lr}
- 8004d02: b086 sub sp, #24
- 8004d04: af00 add r7, sp, #0
- 8004d06: 6078 str r0, [r7, #4]
- 8004d08: 6039 str r1, [r7, #0]
- DWORD ofs, clst;
- FATFS *fs = dp->obj.fs;
- 8004d0a: 687b ldr r3, [r7, #4]
- 8004d0c: 681b ldr r3, [r3, #0]
- 8004d0e: 60fb str r3, [r7, #12]
- #if !_FS_READONLY
- UINT n;
- #endif
-
- ofs = dp->dptr + SZDIRE; /* Next entry */
- 8004d10: 687b ldr r3, [r7, #4]
- 8004d12: 695b ldr r3, [r3, #20]
- 8004d14: 3320 adds r3, #32
- 8004d16: 60bb str r3, [r7, #8]
- if (!dp->sect || ofs >= (DWORD)((_FS_EXFAT && fs->fs_type == FS_EXFAT) ? MAX_DIR_EX : MAX_DIR)) return FR_NO_FILE; /* Report EOT when offset has reached max value */
- 8004d18: 687b ldr r3, [r7, #4]
- 8004d1a: 69db ldr r3, [r3, #28]
- 8004d1c: 2b00 cmp r3, #0
- 8004d1e: d003 beq.n 8004d28 <dir_next+0x28>
- 8004d20: 68bb ldr r3, [r7, #8]
- 8004d22: f5b3 1f00 cmp.w r3, #2097152 ; 0x200000
- 8004d26: d301 bcc.n 8004d2c <dir_next+0x2c>
- 8004d28: 2304 movs r3, #4
- 8004d2a: e0bb b.n 8004ea4 <dir_next+0x1a4>
-
- if (ofs % SS(fs) == 0) { /* Sector changed? */
- 8004d2c: 68fb ldr r3, [r7, #12]
- 8004d2e: 899b ldrh r3, [r3, #12]
- 8004d30: 461a mov r2, r3
- 8004d32: 68bb ldr r3, [r7, #8]
- 8004d34: fbb3 f1f2 udiv r1, r3, r2
- 8004d38: fb02 f201 mul.w r2, r2, r1
- 8004d3c: 1a9b subs r3, r3, r2
- 8004d3e: 2b00 cmp r3, #0
- 8004d40: f040 809d bne.w 8004e7e <dir_next+0x17e>
- dp->sect++; /* Next sector */
- 8004d44: 687b ldr r3, [r7, #4]
- 8004d46: 69db ldr r3, [r3, #28]
- 8004d48: 1c5a adds r2, r3, #1
- 8004d4a: 687b ldr r3, [r7, #4]
- 8004d4c: 61da str r2, [r3, #28]
-
- if (!dp->clust) { /* Static table */
- 8004d4e: 687b ldr r3, [r7, #4]
- 8004d50: 699b ldr r3, [r3, #24]
- 8004d52: 2b00 cmp r3, #0
- 8004d54: d10b bne.n 8004d6e <dir_next+0x6e>
- if (ofs / SZDIRE >= fs->n_rootdir) { /* Report EOT if it reached end of static table */
- 8004d56: 68bb ldr r3, [r7, #8]
- 8004d58: 095b lsrs r3, r3, #5
- 8004d5a: 68fa ldr r2, [r7, #12]
- 8004d5c: 8912 ldrh r2, [r2, #8]
- 8004d5e: 4293 cmp r3, r2
- 8004d60: f0c0 808d bcc.w 8004e7e <dir_next+0x17e>
- dp->sect = 0; return FR_NO_FILE;
- 8004d64: 687b ldr r3, [r7, #4]
- 8004d66: 2200 movs r2, #0
- 8004d68: 61da str r2, [r3, #28]
- 8004d6a: 2304 movs r3, #4
- 8004d6c: e09a b.n 8004ea4 <dir_next+0x1a4>
- }
- }
- else { /* Dynamic table */
- if ((ofs / SS(fs) & (fs->csize - 1)) == 0) { /* Cluster changed? */
- 8004d6e: 68fb ldr r3, [r7, #12]
- 8004d70: 899b ldrh r3, [r3, #12]
- 8004d72: 461a mov r2, r3
- 8004d74: 68bb ldr r3, [r7, #8]
- 8004d76: fbb3 f3f2 udiv r3, r3, r2
- 8004d7a: 68fa ldr r2, [r7, #12]
- 8004d7c: 8952 ldrh r2, [r2, #10]
- 8004d7e: 3a01 subs r2, #1
- 8004d80: 4013 ands r3, r2
- 8004d82: 2b00 cmp r3, #0
- 8004d84: d17b bne.n 8004e7e <dir_next+0x17e>
- clst = get_fat(&dp->obj, dp->clust); /* Get next cluster */
- 8004d86: 687a ldr r2, [r7, #4]
- 8004d88: 687b ldr r3, [r7, #4]
- 8004d8a: 699b ldr r3, [r3, #24]
- 8004d8c: 4619 mov r1, r3
- 8004d8e: 4610 mov r0, r2
- 8004d90: f7ff fc12 bl 80045b8 <get_fat>
- 8004d94: 6178 str r0, [r7, #20]
- if (clst <= 1) return FR_INT_ERR; /* Internal error */
- 8004d96: 697b ldr r3, [r7, #20]
- 8004d98: 2b01 cmp r3, #1
- 8004d9a: d801 bhi.n 8004da0 <dir_next+0xa0>
- 8004d9c: 2302 movs r3, #2
- 8004d9e: e081 b.n 8004ea4 <dir_next+0x1a4>
- if (clst == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error */
- 8004da0: 697b ldr r3, [r7, #20]
- 8004da2: f1b3 3fff cmp.w r3, #4294967295
- 8004da6: d101 bne.n 8004dac <dir_next+0xac>
- 8004da8: 2301 movs r3, #1
- 8004daa: e07b b.n 8004ea4 <dir_next+0x1a4>
- if (clst >= fs->n_fatent) { /* Reached end of dynamic table */
- 8004dac: 68fb ldr r3, [r7, #12]
- 8004dae: 69db ldr r3, [r3, #28]
- 8004db0: 697a ldr r2, [r7, #20]
- 8004db2: 429a cmp r2, r3
- 8004db4: d359 bcc.n 8004e6a <dir_next+0x16a>
- #if !_FS_READONLY
- if (!stretch) { /* If no stretch, report EOT */
- 8004db6: 683b ldr r3, [r7, #0]
- 8004db8: 2b00 cmp r3, #0
- 8004dba: d104 bne.n 8004dc6 <dir_next+0xc6>
- dp->sect = 0; return FR_NO_FILE;
- 8004dbc: 687b ldr r3, [r7, #4]
- 8004dbe: 2200 movs r2, #0
- 8004dc0: 61da str r2, [r3, #28]
- 8004dc2: 2304 movs r3, #4
- 8004dc4: e06e b.n 8004ea4 <dir_next+0x1a4>
- }
- clst = create_chain(&dp->obj, dp->clust); /* Allocate a cluster */
- 8004dc6: 687a ldr r2, [r7, #4]
- 8004dc8: 687b ldr r3, [r7, #4]
- 8004dca: 699b ldr r3, [r3, #24]
- 8004dcc: 4619 mov r1, r3
- 8004dce: 4610 mov r0, r2
- 8004dd0: f7ff fe3e bl 8004a50 <create_chain>
- 8004dd4: 6178 str r0, [r7, #20]
- if (clst == 0) return FR_DENIED; /* No free cluster */
- 8004dd6: 697b ldr r3, [r7, #20]
- 8004dd8: 2b00 cmp r3, #0
- 8004dda: d101 bne.n 8004de0 <dir_next+0xe0>
- 8004ddc: 2307 movs r3, #7
- 8004dde: e061 b.n 8004ea4 <dir_next+0x1a4>
- if (clst == 1) return FR_INT_ERR; /* Internal error */
- 8004de0: 697b ldr r3, [r7, #20]
- 8004de2: 2b01 cmp r3, #1
- 8004de4: d101 bne.n 8004dea <dir_next+0xea>
- 8004de6: 2302 movs r3, #2
- 8004de8: e05c b.n 8004ea4 <dir_next+0x1a4>
- if (clst == 0xFFFFFFFF) return FR_DISK_ERR; /* Disk error */
- 8004dea: 697b ldr r3, [r7, #20]
- 8004dec: f1b3 3fff cmp.w r3, #4294967295
- 8004df0: d101 bne.n 8004df6 <dir_next+0xf6>
- 8004df2: 2301 movs r3, #1
- 8004df4: e056 b.n 8004ea4 <dir_next+0x1a4>
- /* Clean-up the stretched table */
- if (_FS_EXFAT) dp->obj.stat |= 4; /* The directory needs to be updated */
- if (sync_window(fs) != FR_OK) return FR_DISK_ERR; /* Flush disk access window */
- 8004df6: 68f8 ldr r0, [r7, #12]
- 8004df8: f7ff fade bl 80043b8 <sync_window>
- 8004dfc: 4603 mov r3, r0
- 8004dfe: 2b00 cmp r3, #0
- 8004e00: d001 beq.n 8004e06 <dir_next+0x106>
- 8004e02: 2301 movs r3, #1
- 8004e04: e04e b.n 8004ea4 <dir_next+0x1a4>
- mem_set(fs->win, 0, SS(fs)); /* Clear window buffer */
- 8004e06: 68fb ldr r3, [r7, #12]
- 8004e08: f103 0038 add.w r0, r3, #56 ; 0x38
- 8004e0c: 68fb ldr r3, [r7, #12]
- 8004e0e: 899b ldrh r3, [r3, #12]
- 8004e10: 461a mov r2, r3
- 8004e12: 2100 movs r1, #0
- 8004e14: f7ff f912 bl 800403c <mem_set>
- for (n = 0, fs->winsect = clust2sect(fs, clst); n < fs->csize; n++, fs->winsect++) { /* Fill the new cluster with 0 */
- 8004e18: 2300 movs r3, #0
- 8004e1a: 613b str r3, [r7, #16]
- 8004e1c: 6979 ldr r1, [r7, #20]
- 8004e1e: 68f8 ldr r0, [r7, #12]
- 8004e20: f7ff fbac bl 800457c <clust2sect>
- 8004e24: 4602 mov r2, r0
- 8004e26: 68fb ldr r3, [r7, #12]
- 8004e28: 635a str r2, [r3, #52] ; 0x34
- 8004e2a: e012 b.n 8004e52 <dir_next+0x152>
- fs->wflag = 1;
- 8004e2c: 68fb ldr r3, [r7, #12]
- 8004e2e: 2201 movs r2, #1
- 8004e30: 70da strb r2, [r3, #3]
- if (sync_window(fs) != FR_OK) return FR_DISK_ERR;
- 8004e32: 68f8 ldr r0, [r7, #12]
- 8004e34: f7ff fac0 bl 80043b8 <sync_window>
- 8004e38: 4603 mov r3, r0
- 8004e3a: 2b00 cmp r3, #0
- 8004e3c: d001 beq.n 8004e42 <dir_next+0x142>
- 8004e3e: 2301 movs r3, #1
- 8004e40: e030 b.n 8004ea4 <dir_next+0x1a4>
- for (n = 0, fs->winsect = clust2sect(fs, clst); n < fs->csize; n++, fs->winsect++) { /* Fill the new cluster with 0 */
- 8004e42: 693b ldr r3, [r7, #16]
- 8004e44: 3301 adds r3, #1
- 8004e46: 613b str r3, [r7, #16]
- 8004e48: 68fb ldr r3, [r7, #12]
- 8004e4a: 6b5b ldr r3, [r3, #52] ; 0x34
- 8004e4c: 1c5a adds r2, r3, #1
- 8004e4e: 68fb ldr r3, [r7, #12]
- 8004e50: 635a str r2, [r3, #52] ; 0x34
- 8004e52: 68fb ldr r3, [r7, #12]
- 8004e54: 895b ldrh r3, [r3, #10]
- 8004e56: 461a mov r2, r3
- 8004e58: 693b ldr r3, [r7, #16]
- 8004e5a: 4293 cmp r3, r2
- 8004e5c: d3e6 bcc.n 8004e2c <dir_next+0x12c>
- }
- fs->winsect -= n; /* Restore window offset */
- 8004e5e: 68fb ldr r3, [r7, #12]
- 8004e60: 6b5a ldr r2, [r3, #52] ; 0x34
- 8004e62: 693b ldr r3, [r7, #16]
- 8004e64: 1ad2 subs r2, r2, r3
- 8004e66: 68fb ldr r3, [r7, #12]
- 8004e68: 635a str r2, [r3, #52] ; 0x34
- #else
- if (!stretch) dp->sect = 0; /* (this line is to suppress compiler warning) */
- dp->sect = 0; return FR_NO_FILE; /* Report EOT */
- #endif
- }
- dp->clust = clst; /* Initialize data for new cluster */
- 8004e6a: 687b ldr r3, [r7, #4]
- 8004e6c: 697a ldr r2, [r7, #20]
- 8004e6e: 619a str r2, [r3, #24]
- dp->sect = clust2sect(fs, clst);
- 8004e70: 6979 ldr r1, [r7, #20]
- 8004e72: 68f8 ldr r0, [r7, #12]
- 8004e74: f7ff fb82 bl 800457c <clust2sect>
- 8004e78: 4602 mov r2, r0
- 8004e7a: 687b ldr r3, [r7, #4]
- 8004e7c: 61da str r2, [r3, #28]
- }
- }
- }
- dp->dptr = ofs; /* Current entry */
- 8004e7e: 687b ldr r3, [r7, #4]
- 8004e80: 68ba ldr r2, [r7, #8]
- 8004e82: 615a str r2, [r3, #20]
- dp->dir = fs->win + ofs % SS(fs); /* Pointer to the entry in the win[] */
- 8004e84: 68fb ldr r3, [r7, #12]
- 8004e86: f103 0138 add.w r1, r3, #56 ; 0x38
- 8004e8a: 68fb ldr r3, [r7, #12]
- 8004e8c: 899b ldrh r3, [r3, #12]
- 8004e8e: 461a mov r2, r3
- 8004e90: 68bb ldr r3, [r7, #8]
- 8004e92: fbb3 f0f2 udiv r0, r3, r2
- 8004e96: fb02 f200 mul.w r2, r2, r0
- 8004e9a: 1a9b subs r3, r3, r2
- 8004e9c: 18ca adds r2, r1, r3
- 8004e9e: 687b ldr r3, [r7, #4]
- 8004ea0: 621a str r2, [r3, #32]
-
- return FR_OK;
- 8004ea2: 2300 movs r3, #0
- }
- 8004ea4: 4618 mov r0, r3
- 8004ea6: 3718 adds r7, #24
- 8004ea8: 46bd mov sp, r7
- 8004eaa: bd80 pop {r7, pc}
-
- 08004eac <dir_alloc>:
- static
- FRESULT dir_alloc ( /* FR_OK(0):succeeded, !=0:error */
- DIR* dp, /* Pointer to the directory object */
- UINT nent /* Number of contiguous entries to allocate */
- )
- {
- 8004eac: b580 push {r7, lr}
- 8004eae: b086 sub sp, #24
- 8004eb0: af00 add r7, sp, #0
- 8004eb2: 6078 str r0, [r7, #4]
- 8004eb4: 6039 str r1, [r7, #0]
- FRESULT res;
- UINT n;
- FATFS *fs = dp->obj.fs;
- 8004eb6: 687b ldr r3, [r7, #4]
- 8004eb8: 681b ldr r3, [r3, #0]
- 8004eba: 60fb str r3, [r7, #12]
-
-
- res = dir_sdi(dp, 0);
- 8004ebc: 2100 movs r1, #0
- 8004ebe: 6878 ldr r0, [r7, #4]
- 8004ec0: f7ff fe95 bl 8004bee <dir_sdi>
- 8004ec4: 4603 mov r3, r0
- 8004ec6: 75fb strb r3, [r7, #23]
- if (res == FR_OK) {
- 8004ec8: 7dfb ldrb r3, [r7, #23]
- 8004eca: 2b00 cmp r3, #0
- 8004ecc: d12b bne.n 8004f26 <dir_alloc+0x7a>
- n = 0;
- 8004ece: 2300 movs r3, #0
- 8004ed0: 613b str r3, [r7, #16]
- do {
- res = move_window(fs, dp->sect);
- 8004ed2: 687b ldr r3, [r7, #4]
- 8004ed4: 69db ldr r3, [r3, #28]
- 8004ed6: 4619 mov r1, r3
- 8004ed8: 68f8 ldr r0, [r7, #12]
- 8004eda: f7ff fab1 bl 8004440 <move_window>
- 8004ede: 4603 mov r3, r0
- 8004ee0: 75fb strb r3, [r7, #23]
- if (res != FR_OK) break;
- 8004ee2: 7dfb ldrb r3, [r7, #23]
- 8004ee4: 2b00 cmp r3, #0
- 8004ee6: d11d bne.n 8004f24 <dir_alloc+0x78>
- #if _FS_EXFAT
- if ((fs->fs_type == FS_EXFAT) ? (int)((dp->dir[XDIR_Type] & 0x80) == 0) : (int)(dp->dir[DIR_Name] == DDEM || dp->dir[DIR_Name] == 0)) {
- #else
- if (dp->dir[DIR_Name] == DDEM || dp->dir[DIR_Name] == 0) {
- 8004ee8: 687b ldr r3, [r7, #4]
- 8004eea: 6a1b ldr r3, [r3, #32]
- 8004eec: 781b ldrb r3, [r3, #0]
- 8004eee: 2be5 cmp r3, #229 ; 0xe5
- 8004ef0: d004 beq.n 8004efc <dir_alloc+0x50>
- 8004ef2: 687b ldr r3, [r7, #4]
- 8004ef4: 6a1b ldr r3, [r3, #32]
- 8004ef6: 781b ldrb r3, [r3, #0]
- 8004ef8: 2b00 cmp r3, #0
- 8004efa: d107 bne.n 8004f0c <dir_alloc+0x60>
- #endif
- if (++n == nent) break; /* A block of contiguous free entries is found */
- 8004efc: 693b ldr r3, [r7, #16]
- 8004efe: 3301 adds r3, #1
- 8004f00: 613b str r3, [r7, #16]
- 8004f02: 693a ldr r2, [r7, #16]
- 8004f04: 683b ldr r3, [r7, #0]
- 8004f06: 429a cmp r2, r3
- 8004f08: d102 bne.n 8004f10 <dir_alloc+0x64>
- 8004f0a: e00c b.n 8004f26 <dir_alloc+0x7a>
- } else {
- n = 0; /* Not a blank entry. Restart to search */
- 8004f0c: 2300 movs r3, #0
- 8004f0e: 613b str r3, [r7, #16]
- }
- res = dir_next(dp, 1);
- 8004f10: 2101 movs r1, #1
- 8004f12: 6878 ldr r0, [r7, #4]
- 8004f14: f7ff fef4 bl 8004d00 <dir_next>
- 8004f18: 4603 mov r3, r0
- 8004f1a: 75fb strb r3, [r7, #23]
- } while (res == FR_OK); /* Next entry with table stretch enabled */
- 8004f1c: 7dfb ldrb r3, [r7, #23]
- 8004f1e: 2b00 cmp r3, #0
- 8004f20: d0d7 beq.n 8004ed2 <dir_alloc+0x26>
- 8004f22: e000 b.n 8004f26 <dir_alloc+0x7a>
- if (res != FR_OK) break;
- 8004f24: bf00 nop
- }
-
- if (res == FR_NO_FILE) res = FR_DENIED; /* No directory entry to allocate */
- 8004f26: 7dfb ldrb r3, [r7, #23]
- 8004f28: 2b04 cmp r3, #4
- 8004f2a: d101 bne.n 8004f30 <dir_alloc+0x84>
- 8004f2c: 2307 movs r3, #7
- 8004f2e: 75fb strb r3, [r7, #23]
- return res;
- 8004f30: 7dfb ldrb r3, [r7, #23]
- }
- 8004f32: 4618 mov r0, r3
- 8004f34: 3718 adds r7, #24
- 8004f36: 46bd mov sp, r7
- 8004f38: bd80 pop {r7, pc}
-
- 08004f3a <ld_clust>:
- static
- DWORD ld_clust ( /* Returns the top cluster value of the SFN entry */
- FATFS* fs, /* Pointer to the fs object */
- const BYTE* dir /* Pointer to the key entry */
- )
- {
- 8004f3a: b580 push {r7, lr}
- 8004f3c: b084 sub sp, #16
- 8004f3e: af00 add r7, sp, #0
- 8004f40: 6078 str r0, [r7, #4]
- 8004f42: 6039 str r1, [r7, #0]
- DWORD cl;
-
- cl = ld_word(dir + DIR_FstClusLO);
- 8004f44: 683b ldr r3, [r7, #0]
- 8004f46: 331a adds r3, #26
- 8004f48: 4618 mov r0, r3
- 8004f4a: f7fe ffd9 bl 8003f00 <ld_word>
- 8004f4e: 4603 mov r3, r0
- 8004f50: 60fb str r3, [r7, #12]
- if (fs->fs_type == FS_FAT32) {
- 8004f52: 687b ldr r3, [r7, #4]
- 8004f54: 781b ldrb r3, [r3, #0]
- 8004f56: 2b03 cmp r3, #3
- 8004f58: d109 bne.n 8004f6e <ld_clust+0x34>
- cl |= (DWORD)ld_word(dir + DIR_FstClusHI) << 16;
- 8004f5a: 683b ldr r3, [r7, #0]
- 8004f5c: 3314 adds r3, #20
- 8004f5e: 4618 mov r0, r3
- 8004f60: f7fe ffce bl 8003f00 <ld_word>
- 8004f64: 4603 mov r3, r0
- 8004f66: 041b lsls r3, r3, #16
- 8004f68: 68fa ldr r2, [r7, #12]
- 8004f6a: 4313 orrs r3, r2
- 8004f6c: 60fb str r3, [r7, #12]
- }
-
- return cl;
- 8004f6e: 68fb ldr r3, [r7, #12]
- }
- 8004f70: 4618 mov r0, r3
- 8004f72: 3710 adds r7, #16
- 8004f74: 46bd mov sp, r7
- 8004f76: bd80 pop {r7, pc}
-
- 08004f78 <st_clust>:
- void st_clust (
- FATFS* fs, /* Pointer to the fs object */
- BYTE* dir, /* Pointer to the key entry */
- DWORD cl /* Value to be set */
- )
- {
- 8004f78: b580 push {r7, lr}
- 8004f7a: b084 sub sp, #16
- 8004f7c: af00 add r7, sp, #0
- 8004f7e: 60f8 str r0, [r7, #12]
- 8004f80: 60b9 str r1, [r7, #8]
- 8004f82: 607a str r2, [r7, #4]
- st_word(dir + DIR_FstClusLO, (WORD)cl);
- 8004f84: 68bb ldr r3, [r7, #8]
- 8004f86: 331a adds r3, #26
- 8004f88: 687a ldr r2, [r7, #4]
- 8004f8a: b292 uxth r2, r2
- 8004f8c: 4611 mov r1, r2
- 8004f8e: 4618 mov r0, r3
- 8004f90: f7fe ffef bl 8003f72 <st_word>
- if (fs->fs_type == FS_FAT32) {
- 8004f94: 68fb ldr r3, [r7, #12]
- 8004f96: 781b ldrb r3, [r3, #0]
- 8004f98: 2b03 cmp r3, #3
- 8004f9a: d109 bne.n 8004fb0 <st_clust+0x38>
- st_word(dir + DIR_FstClusHI, (WORD)(cl >> 16));
- 8004f9c: 68bb ldr r3, [r7, #8]
- 8004f9e: f103 0214 add.w r2, r3, #20
- 8004fa2: 687b ldr r3, [r7, #4]
- 8004fa4: 0c1b lsrs r3, r3, #16
- 8004fa6: b29b uxth r3, r3
- 8004fa8: 4619 mov r1, r3
- 8004faa: 4610 mov r0, r2
- 8004fac: f7fe ffe1 bl 8003f72 <st_word>
- }
- }
- 8004fb0: bf00 nop
- 8004fb2: 3710 adds r7, #16
- 8004fb4: 46bd mov sp, r7
- 8004fb6: bd80 pop {r7, pc}
-
- 08004fb8 <cmp_lfn>:
- static
- int cmp_lfn ( /* 1:matched, 0:not matched */
- const WCHAR* lfnbuf, /* Pointer to the LFN working buffer to be compared */
- BYTE* dir /* Pointer to the directory entry containing the part of LFN */
- )
- {
- 8004fb8: b590 push {r4, r7, lr}
- 8004fba: b087 sub sp, #28
- 8004fbc: af00 add r7, sp, #0
- 8004fbe: 6078 str r0, [r7, #4]
- 8004fc0: 6039 str r1, [r7, #0]
- UINT i, s;
- WCHAR wc, uc;
-
-
- if (ld_word(dir + LDIR_FstClusLO) != 0) return 0; /* Check LDIR_FstClusLO */
- 8004fc2: 683b ldr r3, [r7, #0]
- 8004fc4: 331a adds r3, #26
- 8004fc6: 4618 mov r0, r3
- 8004fc8: f7fe ff9a bl 8003f00 <ld_word>
- 8004fcc: 4603 mov r3, r0
- 8004fce: 2b00 cmp r3, #0
- 8004fd0: d001 beq.n 8004fd6 <cmp_lfn+0x1e>
- 8004fd2: 2300 movs r3, #0
- 8004fd4: e059 b.n 800508a <cmp_lfn+0xd2>
-
- i = ((dir[LDIR_Ord] & 0x3F) - 1) * 13; /* Offset in the LFN buffer */
- 8004fd6: 683b ldr r3, [r7, #0]
- 8004fd8: 781b ldrb r3, [r3, #0]
- 8004fda: f003 033f and.w r3, r3, #63 ; 0x3f
- 8004fde: 1e5a subs r2, r3, #1
- 8004fe0: 4613 mov r3, r2
- 8004fe2: 005b lsls r3, r3, #1
- 8004fe4: 4413 add r3, r2
- 8004fe6: 009b lsls r3, r3, #2
- 8004fe8: 4413 add r3, r2
- 8004fea: 617b str r3, [r7, #20]
-
- for (wc = 1, s = 0; s < 13; s++) { /* Process all characters in the entry */
- 8004fec: 2301 movs r3, #1
- 8004fee: 81fb strh r3, [r7, #14]
- 8004ff0: 2300 movs r3, #0
- 8004ff2: 613b str r3, [r7, #16]
- 8004ff4: e033 b.n 800505e <cmp_lfn+0xa6>
- uc = ld_word(dir + LfnOfs[s]); /* Pick an LFN character */
- 8004ff6: 4a27 ldr r2, [pc, #156] ; (8005094 <cmp_lfn+0xdc>)
- 8004ff8: 693b ldr r3, [r7, #16]
- 8004ffa: 4413 add r3, r2
- 8004ffc: 781b ldrb r3, [r3, #0]
- 8004ffe: 461a mov r2, r3
- 8005000: 683b ldr r3, [r7, #0]
- 8005002: 4413 add r3, r2
- 8005004: 4618 mov r0, r3
- 8005006: f7fe ff7b bl 8003f00 <ld_word>
- 800500a: 4603 mov r3, r0
- 800500c: 81bb strh r3, [r7, #12]
- if (wc) {
- 800500e: 89fb ldrh r3, [r7, #14]
- 8005010: 2b00 cmp r3, #0
- 8005012: d01a beq.n 800504a <cmp_lfn+0x92>
- if (i >= _MAX_LFN || ff_wtoupper(uc) != ff_wtoupper(lfnbuf[i++])) { /* Compare it */
- 8005014: 697b ldr r3, [r7, #20]
- 8005016: 2bfe cmp r3, #254 ; 0xfe
- 8005018: d812 bhi.n 8005040 <cmp_lfn+0x88>
- 800501a: 89bb ldrh r3, [r7, #12]
- 800501c: 4618 mov r0, r3
- 800501e: f002 f82f bl 8007080 <ff_wtoupper>
- 8005022: 4603 mov r3, r0
- 8005024: 461c mov r4, r3
- 8005026: 697b ldr r3, [r7, #20]
- 8005028: 1c5a adds r2, r3, #1
- 800502a: 617a str r2, [r7, #20]
- 800502c: 005b lsls r3, r3, #1
- 800502e: 687a ldr r2, [r7, #4]
- 8005030: 4413 add r3, r2
- 8005032: 881b ldrh r3, [r3, #0]
- 8005034: 4618 mov r0, r3
- 8005036: f002 f823 bl 8007080 <ff_wtoupper>
- 800503a: 4603 mov r3, r0
- 800503c: 429c cmp r4, r3
- 800503e: d001 beq.n 8005044 <cmp_lfn+0x8c>
- return 0; /* Not matched */
- 8005040: 2300 movs r3, #0
- 8005042: e022 b.n 800508a <cmp_lfn+0xd2>
- }
- wc = uc;
- 8005044: 89bb ldrh r3, [r7, #12]
- 8005046: 81fb strh r3, [r7, #14]
- 8005048: e006 b.n 8005058 <cmp_lfn+0xa0>
- } else {
- if (uc != 0xFFFF) return 0; /* Check filler */
- 800504a: 89bb ldrh r3, [r7, #12]
- 800504c: f64f 72ff movw r2, #65535 ; 0xffff
- 8005050: 4293 cmp r3, r2
- 8005052: d001 beq.n 8005058 <cmp_lfn+0xa0>
- 8005054: 2300 movs r3, #0
- 8005056: e018 b.n 800508a <cmp_lfn+0xd2>
- for (wc = 1, s = 0; s < 13; s++) { /* Process all characters in the entry */
- 8005058: 693b ldr r3, [r7, #16]
- 800505a: 3301 adds r3, #1
- 800505c: 613b str r3, [r7, #16]
- 800505e: 693b ldr r3, [r7, #16]
- 8005060: 2b0c cmp r3, #12
- 8005062: d9c8 bls.n 8004ff6 <cmp_lfn+0x3e>
- }
- }
-
- if ((dir[LDIR_Ord] & LLEF) && wc && lfnbuf[i]) return 0; /* Last segment matched but different length */
- 8005064: 683b ldr r3, [r7, #0]
- 8005066: 781b ldrb r3, [r3, #0]
- 8005068: f003 0340 and.w r3, r3, #64 ; 0x40
- 800506c: 2b00 cmp r3, #0
- 800506e: d00b beq.n 8005088 <cmp_lfn+0xd0>
- 8005070: 89fb ldrh r3, [r7, #14]
- 8005072: 2b00 cmp r3, #0
- 8005074: d008 beq.n 8005088 <cmp_lfn+0xd0>
- 8005076: 697b ldr r3, [r7, #20]
- 8005078: 005b lsls r3, r3, #1
- 800507a: 687a ldr r2, [r7, #4]
- 800507c: 4413 add r3, r2
- 800507e: 881b ldrh r3, [r3, #0]
- 8005080: 2b00 cmp r3, #0
- 8005082: d001 beq.n 8005088 <cmp_lfn+0xd0>
- 8005084: 2300 movs r3, #0
- 8005086: e000 b.n 800508a <cmp_lfn+0xd2>
-
- return 1; /* The part of LFN matched */
- 8005088: 2301 movs r3, #1
- }
- 800508a: 4618 mov r0, r3
- 800508c: 371c adds r7, #28
- 800508e: 46bd mov sp, r7
- 8005090: bd90 pop {r4, r7, pc}
- 8005092: bf00 nop
- 8005094: 08007c04 .word 0x08007c04
-
- 08005098 <put_lfn>:
- const WCHAR* lfn, /* Pointer to the LFN */
- BYTE* dir, /* Pointer to the LFN entry to be created */
- BYTE ord, /* LFN order (1-20) */
- BYTE sum /* Checksum of the corresponding SFN */
- )
- {
- 8005098: b580 push {r7, lr}
- 800509a: b088 sub sp, #32
- 800509c: af00 add r7, sp, #0
- 800509e: 60f8 str r0, [r7, #12]
- 80050a0: 60b9 str r1, [r7, #8]
- 80050a2: 4611 mov r1, r2
- 80050a4: 461a mov r2, r3
- 80050a6: 460b mov r3, r1
- 80050a8: 71fb strb r3, [r7, #7]
- 80050aa: 4613 mov r3, r2
- 80050ac: 71bb strb r3, [r7, #6]
- UINT i, s;
- WCHAR wc;
-
-
- dir[LDIR_Chksum] = sum; /* Set checksum */
- 80050ae: 68bb ldr r3, [r7, #8]
- 80050b0: 330d adds r3, #13
- 80050b2: 79ba ldrb r2, [r7, #6]
- 80050b4: 701a strb r2, [r3, #0]
- dir[LDIR_Attr] = AM_LFN; /* Set attribute. LFN entry */
- 80050b6: 68bb ldr r3, [r7, #8]
- 80050b8: 330b adds r3, #11
- 80050ba: 220f movs r2, #15
- 80050bc: 701a strb r2, [r3, #0]
- dir[LDIR_Type] = 0;
- 80050be: 68bb ldr r3, [r7, #8]
- 80050c0: 330c adds r3, #12
- 80050c2: 2200 movs r2, #0
- 80050c4: 701a strb r2, [r3, #0]
- st_word(dir + LDIR_FstClusLO, 0);
- 80050c6: 68bb ldr r3, [r7, #8]
- 80050c8: 331a adds r3, #26
- 80050ca: 2100 movs r1, #0
- 80050cc: 4618 mov r0, r3
- 80050ce: f7fe ff50 bl 8003f72 <st_word>
-
- i = (ord - 1) * 13; /* Get offset in the LFN working buffer */
- 80050d2: 79fb ldrb r3, [r7, #7]
- 80050d4: 1e5a subs r2, r3, #1
- 80050d6: 4613 mov r3, r2
- 80050d8: 005b lsls r3, r3, #1
- 80050da: 4413 add r3, r2
- 80050dc: 009b lsls r3, r3, #2
- 80050de: 4413 add r3, r2
- 80050e0: 61fb str r3, [r7, #28]
- s = wc = 0;
- 80050e2: 2300 movs r3, #0
- 80050e4: 82fb strh r3, [r7, #22]
- 80050e6: 2300 movs r3, #0
- 80050e8: 61bb str r3, [r7, #24]
- do {
- if (wc != 0xFFFF) wc = lfn[i++]; /* Get an effective character */
- 80050ea: 8afb ldrh r3, [r7, #22]
- 80050ec: f64f 72ff movw r2, #65535 ; 0xffff
- 80050f0: 4293 cmp r3, r2
- 80050f2: d007 beq.n 8005104 <put_lfn+0x6c>
- 80050f4: 69fb ldr r3, [r7, #28]
- 80050f6: 1c5a adds r2, r3, #1
- 80050f8: 61fa str r2, [r7, #28]
- 80050fa: 005b lsls r3, r3, #1
- 80050fc: 68fa ldr r2, [r7, #12]
- 80050fe: 4413 add r3, r2
- 8005100: 881b ldrh r3, [r3, #0]
- 8005102: 82fb strh r3, [r7, #22]
- st_word(dir + LfnOfs[s], wc); /* Put it */
- 8005104: 4a17 ldr r2, [pc, #92] ; (8005164 <put_lfn+0xcc>)
- 8005106: 69bb ldr r3, [r7, #24]
- 8005108: 4413 add r3, r2
- 800510a: 781b ldrb r3, [r3, #0]
- 800510c: 461a mov r2, r3
- 800510e: 68bb ldr r3, [r7, #8]
- 8005110: 4413 add r3, r2
- 8005112: 8afa ldrh r2, [r7, #22]
- 8005114: 4611 mov r1, r2
- 8005116: 4618 mov r0, r3
- 8005118: f7fe ff2b bl 8003f72 <st_word>
- if (wc == 0) wc = 0xFFFF; /* Padding characters for left locations */
- 800511c: 8afb ldrh r3, [r7, #22]
- 800511e: 2b00 cmp r3, #0
- 8005120: d102 bne.n 8005128 <put_lfn+0x90>
- 8005122: f64f 73ff movw r3, #65535 ; 0xffff
- 8005126: 82fb strh r3, [r7, #22]
- } while (++s < 13);
- 8005128: 69bb ldr r3, [r7, #24]
- 800512a: 3301 adds r3, #1
- 800512c: 61bb str r3, [r7, #24]
- 800512e: 69bb ldr r3, [r7, #24]
- 8005130: 2b0c cmp r3, #12
- 8005132: d9da bls.n 80050ea <put_lfn+0x52>
- if (wc == 0xFFFF || !lfn[i]) ord |= LLEF; /* Last LFN part is the start of LFN sequence */
- 8005134: 8afb ldrh r3, [r7, #22]
- 8005136: f64f 72ff movw r2, #65535 ; 0xffff
- 800513a: 4293 cmp r3, r2
- 800513c: d006 beq.n 800514c <put_lfn+0xb4>
- 800513e: 69fb ldr r3, [r7, #28]
- 8005140: 005b lsls r3, r3, #1
- 8005142: 68fa ldr r2, [r7, #12]
- 8005144: 4413 add r3, r2
- 8005146: 881b ldrh r3, [r3, #0]
- 8005148: 2b00 cmp r3, #0
- 800514a: d103 bne.n 8005154 <put_lfn+0xbc>
- 800514c: 79fb ldrb r3, [r7, #7]
- 800514e: f043 0340 orr.w r3, r3, #64 ; 0x40
- 8005152: 71fb strb r3, [r7, #7]
- dir[LDIR_Ord] = ord; /* Set the LFN order */
- 8005154: 68bb ldr r3, [r7, #8]
- 8005156: 79fa ldrb r2, [r7, #7]
- 8005158: 701a strb r2, [r3, #0]
- }
- 800515a: bf00 nop
- 800515c: 3720 adds r7, #32
- 800515e: 46bd mov sp, r7
- 8005160: bd80 pop {r7, pc}
- 8005162: bf00 nop
- 8005164: 08007c04 .word 0x08007c04
-
- 08005168 <gen_numname>:
- BYTE* dst, /* Pointer to the buffer to store numbered SFN */
- const BYTE* src, /* Pointer to SFN */
- const WCHAR* lfn, /* Pointer to LFN */
- UINT seq /* Sequence number */
- )
- {
- 8005168: b580 push {r7, lr}
- 800516a: b08c sub sp, #48 ; 0x30
- 800516c: af00 add r7, sp, #0
- 800516e: 60f8 str r0, [r7, #12]
- 8005170: 60b9 str r1, [r7, #8]
- 8005172: 607a str r2, [r7, #4]
- 8005174: 603b str r3, [r7, #0]
- UINT i, j;
- WCHAR wc;
- DWORD sr;
-
-
- mem_cpy(dst, src, 11);
- 8005176: 220b movs r2, #11
- 8005178: 68b9 ldr r1, [r7, #8]
- 800517a: 68f8 ldr r0, [r7, #12]
- 800517c: f7fe ff3e bl 8003ffc <mem_cpy>
-
- if (seq > 5) { /* In case of many collisions, generate a hash number instead of sequential number */
- 8005180: 683b ldr r3, [r7, #0]
- 8005182: 2b05 cmp r3, #5
- 8005184: d92b bls.n 80051de <gen_numname+0x76>
- sr = seq;
- 8005186: 683b ldr r3, [r7, #0]
- 8005188: 61fb str r3, [r7, #28]
- while (*lfn) { /* Create a CRC */
- 800518a: e022 b.n 80051d2 <gen_numname+0x6a>
- wc = *lfn++;
- 800518c: 687b ldr r3, [r7, #4]
- 800518e: 1c9a adds r2, r3, #2
- 8005190: 607a str r2, [r7, #4]
- 8005192: 881b ldrh r3, [r3, #0]
- 8005194: 847b strh r3, [r7, #34] ; 0x22
- for (i = 0; i < 16; i++) {
- 8005196: 2300 movs r3, #0
- 8005198: 62bb str r3, [r7, #40] ; 0x28
- 800519a: e017 b.n 80051cc <gen_numname+0x64>
- sr = (sr << 1) + (wc & 1);
- 800519c: 69fb ldr r3, [r7, #28]
- 800519e: 005a lsls r2, r3, #1
- 80051a0: 8c7b ldrh r3, [r7, #34] ; 0x22
- 80051a2: f003 0301 and.w r3, r3, #1
- 80051a6: 4413 add r3, r2
- 80051a8: 61fb str r3, [r7, #28]
- wc >>= 1;
- 80051aa: 8c7b ldrh r3, [r7, #34] ; 0x22
- 80051ac: 085b lsrs r3, r3, #1
- 80051ae: 847b strh r3, [r7, #34] ; 0x22
- if (sr & 0x10000) sr ^= 0x11021;
- 80051b0: 69fb ldr r3, [r7, #28]
- 80051b2: f403 3380 and.w r3, r3, #65536 ; 0x10000
- 80051b6: 2b00 cmp r3, #0
- 80051b8: d005 beq.n 80051c6 <gen_numname+0x5e>
- 80051ba: 69fb ldr r3, [r7, #28]
- 80051bc: f483 3388 eor.w r3, r3, #69632 ; 0x11000
- 80051c0: f083 0321 eor.w r3, r3, #33 ; 0x21
- 80051c4: 61fb str r3, [r7, #28]
- for (i = 0; i < 16; i++) {
- 80051c6: 6abb ldr r3, [r7, #40] ; 0x28
- 80051c8: 3301 adds r3, #1
- 80051ca: 62bb str r3, [r7, #40] ; 0x28
- 80051cc: 6abb ldr r3, [r7, #40] ; 0x28
- 80051ce: 2b0f cmp r3, #15
- 80051d0: d9e4 bls.n 800519c <gen_numname+0x34>
- while (*lfn) { /* Create a CRC */
- 80051d2: 687b ldr r3, [r7, #4]
- 80051d4: 881b ldrh r3, [r3, #0]
- 80051d6: 2b00 cmp r3, #0
- 80051d8: d1d8 bne.n 800518c <gen_numname+0x24>
- }
- }
- seq = (UINT)sr;
- 80051da: 69fb ldr r3, [r7, #28]
- 80051dc: 603b str r3, [r7, #0]
- }
-
- /* itoa (hexdecimal) */
- i = 7;
- 80051de: 2307 movs r3, #7
- 80051e0: 62bb str r3, [r7, #40] ; 0x28
- do {
- c = (BYTE)((seq % 16) + '0');
- 80051e2: 683b ldr r3, [r7, #0]
- 80051e4: b2db uxtb r3, r3
- 80051e6: f003 030f and.w r3, r3, #15
- 80051ea: b2db uxtb r3, r3
- 80051ec: 3330 adds r3, #48 ; 0x30
- 80051ee: f887 302f strb.w r3, [r7, #47] ; 0x2f
- if (c > '9') c += 7;
- 80051f2: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80051f6: 2b39 cmp r3, #57 ; 0x39
- 80051f8: d904 bls.n 8005204 <gen_numname+0x9c>
- 80051fa: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80051fe: 3307 adds r3, #7
- 8005200: f887 302f strb.w r3, [r7, #47] ; 0x2f
- ns[i--] = c;
- 8005204: 6abb ldr r3, [r7, #40] ; 0x28
- 8005206: 1e5a subs r2, r3, #1
- 8005208: 62ba str r2, [r7, #40] ; 0x28
- 800520a: f107 0230 add.w r2, r7, #48 ; 0x30
- 800520e: 4413 add r3, r2
- 8005210: f897 202f ldrb.w r2, [r7, #47] ; 0x2f
- 8005214: f803 2c1c strb.w r2, [r3, #-28]
- seq /= 16;
- 8005218: 683b ldr r3, [r7, #0]
- 800521a: 091b lsrs r3, r3, #4
- 800521c: 603b str r3, [r7, #0]
- } while (seq);
- 800521e: 683b ldr r3, [r7, #0]
- 8005220: 2b00 cmp r3, #0
- 8005222: d1de bne.n 80051e2 <gen_numname+0x7a>
- ns[i] = '~';
- 8005224: f107 0214 add.w r2, r7, #20
- 8005228: 6abb ldr r3, [r7, #40] ; 0x28
- 800522a: 4413 add r3, r2
- 800522c: 227e movs r2, #126 ; 0x7e
- 800522e: 701a strb r2, [r3, #0]
-
- /* Append the number */
- for (j = 0; j < i && dst[j] != ' '; j++) {
- 8005230: 2300 movs r3, #0
- 8005232: 627b str r3, [r7, #36] ; 0x24
- 8005234: e002 b.n 800523c <gen_numname+0xd4>
- 8005236: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005238: 3301 adds r3, #1
- 800523a: 627b str r3, [r7, #36] ; 0x24
- 800523c: 6a7a ldr r2, [r7, #36] ; 0x24
- 800523e: 6abb ldr r3, [r7, #40] ; 0x28
- 8005240: 429a cmp r2, r3
- 8005242: d205 bcs.n 8005250 <gen_numname+0xe8>
- 8005244: 68fa ldr r2, [r7, #12]
- 8005246: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005248: 4413 add r3, r2
- 800524a: 781b ldrb r3, [r3, #0]
- 800524c: 2b20 cmp r3, #32
- 800524e: d1f2 bne.n 8005236 <gen_numname+0xce>
- if (j == i - 1) break;
- j++;
- }
- }
- do {
- dst[j++] = (i < 8) ? ns[i++] : ' ';
- 8005250: 6abb ldr r3, [r7, #40] ; 0x28
- 8005252: 2b07 cmp r3, #7
- 8005254: d808 bhi.n 8005268 <gen_numname+0x100>
- 8005256: 6abb ldr r3, [r7, #40] ; 0x28
- 8005258: 1c5a adds r2, r3, #1
- 800525a: 62ba str r2, [r7, #40] ; 0x28
- 800525c: f107 0230 add.w r2, r7, #48 ; 0x30
- 8005260: 4413 add r3, r2
- 8005262: f813 1c1c ldrb.w r1, [r3, #-28]
- 8005266: e000 b.n 800526a <gen_numname+0x102>
- 8005268: 2120 movs r1, #32
- 800526a: 6a7b ldr r3, [r7, #36] ; 0x24
- 800526c: 1c5a adds r2, r3, #1
- 800526e: 627a str r2, [r7, #36] ; 0x24
- 8005270: 68fa ldr r2, [r7, #12]
- 8005272: 4413 add r3, r2
- 8005274: 460a mov r2, r1
- 8005276: 701a strb r2, [r3, #0]
- } while (j < 8);
- 8005278: 6a7b ldr r3, [r7, #36] ; 0x24
- 800527a: 2b07 cmp r3, #7
- 800527c: d9e8 bls.n 8005250 <gen_numname+0xe8>
- }
- 800527e: bf00 nop
- 8005280: 3730 adds r7, #48 ; 0x30
- 8005282: 46bd mov sp, r7
- 8005284: bd80 pop {r7, pc}
-
- 08005286 <sum_sfn>:
-
- static
- BYTE sum_sfn (
- const BYTE* dir /* Pointer to the SFN entry */
- )
- {
- 8005286: b480 push {r7}
- 8005288: b085 sub sp, #20
- 800528a: af00 add r7, sp, #0
- 800528c: 6078 str r0, [r7, #4]
- BYTE sum = 0;
- 800528e: 2300 movs r3, #0
- 8005290: 73fb strb r3, [r7, #15]
- UINT n = 11;
- 8005292: 230b movs r3, #11
- 8005294: 60bb str r3, [r7, #8]
-
- do {
- sum = (sum >> 1) + (sum << 7) + *dir++;
- 8005296: 7bfb ldrb r3, [r7, #15]
- 8005298: b2da uxtb r2, r3
- 800529a: 0852 lsrs r2, r2, #1
- 800529c: 01db lsls r3, r3, #7
- 800529e: 4313 orrs r3, r2
- 80052a0: b2da uxtb r2, r3
- 80052a2: 687b ldr r3, [r7, #4]
- 80052a4: 1c59 adds r1, r3, #1
- 80052a6: 6079 str r1, [r7, #4]
- 80052a8: 781b ldrb r3, [r3, #0]
- 80052aa: 4413 add r3, r2
- 80052ac: 73fb strb r3, [r7, #15]
- } while (--n);
- 80052ae: 68bb ldr r3, [r7, #8]
- 80052b0: 3b01 subs r3, #1
- 80052b2: 60bb str r3, [r7, #8]
- 80052b4: 68bb ldr r3, [r7, #8]
- 80052b6: 2b00 cmp r3, #0
- 80052b8: d1ed bne.n 8005296 <sum_sfn+0x10>
- return sum;
- 80052ba: 7bfb ldrb r3, [r7, #15]
- }
- 80052bc: 4618 mov r0, r3
- 80052be: 3714 adds r7, #20
- 80052c0: 46bd mov sp, r7
- 80052c2: bc80 pop {r7}
- 80052c4: 4770 bx lr
-
- 080052c6 <dir_find>:
-
- static
- FRESULT dir_find ( /* FR_OK(0):succeeded, !=0:error */
- DIR* dp /* Pointer to the directory object with the file name */
- )
- {
- 80052c6: b580 push {r7, lr}
- 80052c8: b086 sub sp, #24
- 80052ca: af00 add r7, sp, #0
- 80052cc: 6078 str r0, [r7, #4]
- FRESULT res;
- FATFS *fs = dp->obj.fs;
- 80052ce: 687b ldr r3, [r7, #4]
- 80052d0: 681b ldr r3, [r3, #0]
- 80052d2: 613b str r3, [r7, #16]
- BYTE c;
- #if _USE_LFN != 0
- BYTE a, ord, sum;
- #endif
-
- res = dir_sdi(dp, 0); /* Rewind directory object */
- 80052d4: 2100 movs r1, #0
- 80052d6: 6878 ldr r0, [r7, #4]
- 80052d8: f7ff fc89 bl 8004bee <dir_sdi>
- 80052dc: 4603 mov r3, r0
- 80052de: 75fb strb r3, [r7, #23]
- if (res != FR_OK) return res;
- 80052e0: 7dfb ldrb r3, [r7, #23]
- 80052e2: 2b00 cmp r3, #0
- 80052e4: d001 beq.n 80052ea <dir_find+0x24>
- 80052e6: 7dfb ldrb r3, [r7, #23]
- 80052e8: e0a9 b.n 800543e <dir_find+0x178>
- return res;
- }
- #endif
- /* On the FAT12/16/32 volume */
- #if _USE_LFN != 0
- ord = sum = 0xFF; dp->blk_ofs = 0xFFFFFFFF; /* Reset LFN sequence */
- 80052ea: 23ff movs r3, #255 ; 0xff
- 80052ec: 753b strb r3, [r7, #20]
- 80052ee: 7d3b ldrb r3, [r7, #20]
- 80052f0: 757b strb r3, [r7, #21]
- 80052f2: 687b ldr r3, [r7, #4]
- 80052f4: f04f 32ff mov.w r2, #4294967295
- 80052f8: 631a str r2, [r3, #48] ; 0x30
- #endif
- do {
- res = move_window(fs, dp->sect);
- 80052fa: 687b ldr r3, [r7, #4]
- 80052fc: 69db ldr r3, [r3, #28]
- 80052fe: 4619 mov r1, r3
- 8005300: 6938 ldr r0, [r7, #16]
- 8005302: f7ff f89d bl 8004440 <move_window>
- 8005306: 4603 mov r3, r0
- 8005308: 75fb strb r3, [r7, #23]
- if (res != FR_OK) break;
- 800530a: 7dfb ldrb r3, [r7, #23]
- 800530c: 2b00 cmp r3, #0
- 800530e: f040 8090 bne.w 8005432 <dir_find+0x16c>
- c = dp->dir[DIR_Name];
- 8005312: 687b ldr r3, [r7, #4]
- 8005314: 6a1b ldr r3, [r3, #32]
- 8005316: 781b ldrb r3, [r3, #0]
- 8005318: 75bb strb r3, [r7, #22]
- if (c == 0) { res = FR_NO_FILE; break; } /* Reached to end of table */
- 800531a: 7dbb ldrb r3, [r7, #22]
- 800531c: 2b00 cmp r3, #0
- 800531e: d102 bne.n 8005326 <dir_find+0x60>
- 8005320: 2304 movs r3, #4
- 8005322: 75fb strb r3, [r7, #23]
- 8005324: e08a b.n 800543c <dir_find+0x176>
- #if _USE_LFN != 0 /* LFN configuration */
- dp->obj.attr = a = dp->dir[DIR_Attr] & AM_MASK;
- 8005326: 687b ldr r3, [r7, #4]
- 8005328: 6a1b ldr r3, [r3, #32]
- 800532a: 330b adds r3, #11
- 800532c: 781b ldrb r3, [r3, #0]
- 800532e: f003 033f and.w r3, r3, #63 ; 0x3f
- 8005332: 73fb strb r3, [r7, #15]
- 8005334: 687b ldr r3, [r7, #4]
- 8005336: 7bfa ldrb r2, [r7, #15]
- 8005338: 719a strb r2, [r3, #6]
- if (c == DDEM || ((a & AM_VOL) && a != AM_LFN)) { /* An entry without valid data */
- 800533a: 7dbb ldrb r3, [r7, #22]
- 800533c: 2be5 cmp r3, #229 ; 0xe5
- 800533e: d007 beq.n 8005350 <dir_find+0x8a>
- 8005340: 7bfb ldrb r3, [r7, #15]
- 8005342: f003 0308 and.w r3, r3, #8
- 8005346: 2b00 cmp r3, #0
- 8005348: d009 beq.n 800535e <dir_find+0x98>
- 800534a: 7bfb ldrb r3, [r7, #15]
- 800534c: 2b0f cmp r3, #15
- 800534e: d006 beq.n 800535e <dir_find+0x98>
- ord = 0xFF; dp->blk_ofs = 0xFFFFFFFF; /* Reset LFN sequence */
- 8005350: 23ff movs r3, #255 ; 0xff
- 8005352: 757b strb r3, [r7, #21]
- 8005354: 687b ldr r3, [r7, #4]
- 8005356: f04f 32ff mov.w r2, #4294967295
- 800535a: 631a str r2, [r3, #48] ; 0x30
- 800535c: e05e b.n 800541c <dir_find+0x156>
- } else {
- if (a == AM_LFN) { /* An LFN entry is found */
- 800535e: 7bfb ldrb r3, [r7, #15]
- 8005360: 2b0f cmp r3, #15
- 8005362: d136 bne.n 80053d2 <dir_find+0x10c>
- if (!(dp->fn[NSFLAG] & NS_NOLFN)) {
- 8005364: 687b ldr r3, [r7, #4]
- 8005366: f893 302f ldrb.w r3, [r3, #47] ; 0x2f
- 800536a: f003 0340 and.w r3, r3, #64 ; 0x40
- 800536e: 2b00 cmp r3, #0
- 8005370: d154 bne.n 800541c <dir_find+0x156>
- if (c & LLEF) { /* Is it start of LFN sequence? */
- 8005372: 7dbb ldrb r3, [r7, #22]
- 8005374: f003 0340 and.w r3, r3, #64 ; 0x40
- 8005378: 2b00 cmp r3, #0
- 800537a: d00d beq.n 8005398 <dir_find+0xd2>
- sum = dp->dir[LDIR_Chksum];
- 800537c: 687b ldr r3, [r7, #4]
- 800537e: 6a1b ldr r3, [r3, #32]
- 8005380: 7b5b ldrb r3, [r3, #13]
- 8005382: 753b strb r3, [r7, #20]
- c &= (BYTE)~LLEF; ord = c; /* LFN start order */
- 8005384: 7dbb ldrb r3, [r7, #22]
- 8005386: f023 0340 bic.w r3, r3, #64 ; 0x40
- 800538a: 75bb strb r3, [r7, #22]
- 800538c: 7dbb ldrb r3, [r7, #22]
- 800538e: 757b strb r3, [r7, #21]
- dp->blk_ofs = dp->dptr; /* Start offset of LFN */
- 8005390: 687b ldr r3, [r7, #4]
- 8005392: 695a ldr r2, [r3, #20]
- 8005394: 687b ldr r3, [r7, #4]
- 8005396: 631a str r2, [r3, #48] ; 0x30
- }
- /* Check validity of the LFN entry and compare it with given name */
- ord = (c == ord && sum == dp->dir[LDIR_Chksum] && cmp_lfn(fs->lfnbuf, dp->dir)) ? ord - 1 : 0xFF;
- 8005398: 7dba ldrb r2, [r7, #22]
- 800539a: 7d7b ldrb r3, [r7, #21]
- 800539c: 429a cmp r2, r3
- 800539e: d115 bne.n 80053cc <dir_find+0x106>
- 80053a0: 687b ldr r3, [r7, #4]
- 80053a2: 6a1b ldr r3, [r3, #32]
- 80053a4: 330d adds r3, #13
- 80053a6: 781b ldrb r3, [r3, #0]
- 80053a8: 7d3a ldrb r2, [r7, #20]
- 80053aa: 429a cmp r2, r3
- 80053ac: d10e bne.n 80053cc <dir_find+0x106>
- 80053ae: 693b ldr r3, [r7, #16]
- 80053b0: 691a ldr r2, [r3, #16]
- 80053b2: 687b ldr r3, [r7, #4]
- 80053b4: 6a1b ldr r3, [r3, #32]
- 80053b6: 4619 mov r1, r3
- 80053b8: 4610 mov r0, r2
- 80053ba: f7ff fdfd bl 8004fb8 <cmp_lfn>
- 80053be: 4603 mov r3, r0
- 80053c0: 2b00 cmp r3, #0
- 80053c2: d003 beq.n 80053cc <dir_find+0x106>
- 80053c4: 7d7b ldrb r3, [r7, #21]
- 80053c6: 3b01 subs r3, #1
- 80053c8: b2db uxtb r3, r3
- 80053ca: e000 b.n 80053ce <dir_find+0x108>
- 80053cc: 23ff movs r3, #255 ; 0xff
- 80053ce: 757b strb r3, [r7, #21]
- 80053d0: e024 b.n 800541c <dir_find+0x156>
- }
- } else { /* An SFN entry is found */
- if (!ord && sum == sum_sfn(dp->dir)) break; /* LFN matched? */
- 80053d2: 7d7b ldrb r3, [r7, #21]
- 80053d4: 2b00 cmp r3, #0
- 80053d6: d109 bne.n 80053ec <dir_find+0x126>
- 80053d8: 687b ldr r3, [r7, #4]
- 80053da: 6a1b ldr r3, [r3, #32]
- 80053dc: 4618 mov r0, r3
- 80053de: f7ff ff52 bl 8005286 <sum_sfn>
- 80053e2: 4603 mov r3, r0
- 80053e4: 461a mov r2, r3
- 80053e6: 7d3b ldrb r3, [r7, #20]
- 80053e8: 4293 cmp r3, r2
- 80053ea: d024 beq.n 8005436 <dir_find+0x170>
- if (!(dp->fn[NSFLAG] & NS_LOSS) && !mem_cmp(dp->dir, dp->fn, 11)) break; /* SFN matched? */
- 80053ec: 687b ldr r3, [r7, #4]
- 80053ee: f893 302f ldrb.w r3, [r3, #47] ; 0x2f
- 80053f2: f003 0301 and.w r3, r3, #1
- 80053f6: 2b00 cmp r3, #0
- 80053f8: d10a bne.n 8005410 <dir_find+0x14a>
- 80053fa: 687b ldr r3, [r7, #4]
- 80053fc: 6a18 ldr r0, [r3, #32]
- 80053fe: 687b ldr r3, [r7, #4]
- 8005400: 3324 adds r3, #36 ; 0x24
- 8005402: 220b movs r2, #11
- 8005404: 4619 mov r1, r3
- 8005406: f7fe fe32 bl 800406e <mem_cmp>
- 800540a: 4603 mov r3, r0
- 800540c: 2b00 cmp r3, #0
- 800540e: d014 beq.n 800543a <dir_find+0x174>
- ord = 0xFF; dp->blk_ofs = 0xFFFFFFFF; /* Reset LFN sequence */
- 8005410: 23ff movs r3, #255 ; 0xff
- 8005412: 757b strb r3, [r7, #21]
- 8005414: 687b ldr r3, [r7, #4]
- 8005416: f04f 32ff mov.w r2, #4294967295
- 800541a: 631a str r2, [r3, #48] ; 0x30
- }
- #else /* Non LFN configuration */
- dp->obj.attr = dp->dir[DIR_Attr] & AM_MASK;
- if (!(dp->dir[DIR_Attr] & AM_VOL) && !mem_cmp(dp->dir, dp->fn, 11)) break; /* Is it a valid entry? */
- #endif
- res = dir_next(dp, 0); /* Next entry */
- 800541c: 2100 movs r1, #0
- 800541e: 6878 ldr r0, [r7, #4]
- 8005420: f7ff fc6e bl 8004d00 <dir_next>
- 8005424: 4603 mov r3, r0
- 8005426: 75fb strb r3, [r7, #23]
- } while (res == FR_OK);
- 8005428: 7dfb ldrb r3, [r7, #23]
- 800542a: 2b00 cmp r3, #0
- 800542c: f43f af65 beq.w 80052fa <dir_find+0x34>
- 8005430: e004 b.n 800543c <dir_find+0x176>
- if (res != FR_OK) break;
- 8005432: bf00 nop
- 8005434: e002 b.n 800543c <dir_find+0x176>
- if (!ord && sum == sum_sfn(dp->dir)) break; /* LFN matched? */
- 8005436: bf00 nop
- 8005438: e000 b.n 800543c <dir_find+0x176>
- if (!(dp->fn[NSFLAG] & NS_LOSS) && !mem_cmp(dp->dir, dp->fn, 11)) break; /* SFN matched? */
- 800543a: bf00 nop
-
- return res;
- 800543c: 7dfb ldrb r3, [r7, #23]
- }
- 800543e: 4618 mov r0, r3
- 8005440: 3718 adds r7, #24
- 8005442: 46bd mov sp, r7
- 8005444: bd80 pop {r7, pc}
- ...
-
- 08005448 <dir_register>:
-
- static
- FRESULT dir_register ( /* FR_OK:succeeded, FR_DENIED:no free entry or too many SFN collision, FR_DISK_ERR:disk error */
- DIR* dp /* Target directory with object name to be created */
- )
- {
- 8005448: b580 push {r7, lr}
- 800544a: b08c sub sp, #48 ; 0x30
- 800544c: af00 add r7, sp, #0
- 800544e: 6078 str r0, [r7, #4]
- FRESULT res;
- FATFS *fs = dp->obj.fs;
- 8005450: 687b ldr r3, [r7, #4]
- 8005452: 681b ldr r3, [r3, #0]
- 8005454: 61fb str r3, [r7, #28]
- #if _USE_LFN != 0 /* LFN configuration */
- UINT n, nlen, nent;
- BYTE sn[12], sum;
-
-
- if (dp->fn[NSFLAG] & (NS_DOT | NS_NONAME)) return FR_INVALID_NAME; /* Check name validity */
- 8005456: 687b ldr r3, [r7, #4]
- 8005458: f893 302f ldrb.w r3, [r3, #47] ; 0x2f
- 800545c: f003 03a0 and.w r3, r3, #160 ; 0xa0
- 8005460: 2b00 cmp r3, #0
- 8005462: d001 beq.n 8005468 <dir_register+0x20>
- 8005464: 2306 movs r3, #6
- 8005466: e0e0 b.n 800562a <dir_register+0x1e2>
- for (nlen = 0; fs->lfnbuf[nlen]; nlen++) ; /* Get lfn length */
- 8005468: 2300 movs r3, #0
- 800546a: 627b str r3, [r7, #36] ; 0x24
- 800546c: e002 b.n 8005474 <dir_register+0x2c>
- 800546e: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005470: 3301 adds r3, #1
- 8005472: 627b str r3, [r7, #36] ; 0x24
- 8005474: 69fb ldr r3, [r7, #28]
- 8005476: 691a ldr r2, [r3, #16]
- 8005478: 6a7b ldr r3, [r7, #36] ; 0x24
- 800547a: 005b lsls r3, r3, #1
- 800547c: 4413 add r3, r2
- 800547e: 881b ldrh r3, [r3, #0]
- 8005480: 2b00 cmp r3, #0
- 8005482: d1f4 bne.n 800546e <dir_register+0x26>
- create_xdir(fs->dirbuf, fs->lfnbuf); /* Create on-memory directory block to be written later */
- return FR_OK;
- }
- #endif
- /* On the FAT12/16/32 volume */
- mem_cpy(sn, dp->fn, 12);
- 8005484: 687b ldr r3, [r7, #4]
- 8005486: f103 0124 add.w r1, r3, #36 ; 0x24
- 800548a: f107 030c add.w r3, r7, #12
- 800548e: 220c movs r2, #12
- 8005490: 4618 mov r0, r3
- 8005492: f7fe fdb3 bl 8003ffc <mem_cpy>
- if (sn[NSFLAG] & NS_LOSS) { /* When LFN is out of 8.3 format, generate a numbered name */
- 8005496: 7dfb ldrb r3, [r7, #23]
- 8005498: f003 0301 and.w r3, r3, #1
- 800549c: 2b00 cmp r3, #0
- 800549e: d032 beq.n 8005506 <dir_register+0xbe>
- dp->fn[NSFLAG] = NS_NOLFN; /* Find only SFN */
- 80054a0: 687b ldr r3, [r7, #4]
- 80054a2: 2240 movs r2, #64 ; 0x40
- 80054a4: f883 202f strb.w r2, [r3, #47] ; 0x2f
- for (n = 1; n < 100; n++) {
- 80054a8: 2301 movs r3, #1
- 80054aa: 62bb str r3, [r7, #40] ; 0x28
- 80054ac: e016 b.n 80054dc <dir_register+0x94>
- gen_numname(dp->fn, sn, fs->lfnbuf, n); /* Generate a numbered name */
- 80054ae: 687b ldr r3, [r7, #4]
- 80054b0: f103 0024 add.w r0, r3, #36 ; 0x24
- 80054b4: 69fb ldr r3, [r7, #28]
- 80054b6: 691a ldr r2, [r3, #16]
- 80054b8: f107 010c add.w r1, r7, #12
- 80054bc: 6abb ldr r3, [r7, #40] ; 0x28
- 80054be: f7ff fe53 bl 8005168 <gen_numname>
- res = dir_find(dp); /* Check if the name collides with existing SFN */
- 80054c2: 6878 ldr r0, [r7, #4]
- 80054c4: f7ff feff bl 80052c6 <dir_find>
- 80054c8: 4603 mov r3, r0
- 80054ca: f887 302f strb.w r3, [r7, #47] ; 0x2f
- if (res != FR_OK) break;
- 80054ce: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80054d2: 2b00 cmp r3, #0
- 80054d4: d106 bne.n 80054e4 <dir_register+0x9c>
- for (n = 1; n < 100; n++) {
- 80054d6: 6abb ldr r3, [r7, #40] ; 0x28
- 80054d8: 3301 adds r3, #1
- 80054da: 62bb str r3, [r7, #40] ; 0x28
- 80054dc: 6abb ldr r3, [r7, #40] ; 0x28
- 80054de: 2b63 cmp r3, #99 ; 0x63
- 80054e0: d9e5 bls.n 80054ae <dir_register+0x66>
- 80054e2: e000 b.n 80054e6 <dir_register+0x9e>
- if (res != FR_OK) break;
- 80054e4: bf00 nop
- }
- if (n == 100) return FR_DENIED; /* Abort if too many collisions */
- 80054e6: 6abb ldr r3, [r7, #40] ; 0x28
- 80054e8: 2b64 cmp r3, #100 ; 0x64
- 80054ea: d101 bne.n 80054f0 <dir_register+0xa8>
- 80054ec: 2307 movs r3, #7
- 80054ee: e09c b.n 800562a <dir_register+0x1e2>
- if (res != FR_NO_FILE) return res; /* Abort if the result is other than 'not collided' */
- 80054f0: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80054f4: 2b04 cmp r3, #4
- 80054f6: d002 beq.n 80054fe <dir_register+0xb6>
- 80054f8: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80054fc: e095 b.n 800562a <dir_register+0x1e2>
- dp->fn[NSFLAG] = sn[NSFLAG];
- 80054fe: 7dfa ldrb r2, [r7, #23]
- 8005500: 687b ldr r3, [r7, #4]
- 8005502: f883 202f strb.w r2, [r3, #47] ; 0x2f
- }
-
- /* Create an SFN with/without LFNs. */
- nent = (sn[NSFLAG] & NS_LFN) ? (nlen + 12) / 13 + 1 : 1; /* Number of entries to allocate */
- 8005506: 7dfb ldrb r3, [r7, #23]
- 8005508: f003 0302 and.w r3, r3, #2
- 800550c: 2b00 cmp r3, #0
- 800550e: d007 beq.n 8005520 <dir_register+0xd8>
- 8005510: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005512: 330c adds r3, #12
- 8005514: 4a47 ldr r2, [pc, #284] ; (8005634 <dir_register+0x1ec>)
- 8005516: fba2 2303 umull r2, r3, r2, r3
- 800551a: 089b lsrs r3, r3, #2
- 800551c: 3301 adds r3, #1
- 800551e: e000 b.n 8005522 <dir_register+0xda>
- 8005520: 2301 movs r3, #1
- 8005522: 623b str r3, [r7, #32]
- res = dir_alloc(dp, nent); /* Allocate entries */
- 8005524: 6a39 ldr r1, [r7, #32]
- 8005526: 6878 ldr r0, [r7, #4]
- 8005528: f7ff fcc0 bl 8004eac <dir_alloc>
- 800552c: 4603 mov r3, r0
- 800552e: f887 302f strb.w r3, [r7, #47] ; 0x2f
- if (res == FR_OK && --nent) { /* Set LFN entry if needed */
- 8005532: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 8005536: 2b00 cmp r3, #0
- 8005538: d148 bne.n 80055cc <dir_register+0x184>
- 800553a: 6a3b ldr r3, [r7, #32]
- 800553c: 3b01 subs r3, #1
- 800553e: 623b str r3, [r7, #32]
- 8005540: 6a3b ldr r3, [r7, #32]
- 8005542: 2b00 cmp r3, #0
- 8005544: d042 beq.n 80055cc <dir_register+0x184>
- res = dir_sdi(dp, dp->dptr - nent * SZDIRE);
- 8005546: 687b ldr r3, [r7, #4]
- 8005548: 695a ldr r2, [r3, #20]
- 800554a: 6a3b ldr r3, [r7, #32]
- 800554c: 015b lsls r3, r3, #5
- 800554e: 1ad3 subs r3, r2, r3
- 8005550: 4619 mov r1, r3
- 8005552: 6878 ldr r0, [r7, #4]
- 8005554: f7ff fb4b bl 8004bee <dir_sdi>
- 8005558: 4603 mov r3, r0
- 800555a: f887 302f strb.w r3, [r7, #47] ; 0x2f
- if (res == FR_OK) {
- 800555e: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 8005562: 2b00 cmp r3, #0
- 8005564: d132 bne.n 80055cc <dir_register+0x184>
- sum = sum_sfn(dp->fn); /* Checksum value of the SFN tied to the LFN */
- 8005566: 687b ldr r3, [r7, #4]
- 8005568: 3324 adds r3, #36 ; 0x24
- 800556a: 4618 mov r0, r3
- 800556c: f7ff fe8b bl 8005286 <sum_sfn>
- 8005570: 4603 mov r3, r0
- 8005572: 76fb strb r3, [r7, #27]
- do { /* Store LFN entries in bottom first */
- res = move_window(fs, dp->sect);
- 8005574: 687b ldr r3, [r7, #4]
- 8005576: 69db ldr r3, [r3, #28]
- 8005578: 4619 mov r1, r3
- 800557a: 69f8 ldr r0, [r7, #28]
- 800557c: f7fe ff60 bl 8004440 <move_window>
- 8005580: 4603 mov r3, r0
- 8005582: f887 302f strb.w r3, [r7, #47] ; 0x2f
- if (res != FR_OK) break;
- 8005586: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 800558a: 2b00 cmp r3, #0
- 800558c: d11d bne.n 80055ca <dir_register+0x182>
- put_lfn(fs->lfnbuf, dp->dir, (BYTE)nent, sum);
- 800558e: 69fb ldr r3, [r7, #28]
- 8005590: 6918 ldr r0, [r3, #16]
- 8005592: 687b ldr r3, [r7, #4]
- 8005594: 6a19 ldr r1, [r3, #32]
- 8005596: 6a3b ldr r3, [r7, #32]
- 8005598: b2da uxtb r2, r3
- 800559a: 7efb ldrb r3, [r7, #27]
- 800559c: f7ff fd7c bl 8005098 <put_lfn>
- fs->wflag = 1;
- 80055a0: 69fb ldr r3, [r7, #28]
- 80055a2: 2201 movs r2, #1
- 80055a4: 70da strb r2, [r3, #3]
- res = dir_next(dp, 0); /* Next entry */
- 80055a6: 2100 movs r1, #0
- 80055a8: 6878 ldr r0, [r7, #4]
- 80055aa: f7ff fba9 bl 8004d00 <dir_next>
- 80055ae: 4603 mov r3, r0
- 80055b0: f887 302f strb.w r3, [r7, #47] ; 0x2f
- } while (res == FR_OK && --nent);
- 80055b4: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80055b8: 2b00 cmp r3, #0
- 80055ba: d107 bne.n 80055cc <dir_register+0x184>
- 80055bc: 6a3b ldr r3, [r7, #32]
- 80055be: 3b01 subs r3, #1
- 80055c0: 623b str r3, [r7, #32]
- 80055c2: 6a3b ldr r3, [r7, #32]
- 80055c4: 2b00 cmp r3, #0
- 80055c6: d1d5 bne.n 8005574 <dir_register+0x12c>
- 80055c8: e000 b.n 80055cc <dir_register+0x184>
- if (res != FR_OK) break;
- 80055ca: bf00 nop
- res = dir_alloc(dp, 1); /* Allocate an entry for SFN */
-
- #endif
-
- /* Set SFN entry */
- if (res == FR_OK) {
- 80055cc: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80055d0: 2b00 cmp r3, #0
- 80055d2: d128 bne.n 8005626 <dir_register+0x1de>
- res = move_window(fs, dp->sect);
- 80055d4: 687b ldr r3, [r7, #4]
- 80055d6: 69db ldr r3, [r3, #28]
- 80055d8: 4619 mov r1, r3
- 80055da: 69f8 ldr r0, [r7, #28]
- 80055dc: f7fe ff30 bl 8004440 <move_window>
- 80055e0: 4603 mov r3, r0
- 80055e2: f887 302f strb.w r3, [r7, #47] ; 0x2f
- if (res == FR_OK) {
- 80055e6: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80055ea: 2b00 cmp r3, #0
- 80055ec: d11b bne.n 8005626 <dir_register+0x1de>
- mem_set(dp->dir, 0, SZDIRE); /* Clean the entry */
- 80055ee: 687b ldr r3, [r7, #4]
- 80055f0: 6a1b ldr r3, [r3, #32]
- 80055f2: 2220 movs r2, #32
- 80055f4: 2100 movs r1, #0
- 80055f6: 4618 mov r0, r3
- 80055f8: f7fe fd20 bl 800403c <mem_set>
- mem_cpy(dp->dir + DIR_Name, dp->fn, 11); /* Put SFN */
- 80055fc: 687b ldr r3, [r7, #4]
- 80055fe: 6a18 ldr r0, [r3, #32]
- 8005600: 687b ldr r3, [r7, #4]
- 8005602: 3324 adds r3, #36 ; 0x24
- 8005604: 220b movs r2, #11
- 8005606: 4619 mov r1, r3
- 8005608: f7fe fcf8 bl 8003ffc <mem_cpy>
- #if _USE_LFN != 0
- dp->dir[DIR_NTres] = dp->fn[NSFLAG] & (NS_BODY | NS_EXT); /* Put NT flag */
- 800560c: 687b ldr r3, [r7, #4]
- 800560e: f893 202f ldrb.w r2, [r3, #47] ; 0x2f
- 8005612: 687b ldr r3, [r7, #4]
- 8005614: 6a1b ldr r3, [r3, #32]
- 8005616: 330c adds r3, #12
- 8005618: f002 0218 and.w r2, r2, #24
- 800561c: b2d2 uxtb r2, r2
- 800561e: 701a strb r2, [r3, #0]
- #endif
- fs->wflag = 1;
- 8005620: 69fb ldr r3, [r7, #28]
- 8005622: 2201 movs r2, #1
- 8005624: 70da strb r2, [r3, #3]
- }
- }
-
- return res;
- 8005626: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- }
- 800562a: 4618 mov r0, r3
- 800562c: 3730 adds r7, #48 ; 0x30
- 800562e: 46bd mov sp, r7
- 8005630: bd80 pop {r7, pc}
- 8005632: bf00 nop
- 8005634: 4ec4ec4f .word 0x4ec4ec4f
-
- 08005638 <create_name>:
- static
- FRESULT create_name ( /* FR_OK: successful, FR_INVALID_NAME: could not create */
- DIR* dp, /* Pointer to the directory object */
- const TCHAR** path /* Pointer to pointer to the segment in the path string */
- )
- {
- 8005638: b580 push {r7, lr}
- 800563a: b08a sub sp, #40 ; 0x28
- 800563c: af00 add r7, sp, #0
- 800563e: 6078 str r0, [r7, #4]
- 8005640: 6039 str r1, [r7, #0]
- WCHAR w, *lfn;
- UINT i, ni, si, di;
- const TCHAR *p;
-
- /* Create LFN in Unicode */
- p = *path; lfn = dp->obj.fs->lfnbuf; si = di = 0;
- 8005642: 683b ldr r3, [r7, #0]
- 8005644: 681b ldr r3, [r3, #0]
- 8005646: 613b str r3, [r7, #16]
- 8005648: 687b ldr r3, [r7, #4]
- 800564a: 681b ldr r3, [r3, #0]
- 800564c: 691b ldr r3, [r3, #16]
- 800564e: 60fb str r3, [r7, #12]
- 8005650: 2300 movs r3, #0
- 8005652: 617b str r3, [r7, #20]
- 8005654: 697b ldr r3, [r7, #20]
- 8005656: 61bb str r3, [r7, #24]
- for (;;) {
- w = p[si++]; /* Get a character */
- 8005658: 69bb ldr r3, [r7, #24]
- 800565a: 1c5a adds r2, r3, #1
- 800565c: 61ba str r2, [r7, #24]
- 800565e: 693a ldr r2, [r7, #16]
- 8005660: 4413 add r3, r2
- 8005662: 781b ldrb r3, [r3, #0]
- 8005664: 84bb strh r3, [r7, #36] ; 0x24
- if (w < ' ') break; /* Break if end of the path name */
- 8005666: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005668: 2b1f cmp r3, #31
- 800566a: d940 bls.n 80056ee <create_name+0xb6>
- if (w == '/' || w == '\\') { /* Break if a separator is found */
- 800566c: 8cbb ldrh r3, [r7, #36] ; 0x24
- 800566e: 2b2f cmp r3, #47 ; 0x2f
- 8005670: d006 beq.n 8005680 <create_name+0x48>
- 8005672: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005674: 2b5c cmp r3, #92 ; 0x5c
- 8005676: d110 bne.n 800569a <create_name+0x62>
- while (p[si] == '/' || p[si] == '\\') si++; /* Skip duplicated separator if exist */
- 8005678: e002 b.n 8005680 <create_name+0x48>
- 800567a: 69bb ldr r3, [r7, #24]
- 800567c: 3301 adds r3, #1
- 800567e: 61bb str r3, [r7, #24]
- 8005680: 693a ldr r2, [r7, #16]
- 8005682: 69bb ldr r3, [r7, #24]
- 8005684: 4413 add r3, r2
- 8005686: 781b ldrb r3, [r3, #0]
- 8005688: 2b2f cmp r3, #47 ; 0x2f
- 800568a: d0f6 beq.n 800567a <create_name+0x42>
- 800568c: 693a ldr r2, [r7, #16]
- 800568e: 69bb ldr r3, [r7, #24]
- 8005690: 4413 add r3, r2
- 8005692: 781b ldrb r3, [r3, #0]
- 8005694: 2b5c cmp r3, #92 ; 0x5c
- 8005696: d0f0 beq.n 800567a <create_name+0x42>
- break;
- 8005698: e02a b.n 80056f0 <create_name+0xb8>
- }
- if (di >= _MAX_LFN) return FR_INVALID_NAME; /* Reject too long name */
- 800569a: 697b ldr r3, [r7, #20]
- 800569c: 2bfe cmp r3, #254 ; 0xfe
- 800569e: d901 bls.n 80056a4 <create_name+0x6c>
- 80056a0: 2306 movs r3, #6
- 80056a2: e177 b.n 8005994 <create_name+0x35c>
- #if !_LFN_UNICODE
- w &= 0xFF;
- 80056a4: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80056a6: b2db uxtb r3, r3
- 80056a8: 84bb strh r3, [r7, #36] ; 0x24
- if (IsDBCS1(w)) { /* Check if it is a DBC 1st byte (always false on SBCS cfg) */
- b = (BYTE)p[si++]; /* Get 2nd byte */
- w = (w << 8) + b; /* Create a DBC */
- if (!IsDBCS2(b)) return FR_INVALID_NAME; /* Reject invalid sequence */
- }
- w = ff_convert(w, 1); /* Convert ANSI/OEM to Unicode */
- 80056aa: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80056ac: 2101 movs r1, #1
- 80056ae: 4618 mov r0, r3
- 80056b0: f001 fcac bl 800700c <ff_convert>
- 80056b4: 4603 mov r3, r0
- 80056b6: 84bb strh r3, [r7, #36] ; 0x24
- if (!w) return FR_INVALID_NAME; /* Reject invalid code */
- 80056b8: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80056ba: 2b00 cmp r3, #0
- 80056bc: d101 bne.n 80056c2 <create_name+0x8a>
- 80056be: 2306 movs r3, #6
- 80056c0: e168 b.n 8005994 <create_name+0x35c>
- #endif
- if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) return FR_INVALID_NAME; /* Reject illegal characters for LFN */
- 80056c2: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80056c4: 2b7f cmp r3, #127 ; 0x7f
- 80056c6: d809 bhi.n 80056dc <create_name+0xa4>
- 80056c8: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80056ca: 4619 mov r1, r3
- 80056cc: 48b3 ldr r0, [pc, #716] ; (800599c <create_name+0x364>)
- 80056ce: f7fe fcf4 bl 80040ba <chk_chr>
- 80056d2: 4603 mov r3, r0
- 80056d4: 2b00 cmp r3, #0
- 80056d6: d001 beq.n 80056dc <create_name+0xa4>
- 80056d8: 2306 movs r3, #6
- 80056da: e15b b.n 8005994 <create_name+0x35c>
- lfn[di++] = w; /* Store the Unicode character */
- 80056dc: 697b ldr r3, [r7, #20]
- 80056de: 1c5a adds r2, r3, #1
- 80056e0: 617a str r2, [r7, #20]
- 80056e2: 005b lsls r3, r3, #1
- 80056e4: 68fa ldr r2, [r7, #12]
- 80056e6: 4413 add r3, r2
- 80056e8: 8cba ldrh r2, [r7, #36] ; 0x24
- 80056ea: 801a strh r2, [r3, #0]
- w = p[si++]; /* Get a character */
- 80056ec: e7b4 b.n 8005658 <create_name+0x20>
- if (w < ' ') break; /* Break if end of the path name */
- 80056ee: bf00 nop
- }
- *path = &p[si]; /* Return pointer to the next segment */
- 80056f0: 693a ldr r2, [r7, #16]
- 80056f2: 69bb ldr r3, [r7, #24]
- 80056f4: 441a add r2, r3
- 80056f6: 683b ldr r3, [r7, #0]
- 80056f8: 601a str r2, [r3, #0]
- cf = (w < ' ') ? NS_LAST : 0; /* Set last segment flag if end of the path */
- 80056fa: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80056fc: 2b1f cmp r3, #31
- 80056fe: d801 bhi.n 8005704 <create_name+0xcc>
- 8005700: 2304 movs r3, #4
- 8005702: e000 b.n 8005706 <create_name+0xce>
- 8005704: 2300 movs r3, #0
- 8005706: f887 3027 strb.w r3, [r7, #39] ; 0x27
- dp->fn[i] = (i < di) ? '.' : ' ';
- dp->fn[i] = cf | NS_DOT; /* This is a dot entry */
- return FR_OK;
- }
- #endif
- while (di) { /* Snip off trailing spaces and dots if exist */
- 800570a: e011 b.n 8005730 <create_name+0xf8>
- w = lfn[di - 1];
- 800570c: 697b ldr r3, [r7, #20]
- 800570e: f103 4300 add.w r3, r3, #2147483648 ; 0x80000000
- 8005712: 3b01 subs r3, #1
- 8005714: 005b lsls r3, r3, #1
- 8005716: 68fa ldr r2, [r7, #12]
- 8005718: 4413 add r3, r2
- 800571a: 881b ldrh r3, [r3, #0]
- 800571c: 84bb strh r3, [r7, #36] ; 0x24
- if (w != ' ' && w != '.') break;
- 800571e: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005720: 2b20 cmp r3, #32
- 8005722: d002 beq.n 800572a <create_name+0xf2>
- 8005724: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005726: 2b2e cmp r3, #46 ; 0x2e
- 8005728: d106 bne.n 8005738 <create_name+0x100>
- di--;
- 800572a: 697b ldr r3, [r7, #20]
- 800572c: 3b01 subs r3, #1
- 800572e: 617b str r3, [r7, #20]
- while (di) { /* Snip off trailing spaces and dots if exist */
- 8005730: 697b ldr r3, [r7, #20]
- 8005732: 2b00 cmp r3, #0
- 8005734: d1ea bne.n 800570c <create_name+0xd4>
- 8005736: e000 b.n 800573a <create_name+0x102>
- if (w != ' ' && w != '.') break;
- 8005738: bf00 nop
- }
- lfn[di] = 0; /* LFN is created */
- 800573a: 697b ldr r3, [r7, #20]
- 800573c: 005b lsls r3, r3, #1
- 800573e: 68fa ldr r2, [r7, #12]
- 8005740: 4413 add r3, r2
- 8005742: 2200 movs r2, #0
- 8005744: 801a strh r2, [r3, #0]
- if (di == 0) return FR_INVALID_NAME; /* Reject nul name */
- 8005746: 697b ldr r3, [r7, #20]
- 8005748: 2b00 cmp r3, #0
- 800574a: d101 bne.n 8005750 <create_name+0x118>
- 800574c: 2306 movs r3, #6
- 800574e: e121 b.n 8005994 <create_name+0x35c>
-
- /* Create SFN in directory form */
- mem_set(dp->fn, ' ', 11);
- 8005750: 687b ldr r3, [r7, #4]
- 8005752: 3324 adds r3, #36 ; 0x24
- 8005754: 220b movs r2, #11
- 8005756: 2120 movs r1, #32
- 8005758: 4618 mov r0, r3
- 800575a: f7fe fc6f bl 800403c <mem_set>
- for (si = 0; lfn[si] == ' ' || lfn[si] == '.'; si++) ; /* Strip leading spaces and dots */
- 800575e: 2300 movs r3, #0
- 8005760: 61bb str r3, [r7, #24]
- 8005762: e002 b.n 800576a <create_name+0x132>
- 8005764: 69bb ldr r3, [r7, #24]
- 8005766: 3301 adds r3, #1
- 8005768: 61bb str r3, [r7, #24]
- 800576a: 69bb ldr r3, [r7, #24]
- 800576c: 005b lsls r3, r3, #1
- 800576e: 68fa ldr r2, [r7, #12]
- 8005770: 4413 add r3, r2
- 8005772: 881b ldrh r3, [r3, #0]
- 8005774: 2b20 cmp r3, #32
- 8005776: d0f5 beq.n 8005764 <create_name+0x12c>
- 8005778: 69bb ldr r3, [r7, #24]
- 800577a: 005b lsls r3, r3, #1
- 800577c: 68fa ldr r2, [r7, #12]
- 800577e: 4413 add r3, r2
- 8005780: 881b ldrh r3, [r3, #0]
- 8005782: 2b2e cmp r3, #46 ; 0x2e
- 8005784: d0ee beq.n 8005764 <create_name+0x12c>
- if (si) cf |= NS_LOSS | NS_LFN;
- 8005786: 69bb ldr r3, [r7, #24]
- 8005788: 2b00 cmp r3, #0
- 800578a: d009 beq.n 80057a0 <create_name+0x168>
- 800578c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 8005790: f043 0303 orr.w r3, r3, #3
- 8005794: f887 3027 strb.w r3, [r7, #39] ; 0x27
- while (di && lfn[di - 1] != '.') di--; /* Find extension (di<=si: no extension) */
- 8005798: e002 b.n 80057a0 <create_name+0x168>
- 800579a: 697b ldr r3, [r7, #20]
- 800579c: 3b01 subs r3, #1
- 800579e: 617b str r3, [r7, #20]
- 80057a0: 697b ldr r3, [r7, #20]
- 80057a2: 2b00 cmp r3, #0
- 80057a4: d009 beq.n 80057ba <create_name+0x182>
- 80057a6: 697b ldr r3, [r7, #20]
- 80057a8: f103 4300 add.w r3, r3, #2147483648 ; 0x80000000
- 80057ac: 3b01 subs r3, #1
- 80057ae: 005b lsls r3, r3, #1
- 80057b0: 68fa ldr r2, [r7, #12]
- 80057b2: 4413 add r3, r2
- 80057b4: 881b ldrh r3, [r3, #0]
- 80057b6: 2b2e cmp r3, #46 ; 0x2e
- 80057b8: d1ef bne.n 800579a <create_name+0x162>
-
- i = b = 0; ni = 8;
- 80057ba: 2300 movs r3, #0
- 80057bc: f887 3026 strb.w r3, [r7, #38] ; 0x26
- 80057c0: 2300 movs r3, #0
- 80057c2: 623b str r3, [r7, #32]
- 80057c4: 2308 movs r3, #8
- 80057c6: 61fb str r3, [r7, #28]
- for (;;) {
- w = lfn[si++]; /* Get an LFN character */
- 80057c8: 69bb ldr r3, [r7, #24]
- 80057ca: 1c5a adds r2, r3, #1
- 80057cc: 61ba str r2, [r7, #24]
- 80057ce: 005b lsls r3, r3, #1
- 80057d0: 68fa ldr r2, [r7, #12]
- 80057d2: 4413 add r3, r2
- 80057d4: 881b ldrh r3, [r3, #0]
- 80057d6: 84bb strh r3, [r7, #36] ; 0x24
- if (!w) break; /* Break on end of the LFN */
- 80057d8: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80057da: 2b00 cmp r3, #0
- 80057dc: f000 8090 beq.w 8005900 <create_name+0x2c8>
- if (w == ' ' || (w == '.' && si != di)) { /* Remove spaces and dots */
- 80057e0: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80057e2: 2b20 cmp r3, #32
- 80057e4: d006 beq.n 80057f4 <create_name+0x1bc>
- 80057e6: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80057e8: 2b2e cmp r3, #46 ; 0x2e
- 80057ea: d10a bne.n 8005802 <create_name+0x1ca>
- 80057ec: 69ba ldr r2, [r7, #24]
- 80057ee: 697b ldr r3, [r7, #20]
- 80057f0: 429a cmp r2, r3
- 80057f2: d006 beq.n 8005802 <create_name+0x1ca>
- cf |= NS_LOSS | NS_LFN; continue;
- 80057f4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 80057f8: f043 0303 orr.w r3, r3, #3
- 80057fc: f887 3027 strb.w r3, [r7, #39] ; 0x27
- 8005800: e07d b.n 80058fe <create_name+0x2c6>
- }
-
- if (i >= ni || si == di) { /* Extension or end of SFN */
- 8005802: 6a3a ldr r2, [r7, #32]
- 8005804: 69fb ldr r3, [r7, #28]
- 8005806: 429a cmp r2, r3
- 8005808: d203 bcs.n 8005812 <create_name+0x1da>
- 800580a: 69ba ldr r2, [r7, #24]
- 800580c: 697b ldr r3, [r7, #20]
- 800580e: 429a cmp r2, r3
- 8005810: d123 bne.n 800585a <create_name+0x222>
- if (ni == 11) { /* Long extension */
- 8005812: 69fb ldr r3, [r7, #28]
- 8005814: 2b0b cmp r3, #11
- 8005816: d106 bne.n 8005826 <create_name+0x1ee>
- cf |= NS_LOSS | NS_LFN; break;
- 8005818: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 800581c: f043 0303 orr.w r3, r3, #3
- 8005820: f887 3027 strb.w r3, [r7, #39] ; 0x27
- 8005824: e06f b.n 8005906 <create_name+0x2ce>
- }
- if (si != di) cf |= NS_LOSS | NS_LFN; /* Out of 8.3 format */
- 8005826: 69ba ldr r2, [r7, #24]
- 8005828: 697b ldr r3, [r7, #20]
- 800582a: 429a cmp r2, r3
- 800582c: d005 beq.n 800583a <create_name+0x202>
- 800582e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 8005832: f043 0303 orr.w r3, r3, #3
- 8005836: f887 3027 strb.w r3, [r7, #39] ; 0x27
- if (si > di) break; /* No extension */
- 800583a: 69ba ldr r2, [r7, #24]
- 800583c: 697b ldr r3, [r7, #20]
- 800583e: 429a cmp r2, r3
- 8005840: d860 bhi.n 8005904 <create_name+0x2cc>
- si = di; i = 8; ni = 11; /* Enter extension section */
- 8005842: 697b ldr r3, [r7, #20]
- 8005844: 61bb str r3, [r7, #24]
- 8005846: 2308 movs r3, #8
- 8005848: 623b str r3, [r7, #32]
- 800584a: 230b movs r3, #11
- 800584c: 61fb str r3, [r7, #28]
- b <<= 2; continue;
- 800584e: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 8005852: 009b lsls r3, r3, #2
- 8005854: f887 3026 strb.w r3, [r7, #38] ; 0x26
- 8005858: e051 b.n 80058fe <create_name+0x2c6>
- }
-
- if (w >= 0x80) { /* Non ASCII character */
- 800585a: 8cbb ldrh r3, [r7, #36] ; 0x24
- 800585c: 2b7f cmp r3, #127 ; 0x7f
- 800585e: d914 bls.n 800588a <create_name+0x252>
- #ifdef _EXCVT
- w = ff_convert(w, 0); /* Unicode -> OEM code */
- 8005860: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005862: 2100 movs r1, #0
- 8005864: 4618 mov r0, r3
- 8005866: f001 fbd1 bl 800700c <ff_convert>
- 800586a: 4603 mov r3, r0
- 800586c: 84bb strh r3, [r7, #36] ; 0x24
- if (w) w = ExCvt[w - 0x80]; /* Convert extended character to upper (SBCS) */
- 800586e: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005870: 2b00 cmp r3, #0
- 8005872: d004 beq.n 800587e <create_name+0x246>
- 8005874: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005876: 3b80 subs r3, #128 ; 0x80
- 8005878: 4a49 ldr r2, [pc, #292] ; (80059a0 <create_name+0x368>)
- 800587a: 5cd3 ldrb r3, [r2, r3]
- 800587c: 84bb strh r3, [r7, #36] ; 0x24
- #else
- w = ff_convert(ff_wtoupper(w), 0); /* Upper converted Unicode -> OEM code */
- #endif
- cf |= NS_LFN; /* Force create LFN entry */
- 800587e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 8005882: f043 0302 orr.w r3, r3, #2
- 8005886: f887 3027 strb.w r3, [r7, #39] ; 0x27
- if (i >= ni - 1) {
- cf |= NS_LOSS | NS_LFN; i = ni; continue;
- }
- dp->fn[i++] = (BYTE)(w >> 8);
- } else { /* SBC */
- if (!w || chk_chr("+,;=[]", w)) { /* Replace illegal characters for SFN */
- 800588a: 8cbb ldrh r3, [r7, #36] ; 0x24
- 800588c: 2b00 cmp r3, #0
- 800588e: d007 beq.n 80058a0 <create_name+0x268>
- 8005890: 8cbb ldrh r3, [r7, #36] ; 0x24
- 8005892: 4619 mov r1, r3
- 8005894: 4843 ldr r0, [pc, #268] ; (80059a4 <create_name+0x36c>)
- 8005896: f7fe fc10 bl 80040ba <chk_chr>
- 800589a: 4603 mov r3, r0
- 800589c: 2b00 cmp r3, #0
- 800589e: d008 beq.n 80058b2 <create_name+0x27a>
- w = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */
- 80058a0: 235f movs r3, #95 ; 0x5f
- 80058a2: 84bb strh r3, [r7, #36] ; 0x24
- 80058a4: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 80058a8: f043 0303 orr.w r3, r3, #3
- 80058ac: f887 3027 strb.w r3, [r7, #39] ; 0x27
- 80058b0: e01b b.n 80058ea <create_name+0x2b2>
- } else {
- if (IsUpper(w)) { /* ASCII large capital */
- 80058b2: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80058b4: 2b40 cmp r3, #64 ; 0x40
- 80058b6: d909 bls.n 80058cc <create_name+0x294>
- 80058b8: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80058ba: 2b5a cmp r3, #90 ; 0x5a
- 80058bc: d806 bhi.n 80058cc <create_name+0x294>
- b |= 2;
- 80058be: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 80058c2: f043 0302 orr.w r3, r3, #2
- 80058c6: f887 3026 strb.w r3, [r7, #38] ; 0x26
- 80058ca: e00e b.n 80058ea <create_name+0x2b2>
- } else {
- if (IsLower(w)) { /* ASCII small capital */
- 80058cc: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80058ce: 2b60 cmp r3, #96 ; 0x60
- 80058d0: d90b bls.n 80058ea <create_name+0x2b2>
- 80058d2: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80058d4: 2b7a cmp r3, #122 ; 0x7a
- 80058d6: d808 bhi.n 80058ea <create_name+0x2b2>
- b |= 1; w -= 0x20;
- 80058d8: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 80058dc: f043 0301 orr.w r3, r3, #1
- 80058e0: f887 3026 strb.w r3, [r7, #38] ; 0x26
- 80058e4: 8cbb ldrh r3, [r7, #36] ; 0x24
- 80058e6: 3b20 subs r3, #32
- 80058e8: 84bb strh r3, [r7, #36] ; 0x24
- }
- }
- }
- }
- dp->fn[i++] = (BYTE)w;
- 80058ea: 6a3b ldr r3, [r7, #32]
- 80058ec: 1c5a adds r2, r3, #1
- 80058ee: 623a str r2, [r7, #32]
- 80058f0: 8cba ldrh r2, [r7, #36] ; 0x24
- 80058f2: b2d1 uxtb r1, r2
- 80058f4: 687a ldr r2, [r7, #4]
- 80058f6: 4413 add r3, r2
- 80058f8: 460a mov r2, r1
- 80058fa: f883 2024 strb.w r2, [r3, #36] ; 0x24
- w = lfn[si++]; /* Get an LFN character */
- 80058fe: e763 b.n 80057c8 <create_name+0x190>
- if (!w) break; /* Break on end of the LFN */
- 8005900: bf00 nop
- 8005902: e000 b.n 8005906 <create_name+0x2ce>
- if (si > di) break; /* No extension */
- 8005904: bf00 nop
- }
-
- if (dp->fn[0] == DDEM) dp->fn[0] = RDDEM; /* If the first character collides with DDEM, replace it with RDDEM */
- 8005906: 687b ldr r3, [r7, #4]
- 8005908: f893 3024 ldrb.w r3, [r3, #36] ; 0x24
- 800590c: 2be5 cmp r3, #229 ; 0xe5
- 800590e: d103 bne.n 8005918 <create_name+0x2e0>
- 8005910: 687b ldr r3, [r7, #4]
- 8005912: 2205 movs r2, #5
- 8005914: f883 2024 strb.w r2, [r3, #36] ; 0x24
-
- if (ni == 8) b <<= 2;
- 8005918: 69fb ldr r3, [r7, #28]
- 800591a: 2b08 cmp r3, #8
- 800591c: d104 bne.n 8005928 <create_name+0x2f0>
- 800591e: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 8005922: 009b lsls r3, r3, #2
- 8005924: f887 3026 strb.w r3, [r7, #38] ; 0x26
- if ((b & 0x0C) == 0x0C || (b & 0x03) == 0x03) cf |= NS_LFN; /* Create LFN entry when there are composite capitals */
- 8005928: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 800592c: f003 030c and.w r3, r3, #12
- 8005930: 2b0c cmp r3, #12
- 8005932: d005 beq.n 8005940 <create_name+0x308>
- 8005934: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 8005938: f003 0303 and.w r3, r3, #3
- 800593c: 2b03 cmp r3, #3
- 800593e: d105 bne.n 800594c <create_name+0x314>
- 8005940: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 8005944: f043 0302 orr.w r3, r3, #2
- 8005948: f887 3027 strb.w r3, [r7, #39] ; 0x27
- if (!(cf & NS_LFN)) { /* When LFN is in 8.3 format without extended character, NT flags are created */
- 800594c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 8005950: f003 0302 and.w r3, r3, #2
- 8005954: 2b00 cmp r3, #0
- 8005956: d117 bne.n 8005988 <create_name+0x350>
- if ((b & 0x03) == 0x01) cf |= NS_EXT; /* NT flag (Extension has only small capital) */
- 8005958: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 800595c: f003 0303 and.w r3, r3, #3
- 8005960: 2b01 cmp r3, #1
- 8005962: d105 bne.n 8005970 <create_name+0x338>
- 8005964: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 8005968: f043 0310 orr.w r3, r3, #16
- 800596c: f887 3027 strb.w r3, [r7, #39] ; 0x27
- if ((b & 0x0C) == 0x04) cf |= NS_BODY; /* NT flag (Filename has only small capital) */
- 8005970: f897 3026 ldrb.w r3, [r7, #38] ; 0x26
- 8005974: f003 030c and.w r3, r3, #12
- 8005978: 2b04 cmp r3, #4
- 800597a: d105 bne.n 8005988 <create_name+0x350>
- 800597c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27
- 8005980: f043 0308 orr.w r3, r3, #8
- 8005984: f887 3027 strb.w r3, [r7, #39] ; 0x27
- }
-
- dp->fn[NSFLAG] = cf; /* SFN is created */
- 8005988: 687b ldr r3, [r7, #4]
- 800598a: f897 2027 ldrb.w r2, [r7, #39] ; 0x27
- 800598e: f883 202f strb.w r2, [r3, #47] ; 0x2f
-
- return FR_OK;
- 8005992: 2300 movs r3, #0
- if (sfn[0] == DDEM) sfn[0] = RDDEM; /* If the first character collides with DDEM, replace it with RDDEM */
- sfn[NSFLAG] = (c <= ' ') ? NS_LAST : 0; /* Set last segment flag if end of the path */
-
- return FR_OK;
- #endif /* _USE_LFN != 0 */
- }
- 8005994: 4618 mov r0, r3
- 8005996: 3728 adds r7, #40 ; 0x28
- 8005998: 46bd mov sp, r7
- 800599a: bd80 pop {r7, pc}
- 800599c: 08007b18 .word 0x08007b18
- 80059a0: 08007b84 .word 0x08007b84
- 80059a4: 08007b24 .word 0x08007b24
-
- 080059a8 <follow_path>:
- static
- FRESULT follow_path ( /* FR_OK(0): successful, !=0: error code */
- DIR* dp, /* Directory object to return last directory and found object */
- const TCHAR* path /* Full-path string to find a file or directory */
- )
- {
- 80059a8: b580 push {r7, lr}
- 80059aa: b086 sub sp, #24
- 80059ac: af00 add r7, sp, #0
- 80059ae: 6078 str r0, [r7, #4]
- 80059b0: 6039 str r1, [r7, #0]
- FRESULT res;
- BYTE ns;
- _FDID *obj = &dp->obj;
- 80059b2: 687b ldr r3, [r7, #4]
- 80059b4: 613b str r3, [r7, #16]
- FATFS *fs = obj->fs;
- 80059b6: 693b ldr r3, [r7, #16]
- 80059b8: 681b ldr r3, [r3, #0]
- 80059ba: 60fb str r3, [r7, #12]
- if (*path != '/' && *path != '\\') { /* Without heading separator */
- obj->sclust = fs->cdir; /* Start from current directory */
- } else
- #endif
- { /* With heading separator */
- while (*path == '/' || *path == '\\') path++; /* Strip heading separator */
- 80059bc: e002 b.n 80059c4 <follow_path+0x1c>
- 80059be: 683b ldr r3, [r7, #0]
- 80059c0: 3301 adds r3, #1
- 80059c2: 603b str r3, [r7, #0]
- 80059c4: 683b ldr r3, [r7, #0]
- 80059c6: 781b ldrb r3, [r3, #0]
- 80059c8: 2b2f cmp r3, #47 ; 0x2f
- 80059ca: d0f8 beq.n 80059be <follow_path+0x16>
- 80059cc: 683b ldr r3, [r7, #0]
- 80059ce: 781b ldrb r3, [r3, #0]
- 80059d0: 2b5c cmp r3, #92 ; 0x5c
- 80059d2: d0f4 beq.n 80059be <follow_path+0x16>
- obj->sclust = 0; /* Start from root directory */
- 80059d4: 693b ldr r3, [r7, #16]
- 80059d6: 2200 movs r2, #0
- 80059d8: 609a str r2, [r3, #8]
- obj->stat = fs->dirbuf[XDIR_GenFlags] & 2;
- }
- #endif
- #endif
-
- if ((UINT)*path < ' ') { /* Null path name is the origin directory itself */
- 80059da: 683b ldr r3, [r7, #0]
- 80059dc: 781b ldrb r3, [r3, #0]
- 80059de: 2b1f cmp r3, #31
- 80059e0: d80a bhi.n 80059f8 <follow_path+0x50>
- dp->fn[NSFLAG] = NS_NONAME;
- 80059e2: 687b ldr r3, [r7, #4]
- 80059e4: 2280 movs r2, #128 ; 0x80
- 80059e6: f883 202f strb.w r2, [r3, #47] ; 0x2f
- res = dir_sdi(dp, 0);
- 80059ea: 2100 movs r1, #0
- 80059ec: 6878 ldr r0, [r7, #4]
- 80059ee: f7ff f8fe bl 8004bee <dir_sdi>
- 80059f2: 4603 mov r3, r0
- 80059f4: 75fb strb r3, [r7, #23]
- 80059f6: e048 b.n 8005a8a <follow_path+0xe2>
-
- } else { /* Follow path */
- for (;;) {
- res = create_name(dp, &path); /* Get a segment name of the path */
- 80059f8: 463b mov r3, r7
- 80059fa: 4619 mov r1, r3
- 80059fc: 6878 ldr r0, [r7, #4]
- 80059fe: f7ff fe1b bl 8005638 <create_name>
- 8005a02: 4603 mov r3, r0
- 8005a04: 75fb strb r3, [r7, #23]
- if (res != FR_OK) break;
- 8005a06: 7dfb ldrb r3, [r7, #23]
- 8005a08: 2b00 cmp r3, #0
- 8005a0a: d139 bne.n 8005a80 <follow_path+0xd8>
- res = dir_find(dp); /* Find an object with the segment name */
- 8005a0c: 6878 ldr r0, [r7, #4]
- 8005a0e: f7ff fc5a bl 80052c6 <dir_find>
- 8005a12: 4603 mov r3, r0
- 8005a14: 75fb strb r3, [r7, #23]
- ns = dp->fn[NSFLAG];
- 8005a16: 687b ldr r3, [r7, #4]
- 8005a18: f893 302f ldrb.w r3, [r3, #47] ; 0x2f
- 8005a1c: 72fb strb r3, [r7, #11]
- if (res != FR_OK) { /* Failed to find the object */
- 8005a1e: 7dfb ldrb r3, [r7, #23]
- 8005a20: 2b00 cmp r3, #0
- 8005a22: d00a beq.n 8005a3a <follow_path+0x92>
- if (res == FR_NO_FILE) { /* Object is not found */
- 8005a24: 7dfb ldrb r3, [r7, #23]
- 8005a26: 2b04 cmp r3, #4
- 8005a28: d12c bne.n 8005a84 <follow_path+0xdc>
- if (_FS_RPATH && (ns & NS_DOT)) { /* If dot entry is not exist, stay there */
- if (!(ns & NS_LAST)) continue; /* Continue to follow if not last segment */
- dp->fn[NSFLAG] = NS_NONAME;
- res = FR_OK;
- } else { /* Could not find the object */
- if (!(ns & NS_LAST)) res = FR_NO_PATH; /* Adjust error code if not last segment */
- 8005a2a: 7afb ldrb r3, [r7, #11]
- 8005a2c: f003 0304 and.w r3, r3, #4
- 8005a30: 2b00 cmp r3, #0
- 8005a32: d127 bne.n 8005a84 <follow_path+0xdc>
- 8005a34: 2305 movs r3, #5
- 8005a36: 75fb strb r3, [r7, #23]
- }
- }
- break;
- 8005a38: e024 b.n 8005a84 <follow_path+0xdc>
- }
- if (ns & NS_LAST) break; /* Last segment matched. Function completed. */
- 8005a3a: 7afb ldrb r3, [r7, #11]
- 8005a3c: f003 0304 and.w r3, r3, #4
- 8005a40: 2b00 cmp r3, #0
- 8005a42: d121 bne.n 8005a88 <follow_path+0xe0>
- /* Get into the sub-directory */
- if (!(obj->attr & AM_DIR)) { /* It is not a sub-directory and cannot follow */
- 8005a44: 693b ldr r3, [r7, #16]
- 8005a46: 799b ldrb r3, [r3, #6]
- 8005a48: f003 0310 and.w r3, r3, #16
- 8005a4c: 2b00 cmp r3, #0
- 8005a4e: d102 bne.n 8005a56 <follow_path+0xae>
- res = FR_NO_PATH; break;
- 8005a50: 2305 movs r3, #5
- 8005a52: 75fb strb r3, [r7, #23]
- 8005a54: e019 b.n 8005a8a <follow_path+0xe2>
- obj->stat = fs->dirbuf[XDIR_GenFlags] & 2;
- obj->objsize = ld_qword(fs->dirbuf + XDIR_FileSize);
- } else
- #endif
- {
- obj->sclust = ld_clust(fs, fs->win + dp->dptr % SS(fs)); /* Open next directory */
- 8005a56: 68fb ldr r3, [r7, #12]
- 8005a58: f103 0138 add.w r1, r3, #56 ; 0x38
- 8005a5c: 687b ldr r3, [r7, #4]
- 8005a5e: 695b ldr r3, [r3, #20]
- 8005a60: 68fa ldr r2, [r7, #12]
- 8005a62: 8992 ldrh r2, [r2, #12]
- 8005a64: fbb3 f0f2 udiv r0, r3, r2
- 8005a68: fb02 f200 mul.w r2, r2, r0
- 8005a6c: 1a9b subs r3, r3, r2
- 8005a6e: 440b add r3, r1
- 8005a70: 4619 mov r1, r3
- 8005a72: 68f8 ldr r0, [r7, #12]
- 8005a74: f7ff fa61 bl 8004f3a <ld_clust>
- 8005a78: 4602 mov r2, r0
- 8005a7a: 693b ldr r3, [r7, #16]
- 8005a7c: 609a str r2, [r3, #8]
- res = create_name(dp, &path); /* Get a segment name of the path */
- 8005a7e: e7bb b.n 80059f8 <follow_path+0x50>
- if (res != FR_OK) break;
- 8005a80: bf00 nop
- 8005a82: e002 b.n 8005a8a <follow_path+0xe2>
- break;
- 8005a84: bf00 nop
- 8005a86: e000 b.n 8005a8a <follow_path+0xe2>
- if (ns & NS_LAST) break; /* Last segment matched. Function completed. */
- 8005a88: bf00 nop
- }
- }
- }
-
- return res;
- 8005a8a: 7dfb ldrb r3, [r7, #23]
- }
- 8005a8c: 4618 mov r0, r3
- 8005a8e: 3718 adds r7, #24
- 8005a90: 46bd mov sp, r7
- 8005a92: bd80 pop {r7, pc}
-
- 08005a94 <get_ldnumber>:
-
- static
- int get_ldnumber ( /* Returns logical drive number (-1:invalid drive) */
- const TCHAR** path /* Pointer to pointer to the path name */
- )
- {
- 8005a94: b480 push {r7}
- 8005a96: b087 sub sp, #28
- 8005a98: af00 add r7, sp, #0
- 8005a9a: 6078 str r0, [r7, #4]
- const TCHAR *tp, *tt;
- UINT i;
- int vol = -1;
- 8005a9c: f04f 33ff mov.w r3, #4294967295
- 8005aa0: 613b str r3, [r7, #16]
- char c;
- TCHAR tc;
- #endif
-
-
- if (*path) { /* If the pointer is not a null */
- 8005aa2: 687b ldr r3, [r7, #4]
- 8005aa4: 681b ldr r3, [r3, #0]
- 8005aa6: 2b00 cmp r3, #0
- 8005aa8: d031 beq.n 8005b0e <get_ldnumber+0x7a>
- for (tt = *path; (UINT)*tt >= (_USE_LFN ? ' ' : '!') && *tt != ':'; tt++) ; /* Find ':' in the path */
- 8005aaa: 687b ldr r3, [r7, #4]
- 8005aac: 681b ldr r3, [r3, #0]
- 8005aae: 617b str r3, [r7, #20]
- 8005ab0: e002 b.n 8005ab8 <get_ldnumber+0x24>
- 8005ab2: 697b ldr r3, [r7, #20]
- 8005ab4: 3301 adds r3, #1
- 8005ab6: 617b str r3, [r7, #20]
- 8005ab8: 697b ldr r3, [r7, #20]
- 8005aba: 781b ldrb r3, [r3, #0]
- 8005abc: 2b1f cmp r3, #31
- 8005abe: d903 bls.n 8005ac8 <get_ldnumber+0x34>
- 8005ac0: 697b ldr r3, [r7, #20]
- 8005ac2: 781b ldrb r3, [r3, #0]
- 8005ac4: 2b3a cmp r3, #58 ; 0x3a
- 8005ac6: d1f4 bne.n 8005ab2 <get_ldnumber+0x1e>
- if (*tt == ':') { /* If a ':' is exist in the path name */
- 8005ac8: 697b ldr r3, [r7, #20]
- 8005aca: 781b ldrb r3, [r3, #0]
- 8005acc: 2b3a cmp r3, #58 ; 0x3a
- 8005ace: d11c bne.n 8005b0a <get_ldnumber+0x76>
- tp = *path;
- 8005ad0: 687b ldr r3, [r7, #4]
- 8005ad2: 681b ldr r3, [r3, #0]
- 8005ad4: 60fb str r3, [r7, #12]
- i = *tp++ - '0';
- 8005ad6: 68fb ldr r3, [r7, #12]
- 8005ad8: 1c5a adds r2, r3, #1
- 8005ada: 60fa str r2, [r7, #12]
- 8005adc: 781b ldrb r3, [r3, #0]
- 8005ade: 3b30 subs r3, #48 ; 0x30
- 8005ae0: 60bb str r3, [r7, #8]
- if (i < 10 && tp == tt) { /* Is there a numeric drive id? */
- 8005ae2: 68bb ldr r3, [r7, #8]
- 8005ae4: 2b09 cmp r3, #9
- 8005ae6: d80e bhi.n 8005b06 <get_ldnumber+0x72>
- 8005ae8: 68fa ldr r2, [r7, #12]
- 8005aea: 697b ldr r3, [r7, #20]
- 8005aec: 429a cmp r2, r3
- 8005aee: d10a bne.n 8005b06 <get_ldnumber+0x72>
- if (i < _VOLUMES) { /* If a drive id is found, get the value and strip it */
- 8005af0: 68bb ldr r3, [r7, #8]
- 8005af2: 2b00 cmp r3, #0
- 8005af4: d107 bne.n 8005b06 <get_ldnumber+0x72>
- vol = (int)i;
- 8005af6: 68bb ldr r3, [r7, #8]
- 8005af8: 613b str r3, [r7, #16]
- *path = ++tt;
- 8005afa: 697b ldr r3, [r7, #20]
- 8005afc: 3301 adds r3, #1
- 8005afe: 617b str r3, [r7, #20]
- 8005b00: 687b ldr r3, [r7, #4]
- 8005b02: 697a ldr r2, [r7, #20]
- 8005b04: 601a str r2, [r3, #0]
- vol = (int)i;
- *path = tt;
- }
- }
- #endif
- return vol;
- 8005b06: 693b ldr r3, [r7, #16]
- 8005b08: e002 b.n 8005b10 <get_ldnumber+0x7c>
- }
- #if _FS_RPATH != 0 && _VOLUMES >= 2
- vol = CurrVol; /* Current drive */
- #else
- vol = 0; /* Drive 0 */
- 8005b0a: 2300 movs r3, #0
- 8005b0c: 613b str r3, [r7, #16]
- #endif
- }
- return vol;
- 8005b0e: 693b ldr r3, [r7, #16]
- }
- 8005b10: 4618 mov r0, r3
- 8005b12: 371c adds r7, #28
- 8005b14: 46bd mov sp, r7
- 8005b16: bc80 pop {r7}
- 8005b18: 4770 bx lr
- ...
-
- 08005b1c <check_fs>:
- static
- BYTE check_fs ( /* 0:FAT, 1:exFAT, 2:Valid BS but not FAT, 3:Not a BS, 4:Disk error */
- FATFS* fs, /* File system object */
- DWORD sect /* Sector# (lba) to load and check if it is an FAT-VBR or not */
- )
- {
- 8005b1c: b580 push {r7, lr}
- 8005b1e: b082 sub sp, #8
- 8005b20: af00 add r7, sp, #0
- 8005b22: 6078 str r0, [r7, #4]
- 8005b24: 6039 str r1, [r7, #0]
- fs->wflag = 0; fs->winsect = 0xFFFFFFFF; /* Invaidate window */
- 8005b26: 687b ldr r3, [r7, #4]
- 8005b28: 2200 movs r2, #0
- 8005b2a: 70da strb r2, [r3, #3]
- 8005b2c: 687b ldr r3, [r7, #4]
- 8005b2e: f04f 32ff mov.w r2, #4294967295
- 8005b32: 635a str r2, [r3, #52] ; 0x34
- if (move_window(fs, sect) != FR_OK) return 4; /* Load boot record */
- 8005b34: 6839 ldr r1, [r7, #0]
- 8005b36: 6878 ldr r0, [r7, #4]
- 8005b38: f7fe fc82 bl 8004440 <move_window>
- 8005b3c: 4603 mov r3, r0
- 8005b3e: 2b00 cmp r3, #0
- 8005b40: d001 beq.n 8005b46 <check_fs+0x2a>
- 8005b42: 2304 movs r3, #4
- 8005b44: e038 b.n 8005bb8 <check_fs+0x9c>
-
- if (ld_word(fs->win + BS_55AA) != 0xAA55) return 3; /* Check boot record signature (always placed here even if the sector size is >512) */
- 8005b46: 687b ldr r3, [r7, #4]
- 8005b48: 3338 adds r3, #56 ; 0x38
- 8005b4a: f503 73ff add.w r3, r3, #510 ; 0x1fe
- 8005b4e: 4618 mov r0, r3
- 8005b50: f7fe f9d6 bl 8003f00 <ld_word>
- 8005b54: 4603 mov r3, r0
- 8005b56: 461a mov r2, r3
- 8005b58: f64a 2355 movw r3, #43605 ; 0xaa55
- 8005b5c: 429a cmp r2, r3
- 8005b5e: d001 beq.n 8005b64 <check_fs+0x48>
- 8005b60: 2303 movs r3, #3
- 8005b62: e029 b.n 8005bb8 <check_fs+0x9c>
-
- if (fs->win[BS_JmpBoot] == 0xE9 || (fs->win[BS_JmpBoot] == 0xEB && fs->win[BS_JmpBoot + 2] == 0x90)) {
- 8005b64: 687b ldr r3, [r7, #4]
- 8005b66: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
- 8005b6a: 2be9 cmp r3, #233 ; 0xe9
- 8005b6c: d009 beq.n 8005b82 <check_fs+0x66>
- 8005b6e: 687b ldr r3, [r7, #4]
- 8005b70: f893 3038 ldrb.w r3, [r3, #56] ; 0x38
- 8005b74: 2beb cmp r3, #235 ; 0xeb
- 8005b76: d11e bne.n 8005bb6 <check_fs+0x9a>
- 8005b78: 687b ldr r3, [r7, #4]
- 8005b7a: f893 303a ldrb.w r3, [r3, #58] ; 0x3a
- 8005b7e: 2b90 cmp r3, #144 ; 0x90
- 8005b80: d119 bne.n 8005bb6 <check_fs+0x9a>
- if ((ld_dword(fs->win + BS_FilSysType) & 0xFFFFFF) == 0x544146) return 0; /* Check "FAT" string */
- 8005b82: 687b ldr r3, [r7, #4]
- 8005b84: 3338 adds r3, #56 ; 0x38
- 8005b86: 3336 adds r3, #54 ; 0x36
- 8005b88: 4618 mov r0, r3
- 8005b8a: f7fe f9d0 bl 8003f2e <ld_dword>
- 8005b8e: 4603 mov r3, r0
- 8005b90: f023 437f bic.w r3, r3, #4278190080 ; 0xff000000
- 8005b94: 4a0a ldr r2, [pc, #40] ; (8005bc0 <check_fs+0xa4>)
- 8005b96: 4293 cmp r3, r2
- 8005b98: d101 bne.n 8005b9e <check_fs+0x82>
- 8005b9a: 2300 movs r3, #0
- 8005b9c: e00c b.n 8005bb8 <check_fs+0x9c>
- if (ld_dword(fs->win + BS_FilSysType32) == 0x33544146) return 0; /* Check "FAT3" string */
- 8005b9e: 687b ldr r3, [r7, #4]
- 8005ba0: 3338 adds r3, #56 ; 0x38
- 8005ba2: 3352 adds r3, #82 ; 0x52
- 8005ba4: 4618 mov r0, r3
- 8005ba6: f7fe f9c2 bl 8003f2e <ld_dword>
- 8005baa: 4602 mov r2, r0
- 8005bac: 4b05 ldr r3, [pc, #20] ; (8005bc4 <check_fs+0xa8>)
- 8005bae: 429a cmp r2, r3
- 8005bb0: d101 bne.n 8005bb6 <check_fs+0x9a>
- 8005bb2: 2300 movs r3, #0
- 8005bb4: e000 b.n 8005bb8 <check_fs+0x9c>
- }
- #if _FS_EXFAT
- if (!mem_cmp(fs->win + BS_JmpBoot, "\xEB\x76\x90" "EXFAT ", 11)) return 1;
- #endif
- return 2;
- 8005bb6: 2302 movs r3, #2
- }
- 8005bb8: 4618 mov r0, r3
- 8005bba: 3708 adds r7, #8
- 8005bbc: 46bd mov sp, r7
- 8005bbe: bd80 pop {r7, pc}
- 8005bc0: 00544146 .word 0x00544146
- 8005bc4: 33544146 .word 0x33544146
-
- 08005bc8 <find_volume>:
- FRESULT find_volume ( /* FR_OK(0): successful, !=0: any error occurred */
- const TCHAR** path, /* Pointer to pointer to the path name (drive number) */
- FATFS** rfs, /* Pointer to pointer to the found file system object */
- BYTE mode /* !=0: Check write protection for write access */
- )
- {
- 8005bc8: b580 push {r7, lr}
- 8005bca: b096 sub sp, #88 ; 0x58
- 8005bcc: af00 add r7, sp, #0
- 8005bce: 60f8 str r0, [r7, #12]
- 8005bd0: 60b9 str r1, [r7, #8]
- 8005bd2: 4613 mov r3, r2
- 8005bd4: 71fb strb r3, [r7, #7]
- FATFS *fs;
- UINT i;
-
-
- /* Get logical drive number */
- *rfs = 0;
- 8005bd6: 68bb ldr r3, [r7, #8]
- 8005bd8: 2200 movs r2, #0
- 8005bda: 601a str r2, [r3, #0]
- vol = get_ldnumber(path);
- 8005bdc: 68f8 ldr r0, [r7, #12]
- 8005bde: f7ff ff59 bl 8005a94 <get_ldnumber>
- 8005be2: 63f8 str r0, [r7, #60] ; 0x3c
- if (vol < 0) return FR_INVALID_DRIVE;
- 8005be4: 6bfb ldr r3, [r7, #60] ; 0x3c
- 8005be6: 2b00 cmp r3, #0
- 8005be8: da01 bge.n 8005bee <find_volume+0x26>
- 8005bea: 230b movs r3, #11
- 8005bec: e268 b.n 80060c0 <find_volume+0x4f8>
-
- /* Check if the file system object is valid or not */
- fs = FatFs[vol]; /* Get pointer to the file system object */
- 8005bee: 4ab0 ldr r2, [pc, #704] ; (8005eb0 <find_volume+0x2e8>)
- 8005bf0: 6bfb ldr r3, [r7, #60] ; 0x3c
- 8005bf2: f852 3023 ldr.w r3, [r2, r3, lsl #2]
- 8005bf6: 63bb str r3, [r7, #56] ; 0x38
- if (!fs) return FR_NOT_ENABLED; /* Is the file system object available? */
- 8005bf8: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005bfa: 2b00 cmp r3, #0
- 8005bfc: d101 bne.n 8005c02 <find_volume+0x3a>
- 8005bfe: 230c movs r3, #12
- 8005c00: e25e b.n 80060c0 <find_volume+0x4f8>
-
- ENTER_FF(fs); /* Lock the volume */
- *rfs = fs; /* Return pointer to the file system object */
- 8005c02: 68bb ldr r3, [r7, #8]
- 8005c04: 6bba ldr r2, [r7, #56] ; 0x38
- 8005c06: 601a str r2, [r3, #0]
-
- mode &= (BYTE)~FA_READ; /* Desired access mode, write access or not */
- 8005c08: 79fb ldrb r3, [r7, #7]
- 8005c0a: f023 0301 bic.w r3, r3, #1
- 8005c0e: 71fb strb r3, [r7, #7]
- if (fs->fs_type) { /* If the volume has been mounted */
- 8005c10: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005c12: 781b ldrb r3, [r3, #0]
- 8005c14: 2b00 cmp r3, #0
- 8005c16: d01a beq.n 8005c4e <find_volume+0x86>
- stat = disk_status(fs->drv);
- 8005c18: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005c1a: 785b ldrb r3, [r3, #1]
- 8005c1c: 4618 mov r0, r3
- 8005c1e: f7fe f8d1 bl 8003dc4 <disk_status>
- 8005c22: 4603 mov r3, r0
- 8005c24: f887 3037 strb.w r3, [r7, #55] ; 0x37
- if (!(stat & STA_NOINIT)) { /* and the physical drive is kept initialized */
- 8005c28: f897 3037 ldrb.w r3, [r7, #55] ; 0x37
- 8005c2c: f003 0301 and.w r3, r3, #1
- 8005c30: 2b00 cmp r3, #0
- 8005c32: d10c bne.n 8005c4e <find_volume+0x86>
- if (!_FS_READONLY && mode && (stat & STA_PROTECT)) { /* Check write protection if needed */
- 8005c34: 79fb ldrb r3, [r7, #7]
- 8005c36: 2b00 cmp r3, #0
- 8005c38: d007 beq.n 8005c4a <find_volume+0x82>
- 8005c3a: f897 3037 ldrb.w r3, [r7, #55] ; 0x37
- 8005c3e: f003 0304 and.w r3, r3, #4
- 8005c42: 2b00 cmp r3, #0
- 8005c44: d001 beq.n 8005c4a <find_volume+0x82>
- return FR_WRITE_PROTECTED;
- 8005c46: 230a movs r3, #10
- 8005c48: e23a b.n 80060c0 <find_volume+0x4f8>
- }
- return FR_OK; /* The file system object is valid */
- 8005c4a: 2300 movs r3, #0
- 8005c4c: e238 b.n 80060c0 <find_volume+0x4f8>
- }
-
- /* The file system object is not valid. */
- /* Following code attempts to mount the volume. (analyze BPB and initialize the fs object) */
-
- fs->fs_type = 0; /* Clear the file system object */
- 8005c4e: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005c50: 2200 movs r2, #0
- 8005c52: 701a strb r2, [r3, #0]
- fs->drv = LD2PD(vol); /* Bind the logical drive and a physical drive */
- 8005c54: 6bfb ldr r3, [r7, #60] ; 0x3c
- 8005c56: b2da uxtb r2, r3
- 8005c58: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005c5a: 705a strb r2, [r3, #1]
- stat = disk_initialize(fs->drv); /* Initialize the physical drive */
- 8005c5c: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005c5e: 785b ldrb r3, [r3, #1]
- 8005c60: 4618 mov r0, r3
- 8005c62: f7fe f8c9 bl 8003df8 <disk_initialize>
- 8005c66: 4603 mov r3, r0
- 8005c68: f887 3037 strb.w r3, [r7, #55] ; 0x37
- if (stat & STA_NOINIT) { /* Check if the initialization succeeded */
- 8005c6c: f897 3037 ldrb.w r3, [r7, #55] ; 0x37
- 8005c70: f003 0301 and.w r3, r3, #1
- 8005c74: 2b00 cmp r3, #0
- 8005c76: d001 beq.n 8005c7c <find_volume+0xb4>
- return FR_NOT_READY; /* Failed to initialize due to no medium or hard error */
- 8005c78: 2303 movs r3, #3
- 8005c7a: e221 b.n 80060c0 <find_volume+0x4f8>
- }
- if (!_FS_READONLY && mode && (stat & STA_PROTECT)) { /* Check disk write protection if needed */
- 8005c7c: 79fb ldrb r3, [r7, #7]
- 8005c7e: 2b00 cmp r3, #0
- 8005c80: d007 beq.n 8005c92 <find_volume+0xca>
- 8005c82: f897 3037 ldrb.w r3, [r7, #55] ; 0x37
- 8005c86: f003 0304 and.w r3, r3, #4
- 8005c8a: 2b00 cmp r3, #0
- 8005c8c: d001 beq.n 8005c92 <find_volume+0xca>
- return FR_WRITE_PROTECTED;
- 8005c8e: 230a movs r3, #10
- 8005c90: e216 b.n 80060c0 <find_volume+0x4f8>
- }
- #if _MAX_SS != _MIN_SS /* Get sector size (multiple sector size cfg only) */
- if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK) return FR_DISK_ERR;
- 8005c92: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005c94: 7858 ldrb r0, [r3, #1]
- 8005c96: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005c98: 330c adds r3, #12
- 8005c9a: 461a mov r2, r3
- 8005c9c: 2102 movs r1, #2
- 8005c9e: f7fe f911 bl 8003ec4 <disk_ioctl>
- 8005ca2: 4603 mov r3, r0
- 8005ca4: 2b00 cmp r3, #0
- 8005ca6: d001 beq.n 8005cac <find_volume+0xe4>
- 8005ca8: 2301 movs r3, #1
- 8005caa: e209 b.n 80060c0 <find_volume+0x4f8>
- if (SS(fs) > _MAX_SS || SS(fs) < _MIN_SS || (SS(fs) & (SS(fs) - 1))) return FR_DISK_ERR;
- 8005cac: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005cae: 899b ldrh r3, [r3, #12]
- 8005cb0: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
- 8005cb4: d80d bhi.n 8005cd2 <find_volume+0x10a>
- 8005cb6: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005cb8: 899b ldrh r3, [r3, #12]
- 8005cba: f5b3 7f00 cmp.w r3, #512 ; 0x200
- 8005cbe: d308 bcc.n 8005cd2 <find_volume+0x10a>
- 8005cc0: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005cc2: 899b ldrh r3, [r3, #12]
- 8005cc4: 461a mov r2, r3
- 8005cc6: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005cc8: 899b ldrh r3, [r3, #12]
- 8005cca: 3b01 subs r3, #1
- 8005ccc: 4013 ands r3, r2
- 8005cce: 2b00 cmp r3, #0
- 8005cd0: d001 beq.n 8005cd6 <find_volume+0x10e>
- 8005cd2: 2301 movs r3, #1
- 8005cd4: e1f4 b.n 80060c0 <find_volume+0x4f8>
- #endif
-
- /* Find an FAT partition on the drive. Supports only generic partitioning rules, FDISK and SFD. */
- bsect = 0;
- 8005cd6: 2300 movs r3, #0
- 8005cd8: 653b str r3, [r7, #80] ; 0x50
- fmt = check_fs(fs, bsect); /* Load sector 0 and check if it is an FAT-VBR as SFD */
- 8005cda: 6d39 ldr r1, [r7, #80] ; 0x50
- 8005cdc: 6bb8 ldr r0, [r7, #56] ; 0x38
- 8005cde: f7ff ff1d bl 8005b1c <check_fs>
- 8005ce2: 4603 mov r3, r0
- 8005ce4: f887 3057 strb.w r3, [r7, #87] ; 0x57
- if (fmt == 2 || (fmt < 2 && LD2PT(vol) != 0)) { /* Not an FAT-VBR or forced partition number */
- 8005ce8: f897 3057 ldrb.w r3, [r7, #87] ; 0x57
- 8005cec: 2b02 cmp r3, #2
- 8005cee: d14b bne.n 8005d88 <find_volume+0x1c0>
- for (i = 0; i < 4; i++) { /* Get partition offset */
- 8005cf0: 2300 movs r3, #0
- 8005cf2: 643b str r3, [r7, #64] ; 0x40
- 8005cf4: e01f b.n 8005d36 <find_volume+0x16e>
- pt = fs->win + (MBR_Table + i * SZ_PTE);
- 8005cf6: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005cf8: f103 0238 add.w r2, r3, #56 ; 0x38
- 8005cfc: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005cfe: 011b lsls r3, r3, #4
- 8005d00: f503 73df add.w r3, r3, #446 ; 0x1be
- 8005d04: 4413 add r3, r2
- 8005d06: 633b str r3, [r7, #48] ; 0x30
- br[i] = pt[PTE_System] ? ld_dword(pt + PTE_StLba) : 0;
- 8005d08: 6b3b ldr r3, [r7, #48] ; 0x30
- 8005d0a: 3304 adds r3, #4
- 8005d0c: 781b ldrb r3, [r3, #0]
- 8005d0e: 2b00 cmp r3, #0
- 8005d10: d006 beq.n 8005d20 <find_volume+0x158>
- 8005d12: 6b3b ldr r3, [r7, #48] ; 0x30
- 8005d14: 3308 adds r3, #8
- 8005d16: 4618 mov r0, r3
- 8005d18: f7fe f909 bl 8003f2e <ld_dword>
- 8005d1c: 4602 mov r2, r0
- 8005d1e: e000 b.n 8005d22 <find_volume+0x15a>
- 8005d20: 2200 movs r2, #0
- 8005d22: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d24: 009b lsls r3, r3, #2
- 8005d26: f107 0158 add.w r1, r7, #88 ; 0x58
- 8005d2a: 440b add r3, r1
- 8005d2c: f843 2c44 str.w r2, [r3, #-68]
- for (i = 0; i < 4; i++) { /* Get partition offset */
- 8005d30: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d32: 3301 adds r3, #1
- 8005d34: 643b str r3, [r7, #64] ; 0x40
- 8005d36: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d38: 2b03 cmp r3, #3
- 8005d3a: d9dc bls.n 8005cf6 <find_volume+0x12e>
- }
- i = LD2PT(vol); /* Partition number: 0:auto, 1-4:forced */
- 8005d3c: 2300 movs r3, #0
- 8005d3e: 643b str r3, [r7, #64] ; 0x40
- if (i) i--;
- 8005d40: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d42: 2b00 cmp r3, #0
- 8005d44: d002 beq.n 8005d4c <find_volume+0x184>
- 8005d46: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d48: 3b01 subs r3, #1
- 8005d4a: 643b str r3, [r7, #64] ; 0x40
- do { /* Find an FAT volume */
- bsect = br[i];
- 8005d4c: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d4e: 009b lsls r3, r3, #2
- 8005d50: f107 0258 add.w r2, r7, #88 ; 0x58
- 8005d54: 4413 add r3, r2
- 8005d56: f853 3c44 ldr.w r3, [r3, #-68]
- 8005d5a: 653b str r3, [r7, #80] ; 0x50
- fmt = bsect ? check_fs(fs, bsect) : 3; /* Check the partition */
- 8005d5c: 6d3b ldr r3, [r7, #80] ; 0x50
- 8005d5e: 2b00 cmp r3, #0
- 8005d60: d005 beq.n 8005d6e <find_volume+0x1a6>
- 8005d62: 6d39 ldr r1, [r7, #80] ; 0x50
- 8005d64: 6bb8 ldr r0, [r7, #56] ; 0x38
- 8005d66: f7ff fed9 bl 8005b1c <check_fs>
- 8005d6a: 4603 mov r3, r0
- 8005d6c: e000 b.n 8005d70 <find_volume+0x1a8>
- 8005d6e: 2303 movs r3, #3
- 8005d70: f887 3057 strb.w r3, [r7, #87] ; 0x57
- } while (LD2PT(vol) == 0 && fmt >= 2 && ++i < 4);
- 8005d74: f897 3057 ldrb.w r3, [r7, #87] ; 0x57
- 8005d78: 2b01 cmp r3, #1
- 8005d7a: d905 bls.n 8005d88 <find_volume+0x1c0>
- 8005d7c: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d7e: 3301 adds r3, #1
- 8005d80: 643b str r3, [r7, #64] ; 0x40
- 8005d82: 6c3b ldr r3, [r7, #64] ; 0x40
- 8005d84: 2b03 cmp r3, #3
- 8005d86: d9e1 bls.n 8005d4c <find_volume+0x184>
- }
- if (fmt == 4) return FR_DISK_ERR; /* An error occured in the disk I/O layer */
- 8005d88: f897 3057 ldrb.w r3, [r7, #87] ; 0x57
- 8005d8c: 2b04 cmp r3, #4
- 8005d8e: d101 bne.n 8005d94 <find_volume+0x1cc>
- 8005d90: 2301 movs r3, #1
- 8005d92: e195 b.n 80060c0 <find_volume+0x4f8>
- if (fmt >= 2) return FR_NO_FILESYSTEM; /* No FAT volume is found */
- 8005d94: f897 3057 ldrb.w r3, [r7, #87] ; 0x57
- 8005d98: 2b01 cmp r3, #1
- 8005d9a: d901 bls.n 8005da0 <find_volume+0x1d8>
- 8005d9c: 230d movs r3, #13
- 8005d9e: e18f b.n 80060c0 <find_volume+0x4f8>
- #endif
- fmt = FS_EXFAT; /* FAT sub-type */
- } else
- #endif /* _FS_EXFAT */
- {
- if (ld_word(fs->win + BPB_BytsPerSec) != SS(fs)) return FR_NO_FILESYSTEM; /* (BPB_BytsPerSec must be equal to the physical sector size) */
- 8005da0: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005da2: 3338 adds r3, #56 ; 0x38
- 8005da4: 330b adds r3, #11
- 8005da6: 4618 mov r0, r3
- 8005da8: f7fe f8aa bl 8003f00 <ld_word>
- 8005dac: 4603 mov r3, r0
- 8005dae: 461a mov r2, r3
- 8005db0: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005db2: 899b ldrh r3, [r3, #12]
- 8005db4: 429a cmp r2, r3
- 8005db6: d001 beq.n 8005dbc <find_volume+0x1f4>
- 8005db8: 230d movs r3, #13
- 8005dba: e181 b.n 80060c0 <find_volume+0x4f8>
-
- fasize = ld_word(fs->win + BPB_FATSz16); /* Number of sectors per FAT */
- 8005dbc: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005dbe: 3338 adds r3, #56 ; 0x38
- 8005dc0: 3316 adds r3, #22
- 8005dc2: 4618 mov r0, r3
- 8005dc4: f7fe f89c bl 8003f00 <ld_word>
- 8005dc8: 4603 mov r3, r0
- 8005dca: 64fb str r3, [r7, #76] ; 0x4c
- if (fasize == 0) fasize = ld_dword(fs->win + BPB_FATSz32);
- 8005dcc: 6cfb ldr r3, [r7, #76] ; 0x4c
- 8005dce: 2b00 cmp r3, #0
- 8005dd0: d106 bne.n 8005de0 <find_volume+0x218>
- 8005dd2: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005dd4: 3338 adds r3, #56 ; 0x38
- 8005dd6: 3324 adds r3, #36 ; 0x24
- 8005dd8: 4618 mov r0, r3
- 8005dda: f7fe f8a8 bl 8003f2e <ld_dword>
- 8005dde: 64f8 str r0, [r7, #76] ; 0x4c
- fs->fsize = fasize;
- 8005de0: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005de2: 6cfa ldr r2, [r7, #76] ; 0x4c
- 8005de4: 621a str r2, [r3, #32]
-
- fs->n_fats = fs->win[BPB_NumFATs]; /* Number of FATs */
- 8005de6: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005de8: f893 2048 ldrb.w r2, [r3, #72] ; 0x48
- 8005dec: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005dee: 709a strb r2, [r3, #2]
- if (fs->n_fats != 1 && fs->n_fats != 2) return FR_NO_FILESYSTEM; /* (Must be 1 or 2) */
- 8005df0: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005df2: 789b ldrb r3, [r3, #2]
- 8005df4: 2b01 cmp r3, #1
- 8005df6: d005 beq.n 8005e04 <find_volume+0x23c>
- 8005df8: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005dfa: 789b ldrb r3, [r3, #2]
- 8005dfc: 2b02 cmp r3, #2
- 8005dfe: d001 beq.n 8005e04 <find_volume+0x23c>
- 8005e00: 230d movs r3, #13
- 8005e02: e15d b.n 80060c0 <find_volume+0x4f8>
- fasize *= fs->n_fats; /* Number of sectors for FAT area */
- 8005e04: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e06: 789b ldrb r3, [r3, #2]
- 8005e08: 461a mov r2, r3
- 8005e0a: 6cfb ldr r3, [r7, #76] ; 0x4c
- 8005e0c: fb02 f303 mul.w r3, r2, r3
- 8005e10: 64fb str r3, [r7, #76] ; 0x4c
-
- fs->csize = fs->win[BPB_SecPerClus]; /* Cluster size */
- 8005e12: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e14: f893 3045 ldrb.w r3, [r3, #69] ; 0x45
- 8005e18: b29a uxth r2, r3
- 8005e1a: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e1c: 815a strh r2, [r3, #10]
- if (fs->csize == 0 || (fs->csize & (fs->csize - 1))) return FR_NO_FILESYSTEM; /* (Must be power of 2) */
- 8005e1e: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e20: 895b ldrh r3, [r3, #10]
- 8005e22: 2b00 cmp r3, #0
- 8005e24: d008 beq.n 8005e38 <find_volume+0x270>
- 8005e26: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e28: 895b ldrh r3, [r3, #10]
- 8005e2a: 461a mov r2, r3
- 8005e2c: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e2e: 895b ldrh r3, [r3, #10]
- 8005e30: 3b01 subs r3, #1
- 8005e32: 4013 ands r3, r2
- 8005e34: 2b00 cmp r3, #0
- 8005e36: d001 beq.n 8005e3c <find_volume+0x274>
- 8005e38: 230d movs r3, #13
- 8005e3a: e141 b.n 80060c0 <find_volume+0x4f8>
-
- fs->n_rootdir = ld_word(fs->win + BPB_RootEntCnt); /* Number of root directory entries */
- 8005e3c: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e3e: 3338 adds r3, #56 ; 0x38
- 8005e40: 3311 adds r3, #17
- 8005e42: 4618 mov r0, r3
- 8005e44: f7fe f85c bl 8003f00 <ld_word>
- 8005e48: 4603 mov r3, r0
- 8005e4a: 461a mov r2, r3
- 8005e4c: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e4e: 811a strh r2, [r3, #8]
- if (fs->n_rootdir % (SS(fs) / SZDIRE)) return FR_NO_FILESYSTEM; /* (Must be sector aligned) */
- 8005e50: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e52: 891b ldrh r3, [r3, #8]
- 8005e54: 6bba ldr r2, [r7, #56] ; 0x38
- 8005e56: 8992 ldrh r2, [r2, #12]
- 8005e58: 0952 lsrs r2, r2, #5
- 8005e5a: b292 uxth r2, r2
- 8005e5c: fbb3 f1f2 udiv r1, r3, r2
- 8005e60: fb02 f201 mul.w r2, r2, r1
- 8005e64: 1a9b subs r3, r3, r2
- 8005e66: b29b uxth r3, r3
- 8005e68: 2b00 cmp r3, #0
- 8005e6a: d001 beq.n 8005e70 <find_volume+0x2a8>
- 8005e6c: 230d movs r3, #13
- 8005e6e: e127 b.n 80060c0 <find_volume+0x4f8>
-
- tsect = ld_word(fs->win + BPB_TotSec16); /* Number of sectors on the volume */
- 8005e70: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e72: 3338 adds r3, #56 ; 0x38
- 8005e74: 3313 adds r3, #19
- 8005e76: 4618 mov r0, r3
- 8005e78: f7fe f842 bl 8003f00 <ld_word>
- 8005e7c: 4603 mov r3, r0
- 8005e7e: 64bb str r3, [r7, #72] ; 0x48
- if (tsect == 0) tsect = ld_dword(fs->win + BPB_TotSec32);
- 8005e80: 6cbb ldr r3, [r7, #72] ; 0x48
- 8005e82: 2b00 cmp r3, #0
- 8005e84: d106 bne.n 8005e94 <find_volume+0x2cc>
- 8005e86: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e88: 3338 adds r3, #56 ; 0x38
- 8005e8a: 3320 adds r3, #32
- 8005e8c: 4618 mov r0, r3
- 8005e8e: f7fe f84e bl 8003f2e <ld_dword>
- 8005e92: 64b8 str r0, [r7, #72] ; 0x48
-
- nrsv = ld_word(fs->win + BPB_RsvdSecCnt); /* Number of reserved sectors */
- 8005e94: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005e96: 3338 adds r3, #56 ; 0x38
- 8005e98: 330e adds r3, #14
- 8005e9a: 4618 mov r0, r3
- 8005e9c: f7fe f830 bl 8003f00 <ld_word>
- 8005ea0: 4603 mov r3, r0
- 8005ea2: 85fb strh r3, [r7, #46] ; 0x2e
- if (nrsv == 0) return FR_NO_FILESYSTEM; /* (Must not be 0) */
- 8005ea4: 8dfb ldrh r3, [r7, #46] ; 0x2e
- 8005ea6: 2b00 cmp r3, #0
- 8005ea8: d104 bne.n 8005eb4 <find_volume+0x2ec>
- 8005eaa: 230d movs r3, #13
- 8005eac: e108 b.n 80060c0 <find_volume+0x4f8>
- 8005eae: bf00 nop
- 8005eb0: 200000ac .word 0x200000ac
-
- /* Determine the FAT sub type */
- sysect = nrsv + fasize + fs->n_rootdir / (SS(fs) / SZDIRE); /* RSV + FAT + DIR */
- 8005eb4: 8dfa ldrh r2, [r7, #46] ; 0x2e
- 8005eb6: 6cfb ldr r3, [r7, #76] ; 0x4c
- 8005eb8: 4413 add r3, r2
- 8005eba: 6bba ldr r2, [r7, #56] ; 0x38
- 8005ebc: 8911 ldrh r1, [r2, #8]
- 8005ebe: 6bba ldr r2, [r7, #56] ; 0x38
- 8005ec0: 8992 ldrh r2, [r2, #12]
- 8005ec2: 0952 lsrs r2, r2, #5
- 8005ec4: b292 uxth r2, r2
- 8005ec6: fbb1 f2f2 udiv r2, r1, r2
- 8005eca: b292 uxth r2, r2
- 8005ecc: 4413 add r3, r2
- 8005ece: 62bb str r3, [r7, #40] ; 0x28
- if (tsect < sysect) return FR_NO_FILESYSTEM; /* (Invalid volume size) */
- 8005ed0: 6cba ldr r2, [r7, #72] ; 0x48
- 8005ed2: 6abb ldr r3, [r7, #40] ; 0x28
- 8005ed4: 429a cmp r2, r3
- 8005ed6: d201 bcs.n 8005edc <find_volume+0x314>
- 8005ed8: 230d movs r3, #13
- 8005eda: e0f1 b.n 80060c0 <find_volume+0x4f8>
- nclst = (tsect - sysect) / fs->csize; /* Number of clusters */
- 8005edc: 6cba ldr r2, [r7, #72] ; 0x48
- 8005ede: 6abb ldr r3, [r7, #40] ; 0x28
- 8005ee0: 1ad3 subs r3, r2, r3
- 8005ee2: 6bba ldr r2, [r7, #56] ; 0x38
- 8005ee4: 8952 ldrh r2, [r2, #10]
- 8005ee6: fbb3 f3f2 udiv r3, r3, r2
- 8005eea: 627b str r3, [r7, #36] ; 0x24
- if (nclst == 0) return FR_NO_FILESYSTEM; /* (Invalid volume size) */
- 8005eec: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005eee: 2b00 cmp r3, #0
- 8005ef0: d101 bne.n 8005ef6 <find_volume+0x32e>
- 8005ef2: 230d movs r3, #13
- 8005ef4: e0e4 b.n 80060c0 <find_volume+0x4f8>
- fmt = FS_FAT32;
- 8005ef6: 2303 movs r3, #3
- 8005ef8: f887 3057 strb.w r3, [r7, #87] ; 0x57
- if (nclst <= MAX_FAT16) fmt = FS_FAT16;
- 8005efc: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005efe: f64f 72f5 movw r2, #65525 ; 0xfff5
- 8005f02: 4293 cmp r3, r2
- 8005f04: d802 bhi.n 8005f0c <find_volume+0x344>
- 8005f06: 2302 movs r3, #2
- 8005f08: f887 3057 strb.w r3, [r7, #87] ; 0x57
- if (nclst <= MAX_FAT12) fmt = FS_FAT12;
- 8005f0c: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005f0e: f640 72f5 movw r2, #4085 ; 0xff5
- 8005f12: 4293 cmp r3, r2
- 8005f14: d802 bhi.n 8005f1c <find_volume+0x354>
- 8005f16: 2301 movs r3, #1
- 8005f18: f887 3057 strb.w r3, [r7, #87] ; 0x57
-
- /* Boundaries and Limits */
- fs->n_fatent = nclst + 2; /* Number of FAT entries */
- 8005f1c: 6a7b ldr r3, [r7, #36] ; 0x24
- 8005f1e: 1c9a adds r2, r3, #2
- 8005f20: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f22: 61da str r2, [r3, #28]
- fs->volbase = bsect; /* Volume start sector */
- 8005f24: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f26: 6d3a ldr r2, [r7, #80] ; 0x50
- 8005f28: 625a str r2, [r3, #36] ; 0x24
- fs->fatbase = bsect + nrsv; /* FAT start sector */
- 8005f2a: 8dfa ldrh r2, [r7, #46] ; 0x2e
- 8005f2c: 6d3b ldr r3, [r7, #80] ; 0x50
- 8005f2e: 441a add r2, r3
- 8005f30: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f32: 629a str r2, [r3, #40] ; 0x28
- fs->database = bsect + sysect; /* Data start sector */
- 8005f34: 6d3a ldr r2, [r7, #80] ; 0x50
- 8005f36: 6abb ldr r3, [r7, #40] ; 0x28
- 8005f38: 441a add r2, r3
- 8005f3a: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f3c: 631a str r2, [r3, #48] ; 0x30
- if (fmt == FS_FAT32) {
- 8005f3e: f897 3057 ldrb.w r3, [r7, #87] ; 0x57
- 8005f42: 2b03 cmp r3, #3
- 8005f44: d11e bne.n 8005f84 <find_volume+0x3bc>
- if (ld_word(fs->win + BPB_FSVer32) != 0) return FR_NO_FILESYSTEM; /* (Must be FAT32 revision 0.0) */
- 8005f46: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f48: 3338 adds r3, #56 ; 0x38
- 8005f4a: 332a adds r3, #42 ; 0x2a
- 8005f4c: 4618 mov r0, r3
- 8005f4e: f7fd ffd7 bl 8003f00 <ld_word>
- 8005f52: 4603 mov r3, r0
- 8005f54: 2b00 cmp r3, #0
- 8005f56: d001 beq.n 8005f5c <find_volume+0x394>
- 8005f58: 230d movs r3, #13
- 8005f5a: e0b1 b.n 80060c0 <find_volume+0x4f8>
- if (fs->n_rootdir) return FR_NO_FILESYSTEM; /* (BPB_RootEntCnt must be 0) */
- 8005f5c: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f5e: 891b ldrh r3, [r3, #8]
- 8005f60: 2b00 cmp r3, #0
- 8005f62: d001 beq.n 8005f68 <find_volume+0x3a0>
- 8005f64: 230d movs r3, #13
- 8005f66: e0ab b.n 80060c0 <find_volume+0x4f8>
- fs->dirbase = ld_dword(fs->win + BPB_RootClus32); /* Root directory start cluster */
- 8005f68: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f6a: 3338 adds r3, #56 ; 0x38
- 8005f6c: 332c adds r3, #44 ; 0x2c
- 8005f6e: 4618 mov r0, r3
- 8005f70: f7fd ffdd bl 8003f2e <ld_dword>
- 8005f74: 4602 mov r2, r0
- 8005f76: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f78: 62da str r2, [r3, #44] ; 0x2c
- szbfat = fs->n_fatent * 4; /* (Needed FAT size) */
- 8005f7a: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f7c: 69db ldr r3, [r3, #28]
- 8005f7e: 009b lsls r3, r3, #2
- 8005f80: 647b str r3, [r7, #68] ; 0x44
- 8005f82: e01f b.n 8005fc4 <find_volume+0x3fc>
- } else {
- if (fs->n_rootdir == 0) return FR_NO_FILESYSTEM;/* (BPB_RootEntCnt must not be 0) */
- 8005f84: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f86: 891b ldrh r3, [r3, #8]
- 8005f88: 2b00 cmp r3, #0
- 8005f8a: d101 bne.n 8005f90 <find_volume+0x3c8>
- 8005f8c: 230d movs r3, #13
- 8005f8e: e097 b.n 80060c0 <find_volume+0x4f8>
- fs->dirbase = fs->fatbase + fasize; /* Root directory start sector */
- 8005f90: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f92: 6a9a ldr r2, [r3, #40] ; 0x28
- 8005f94: 6cfb ldr r3, [r7, #76] ; 0x4c
- 8005f96: 441a add r2, r3
- 8005f98: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005f9a: 62da str r2, [r3, #44] ; 0x2c
- szbfat = (fmt == FS_FAT16) ? /* (Needed FAT size) */
- fs->n_fatent * 2 : fs->n_fatent * 3 / 2 + (fs->n_fatent & 1);
- 8005f9c: f897 3057 ldrb.w r3, [r7, #87] ; 0x57
- 8005fa0: 2b02 cmp r3, #2
- 8005fa2: d103 bne.n 8005fac <find_volume+0x3e4>
- 8005fa4: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005fa6: 69db ldr r3, [r3, #28]
- 8005fa8: 005b lsls r3, r3, #1
- 8005faa: e00a b.n 8005fc2 <find_volume+0x3fa>
- 8005fac: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005fae: 69da ldr r2, [r3, #28]
- 8005fb0: 4613 mov r3, r2
- 8005fb2: 005b lsls r3, r3, #1
- 8005fb4: 4413 add r3, r2
- 8005fb6: 085a lsrs r2, r3, #1
- 8005fb8: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005fba: 69db ldr r3, [r3, #28]
- 8005fbc: f003 0301 and.w r3, r3, #1
- 8005fc0: 4413 add r3, r2
- szbfat = (fmt == FS_FAT16) ? /* (Needed FAT size) */
- 8005fc2: 647b str r3, [r7, #68] ; 0x44
- }
- if (fs->fsize < (szbfat + (SS(fs) - 1)) / SS(fs)) return FR_NO_FILESYSTEM; /* (BPB_FATSz must not be less than the size needed) */
- 8005fc4: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005fc6: 6a1a ldr r2, [r3, #32]
- 8005fc8: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005fca: 899b ldrh r3, [r3, #12]
- 8005fcc: 4619 mov r1, r3
- 8005fce: 6c7b ldr r3, [r7, #68] ; 0x44
- 8005fd0: 440b add r3, r1
- 8005fd2: 3b01 subs r3, #1
- 8005fd4: 6bb9 ldr r1, [r7, #56] ; 0x38
- 8005fd6: 8989 ldrh r1, [r1, #12]
- 8005fd8: fbb3 f3f1 udiv r3, r3, r1
- 8005fdc: 429a cmp r2, r3
- 8005fde: d201 bcs.n 8005fe4 <find_volume+0x41c>
- 8005fe0: 230d movs r3, #13
- 8005fe2: e06d b.n 80060c0 <find_volume+0x4f8>
-
- #if !_FS_READONLY
- /* Get FSINFO if available */
- fs->last_clst = fs->free_clst = 0xFFFFFFFF; /* Initialize cluster allocation information */
- 8005fe4: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005fe6: f04f 32ff mov.w r2, #4294967295
- 8005fea: 619a str r2, [r3, #24]
- 8005fec: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005fee: 699a ldr r2, [r3, #24]
- 8005ff0: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005ff2: 615a str r2, [r3, #20]
- fs->fsi_flag = 0x80;
- 8005ff4: 6bbb ldr r3, [r7, #56] ; 0x38
- 8005ff6: 2280 movs r2, #128 ; 0x80
- 8005ff8: 711a strb r2, [r3, #4]
- #if (_FS_NOFSINFO & 3) != 3
- if (fmt == FS_FAT32 /* Enable FSINFO only if FAT32 and BPB_FSInfo32 == 1 */
- 8005ffa: f897 3057 ldrb.w r3, [r7, #87] ; 0x57
- 8005ffe: 2b03 cmp r3, #3
- 8006000: d149 bne.n 8006096 <find_volume+0x4ce>
- && ld_word(fs->win + BPB_FSInfo32) == 1
- 8006002: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006004: 3338 adds r3, #56 ; 0x38
- 8006006: 3330 adds r3, #48 ; 0x30
- 8006008: 4618 mov r0, r3
- 800600a: f7fd ff79 bl 8003f00 <ld_word>
- 800600e: 4603 mov r3, r0
- 8006010: 2b01 cmp r3, #1
- 8006012: d140 bne.n 8006096 <find_volume+0x4ce>
- && move_window(fs, bsect + 1) == FR_OK)
- 8006014: 6d3b ldr r3, [r7, #80] ; 0x50
- 8006016: 3301 adds r3, #1
- 8006018: 4619 mov r1, r3
- 800601a: 6bb8 ldr r0, [r7, #56] ; 0x38
- 800601c: f7fe fa10 bl 8004440 <move_window>
- 8006020: 4603 mov r3, r0
- 8006022: 2b00 cmp r3, #0
- 8006024: d137 bne.n 8006096 <find_volume+0x4ce>
- {
- fs->fsi_flag = 0;
- 8006026: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006028: 2200 movs r2, #0
- 800602a: 711a strb r2, [r3, #4]
- if (ld_word(fs->win + BS_55AA) == 0xAA55 /* Load FSINFO data if available */
- 800602c: 6bbb ldr r3, [r7, #56] ; 0x38
- 800602e: 3338 adds r3, #56 ; 0x38
- 8006030: f503 73ff add.w r3, r3, #510 ; 0x1fe
- 8006034: 4618 mov r0, r3
- 8006036: f7fd ff63 bl 8003f00 <ld_word>
- 800603a: 4603 mov r3, r0
- 800603c: 461a mov r2, r3
- 800603e: f64a 2355 movw r3, #43605 ; 0xaa55
- 8006042: 429a cmp r2, r3
- 8006044: d127 bne.n 8006096 <find_volume+0x4ce>
- && ld_dword(fs->win + FSI_LeadSig) == 0x41615252
- 8006046: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006048: 3338 adds r3, #56 ; 0x38
- 800604a: 4618 mov r0, r3
- 800604c: f7fd ff6f bl 8003f2e <ld_dword>
- 8006050: 4602 mov r2, r0
- 8006052: 4b1d ldr r3, [pc, #116] ; (80060c8 <find_volume+0x500>)
- 8006054: 429a cmp r2, r3
- 8006056: d11e bne.n 8006096 <find_volume+0x4ce>
- && ld_dword(fs->win + FSI_StrucSig) == 0x61417272)
- 8006058: 6bbb ldr r3, [r7, #56] ; 0x38
- 800605a: 3338 adds r3, #56 ; 0x38
- 800605c: f503 73f2 add.w r3, r3, #484 ; 0x1e4
- 8006060: 4618 mov r0, r3
- 8006062: f7fd ff64 bl 8003f2e <ld_dword>
- 8006066: 4602 mov r2, r0
- 8006068: 4b18 ldr r3, [pc, #96] ; (80060cc <find_volume+0x504>)
- 800606a: 429a cmp r2, r3
- 800606c: d113 bne.n 8006096 <find_volume+0x4ce>
- {
- #if (_FS_NOFSINFO & 1) == 0
- fs->free_clst = ld_dword(fs->win + FSI_Free_Count);
- 800606e: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006070: 3338 adds r3, #56 ; 0x38
- 8006072: f503 73f4 add.w r3, r3, #488 ; 0x1e8
- 8006076: 4618 mov r0, r3
- 8006078: f7fd ff59 bl 8003f2e <ld_dword>
- 800607c: 4602 mov r2, r0
- 800607e: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006080: 619a str r2, [r3, #24]
- #endif
- #if (_FS_NOFSINFO & 2) == 0
- fs->last_clst = ld_dword(fs->win + FSI_Nxt_Free);
- 8006082: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006084: 3338 adds r3, #56 ; 0x38
- 8006086: f503 73f6 add.w r3, r3, #492 ; 0x1ec
- 800608a: 4618 mov r0, r3
- 800608c: f7fd ff4f bl 8003f2e <ld_dword>
- 8006090: 4602 mov r2, r0
- 8006092: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006094: 615a str r2, [r3, #20]
- }
- #endif /* (_FS_NOFSINFO & 3) != 3 */
- #endif /* !_FS_READONLY */
- }
-
- fs->fs_type = fmt; /* FAT sub-type */
- 8006096: 6bbb ldr r3, [r7, #56] ; 0x38
- 8006098: f897 2057 ldrb.w r2, [r7, #87] ; 0x57
- 800609c: 701a strb r2, [r3, #0]
- fs->id = ++Fsid; /* File system mount ID */
- 800609e: 4b0c ldr r3, [pc, #48] ; (80060d0 <find_volume+0x508>)
- 80060a0: 881b ldrh r3, [r3, #0]
- 80060a2: 3301 adds r3, #1
- 80060a4: b29a uxth r2, r3
- 80060a6: 4b0a ldr r3, [pc, #40] ; (80060d0 <find_volume+0x508>)
- 80060a8: 801a strh r2, [r3, #0]
- 80060aa: 4b09 ldr r3, [pc, #36] ; (80060d0 <find_volume+0x508>)
- 80060ac: 881a ldrh r2, [r3, #0]
- 80060ae: 6bbb ldr r3, [r7, #56] ; 0x38
- 80060b0: 80da strh r2, [r3, #6]
- #if _USE_LFN == 1
- fs->lfnbuf = LfnBuf; /* Static LFN working buffer */
- 80060b2: 6bbb ldr r3, [r7, #56] ; 0x38
- 80060b4: 4a07 ldr r2, [pc, #28] ; (80060d4 <find_volume+0x50c>)
- 80060b6: 611a str r2, [r3, #16]
- #endif
- #if _FS_RPATH != 0
- fs->cdir = 0; /* Initialize current directory */
- #endif
- #if _FS_LOCK != 0 /* Clear file lock semaphores */
- clear_lock(fs);
- 80060b8: 6bb8 ldr r0, [r7, #56] ; 0x38
- 80060ba: f7fe f95b bl 8004374 <clear_lock>
- #endif
- return FR_OK;
- 80060be: 2300 movs r3, #0
- }
- 80060c0: 4618 mov r0, r3
- 80060c2: 3758 adds r7, #88 ; 0x58
- 80060c4: 46bd mov sp, r7
- 80060c6: bd80 pop {r7, pc}
- 80060c8: 41615252 .word 0x41615252
- 80060cc: 61417272 .word 0x61417272
- 80060d0: 200000b0 .word 0x200000b0
- 80060d4: 200000d4 .word 0x200000d4
-
- 080060d8 <validate>:
- static
- FRESULT validate ( /* Returns FR_OK or FR_INVALID_OBJECT */
- _FDID* obj, /* Pointer to the _OBJ, the 1st member in the FIL/DIR object, to check validity */
- FATFS** fs /* Pointer to pointer to the owner file system object to return */
- )
- {
- 80060d8: b580 push {r7, lr}
- 80060da: b084 sub sp, #16
- 80060dc: af00 add r7, sp, #0
- 80060de: 6078 str r0, [r7, #4]
- 80060e0: 6039 str r1, [r7, #0]
- FRESULT res = FR_INVALID_OBJECT;
- 80060e2: 2309 movs r3, #9
- 80060e4: 73fb strb r3, [r7, #15]
-
-
- if (obj && obj->fs && obj->fs->fs_type && obj->id == obj->fs->id) { /* Test if the object is valid */
- 80060e6: 687b ldr r3, [r7, #4]
- 80060e8: 2b00 cmp r3, #0
- 80060ea: d01c beq.n 8006126 <validate+0x4e>
- 80060ec: 687b ldr r3, [r7, #4]
- 80060ee: 681b ldr r3, [r3, #0]
- 80060f0: 2b00 cmp r3, #0
- 80060f2: d018 beq.n 8006126 <validate+0x4e>
- 80060f4: 687b ldr r3, [r7, #4]
- 80060f6: 681b ldr r3, [r3, #0]
- 80060f8: 781b ldrb r3, [r3, #0]
- 80060fa: 2b00 cmp r3, #0
- 80060fc: d013 beq.n 8006126 <validate+0x4e>
- 80060fe: 687b ldr r3, [r7, #4]
- 8006100: 889a ldrh r2, [r3, #4]
- 8006102: 687b ldr r3, [r7, #4]
- 8006104: 681b ldr r3, [r3, #0]
- 8006106: 88db ldrh r3, [r3, #6]
- 8006108: 429a cmp r2, r3
- 800610a: d10c bne.n 8006126 <validate+0x4e>
- }
- } else {
- res = FR_TIMEOUT;
- }
- #else
- if (!(disk_status(obj->fs->drv) & STA_NOINIT)) { /* Test if the phsical drive is kept initialized */
- 800610c: 687b ldr r3, [r7, #4]
- 800610e: 681b ldr r3, [r3, #0]
- 8006110: 785b ldrb r3, [r3, #1]
- 8006112: 4618 mov r0, r3
- 8006114: f7fd fe56 bl 8003dc4 <disk_status>
- 8006118: 4603 mov r3, r0
- 800611a: f003 0301 and.w r3, r3, #1
- 800611e: 2b00 cmp r3, #0
- 8006120: d101 bne.n 8006126 <validate+0x4e>
- res = FR_OK;
- 8006122: 2300 movs r3, #0
- 8006124: 73fb strb r3, [r7, #15]
- }
- #endif
- }
- *fs = (res == FR_OK) ? obj->fs : 0; /* Corresponding filesystem object */
- 8006126: 7bfb ldrb r3, [r7, #15]
- 8006128: 2b00 cmp r3, #0
- 800612a: d102 bne.n 8006132 <validate+0x5a>
- 800612c: 687b ldr r3, [r7, #4]
- 800612e: 681b ldr r3, [r3, #0]
- 8006130: e000 b.n 8006134 <validate+0x5c>
- 8006132: 2300 movs r3, #0
- 8006134: 683a ldr r2, [r7, #0]
- 8006136: 6013 str r3, [r2, #0]
- return res;
- 8006138: 7bfb ldrb r3, [r7, #15]
- }
- 800613a: 4618 mov r0, r3
- 800613c: 3710 adds r7, #16
- 800613e: 46bd mov sp, r7
- 8006140: bd80 pop {r7, pc}
- ...
-
- 08006144 <f_mount>:
- FRESULT f_mount (
- FATFS* fs, /* Pointer to the file system object (NULL:unmount)*/
- const TCHAR* path, /* Logical drive number to be mounted/unmounted */
- BYTE opt /* Mode option 0:Do not mount (delayed mount), 1:Mount immediately */
- )
- {
- 8006144: b580 push {r7, lr}
- 8006146: b088 sub sp, #32
- 8006148: af00 add r7, sp, #0
- 800614a: 60f8 str r0, [r7, #12]
- 800614c: 60b9 str r1, [r7, #8]
- 800614e: 4613 mov r3, r2
- 8006150: 71fb strb r3, [r7, #7]
- FATFS *cfs;
- int vol;
- FRESULT res;
- const TCHAR *rp = path;
- 8006152: 68bb ldr r3, [r7, #8]
- 8006154: 613b str r3, [r7, #16]
-
-
- /* Get logical drive number */
- vol = get_ldnumber(&rp);
- 8006156: f107 0310 add.w r3, r7, #16
- 800615a: 4618 mov r0, r3
- 800615c: f7ff fc9a bl 8005a94 <get_ldnumber>
- 8006160: 61f8 str r0, [r7, #28]
- if (vol < 0) return FR_INVALID_DRIVE;
- 8006162: 69fb ldr r3, [r7, #28]
- 8006164: 2b00 cmp r3, #0
- 8006166: da01 bge.n 800616c <f_mount+0x28>
- 8006168: 230b movs r3, #11
- 800616a: e02b b.n 80061c4 <f_mount+0x80>
- cfs = FatFs[vol]; /* Pointer to fs object */
- 800616c: 4a17 ldr r2, [pc, #92] ; (80061cc <f_mount+0x88>)
- 800616e: 69fb ldr r3, [r7, #28]
- 8006170: f852 3023 ldr.w r3, [r2, r3, lsl #2]
- 8006174: 61bb str r3, [r7, #24]
-
- if (cfs) {
- 8006176: 69bb ldr r3, [r7, #24]
- 8006178: 2b00 cmp r3, #0
- 800617a: d005 beq.n 8006188 <f_mount+0x44>
- #if _FS_LOCK != 0
- clear_lock(cfs);
- 800617c: 69b8 ldr r0, [r7, #24]
- 800617e: f7fe f8f9 bl 8004374 <clear_lock>
- #endif
- #if _FS_REENTRANT /* Discard sync object of the current volume */
- if (!ff_del_syncobj(cfs->sobj)) return FR_INT_ERR;
- #endif
- cfs->fs_type = 0; /* Clear old fs object */
- 8006182: 69bb ldr r3, [r7, #24]
- 8006184: 2200 movs r2, #0
- 8006186: 701a strb r2, [r3, #0]
- }
-
- if (fs) {
- 8006188: 68fb ldr r3, [r7, #12]
- 800618a: 2b00 cmp r3, #0
- 800618c: d002 beq.n 8006194 <f_mount+0x50>
- fs->fs_type = 0; /* Clear new fs object */
- 800618e: 68fb ldr r3, [r7, #12]
- 8006190: 2200 movs r2, #0
- 8006192: 701a strb r2, [r3, #0]
- #if _FS_REENTRANT /* Create sync object for the new volume */
- if (!ff_cre_syncobj((BYTE)vol, &fs->sobj)) return FR_INT_ERR;
- #endif
- }
- FatFs[vol] = fs; /* Register new fs object */
- 8006194: 68fa ldr r2, [r7, #12]
- 8006196: 490d ldr r1, [pc, #52] ; (80061cc <f_mount+0x88>)
- 8006198: 69fb ldr r3, [r7, #28]
- 800619a: f841 2023 str.w r2, [r1, r3, lsl #2]
-
- if (!fs || opt != 1) return FR_OK; /* Do not mount now, it will be mounted later */
- 800619e: 68fb ldr r3, [r7, #12]
- 80061a0: 2b00 cmp r3, #0
- 80061a2: d002 beq.n 80061aa <f_mount+0x66>
- 80061a4: 79fb ldrb r3, [r7, #7]
- 80061a6: 2b01 cmp r3, #1
- 80061a8: d001 beq.n 80061ae <f_mount+0x6a>
- 80061aa: 2300 movs r3, #0
- 80061ac: e00a b.n 80061c4 <f_mount+0x80>
-
- res = find_volume(&path, &fs, 0); /* Force mounted the volume */
- 80061ae: f107 010c add.w r1, r7, #12
- 80061b2: f107 0308 add.w r3, r7, #8
- 80061b6: 2200 movs r2, #0
- 80061b8: 4618 mov r0, r3
- 80061ba: f7ff fd05 bl 8005bc8 <find_volume>
- 80061be: 4603 mov r3, r0
- 80061c0: 75fb strb r3, [r7, #23]
- LEAVE_FF(fs, res);
- 80061c2: 7dfb ldrb r3, [r7, #23]
- }
- 80061c4: 4618 mov r0, r3
- 80061c6: 3720 adds r7, #32
- 80061c8: 46bd mov sp, r7
- 80061ca: bd80 pop {r7, pc}
- 80061cc: 200000ac .word 0x200000ac
-
- 080061d0 <f_open>:
- FRESULT f_open (
- FIL* fp, /* Pointer to the blank file object */
- const TCHAR* path, /* Pointer to the file name */
- BYTE mode /* Access mode and file open mode flags */
- )
- {
- 80061d0: b580 push {r7, lr}
- 80061d2: b09a sub sp, #104 ; 0x68
- 80061d4: af00 add r7, sp, #0
- 80061d6: 60f8 str r0, [r7, #12]
- 80061d8: 60b9 str r1, [r7, #8]
- 80061da: 4613 mov r3, r2
- 80061dc: 71fb strb r3, [r7, #7]
- FSIZE_t ofs;
- #endif
- DEF_NAMBUF
-
-
- if (!fp) return FR_INVALID_OBJECT;
- 80061de: 68fb ldr r3, [r7, #12]
- 80061e0: 2b00 cmp r3, #0
- 80061e2: d101 bne.n 80061e8 <f_open+0x18>
- 80061e4: 2309 movs r3, #9
- 80061e6: e1bb b.n 8006560 <f_open+0x390>
-
- /* Get logical drive */
- mode &= _FS_READONLY ? FA_READ : FA_READ | FA_WRITE | FA_CREATE_ALWAYS | FA_CREATE_NEW | FA_OPEN_ALWAYS | FA_OPEN_APPEND | FA_SEEKEND;
- 80061e8: 79fb ldrb r3, [r7, #7]
- 80061ea: f003 033f and.w r3, r3, #63 ; 0x3f
- 80061ee: 71fb strb r3, [r7, #7]
- res = find_volume(&path, &fs, mode);
- 80061f0: 79fa ldrb r2, [r7, #7]
- 80061f2: f107 0114 add.w r1, r7, #20
- 80061f6: f107 0308 add.w r3, r7, #8
- 80061fa: 4618 mov r0, r3
- 80061fc: f7ff fce4 bl 8005bc8 <find_volume>
- 8006200: 4603 mov r3, r0
- 8006202: f887 3067 strb.w r3, [r7, #103] ; 0x67
- if (res == FR_OK) {
- 8006206: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 800620a: 2b00 cmp r3, #0
- 800620c: f040 819f bne.w 800654e <f_open+0x37e>
- dj.obj.fs = fs;
- 8006210: 697b ldr r3, [r7, #20]
- 8006212: 61bb str r3, [r7, #24]
- INIT_NAMBUF(fs);
- res = follow_path(&dj, path); /* Follow the file path */
- 8006214: 68ba ldr r2, [r7, #8]
- 8006216: f107 0318 add.w r3, r7, #24
- 800621a: 4611 mov r1, r2
- 800621c: 4618 mov r0, r3
- 800621e: f7ff fbc3 bl 80059a8 <follow_path>
- 8006222: 4603 mov r3, r0
- 8006224: f887 3067 strb.w r3, [r7, #103] ; 0x67
- #if !_FS_READONLY /* R/W configuration */
- if (res == FR_OK) {
- 8006228: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 800622c: 2b00 cmp r3, #0
- 800622e: d11a bne.n 8006266 <f_open+0x96>
- if (dj.fn[NSFLAG] & NS_NONAME) { /* Origin directory itself? */
- 8006230: f897 3047 ldrb.w r3, [r7, #71] ; 0x47
- 8006234: b25b sxtb r3, r3
- 8006236: 2b00 cmp r3, #0
- 8006238: da03 bge.n 8006242 <f_open+0x72>
- res = FR_INVALID_NAME;
- 800623a: 2306 movs r3, #6
- 800623c: f887 3067 strb.w r3, [r7, #103] ; 0x67
- 8006240: e011 b.n 8006266 <f_open+0x96>
- }
- #if _FS_LOCK != 0
- else {
- res = chk_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
- 8006242: 79fb ldrb r3, [r7, #7]
- 8006244: f023 0301 bic.w r3, r3, #1
- 8006248: 2b00 cmp r3, #0
- 800624a: bf14 ite ne
- 800624c: 2301 movne r3, #1
- 800624e: 2300 moveq r3, #0
- 8006250: b2db uxtb r3, r3
- 8006252: 461a mov r2, r3
- 8006254: f107 0318 add.w r3, r7, #24
- 8006258: 4611 mov r1, r2
- 800625a: 4618 mov r0, r3
- 800625c: f7fd ff48 bl 80040f0 <chk_lock>
- 8006260: 4603 mov r3, r0
- 8006262: f887 3067 strb.w r3, [r7, #103] ; 0x67
- }
- #endif
- }
- /* Create or Open a file */
- if (mode & (FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW)) {
- 8006266: 79fb ldrb r3, [r7, #7]
- 8006268: f003 031c and.w r3, r3, #28
- 800626c: 2b00 cmp r3, #0
- 800626e: d07f beq.n 8006370 <f_open+0x1a0>
- if (res != FR_OK) { /* No file, create new */
- 8006270: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 8006274: 2b00 cmp r3, #0
- 8006276: d017 beq.n 80062a8 <f_open+0xd8>
- if (res == FR_NO_FILE) { /* There is no file to open, create a new entry */
- 8006278: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 800627c: 2b04 cmp r3, #4
- 800627e: d10e bne.n 800629e <f_open+0xce>
- #if _FS_LOCK != 0
- res = enq_lock() ? dir_register(&dj) : FR_TOO_MANY_OPEN_FILES;
- 8006280: f7fd ff90 bl 80041a4 <enq_lock>
- 8006284: 4603 mov r3, r0
- 8006286: 2b00 cmp r3, #0
- 8006288: d006 beq.n 8006298 <f_open+0xc8>
- 800628a: f107 0318 add.w r3, r7, #24
- 800628e: 4618 mov r0, r3
- 8006290: f7ff f8da bl 8005448 <dir_register>
- 8006294: 4603 mov r3, r0
- 8006296: e000 b.n 800629a <f_open+0xca>
- 8006298: 2312 movs r3, #18
- 800629a: f887 3067 strb.w r3, [r7, #103] ; 0x67
- #else
- res = dir_register(&dj);
- #endif
- }
- mode |= FA_CREATE_ALWAYS; /* File is created */
- 800629e: 79fb ldrb r3, [r7, #7]
- 80062a0: f043 0308 orr.w r3, r3, #8
- 80062a4: 71fb strb r3, [r7, #7]
- 80062a6: e010 b.n 80062ca <f_open+0xfa>
- }
- else { /* Any object is already existing */
- if (dj.obj.attr & (AM_RDO | AM_DIR)) { /* Cannot overwrite it (R/O or DIR) */
- 80062a8: 7fbb ldrb r3, [r7, #30]
- 80062aa: f003 0311 and.w r3, r3, #17
- 80062ae: 2b00 cmp r3, #0
- 80062b0: d003 beq.n 80062ba <f_open+0xea>
- res = FR_DENIED;
- 80062b2: 2307 movs r3, #7
- 80062b4: f887 3067 strb.w r3, [r7, #103] ; 0x67
- 80062b8: e007 b.n 80062ca <f_open+0xfa>
- } else {
- if (mode & FA_CREATE_NEW) res = FR_EXIST; /* Cannot create as new file */
- 80062ba: 79fb ldrb r3, [r7, #7]
- 80062bc: f003 0304 and.w r3, r3, #4
- 80062c0: 2b00 cmp r3, #0
- 80062c2: d002 beq.n 80062ca <f_open+0xfa>
- 80062c4: 2308 movs r3, #8
- 80062c6: f887 3067 strb.w r3, [r7, #103] ; 0x67
- }
- }
- if (res == FR_OK && (mode & FA_CREATE_ALWAYS)) { /* Truncate it if overwrite mode */
- 80062ca: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 80062ce: 2b00 cmp r3, #0
- 80062d0: d168 bne.n 80063a4 <f_open+0x1d4>
- 80062d2: 79fb ldrb r3, [r7, #7]
- 80062d4: f003 0308 and.w r3, r3, #8
- 80062d8: 2b00 cmp r3, #0
- 80062da: d063 beq.n 80063a4 <f_open+0x1d4>
- dw = GET_FATTIME();
- 80062dc: f7fd fd16 bl 8003d0c <get_fattime>
- 80062e0: 65b8 str r0, [r7, #88] ; 0x58
- }
- } else
- #endif
- {
- /* Clean directory info */
- st_dword(dj.dir + DIR_CrtTime, dw); /* Set created time */
- 80062e2: 6bbb ldr r3, [r7, #56] ; 0x38
- 80062e4: 330e adds r3, #14
- 80062e6: 6db9 ldr r1, [r7, #88] ; 0x58
- 80062e8: 4618 mov r0, r3
- 80062ea: f7fd fe5c bl 8003fa6 <st_dword>
- st_dword(dj.dir + DIR_ModTime, dw); /* Set modified time */
- 80062ee: 6bbb ldr r3, [r7, #56] ; 0x38
- 80062f0: 3316 adds r3, #22
- 80062f2: 6db9 ldr r1, [r7, #88] ; 0x58
- 80062f4: 4618 mov r0, r3
- 80062f6: f7fd fe56 bl 8003fa6 <st_dword>
- dj.dir[DIR_Attr] = AM_ARC; /* Reset attribute */
- 80062fa: 6bbb ldr r3, [r7, #56] ; 0x38
- 80062fc: 330b adds r3, #11
- 80062fe: 2220 movs r2, #32
- 8006300: 701a strb r2, [r3, #0]
- cl = ld_clust(fs, dj.dir); /* Get cluster chain */
- 8006302: 697b ldr r3, [r7, #20]
- 8006304: 6bba ldr r2, [r7, #56] ; 0x38
- 8006306: 4611 mov r1, r2
- 8006308: 4618 mov r0, r3
- 800630a: f7fe fe16 bl 8004f3a <ld_clust>
- 800630e: 6578 str r0, [r7, #84] ; 0x54
- st_clust(fs, dj.dir, 0); /* Reset file allocation info */
- 8006310: 697b ldr r3, [r7, #20]
- 8006312: 6bb9 ldr r1, [r7, #56] ; 0x38
- 8006314: 2200 movs r2, #0
- 8006316: 4618 mov r0, r3
- 8006318: f7fe fe2e bl 8004f78 <st_clust>
- st_dword(dj.dir + DIR_FileSize, 0);
- 800631c: 6bbb ldr r3, [r7, #56] ; 0x38
- 800631e: 331c adds r3, #28
- 8006320: 2100 movs r1, #0
- 8006322: 4618 mov r0, r3
- 8006324: f7fd fe3f bl 8003fa6 <st_dword>
- fs->wflag = 1;
- 8006328: 697b ldr r3, [r7, #20]
- 800632a: 2201 movs r2, #1
- 800632c: 70da strb r2, [r3, #3]
-
- if (cl) { /* Remove the cluster chain if exist */
- 800632e: 6d7b ldr r3, [r7, #84] ; 0x54
- 8006330: 2b00 cmp r3, #0
- 8006332: d037 beq.n 80063a4 <f_open+0x1d4>
- dw = fs->winsect;
- 8006334: 697b ldr r3, [r7, #20]
- 8006336: 6b5b ldr r3, [r3, #52] ; 0x34
- 8006338: 65bb str r3, [r7, #88] ; 0x58
- res = remove_chain(&dj.obj, cl, 0);
- 800633a: f107 0318 add.w r3, r7, #24
- 800633e: 2200 movs r2, #0
- 8006340: 6d79 ldr r1, [r7, #84] ; 0x54
- 8006342: 4618 mov r0, r3
- 8006344: f7fe fb1f bl 8004986 <remove_chain>
- 8006348: 4603 mov r3, r0
- 800634a: f887 3067 strb.w r3, [r7, #103] ; 0x67
- if (res == FR_OK) {
- 800634e: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 8006352: 2b00 cmp r3, #0
- 8006354: d126 bne.n 80063a4 <f_open+0x1d4>
- res = move_window(fs, dw);
- 8006356: 697b ldr r3, [r7, #20]
- 8006358: 6db9 ldr r1, [r7, #88] ; 0x58
- 800635a: 4618 mov r0, r3
- 800635c: f7fe f870 bl 8004440 <move_window>
- 8006360: 4603 mov r3, r0
- 8006362: f887 3067 strb.w r3, [r7, #103] ; 0x67
- fs->last_clst = cl - 1; /* Reuse the cluster hole */
- 8006366: 697b ldr r3, [r7, #20]
- 8006368: 6d7a ldr r2, [r7, #84] ; 0x54
- 800636a: 3a01 subs r2, #1
- 800636c: 615a str r2, [r3, #20]
- 800636e: e019 b.n 80063a4 <f_open+0x1d4>
- }
- }
- }
- }
- else { /* Open an existing file */
- if (res == FR_OK) { /* Following succeeded */
- 8006370: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 8006374: 2b00 cmp r3, #0
- 8006376: d115 bne.n 80063a4 <f_open+0x1d4>
- if (dj.obj.attr & AM_DIR) { /* It is a directory */
- 8006378: 7fbb ldrb r3, [r7, #30]
- 800637a: f003 0310 and.w r3, r3, #16
- 800637e: 2b00 cmp r3, #0
- 8006380: d003 beq.n 800638a <f_open+0x1ba>
- res = FR_NO_FILE;
- 8006382: 2304 movs r3, #4
- 8006384: f887 3067 strb.w r3, [r7, #103] ; 0x67
- 8006388: e00c b.n 80063a4 <f_open+0x1d4>
- } else {
- if ((mode & FA_WRITE) && (dj.obj.attr & AM_RDO)) { /* R/O violation */
- 800638a: 79fb ldrb r3, [r7, #7]
- 800638c: f003 0302 and.w r3, r3, #2
- 8006390: 2b00 cmp r3, #0
- 8006392: d007 beq.n 80063a4 <f_open+0x1d4>
- 8006394: 7fbb ldrb r3, [r7, #30]
- 8006396: f003 0301 and.w r3, r3, #1
- 800639a: 2b00 cmp r3, #0
- 800639c: d002 beq.n 80063a4 <f_open+0x1d4>
- res = FR_DENIED;
- 800639e: 2307 movs r3, #7
- 80063a0: f887 3067 strb.w r3, [r7, #103] ; 0x67
- }
- }
- }
- }
- if (res == FR_OK) {
- 80063a4: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 80063a8: 2b00 cmp r3, #0
- 80063aa: d128 bne.n 80063fe <f_open+0x22e>
- if (mode & FA_CREATE_ALWAYS) /* Set file change flag if created or overwritten */
- 80063ac: 79fb ldrb r3, [r7, #7]
- 80063ae: f003 0308 and.w r3, r3, #8
- 80063b2: 2b00 cmp r3, #0
- 80063b4: d003 beq.n 80063be <f_open+0x1ee>
- mode |= FA_MODIFIED;
- 80063b6: 79fb ldrb r3, [r7, #7]
- 80063b8: f043 0340 orr.w r3, r3, #64 ; 0x40
- 80063bc: 71fb strb r3, [r7, #7]
- fp->dir_sect = fs->winsect; /* Pointer to the directory entry */
- 80063be: 697b ldr r3, [r7, #20]
- 80063c0: 6b5a ldr r2, [r3, #52] ; 0x34
- 80063c2: 68fb ldr r3, [r7, #12]
- 80063c4: 625a str r2, [r3, #36] ; 0x24
- fp->dir_ptr = dj.dir;
- 80063c6: 6bba ldr r2, [r7, #56] ; 0x38
- 80063c8: 68fb ldr r3, [r7, #12]
- 80063ca: 629a str r2, [r3, #40] ; 0x28
- #if _FS_LOCK != 0
- fp->obj.lockid = inc_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
- 80063cc: 79fb ldrb r3, [r7, #7]
- 80063ce: f023 0301 bic.w r3, r3, #1
- 80063d2: 2b00 cmp r3, #0
- 80063d4: bf14 ite ne
- 80063d6: 2301 movne r3, #1
- 80063d8: 2300 moveq r3, #0
- 80063da: b2db uxtb r3, r3
- 80063dc: 461a mov r2, r3
- 80063de: f107 0318 add.w r3, r7, #24
- 80063e2: 4611 mov r1, r2
- 80063e4: 4618 mov r0, r3
- 80063e6: f7fd fefd bl 80041e4 <inc_lock>
- 80063ea: 4602 mov r2, r0
- 80063ec: 68fb ldr r3, [r7, #12]
- 80063ee: 611a str r2, [r3, #16]
- if (!fp->obj.lockid) res = FR_INT_ERR;
- 80063f0: 68fb ldr r3, [r7, #12]
- 80063f2: 691b ldr r3, [r3, #16]
- 80063f4: 2b00 cmp r3, #0
- 80063f6: d102 bne.n 80063fe <f_open+0x22e>
- 80063f8: 2302 movs r3, #2
- 80063fa: f887 3067 strb.w r3, [r7, #103] ; 0x67
- }
- }
- }
- #endif
-
- if (res == FR_OK) {
- 80063fe: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 8006402: 2b00 cmp r3, #0
- 8006404: f040 80a3 bne.w 800654e <f_open+0x37e>
- fp->obj.objsize = ld_qword(fs->dirbuf + XDIR_FileSize);
- fp->obj.stat = fs->dirbuf[XDIR_GenFlags] & 2;
- } else
- #endif
- {
- fp->obj.sclust = ld_clust(fs, dj.dir); /* Get object allocation info */
- 8006408: 697b ldr r3, [r7, #20]
- 800640a: 6bba ldr r2, [r7, #56] ; 0x38
- 800640c: 4611 mov r1, r2
- 800640e: 4618 mov r0, r3
- 8006410: f7fe fd93 bl 8004f3a <ld_clust>
- 8006414: 4602 mov r2, r0
- 8006416: 68fb ldr r3, [r7, #12]
- 8006418: 609a str r2, [r3, #8]
- fp->obj.objsize = ld_dword(dj.dir + DIR_FileSize);
- 800641a: 6bbb ldr r3, [r7, #56] ; 0x38
- 800641c: 331c adds r3, #28
- 800641e: 4618 mov r0, r3
- 8006420: f7fd fd85 bl 8003f2e <ld_dword>
- 8006424: 4602 mov r2, r0
- 8006426: 68fb ldr r3, [r7, #12]
- 8006428: 60da str r2, [r3, #12]
- }
- #if _USE_FASTSEEK
- fp->cltbl = 0; /* Disable fast seek mode */
- 800642a: 68fb ldr r3, [r7, #12]
- 800642c: 2200 movs r2, #0
- 800642e: 62da str r2, [r3, #44] ; 0x2c
- #endif
- fp->obj.fs = fs; /* Validate the file object */
- 8006430: 697a ldr r2, [r7, #20]
- 8006432: 68fb ldr r3, [r7, #12]
- 8006434: 601a str r2, [r3, #0]
- fp->obj.id = fs->id;
- 8006436: 697b ldr r3, [r7, #20]
- 8006438: 88da ldrh r2, [r3, #6]
- 800643a: 68fb ldr r3, [r7, #12]
- 800643c: 809a strh r2, [r3, #4]
- fp->flag = mode; /* Set file access mode */
- 800643e: 68fb ldr r3, [r7, #12]
- 8006440: 79fa ldrb r2, [r7, #7]
- 8006442: 751a strb r2, [r3, #20]
- fp->err = 0; /* Clear error flag */
- 8006444: 68fb ldr r3, [r7, #12]
- 8006446: 2200 movs r2, #0
- 8006448: 755a strb r2, [r3, #21]
- fp->sect = 0; /* Invalidate current data sector */
- 800644a: 68fb ldr r3, [r7, #12]
- 800644c: 2200 movs r2, #0
- 800644e: 621a str r2, [r3, #32]
- fp->fptr = 0; /* Set file pointer top of the file */
- 8006450: 68fb ldr r3, [r7, #12]
- 8006452: 2200 movs r2, #0
- 8006454: 619a str r2, [r3, #24]
- #if !_FS_READONLY
- #if !_FS_TINY
- mem_set(fp->buf, 0, _MAX_SS); /* Clear sector buffer */
- 8006456: 68fb ldr r3, [r7, #12]
- 8006458: 3330 adds r3, #48 ; 0x30
- 800645a: f44f 5280 mov.w r2, #4096 ; 0x1000
- 800645e: 2100 movs r1, #0
- 8006460: 4618 mov r0, r3
- 8006462: f7fd fdeb bl 800403c <mem_set>
- #endif
- if ((mode & FA_SEEKEND) && fp->obj.objsize > 0) { /* Seek to end of file if FA_OPEN_APPEND is specified */
- 8006466: 79fb ldrb r3, [r7, #7]
- 8006468: f003 0320 and.w r3, r3, #32
- 800646c: 2b00 cmp r3, #0
- 800646e: d06e beq.n 800654e <f_open+0x37e>
- 8006470: 68fb ldr r3, [r7, #12]
- 8006472: 68db ldr r3, [r3, #12]
- 8006474: 2b00 cmp r3, #0
- 8006476: d06a beq.n 800654e <f_open+0x37e>
- fp->fptr = fp->obj.objsize; /* Offset to seek */
- 8006478: 68fb ldr r3, [r7, #12]
- 800647a: 68da ldr r2, [r3, #12]
- 800647c: 68fb ldr r3, [r7, #12]
- 800647e: 619a str r2, [r3, #24]
- bcs = (DWORD)fs->csize * SS(fs); /* Cluster size in byte */
- 8006480: 697b ldr r3, [r7, #20]
- 8006482: 895b ldrh r3, [r3, #10]
- 8006484: 461a mov r2, r3
- 8006486: 697b ldr r3, [r7, #20]
- 8006488: 899b ldrh r3, [r3, #12]
- 800648a: fb03 f302 mul.w r3, r3, r2
- 800648e: 653b str r3, [r7, #80] ; 0x50
- clst = fp->obj.sclust; /* Follow the cluster chain */
- 8006490: 68fb ldr r3, [r7, #12]
- 8006492: 689b ldr r3, [r3, #8]
- 8006494: 663b str r3, [r7, #96] ; 0x60
- for (ofs = fp->obj.objsize; res == FR_OK && ofs > bcs; ofs -= bcs) {
- 8006496: 68fb ldr r3, [r7, #12]
- 8006498: 68db ldr r3, [r3, #12]
- 800649a: 65fb str r3, [r7, #92] ; 0x5c
- 800649c: e016 b.n 80064cc <f_open+0x2fc>
- clst = get_fat(&fp->obj, clst);
- 800649e: 68fb ldr r3, [r7, #12]
- 80064a0: 6e39 ldr r1, [r7, #96] ; 0x60
- 80064a2: 4618 mov r0, r3
- 80064a4: f7fe f888 bl 80045b8 <get_fat>
- 80064a8: 6638 str r0, [r7, #96] ; 0x60
- if (clst <= 1) res = FR_INT_ERR;
- 80064aa: 6e3b ldr r3, [r7, #96] ; 0x60
- 80064ac: 2b01 cmp r3, #1
- 80064ae: d802 bhi.n 80064b6 <f_open+0x2e6>
- 80064b0: 2302 movs r3, #2
- 80064b2: f887 3067 strb.w r3, [r7, #103] ; 0x67
- if (clst == 0xFFFFFFFF) res = FR_DISK_ERR;
- 80064b6: 6e3b ldr r3, [r7, #96] ; 0x60
- 80064b8: f1b3 3fff cmp.w r3, #4294967295
- 80064bc: d102 bne.n 80064c4 <f_open+0x2f4>
- 80064be: 2301 movs r3, #1
- 80064c0: f887 3067 strb.w r3, [r7, #103] ; 0x67
- for (ofs = fp->obj.objsize; res == FR_OK && ofs > bcs; ofs -= bcs) {
- 80064c4: 6dfa ldr r2, [r7, #92] ; 0x5c
- 80064c6: 6d3b ldr r3, [r7, #80] ; 0x50
- 80064c8: 1ad3 subs r3, r2, r3
- 80064ca: 65fb str r3, [r7, #92] ; 0x5c
- 80064cc: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 80064d0: 2b00 cmp r3, #0
- 80064d2: d103 bne.n 80064dc <f_open+0x30c>
- 80064d4: 6dfa ldr r2, [r7, #92] ; 0x5c
- 80064d6: 6d3b ldr r3, [r7, #80] ; 0x50
- 80064d8: 429a cmp r2, r3
- 80064da: d8e0 bhi.n 800649e <f_open+0x2ce>
- }
- fp->clust = clst;
- 80064dc: 68fb ldr r3, [r7, #12]
- 80064de: 6e3a ldr r2, [r7, #96] ; 0x60
- 80064e0: 61da str r2, [r3, #28]
- if (res == FR_OK && ofs % SS(fs)) { /* Fill sector buffer if not on the sector boundary */
- 80064e2: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 80064e6: 2b00 cmp r3, #0
- 80064e8: d131 bne.n 800654e <f_open+0x37e>
- 80064ea: 697b ldr r3, [r7, #20]
- 80064ec: 899b ldrh r3, [r3, #12]
- 80064ee: 461a mov r2, r3
- 80064f0: 6dfb ldr r3, [r7, #92] ; 0x5c
- 80064f2: fbb3 f1f2 udiv r1, r3, r2
- 80064f6: fb02 f201 mul.w r2, r2, r1
- 80064fa: 1a9b subs r3, r3, r2
- 80064fc: 2b00 cmp r3, #0
- 80064fe: d026 beq.n 800654e <f_open+0x37e>
- if ((sc = clust2sect(fs, clst)) == 0) {
- 8006500: 697b ldr r3, [r7, #20]
- 8006502: 6e39 ldr r1, [r7, #96] ; 0x60
- 8006504: 4618 mov r0, r3
- 8006506: f7fe f839 bl 800457c <clust2sect>
- 800650a: 64f8 str r0, [r7, #76] ; 0x4c
- 800650c: 6cfb ldr r3, [r7, #76] ; 0x4c
- 800650e: 2b00 cmp r3, #0
- 8006510: d103 bne.n 800651a <f_open+0x34a>
- res = FR_INT_ERR;
- 8006512: 2302 movs r3, #2
- 8006514: f887 3067 strb.w r3, [r7, #103] ; 0x67
- 8006518: e019 b.n 800654e <f_open+0x37e>
- } else {
- fp->sect = sc + (DWORD)(ofs / SS(fs));
- 800651a: 697b ldr r3, [r7, #20]
- 800651c: 899b ldrh r3, [r3, #12]
- 800651e: 461a mov r2, r3
- 8006520: 6dfb ldr r3, [r7, #92] ; 0x5c
- 8006522: fbb3 f2f2 udiv r2, r3, r2
- 8006526: 6cfb ldr r3, [r7, #76] ; 0x4c
- 8006528: 441a add r2, r3
- 800652a: 68fb ldr r3, [r7, #12]
- 800652c: 621a str r2, [r3, #32]
- #if !_FS_TINY
- if (disk_read(fs->drv, fp->buf, fp->sect, 1) != RES_OK) res = FR_DISK_ERR;
- 800652e: 697b ldr r3, [r7, #20]
- 8006530: 7858 ldrb r0, [r3, #1]
- 8006532: 68fb ldr r3, [r7, #12]
- 8006534: f103 0130 add.w r1, r3, #48 ; 0x30
- 8006538: 68fb ldr r3, [r7, #12]
- 800653a: 6a1a ldr r2, [r3, #32]
- 800653c: 2301 movs r3, #1
- 800653e: f7fd fc81 bl 8003e44 <disk_read>
- 8006542: 4603 mov r3, r0
- 8006544: 2b00 cmp r3, #0
- 8006546: d002 beq.n 800654e <f_open+0x37e>
- 8006548: 2301 movs r3, #1
- 800654a: f887 3067 strb.w r3, [r7, #103] ; 0x67
- }
-
- FREE_NAMBUF();
- }
-
- if (res != FR_OK) fp->obj.fs = 0; /* Invalidate file object on error */
- 800654e: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- 8006552: 2b00 cmp r3, #0
- 8006554: d002 beq.n 800655c <f_open+0x38c>
- 8006556: 68fb ldr r3, [r7, #12]
- 8006558: 2200 movs r2, #0
- 800655a: 601a str r2, [r3, #0]
-
- LEAVE_FF(fs, res);
- 800655c: f897 3067 ldrb.w r3, [r7, #103] ; 0x67
- }
- 8006560: 4618 mov r0, r3
- 8006562: 3768 adds r7, #104 ; 0x68
- 8006564: 46bd mov sp, r7
- 8006566: bd80 pop {r7, pc}
-
- 08006568 <f_write>:
- FIL* fp, /* Pointer to the file object */
- const void* buff, /* Pointer to the data to be written */
- UINT btw, /* Number of bytes to write */
- UINT* bw /* Pointer to number of bytes written */
- )
- {
- 8006568: b580 push {r7, lr}
- 800656a: b08c sub sp, #48 ; 0x30
- 800656c: af00 add r7, sp, #0
- 800656e: 60f8 str r0, [r7, #12]
- 8006570: 60b9 str r1, [r7, #8]
- 8006572: 607a str r2, [r7, #4]
- 8006574: 603b str r3, [r7, #0]
- FRESULT res;
- FATFS *fs;
- DWORD clst, sect;
- UINT wcnt, cc, csect;
- const BYTE *wbuff = (const BYTE*)buff;
- 8006576: 68bb ldr r3, [r7, #8]
- 8006578: 61fb str r3, [r7, #28]
-
-
- *bw = 0; /* Clear write byte counter */
- 800657a: 683b ldr r3, [r7, #0]
- 800657c: 2200 movs r2, #0
- 800657e: 601a str r2, [r3, #0]
- res = validate(&fp->obj, &fs); /* Check validity of the file object */
- 8006580: 68fb ldr r3, [r7, #12]
- 8006582: f107 0210 add.w r2, r7, #16
- 8006586: 4611 mov r1, r2
- 8006588: 4618 mov r0, r3
- 800658a: f7ff fda5 bl 80060d8 <validate>
- 800658e: 4603 mov r3, r0
- 8006590: f887 302f strb.w r3, [r7, #47] ; 0x2f
- if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res); /* Check validity */
- 8006594: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 8006598: 2b00 cmp r3, #0
- 800659a: d107 bne.n 80065ac <f_write+0x44>
- 800659c: 68fb ldr r3, [r7, #12]
- 800659e: 7d5b ldrb r3, [r3, #21]
- 80065a0: f887 302f strb.w r3, [r7, #47] ; 0x2f
- 80065a4: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80065a8: 2b00 cmp r3, #0
- 80065aa: d002 beq.n 80065b2 <f_write+0x4a>
- 80065ac: f897 302f ldrb.w r3, [r7, #47] ; 0x2f
- 80065b0: e16a b.n 8006888 <f_write+0x320>
- if (!(fp->flag & FA_WRITE)) LEAVE_FF(fs, FR_DENIED); /* Check access mode */
- 80065b2: 68fb ldr r3, [r7, #12]
- 80065b4: 7d1b ldrb r3, [r3, #20]
- 80065b6: f003 0302 and.w r3, r3, #2
- 80065ba: 2b00 cmp r3, #0
- 80065bc: d101 bne.n 80065c2 <f_write+0x5a>
- 80065be: 2307 movs r3, #7
- 80065c0: e162 b.n 8006888 <f_write+0x320>
-
- /* Check fptr wrap-around (file size cannot reach 4GiB on FATxx) */
- if ((!_FS_EXFAT || fs->fs_type != FS_EXFAT) && (DWORD)(fp->fptr + btw) < (DWORD)fp->fptr) {
- 80065c2: 68fb ldr r3, [r7, #12]
- 80065c4: 699a ldr r2, [r3, #24]
- 80065c6: 687b ldr r3, [r7, #4]
- 80065c8: 441a add r2, r3
- 80065ca: 68fb ldr r3, [r7, #12]
- 80065cc: 699b ldr r3, [r3, #24]
- 80065ce: 429a cmp r2, r3
- 80065d0: f080 814c bcs.w 800686c <f_write+0x304>
- btw = (UINT)(0xFFFFFFFF - (DWORD)fp->fptr);
- 80065d4: 68fb ldr r3, [r7, #12]
- 80065d6: 699b ldr r3, [r3, #24]
- 80065d8: 43db mvns r3, r3
- 80065da: 607b str r3, [r7, #4]
- }
-
- for ( ; btw; /* Repeat until all data written */
- 80065dc: e146 b.n 800686c <f_write+0x304>
- wbuff += wcnt, fp->fptr += wcnt, fp->obj.objsize = (fp->fptr > fp->obj.objsize) ? fp->fptr : fp->obj.objsize, *bw += wcnt, btw -= wcnt) {
- if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
- 80065de: 68fb ldr r3, [r7, #12]
- 80065e0: 699b ldr r3, [r3, #24]
- 80065e2: 693a ldr r2, [r7, #16]
- 80065e4: 8992 ldrh r2, [r2, #12]
- 80065e6: fbb3 f1f2 udiv r1, r3, r2
- 80065ea: fb02 f201 mul.w r2, r2, r1
- 80065ee: 1a9b subs r3, r3, r2
- 80065f0: 2b00 cmp r3, #0
- 80065f2: f040 80f1 bne.w 80067d8 <f_write+0x270>
- csect = (UINT)(fp->fptr / SS(fs)) & (fs->csize - 1); /* Sector offset in the cluster */
- 80065f6: 68fb ldr r3, [r7, #12]
- 80065f8: 699b ldr r3, [r3, #24]
- 80065fa: 693a ldr r2, [r7, #16]
- 80065fc: 8992 ldrh r2, [r2, #12]
- 80065fe: fbb3 f3f2 udiv r3, r3, r2
- 8006602: 693a ldr r2, [r7, #16]
- 8006604: 8952 ldrh r2, [r2, #10]
- 8006606: 3a01 subs r2, #1
- 8006608: 4013 ands r3, r2
- 800660a: 61bb str r3, [r7, #24]
- if (csect == 0) { /* On the cluster boundary? */
- 800660c: 69bb ldr r3, [r7, #24]
- 800660e: 2b00 cmp r3, #0
- 8006610: d143 bne.n 800669a <f_write+0x132>
- if (fp->fptr == 0) { /* On the top of the file? */
- 8006612: 68fb ldr r3, [r7, #12]
- 8006614: 699b ldr r3, [r3, #24]
- 8006616: 2b00 cmp r3, #0
- 8006618: d10c bne.n 8006634 <f_write+0xcc>
- clst = fp->obj.sclust; /* Follow from the origin */
- 800661a: 68fb ldr r3, [r7, #12]
- 800661c: 689b ldr r3, [r3, #8]
- 800661e: 62bb str r3, [r7, #40] ; 0x28
- if (clst == 0) { /* If no cluster is allocated, */
- 8006620: 6abb ldr r3, [r7, #40] ; 0x28
- 8006622: 2b00 cmp r3, #0
- 8006624: d11a bne.n 800665c <f_write+0xf4>
- clst = create_chain(&fp->obj, 0); /* create a new cluster chain */
- 8006626: 68fb ldr r3, [r7, #12]
- 8006628: 2100 movs r1, #0
- 800662a: 4618 mov r0, r3
- 800662c: f7fe fa10 bl 8004a50 <create_chain>
- 8006630: 62b8 str r0, [r7, #40] ; 0x28
- 8006632: e013 b.n 800665c <f_write+0xf4>
- }
- } else { /* On the middle or end of the file */
- #if _USE_FASTSEEK
- if (fp->cltbl) {
- 8006634: 68fb ldr r3, [r7, #12]
- 8006636: 6adb ldr r3, [r3, #44] ; 0x2c
- 8006638: 2b00 cmp r3, #0
- 800663a: d007 beq.n 800664c <f_write+0xe4>
- clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
- 800663c: 68fb ldr r3, [r7, #12]
- 800663e: 699b ldr r3, [r3, #24]
- 8006640: 4619 mov r1, r3
- 8006642: 68f8 ldr r0, [r7, #12]
- 8006644: f7fe fa9c bl 8004b80 <clmt_clust>
- 8006648: 62b8 str r0, [r7, #40] ; 0x28
- 800664a: e007 b.n 800665c <f_write+0xf4>
- } else
- #endif
- {
- clst = create_chain(&fp->obj, fp->clust); /* Follow or stretch cluster chain on the FAT */
- 800664c: 68fa ldr r2, [r7, #12]
- 800664e: 68fb ldr r3, [r7, #12]
- 8006650: 69db ldr r3, [r3, #28]
- 8006652: 4619 mov r1, r3
- 8006654: 4610 mov r0, r2
- 8006656: f7fe f9fb bl 8004a50 <create_chain>
- 800665a: 62b8 str r0, [r7, #40] ; 0x28
- }
- }
- if (clst == 0) break; /* Could not allocate a new cluster (disk full) */
- 800665c: 6abb ldr r3, [r7, #40] ; 0x28
- 800665e: 2b00 cmp r3, #0
- 8006660: f000 8109 beq.w 8006876 <f_write+0x30e>
- if (clst == 1) ABORT(fs, FR_INT_ERR);
- 8006664: 6abb ldr r3, [r7, #40] ; 0x28
- 8006666: 2b01 cmp r3, #1
- 8006668: d104 bne.n 8006674 <f_write+0x10c>
- 800666a: 68fb ldr r3, [r7, #12]
- 800666c: 2202 movs r2, #2
- 800666e: 755a strb r2, [r3, #21]
- 8006670: 2302 movs r3, #2
- 8006672: e109 b.n 8006888 <f_write+0x320>
- if (clst == 0xFFFFFFFF) ABORT(fs, FR_DISK_ERR);
- 8006674: 6abb ldr r3, [r7, #40] ; 0x28
- 8006676: f1b3 3fff cmp.w r3, #4294967295
- 800667a: d104 bne.n 8006686 <f_write+0x11e>
- 800667c: 68fb ldr r3, [r7, #12]
- 800667e: 2201 movs r2, #1
- 8006680: 755a strb r2, [r3, #21]
- 8006682: 2301 movs r3, #1
- 8006684: e100 b.n 8006888 <f_write+0x320>
- fp->clust = clst; /* Update current cluster */
- 8006686: 68fb ldr r3, [r7, #12]
- 8006688: 6aba ldr r2, [r7, #40] ; 0x28
- 800668a: 61da str r2, [r3, #28]
- if (fp->obj.sclust == 0) fp->obj.sclust = clst; /* Set start cluster if the first write */
- 800668c: 68fb ldr r3, [r7, #12]
- 800668e: 689b ldr r3, [r3, #8]
- 8006690: 2b00 cmp r3, #0
- 8006692: d102 bne.n 800669a <f_write+0x132>
- 8006694: 68fb ldr r3, [r7, #12]
- 8006696: 6aba ldr r2, [r7, #40] ; 0x28
- 8006698: 609a str r2, [r3, #8]
- }
- #if _FS_TINY
- if (fs->winsect == fp->sect && sync_window(fs) != FR_OK) ABORT(fs, FR_DISK_ERR); /* Write-back sector cache */
- #else
- if (fp->flag & FA_DIRTY) { /* Write-back sector cache */
- 800669a: 68fb ldr r3, [r7, #12]
- 800669c: 7d1b ldrb r3, [r3, #20]
- 800669e: b25b sxtb r3, r3
- 80066a0: 2b00 cmp r3, #0
- 80066a2: da18 bge.n 80066d6 <f_write+0x16e>
- if (disk_write(fs->drv, fp->buf, fp->sect, 1) != RES_OK) ABORT(fs, FR_DISK_ERR);
- 80066a4: 693b ldr r3, [r7, #16]
- 80066a6: 7858 ldrb r0, [r3, #1]
- 80066a8: 68fb ldr r3, [r7, #12]
- 80066aa: f103 0130 add.w r1, r3, #48 ; 0x30
- 80066ae: 68fb ldr r3, [r7, #12]
- 80066b0: 6a1a ldr r2, [r3, #32]
- 80066b2: 2301 movs r3, #1
- 80066b4: f7fd fbe6 bl 8003e84 <disk_write>
- 80066b8: 4603 mov r3, r0
- 80066ba: 2b00 cmp r3, #0
- 80066bc: d004 beq.n 80066c8 <f_write+0x160>
- 80066be: 68fb ldr r3, [r7, #12]
- 80066c0: 2201 movs r2, #1
- 80066c2: 755a strb r2, [r3, #21]
- 80066c4: 2301 movs r3, #1
- 80066c6: e0df b.n 8006888 <f_write+0x320>
- fp->flag &= (BYTE)~FA_DIRTY;
- 80066c8: 68fb ldr r3, [r7, #12]
- 80066ca: 7d1b ldrb r3, [r3, #20]
- 80066cc: f003 037f and.w r3, r3, #127 ; 0x7f
- 80066d0: b2da uxtb r2, r3
- 80066d2: 68fb ldr r3, [r7, #12]
- 80066d4: 751a strb r2, [r3, #20]
- }
- #endif
- sect = clust2sect(fs, fp->clust); /* Get current sector */
- 80066d6: 693a ldr r2, [r7, #16]
- 80066d8: 68fb ldr r3, [r7, #12]
- 80066da: 69db ldr r3, [r3, #28]
- 80066dc: 4619 mov r1, r3
- 80066de: 4610 mov r0, r2
- 80066e0: f7fd ff4c bl 800457c <clust2sect>
- 80066e4: 6178 str r0, [r7, #20]
- if (!sect) ABORT(fs, FR_INT_ERR);
- 80066e6: 697b ldr r3, [r7, #20]
- 80066e8: 2b00 cmp r3, #0
- 80066ea: d104 bne.n 80066f6 <f_write+0x18e>
- 80066ec: 68fb ldr r3, [r7, #12]
- 80066ee: 2202 movs r2, #2
- 80066f0: 755a strb r2, [r3, #21]
- 80066f2: 2302 movs r3, #2
- 80066f4: e0c8 b.n 8006888 <f_write+0x320>
- sect += csect;
- 80066f6: 697a ldr r2, [r7, #20]
- 80066f8: 69bb ldr r3, [r7, #24]
- 80066fa: 4413 add r3, r2
- 80066fc: 617b str r3, [r7, #20]
- cc = btw / SS(fs); /* When remaining bytes >= sector size, */
- 80066fe: 693b ldr r3, [r7, #16]
- 8006700: 899b ldrh r3, [r3, #12]
- 8006702: 461a mov r2, r3
- 8006704: 687b ldr r3, [r7, #4]
- 8006706: fbb3 f3f2 udiv r3, r3, r2
- 800670a: 623b str r3, [r7, #32]
- if (cc) { /* Write maximum contiguous sectors directly */
- 800670c: 6a3b ldr r3, [r7, #32]
- 800670e: 2b00 cmp r3, #0
- 8006710: d043 beq.n 800679a <f_write+0x232>
- if (csect + cc > fs->csize) { /* Clip at cluster boundary */
- 8006712: 69ba ldr r2, [r7, #24]
- 8006714: 6a3b ldr r3, [r7, #32]
- 8006716: 4413 add r3, r2
- 8006718: 693a ldr r2, [r7, #16]
- 800671a: 8952 ldrh r2, [r2, #10]
- 800671c: 4293 cmp r3, r2
- 800671e: d905 bls.n 800672c <f_write+0x1c4>
- cc = fs->csize - csect;
- 8006720: 693b ldr r3, [r7, #16]
- 8006722: 895b ldrh r3, [r3, #10]
- 8006724: 461a mov r2, r3
- 8006726: 69bb ldr r3, [r7, #24]
- 8006728: 1ad3 subs r3, r2, r3
- 800672a: 623b str r3, [r7, #32]
- }
- if (disk_write(fs->drv, wbuff, sect, cc) != RES_OK) ABORT(fs, FR_DISK_ERR);
- 800672c: 693b ldr r3, [r7, #16]
- 800672e: 7858 ldrb r0, [r3, #1]
- 8006730: 6a3b ldr r3, [r7, #32]
- 8006732: 697a ldr r2, [r7, #20]
- 8006734: 69f9 ldr r1, [r7, #28]
- 8006736: f7fd fba5 bl 8003e84 <disk_write>
- 800673a: 4603 mov r3, r0
- 800673c: 2b00 cmp r3, #0
- 800673e: d004 beq.n 800674a <f_write+0x1e2>
- 8006740: 68fb ldr r3, [r7, #12]
- 8006742: 2201 movs r2, #1
- 8006744: 755a strb r2, [r3, #21]
- 8006746: 2301 movs r3, #1
- 8006748: e09e b.n 8006888 <f_write+0x320>
- if (fs->winsect - sect < cc) { /* Refill sector cache if it gets invalidated by the direct write */
- mem_cpy(fs->win, wbuff + ((fs->winsect - sect) * SS(fs)), SS(fs));
- fs->wflag = 0;
- }
- #else
- if (fp->sect - sect < cc) { /* Refill sector cache if it gets invalidated by the direct write */
- 800674a: 68fb ldr r3, [r7, #12]
- 800674c: 6a1a ldr r2, [r3, #32]
- 800674e: 697b ldr r3, [r7, #20]
- 8006750: 1ad3 subs r3, r2, r3
- 8006752: 6a3a ldr r2, [r7, #32]
- 8006754: 429a cmp r2, r3
- 8006756: d918 bls.n 800678a <f_write+0x222>
- mem_cpy(fp->buf, wbuff + ((fp->sect - sect) * SS(fs)), SS(fs));
- 8006758: 68fb ldr r3, [r7, #12]
- 800675a: f103 0030 add.w r0, r3, #48 ; 0x30
- 800675e: 68fb ldr r3, [r7, #12]
- 8006760: 6a1a ldr r2, [r3, #32]
- 8006762: 697b ldr r3, [r7, #20]
- 8006764: 1ad3 subs r3, r2, r3
- 8006766: 693a ldr r2, [r7, #16]
- 8006768: 8992 ldrh r2, [r2, #12]
- 800676a: fb02 f303 mul.w r3, r2, r3
- 800676e: 69fa ldr r2, [r7, #28]
- 8006770: 18d1 adds r1, r2, r3
- 8006772: 693b ldr r3, [r7, #16]
- 8006774: 899b ldrh r3, [r3, #12]
- 8006776: 461a mov r2, r3
- 8006778: f7fd fc40 bl 8003ffc <mem_cpy>
- fp->flag &= (BYTE)~FA_DIRTY;
- 800677c: 68fb ldr r3, [r7, #12]
- 800677e: 7d1b ldrb r3, [r3, #20]
- 8006780: f003 037f and.w r3, r3, #127 ; 0x7f
- 8006784: b2da uxtb r2, r3
- 8006786: 68fb ldr r3, [r7, #12]
- 8006788: 751a strb r2, [r3, #20]
- }
- #endif
- #endif
- wcnt = SS(fs) * cc; /* Number of bytes transferred */
- 800678a: 693b ldr r3, [r7, #16]
- 800678c: 899b ldrh r3, [r3, #12]
- 800678e: 461a mov r2, r3
- 8006790: 6a3b ldr r3, [r7, #32]
- 8006792: fb02 f303 mul.w r3, r2, r3
- 8006796: 627b str r3, [r7, #36] ; 0x24
- continue;
- 8006798: e04b b.n 8006832 <f_write+0x2ca>
- if (fp->fptr >= fp->obj.objsize) { /* Avoid silly cache filling on the growing edge */
- if (sync_window(fs) != FR_OK) ABORT(fs, FR_DISK_ERR);
- fs->winsect = sect;
- }
- #else
- if (fp->sect != sect && /* Fill sector cache with file data */
- 800679a: 68fb ldr r3, [r7, #12]
- 800679c: 6a1b ldr r3, [r3, #32]
- 800679e: 697a ldr r2, [r7, #20]
- 80067a0: 429a cmp r2, r3
- 80067a2: d016 beq.n 80067d2 <f_write+0x26a>
- fp->fptr < fp->obj.objsize &&
- 80067a4: 68fb ldr r3, [r7, #12]
- 80067a6: 699a ldr r2, [r3, #24]
- 80067a8: 68fb ldr r3, [r7, #12]
- 80067aa: 68db ldr r3, [r3, #12]
- if (fp->sect != sect && /* Fill sector cache with file data */
- 80067ac: 429a cmp r2, r3
- 80067ae: d210 bcs.n 80067d2 <f_write+0x26a>
- disk_read(fs->drv, fp->buf, sect, 1) != RES_OK) {
- 80067b0: 693b ldr r3, [r7, #16]
- 80067b2: 7858 ldrb r0, [r3, #1]
- 80067b4: 68fb ldr r3, [r7, #12]
- 80067b6: f103 0130 add.w r1, r3, #48 ; 0x30
- 80067ba: 2301 movs r3, #1
- 80067bc: 697a ldr r2, [r7, #20]
- 80067be: f7fd fb41 bl 8003e44 <disk_read>
- 80067c2: 4603 mov r3, r0
- fp->fptr < fp->obj.objsize &&
- 80067c4: 2b00 cmp r3, #0
- 80067c6: d004 beq.n 80067d2 <f_write+0x26a>
- ABORT(fs, FR_DISK_ERR);
- 80067c8: 68fb ldr r3, [r7, #12]
- 80067ca: 2201 movs r2, #1
- 80067cc: 755a strb r2, [r3, #21]
- 80067ce: 2301 movs r3, #1
- 80067d0: e05a b.n 8006888 <f_write+0x320>
- }
- #endif
- fp->sect = sect;
- 80067d2: 68fb ldr r3, [r7, #12]
- 80067d4: 697a ldr r2, [r7, #20]
- 80067d6: 621a str r2, [r3, #32]
- }
- wcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes left in the sector */
- 80067d8: 693b ldr r3, [r7, #16]
- 80067da: 899b ldrh r3, [r3, #12]
- 80067dc: 4618 mov r0, r3
- 80067de: 68fb ldr r3, [r7, #12]
- 80067e0: 699b ldr r3, [r3, #24]
- 80067e2: 693a ldr r2, [r7, #16]
- 80067e4: 8992 ldrh r2, [r2, #12]
- 80067e6: fbb3 f1f2 udiv r1, r3, r2
- 80067ea: fb02 f201 mul.w r2, r2, r1
- 80067ee: 1a9b subs r3, r3, r2
- 80067f0: 1ac3 subs r3, r0, r3
- 80067f2: 627b str r3, [r7, #36] ; 0x24
- if (wcnt > btw) wcnt = btw; /* Clip it by btw if needed */
- 80067f4: 6a7a ldr r2, [r7, #36] ; 0x24
- 80067f6: 687b ldr r3, [r7, #4]
- 80067f8: 429a cmp r2, r3
- 80067fa: d901 bls.n 8006800 <f_write+0x298>
- 80067fc: 687b ldr r3, [r7, #4]
- 80067fe: 627b str r3, [r7, #36] ; 0x24
- #if _FS_TINY
- if (move_window(fs, fp->sect) != FR_OK) ABORT(fs, FR_DISK_ERR); /* Move sector window */
- mem_cpy(fs->win + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
- fs->wflag = 1;
- #else
- mem_cpy(fp->buf + fp->fptr % SS(fs), wbuff, wcnt); /* Fit data to the sector */
- 8006800: 68fb ldr r3, [r7, #12]
- 8006802: f103 0130 add.w r1, r3, #48 ; 0x30
- 8006806: 68fb ldr r3, [r7, #12]
- 8006808: 699b ldr r3, [r3, #24]
- 800680a: 693a ldr r2, [r7, #16]
- 800680c: 8992 ldrh r2, [r2, #12]
- 800680e: fbb3 f0f2 udiv r0, r3, r2
- 8006812: fb02 f200 mul.w r2, r2, r0
- 8006816: 1a9b subs r3, r3, r2
- 8006818: 440b add r3, r1
- 800681a: 6a7a ldr r2, [r7, #36] ; 0x24
- 800681c: 69f9 ldr r1, [r7, #28]
- 800681e: 4618 mov r0, r3
- 8006820: f7fd fbec bl 8003ffc <mem_cpy>
- fp->flag |= FA_DIRTY;
- 8006824: 68fb ldr r3, [r7, #12]
- 8006826: 7d1b ldrb r3, [r3, #20]
- 8006828: f063 037f orn r3, r3, #127 ; 0x7f
- 800682c: b2da uxtb r2, r3
- 800682e: 68fb ldr r3, [r7, #12]
- 8006830: 751a strb r2, [r3, #20]
- wbuff += wcnt, fp->fptr += wcnt, fp->obj.objsize = (fp->fptr > fp->obj.objsize) ? fp->fptr : fp->obj.objsize, *bw += wcnt, btw -= wcnt) {
- 8006832: 69fa ldr r2, [r7, #28]
- 8006834: 6a7b ldr r3, [r7, #36] ; 0x24
- 8006836: 4413 add r3, r2
- 8006838: 61fb str r3, [r7, #28]
- 800683a: 68fb ldr r3, [r7, #12]
- 800683c: 699a ldr r2, [r3, #24]
- 800683e: 6a7b ldr r3, [r7, #36] ; 0x24
- 8006840: 441a add r2, r3
- 8006842: 68fb ldr r3, [r7, #12]
- 8006844: 619a str r2, [r3, #24]
- 8006846: 68fb ldr r3, [r7, #12]
- 8006848: 68da ldr r2, [r3, #12]
- 800684a: 68fb ldr r3, [r7, #12]
- 800684c: 699b ldr r3, [r3, #24]
- 800684e: 429a cmp r2, r3
- 8006850: bf38 it cc
- 8006852: 461a movcc r2, r3
- 8006854: 68fb ldr r3, [r7, #12]
- 8006856: 60da str r2, [r3, #12]
- 8006858: 683b ldr r3, [r7, #0]
- 800685a: 681a ldr r2, [r3, #0]
- 800685c: 6a7b ldr r3, [r7, #36] ; 0x24
- 800685e: 441a add r2, r3
- 8006860: 683b ldr r3, [r7, #0]
- 8006862: 601a str r2, [r3, #0]
- 8006864: 687a ldr r2, [r7, #4]
- 8006866: 6a7b ldr r3, [r7, #36] ; 0x24
- 8006868: 1ad3 subs r3, r2, r3
- 800686a: 607b str r3, [r7, #4]
- for ( ; btw; /* Repeat until all data written */
- 800686c: 687b ldr r3, [r7, #4]
- 800686e: 2b00 cmp r3, #0
- 8006870: f47f aeb5 bne.w 80065de <f_write+0x76>
- 8006874: e000 b.n 8006878 <f_write+0x310>
- if (clst == 0) break; /* Could not allocate a new cluster (disk full) */
- 8006876: bf00 nop
- #endif
- }
-
- fp->flag |= FA_MODIFIED; /* Set file change flag */
- 8006878: 68fb ldr r3, [r7, #12]
- 800687a: 7d1b ldrb r3, [r3, #20]
- 800687c: f043 0340 orr.w r3, r3, #64 ; 0x40
- 8006880: b2da uxtb r2, r3
- 8006882: 68fb ldr r3, [r7, #12]
- 8006884: 751a strb r2, [r3, #20]
-
- LEAVE_FF(fs, FR_OK);
- 8006886: 2300 movs r3, #0
- }
- 8006888: 4618 mov r0, r3
- 800688a: 3730 adds r7, #48 ; 0x30
- 800688c: 46bd mov sp, r7
- 800688e: bd80 pop {r7, pc}
-
- 08006890 <f_sync>:
- /*-----------------------------------------------------------------------*/
-
- FRESULT f_sync (
- FIL* fp /* Pointer to the file object */
- )
- {
- 8006890: b580 push {r7, lr}
- 8006892: b086 sub sp, #24
- 8006894: af00 add r7, sp, #0
- 8006896: 6078 str r0, [r7, #4]
- #if _FS_EXFAT
- DIR dj;
- DEF_NAMBUF
- #endif
-
- res = validate(&fp->obj, &fs); /* Check validity of the file object */
- 8006898: 687b ldr r3, [r7, #4]
- 800689a: f107 0208 add.w r2, r7, #8
- 800689e: 4611 mov r1, r2
- 80068a0: 4618 mov r0, r3
- 80068a2: f7ff fc19 bl 80060d8 <validate>
- 80068a6: 4603 mov r3, r0
- 80068a8: 75fb strb r3, [r7, #23]
- if (res == FR_OK) {
- 80068aa: 7dfb ldrb r3, [r7, #23]
- 80068ac: 2b00 cmp r3, #0
- 80068ae: d168 bne.n 8006982 <f_sync+0xf2>
- if (fp->flag & FA_MODIFIED) { /* Is there any change to the file? */
- 80068b0: 687b ldr r3, [r7, #4]
- 80068b2: 7d1b ldrb r3, [r3, #20]
- 80068b4: f003 0340 and.w r3, r3, #64 ; 0x40
- 80068b8: 2b00 cmp r3, #0
- 80068ba: d062 beq.n 8006982 <f_sync+0xf2>
- #if !_FS_TINY
- if (fp->flag & FA_DIRTY) { /* Write-back cached data if needed */
- 80068bc: 687b ldr r3, [r7, #4]
- 80068be: 7d1b ldrb r3, [r3, #20]
- 80068c0: b25b sxtb r3, r3
- 80068c2: 2b00 cmp r3, #0
- 80068c4: da15 bge.n 80068f2 <f_sync+0x62>
- if (disk_write(fs->drv, fp->buf, fp->sect, 1) != RES_OK) LEAVE_FF(fs, FR_DISK_ERR);
- 80068c6: 68bb ldr r3, [r7, #8]
- 80068c8: 7858 ldrb r0, [r3, #1]
- 80068ca: 687b ldr r3, [r7, #4]
- 80068cc: f103 0130 add.w r1, r3, #48 ; 0x30
- 80068d0: 687b ldr r3, [r7, #4]
- 80068d2: 6a1a ldr r2, [r3, #32]
- 80068d4: 2301 movs r3, #1
- 80068d6: f7fd fad5 bl 8003e84 <disk_write>
- 80068da: 4603 mov r3, r0
- 80068dc: 2b00 cmp r3, #0
- 80068de: d001 beq.n 80068e4 <f_sync+0x54>
- 80068e0: 2301 movs r3, #1
- 80068e2: e04f b.n 8006984 <f_sync+0xf4>
- fp->flag &= (BYTE)~FA_DIRTY;
- 80068e4: 687b ldr r3, [r7, #4]
- 80068e6: 7d1b ldrb r3, [r3, #20]
- 80068e8: f003 037f and.w r3, r3, #127 ; 0x7f
- 80068ec: b2da uxtb r2, r3
- 80068ee: 687b ldr r3, [r7, #4]
- 80068f0: 751a strb r2, [r3, #20]
- }
- #endif
- /* Update the directory entry */
- tm = GET_FATTIME(); /* Modified time */
- 80068f2: f7fd fa0b bl 8003d0c <get_fattime>
- 80068f6: 6138 str r0, [r7, #16]
- FREE_NAMBUF();
- }
- } else
- #endif
- {
- res = move_window(fs, fp->dir_sect);
- 80068f8: 68ba ldr r2, [r7, #8]
- 80068fa: 687b ldr r3, [r7, #4]
- 80068fc: 6a5b ldr r3, [r3, #36] ; 0x24
- 80068fe: 4619 mov r1, r3
- 8006900: 4610 mov r0, r2
- 8006902: f7fd fd9d bl 8004440 <move_window>
- 8006906: 4603 mov r3, r0
- 8006908: 75fb strb r3, [r7, #23]
- if (res == FR_OK) {
- 800690a: 7dfb ldrb r3, [r7, #23]
- 800690c: 2b00 cmp r3, #0
- 800690e: d138 bne.n 8006982 <f_sync+0xf2>
- dir = fp->dir_ptr;
- 8006910: 687b ldr r3, [r7, #4]
- 8006912: 6a9b ldr r3, [r3, #40] ; 0x28
- 8006914: 60fb str r3, [r7, #12]
- dir[DIR_Attr] |= AM_ARC; /* Set archive bit */
- 8006916: 68fb ldr r3, [r7, #12]
- 8006918: 330b adds r3, #11
- 800691a: 781a ldrb r2, [r3, #0]
- 800691c: 68fb ldr r3, [r7, #12]
- 800691e: 330b adds r3, #11
- 8006920: f042 0220 orr.w r2, r2, #32
- 8006924: b2d2 uxtb r2, r2
- 8006926: 701a strb r2, [r3, #0]
- st_clust(fp->obj.fs, dir, fp->obj.sclust); /* Update file allocation info */
- 8006928: 687b ldr r3, [r7, #4]
- 800692a: 6818 ldr r0, [r3, #0]
- 800692c: 687b ldr r3, [r7, #4]
- 800692e: 689b ldr r3, [r3, #8]
- 8006930: 461a mov r2, r3
- 8006932: 68f9 ldr r1, [r7, #12]
- 8006934: f7fe fb20 bl 8004f78 <st_clust>
- st_dword(dir + DIR_FileSize, (DWORD)fp->obj.objsize); /* Update file size */
- 8006938: 68fb ldr r3, [r7, #12]
- 800693a: f103 021c add.w r2, r3, #28
- 800693e: 687b ldr r3, [r7, #4]
- 8006940: 68db ldr r3, [r3, #12]
- 8006942: 4619 mov r1, r3
- 8006944: 4610 mov r0, r2
- 8006946: f7fd fb2e bl 8003fa6 <st_dword>
- st_dword(dir + DIR_ModTime, tm); /* Update modified time */
- 800694a: 68fb ldr r3, [r7, #12]
- 800694c: 3316 adds r3, #22
- 800694e: 6939 ldr r1, [r7, #16]
- 8006950: 4618 mov r0, r3
- 8006952: f7fd fb28 bl 8003fa6 <st_dword>
- st_word(dir + DIR_LstAccDate, 0);
- 8006956: 68fb ldr r3, [r7, #12]
- 8006958: 3312 adds r3, #18
- 800695a: 2100 movs r1, #0
- 800695c: 4618 mov r0, r3
- 800695e: f7fd fb08 bl 8003f72 <st_word>
- fs->wflag = 1;
- 8006962: 68bb ldr r3, [r7, #8]
- 8006964: 2201 movs r2, #1
- 8006966: 70da strb r2, [r3, #3]
- res = sync_fs(fs); /* Restore it to the directory */
- 8006968: 68bb ldr r3, [r7, #8]
- 800696a: 4618 mov r0, r3
- 800696c: f7fd fd96 bl 800449c <sync_fs>
- 8006970: 4603 mov r3, r0
- 8006972: 75fb strb r3, [r7, #23]
- fp->flag &= (BYTE)~FA_MODIFIED;
- 8006974: 687b ldr r3, [r7, #4]
- 8006976: 7d1b ldrb r3, [r3, #20]
- 8006978: f023 0340 bic.w r3, r3, #64 ; 0x40
- 800697c: b2da uxtb r2, r3
- 800697e: 687b ldr r3, [r7, #4]
- 8006980: 751a strb r2, [r3, #20]
- }
- }
- }
- }
-
- LEAVE_FF(fs, res);
- 8006982: 7dfb ldrb r3, [r7, #23]
- }
- 8006984: 4618 mov r0, r3
- 8006986: 3718 adds r7, #24
- 8006988: 46bd mov sp, r7
- 800698a: bd80 pop {r7, pc}
-
- 0800698c <f_close>:
- /*-----------------------------------------------------------------------*/
-
- FRESULT f_close (
- FIL* fp /* Pointer to the file object to be closed */
- )
- {
- 800698c: b580 push {r7, lr}
- 800698e: b084 sub sp, #16
- 8006990: af00 add r7, sp, #0
- 8006992: 6078 str r0, [r7, #4]
- FRESULT res;
- FATFS *fs;
-
- #if !_FS_READONLY
- res = f_sync(fp); /* Flush cached data */
- 8006994: 6878 ldr r0, [r7, #4]
- 8006996: f7ff ff7b bl 8006890 <f_sync>
- 800699a: 4603 mov r3, r0
- 800699c: 73fb strb r3, [r7, #15]
- if (res == FR_OK)
- 800699e: 7bfb ldrb r3, [r7, #15]
- 80069a0: 2b00 cmp r3, #0
- 80069a2: d118 bne.n 80069d6 <f_close+0x4a>
- #endif
- {
- res = validate(&fp->obj, &fs); /* Lock volume */
- 80069a4: 687b ldr r3, [r7, #4]
- 80069a6: f107 0208 add.w r2, r7, #8
- 80069aa: 4611 mov r1, r2
- 80069ac: 4618 mov r0, r3
- 80069ae: f7ff fb93 bl 80060d8 <validate>
- 80069b2: 4603 mov r3, r0
- 80069b4: 73fb strb r3, [r7, #15]
- if (res == FR_OK) {
- 80069b6: 7bfb ldrb r3, [r7, #15]
- 80069b8: 2b00 cmp r3, #0
- 80069ba: d10c bne.n 80069d6 <f_close+0x4a>
- #if _FS_LOCK != 0
- res = dec_lock(fp->obj.lockid); /* Decrement file open counter */
- 80069bc: 687b ldr r3, [r7, #4]
- 80069be: 691b ldr r3, [r3, #16]
- 80069c0: 4618 mov r0, r3
- 80069c2: f7fd fc9d bl 8004300 <dec_lock>
- 80069c6: 4603 mov r3, r0
- 80069c8: 73fb strb r3, [r7, #15]
- if (res == FR_OK)
- 80069ca: 7bfb ldrb r3, [r7, #15]
- 80069cc: 2b00 cmp r3, #0
- 80069ce: d102 bne.n 80069d6 <f_close+0x4a>
- #endif
- {
- fp->obj.fs = 0; /* Invalidate file object */
- 80069d0: 687b ldr r3, [r7, #4]
- 80069d2: 2200 movs r2, #0
- 80069d4: 601a str r2, [r3, #0]
- #if _FS_REENTRANT
- unlock_fs(fs, FR_OK); /* Unlock volume */
- #endif
- }
- }
- return res;
- 80069d6: 7bfb ldrb r3, [r7, #15]
- }
- 80069d8: 4618 mov r0, r3
- 80069da: 3710 adds r7, #16
- 80069dc: 46bd mov sp, r7
- 80069de: bd80 pop {r7, pc}
-
- 080069e0 <putc_bfd>:
- static
- void putc_bfd ( /* Buffered write with code conversion */
- putbuff* pb,
- TCHAR c
- )
- {
- 80069e0: b580 push {r7, lr}
- 80069e2: b084 sub sp, #16
- 80069e4: af00 add r7, sp, #0
- 80069e6: 6078 str r0, [r7, #4]
- 80069e8: 460b mov r3, r1
- 80069ea: 70fb strb r3, [r7, #3]
- UINT bw;
- int i;
-
-
- if (_USE_STRFUNC == 2 && c == '\n') { /* LF -> CRLF conversion */
- 80069ec: 78fb ldrb r3, [r7, #3]
- 80069ee: 2b0a cmp r3, #10
- 80069f0: d103 bne.n 80069fa <putc_bfd+0x1a>
- putc_bfd(pb, '\r');
- 80069f2: 210d movs r1, #13
- 80069f4: 6878 ldr r0, [r7, #4]
- 80069f6: f7ff fff3 bl 80069e0 <putc_bfd>
- }
-
- i = pb->idx; /* Write index of pb->buf[] */
- 80069fa: 687b ldr r3, [r7, #4]
- 80069fc: 685b ldr r3, [r3, #4]
- 80069fe: 60fb str r3, [r7, #12]
- if (i < 0) return;
- 8006a00: 68fb ldr r3, [r7, #12]
- 8006a02: 2b00 cmp r3, #0
- 8006a04: db25 blt.n 8006a52 <putc_bfd+0x72>
- if (c >= 0x100)
- pb->buf[i++] = (BYTE)(c >> 8);
- pb->buf[i++] = (BYTE)c;
- #endif
- #else /* Write a character without conversion */
- pb->buf[i++] = (BYTE)c;
- 8006a06: 68fb ldr r3, [r7, #12]
- 8006a08: 1c5a adds r2, r3, #1
- 8006a0a: 60fa str r2, [r7, #12]
- 8006a0c: 687a ldr r2, [r7, #4]
- 8006a0e: 4413 add r3, r2
- 8006a10: 78fa ldrb r2, [r7, #3]
- 8006a12: 731a strb r2, [r3, #12]
- #endif
-
- if (i >= (int)(sizeof pb->buf) - 3) { /* Write buffered characters to the file */
- 8006a14: 68fb ldr r3, [r7, #12]
- 8006a16: 2b3c cmp r3, #60 ; 0x3c
- 8006a18: dd12 ble.n 8006a40 <putc_bfd+0x60>
- f_write(pb->fp, pb->buf, (UINT)i, &bw);
- 8006a1a: 687b ldr r3, [r7, #4]
- 8006a1c: 6818 ldr r0, [r3, #0]
- 8006a1e: 687b ldr r3, [r7, #4]
- 8006a20: f103 010c add.w r1, r3, #12
- 8006a24: 68fa ldr r2, [r7, #12]
- 8006a26: f107 0308 add.w r3, r7, #8
- 8006a2a: f7ff fd9d bl 8006568 <f_write>
- i = (bw == (UINT)i) ? 0 : -1;
- 8006a2e: 68ba ldr r2, [r7, #8]
- 8006a30: 68fb ldr r3, [r7, #12]
- 8006a32: 429a cmp r2, r3
- 8006a34: d101 bne.n 8006a3a <putc_bfd+0x5a>
- 8006a36: 2300 movs r3, #0
- 8006a38: e001 b.n 8006a3e <putc_bfd+0x5e>
- 8006a3a: f04f 33ff mov.w r3, #4294967295
- 8006a3e: 60fb str r3, [r7, #12]
- }
- pb->idx = i;
- 8006a40: 687b ldr r3, [r7, #4]
- 8006a42: 68fa ldr r2, [r7, #12]
- 8006a44: 605a str r2, [r3, #4]
- pb->nchr++;
- 8006a46: 687b ldr r3, [r7, #4]
- 8006a48: 689b ldr r3, [r3, #8]
- 8006a4a: 1c5a adds r2, r3, #1
- 8006a4c: 687b ldr r3, [r7, #4]
- 8006a4e: 609a str r2, [r3, #8]
- 8006a50: e000 b.n 8006a54 <putc_bfd+0x74>
- if (i < 0) return;
- 8006a52: bf00 nop
- }
- 8006a54: 3710 adds r7, #16
- 8006a56: 46bd mov sp, r7
- 8006a58: bd80 pop {r7, pc}
-
- 08006a5a <putc_flush>:
-
- static
- int putc_flush ( /* Flush left characters in the buffer */
- putbuff* pb
- )
- {
- 8006a5a: b580 push {r7, lr}
- 8006a5c: b084 sub sp, #16
- 8006a5e: af00 add r7, sp, #0
- 8006a60: 6078 str r0, [r7, #4]
- UINT nw;
-
- if ( pb->idx >= 0 /* Flush buffered characters to the file */
- 8006a62: 687b ldr r3, [r7, #4]
- 8006a64: 685b ldr r3, [r3, #4]
- 8006a66: 2b00 cmp r3, #0
- 8006a68: db17 blt.n 8006a9a <putc_flush+0x40>
- && f_write(pb->fp, pb->buf, (UINT)pb->idx, &nw) == FR_OK
- 8006a6a: 687b ldr r3, [r7, #4]
- 8006a6c: 6818 ldr r0, [r3, #0]
- 8006a6e: 687b ldr r3, [r7, #4]
- 8006a70: f103 010c add.w r1, r3, #12
- 8006a74: 687b ldr r3, [r7, #4]
- 8006a76: 685b ldr r3, [r3, #4]
- 8006a78: 461a mov r2, r3
- 8006a7a: f107 030c add.w r3, r7, #12
- 8006a7e: f7ff fd73 bl 8006568 <f_write>
- 8006a82: 4603 mov r3, r0
- 8006a84: 2b00 cmp r3, #0
- 8006a86: d108 bne.n 8006a9a <putc_flush+0x40>
- && (UINT)pb->idx == nw) return pb->nchr;
- 8006a88: 687b ldr r3, [r7, #4]
- 8006a8a: 685b ldr r3, [r3, #4]
- 8006a8c: 461a mov r2, r3
- 8006a8e: 68fb ldr r3, [r7, #12]
- 8006a90: 429a cmp r2, r3
- 8006a92: d102 bne.n 8006a9a <putc_flush+0x40>
- 8006a94: 687b ldr r3, [r7, #4]
- 8006a96: 689b ldr r3, [r3, #8]
- 8006a98: e001 b.n 8006a9e <putc_flush+0x44>
- return EOF;
- 8006a9a: f04f 33ff mov.w r3, #4294967295
- }
- 8006a9e: 4618 mov r0, r3
- 8006aa0: 3710 adds r7, #16
- 8006aa2: 46bd mov sp, r7
- 8006aa4: bd80 pop {r7, pc}
-
- 08006aa6 <putc_init>:
- static
- void putc_init ( /* Initialize write buffer */
- putbuff* pb,
- FIL* fp
- )
- {
- 8006aa6: b480 push {r7}
- 8006aa8: b083 sub sp, #12
- 8006aaa: af00 add r7, sp, #0
- 8006aac: 6078 str r0, [r7, #4]
- 8006aae: 6039 str r1, [r7, #0]
- pb->fp = fp;
- 8006ab0: 687b ldr r3, [r7, #4]
- 8006ab2: 683a ldr r2, [r7, #0]
- 8006ab4: 601a str r2, [r3, #0]
- pb->nchr = pb->idx = 0;
- 8006ab6: 687b ldr r3, [r7, #4]
- 8006ab8: 2200 movs r2, #0
- 8006aba: 605a str r2, [r3, #4]
- 8006abc: 687b ldr r3, [r7, #4]
- 8006abe: 685a ldr r2, [r3, #4]
- 8006ac0: 687b ldr r3, [r7, #4]
- 8006ac2: 609a str r2, [r3, #8]
- }
- 8006ac4: bf00 nop
- 8006ac6: 370c adds r7, #12
- 8006ac8: 46bd mov sp, r7
- 8006aca: bc80 pop {r7}
- 8006acc: 4770 bx lr
-
- 08006ace <f_puts>:
-
- int f_puts (
- const TCHAR* str, /* Pointer to the string to be output */
- FIL* fp /* Pointer to the file object */
- )
- {
- 8006ace: b580 push {r7, lr}
- 8006ad0: b096 sub sp, #88 ; 0x58
- 8006ad2: af00 add r7, sp, #0
- 8006ad4: 6078 str r0, [r7, #4]
- 8006ad6: 6039 str r1, [r7, #0]
- putbuff pb;
-
-
- putc_init(&pb, fp);
- 8006ad8: f107 030c add.w r3, r7, #12
- 8006adc: 6839 ldr r1, [r7, #0]
- 8006ade: 4618 mov r0, r3
- 8006ae0: f7ff ffe1 bl 8006aa6 <putc_init>
- while (*str) putc_bfd(&pb, *str++); /* Put the string */
- 8006ae4: e009 b.n 8006afa <f_puts+0x2c>
- 8006ae6: 687b ldr r3, [r7, #4]
- 8006ae8: 1c5a adds r2, r3, #1
- 8006aea: 607a str r2, [r7, #4]
- 8006aec: 781a ldrb r2, [r3, #0]
- 8006aee: f107 030c add.w r3, r7, #12
- 8006af2: 4611 mov r1, r2
- 8006af4: 4618 mov r0, r3
- 8006af6: f7ff ff73 bl 80069e0 <putc_bfd>
- 8006afa: 687b ldr r3, [r7, #4]
- 8006afc: 781b ldrb r3, [r3, #0]
- 8006afe: 2b00 cmp r3, #0
- 8006b00: d1f1 bne.n 8006ae6 <f_puts+0x18>
- return putc_flush(&pb);
- 8006b02: f107 030c add.w r3, r7, #12
- 8006b06: 4618 mov r0, r3
- 8006b08: f7ff ffa7 bl 8006a5a <putc_flush>
- 8006b0c: 4603 mov r3, r0
- }
- 8006b0e: 4618 mov r0, r3
- 8006b10: 3758 adds r7, #88 ; 0x58
- 8006b12: 46bd mov sp, r7
- 8006b14: bd80 pop {r7, pc}
- ...
-
- 08006b18 <f_printf>:
- int f_printf (
- FIL* fp, /* Pointer to the file object */
- const TCHAR* fmt, /* Pointer to the format string */
- ... /* Optional arguments... */
- )
- {
- 8006b18: b40e push {r1, r2, r3}
- 8006b1a: b580 push {r7, lr}
- 8006b1c: b0a7 sub sp, #156 ; 0x9c
- 8006b1e: af00 add r7, sp, #0
- 8006b20: 6078 str r0, [r7, #4]
- UINT i, j, w;
- DWORD v;
- TCHAR c, d, str[32], *p;
-
-
- putc_init(&pb, fp);
- 8006b22: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006b26: 6879 ldr r1, [r7, #4]
- 8006b28: 4618 mov r0, r3
- 8006b2a: f7ff ffbc bl 8006aa6 <putc_init>
-
- va_start(arp, fmt);
- 8006b2e: f107 03a8 add.w r3, r7, #168 ; 0xa8
- 8006b32: 67bb str r3, [r7, #120] ; 0x78
-
- for (;;) {
- c = *fmt++;
- 8006b34: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
- 8006b38: 1c5a adds r2, r3, #1
- 8006b3a: f8c7 20a4 str.w r2, [r7, #164] ; 0xa4
- 8006b3e: 781b ldrb r3, [r3, #0]
- 8006b40: f887 3083 strb.w r3, [r7, #131] ; 0x83
- if (c == 0) break; /* End of string */
- 8006b44: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006b48: 2b00 cmp r3, #0
- 8006b4a: f000 81f4 beq.w 8006f36 <f_printf+0x41e>
- if (c != '%') { /* Non escape character */
- 8006b4e: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006b52: 2b25 cmp r3, #37 ; 0x25
- 8006b54: d008 beq.n 8006b68 <f_printf+0x50>
- putc_bfd(&pb, c);
- 8006b56: f897 2083 ldrb.w r2, [r7, #131] ; 0x83
- 8006b5a: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006b5e: 4611 mov r1, r2
- 8006b60: 4618 mov r0, r3
- 8006b62: f7ff ff3d bl 80069e0 <putc_bfd>
- continue;
- 8006b66: e1e5 b.n 8006f34 <f_printf+0x41c>
- }
- w = f = 0;
- 8006b68: 2300 movs r3, #0
- 8006b6a: f887 3097 strb.w r3, [r7, #151] ; 0x97
- 8006b6e: 2300 movs r3, #0
- 8006b70: f8c7 3088 str.w r3, [r7, #136] ; 0x88
- c = *fmt++;
- 8006b74: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
- 8006b78: 1c5a adds r2, r3, #1
- 8006b7a: f8c7 20a4 str.w r2, [r7, #164] ; 0xa4
- 8006b7e: 781b ldrb r3, [r3, #0]
- 8006b80: f887 3083 strb.w r3, [r7, #131] ; 0x83
- if (c == '0') { /* Flag: '0' padding */
- 8006b84: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006b88: 2b30 cmp r3, #48 ; 0x30
- 8006b8a: d10b bne.n 8006ba4 <f_printf+0x8c>
- f = 1; c = *fmt++;
- 8006b8c: 2301 movs r3, #1
- 8006b8e: f887 3097 strb.w r3, [r7, #151] ; 0x97
- 8006b92: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
- 8006b96: 1c5a adds r2, r3, #1
- 8006b98: f8c7 20a4 str.w r2, [r7, #164] ; 0xa4
- 8006b9c: 781b ldrb r3, [r3, #0]
- 8006b9e: f887 3083 strb.w r3, [r7, #131] ; 0x83
- 8006ba2: e024 b.n 8006bee <f_printf+0xd6>
- } else {
- if (c == '-') { /* Flag: left justified */
- 8006ba4: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006ba8: 2b2d cmp r3, #45 ; 0x2d
- 8006baa: d120 bne.n 8006bee <f_printf+0xd6>
- f = 2; c = *fmt++;
- 8006bac: 2302 movs r3, #2
- 8006bae: f887 3097 strb.w r3, [r7, #151] ; 0x97
- 8006bb2: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
- 8006bb6: 1c5a adds r2, r3, #1
- 8006bb8: f8c7 20a4 str.w r2, [r7, #164] ; 0xa4
- 8006bbc: 781b ldrb r3, [r3, #0]
- 8006bbe: f887 3083 strb.w r3, [r7, #131] ; 0x83
- }
- }
- while (IsDigit(c)) { /* Precision */
- 8006bc2: e014 b.n 8006bee <f_printf+0xd6>
- w = w * 10 + c - '0';
- 8006bc4: f8d7 2088 ldr.w r2, [r7, #136] ; 0x88
- 8006bc8: 4613 mov r3, r2
- 8006bca: 009b lsls r3, r3, #2
- 8006bcc: 4413 add r3, r2
- 8006bce: 005b lsls r3, r3, #1
- 8006bd0: 461a mov r2, r3
- 8006bd2: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006bd6: 4413 add r3, r2
- 8006bd8: 3b30 subs r3, #48 ; 0x30
- 8006bda: f8c7 3088 str.w r3, [r7, #136] ; 0x88
- c = *fmt++;
- 8006bde: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
- 8006be2: 1c5a adds r2, r3, #1
- 8006be4: f8c7 20a4 str.w r2, [r7, #164] ; 0xa4
- 8006be8: 781b ldrb r3, [r3, #0]
- 8006bea: f887 3083 strb.w r3, [r7, #131] ; 0x83
- while (IsDigit(c)) { /* Precision */
- 8006bee: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006bf2: 2b2f cmp r3, #47 ; 0x2f
- 8006bf4: d903 bls.n 8006bfe <f_printf+0xe6>
- 8006bf6: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006bfa: 2b39 cmp r3, #57 ; 0x39
- 8006bfc: d9e2 bls.n 8006bc4 <f_printf+0xac>
- }
- if (c == 'l' || c == 'L') { /* Prefix: Size is long int */
- 8006bfe: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006c02: 2b6c cmp r3, #108 ; 0x6c
- 8006c04: d003 beq.n 8006c0e <f_printf+0xf6>
- 8006c06: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006c0a: 2b4c cmp r3, #76 ; 0x4c
- 8006c0c: d10d bne.n 8006c2a <f_printf+0x112>
- f |= 4; c = *fmt++;
- 8006c0e: f897 3097 ldrb.w r3, [r7, #151] ; 0x97
- 8006c12: f043 0304 orr.w r3, r3, #4
- 8006c16: f887 3097 strb.w r3, [r7, #151] ; 0x97
- 8006c1a: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4
- 8006c1e: 1c5a adds r2, r3, #1
- 8006c20: f8c7 20a4 str.w r2, [r7, #164] ; 0xa4
- 8006c24: 781b ldrb r3, [r3, #0]
- 8006c26: f887 3083 strb.w r3, [r7, #131] ; 0x83
- }
- if (!c) break;
- 8006c2a: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006c2e: 2b00 cmp r3, #0
- 8006c30: f000 8183 beq.w 8006f3a <f_printf+0x422>
- d = c;
- 8006c34: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006c38: f887 3082 strb.w r3, [r7, #130] ; 0x82
- if (IsLower(d)) d -= 0x20;
- 8006c3c: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006c40: 2b60 cmp r3, #96 ; 0x60
- 8006c42: d908 bls.n 8006c56 <f_printf+0x13e>
- 8006c44: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006c48: 2b7a cmp r3, #122 ; 0x7a
- 8006c4a: d804 bhi.n 8006c56 <f_printf+0x13e>
- 8006c4c: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006c50: 3b20 subs r3, #32
- 8006c52: f887 3082 strb.w r3, [r7, #130] ; 0x82
- switch (d) { /* Type is... */
- 8006c56: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006c5a: 3b42 subs r3, #66 ; 0x42
- 8006c5c: 2b16 cmp r3, #22
- 8006c5e: f200 8098 bhi.w 8006d92 <f_printf+0x27a>
- 8006c62: a201 add r2, pc, #4 ; (adr r2, 8006c68 <f_printf+0x150>)
- 8006c64: f852 f023 ldr.w pc, [r2, r3, lsl #2]
- 8006c68: 08006d73 .word 0x08006d73
- 8006c6c: 08006d5b .word 0x08006d5b
- 8006c70: 08006d83 .word 0x08006d83
- 8006c74: 08006d93 .word 0x08006d93
- 8006c78: 08006d93 .word 0x08006d93
- 8006c7c: 08006d93 .word 0x08006d93
- 8006c80: 08006d93 .word 0x08006d93
- 8006c84: 08006d93 .word 0x08006d93
- 8006c88: 08006d93 .word 0x08006d93
- 8006c8c: 08006d93 .word 0x08006d93
- 8006c90: 08006d93 .word 0x08006d93
- 8006c94: 08006d93 .word 0x08006d93
- 8006c98: 08006d93 .word 0x08006d93
- 8006c9c: 08006d7b .word 0x08006d7b
- 8006ca0: 08006d93 .word 0x08006d93
- 8006ca4: 08006d93 .word 0x08006d93
- 8006ca8: 08006d93 .word 0x08006d93
- 8006cac: 08006cc5 .word 0x08006cc5
- 8006cb0: 08006d93 .word 0x08006d93
- 8006cb4: 08006d83 .word 0x08006d83
- 8006cb8: 08006d93 .word 0x08006d93
- 8006cbc: 08006d93 .word 0x08006d93
- 8006cc0: 08006d8b .word 0x08006d8b
- case 'S' : /* String */
- p = va_arg(arp, TCHAR*);
- 8006cc4: 6fbb ldr r3, [r7, #120] ; 0x78
- 8006cc6: 1d1a adds r2, r3, #4
- 8006cc8: 67ba str r2, [r7, #120] ; 0x78
- 8006cca: 681b ldr r3, [r3, #0]
- 8006ccc: 67fb str r3, [r7, #124] ; 0x7c
- for (j = 0; p[j]; j++) ;
- 8006cce: 2300 movs r3, #0
- 8006cd0: f8c7 308c str.w r3, [r7, #140] ; 0x8c
- 8006cd4: e004 b.n 8006ce0 <f_printf+0x1c8>
- 8006cd6: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
- 8006cda: 3301 adds r3, #1
- 8006cdc: f8c7 308c str.w r3, [r7, #140] ; 0x8c
- 8006ce0: 6ffa ldr r2, [r7, #124] ; 0x7c
- 8006ce2: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
- 8006ce6: 4413 add r3, r2
- 8006ce8: 781b ldrb r3, [r3, #0]
- 8006cea: 2b00 cmp r3, #0
- 8006cec: d1f3 bne.n 8006cd6 <f_printf+0x1be>
- if (!(f & 2)) {
- 8006cee: f897 3097 ldrb.w r3, [r7, #151] ; 0x97
- 8006cf2: f003 0302 and.w r3, r3, #2
- 8006cf6: 2b00 cmp r3, #0
- 8006cf8: d11a bne.n 8006d30 <f_printf+0x218>
- while (j++ < w) putc_bfd(&pb, ' ');
- 8006cfa: e005 b.n 8006d08 <f_printf+0x1f0>
- 8006cfc: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006d00: 2120 movs r1, #32
- 8006d02: 4618 mov r0, r3
- 8006d04: f7ff fe6c bl 80069e0 <putc_bfd>
- 8006d08: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
- 8006d0c: 1c5a adds r2, r3, #1
- 8006d0e: f8c7 208c str.w r2, [r7, #140] ; 0x8c
- 8006d12: f8d7 2088 ldr.w r2, [r7, #136] ; 0x88
- 8006d16: 429a cmp r2, r3
- 8006d18: d8f0 bhi.n 8006cfc <f_printf+0x1e4>
- }
- while (*p) putc_bfd(&pb, *p++);
- 8006d1a: e009 b.n 8006d30 <f_printf+0x218>
- 8006d1c: 6ffb ldr r3, [r7, #124] ; 0x7c
- 8006d1e: 1c5a adds r2, r3, #1
- 8006d20: 67fa str r2, [r7, #124] ; 0x7c
- 8006d22: 781a ldrb r2, [r3, #0]
- 8006d24: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006d28: 4611 mov r1, r2
- 8006d2a: 4618 mov r0, r3
- 8006d2c: f7ff fe58 bl 80069e0 <putc_bfd>
- 8006d30: 6ffb ldr r3, [r7, #124] ; 0x7c
- 8006d32: 781b ldrb r3, [r3, #0]
- 8006d34: 2b00 cmp r3, #0
- 8006d36: d1f1 bne.n 8006d1c <f_printf+0x204>
- while (j++ < w) putc_bfd(&pb, ' ');
- 8006d38: e005 b.n 8006d46 <f_printf+0x22e>
- 8006d3a: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006d3e: 2120 movs r1, #32
- 8006d40: 4618 mov r0, r3
- 8006d42: f7ff fe4d bl 80069e0 <putc_bfd>
- 8006d46: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
- 8006d4a: 1c5a adds r2, r3, #1
- 8006d4c: f8c7 208c str.w r2, [r7, #140] ; 0x8c
- 8006d50: f8d7 2088 ldr.w r2, [r7, #136] ; 0x88
- 8006d54: 429a cmp r2, r3
- 8006d56: d8f0 bhi.n 8006d3a <f_printf+0x222>
- continue;
- 8006d58: e0ec b.n 8006f34 <f_printf+0x41c>
-
- case 'C' : /* Character */
- putc_bfd(&pb, (TCHAR)va_arg(arp, int)); continue;
- 8006d5a: 6fbb ldr r3, [r7, #120] ; 0x78
- 8006d5c: 1d1a adds r2, r3, #4
- 8006d5e: 67ba str r2, [r7, #120] ; 0x78
- 8006d60: 681b ldr r3, [r3, #0]
- 8006d62: b2da uxtb r2, r3
- 8006d64: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006d68: 4611 mov r1, r2
- 8006d6a: 4618 mov r0, r3
- 8006d6c: f7ff fe38 bl 80069e0 <putc_bfd>
- 8006d70: e0e0 b.n 8006f34 <f_printf+0x41c>
-
- case 'B' : /* Binary */
- r = 2; break;
- 8006d72: 2302 movs r3, #2
- 8006d74: f887 3096 strb.w r3, [r7, #150] ; 0x96
- 8006d78: e014 b.n 8006da4 <f_printf+0x28c>
-
- case 'O' : /* Octal */
- r = 8; break;
- 8006d7a: 2308 movs r3, #8
- 8006d7c: f887 3096 strb.w r3, [r7, #150] ; 0x96
- 8006d80: e010 b.n 8006da4 <f_printf+0x28c>
-
- case 'D' : /* Signed decimal */
- case 'U' : /* Unsigned decimal */
- r = 10; break;
- 8006d82: 230a movs r3, #10
- 8006d84: f887 3096 strb.w r3, [r7, #150] ; 0x96
- 8006d88: e00c b.n 8006da4 <f_printf+0x28c>
-
- case 'X' : /* Hexdecimal */
- r = 16; break;
- 8006d8a: 2310 movs r3, #16
- 8006d8c: f887 3096 strb.w r3, [r7, #150] ; 0x96
- 8006d90: e008 b.n 8006da4 <f_printf+0x28c>
-
- default: /* Unknown type (pass-through) */
- putc_bfd(&pb, c); continue;
- 8006d92: f897 2083 ldrb.w r2, [r7, #131] ; 0x83
- 8006d96: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006d9a: 4611 mov r1, r2
- 8006d9c: 4618 mov r0, r3
- 8006d9e: f7ff fe1f bl 80069e0 <putc_bfd>
- 8006da2: e0c7 b.n 8006f34 <f_printf+0x41c>
- }
-
- /* Get an argument and put it in numeral */
- v = (f & 4) ? (DWORD)va_arg(arp, long) : ((d == 'D') ? (DWORD)(long)va_arg(arp, int) : (DWORD)va_arg(arp, unsigned int));
- 8006da4: f897 3097 ldrb.w r3, [r7, #151] ; 0x97
- 8006da8: f003 0304 and.w r3, r3, #4
- 8006dac: 2b00 cmp r3, #0
- 8006dae: d004 beq.n 8006dba <f_printf+0x2a2>
- 8006db0: 6fbb ldr r3, [r7, #120] ; 0x78
- 8006db2: 1d1a adds r2, r3, #4
- 8006db4: 67ba str r2, [r7, #120] ; 0x78
- 8006db6: 681b ldr r3, [r3, #0]
- 8006db8: e00c b.n 8006dd4 <f_printf+0x2bc>
- 8006dba: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006dbe: 2b44 cmp r3, #68 ; 0x44
- 8006dc0: d104 bne.n 8006dcc <f_printf+0x2b4>
- 8006dc2: 6fbb ldr r3, [r7, #120] ; 0x78
- 8006dc4: 1d1a adds r2, r3, #4
- 8006dc6: 67ba str r2, [r7, #120] ; 0x78
- 8006dc8: 681b ldr r3, [r3, #0]
- 8006dca: e003 b.n 8006dd4 <f_printf+0x2bc>
- 8006dcc: 6fbb ldr r3, [r7, #120] ; 0x78
- 8006dce: 1d1a adds r2, r3, #4
- 8006dd0: 67ba str r2, [r7, #120] ; 0x78
- 8006dd2: 681b ldr r3, [r3, #0]
- 8006dd4: f8c7 3084 str.w r3, [r7, #132] ; 0x84
- if (d == 'D' && (v & 0x80000000)) {
- 8006dd8: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006ddc: 2b44 cmp r3, #68 ; 0x44
- 8006dde: d10e bne.n 8006dfe <f_printf+0x2e6>
- 8006de0: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84
- 8006de4: 2b00 cmp r3, #0
- 8006de6: da0a bge.n 8006dfe <f_printf+0x2e6>
- v = 0 - v;
- 8006de8: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84
- 8006dec: 425b negs r3, r3
- 8006dee: f8c7 3084 str.w r3, [r7, #132] ; 0x84
- f |= 8;
- 8006df2: f897 3097 ldrb.w r3, [r7, #151] ; 0x97
- 8006df6: f043 0308 orr.w r3, r3, #8
- 8006dfa: f887 3097 strb.w r3, [r7, #151] ; 0x97
- }
- i = 0;
- 8006dfe: 2300 movs r3, #0
- 8006e00: f8c7 3090 str.w r3, [r7, #144] ; 0x90
- do {
- d = (TCHAR)(v % r); v /= r;
- 8006e04: f897 2096 ldrb.w r2, [r7, #150] ; 0x96
- 8006e08: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84
- 8006e0c: fbb3 f1f2 udiv r1, r3, r2
- 8006e10: fb02 f201 mul.w r2, r2, r1
- 8006e14: 1a9b subs r3, r3, r2
- 8006e16: f887 3082 strb.w r3, [r7, #130] ; 0x82
- 8006e1a: f897 3096 ldrb.w r3, [r7, #150] ; 0x96
- 8006e1e: f8d7 2084 ldr.w r2, [r7, #132] ; 0x84
- 8006e22: fbb2 f3f3 udiv r3, r2, r3
- 8006e26: f8c7 3084 str.w r3, [r7, #132] ; 0x84
- if (d > 9) d += (c == 'x') ? 0x27 : 0x07;
- 8006e2a: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006e2e: 2b09 cmp r3, #9
- 8006e30: d90b bls.n 8006e4a <f_printf+0x332>
- 8006e32: f897 3083 ldrb.w r3, [r7, #131] ; 0x83
- 8006e36: 2b78 cmp r3, #120 ; 0x78
- 8006e38: d101 bne.n 8006e3e <f_printf+0x326>
- 8006e3a: 2227 movs r2, #39 ; 0x27
- 8006e3c: e000 b.n 8006e40 <f_printf+0x328>
- 8006e3e: 2207 movs r2, #7
- 8006e40: f897 3082 ldrb.w r3, [r7, #130] ; 0x82
- 8006e44: 4413 add r3, r2
- 8006e46: f887 3082 strb.w r3, [r7, #130] ; 0x82
- str[i++] = d + '0';
- 8006e4a: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
- 8006e4e: 1c5a adds r2, r3, #1
- 8006e50: f8c7 2090 str.w r2, [r7, #144] ; 0x90
- 8006e54: f897 2082 ldrb.w r2, [r7, #130] ; 0x82
- 8006e58: 3230 adds r2, #48 ; 0x30
- 8006e5a: b2d2 uxtb r2, r2
- 8006e5c: f107 0198 add.w r1, r7, #152 ; 0x98
- 8006e60: 440b add r3, r1
- 8006e62: f803 2c8c strb.w r2, [r3, #-140]
- } while (v && i < sizeof str / sizeof str[0]);
- 8006e66: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84
- 8006e6a: 2b00 cmp r3, #0
- 8006e6c: d003 beq.n 8006e76 <f_printf+0x35e>
- 8006e6e: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
- 8006e72: 2b1f cmp r3, #31
- 8006e74: d9c6 bls.n 8006e04 <f_printf+0x2ec>
- if (f & 8) str[i++] = '-';
- 8006e76: f897 3097 ldrb.w r3, [r7, #151] ; 0x97
- 8006e7a: f003 0308 and.w r3, r3, #8
- 8006e7e: 2b00 cmp r3, #0
- 8006e80: d00a beq.n 8006e98 <f_printf+0x380>
- 8006e82: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
- 8006e86: 1c5a adds r2, r3, #1
- 8006e88: f8c7 2090 str.w r2, [r7, #144] ; 0x90
- 8006e8c: f107 0298 add.w r2, r7, #152 ; 0x98
- 8006e90: 4413 add r3, r2
- 8006e92: 222d movs r2, #45 ; 0x2d
- 8006e94: f803 2c8c strb.w r2, [r3, #-140]
- j = i; d = (f & 1) ? '0' : ' ';
- 8006e98: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
- 8006e9c: f8c7 308c str.w r3, [r7, #140] ; 0x8c
- 8006ea0: f897 3097 ldrb.w r3, [r7, #151] ; 0x97
- 8006ea4: f003 0301 and.w r3, r3, #1
- 8006ea8: 2b00 cmp r3, #0
- 8006eaa: d001 beq.n 8006eb0 <f_printf+0x398>
- 8006eac: 2330 movs r3, #48 ; 0x30
- 8006eae: e000 b.n 8006eb2 <f_printf+0x39a>
- 8006eb0: 2320 movs r3, #32
- 8006eb2: f887 3082 strb.w r3, [r7, #130] ; 0x82
- while (!(f & 2) && j++ < w) putc_bfd(&pb, d);
- 8006eb6: e007 b.n 8006ec8 <f_printf+0x3b0>
- 8006eb8: f897 2082 ldrb.w r2, [r7, #130] ; 0x82
- 8006ebc: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006ec0: 4611 mov r1, r2
- 8006ec2: 4618 mov r0, r3
- 8006ec4: f7ff fd8c bl 80069e0 <putc_bfd>
- 8006ec8: f897 3097 ldrb.w r3, [r7, #151] ; 0x97
- 8006ecc: f003 0302 and.w r3, r3, #2
- 8006ed0: 2b00 cmp r3, #0
- 8006ed2: d108 bne.n 8006ee6 <f_printf+0x3ce>
- 8006ed4: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
- 8006ed8: 1c5a adds r2, r3, #1
- 8006eda: f8c7 208c str.w r2, [r7, #140] ; 0x8c
- 8006ede: f8d7 2088 ldr.w r2, [r7, #136] ; 0x88
- 8006ee2: 429a cmp r2, r3
- 8006ee4: d8e8 bhi.n 8006eb8 <f_printf+0x3a0>
- do {
- putc_bfd(&pb, str[--i]);
- 8006ee6: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
- 8006eea: 3b01 subs r3, #1
- 8006eec: f8c7 3090 str.w r3, [r7, #144] ; 0x90
- 8006ef0: f107 020c add.w r2, r7, #12
- 8006ef4: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
- 8006ef8: 4413 add r3, r2
- 8006efa: 781a ldrb r2, [r3, #0]
- 8006efc: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006f00: 4611 mov r1, r2
- 8006f02: 4618 mov r0, r3
- 8006f04: f7ff fd6c bl 80069e0 <putc_bfd>
- } while (i);
- 8006f08: f8d7 3090 ldr.w r3, [r7, #144] ; 0x90
- 8006f0c: 2b00 cmp r3, #0
- 8006f0e: d1ea bne.n 8006ee6 <f_printf+0x3ce>
- while (j++ < w) putc_bfd(&pb, d);
- 8006f10: e007 b.n 8006f22 <f_printf+0x40a>
- 8006f12: f897 2082 ldrb.w r2, [r7, #130] ; 0x82
- 8006f16: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006f1a: 4611 mov r1, r2
- 8006f1c: 4618 mov r0, r3
- 8006f1e: f7ff fd5f bl 80069e0 <putc_bfd>
- 8006f22: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c
- 8006f26: 1c5a adds r2, r3, #1
- 8006f28: f8c7 208c str.w r2, [r7, #140] ; 0x8c
- 8006f2c: f8d7 2088 ldr.w r2, [r7, #136] ; 0x88
- 8006f30: 429a cmp r2, r3
- 8006f32: d8ee bhi.n 8006f12 <f_printf+0x3fa>
- c = *fmt++;
- 8006f34: e5fe b.n 8006b34 <f_printf+0x1c>
- if (c == 0) break; /* End of string */
- 8006f36: bf00 nop
- 8006f38: e000 b.n 8006f3c <f_printf+0x424>
- if (!c) break;
- 8006f3a: bf00 nop
- }
-
- va_end(arp);
-
- return putc_flush(&pb);
- 8006f3c: f107 032c add.w r3, r7, #44 ; 0x2c
- 8006f40: 4618 mov r0, r3
- 8006f42: f7ff fd8a bl 8006a5a <putc_flush>
- 8006f46: 4603 mov r3, r0
- }
- 8006f48: 4618 mov r0, r3
- 8006f4a: 379c adds r7, #156 ; 0x9c
- 8006f4c: 46bd mov sp, r7
- 8006f4e: e8bd 4080 ldmia.w sp!, {r7, lr}
- 8006f52: b003 add sp, #12
- 8006f54: 4770 bx lr
- 8006f56: bf00 nop
-
- 08006f58 <FATFS_LinkDriverEx>:
- * @param lun : only used for USB Key Disk to add multi-lun management
- else the parameter must be equal to 0
- * @retval Returns 0 in case of success, otherwise 1.
- */
- uint8_t FATFS_LinkDriverEx(const Diskio_drvTypeDef *drv, char *path, uint8_t lun)
- {
- 8006f58: b480 push {r7}
- 8006f5a: b087 sub sp, #28
- 8006f5c: af00 add r7, sp, #0
- 8006f5e: 60f8 str r0, [r7, #12]
- 8006f60: 60b9 str r1, [r7, #8]
- 8006f62: 4613 mov r3, r2
- 8006f64: 71fb strb r3, [r7, #7]
- uint8_t ret = 1;
- 8006f66: 2301 movs r3, #1
- 8006f68: 75fb strb r3, [r7, #23]
- uint8_t DiskNum = 0;
- 8006f6a: 2300 movs r3, #0
- 8006f6c: 75bb strb r3, [r7, #22]
-
- if(disk.nbr < _VOLUMES)
- 8006f6e: 4b1e ldr r3, [pc, #120] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006f70: 7a5b ldrb r3, [r3, #9]
- 8006f72: b2db uxtb r3, r3
- 8006f74: 2b00 cmp r3, #0
- 8006f76: d131 bne.n 8006fdc <FATFS_LinkDriverEx+0x84>
- {
- disk.is_initialized[disk.nbr] = 0;
- 8006f78: 4b1b ldr r3, [pc, #108] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006f7a: 7a5b ldrb r3, [r3, #9]
- 8006f7c: b2db uxtb r3, r3
- 8006f7e: 461a mov r2, r3
- 8006f80: 4b19 ldr r3, [pc, #100] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006f82: 2100 movs r1, #0
- 8006f84: 5499 strb r1, [r3, r2]
- disk.drv[disk.nbr] = drv;
- 8006f86: 4b18 ldr r3, [pc, #96] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006f88: 7a5b ldrb r3, [r3, #9]
- 8006f8a: b2db uxtb r3, r3
- 8006f8c: 4a16 ldr r2, [pc, #88] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006f8e: 009b lsls r3, r3, #2
- 8006f90: 4413 add r3, r2
- 8006f92: 68fa ldr r2, [r7, #12]
- 8006f94: 605a str r2, [r3, #4]
- disk.lun[disk.nbr] = lun;
- 8006f96: 4b14 ldr r3, [pc, #80] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006f98: 7a5b ldrb r3, [r3, #9]
- 8006f9a: b2db uxtb r3, r3
- 8006f9c: 461a mov r2, r3
- 8006f9e: 4b12 ldr r3, [pc, #72] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006fa0: 4413 add r3, r2
- 8006fa2: 79fa ldrb r2, [r7, #7]
- 8006fa4: 721a strb r2, [r3, #8]
- DiskNum = disk.nbr++;
- 8006fa6: 4b10 ldr r3, [pc, #64] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006fa8: 7a5b ldrb r3, [r3, #9]
- 8006faa: b2db uxtb r3, r3
- 8006fac: 1c5a adds r2, r3, #1
- 8006fae: b2d1 uxtb r1, r2
- 8006fb0: 4a0d ldr r2, [pc, #52] ; (8006fe8 <FATFS_LinkDriverEx+0x90>)
- 8006fb2: 7251 strb r1, [r2, #9]
- 8006fb4: 75bb strb r3, [r7, #22]
- path[0] = DiskNum + '0';
- 8006fb6: 7dbb ldrb r3, [r7, #22]
- 8006fb8: 3330 adds r3, #48 ; 0x30
- 8006fba: b2da uxtb r2, r3
- 8006fbc: 68bb ldr r3, [r7, #8]
- 8006fbe: 701a strb r2, [r3, #0]
- path[1] = ':';
- 8006fc0: 68bb ldr r3, [r7, #8]
- 8006fc2: 3301 adds r3, #1
- 8006fc4: 223a movs r2, #58 ; 0x3a
- 8006fc6: 701a strb r2, [r3, #0]
- path[2] = '/';
- 8006fc8: 68bb ldr r3, [r7, #8]
- 8006fca: 3302 adds r3, #2
- 8006fcc: 222f movs r2, #47 ; 0x2f
- 8006fce: 701a strb r2, [r3, #0]
- path[3] = 0;
- 8006fd0: 68bb ldr r3, [r7, #8]
- 8006fd2: 3303 adds r3, #3
- 8006fd4: 2200 movs r2, #0
- 8006fd6: 701a strb r2, [r3, #0]
- ret = 0;
- 8006fd8: 2300 movs r3, #0
- 8006fda: 75fb strb r3, [r7, #23]
- }
-
- return ret;
- 8006fdc: 7dfb ldrb r3, [r7, #23]
- }
- 8006fde: 4618 mov r0, r3
- 8006fe0: 371c adds r7, #28
- 8006fe2: 46bd mov sp, r7
- 8006fe4: bc80 pop {r7}
- 8006fe6: 4770 bx lr
- 8006fe8: 200002d4 .word 0x200002d4
-
- 08006fec <FATFS_LinkDriver>:
- * @param drv: pointer to the disk IO Driver structure
- * @param path: pointer to the logical drive path
- * @retval Returns 0 in case of success, otherwise 1.
- */
- uint8_t FATFS_LinkDriver(const Diskio_drvTypeDef *drv, char *path)
- {
- 8006fec: b580 push {r7, lr}
- 8006fee: b082 sub sp, #8
- 8006ff0: af00 add r7, sp, #0
- 8006ff2: 6078 str r0, [r7, #4]
- 8006ff4: 6039 str r1, [r7, #0]
- return FATFS_LinkDriverEx(drv, path, 0);
- 8006ff6: 2200 movs r2, #0
- 8006ff8: 6839 ldr r1, [r7, #0]
- 8006ffa: 6878 ldr r0, [r7, #4]
- 8006ffc: f7ff ffac bl 8006f58 <FATFS_LinkDriverEx>
- 8007000: 4603 mov r3, r0
- }
- 8007002: 4618 mov r0, r3
- 8007004: 3708 adds r7, #8
- 8007006: 46bd mov sp, r7
- 8007008: bd80 pop {r7, pc}
- ...
-
- 0800700c <ff_convert>:
-
- WCHAR ff_convert ( /* Converted character, Returns zero on error */
- WCHAR chr, /* Character code to be converted */
- UINT dir /* 0: Unicode to OEM code, 1: OEM code to Unicode */
- )
- {
- 800700c: b480 push {r7}
- 800700e: b085 sub sp, #20
- 8007010: af00 add r7, sp, #0
- 8007012: 4603 mov r3, r0
- 8007014: 6039 str r1, [r7, #0]
- 8007016: 80fb strh r3, [r7, #6]
- WCHAR c;
-
-
- if (chr < 0x80) { /* ASCII */
- 8007018: 88fb ldrh r3, [r7, #6]
- 800701a: 2b7f cmp r3, #127 ; 0x7f
- 800701c: d802 bhi.n 8007024 <ff_convert+0x18>
- c = chr;
- 800701e: 88fb ldrh r3, [r7, #6]
- 8007020: 81fb strh r3, [r7, #14]
- 8007022: e025 b.n 8007070 <ff_convert+0x64>
-
- } else {
- if (dir) { /* OEM code to Unicode */
- 8007024: 683b ldr r3, [r7, #0]
- 8007026: 2b00 cmp r3, #0
- 8007028: d00b beq.n 8007042 <ff_convert+0x36>
- c = (chr >= 0x100) ? 0 : Tbl[chr - 0x80];
- 800702a: 88fb ldrh r3, [r7, #6]
- 800702c: 2bff cmp r3, #255 ; 0xff
- 800702e: d805 bhi.n 800703c <ff_convert+0x30>
- 8007030: 88fb ldrh r3, [r7, #6]
- 8007032: 3b80 subs r3, #128 ; 0x80
- 8007034: 4a11 ldr r2, [pc, #68] ; (800707c <ff_convert+0x70>)
- 8007036: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
- 800703a: e000 b.n 800703e <ff_convert+0x32>
- 800703c: 2300 movs r3, #0
- 800703e: 81fb strh r3, [r7, #14]
- 8007040: e016 b.n 8007070 <ff_convert+0x64>
-
- } else { /* Unicode to OEM code */
- for (c = 0; c < 0x80; c++) {
- 8007042: 2300 movs r3, #0
- 8007044: 81fb strh r3, [r7, #14]
- 8007046: e009 b.n 800705c <ff_convert+0x50>
- if (chr == Tbl[c]) break;
- 8007048: 89fb ldrh r3, [r7, #14]
- 800704a: 4a0c ldr r2, [pc, #48] ; (800707c <ff_convert+0x70>)
- 800704c: f832 3013 ldrh.w r3, [r2, r3, lsl #1]
- 8007050: 88fa ldrh r2, [r7, #6]
- 8007052: 429a cmp r2, r3
- 8007054: d006 beq.n 8007064 <ff_convert+0x58>
- for (c = 0; c < 0x80; c++) {
- 8007056: 89fb ldrh r3, [r7, #14]
- 8007058: 3301 adds r3, #1
- 800705a: 81fb strh r3, [r7, #14]
- 800705c: 89fb ldrh r3, [r7, #14]
- 800705e: 2b7f cmp r3, #127 ; 0x7f
- 8007060: d9f2 bls.n 8007048 <ff_convert+0x3c>
- 8007062: e000 b.n 8007066 <ff_convert+0x5a>
- if (chr == Tbl[c]) break;
- 8007064: bf00 nop
- }
- c = (c + 0x80) & 0xFF;
- 8007066: 89fb ldrh r3, [r7, #14]
- 8007068: 3380 adds r3, #128 ; 0x80
- 800706a: b29b uxth r3, r3
- 800706c: b2db uxtb r3, r3
- 800706e: 81fb strh r3, [r7, #14]
- }
- }
-
- return c;
- 8007070: 89fb ldrh r3, [r7, #14]
- }
- 8007072: 4618 mov r0, r3
- 8007074: 3714 adds r7, #20
- 8007076: 46bd mov sp, r7
- 8007078: bc80 pop {r7}
- 800707a: 4770 bx lr
- 800707c: 08007c14 .word 0x08007c14
-
- 08007080 <ff_wtoupper>:
-
-
- WCHAR ff_wtoupper ( /* Returns upper converted character */
- WCHAR chr /* Unicode character to be upper converted (BMP only) */
- )
- {
- 8007080: b480 push {r7}
- 8007082: b087 sub sp, #28
- 8007084: af00 add r7, sp, #0
- 8007086: 4603 mov r3, r0
- 8007088: 80fb strh r3, [r7, #6]
- };
- const WCHAR *p;
- WCHAR bc, nc, cmd;
-
-
- p = chr < 0x1000 ? cvt1 : cvt2;
- 800708a: 88fb ldrh r3, [r7, #6]
- 800708c: f5b3 5f80 cmp.w r3, #4096 ; 0x1000
- 8007090: d201 bcs.n 8007096 <ff_wtoupper+0x16>
- 8007092: 4b3d ldr r3, [pc, #244] ; (8007188 <ff_wtoupper+0x108>)
- 8007094: e000 b.n 8007098 <ff_wtoupper+0x18>
- 8007096: 4b3d ldr r3, [pc, #244] ; (800718c <ff_wtoupper+0x10c>)
- 8007098: 617b str r3, [r7, #20]
- for (;;) {
- bc = *p++; /* Get block base */
- 800709a: 697b ldr r3, [r7, #20]
- 800709c: 1c9a adds r2, r3, #2
- 800709e: 617a str r2, [r7, #20]
- 80070a0: 881b ldrh r3, [r3, #0]
- 80070a2: 827b strh r3, [r7, #18]
- if (!bc || chr < bc) break;
- 80070a4: 8a7b ldrh r3, [r7, #18]
- 80070a6: 2b00 cmp r3, #0
- 80070a8: d068 beq.n 800717c <ff_wtoupper+0xfc>
- 80070aa: 88fa ldrh r2, [r7, #6]
- 80070ac: 8a7b ldrh r3, [r7, #18]
- 80070ae: 429a cmp r2, r3
- 80070b0: d364 bcc.n 800717c <ff_wtoupper+0xfc>
- nc = *p++; cmd = nc >> 8; nc &= 0xFF; /* Get processing command and block size */
- 80070b2: 697b ldr r3, [r7, #20]
- 80070b4: 1c9a adds r2, r3, #2
- 80070b6: 617a str r2, [r7, #20]
- 80070b8: 881b ldrh r3, [r3, #0]
- 80070ba: 823b strh r3, [r7, #16]
- 80070bc: 8a3b ldrh r3, [r7, #16]
- 80070be: 0a1b lsrs r3, r3, #8
- 80070c0: 81fb strh r3, [r7, #14]
- 80070c2: 8a3b ldrh r3, [r7, #16]
- 80070c4: b2db uxtb r3, r3
- 80070c6: 823b strh r3, [r7, #16]
- if (chr < bc + nc) { /* In the block? */
- 80070c8: 88fa ldrh r2, [r7, #6]
- 80070ca: 8a79 ldrh r1, [r7, #18]
- 80070cc: 8a3b ldrh r3, [r7, #16]
- 80070ce: 440b add r3, r1
- 80070d0: 429a cmp r2, r3
- 80070d2: da49 bge.n 8007168 <ff_wtoupper+0xe8>
- switch (cmd) {
- 80070d4: 89fb ldrh r3, [r7, #14]
- 80070d6: 2b08 cmp r3, #8
- 80070d8: d84f bhi.n 800717a <ff_wtoupper+0xfa>
- 80070da: a201 add r2, pc, #4 ; (adr r2, 80070e0 <ff_wtoupper+0x60>)
- 80070dc: f852 f023 ldr.w pc, [r2, r3, lsl #2]
- 80070e0: 08007105 .word 0x08007105
- 80070e4: 08007117 .word 0x08007117
- 80070e8: 0800712d .word 0x0800712d
- 80070ec: 08007135 .word 0x08007135
- 80070f0: 0800713d .word 0x0800713d
- 80070f4: 08007145 .word 0x08007145
- 80070f8: 0800714d .word 0x0800714d
- 80070fc: 08007155 .word 0x08007155
- 8007100: 0800715d .word 0x0800715d
- case 0: chr = p[chr - bc]; break; /* Table conversion */
- 8007104: 88fa ldrh r2, [r7, #6]
- 8007106: 8a7b ldrh r3, [r7, #18]
- 8007108: 1ad3 subs r3, r2, r3
- 800710a: 005b lsls r3, r3, #1
- 800710c: 697a ldr r2, [r7, #20]
- 800710e: 4413 add r3, r2
- 8007110: 881b ldrh r3, [r3, #0]
- 8007112: 80fb strh r3, [r7, #6]
- 8007114: e027 b.n 8007166 <ff_wtoupper+0xe6>
- case 1: chr -= (chr - bc) & 1; break; /* Case pairs */
- 8007116: 88fa ldrh r2, [r7, #6]
- 8007118: 8a7b ldrh r3, [r7, #18]
- 800711a: 1ad3 subs r3, r2, r3
- 800711c: b29b uxth r3, r3
- 800711e: f003 0301 and.w r3, r3, #1
- 8007122: b29b uxth r3, r3
- 8007124: 88fa ldrh r2, [r7, #6]
- 8007126: 1ad3 subs r3, r2, r3
- 8007128: 80fb strh r3, [r7, #6]
- 800712a: e01c b.n 8007166 <ff_wtoupper+0xe6>
- case 2: chr -= 16; break; /* Shift -16 */
- 800712c: 88fb ldrh r3, [r7, #6]
- 800712e: 3b10 subs r3, #16
- 8007130: 80fb strh r3, [r7, #6]
- 8007132: e018 b.n 8007166 <ff_wtoupper+0xe6>
- case 3: chr -= 32; break; /* Shift -32 */
- 8007134: 88fb ldrh r3, [r7, #6]
- 8007136: 3b20 subs r3, #32
- 8007138: 80fb strh r3, [r7, #6]
- 800713a: e014 b.n 8007166 <ff_wtoupper+0xe6>
- case 4: chr -= 48; break; /* Shift -48 */
- 800713c: 88fb ldrh r3, [r7, #6]
- 800713e: 3b30 subs r3, #48 ; 0x30
- 8007140: 80fb strh r3, [r7, #6]
- 8007142: e010 b.n 8007166 <ff_wtoupper+0xe6>
- case 5: chr -= 26; break; /* Shift -26 */
- 8007144: 88fb ldrh r3, [r7, #6]
- 8007146: 3b1a subs r3, #26
- 8007148: 80fb strh r3, [r7, #6]
- 800714a: e00c b.n 8007166 <ff_wtoupper+0xe6>
- case 6: chr += 8; break; /* Shift +8 */
- 800714c: 88fb ldrh r3, [r7, #6]
- 800714e: 3308 adds r3, #8
- 8007150: 80fb strh r3, [r7, #6]
- 8007152: e008 b.n 8007166 <ff_wtoupper+0xe6>
- case 7: chr -= 80; break; /* Shift -80 */
- 8007154: 88fb ldrh r3, [r7, #6]
- 8007156: 3b50 subs r3, #80 ; 0x50
- 8007158: 80fb strh r3, [r7, #6]
- 800715a: e004 b.n 8007166 <ff_wtoupper+0xe6>
- case 8: chr -= 0x1C60; break; /* Shift -0x1C60 */
- 800715c: 88fb ldrh r3, [r7, #6]
- 800715e: f5a3 53e3 sub.w r3, r3, #7264 ; 0x1c60
- 8007162: 80fb strh r3, [r7, #6]
- 8007164: bf00 nop
- }
- break;
- 8007166: e008 b.n 800717a <ff_wtoupper+0xfa>
- }
- if (!cmd) p += nc;
- 8007168: 89fb ldrh r3, [r7, #14]
- 800716a: 2b00 cmp r3, #0
- 800716c: d195 bne.n 800709a <ff_wtoupper+0x1a>
- 800716e: 8a3b ldrh r3, [r7, #16]
- 8007170: 005b lsls r3, r3, #1
- 8007172: 697a ldr r2, [r7, #20]
- 8007174: 4413 add r3, r2
- 8007176: 617b str r3, [r7, #20]
- bc = *p++; /* Get block base */
- 8007178: e78f b.n 800709a <ff_wtoupper+0x1a>
- break;
- 800717a: bf00 nop
- }
-
- return chr;
- 800717c: 88fb ldrh r3, [r7, #6]
- }
- 800717e: 4618 mov r0, r3
- 8007180: 371c adds r7, #28
- 8007182: 46bd mov sp, r7
- 8007184: bc80 pop {r7}
- 8007186: 4770 bx lr
- 8007188: 08007d14 .word 0x08007d14
- 800718c: 08007f08 .word 0x08007f08
-
- 08007190 <__errno>:
- 8007190: 4b01 ldr r3, [pc, #4] ; (8007198 <__errno+0x8>)
- 8007192: 6818 ldr r0, [r3, #0]
- 8007194: 4770 bx lr
- 8007196: bf00 nop
- 8007198: 20000024 .word 0x20000024
-
- 0800719c <__libc_init_array>:
- 800719c: b570 push {r4, r5, r6, lr}
- 800719e: 2500 movs r5, #0
- 80071a0: 4e0c ldr r6, [pc, #48] ; (80071d4 <__libc_init_array+0x38>)
- 80071a2: 4c0d ldr r4, [pc, #52] ; (80071d8 <__libc_init_array+0x3c>)
- 80071a4: 1ba4 subs r4, r4, r6
- 80071a6: 10a4 asrs r4, r4, #2
- 80071a8: 42a5 cmp r5, r4
- 80071aa: d109 bne.n 80071c0 <__libc_init_array+0x24>
- 80071ac: f000 fc44 bl 8007a38 <_init>
- 80071b0: 2500 movs r5, #0
- 80071b2: 4e0a ldr r6, [pc, #40] ; (80071dc <__libc_init_array+0x40>)
- 80071b4: 4c0a ldr r4, [pc, #40] ; (80071e0 <__libc_init_array+0x44>)
- 80071b6: 1ba4 subs r4, r4, r6
- 80071b8: 10a4 asrs r4, r4, #2
- 80071ba: 42a5 cmp r5, r4
- 80071bc: d105 bne.n 80071ca <__libc_init_array+0x2e>
- 80071be: bd70 pop {r4, r5, r6, pc}
- 80071c0: f856 3025 ldr.w r3, [r6, r5, lsl #2]
- 80071c4: 4798 blx r3
- 80071c6: 3501 adds r5, #1
- 80071c8: e7ee b.n 80071a8 <__libc_init_array+0xc>
- 80071ca: f856 3025 ldr.w r3, [r6, r5, lsl #2]
- 80071ce: 4798 blx r3
- 80071d0: 3501 adds r5, #1
- 80071d2: e7f2 b.n 80071ba <__libc_init_array+0x1e>
- 80071d4: 08008000 .word 0x08008000
- 80071d8: 08008000 .word 0x08008000
- 80071dc: 08008000 .word 0x08008000
- 80071e0: 08008004 .word 0x08008004
-
- 080071e4 <memset>:
- 80071e4: 4603 mov r3, r0
- 80071e6: 4402 add r2, r0
- 80071e8: 4293 cmp r3, r2
- 80071ea: d100 bne.n 80071ee <memset+0xa>
- 80071ec: 4770 bx lr
- 80071ee: f803 1b01 strb.w r1, [r3], #1
- 80071f2: e7f9 b.n 80071e8 <memset+0x4>
-
- 080071f4 <siprintf>:
- 80071f4: b40e push {r1, r2, r3}
- 80071f6: f06f 4100 mvn.w r1, #2147483648 ; 0x80000000
- 80071fa: b500 push {lr}
- 80071fc: b09c sub sp, #112 ; 0x70
- 80071fe: ab1d add r3, sp, #116 ; 0x74
- 8007200: 9002 str r0, [sp, #8]
- 8007202: 9006 str r0, [sp, #24]
- 8007204: 9107 str r1, [sp, #28]
- 8007206: 9104 str r1, [sp, #16]
- 8007208: 4808 ldr r0, [pc, #32] ; (800722c <siprintf+0x38>)
- 800720a: 4909 ldr r1, [pc, #36] ; (8007230 <siprintf+0x3c>)
- 800720c: f853 2b04 ldr.w r2, [r3], #4
- 8007210: 9105 str r1, [sp, #20]
- 8007212: 6800 ldr r0, [r0, #0]
- 8007214: a902 add r1, sp, #8
- 8007216: 9301 str r3, [sp, #4]
- 8007218: f000 f876 bl 8007308 <_svfiprintf_r>
- 800721c: 2200 movs r2, #0
- 800721e: 9b02 ldr r3, [sp, #8]
- 8007220: 701a strb r2, [r3, #0]
- 8007222: b01c add sp, #112 ; 0x70
- 8007224: f85d eb04 ldr.w lr, [sp], #4
- 8007228: b003 add sp, #12
- 800722a: 4770 bx lr
- 800722c: 20000024 .word 0x20000024
- 8007230: ffff0208 .word 0xffff0208
-
- 08007234 <strcat>:
- 8007234: 4603 mov r3, r0
- 8007236: b510 push {r4, lr}
- 8007238: 781a ldrb r2, [r3, #0]
- 800723a: 1c5c adds r4, r3, #1
- 800723c: b93a cbnz r2, 800724e <strcat+0x1a>
- 800723e: 3b01 subs r3, #1
- 8007240: f811 2b01 ldrb.w r2, [r1], #1
- 8007244: f803 2f01 strb.w r2, [r3, #1]!
- 8007248: 2a00 cmp r2, #0
- 800724a: d1f9 bne.n 8007240 <strcat+0xc>
- 800724c: bd10 pop {r4, pc}
- 800724e: 4623 mov r3, r4
- 8007250: e7f2 b.n 8007238 <strcat+0x4>
-
- 08007252 <__ssputs_r>:
- 8007252: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 8007256: 688e ldr r6, [r1, #8]
- 8007258: 4682 mov sl, r0
- 800725a: 429e cmp r6, r3
- 800725c: 460c mov r4, r1
- 800725e: 4690 mov r8, r2
- 8007260: 4699 mov r9, r3
- 8007262: d837 bhi.n 80072d4 <__ssputs_r+0x82>
- 8007264: 898a ldrh r2, [r1, #12]
- 8007266: f412 6f90 tst.w r2, #1152 ; 0x480
- 800726a: d031 beq.n 80072d0 <__ssputs_r+0x7e>
- 800726c: 2302 movs r3, #2
- 800726e: 6825 ldr r5, [r4, #0]
- 8007270: 6909 ldr r1, [r1, #16]
- 8007272: 1a6f subs r7, r5, r1
- 8007274: 6965 ldr r5, [r4, #20]
- 8007276: eb05 0545 add.w r5, r5, r5, lsl #1
- 800727a: fb95 f5f3 sdiv r5, r5, r3
- 800727e: f109 0301 add.w r3, r9, #1
- 8007282: 443b add r3, r7
- 8007284: 429d cmp r5, r3
- 8007286: bf38 it cc
- 8007288: 461d movcc r5, r3
- 800728a: 0553 lsls r3, r2, #21
- 800728c: d530 bpl.n 80072f0 <__ssputs_r+0x9e>
- 800728e: 4629 mov r1, r5
- 8007290: f000 fb38 bl 8007904 <_malloc_r>
- 8007294: 4606 mov r6, r0
- 8007296: b950 cbnz r0, 80072ae <__ssputs_r+0x5c>
- 8007298: 230c movs r3, #12
- 800729a: f04f 30ff mov.w r0, #4294967295
- 800729e: f8ca 3000 str.w r3, [sl]
- 80072a2: 89a3 ldrh r3, [r4, #12]
- 80072a4: f043 0340 orr.w r3, r3, #64 ; 0x40
- 80072a8: 81a3 strh r3, [r4, #12]
- 80072aa: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- 80072ae: 463a mov r2, r7
- 80072b0: 6921 ldr r1, [r4, #16]
- 80072b2: f000 fab7 bl 8007824 <memcpy>
- 80072b6: 89a3 ldrh r3, [r4, #12]
- 80072b8: f423 6390 bic.w r3, r3, #1152 ; 0x480
- 80072bc: f043 0380 orr.w r3, r3, #128 ; 0x80
- 80072c0: 81a3 strh r3, [r4, #12]
- 80072c2: 6126 str r6, [r4, #16]
- 80072c4: 443e add r6, r7
- 80072c6: 6026 str r6, [r4, #0]
- 80072c8: 464e mov r6, r9
- 80072ca: 6165 str r5, [r4, #20]
- 80072cc: 1bed subs r5, r5, r7
- 80072ce: 60a5 str r5, [r4, #8]
- 80072d0: 454e cmp r6, r9
- 80072d2: d900 bls.n 80072d6 <__ssputs_r+0x84>
- 80072d4: 464e mov r6, r9
- 80072d6: 4632 mov r2, r6
- 80072d8: 4641 mov r1, r8
- 80072da: 6820 ldr r0, [r4, #0]
- 80072dc: f000 faad bl 800783a <memmove>
- 80072e0: 68a3 ldr r3, [r4, #8]
- 80072e2: 2000 movs r0, #0
- 80072e4: 1b9b subs r3, r3, r6
- 80072e6: 60a3 str r3, [r4, #8]
- 80072e8: 6823 ldr r3, [r4, #0]
- 80072ea: 441e add r6, r3
- 80072ec: 6026 str r6, [r4, #0]
- 80072ee: e7dc b.n 80072aa <__ssputs_r+0x58>
- 80072f0: 462a mov r2, r5
- 80072f2: f000 fb61 bl 80079b8 <_realloc_r>
- 80072f6: 4606 mov r6, r0
- 80072f8: 2800 cmp r0, #0
- 80072fa: d1e2 bne.n 80072c2 <__ssputs_r+0x70>
- 80072fc: 6921 ldr r1, [r4, #16]
- 80072fe: 4650 mov r0, sl
- 8007300: f000 fab4 bl 800786c <_free_r>
- 8007304: e7c8 b.n 8007298 <__ssputs_r+0x46>
- ...
-
- 08007308 <_svfiprintf_r>:
- 8007308: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
- 800730c: 461d mov r5, r3
- 800730e: 898b ldrh r3, [r1, #12]
- 8007310: b09d sub sp, #116 ; 0x74
- 8007312: 061f lsls r7, r3, #24
- 8007314: 4680 mov r8, r0
- 8007316: 460c mov r4, r1
- 8007318: 4616 mov r6, r2
- 800731a: d50f bpl.n 800733c <_svfiprintf_r+0x34>
- 800731c: 690b ldr r3, [r1, #16]
- 800731e: b96b cbnz r3, 800733c <_svfiprintf_r+0x34>
- 8007320: 2140 movs r1, #64 ; 0x40
- 8007322: f000 faef bl 8007904 <_malloc_r>
- 8007326: 6020 str r0, [r4, #0]
- 8007328: 6120 str r0, [r4, #16]
- 800732a: b928 cbnz r0, 8007338 <_svfiprintf_r+0x30>
- 800732c: 230c movs r3, #12
- 800732e: f8c8 3000 str.w r3, [r8]
- 8007332: f04f 30ff mov.w r0, #4294967295
- 8007336: e0c8 b.n 80074ca <_svfiprintf_r+0x1c2>
- 8007338: 2340 movs r3, #64 ; 0x40
- 800733a: 6163 str r3, [r4, #20]
- 800733c: 2300 movs r3, #0
- 800733e: 9309 str r3, [sp, #36] ; 0x24
- 8007340: 2320 movs r3, #32
- 8007342: f88d 3029 strb.w r3, [sp, #41] ; 0x29
- 8007346: 2330 movs r3, #48 ; 0x30
- 8007348: f04f 0b01 mov.w fp, #1
- 800734c: f88d 302a strb.w r3, [sp, #42] ; 0x2a
- 8007350: 9503 str r5, [sp, #12]
- 8007352: 4637 mov r7, r6
- 8007354: 463d mov r5, r7
- 8007356: f815 3b01 ldrb.w r3, [r5], #1
- 800735a: b10b cbz r3, 8007360 <_svfiprintf_r+0x58>
- 800735c: 2b25 cmp r3, #37 ; 0x25
- 800735e: d13e bne.n 80073de <_svfiprintf_r+0xd6>
- 8007360: ebb7 0a06 subs.w sl, r7, r6
- 8007364: d00b beq.n 800737e <_svfiprintf_r+0x76>
- 8007366: 4653 mov r3, sl
- 8007368: 4632 mov r2, r6
- 800736a: 4621 mov r1, r4
- 800736c: 4640 mov r0, r8
- 800736e: f7ff ff70 bl 8007252 <__ssputs_r>
- 8007372: 3001 adds r0, #1
- 8007374: f000 80a4 beq.w 80074c0 <_svfiprintf_r+0x1b8>
- 8007378: 9b09 ldr r3, [sp, #36] ; 0x24
- 800737a: 4453 add r3, sl
- 800737c: 9309 str r3, [sp, #36] ; 0x24
- 800737e: 783b ldrb r3, [r7, #0]
- 8007380: 2b00 cmp r3, #0
- 8007382: f000 809d beq.w 80074c0 <_svfiprintf_r+0x1b8>
- 8007386: 2300 movs r3, #0
- 8007388: f04f 32ff mov.w r2, #4294967295
- 800738c: e9cd 2305 strd r2, r3, [sp, #20]
- 8007390: 9304 str r3, [sp, #16]
- 8007392: 9307 str r3, [sp, #28]
- 8007394: f88d 3053 strb.w r3, [sp, #83] ; 0x53
- 8007398: 931a str r3, [sp, #104] ; 0x68
- 800739a: 462f mov r7, r5
- 800739c: 2205 movs r2, #5
- 800739e: f817 1b01 ldrb.w r1, [r7], #1
- 80073a2: 4850 ldr r0, [pc, #320] ; (80074e4 <_svfiprintf_r+0x1dc>)
- 80073a4: f000 fa30 bl 8007808 <memchr>
- 80073a8: 9b04 ldr r3, [sp, #16]
- 80073aa: b9d0 cbnz r0, 80073e2 <_svfiprintf_r+0xda>
- 80073ac: 06d9 lsls r1, r3, #27
- 80073ae: bf44 itt mi
- 80073b0: 2220 movmi r2, #32
- 80073b2: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
- 80073b6: 071a lsls r2, r3, #28
- 80073b8: bf44 itt mi
- 80073ba: 222b movmi r2, #43 ; 0x2b
- 80073bc: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53
- 80073c0: 782a ldrb r2, [r5, #0]
- 80073c2: 2a2a cmp r2, #42 ; 0x2a
- 80073c4: d015 beq.n 80073f2 <_svfiprintf_r+0xea>
- 80073c6: 462f mov r7, r5
- 80073c8: 2000 movs r0, #0
- 80073ca: 250a movs r5, #10
- 80073cc: 9a07 ldr r2, [sp, #28]
- 80073ce: 4639 mov r1, r7
- 80073d0: f811 3b01 ldrb.w r3, [r1], #1
- 80073d4: 3b30 subs r3, #48 ; 0x30
- 80073d6: 2b09 cmp r3, #9
- 80073d8: d94d bls.n 8007476 <_svfiprintf_r+0x16e>
- 80073da: b1b8 cbz r0, 800740c <_svfiprintf_r+0x104>
- 80073dc: e00f b.n 80073fe <_svfiprintf_r+0xf6>
- 80073de: 462f mov r7, r5
- 80073e0: e7b8 b.n 8007354 <_svfiprintf_r+0x4c>
- 80073e2: 4a40 ldr r2, [pc, #256] ; (80074e4 <_svfiprintf_r+0x1dc>)
- 80073e4: 463d mov r5, r7
- 80073e6: 1a80 subs r0, r0, r2
- 80073e8: fa0b f000 lsl.w r0, fp, r0
- 80073ec: 4318 orrs r0, r3
- 80073ee: 9004 str r0, [sp, #16]
- 80073f0: e7d3 b.n 800739a <_svfiprintf_r+0x92>
- 80073f2: 9a03 ldr r2, [sp, #12]
- 80073f4: 1d11 adds r1, r2, #4
- 80073f6: 6812 ldr r2, [r2, #0]
- 80073f8: 9103 str r1, [sp, #12]
- 80073fa: 2a00 cmp r2, #0
- 80073fc: db01 blt.n 8007402 <_svfiprintf_r+0xfa>
- 80073fe: 9207 str r2, [sp, #28]
- 8007400: e004 b.n 800740c <_svfiprintf_r+0x104>
- 8007402: 4252 negs r2, r2
- 8007404: f043 0302 orr.w r3, r3, #2
- 8007408: 9207 str r2, [sp, #28]
- 800740a: 9304 str r3, [sp, #16]
- 800740c: 783b ldrb r3, [r7, #0]
- 800740e: 2b2e cmp r3, #46 ; 0x2e
- 8007410: d10c bne.n 800742c <_svfiprintf_r+0x124>
- 8007412: 787b ldrb r3, [r7, #1]
- 8007414: 2b2a cmp r3, #42 ; 0x2a
- 8007416: d133 bne.n 8007480 <_svfiprintf_r+0x178>
- 8007418: 9b03 ldr r3, [sp, #12]
- 800741a: 3702 adds r7, #2
- 800741c: 1d1a adds r2, r3, #4
- 800741e: 681b ldr r3, [r3, #0]
- 8007420: 9203 str r2, [sp, #12]
- 8007422: 2b00 cmp r3, #0
- 8007424: bfb8 it lt
- 8007426: f04f 33ff movlt.w r3, #4294967295
- 800742a: 9305 str r3, [sp, #20]
- 800742c: 4d2e ldr r5, [pc, #184] ; (80074e8 <_svfiprintf_r+0x1e0>)
- 800742e: 2203 movs r2, #3
- 8007430: 7839 ldrb r1, [r7, #0]
- 8007432: 4628 mov r0, r5
- 8007434: f000 f9e8 bl 8007808 <memchr>
- 8007438: b138 cbz r0, 800744a <_svfiprintf_r+0x142>
- 800743a: 2340 movs r3, #64 ; 0x40
- 800743c: 1b40 subs r0, r0, r5
- 800743e: fa03 f000 lsl.w r0, r3, r0
- 8007442: 9b04 ldr r3, [sp, #16]
- 8007444: 3701 adds r7, #1
- 8007446: 4303 orrs r3, r0
- 8007448: 9304 str r3, [sp, #16]
- 800744a: 7839 ldrb r1, [r7, #0]
- 800744c: 2206 movs r2, #6
- 800744e: 4827 ldr r0, [pc, #156] ; (80074ec <_svfiprintf_r+0x1e4>)
- 8007450: 1c7e adds r6, r7, #1
- 8007452: f88d 1028 strb.w r1, [sp, #40] ; 0x28
- 8007456: f000 f9d7 bl 8007808 <memchr>
- 800745a: 2800 cmp r0, #0
- 800745c: d038 beq.n 80074d0 <_svfiprintf_r+0x1c8>
- 800745e: 4b24 ldr r3, [pc, #144] ; (80074f0 <_svfiprintf_r+0x1e8>)
- 8007460: bb13 cbnz r3, 80074a8 <_svfiprintf_r+0x1a0>
- 8007462: 9b03 ldr r3, [sp, #12]
- 8007464: 3307 adds r3, #7
- 8007466: f023 0307 bic.w r3, r3, #7
- 800746a: 3308 adds r3, #8
- 800746c: 9303 str r3, [sp, #12]
- 800746e: 9b09 ldr r3, [sp, #36] ; 0x24
- 8007470: 444b add r3, r9
- 8007472: 9309 str r3, [sp, #36] ; 0x24
- 8007474: e76d b.n 8007352 <_svfiprintf_r+0x4a>
- 8007476: fb05 3202 mla r2, r5, r2, r3
- 800747a: 2001 movs r0, #1
- 800747c: 460f mov r7, r1
- 800747e: e7a6 b.n 80073ce <_svfiprintf_r+0xc6>
- 8007480: 2300 movs r3, #0
- 8007482: 250a movs r5, #10
- 8007484: 4619 mov r1, r3
- 8007486: 3701 adds r7, #1
- 8007488: 9305 str r3, [sp, #20]
- 800748a: 4638 mov r0, r7
- 800748c: f810 2b01 ldrb.w r2, [r0], #1
- 8007490: 3a30 subs r2, #48 ; 0x30
- 8007492: 2a09 cmp r2, #9
- 8007494: d903 bls.n 800749e <_svfiprintf_r+0x196>
- 8007496: 2b00 cmp r3, #0
- 8007498: d0c8 beq.n 800742c <_svfiprintf_r+0x124>
- 800749a: 9105 str r1, [sp, #20]
- 800749c: e7c6 b.n 800742c <_svfiprintf_r+0x124>
- 800749e: fb05 2101 mla r1, r5, r1, r2
- 80074a2: 2301 movs r3, #1
- 80074a4: 4607 mov r7, r0
- 80074a6: e7f0 b.n 800748a <_svfiprintf_r+0x182>
- 80074a8: ab03 add r3, sp, #12
- 80074aa: 9300 str r3, [sp, #0]
- 80074ac: 4622 mov r2, r4
- 80074ae: 4b11 ldr r3, [pc, #68] ; (80074f4 <_svfiprintf_r+0x1ec>)
- 80074b0: a904 add r1, sp, #16
- 80074b2: 4640 mov r0, r8
- 80074b4: f3af 8000 nop.w
- 80074b8: f1b0 3fff cmp.w r0, #4294967295
- 80074bc: 4681 mov r9, r0
- 80074be: d1d6 bne.n 800746e <_svfiprintf_r+0x166>
- 80074c0: 89a3 ldrh r3, [r4, #12]
- 80074c2: 065b lsls r3, r3, #25
- 80074c4: f53f af35 bmi.w 8007332 <_svfiprintf_r+0x2a>
- 80074c8: 9809 ldr r0, [sp, #36] ; 0x24
- 80074ca: b01d add sp, #116 ; 0x74
- 80074cc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
- 80074d0: ab03 add r3, sp, #12
- 80074d2: 9300 str r3, [sp, #0]
- 80074d4: 4622 mov r2, r4
- 80074d6: 4b07 ldr r3, [pc, #28] ; (80074f4 <_svfiprintf_r+0x1ec>)
- 80074d8: a904 add r1, sp, #16
- 80074da: 4640 mov r0, r8
- 80074dc: f000 f882 bl 80075e4 <_printf_i>
- 80074e0: e7ea b.n 80074b8 <_svfiprintf_r+0x1b0>
- 80074e2: bf00 nop
- 80074e4: 08007fc4 .word 0x08007fc4
- 80074e8: 08007fca .word 0x08007fca
- 80074ec: 08007fce .word 0x08007fce
- 80074f0: 00000000 .word 0x00000000
- 80074f4: 08007253 .word 0x08007253
-
- 080074f8 <_printf_common>:
- 80074f8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
- 80074fc: 4691 mov r9, r2
- 80074fe: 461f mov r7, r3
- 8007500: 688a ldr r2, [r1, #8]
- 8007502: 690b ldr r3, [r1, #16]
- 8007504: 4606 mov r6, r0
- 8007506: 4293 cmp r3, r2
- 8007508: bfb8 it lt
- 800750a: 4613 movlt r3, r2
- 800750c: f8c9 3000 str.w r3, [r9]
- 8007510: f891 2043 ldrb.w r2, [r1, #67] ; 0x43
- 8007514: 460c mov r4, r1
- 8007516: f8dd 8020 ldr.w r8, [sp, #32]
- 800751a: b112 cbz r2, 8007522 <_printf_common+0x2a>
- 800751c: 3301 adds r3, #1
- 800751e: f8c9 3000 str.w r3, [r9]
- 8007522: 6823 ldr r3, [r4, #0]
- 8007524: 0699 lsls r1, r3, #26
- 8007526: bf42 ittt mi
- 8007528: f8d9 3000 ldrmi.w r3, [r9]
- 800752c: 3302 addmi r3, #2
- 800752e: f8c9 3000 strmi.w r3, [r9]
- 8007532: 6825 ldr r5, [r4, #0]
- 8007534: f015 0506 ands.w r5, r5, #6
- 8007538: d107 bne.n 800754a <_printf_common+0x52>
- 800753a: f104 0a19 add.w sl, r4, #25
- 800753e: 68e3 ldr r3, [r4, #12]
- 8007540: f8d9 2000 ldr.w r2, [r9]
- 8007544: 1a9b subs r3, r3, r2
- 8007546: 42ab cmp r3, r5
- 8007548: dc29 bgt.n 800759e <_printf_common+0xa6>
- 800754a: f894 3043 ldrb.w r3, [r4, #67] ; 0x43
- 800754e: 6822 ldr r2, [r4, #0]
- 8007550: 3300 adds r3, #0
- 8007552: bf18 it ne
- 8007554: 2301 movne r3, #1
- 8007556: 0692 lsls r2, r2, #26
- 8007558: d42e bmi.n 80075b8 <_printf_common+0xc0>
- 800755a: f104 0243 add.w r2, r4, #67 ; 0x43
- 800755e: 4639 mov r1, r7
- 8007560: 4630 mov r0, r6
- 8007562: 47c0 blx r8
- 8007564: 3001 adds r0, #1
- 8007566: d021 beq.n 80075ac <_printf_common+0xb4>
- 8007568: 6823 ldr r3, [r4, #0]
- 800756a: 68e5 ldr r5, [r4, #12]
- 800756c: f003 0306 and.w r3, r3, #6
- 8007570: 2b04 cmp r3, #4
- 8007572: bf18 it ne
- 8007574: 2500 movne r5, #0
- 8007576: f8d9 2000 ldr.w r2, [r9]
- 800757a: f04f 0900 mov.w r9, #0
- 800757e: bf08 it eq
- 8007580: 1aad subeq r5, r5, r2
- 8007582: 68a3 ldr r3, [r4, #8]
- 8007584: 6922 ldr r2, [r4, #16]
- 8007586: bf08 it eq
- 8007588: ea25 75e5 biceq.w r5, r5, r5, asr #31
- 800758c: 4293 cmp r3, r2
- 800758e: bfc4 itt gt
- 8007590: 1a9b subgt r3, r3, r2
- 8007592: 18ed addgt r5, r5, r3
- 8007594: 341a adds r4, #26
- 8007596: 454d cmp r5, r9
- 8007598: d11a bne.n 80075d0 <_printf_common+0xd8>
- 800759a: 2000 movs r0, #0
- 800759c: e008 b.n 80075b0 <_printf_common+0xb8>
- 800759e: 2301 movs r3, #1
- 80075a0: 4652 mov r2, sl
- 80075a2: 4639 mov r1, r7
- 80075a4: 4630 mov r0, r6
- 80075a6: 47c0 blx r8
- 80075a8: 3001 adds r0, #1
- 80075aa: d103 bne.n 80075b4 <_printf_common+0xbc>
- 80075ac: f04f 30ff mov.w r0, #4294967295
- 80075b0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
- 80075b4: 3501 adds r5, #1
- 80075b6: e7c2 b.n 800753e <_printf_common+0x46>
- 80075b8: 2030 movs r0, #48 ; 0x30
- 80075ba: 18e1 adds r1, r4, r3
- 80075bc: f881 0043 strb.w r0, [r1, #67] ; 0x43
- 80075c0: 1c5a adds r2, r3, #1
- 80075c2: f894 1045 ldrb.w r1, [r4, #69] ; 0x45
- 80075c6: 4422 add r2, r4
- 80075c8: 3302 adds r3, #2
- 80075ca: f882 1043 strb.w r1, [r2, #67] ; 0x43
- 80075ce: e7c4 b.n 800755a <_printf_common+0x62>
- 80075d0: 2301 movs r3, #1
- 80075d2: 4622 mov r2, r4
- 80075d4: 4639 mov r1, r7
- 80075d6: 4630 mov r0, r6
- 80075d8: 47c0 blx r8
- 80075da: 3001 adds r0, #1
- 80075dc: d0e6 beq.n 80075ac <_printf_common+0xb4>
- 80075de: f109 0901 add.w r9, r9, #1
- 80075e2: e7d8 b.n 8007596 <_printf_common+0x9e>
-
- 080075e4 <_printf_i>:
- 80075e4: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
- 80075e8: f101 0c43 add.w ip, r1, #67 ; 0x43
- 80075ec: 460c mov r4, r1
- 80075ee: 7e09 ldrb r1, [r1, #24]
- 80075f0: b085 sub sp, #20
- 80075f2: 296e cmp r1, #110 ; 0x6e
- 80075f4: 4617 mov r7, r2
- 80075f6: 4606 mov r6, r0
- 80075f8: 4698 mov r8, r3
- 80075fa: 9a0c ldr r2, [sp, #48] ; 0x30
- 80075fc: f000 80b3 beq.w 8007766 <_printf_i+0x182>
- 8007600: d822 bhi.n 8007648 <_printf_i+0x64>
- 8007602: 2963 cmp r1, #99 ; 0x63
- 8007604: d036 beq.n 8007674 <_printf_i+0x90>
- 8007606: d80a bhi.n 800761e <_printf_i+0x3a>
- 8007608: 2900 cmp r1, #0
- 800760a: f000 80b9 beq.w 8007780 <_printf_i+0x19c>
- 800760e: 2958 cmp r1, #88 ; 0x58
- 8007610: f000 8083 beq.w 800771a <_printf_i+0x136>
- 8007614: f104 0542 add.w r5, r4, #66 ; 0x42
- 8007618: f884 1042 strb.w r1, [r4, #66] ; 0x42
- 800761c: e032 b.n 8007684 <_printf_i+0xa0>
- 800761e: 2964 cmp r1, #100 ; 0x64
- 8007620: d001 beq.n 8007626 <_printf_i+0x42>
- 8007622: 2969 cmp r1, #105 ; 0x69
- 8007624: d1f6 bne.n 8007614 <_printf_i+0x30>
- 8007626: 6820 ldr r0, [r4, #0]
- 8007628: 6813 ldr r3, [r2, #0]
- 800762a: 0605 lsls r5, r0, #24
- 800762c: f103 0104 add.w r1, r3, #4
- 8007630: d52a bpl.n 8007688 <_printf_i+0xa4>
- 8007632: 681b ldr r3, [r3, #0]
- 8007634: 6011 str r1, [r2, #0]
- 8007636: 2b00 cmp r3, #0
- 8007638: da03 bge.n 8007642 <_printf_i+0x5e>
- 800763a: 222d movs r2, #45 ; 0x2d
- 800763c: 425b negs r3, r3
- 800763e: f884 2043 strb.w r2, [r4, #67] ; 0x43
- 8007642: 486f ldr r0, [pc, #444] ; (8007800 <_printf_i+0x21c>)
- 8007644: 220a movs r2, #10
- 8007646: e039 b.n 80076bc <_printf_i+0xd8>
- 8007648: 2973 cmp r1, #115 ; 0x73
- 800764a: f000 809d beq.w 8007788 <_printf_i+0x1a4>
- 800764e: d808 bhi.n 8007662 <_printf_i+0x7e>
- 8007650: 296f cmp r1, #111 ; 0x6f
- 8007652: d020 beq.n 8007696 <_printf_i+0xb2>
- 8007654: 2970 cmp r1, #112 ; 0x70
- 8007656: d1dd bne.n 8007614 <_printf_i+0x30>
- 8007658: 6823 ldr r3, [r4, #0]
- 800765a: f043 0320 orr.w r3, r3, #32
- 800765e: 6023 str r3, [r4, #0]
- 8007660: e003 b.n 800766a <_printf_i+0x86>
- 8007662: 2975 cmp r1, #117 ; 0x75
- 8007664: d017 beq.n 8007696 <_printf_i+0xb2>
- 8007666: 2978 cmp r1, #120 ; 0x78
- 8007668: d1d4 bne.n 8007614 <_printf_i+0x30>
- 800766a: 2378 movs r3, #120 ; 0x78
- 800766c: 4865 ldr r0, [pc, #404] ; (8007804 <_printf_i+0x220>)
- 800766e: f884 3045 strb.w r3, [r4, #69] ; 0x45
- 8007672: e055 b.n 8007720 <_printf_i+0x13c>
- 8007674: 6813 ldr r3, [r2, #0]
- 8007676: f104 0542 add.w r5, r4, #66 ; 0x42
- 800767a: 1d19 adds r1, r3, #4
- 800767c: 681b ldr r3, [r3, #0]
- 800767e: 6011 str r1, [r2, #0]
- 8007680: f884 3042 strb.w r3, [r4, #66] ; 0x42
- 8007684: 2301 movs r3, #1
- 8007686: e08c b.n 80077a2 <_printf_i+0x1be>
- 8007688: 681b ldr r3, [r3, #0]
- 800768a: f010 0f40 tst.w r0, #64 ; 0x40
- 800768e: 6011 str r1, [r2, #0]
- 8007690: bf18 it ne
- 8007692: b21b sxthne r3, r3
- 8007694: e7cf b.n 8007636 <_printf_i+0x52>
- 8007696: 6813 ldr r3, [r2, #0]
- 8007698: 6825 ldr r5, [r4, #0]
- 800769a: 1d18 adds r0, r3, #4
- 800769c: 6010 str r0, [r2, #0]
- 800769e: 0628 lsls r0, r5, #24
- 80076a0: d501 bpl.n 80076a6 <_printf_i+0xc2>
- 80076a2: 681b ldr r3, [r3, #0]
- 80076a4: e002 b.n 80076ac <_printf_i+0xc8>
- 80076a6: 0668 lsls r0, r5, #25
- 80076a8: d5fb bpl.n 80076a2 <_printf_i+0xbe>
- 80076aa: 881b ldrh r3, [r3, #0]
- 80076ac: 296f cmp r1, #111 ; 0x6f
- 80076ae: bf14 ite ne
- 80076b0: 220a movne r2, #10
- 80076b2: 2208 moveq r2, #8
- 80076b4: 4852 ldr r0, [pc, #328] ; (8007800 <_printf_i+0x21c>)
- 80076b6: 2100 movs r1, #0
- 80076b8: f884 1043 strb.w r1, [r4, #67] ; 0x43
- 80076bc: 6865 ldr r5, [r4, #4]
- 80076be: 2d00 cmp r5, #0
- 80076c0: 60a5 str r5, [r4, #8]
- 80076c2: f2c0 8095 blt.w 80077f0 <_printf_i+0x20c>
- 80076c6: 6821 ldr r1, [r4, #0]
- 80076c8: f021 0104 bic.w r1, r1, #4
- 80076cc: 6021 str r1, [r4, #0]
- 80076ce: 2b00 cmp r3, #0
- 80076d0: d13d bne.n 800774e <_printf_i+0x16a>
- 80076d2: 2d00 cmp r5, #0
- 80076d4: f040 808e bne.w 80077f4 <_printf_i+0x210>
- 80076d8: 4665 mov r5, ip
- 80076da: 2a08 cmp r2, #8
- 80076dc: d10b bne.n 80076f6 <_printf_i+0x112>
- 80076de: 6823 ldr r3, [r4, #0]
- 80076e0: 07db lsls r3, r3, #31
- 80076e2: d508 bpl.n 80076f6 <_printf_i+0x112>
- 80076e4: 6923 ldr r3, [r4, #16]
- 80076e6: 6862 ldr r2, [r4, #4]
- 80076e8: 429a cmp r2, r3
- 80076ea: bfde ittt le
- 80076ec: 2330 movle r3, #48 ; 0x30
- 80076ee: f805 3c01 strble.w r3, [r5, #-1]
- 80076f2: f105 35ff addle.w r5, r5, #4294967295
- 80076f6: ebac 0305 sub.w r3, ip, r5
- 80076fa: 6123 str r3, [r4, #16]
- 80076fc: f8cd 8000 str.w r8, [sp]
- 8007700: 463b mov r3, r7
- 8007702: aa03 add r2, sp, #12
- 8007704: 4621 mov r1, r4
- 8007706: 4630 mov r0, r6
- 8007708: f7ff fef6 bl 80074f8 <_printf_common>
- 800770c: 3001 adds r0, #1
- 800770e: d14d bne.n 80077ac <_printf_i+0x1c8>
- 8007710: f04f 30ff mov.w r0, #4294967295
- 8007714: b005 add sp, #20
- 8007716: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
- 800771a: 4839 ldr r0, [pc, #228] ; (8007800 <_printf_i+0x21c>)
- 800771c: f884 1045 strb.w r1, [r4, #69] ; 0x45
- 8007720: 6813 ldr r3, [r2, #0]
- 8007722: 6821 ldr r1, [r4, #0]
- 8007724: 1d1d adds r5, r3, #4
- 8007726: 681b ldr r3, [r3, #0]
- 8007728: 6015 str r5, [r2, #0]
- 800772a: 060a lsls r2, r1, #24
- 800772c: d50b bpl.n 8007746 <_printf_i+0x162>
- 800772e: 07ca lsls r2, r1, #31
- 8007730: bf44 itt mi
- 8007732: f041 0120 orrmi.w r1, r1, #32
- 8007736: 6021 strmi r1, [r4, #0]
- 8007738: b91b cbnz r3, 8007742 <_printf_i+0x15e>
- 800773a: 6822 ldr r2, [r4, #0]
- 800773c: f022 0220 bic.w r2, r2, #32
- 8007740: 6022 str r2, [r4, #0]
- 8007742: 2210 movs r2, #16
- 8007744: e7b7 b.n 80076b6 <_printf_i+0xd2>
- 8007746: 064d lsls r5, r1, #25
- 8007748: bf48 it mi
- 800774a: b29b uxthmi r3, r3
- 800774c: e7ef b.n 800772e <_printf_i+0x14a>
- 800774e: 4665 mov r5, ip
- 8007750: fbb3 f1f2 udiv r1, r3, r2
- 8007754: fb02 3311 mls r3, r2, r1, r3
- 8007758: 5cc3 ldrb r3, [r0, r3]
- 800775a: f805 3d01 strb.w r3, [r5, #-1]!
- 800775e: 460b mov r3, r1
- 8007760: 2900 cmp r1, #0
- 8007762: d1f5 bne.n 8007750 <_printf_i+0x16c>
- 8007764: e7b9 b.n 80076da <_printf_i+0xf6>
- 8007766: 6813 ldr r3, [r2, #0]
- 8007768: 6825 ldr r5, [r4, #0]
- 800776a: 1d18 adds r0, r3, #4
- 800776c: 6961 ldr r1, [r4, #20]
- 800776e: 6010 str r0, [r2, #0]
- 8007770: 0628 lsls r0, r5, #24
- 8007772: 681b ldr r3, [r3, #0]
- 8007774: d501 bpl.n 800777a <_printf_i+0x196>
- 8007776: 6019 str r1, [r3, #0]
- 8007778: e002 b.n 8007780 <_printf_i+0x19c>
- 800777a: 066a lsls r2, r5, #25
- 800777c: d5fb bpl.n 8007776 <_printf_i+0x192>
- 800777e: 8019 strh r1, [r3, #0]
- 8007780: 2300 movs r3, #0
- 8007782: 4665 mov r5, ip
- 8007784: 6123 str r3, [r4, #16]
- 8007786: e7b9 b.n 80076fc <_printf_i+0x118>
- 8007788: 6813 ldr r3, [r2, #0]
- 800778a: 1d19 adds r1, r3, #4
- 800778c: 6011 str r1, [r2, #0]
- 800778e: 681d ldr r5, [r3, #0]
- 8007790: 6862 ldr r2, [r4, #4]
- 8007792: 2100 movs r1, #0
- 8007794: 4628 mov r0, r5
- 8007796: f000 f837 bl 8007808 <memchr>
- 800779a: b108 cbz r0, 80077a0 <_printf_i+0x1bc>
- 800779c: 1b40 subs r0, r0, r5
- 800779e: 6060 str r0, [r4, #4]
- 80077a0: 6863 ldr r3, [r4, #4]
- 80077a2: 6123 str r3, [r4, #16]
- 80077a4: 2300 movs r3, #0
- 80077a6: f884 3043 strb.w r3, [r4, #67] ; 0x43
- 80077aa: e7a7 b.n 80076fc <_printf_i+0x118>
- 80077ac: 6923 ldr r3, [r4, #16]
- 80077ae: 462a mov r2, r5
- 80077b0: 4639 mov r1, r7
- 80077b2: 4630 mov r0, r6
- 80077b4: 47c0 blx r8
- 80077b6: 3001 adds r0, #1
- 80077b8: d0aa beq.n 8007710 <_printf_i+0x12c>
- 80077ba: 6823 ldr r3, [r4, #0]
- 80077bc: 079b lsls r3, r3, #30
- 80077be: d413 bmi.n 80077e8 <_printf_i+0x204>
- 80077c0: 68e0 ldr r0, [r4, #12]
- 80077c2: 9b03 ldr r3, [sp, #12]
- 80077c4: 4298 cmp r0, r3
- 80077c6: bfb8 it lt
- 80077c8: 4618 movlt r0, r3
- 80077ca: e7a3 b.n 8007714 <_printf_i+0x130>
- 80077cc: 2301 movs r3, #1
- 80077ce: 464a mov r2, r9
- 80077d0: 4639 mov r1, r7
- 80077d2: 4630 mov r0, r6
- 80077d4: 47c0 blx r8
- 80077d6: 3001 adds r0, #1
- 80077d8: d09a beq.n 8007710 <_printf_i+0x12c>
- 80077da: 3501 adds r5, #1
- 80077dc: 68e3 ldr r3, [r4, #12]
- 80077de: 9a03 ldr r2, [sp, #12]
- 80077e0: 1a9b subs r3, r3, r2
- 80077e2: 42ab cmp r3, r5
- 80077e4: dcf2 bgt.n 80077cc <_printf_i+0x1e8>
- 80077e6: e7eb b.n 80077c0 <_printf_i+0x1dc>
- 80077e8: 2500 movs r5, #0
- 80077ea: f104 0919 add.w r9, r4, #25
- 80077ee: e7f5 b.n 80077dc <_printf_i+0x1f8>
- 80077f0: 2b00 cmp r3, #0
- 80077f2: d1ac bne.n 800774e <_printf_i+0x16a>
- 80077f4: 7803 ldrb r3, [r0, #0]
- 80077f6: f104 0542 add.w r5, r4, #66 ; 0x42
- 80077fa: f884 3042 strb.w r3, [r4, #66] ; 0x42
- 80077fe: e76c b.n 80076da <_printf_i+0xf6>
- 8007800: 08007fd5 .word 0x08007fd5
- 8007804: 08007fe6 .word 0x08007fe6
-
- 08007808 <memchr>:
- 8007808: b510 push {r4, lr}
- 800780a: b2c9 uxtb r1, r1
- 800780c: 4402 add r2, r0
- 800780e: 4290 cmp r0, r2
- 8007810: 4603 mov r3, r0
- 8007812: d101 bne.n 8007818 <memchr+0x10>
- 8007814: 2300 movs r3, #0
- 8007816: e003 b.n 8007820 <memchr+0x18>
- 8007818: 781c ldrb r4, [r3, #0]
- 800781a: 3001 adds r0, #1
- 800781c: 428c cmp r4, r1
- 800781e: d1f6 bne.n 800780e <memchr+0x6>
- 8007820: 4618 mov r0, r3
- 8007822: bd10 pop {r4, pc}
-
- 08007824 <memcpy>:
- 8007824: b510 push {r4, lr}
- 8007826: 1e43 subs r3, r0, #1
- 8007828: 440a add r2, r1
- 800782a: 4291 cmp r1, r2
- 800782c: d100 bne.n 8007830 <memcpy+0xc>
- 800782e: bd10 pop {r4, pc}
- 8007830: f811 4b01 ldrb.w r4, [r1], #1
- 8007834: f803 4f01 strb.w r4, [r3, #1]!
- 8007838: e7f7 b.n 800782a <memcpy+0x6>
-
- 0800783a <memmove>:
- 800783a: 4288 cmp r0, r1
- 800783c: b510 push {r4, lr}
- 800783e: eb01 0302 add.w r3, r1, r2
- 8007842: d807 bhi.n 8007854 <memmove+0x1a>
- 8007844: 1e42 subs r2, r0, #1
- 8007846: 4299 cmp r1, r3
- 8007848: d00a beq.n 8007860 <memmove+0x26>
- 800784a: f811 4b01 ldrb.w r4, [r1], #1
- 800784e: f802 4f01 strb.w r4, [r2, #1]!
- 8007852: e7f8 b.n 8007846 <memmove+0xc>
- 8007854: 4283 cmp r3, r0
- 8007856: d9f5 bls.n 8007844 <memmove+0xa>
- 8007858: 1881 adds r1, r0, r2
- 800785a: 1ad2 subs r2, r2, r3
- 800785c: 42d3 cmn r3, r2
- 800785e: d100 bne.n 8007862 <memmove+0x28>
- 8007860: bd10 pop {r4, pc}
- 8007862: f813 4d01 ldrb.w r4, [r3, #-1]!
- 8007866: f801 4d01 strb.w r4, [r1, #-1]!
- 800786a: e7f7 b.n 800785c <memmove+0x22>
-
- 0800786c <_free_r>:
- 800786c: b538 push {r3, r4, r5, lr}
- 800786e: 4605 mov r5, r0
- 8007870: 2900 cmp r1, #0
- 8007872: d043 beq.n 80078fc <_free_r+0x90>
- 8007874: f851 3c04 ldr.w r3, [r1, #-4]
- 8007878: 1f0c subs r4, r1, #4
- 800787a: 2b00 cmp r3, #0
- 800787c: bfb8 it lt
- 800787e: 18e4 addlt r4, r4, r3
- 8007880: f000 f8d0 bl 8007a24 <__malloc_lock>
- 8007884: 4a1e ldr r2, [pc, #120] ; (8007900 <_free_r+0x94>)
- 8007886: 6813 ldr r3, [r2, #0]
- 8007888: 4610 mov r0, r2
- 800788a: b933 cbnz r3, 800789a <_free_r+0x2e>
- 800788c: 6063 str r3, [r4, #4]
- 800788e: 6014 str r4, [r2, #0]
- 8007890: 4628 mov r0, r5
- 8007892: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
- 8007896: f000 b8c6 b.w 8007a26 <__malloc_unlock>
- 800789a: 42a3 cmp r3, r4
- 800789c: d90b bls.n 80078b6 <_free_r+0x4a>
- 800789e: 6821 ldr r1, [r4, #0]
- 80078a0: 1862 adds r2, r4, r1
- 80078a2: 4293 cmp r3, r2
- 80078a4: bf01 itttt eq
- 80078a6: 681a ldreq r2, [r3, #0]
- 80078a8: 685b ldreq r3, [r3, #4]
- 80078aa: 1852 addeq r2, r2, r1
- 80078ac: 6022 streq r2, [r4, #0]
- 80078ae: 6063 str r3, [r4, #4]
- 80078b0: 6004 str r4, [r0, #0]
- 80078b2: e7ed b.n 8007890 <_free_r+0x24>
- 80078b4: 4613 mov r3, r2
- 80078b6: 685a ldr r2, [r3, #4]
- 80078b8: b10a cbz r2, 80078be <_free_r+0x52>
- 80078ba: 42a2 cmp r2, r4
- 80078bc: d9fa bls.n 80078b4 <_free_r+0x48>
- 80078be: 6819 ldr r1, [r3, #0]
- 80078c0: 1858 adds r0, r3, r1
- 80078c2: 42a0 cmp r0, r4
- 80078c4: d10b bne.n 80078de <_free_r+0x72>
- 80078c6: 6820 ldr r0, [r4, #0]
- 80078c8: 4401 add r1, r0
- 80078ca: 1858 adds r0, r3, r1
- 80078cc: 4282 cmp r2, r0
- 80078ce: 6019 str r1, [r3, #0]
- 80078d0: d1de bne.n 8007890 <_free_r+0x24>
- 80078d2: 6810 ldr r0, [r2, #0]
- 80078d4: 6852 ldr r2, [r2, #4]
- 80078d6: 4401 add r1, r0
- 80078d8: 6019 str r1, [r3, #0]
- 80078da: 605a str r2, [r3, #4]
- 80078dc: e7d8 b.n 8007890 <_free_r+0x24>
- 80078de: d902 bls.n 80078e6 <_free_r+0x7a>
- 80078e0: 230c movs r3, #12
- 80078e2: 602b str r3, [r5, #0]
- 80078e4: e7d4 b.n 8007890 <_free_r+0x24>
- 80078e6: 6820 ldr r0, [r4, #0]
- 80078e8: 1821 adds r1, r4, r0
- 80078ea: 428a cmp r2, r1
- 80078ec: bf01 itttt eq
- 80078ee: 6811 ldreq r1, [r2, #0]
- 80078f0: 6852 ldreq r2, [r2, #4]
- 80078f2: 1809 addeq r1, r1, r0
- 80078f4: 6021 streq r1, [r4, #0]
- 80078f6: 6062 str r2, [r4, #4]
- 80078f8: 605c str r4, [r3, #4]
- 80078fa: e7c9 b.n 8007890 <_free_r+0x24>
- 80078fc: bd38 pop {r3, r4, r5, pc}
- 80078fe: bf00 nop
- 8007900: 200002e0 .word 0x200002e0
-
- 08007904 <_malloc_r>:
- 8007904: b570 push {r4, r5, r6, lr}
- 8007906: 1ccd adds r5, r1, #3
- 8007908: f025 0503 bic.w r5, r5, #3
- 800790c: 3508 adds r5, #8
- 800790e: 2d0c cmp r5, #12
- 8007910: bf38 it cc
- 8007912: 250c movcc r5, #12
- 8007914: 2d00 cmp r5, #0
- 8007916: 4606 mov r6, r0
- 8007918: db01 blt.n 800791e <_malloc_r+0x1a>
- 800791a: 42a9 cmp r1, r5
- 800791c: d903 bls.n 8007926 <_malloc_r+0x22>
- 800791e: 230c movs r3, #12
- 8007920: 6033 str r3, [r6, #0]
- 8007922: 2000 movs r0, #0
- 8007924: bd70 pop {r4, r5, r6, pc}
- 8007926: f000 f87d bl 8007a24 <__malloc_lock>
- 800792a: 4a21 ldr r2, [pc, #132] ; (80079b0 <_malloc_r+0xac>)
- 800792c: 6814 ldr r4, [r2, #0]
- 800792e: 4621 mov r1, r4
- 8007930: b991 cbnz r1, 8007958 <_malloc_r+0x54>
- 8007932: 4c20 ldr r4, [pc, #128] ; (80079b4 <_malloc_r+0xb0>)
- 8007934: 6823 ldr r3, [r4, #0]
- 8007936: b91b cbnz r3, 8007940 <_malloc_r+0x3c>
- 8007938: 4630 mov r0, r6
- 800793a: f000 f863 bl 8007a04 <_sbrk_r>
- 800793e: 6020 str r0, [r4, #0]
- 8007940: 4629 mov r1, r5
- 8007942: 4630 mov r0, r6
- 8007944: f000 f85e bl 8007a04 <_sbrk_r>
- 8007948: 1c43 adds r3, r0, #1
- 800794a: d124 bne.n 8007996 <_malloc_r+0x92>
- 800794c: 230c movs r3, #12
- 800794e: 4630 mov r0, r6
- 8007950: 6033 str r3, [r6, #0]
- 8007952: f000 f868 bl 8007a26 <__malloc_unlock>
- 8007956: e7e4 b.n 8007922 <_malloc_r+0x1e>
- 8007958: 680b ldr r3, [r1, #0]
- 800795a: 1b5b subs r3, r3, r5
- 800795c: d418 bmi.n 8007990 <_malloc_r+0x8c>
- 800795e: 2b0b cmp r3, #11
- 8007960: d90f bls.n 8007982 <_malloc_r+0x7e>
- 8007962: 600b str r3, [r1, #0]
- 8007964: 18cc adds r4, r1, r3
- 8007966: 50cd str r5, [r1, r3]
- 8007968: 4630 mov r0, r6
- 800796a: f000 f85c bl 8007a26 <__malloc_unlock>
- 800796e: f104 000b add.w r0, r4, #11
- 8007972: 1d23 adds r3, r4, #4
- 8007974: f020 0007 bic.w r0, r0, #7
- 8007978: 1ac3 subs r3, r0, r3
- 800797a: d0d3 beq.n 8007924 <_malloc_r+0x20>
- 800797c: 425a negs r2, r3
- 800797e: 50e2 str r2, [r4, r3]
- 8007980: e7d0 b.n 8007924 <_malloc_r+0x20>
- 8007982: 684b ldr r3, [r1, #4]
- 8007984: 428c cmp r4, r1
- 8007986: bf16 itet ne
- 8007988: 6063 strne r3, [r4, #4]
- 800798a: 6013 streq r3, [r2, #0]
- 800798c: 460c movne r4, r1
- 800798e: e7eb b.n 8007968 <_malloc_r+0x64>
- 8007990: 460c mov r4, r1
- 8007992: 6849 ldr r1, [r1, #4]
- 8007994: e7cc b.n 8007930 <_malloc_r+0x2c>
- 8007996: 1cc4 adds r4, r0, #3
- 8007998: f024 0403 bic.w r4, r4, #3
- 800799c: 42a0 cmp r0, r4
- 800799e: d005 beq.n 80079ac <_malloc_r+0xa8>
- 80079a0: 1a21 subs r1, r4, r0
- 80079a2: 4630 mov r0, r6
- 80079a4: f000 f82e bl 8007a04 <_sbrk_r>
- 80079a8: 3001 adds r0, #1
- 80079aa: d0cf beq.n 800794c <_malloc_r+0x48>
- 80079ac: 6025 str r5, [r4, #0]
- 80079ae: e7db b.n 8007968 <_malloc_r+0x64>
- 80079b0: 200002e0 .word 0x200002e0
- 80079b4: 200002e4 .word 0x200002e4
-
- 080079b8 <_realloc_r>:
- 80079b8: b5f8 push {r3, r4, r5, r6, r7, lr}
- 80079ba: 4607 mov r7, r0
- 80079bc: 4614 mov r4, r2
- 80079be: 460e mov r6, r1
- 80079c0: b921 cbnz r1, 80079cc <_realloc_r+0x14>
- 80079c2: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr}
- 80079c6: 4611 mov r1, r2
- 80079c8: f7ff bf9c b.w 8007904 <_malloc_r>
- 80079cc: b922 cbnz r2, 80079d8 <_realloc_r+0x20>
- 80079ce: f7ff ff4d bl 800786c <_free_r>
- 80079d2: 4625 mov r5, r4
- 80079d4: 4628 mov r0, r5
- 80079d6: bdf8 pop {r3, r4, r5, r6, r7, pc}
- 80079d8: f000 f826 bl 8007a28 <_malloc_usable_size_r>
- 80079dc: 42a0 cmp r0, r4
- 80079de: d20f bcs.n 8007a00 <_realloc_r+0x48>
- 80079e0: 4621 mov r1, r4
- 80079e2: 4638 mov r0, r7
- 80079e4: f7ff ff8e bl 8007904 <_malloc_r>
- 80079e8: 4605 mov r5, r0
- 80079ea: 2800 cmp r0, #0
- 80079ec: d0f2 beq.n 80079d4 <_realloc_r+0x1c>
- 80079ee: 4631 mov r1, r6
- 80079f0: 4622 mov r2, r4
- 80079f2: f7ff ff17 bl 8007824 <memcpy>
- 80079f6: 4631 mov r1, r6
- 80079f8: 4638 mov r0, r7
- 80079fa: f7ff ff37 bl 800786c <_free_r>
- 80079fe: e7e9 b.n 80079d4 <_realloc_r+0x1c>
- 8007a00: 4635 mov r5, r6
- 8007a02: e7e7 b.n 80079d4 <_realloc_r+0x1c>
-
- 08007a04 <_sbrk_r>:
- 8007a04: b538 push {r3, r4, r5, lr}
- 8007a06: 2300 movs r3, #0
- 8007a08: 4c05 ldr r4, [pc, #20] ; (8007a20 <_sbrk_r+0x1c>)
- 8007a0a: 4605 mov r5, r0
- 8007a0c: 4608 mov r0, r1
- 8007a0e: 6023 str r3, [r4, #0]
- 8007a10: f7f9 fdd8 bl 80015c4 <_sbrk>
- 8007a14: 1c43 adds r3, r0, #1
- 8007a16: d102 bne.n 8007a1e <_sbrk_r+0x1a>
- 8007a18: 6823 ldr r3, [r4, #0]
- 8007a1a: b103 cbz r3, 8007a1e <_sbrk_r+0x1a>
- 8007a1c: 602b str r3, [r5, #0]
- 8007a1e: bd38 pop {r3, r4, r5, pc}
- 8007a20: 20004550 .word 0x20004550
-
- 08007a24 <__malloc_lock>:
- 8007a24: 4770 bx lr
-
- 08007a26 <__malloc_unlock>:
- 8007a26: 4770 bx lr
-
- 08007a28 <_malloc_usable_size_r>:
- 8007a28: f851 3c04 ldr.w r3, [r1, #-4]
- 8007a2c: 1f18 subs r0, r3, #4
- 8007a2e: 2b00 cmp r3, #0
- 8007a30: bfbc itt lt
- 8007a32: 580b ldrlt r3, [r1, r0]
- 8007a34: 18c0 addlt r0, r0, r3
- 8007a36: 4770 bx lr
-
- 08007a38 <_init>:
- 8007a38: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8007a3a: bf00 nop
- 8007a3c: bcf8 pop {r3, r4, r5, r6, r7}
- 8007a3e: bc08 pop {r3}
- 8007a40: 469e mov lr, r3
- 8007a42: 4770 bx lr
-
- 08007a44 <_fini>:
- 8007a44: b5f8 push {r3, r4, r5, r6, r7, lr}
- 8007a46: bf00 nop
- 8007a48: bcf8 pop {r3, r4, r5, r6, r7}
- 8007a4a: bc08 pop {r3}
- 8007a4c: 469e mov lr, r3
- 8007a4e: 4770 bx lr
|