gh_usb.h 446 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293
  1. /*!
  2. *******************************************************************************
  3. **
  4. ** \file gh_usb.h
  5. **
  6. ** \brief USB.
  7. **
  8. ** Copyright: 2012 - 2013 (C) GoKe Microelectronics ShangHai Branch
  9. **
  10. ** \attention THIS SAMPLE CODE IS PROVIDED AS IS. GOKE MICROELECTRONICS
  11. ** ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR
  12. ** OMMISSIONS.
  13. **
  14. ** \note Do not modify this file as it is generated automatically.
  15. **
  16. ******************************************************************************/
  17. #ifndef _GH_USB_H
  18. #define _GH_USB_H
  19. #ifdef __LINUX__
  20. #include "reg4linux.h"
  21. #else
  22. #define FIO_ADDRESS(block,address) (address)
  23. #define FIO_MOFFSET(block,moffset) (moffset)
  24. #endif
  25. #ifndef __LINUX__
  26. #include "gtypes.h" /* global type definitions */
  27. #include "gh_lib_cfg.h" /* configuration */
  28. #endif
  29. #define GH_USB_ENABLE_DEBUG_PRINT 0
  30. #ifdef __LINUX__
  31. #define GH_USB_DEBUG_PRINT_FUNCTION printk
  32. #else
  33. #define GH_USB_DEBUG_PRINT_FUNCTION printf
  34. #endif
  35. #ifndef __LINUX__
  36. #if GH_USB_ENABLE_DEBUG_PRINT
  37. #include <stdio.h>
  38. #endif
  39. #endif
  40. /* check configuration */
  41. #ifndef GH_INLINE_LEVEL
  42. #error "GH_INLINE_LEVEL is not defined!"
  43. #endif
  44. #if GH_INLINE_LEVEL > 2
  45. #error "GH_INLINE_LEVEL must be set 0, 1 or 2!"
  46. #endif
  47. #ifndef GH_INLINE
  48. #error "GH_INLINE is not defined!"
  49. #endif
  50. /* disable inlining for debugging */
  51. #ifdef DEBUG
  52. #undef GH_INLINE_LEVEL
  53. #define GH_INLINE_LEVEL 0
  54. #endif
  55. /*----------------------------------------------------------------------------*/
  56. /* registers */
  57. /*----------------------------------------------------------------------------*/
  58. #define REG_USB_FADDR FIO_ADDRESS(USB,0x60006000) /* read/write */
  59. #define REG_USB_POWER_R_PERI FIO_ADDRESS(USB,0x60006001) /* read */
  60. #define REG_USB_POWER_W_PERI FIO_ADDRESS(USB,0x60006001) /* write */
  61. #define REG_USB_POWER_R_HOST FIO_ADDRESS(USB,0x60006001) /* read */
  62. #define REG_USB_POWER_W_HOST FIO_ADDRESS(USB,0x60006001) /* write */
  63. #define REG_USB_INTRTX FIO_ADDRESS(USB,0x60006002) /* read */
  64. #define REG_USB_INTRRX FIO_ADDRESS(USB,0x60006004) /* read */
  65. #define REG_USB_INTRTXE FIO_ADDRESS(USB,0x60006006) /* read/write */
  66. #define REG_USB_INTRRXE FIO_ADDRESS(USB,0x60006008) /* read/write */
  67. #define REG_USB_INTRUSB FIO_ADDRESS(USB,0x6000600A) /* read */
  68. #define REG_USB_INTRUSBE FIO_ADDRESS(USB,0x6000600B) /* read/write */
  69. #define REG_USB_FRAME FIO_ADDRESS(USB,0x6000600C) /* read */
  70. #define REG_USB_INDEX FIO_ADDRESS(USB,0x6000600E) /* read/write */
  71. #define REG_USB_TESTMODE FIO_ADDRESS(USB,0x6000600F) /* read/write */
  72. #define REG_USB_CSR0L_R_PERI FIO_ADDRESS(USB,0x60006012) /* read */
  73. #define REG_USB_CSR0L_W_PERI FIO_ADDRESS(USB,0x60006012) /* write */
  74. #define REG_USB_CSR0H_W_PERI FIO_ADDRESS(USB,0x60006013) /* write */
  75. #define REG_USB_CSR0L_R_HOST FIO_ADDRESS(USB,0x60006012) /* read */
  76. #define REG_USB_CSR0H_R_HOST FIO_ADDRESS(USB,0x60006013) /* read */
  77. #define REG_USB_CSR0L_W_HOST FIO_ADDRESS(USB,0x60006012) /* write */
  78. #define REG_USB_CSR0H_W_HOST FIO_ADDRESS(USB,0x60006013) /* write */
  79. #define REG_USB_COUNT0 FIO_ADDRESS(USB,0x60006018) /* read */
  80. #define REG_USB_TYPE0 FIO_ADDRESS(USB,0x6000601A) /* read/write */
  81. #define REG_USB_NAKLIMIT0_HOST FIO_ADDRESS(USB,0x6000601B) /* read/write */
  82. #define REG_USB_CONFIGDATA FIO_ADDRESS(USB,0x6000601F) /* read */
  83. #define REG_USB_TXMAXP FIO_ADDRESS(USB,0x60006010) /* read/write */
  84. #define REG_USB_TXCSRL_R_PERI FIO_ADDRESS(USB,0x60006012) /* read */
  85. #define REG_USB_TXCSRH_R_PERI FIO_ADDRESS(USB,0x60006013) /* read */
  86. #define REG_USB_TXCSRL_W_PERI FIO_ADDRESS(USB,0x60006012) /* write */
  87. #define REG_USB_TXCSRH_W_PERI FIO_ADDRESS(USB,0x60006013) /* write */
  88. #define REG_USB_TXCSRL_R_HOST FIO_ADDRESS(USB,0x60006012) /* read */
  89. #define REG_USB_TXCSRH_R_HOST FIO_ADDRESS(USB,0x60006013) /* read */
  90. #define REG_USB_TXCSRL_W_HOST FIO_ADDRESS(USB,0x60006012) /* write */
  91. #define REG_USB_TXCSRH_W_HOST FIO_ADDRESS(USB,0x60006013) /* write */
  92. #define REG_USB_RXMAXP FIO_ADDRESS(USB,0x60006014) /* read/write */
  93. #define REG_USB_RXCSRL_R_PERI FIO_ADDRESS(USB,0x60006016) /* read */
  94. #define REG_USB_RXCSRH_R_PERI FIO_ADDRESS(USB,0x60006017) /* read */
  95. #define REG_USB_RXCSRL_W_PERI FIO_ADDRESS(USB,0x60006016) /* write */
  96. #define REG_USB_RXCSRH_W_PERI FIO_ADDRESS(USB,0x60006017) /* write */
  97. #define REG_USB_RXCSRL_R_HOST FIO_ADDRESS(USB,0x60006016) /* read */
  98. #define REG_USB_RXCSRH_R_HOST FIO_ADDRESS(USB,0x60006017) /* read */
  99. #define REG_USB_RXCSRL_W_HOST FIO_ADDRESS(USB,0x60006016) /* write */
  100. #define REG_USB_RXCSRH_W_HOST FIO_ADDRESS(USB,0x60006017) /* write */
  101. #define REG_USB_RXCOUNT FIO_ADDRESS(USB,0x60006018) /* read */
  102. #define REG_USB_TXTYPE_HOST FIO_ADDRESS(USB,0x6000610A) /* read/write */
  103. #define REG_USB_TXINTERVAL_HOST FIO_ADDRESS(USB,0x6000601B) /* read/write */
  104. #define REG_USB_RXTYPE_HOST FIO_ADDRESS(USB,0x6000601C) /* read/write */
  105. #define REG_USB_RXINTERVAL_HOST FIO_ADDRESS(USB,0x6000601D) /* read/write */
  106. #define REG_USB_FIFOSIZE FIO_ADDRESS(USB,0x6000601F) /* read */
  107. #define REG_USB_DEVCTL_R FIO_ADDRESS(USB,0x60006060) /* read */
  108. #define REG_USB_DEVCTL_W FIO_ADDRESS(USB,0x60006060) /* write */
  109. #define REG_USB_MISC FIO_ADDRESS(USB,0x60006061) /* read/write */
  110. #define REG_USB_TXFIFOSZ FIO_ADDRESS(USB,0x60006062) /* read/write */
  111. #define REG_USB_RXFIFOSZ FIO_ADDRESS(USB,0x60006063) /* read/write */
  112. #define REG_USB_TXFIFOADD FIO_ADDRESS(USB,0x60006064) /* read/write */
  113. #define REG_USB_RXFIFOADD FIO_ADDRESS(USB,0x60006066) /* read/write */
  114. #define REG_USB_VSTATUS FIO_ADDRESS(USB,0x60006068) /* read */
  115. #define REG_USB_VCONTROL FIO_ADDRESS(USB,0x60006068) /* write */
  116. #define REG_USB_HWVERS FIO_ADDRESS(USB,0x6000606C) /* read */
  117. #define REG_USB_EPINFO FIO_ADDRESS(USB,0x60006078) /* read */
  118. #define REG_USB_RAMINFO FIO_ADDRESS(USB,0x60006079) /* read */
  119. #define REG_USB_LINKINFO FIO_ADDRESS(USB,0x6000607A) /* read/write */
  120. #define REG_USB_VPLEN FIO_ADDRESS(USB,0x6000607B) /* read/write */
  121. #define REG_USB_HS_EOF1 FIO_ADDRESS(USB,0x6000607C) /* read/write */
  122. #define REG_USB_FS_EOF1 FIO_ADDRESS(USB,0x6000607D) /* read/write */
  123. #define REG_USB_LS_EOF1 FIO_ADDRESS(USB,0x6000607E) /* read/write */
  124. #define REG_USB_SOFT_RST FIO_ADDRESS(USB,0x6000607F) /* read/write */
  125. #define REG_USB_TXFUNCADDR FIO_ADDRESS(USB,0x60006080) /* read/write */
  126. #define REG_USB_TXHUBADDR FIO_ADDRESS(USB,0x60006082) /* read/write */
  127. #define REG_USB_TXHUBPORT FIO_ADDRESS(USB,0x60006083) /* read/write */
  128. #define REG_USB_RXFUNCADDR FIO_ADDRESS(USB,0x60006084) /* read/write */
  129. #define REG_USB_RXHUBADDR FIO_ADDRESS(USB,0x60006086) /* read/write */
  130. #define REG_USB_RXHUBPORT FIO_ADDRESS(USB,0x60006087) /* read/write */
  131. #define REG_USB_DMA_INTR FIO_ADDRESS(USB,0x60006200) /* read/write */
  132. #define REG_USB_DMA_CNTL FIO_ADDRESS(USB,0x60006204) /* read/write */
  133. #define REG_USB_DMA_ADDR FIO_ADDRESS(USB,0x60006208) /* read/write */
  134. #define REG_USB_DMA_COUNT FIO_ADDRESS(USB,0x6000620C) /* read/write */
  135. #define REG_USB_RQPKTCOUNT_HOST FIO_ADDRESS(USB,0x60006300) /* read/write */
  136. #define REG_USB_RXDPKTBUFDIS FIO_ADDRESS(USB,0x60006340) /* read/write */
  137. #define REG_USB_TXDPKTBUFDIS FIO_ADDRESS(USB,0x60006342) /* read/write */
  138. #define REG_USB_C_T_UCH FIO_ADDRESS(USB,0x60006344) /* read/write */
  139. #define REG_USB_C_T_HSRTN FIO_ADDRESS(USB,0x60006346) /* read/write */
  140. #define REG_USB_C_T_HSBT FIO_ADDRESS(USB,0x60006348) /* read/write */
  141. #define REG_USB_LPM_ATTR FIO_ADDRESS(USB,0x60006360) /* read */
  142. #define REG_USB_LPM_CNTRL_PERI FIO_ADDRESS(USB,0x60006362) /* read/write */
  143. #define REG_USB_LPM_CNTRL_HOST FIO_ADDRESS(USB,0x60006362) /* read/write */
  144. #define REG_USB_LPM_INTREN FIO_ADDRESS(USB,0x60006363) /* read/write */
  145. #define REG_USB_LPM_INTR_PERI FIO_ADDRESS(USB,0x60006364) /* read */
  146. #define REG_USB_LPM_INTR_HOST FIO_ADDRESS(USB,0x60006364) /* read */
  147. #define REG_USB_LPM_FADDR_HOST FIO_ADDRESS(USB,0x60006365) /* read */
  148. #define REG_USB_FIFOS_U32 FIO_ADDRESS(USB,0x60006400) /* read/write */ // by yke
  149. #define OFFSET_USB_FIFOS_U32 0x08
  150. #if 1
  151. #define REG_USB_FIFOS REG_USB_FIFOS_U32 /* read/write */
  152. #define OFFSET_USB_EP_FIFO OFFSET_USB_FIFOS_U32
  153. #else
  154. #define REG_USB_FIFOS FIO_ADDRESS(USB,0x60006020) /* read/write */
  155. #define OFFSET_USB_EP_FIFO 0x04
  156. #endif
  157. #define REG_USB_ADDR_FIFO_EP(i) FIO_ADDRESS(USB, (REG_USB_FIFOS + OFFSET_USB_EP_FIFO*(i)))
  158. /*----------------------------------------------------------------------------*/
  159. /* bit group structures */
  160. /*----------------------------------------------------------------------------*/
  161. typedef union { /* USB_FAddr */
  162. U8 all;
  163. struct {
  164. U8 funcaddr : 7;
  165. U8 : 1;
  166. } bitc;
  167. } GH_USB_FADDR_S;
  168. typedef union { /* USB_Power_R_PERI */
  169. U8 all;
  170. struct {
  171. U8 enable_suspendm : 1;
  172. U8 suspend_mode : 1;
  173. U8 resume : 1;
  174. U8 reset : 1;
  175. U8 hs_mode : 1;
  176. U8 hs_enab : 1;
  177. U8 soft_conn : 1;
  178. U8 iso_update : 1;
  179. } bitc;
  180. } GH_USB_POWER_R_PERI_S;
  181. typedef union { /* USB_Power_W_PERI */
  182. U8 all;
  183. struct {
  184. U8 enable_suspendm : 1;
  185. U8 : 1;
  186. U8 resume : 1;
  187. U8 : 2;
  188. U8 hs_enab : 1;
  189. U8 soft_conn : 1;
  190. U8 iso_update : 1;
  191. } bitc;
  192. } GH_USB_POWER_W_PERI_S;
  193. typedef union { /* USB_Power_R_HOST */
  194. U8 all;
  195. struct {
  196. U8 enable_suspendm : 1;
  197. U8 : 1;
  198. U8 resume : 1;
  199. U8 reset : 1;
  200. U8 hs_mode : 1;
  201. U8 hs_enab : 1;
  202. U8 : 2;
  203. } bitc;
  204. } GH_USB_POWER_R_HOST_S;
  205. typedef union { /* USB_Power_W_HOST */
  206. U8 all;
  207. struct {
  208. U8 enable_suspendm : 1;
  209. U8 suspend_mode : 1;
  210. U8 resume : 1;
  211. U8 reset : 1;
  212. U8 : 1;
  213. U8 hs_enab : 1;
  214. U8 : 2;
  215. } bitc;
  216. } GH_USB_POWER_W_HOST_S;
  217. typedef union { /* USB_IntrTx */
  218. U16 all;
  219. struct {
  220. U16 ep0 : 1;
  221. U16 ep1tx : 1;
  222. U16 ep2tx : 1;
  223. U16 ep3tx : 1;
  224. U16 ep4tx : 1;
  225. U16 ep5tx : 1;
  226. U16 ep6tx : 1;
  227. U16 ep7tx : 1;
  228. U16 ep8tx : 1;
  229. U16 ep9tx : 1;
  230. U16 ep10tx : 1;
  231. U16 ep11tx : 1;
  232. U16 ep12tx : 1;
  233. U16 ep13tx : 1;
  234. U16 ep14tx : 1;
  235. U16 ep15tx : 1;
  236. } bitc;
  237. } GH_USB_INTRTX_S;
  238. typedef union { /* USB_IntrRx */
  239. U16 all;
  240. struct {
  241. U16 : 1;
  242. U16 ep1rx : 1;
  243. U16 ep2rx : 1;
  244. U16 ep3rx : 1;
  245. U16 ep4rx : 1;
  246. U16 ep5rx : 1;
  247. U16 ep6rx : 1;
  248. U16 ep7rx : 1;
  249. U16 ep8rx : 1;
  250. U16 ep9rx : 1;
  251. U16 ep10rx : 1;
  252. U16 ep11rx : 1;
  253. U16 ep12rx : 1;
  254. U16 ep13rx : 1;
  255. U16 ep14rx : 1;
  256. U16 ep15rx : 1;
  257. } bitc;
  258. } GH_USB_INTRRX_S;
  259. typedef union { /* USB_IntrTxE */
  260. U16 all;
  261. struct {
  262. U16 ep0 : 1;
  263. U16 ep1tx : 1;
  264. U16 ep2tx : 1;
  265. U16 ep3tx : 1;
  266. U16 ep4tx : 1;
  267. U16 ep5tx : 1;
  268. U16 ep6tx : 1;
  269. U16 ep7tx : 1;
  270. U16 ep8tx : 1;
  271. U16 ep9tx : 1;
  272. U16 ep10tx : 1;
  273. U16 ep11tx : 1;
  274. U16 ep12tx : 1;
  275. U16 ep13tx : 1;
  276. U16 ep14tx : 1;
  277. U16 ep15tx : 1;
  278. } bitc;
  279. } GH_USB_INTRTXE_S;
  280. typedef union { /* USB_IntrRxE */
  281. U16 all;
  282. struct {
  283. U16 : 1;
  284. U16 ep1rx : 1;
  285. U16 ep2rx : 1;
  286. U16 ep3rx : 1;
  287. U16 ep4rx : 1;
  288. U16 ep5rx : 1;
  289. U16 ep6rx : 1;
  290. U16 ep7rx : 1;
  291. U16 ep8rx : 1;
  292. U16 ep9rx : 1;
  293. U16 ep10rx : 1;
  294. U16 ep11rx : 1;
  295. U16 ep12rx : 1;
  296. U16 ep13rx : 1;
  297. U16 ep14rx : 1;
  298. U16 ep15rx : 1;
  299. } bitc;
  300. } GH_USB_INTRRXE_S;
  301. typedef union { /* USB_IntrUSB */
  302. U8 all;
  303. struct {
  304. U8 suspend : 1;
  305. U8 resume : 1;
  306. U8 reset_babble : 1;
  307. U8 sof : 1;
  308. U8 conn : 1;
  309. U8 discon : 1;
  310. U8 sess_req : 1;
  311. U8 vbus_error : 1;
  312. } bitc;
  313. } GH_USB_INTRUSB_S;
  314. typedef union { /* USB_IntrUSBE */
  315. U8 all;
  316. struct {
  317. U8 suspend : 1;
  318. U8 resume : 1;
  319. U8 reset_babble : 1;
  320. U8 sof : 1;
  321. U8 conn : 1;
  322. U8 discon : 1;
  323. U8 sess_req : 1;
  324. U8 vbus_error : 1;
  325. } bitc;
  326. } GH_USB_INTRUSBE_S;
  327. typedef union { /* USB_Frame */
  328. U16 all;
  329. struct {
  330. U16 number : 11;
  331. U16 : 5;
  332. } bitc;
  333. } GH_USB_FRAME_S;
  334. typedef union { /* USB_Index */
  335. U8 all;
  336. struct {
  337. U8 selectedendpoint : 4;
  338. U8 : 4;
  339. } bitc;
  340. } GH_USB_INDEX_S;
  341. typedef union { /* USB_Testmode */
  342. U8 all;
  343. struct {
  344. U8 test_se0_nak : 1;
  345. U8 test_j : 1;
  346. U8 test_k : 1;
  347. U8 test_packet : 1;
  348. U8 force_hs : 1;
  349. U8 force_fs : 1;
  350. U8 fifo_access : 1;
  351. U8 force_host : 1;
  352. } bitc;
  353. } GH_USB_TESTMODE_S;
  354. typedef union { /* USB_CSR0L_R_PERI */
  355. U8 all;
  356. struct {
  357. U8 rxpktrdy : 1;
  358. U8 txpktrdy : 1;
  359. U8 sentstall : 1;
  360. U8 : 1;
  361. U8 setupend : 1;
  362. U8 : 3;
  363. } bitc;
  364. } GH_USB_CSR0L_R_PERI_S;
  365. typedef union { /* USB_CSR0L_W_PERI */
  366. U8 all;
  367. struct {
  368. U8 : 1;
  369. U8 txpktrdy : 1;
  370. U8 sentstall : 1;
  371. U8 dataend : 1;
  372. U8 : 1;
  373. U8 sendstall : 1;
  374. U8 servicedrxpktrdy : 1;
  375. U8 servicedsetupend : 1;
  376. } bitc;
  377. } GH_USB_CSR0L_W_PERI_S;
  378. typedef union { /* USB_CSR0H_W_PERI */
  379. U8 all;
  380. struct {
  381. U8 flushfifo : 1;
  382. U8 : 7;
  383. } bitc;
  384. } GH_USB_CSR0H_W_PERI_S;
  385. typedef union { /* USB_CSR0L_R_HOST */
  386. U8 all;
  387. struct {
  388. U8 rxpktrdy : 1;
  389. U8 txpktrdy : 1;
  390. U8 rxstall : 1;
  391. U8 setuppkt : 1;
  392. U8 error : 1;
  393. U8 reqpkt : 1;
  394. U8 statuspkt : 1;
  395. U8 naktimeout : 1;
  396. } bitc;
  397. } GH_USB_CSR0L_R_HOST_S;
  398. typedef union { /* USB_CSR0H_R_HOST */
  399. U8 all;
  400. struct {
  401. U8 : 1;
  402. U8 datatoggle : 1;
  403. U8 : 1;
  404. U8 disping : 1;
  405. U8 : 4;
  406. } bitc;
  407. } GH_USB_CSR0H_R_HOST_S;
  408. typedef union { /* USB_CSR0L_W_HOST */
  409. U8 all;
  410. struct {
  411. U8 rxpktrdy : 1;
  412. U8 txpktrdy : 1;
  413. U8 rxstall : 1;
  414. U8 setuppkt : 1;
  415. U8 error : 1;
  416. U8 reqpkt : 1;
  417. U8 statuspkt : 1;
  418. U8 naktimeout : 1;
  419. } bitc;
  420. } GH_USB_CSR0L_W_HOST_S;
  421. typedef union { /* USB_CSR0H_W_HOST */
  422. U8 all;
  423. struct {
  424. U8 flushfifo : 1;
  425. U8 datatoggle : 1;
  426. U8 datatogglewriteenable : 1;
  427. U8 disping : 1;
  428. U8 : 4;
  429. } bitc;
  430. } GH_USB_CSR0H_W_HOST_S;
  431. typedef union { /* USB_Count0 */
  432. U8 all;
  433. struct {
  434. U8 endpoint0rxcount : 8;
  435. } bitc;
  436. } GH_USB_COUNT0_S;
  437. typedef union { /* USB_Type0 */
  438. U8 all;
  439. struct {
  440. U8 : 6;
  441. U8 speed : 2;
  442. } bitc;
  443. } GH_USB_TYPE0_S;
  444. typedef union { /* USB_NAKLimit0_HOST */
  445. U8 all;
  446. struct {
  447. U8 endpoint0naklimit : 5;
  448. U8 : 3;
  449. } bitc;
  450. } GH_USB_NAKLIMIT0_HOST_S;
  451. typedef union { /* USB_ConfigData */
  452. U8 all;
  453. struct {
  454. U8 utmi_datawidth : 1;
  455. U8 softcone : 1;
  456. U8 dynfifo_sizing : 1;
  457. U8 hbtxe : 1;
  458. U8 hbrxe : 1;
  459. U8 bigendian : 1;
  460. U8 mptxe : 1;
  461. U8 mprxe : 1;
  462. } bitc;
  463. } GH_USB_CONFIGDATA_S;
  464. typedef union { /* USB_TxMaxP */
  465. U16 all;
  466. struct {
  467. U16 txmaxp : 11;
  468. U16 multiplier : 5;
  469. } bitc;
  470. } GH_USB_TXMAXP_S;
  471. typedef union { /* USB_TXCSRL_R_PERI */
  472. U8 all;
  473. struct {
  474. U8 txpktrdy : 1;
  475. U8 fifonotempty : 1;
  476. U8 underrun : 1;
  477. U8 : 1;
  478. U8 sendstall : 1;
  479. U8 sentstall : 1;
  480. U8 : 1;
  481. U8 incomptx : 1;
  482. } bitc;
  483. } GH_USB_TXCSRL_R_PERI_S;
  484. typedef union { /* USB_TXCSRH_R_PERI */
  485. U8 all;
  486. struct {
  487. U8 : 2;
  488. U8 dmareqmode : 1;
  489. U8 frcdatatog : 1;
  490. U8 dmareqenab : 1;
  491. U8 mode : 1;
  492. U8 iso : 1;
  493. U8 autoset : 1;
  494. } bitc;
  495. } GH_USB_TXCSRH_R_PERI_S;
  496. typedef union { /* USB_TXCSRL_W_PERI */
  497. U8 all;
  498. struct {
  499. U8 txpktrdy : 1;
  500. U8 fifonotempty : 1;
  501. U8 underrun : 1;
  502. U8 flushfifo : 1;
  503. U8 sendstall : 1;
  504. U8 sentstall : 1;
  505. U8 clrdatatog : 1;
  506. U8 incomptx : 1;
  507. } bitc;
  508. } GH_USB_TXCSRL_W_PERI_S;
  509. typedef union { /* USB_TXCSRH_W_PERI */
  510. U8 all;
  511. struct {
  512. U8 : 2;
  513. U8 dmareqmode : 1;
  514. U8 frcdatatog : 1;
  515. U8 dmareqenab : 1;
  516. U8 mode : 1;
  517. U8 iso : 1;
  518. U8 autoset : 1;
  519. } bitc;
  520. } GH_USB_TXCSRH_W_PERI_S;
  521. typedef union { /* USB_TXCSRL_R_HOST */
  522. U8 all;
  523. struct {
  524. U8 txpktrdy : 1;
  525. U8 fifonotempty : 1;
  526. U8 error : 1;
  527. U8 : 1;
  528. U8 setuppkt : 1;
  529. U8 rxstall : 1;
  530. U8 : 1;
  531. U8 incomptx : 1;
  532. } bitc;
  533. } GH_USB_TXCSRL_R_HOST_S;
  534. typedef union { /* USB_TXCSRH_R_HOST */
  535. U8 all;
  536. struct {
  537. U8 datatoggle : 1;
  538. U8 : 1;
  539. U8 dmareqmode : 1;
  540. U8 frcdatatog : 1;
  541. U8 dmareqenab : 1;
  542. U8 mode : 1;
  543. U8 : 1;
  544. U8 autoset : 1;
  545. } bitc;
  546. } GH_USB_TXCSRH_R_HOST_S;
  547. typedef union { /* USB_TXCSRL_W_HOST */
  548. U8 all;
  549. struct {
  550. U8 txpktrdy : 1;
  551. U8 fifonotempty : 1;
  552. U8 error : 1;
  553. U8 flushfifo : 1;
  554. U8 setuppkt : 1;
  555. U8 rxstall : 1;
  556. U8 clrdatatog : 1;
  557. U8 incomptx : 1;
  558. } bitc;
  559. } GH_USB_TXCSRL_W_HOST_S;
  560. typedef union { /* USB_TXCSRH_W_HOST */
  561. U8 all;
  562. struct {
  563. U8 datatoggle : 1;
  564. U8 datatogglewriteenable : 1;
  565. U8 dmareqmode : 1;
  566. U8 frcdatatog : 1;
  567. U8 dmareqenab : 1;
  568. U8 mode : 1;
  569. U8 : 1;
  570. U8 autoset : 1;
  571. } bitc;
  572. } GH_USB_TXCSRH_W_HOST_S;
  573. typedef union { /* USB_RxMaxP */
  574. U16 all;
  575. struct {
  576. U16 txmaxp : 11;
  577. U16 multiplier : 5;
  578. } bitc;
  579. } GH_USB_RXMAXP_S;
  580. typedef union { /* USB_RXCSRL_R_PERI */
  581. U8 all;
  582. struct {
  583. U8 rxpktrdy : 1;
  584. U8 fifofull : 1;
  585. U8 overrun : 1;
  586. U8 dataerror : 1;
  587. U8 : 1;
  588. U8 sendstall : 1;
  589. U8 sentstall : 1;
  590. U8 : 1;
  591. } bitc;
  592. } GH_USB_RXCSRL_R_PERI_S;
  593. typedef union { /* USB_RXCSRH_R_PERI */
  594. U8 all;
  595. struct {
  596. U8 incomprx : 1;
  597. U8 : 2;
  598. U8 dmareqmode : 1;
  599. U8 disnyet_piderror : 1;
  600. U8 dmareqenab : 1;
  601. U8 iso : 1;
  602. U8 autoclear : 1;
  603. } bitc;
  604. } GH_USB_RXCSRH_R_PERI_S;
  605. typedef union { /* USB_RXCSRL_W_PERI */
  606. U8 all;
  607. struct {
  608. U8 rxpktrdy : 1;
  609. U8 : 1;
  610. U8 overrun : 1;
  611. U8 : 1;
  612. U8 flushfifo : 1;
  613. U8 sendstall : 1;
  614. U8 sentstall : 1;
  615. U8 clrdatatog : 1;
  616. } bitc;
  617. } GH_USB_RXCSRL_W_PERI_S;
  618. typedef union { /* USB_RXCSRH_W_PERI */
  619. U8 all;
  620. struct {
  621. U8 incomprx : 1;
  622. U8 : 2;
  623. U8 dmareqmode : 1;
  624. U8 disnyet_piderror : 1;
  625. U8 dmareqenab : 1;
  626. U8 iso : 1;
  627. U8 autoclear : 1;
  628. } bitc;
  629. } GH_USB_RXCSRH_W_PERI_S;
  630. typedef union { /* USB_RXCSRL_R_HOST */
  631. U8 all;
  632. struct {
  633. U8 rxpktrdy : 1;
  634. U8 fifofull : 1;
  635. U8 error : 1;
  636. U8 dataerror_naktimeout : 1;
  637. U8 : 1;
  638. U8 reqpkt : 1;
  639. U8 rxstall : 1;
  640. U8 : 1;
  641. } bitc;
  642. } GH_USB_RXCSRL_R_HOST_S;
  643. typedef union { /* USB_RXCSRH_R_HOST */
  644. U8 all;
  645. struct {
  646. U8 incomprx : 1;
  647. U8 datatoggle : 1;
  648. U8 datatogglewriteenable : 1;
  649. U8 dmareqmode : 1;
  650. U8 piderror : 1;
  651. U8 dmareqenab : 1;
  652. U8 autoreq : 1;
  653. U8 autoclear : 1;
  654. } bitc;
  655. } GH_USB_RXCSRH_R_HOST_S;
  656. typedef union { /* USB_RXCSRL_W_HOST */
  657. U8 all;
  658. struct {
  659. U8 rxpktrdy : 1;
  660. U8 : 1;
  661. U8 error : 1;
  662. U8 dataerror_naktimeout : 1;
  663. U8 flushfifo : 1;
  664. U8 reqpkt : 1;
  665. U8 rxstall : 1;
  666. U8 clrdatatog : 1;
  667. } bitc;
  668. } GH_USB_RXCSRL_W_HOST_S;
  669. typedef union { /* USB_RXCSRH_W_HOST */
  670. U8 all;
  671. struct {
  672. U8 incomprx : 1;
  673. U8 : 2;
  674. U8 dmareqmode : 1;
  675. U8 : 1;
  676. U8 dmareqenab : 1;
  677. U8 autoreq : 1;
  678. U8 autoclear : 1;
  679. } bitc;
  680. } GH_USB_RXCSRH_W_HOST_S;
  681. typedef union { /* USB_RxCount */
  682. U8 all;
  683. struct {
  684. U8 endpointrxcount : 8;
  685. } bitc;
  686. } GH_USB_RXCOUNT_S;
  687. typedef union { /* USB_TxType_HOST */
  688. U8 all;
  689. struct {
  690. U8 targetendpointnumber : 4;
  691. U8 protocol : 2;
  692. U8 speed : 2;
  693. } bitc;
  694. } GH_USB_TXTYPE_HOST_S;
  695. typedef union { /* USB_TxInterval_HOST */
  696. U8 all;
  697. struct {
  698. U8 txpollinginterval_naklimit : 8;
  699. } bitc;
  700. } GH_USB_TXINTERVAL_HOST_S;
  701. typedef union { /* USB_RxType_HOST */
  702. U8 all;
  703. struct {
  704. U8 targetendpointnumber : 4;
  705. U8 protocol : 2;
  706. U8 speed : 2;
  707. } bitc;
  708. } GH_USB_RXTYPE_HOST_S;
  709. typedef union { /* USB_RxInterval_HOST */
  710. U8 all;
  711. struct {
  712. U8 rxpollinginterval_naklimit : 8;
  713. } bitc;
  714. } GH_USB_RXINTERVAL_HOST_S;
  715. typedef union { /* USB_FIFOSize */
  716. U8 all;
  717. struct {
  718. U8 txfifosize : 4;
  719. U8 rxfifosize : 4;
  720. } bitc;
  721. } GH_USB_FIFOSIZE_S;
  722. typedef union { /* USB_DevCtl_R */
  723. U8 all;
  724. struct {
  725. U8 session : 1;
  726. U8 host_req : 1;
  727. U8 host_mode : 1;
  728. U8 vbus : 2;
  729. U8 lsdev : 1;
  730. U8 fsdev : 1;
  731. U8 b_device : 1;
  732. } bitc;
  733. } GH_USB_DEVCTL_R_S;
  734. typedef union { /* USB_DevCtl_W */
  735. U8 all;
  736. struct {
  737. U8 session : 1;
  738. U8 host_req : 1;
  739. U8 : 6;
  740. } bitc;
  741. } GH_USB_DEVCTL_W_S;
  742. typedef union { /* USB_Misc */
  743. U8 all;
  744. struct {
  745. U8 rx_edma : 1;
  746. U8 tx_edma : 1;
  747. U8 : 6;
  748. } bitc;
  749. } GH_USB_MISC_S;
  750. typedef union { /* USB_TxFIFOsz */
  751. U8 all;
  752. struct {
  753. U8 sz : 4;
  754. U8 dpb : 1;
  755. U8 : 3;
  756. } bitc;
  757. } GH_USB_TXFIFOSZ_S;
  758. typedef union { /* USB_RxFIFOsz */
  759. U8 all;
  760. struct {
  761. U8 sz : 4;
  762. U8 dpb : 1;
  763. U8 : 3;
  764. } bitc;
  765. } GH_USB_RXFIFOSZ_S;
  766. typedef union { /* USB_TxFIFOadd */
  767. U16 all;
  768. struct {
  769. U16 startaddress : 13;
  770. U16 : 3;
  771. } bitc;
  772. } GH_USB_TXFIFOADD_S;
  773. typedef union { /* USB_RxFIFOadd */
  774. U16 all;
  775. struct {
  776. U16 startaddress : 13;
  777. U16 : 3;
  778. } bitc;
  779. } GH_USB_RXFIFOADD_S;
  780. typedef union { /* USB_HWVers */
  781. U16 all;
  782. struct {
  783. U16 minorversion : 10;
  784. U16 majorversion : 5;
  785. U16 rc : 1;
  786. } bitc;
  787. } GH_USB_HWVERS_S;
  788. typedef union { /* USB_EPInfo */
  789. U8 all;
  790. struct {
  791. U8 txendpoints : 4;
  792. U8 rxendpoints : 4;
  793. } bitc;
  794. } GH_USB_EPINFO_S;
  795. typedef union { /* USB_RAMInfo */
  796. U8 all;
  797. struct {
  798. U8 rambits : 4;
  799. U8 dmachans : 4;
  800. } bitc;
  801. } GH_USB_RAMINFO_S;
  802. typedef union { /* USB_LinkInfo */
  803. U8 all;
  804. struct {
  805. U8 wtid : 4;
  806. U8 wtcon : 4;
  807. } bitc;
  808. } GH_USB_LINKINFO_S;
  809. typedef union { /* USB_SOFT_RST */
  810. U8 all;
  811. struct {
  812. U8 nrst : 1;
  813. U8 nrstx : 1;
  814. U8 : 6;
  815. } bitc;
  816. } GH_USB_SOFT_RST_S;
  817. typedef union { /* USB_TxFuncAddr */
  818. U8 all;
  819. struct {
  820. U8 addressoftargetfunction : 7;
  821. U8 : 1;
  822. } bitc;
  823. } GH_USB_TXFUNCADDR_S;
  824. typedef union { /* USB_TxHubAddr */
  825. U8 all;
  826. struct {
  827. U8 hubaddress : 7;
  828. U8 multipletranslators : 1;
  829. } bitc;
  830. } GH_USB_TXHUBADDR_S;
  831. typedef union { /* USB_TxHubPort */
  832. U8 all;
  833. struct {
  834. U8 hubport : 7;
  835. U8 : 1;
  836. } bitc;
  837. } GH_USB_TXHUBPORT_S;
  838. typedef union { /* USB_RxFuncAddr */
  839. U8 all;
  840. struct {
  841. U8 addressoftargetfunction : 7;
  842. U8 : 1;
  843. } bitc;
  844. } GH_USB_RXFUNCADDR_S;
  845. typedef union { /* USB_RxHubAddr */
  846. U8 all;
  847. struct {
  848. U8 hubaddress : 7;
  849. U8 multipletranslators : 1;
  850. } bitc;
  851. } GH_USB_RXHUBADDR_S;
  852. typedef union { /* USB_RxHubPort */
  853. U8 all;
  854. struct {
  855. U8 hubport : 7;
  856. U8 : 1;
  857. } bitc;
  858. } GH_USB_RXHUBPORT_S;
  859. typedef union { /* USB_DMA_INTR */
  860. U8 all;
  861. struct {
  862. U8 ch0 : 1;
  863. U8 ch1 : 1;
  864. U8 ch2 : 1;
  865. U8 ch3 : 1;
  866. U8 ch4 : 1;
  867. U8 ch5 : 1;
  868. U8 ch6 : 1;
  869. U8 ch7 : 1;
  870. } bitc;
  871. } GH_USB_DMA_INTR_S;
  872. typedef union { /* USB_DMA_CNTL */
  873. U16 all;
  874. struct {
  875. U16 dma_enab : 1;
  876. U16 dma_dir : 1;
  877. U16 dmamode : 1;
  878. U16 dmaie : 1;
  879. U16 dmaep : 4;
  880. U16 dma_err : 1;
  881. U16 dma_brstm : 2;
  882. U16 : 5;
  883. } bitc;
  884. } GH_USB_DMA_CNTL_S;
  885. typedef union { /* USB_RxDPktBufDis */
  886. U16 all;
  887. struct {
  888. U16 : 1;
  889. U16 ep1 : 1;
  890. U16 ep2 : 1;
  891. U16 ep3 : 1;
  892. U16 ep4 : 1;
  893. U16 ep5 : 1;
  894. U16 ep6 : 1;
  895. U16 ep7 : 1;
  896. U16 ep8 : 1;
  897. U16 ep9 : 1;
  898. U16 ep10 : 1;
  899. U16 ep11 : 1;
  900. U16 ep12 : 1;
  901. U16 ep13 : 1;
  902. U16 ep14 : 1;
  903. U16 ep15 : 1;
  904. } bitc;
  905. } GH_USB_RXDPKTBUFDIS_S;
  906. typedef union { /* USB_TxDPktBufDis */
  907. U16 all;
  908. struct {
  909. U16 : 1;
  910. U16 ep1 : 1;
  911. U16 ep2 : 1;
  912. U16 ep3 : 1;
  913. U16 ep4 : 1;
  914. U16 ep5 : 1;
  915. U16 ep6 : 1;
  916. U16 ep7 : 1;
  917. U16 ep8 : 1;
  918. U16 ep9 : 1;
  919. U16 ep10 : 1;
  920. U16 ep11 : 1;
  921. U16 ep12 : 1;
  922. U16 ep13 : 1;
  923. U16 ep14 : 1;
  924. U16 ep15 : 1;
  925. } bitc;
  926. } GH_USB_TXDPKTBUFDIS_S;
  927. typedef union { /* USB_C_T_HSBT */
  928. U8 all;
  929. struct {
  930. U8 hstimeoutadder : 4;
  931. U8 : 4;
  932. } bitc;
  933. } GH_USB_C_T_HSBT_S;
  934. typedef union { /* USB_LPM_ATTR */
  935. U16 all;
  936. struct {
  937. U16 linkstate : 4;
  938. U16 hird : 4;
  939. U16 rmtwak : 1;
  940. U16 : 3;
  941. U16 endpnt : 4;
  942. } bitc;
  943. } GH_USB_LPM_ATTR_S;
  944. typedef union { /* USB_LPM_CNTRL_PERI */
  945. U8 all;
  946. struct {
  947. U8 lpmxmt : 1;
  948. U8 lpmres : 1;
  949. U8 lpmen : 2;
  950. U8 lpmnak : 1;
  951. U8 : 3;
  952. } bitc;
  953. } GH_USB_LPM_CNTRL_PERI_S;
  954. typedef union { /* USB_LPM_CNTRL_HOST */
  955. U8 all;
  956. struct {
  957. U8 lpmxmt : 1;
  958. U8 lpmres : 1;
  959. U8 : 6;
  960. } bitc;
  961. } GH_USB_LPM_CNTRL_HOST_S;
  962. typedef union { /* USB_LPM_INTREN */
  963. U8 all;
  964. struct {
  965. U8 lpmsten : 1;
  966. U8 lpmnyen : 1;
  967. U8 lpmacken : 1;
  968. U8 lpmncen : 1;
  969. U8 lpmresen : 1;
  970. U8 lpmerren : 1;
  971. U8 : 2;
  972. } bitc;
  973. } GH_USB_LPM_INTREN_S;
  974. typedef union { /* USB_LPM_INTR_PERI */
  975. U8 all;
  976. struct {
  977. U8 lpmst : 1;
  978. U8 lpmny : 1;
  979. U8 lpmack : 1;
  980. U8 lpmnc : 1;
  981. U8 lpmres : 1;
  982. U8 lpmerr : 1;
  983. U8 : 2;
  984. } bitc;
  985. } GH_USB_LPM_INTR_PERI_S;
  986. typedef union { /* USB_LPM_INTR_HOST */
  987. U8 all;
  988. struct {
  989. U8 lpmst : 1;
  990. U8 lpmny : 1;
  991. U8 lpmack : 1;
  992. U8 lpmnc : 1;
  993. U8 lpmres : 1;
  994. U8 lpmerr : 1;
  995. U8 : 2;
  996. } bitc;
  997. } GH_USB_LPM_INTR_HOST_S;
  998. typedef union { /* USB_LPM_FADDR_HOST */
  999. U8 all;
  1000. struct {
  1001. U8 lpmfaddr : 7;
  1002. U8 : 1;
  1003. } bitc;
  1004. } GH_USB_LPM_FADDR_HOST_S;
  1005. /*----------------------------------------------------------------------------*/
  1006. /* mirror variables */
  1007. /*----------------------------------------------------------------------------*/
  1008. extern GH_USB_POWER_W_PERI_S m_usb_power_w_peri;
  1009. extern GH_USB_POWER_W_HOST_S m_usb_power_w_host;
  1010. extern GH_USB_CSR0L_W_PERI_S m_usb_csr0l_w_peri;
  1011. extern GH_USB_CSR0H_W_PERI_S m_usb_csr0h_w_peri;
  1012. extern GH_USB_CSR0L_W_HOST_S m_usb_csr0l_w_host;
  1013. extern GH_USB_CSR0H_W_HOST_S m_usb_csr0h_w_host;
  1014. extern GH_USB_TXCSRL_W_PERI_S m_usb_txcsrl_w_peri;
  1015. extern GH_USB_TXCSRH_W_PERI_S m_usb_txcsrh_w_peri;
  1016. extern GH_USB_TXCSRL_W_HOST_S m_usb_txcsrl_w_host;
  1017. extern GH_USB_TXCSRH_W_HOST_S m_usb_txcsrh_w_host;
  1018. extern GH_USB_RXCSRL_W_PERI_S m_usb_rxcsrl_w_peri;
  1019. extern GH_USB_RXCSRH_W_PERI_S m_usb_rxcsrh_w_peri;
  1020. extern GH_USB_RXCSRL_W_HOST_S m_usb_rxcsrl_w_host;
  1021. extern GH_USB_RXCSRH_W_HOST_S m_usb_rxcsrh_w_host;
  1022. extern GH_USB_DEVCTL_W_S m_usb_devctl_w;
  1023. extern U32 m_usb_vcontrol;
  1024. #ifdef __cplusplus
  1025. extern "C" {
  1026. #endif
  1027. /*----------------------------------------------------------------------------*/
  1028. /* register USB_FAddr (read/write) */
  1029. /*----------------------------------------------------------------------------*/
  1030. #if GH_INLINE_LEVEL == 0
  1031. /*! \brief Writes the register 'USB_FAddr'. */
  1032. void GH_USB_set_FAddr(U8 data);
  1033. /*! \brief Reads the register 'USB_FAddr'. */
  1034. U8 GH_USB_get_FAddr(void);
  1035. /*! \brief Writes the bit group 'FuncAddr' of register 'USB_FAddr'. */
  1036. void GH_USB_set_FAddr_FuncAddr(U8 data);
  1037. /*! \brief Reads the bit group 'FuncAddr' of register 'USB_FAddr'. */
  1038. U8 GH_USB_get_FAddr_FuncAddr(void);
  1039. #else /* GH_INLINE_LEVEL == 0 */
  1040. GH_INLINE void GH_USB_set_FAddr(U8 data)
  1041. {
  1042. *(volatile U8 *)REG_USB_FADDR = data;
  1043. #if GH_USB_ENABLE_DEBUG_PRINT
  1044. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FAddr] <-- 0x%08x\n",
  1045. REG_USB_FADDR,data,data);
  1046. #endif
  1047. }
  1048. GH_INLINE U8 GH_USB_get_FAddr(void)
  1049. {
  1050. U8 value = (*(volatile U8 *)REG_USB_FADDR);
  1051. #if GH_USB_ENABLE_DEBUG_PRINT
  1052. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FAddr] --> 0x%08x\n",
  1053. REG_USB_FADDR,value);
  1054. #endif
  1055. return value;
  1056. }
  1057. GH_INLINE void GH_USB_set_FAddr_FuncAddr(U8 data)
  1058. {
  1059. GH_USB_FADDR_S d;
  1060. d.all = *(volatile U8 *)REG_USB_FADDR;
  1061. d.bitc.funcaddr = data;
  1062. *(volatile U8 *)REG_USB_FADDR = d.all;
  1063. #if GH_USB_ENABLE_DEBUG_PRINT
  1064. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FAddr_FuncAddr] <-- 0x%08x\n",
  1065. REG_USB_FADDR,d.all,d.all);
  1066. #endif
  1067. }
  1068. GH_INLINE U8 GH_USB_get_FAddr_FuncAddr(void)
  1069. {
  1070. GH_USB_FADDR_S tmp_value;
  1071. U8 value = (*(volatile U8 *)REG_USB_FADDR);
  1072. tmp_value.all = value;
  1073. #if GH_USB_ENABLE_DEBUG_PRINT
  1074. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FAddr_FuncAddr] --> 0x%08x\n",
  1075. REG_USB_FADDR,value);
  1076. #endif
  1077. return tmp_value.bitc.funcaddr;
  1078. }
  1079. #endif /* GH_INLINE_LEVEL == 0 */
  1080. /*----------------------------------------------------------------------------*/
  1081. /* register USB_Power_R_PERI (read) */
  1082. /*----------------------------------------------------------------------------*/
  1083. #if GH_INLINE_LEVEL == 0
  1084. /*! \brief Reads the register 'USB_Power_R_PERI'. */
  1085. U8 GH_USB_get_Power_R_PERI(void);
  1086. /*! \brief Reads the bit group 'Enable_SuspendM' of register 'USB_Power_R_PERI'. */
  1087. U8 GH_USB_get_Power_R_PERI_Enable_SuspendM(void);
  1088. /*! \brief Reads the bit group 'Suspend_Mode' of register 'USB_Power_R_PERI'. */
  1089. U8 GH_USB_get_Power_R_PERI_Suspend_Mode(void);
  1090. /*! \brief Reads the bit group 'Resume' of register 'USB_Power_R_PERI'. */
  1091. U8 GH_USB_get_Power_R_PERI_Resume(void);
  1092. /*! \brief Reads the bit group 'Reset' of register 'USB_Power_R_PERI'. */
  1093. U8 GH_USB_get_Power_R_PERI_Reset(void);
  1094. /*! \brief Reads the bit group 'HS_Mode' of register 'USB_Power_R_PERI'. */
  1095. U8 GH_USB_get_Power_R_PERI_HS_Mode(void);
  1096. /*! \brief Reads the bit group 'HS_Enab' of register 'USB_Power_R_PERI'. */
  1097. U8 GH_USB_get_Power_R_PERI_HS_Enab(void);
  1098. /*! \brief Reads the bit group 'Soft_Conn' of register 'USB_Power_R_PERI'. */
  1099. U8 GH_USB_get_Power_R_PERI_Soft_Conn(void);
  1100. /*! \brief Reads the bit group 'ISO_Update' of register 'USB_Power_R_PERI'. */
  1101. U8 GH_USB_get_Power_R_PERI_ISO_Update(void);
  1102. #else /* GH_INLINE_LEVEL == 0 */
  1103. GH_INLINE U8 GH_USB_get_Power_R_PERI(void)
  1104. {
  1105. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1106. #if GH_USB_ENABLE_DEBUG_PRINT
  1107. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI] --> 0x%08x\n",
  1108. REG_USB_POWER_R_PERI,value);
  1109. #endif
  1110. return value;
  1111. }
  1112. GH_INLINE U8 GH_USB_get_Power_R_PERI_Enable_SuspendM(void)
  1113. {
  1114. GH_USB_POWER_R_PERI_S tmp_value;
  1115. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1116. tmp_value.all = value;
  1117. #if GH_USB_ENABLE_DEBUG_PRINT
  1118. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Enable_SuspendM] --> 0x%08x\n",
  1119. REG_USB_POWER_R_PERI,value);
  1120. #endif
  1121. return tmp_value.bitc.enable_suspendm;
  1122. }
  1123. GH_INLINE U8 GH_USB_get_Power_R_PERI_Suspend_Mode(void)
  1124. {
  1125. GH_USB_POWER_R_PERI_S tmp_value;
  1126. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1127. tmp_value.all = value;
  1128. #if GH_USB_ENABLE_DEBUG_PRINT
  1129. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Suspend_Mode] --> 0x%08x\n",
  1130. REG_USB_POWER_R_PERI,value);
  1131. #endif
  1132. return tmp_value.bitc.suspend_mode;
  1133. }
  1134. GH_INLINE U8 GH_USB_get_Power_R_PERI_Resume(void)
  1135. {
  1136. GH_USB_POWER_R_PERI_S tmp_value;
  1137. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1138. tmp_value.all = value;
  1139. #if GH_USB_ENABLE_DEBUG_PRINT
  1140. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Resume] --> 0x%08x\n",
  1141. REG_USB_POWER_R_PERI,value);
  1142. #endif
  1143. return tmp_value.bitc.resume;
  1144. }
  1145. GH_INLINE U8 GH_USB_get_Power_R_PERI_Reset(void)
  1146. {
  1147. GH_USB_POWER_R_PERI_S tmp_value;
  1148. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1149. tmp_value.all = value;
  1150. #if GH_USB_ENABLE_DEBUG_PRINT
  1151. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Reset] --> 0x%08x\n",
  1152. REG_USB_POWER_R_PERI,value);
  1153. #endif
  1154. return tmp_value.bitc.reset;
  1155. }
  1156. GH_INLINE U8 GH_USB_get_Power_R_PERI_HS_Mode(void)
  1157. {
  1158. GH_USB_POWER_R_PERI_S tmp_value;
  1159. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1160. tmp_value.all = value;
  1161. #if GH_USB_ENABLE_DEBUG_PRINT
  1162. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_HS_Mode] --> 0x%08x\n",
  1163. REG_USB_POWER_R_PERI,value);
  1164. #endif
  1165. return tmp_value.bitc.hs_mode;
  1166. }
  1167. GH_INLINE U8 GH_USB_get_Power_R_PERI_HS_Enab(void)
  1168. {
  1169. GH_USB_POWER_R_PERI_S tmp_value;
  1170. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1171. tmp_value.all = value;
  1172. #if GH_USB_ENABLE_DEBUG_PRINT
  1173. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_HS_Enab] --> 0x%08x\n",
  1174. REG_USB_POWER_R_PERI,value);
  1175. #endif
  1176. return tmp_value.bitc.hs_enab;
  1177. }
  1178. GH_INLINE U8 GH_USB_get_Power_R_PERI_Soft_Conn(void)
  1179. {
  1180. GH_USB_POWER_R_PERI_S tmp_value;
  1181. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1182. tmp_value.all = value;
  1183. #if GH_USB_ENABLE_DEBUG_PRINT
  1184. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Soft_Conn] --> 0x%08x\n",
  1185. REG_USB_POWER_R_PERI,value);
  1186. #endif
  1187. return tmp_value.bitc.soft_conn;
  1188. }
  1189. GH_INLINE U8 GH_USB_get_Power_R_PERI_ISO_Update(void)
  1190. {
  1191. GH_USB_POWER_R_PERI_S tmp_value;
  1192. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1193. tmp_value.all = value;
  1194. #if GH_USB_ENABLE_DEBUG_PRINT
  1195. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_ISO_Update] --> 0x%08x\n",
  1196. REG_USB_POWER_R_PERI,value);
  1197. #endif
  1198. return tmp_value.bitc.iso_update;
  1199. }
  1200. #endif /* GH_INLINE_LEVEL == 0 */
  1201. /*----------------------------------------------------------------------------*/
  1202. /* register USB_Power_W_PERI (write) */
  1203. /*----------------------------------------------------------------------------*/
  1204. #if GH_INLINE_LEVEL < 2
  1205. /*! \brief Writes the register 'USB_Power_W_PERI'. */
  1206. void GH_USB_set_Power_W_PERI(U8 data);
  1207. /*! \brief Reads the mirror variable of the register 'USB_Power_W_PERI'. */
  1208. U8 GH_USB_getm_Power_W_PERI(void);
  1209. /*! \brief Writes the bit group 'Enable_SuspendM' of register 'USB_Power_W_PERI'. */
  1210. void GH_USB_set_Power_W_PERI_Enable_SuspendM(U8 data);
  1211. /*! \brief Reads the bit group 'Enable_SuspendM' from the mirror variable of register 'USB_Power_W_PERI'. */
  1212. U8 GH_USB_getm_Power_W_PERI_Enable_SuspendM(void);
  1213. /*! \brief Writes the bit group 'Resume' of register 'USB_Power_W_PERI'. */
  1214. void GH_USB_set_Power_W_PERI_Resume(U8 data);
  1215. /*! \brief Reads the bit group 'Resume' from the mirror variable of register 'USB_Power_W_PERI'. */
  1216. U8 GH_USB_getm_Power_W_PERI_Resume(void);
  1217. /*! \brief Writes the bit group 'HS_Enab' of register 'USB_Power_W_PERI'. */
  1218. void GH_USB_set_Power_W_PERI_HS_Enab(U8 data);
  1219. /*! \brief Reads the bit group 'HS_Enab' from the mirror variable of register 'USB_Power_W_PERI'. */
  1220. U8 GH_USB_getm_Power_W_PERI_HS_Enab(void);
  1221. /*! \brief Writes the bit group 'Soft_Conn' of register 'USB_Power_W_PERI'. */
  1222. void GH_USB_set_Power_W_PERI_Soft_Conn(U8 data);
  1223. /*! \brief Reads the bit group 'Soft_Conn' from the mirror variable of register 'USB_Power_W_PERI'. */
  1224. U8 GH_USB_getm_Power_W_PERI_Soft_Conn(void);
  1225. /*! \brief Writes the bit group 'ISO_Update' of register 'USB_Power_W_PERI'. */
  1226. void GH_USB_set_Power_W_PERI_ISO_Update(U8 data);
  1227. /*! \brief Reads the bit group 'ISO_Update' from the mirror variable of register 'USB_Power_W_PERI'. */
  1228. U8 GH_USB_getm_Power_W_PERI_ISO_Update(void);
  1229. #else /* GH_INLINE_LEVEL < 2 */
  1230. GH_INLINE void GH_USB_set_Power_W_PERI(U8 data)
  1231. {
  1232. m_usb_power_w_peri.all = data;
  1233. *(volatile U8 *)REG_USB_POWER_W_PERI = data;
  1234. #if GH_USB_ENABLE_DEBUG_PRINT
  1235. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI] <-- 0x%08x\n",
  1236. REG_USB_POWER_W_PERI,data,data);
  1237. #endif
  1238. }
  1239. GH_INLINE U8 GH_USB_getm_Power_W_PERI(void)
  1240. {
  1241. #if GH_USB_ENABLE_DEBUG_PRINT
  1242. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI] --> 0x%08x\n",
  1243. m_usb_power_w_peri.all);
  1244. #endif
  1245. return m_usb_power_w_peri.all;
  1246. }
  1247. GH_INLINE void GH_USB_set_Power_W_PERI_Enable_SuspendM(U8 data)
  1248. {
  1249. m_usb_power_w_peri.bitc.enable_suspendm = data;
  1250. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1251. #if GH_USB_ENABLE_DEBUG_PRINT
  1252. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_Enable_SuspendM] <-- 0x%08x\n",
  1253. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1254. #endif
  1255. }
  1256. GH_INLINE U8 GH_USB_getm_Power_W_PERI_Enable_SuspendM(void)
  1257. {
  1258. #if GH_USB_ENABLE_DEBUG_PRINT
  1259. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_Enable_SuspendM] --> 0x%08x\n",
  1260. m_usb_power_w_peri.bitc.enable_suspendm);
  1261. #endif
  1262. return m_usb_power_w_peri.bitc.enable_suspendm;
  1263. }
  1264. GH_INLINE void GH_USB_set_Power_W_PERI_Resume(U8 data)
  1265. {
  1266. m_usb_power_w_peri.bitc.resume = data;
  1267. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1268. #if GH_USB_ENABLE_DEBUG_PRINT
  1269. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_Resume] <-- 0x%08x\n",
  1270. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1271. #endif
  1272. }
  1273. GH_INLINE U8 GH_USB_getm_Power_W_PERI_Resume(void)
  1274. {
  1275. #if GH_USB_ENABLE_DEBUG_PRINT
  1276. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_Resume] --> 0x%08x\n",
  1277. m_usb_power_w_peri.bitc.resume);
  1278. #endif
  1279. return m_usb_power_w_peri.bitc.resume;
  1280. }
  1281. GH_INLINE void GH_USB_set_Power_W_PERI_HS_Enab(U8 data)
  1282. {
  1283. m_usb_power_w_peri.bitc.hs_enab = data;
  1284. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1285. #if GH_USB_ENABLE_DEBUG_PRINT
  1286. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_HS_Enab] <-- 0x%08x\n",
  1287. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1288. #endif
  1289. }
  1290. GH_INLINE U8 GH_USB_getm_Power_W_PERI_HS_Enab(void)
  1291. {
  1292. #if GH_USB_ENABLE_DEBUG_PRINT
  1293. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_HS_Enab] --> 0x%08x\n",
  1294. m_usb_power_w_peri.bitc.hs_enab);
  1295. #endif
  1296. return m_usb_power_w_peri.bitc.hs_enab;
  1297. }
  1298. GH_INLINE void GH_USB_set_Power_W_PERI_Soft_Conn(U8 data)
  1299. {
  1300. m_usb_power_w_peri.bitc.soft_conn = data;
  1301. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1302. #if GH_USB_ENABLE_DEBUG_PRINT
  1303. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_Soft_Conn] <-- 0x%08x\n",
  1304. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1305. #endif
  1306. }
  1307. GH_INLINE U8 GH_USB_getm_Power_W_PERI_Soft_Conn(void)
  1308. {
  1309. #if GH_USB_ENABLE_DEBUG_PRINT
  1310. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_Soft_Conn] --> 0x%08x\n",
  1311. m_usb_power_w_peri.bitc.soft_conn);
  1312. #endif
  1313. return m_usb_power_w_peri.bitc.soft_conn;
  1314. }
  1315. GH_INLINE void GH_USB_set_Power_W_PERI_ISO_Update(U8 data)
  1316. {
  1317. m_usb_power_w_peri.bitc.iso_update = data;
  1318. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1319. #if GH_USB_ENABLE_DEBUG_PRINT
  1320. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_ISO_Update] <-- 0x%08x\n",
  1321. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1322. #endif
  1323. }
  1324. GH_INLINE U8 GH_USB_getm_Power_W_PERI_ISO_Update(void)
  1325. {
  1326. #if GH_USB_ENABLE_DEBUG_PRINT
  1327. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_ISO_Update] --> 0x%08x\n",
  1328. m_usb_power_w_peri.bitc.iso_update);
  1329. #endif
  1330. return m_usb_power_w_peri.bitc.iso_update;
  1331. }
  1332. #endif /* GH_INLINE_LEVEL < 2 */
  1333. /*----------------------------------------------------------------------------*/
  1334. /* register USB_Power_R_HOST (read) */
  1335. /*----------------------------------------------------------------------------*/
  1336. #if GH_INLINE_LEVEL == 0
  1337. /*! \brief Reads the register 'USB_Power_R_HOST'. */
  1338. U8 GH_USB_get_Power_R_HOST(void);
  1339. /*! \brief Reads the bit group 'Enable_SuspendM' of register 'USB_Power_R_HOST'. */
  1340. U8 GH_USB_get_Power_R_HOST_Enable_SuspendM(void);
  1341. /*! \brief Reads the bit group 'Resume' of register 'USB_Power_R_HOST'. */
  1342. U8 GH_USB_get_Power_R_HOST_Resume(void);
  1343. /*! \brief Reads the bit group 'Reset' of register 'USB_Power_R_HOST'. */
  1344. U8 GH_USB_get_Power_R_HOST_Reset(void);
  1345. /*! \brief Reads the bit group 'HS_Mode' of register 'USB_Power_R_HOST'. */
  1346. U8 GH_USB_get_Power_R_HOST_HS_Mode(void);
  1347. /*! \brief Reads the bit group 'HS_Enab' of register 'USB_Power_R_HOST'. */
  1348. U8 GH_USB_get_Power_R_HOST_HS_Enab(void);
  1349. #else /* GH_INLINE_LEVEL == 0 */
  1350. GH_INLINE U8 GH_USB_get_Power_R_HOST(void)
  1351. {
  1352. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1353. #if GH_USB_ENABLE_DEBUG_PRINT
  1354. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST] --> 0x%08x\n",
  1355. REG_USB_POWER_R_HOST,value);
  1356. #endif
  1357. return value;
  1358. }
  1359. GH_INLINE U8 GH_USB_get_Power_R_HOST_Enable_SuspendM(void)
  1360. {
  1361. GH_USB_POWER_R_HOST_S tmp_value;
  1362. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1363. tmp_value.all = value;
  1364. #if GH_USB_ENABLE_DEBUG_PRINT
  1365. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_Enable_SuspendM] --> 0x%08x\n",
  1366. REG_USB_POWER_R_HOST,value);
  1367. #endif
  1368. return tmp_value.bitc.enable_suspendm;
  1369. }
  1370. GH_INLINE U8 GH_USB_get_Power_R_HOST_Resume(void)
  1371. {
  1372. GH_USB_POWER_R_HOST_S tmp_value;
  1373. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1374. tmp_value.all = value;
  1375. #if GH_USB_ENABLE_DEBUG_PRINT
  1376. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_Resume] --> 0x%08x\n",
  1377. REG_USB_POWER_R_HOST,value);
  1378. #endif
  1379. return tmp_value.bitc.resume;
  1380. }
  1381. GH_INLINE U8 GH_USB_get_Power_R_HOST_Reset(void)
  1382. {
  1383. GH_USB_POWER_R_HOST_S tmp_value;
  1384. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1385. tmp_value.all = value;
  1386. #if GH_USB_ENABLE_DEBUG_PRINT
  1387. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_Reset] --> 0x%08x\n",
  1388. REG_USB_POWER_R_HOST,value);
  1389. #endif
  1390. return tmp_value.bitc.reset;
  1391. }
  1392. GH_INLINE U8 GH_USB_get_Power_R_HOST_HS_Mode(void)
  1393. {
  1394. GH_USB_POWER_R_HOST_S tmp_value;
  1395. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1396. tmp_value.all = value;
  1397. #if GH_USB_ENABLE_DEBUG_PRINT
  1398. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_HS_Mode] --> 0x%08x\n",
  1399. REG_USB_POWER_R_HOST,value);
  1400. #endif
  1401. return tmp_value.bitc.hs_mode;
  1402. }
  1403. GH_INLINE U8 GH_USB_get_Power_R_HOST_HS_Enab(void)
  1404. {
  1405. GH_USB_POWER_R_HOST_S tmp_value;
  1406. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1407. tmp_value.all = value;
  1408. #if GH_USB_ENABLE_DEBUG_PRINT
  1409. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_HS_Enab] --> 0x%08x\n",
  1410. REG_USB_POWER_R_HOST,value);
  1411. #endif
  1412. return tmp_value.bitc.hs_enab;
  1413. }
  1414. #endif /* GH_INLINE_LEVEL == 0 */
  1415. /*----------------------------------------------------------------------------*/
  1416. /* register USB_Power_W_HOST (write) */
  1417. /*----------------------------------------------------------------------------*/
  1418. #if GH_INLINE_LEVEL < 2
  1419. /*! \brief Writes the register 'USB_Power_W_HOST'. */
  1420. void GH_USB_set_Power_W_HOST(U8 data);
  1421. /*! \brief Reads the mirror variable of the register 'USB_Power_W_HOST'. */
  1422. U8 GH_USB_getm_Power_W_HOST(void);
  1423. /*! \brief Writes the bit group 'Enable_SuspendM' of register 'USB_Power_W_HOST'. */
  1424. void GH_USB_set_Power_W_HOST_Enable_SuspendM(U8 data);
  1425. /*! \brief Reads the bit group 'Enable_SuspendM' from the mirror variable of register 'USB_Power_W_HOST'. */
  1426. U8 GH_USB_getm_Power_W_HOST_Enable_SuspendM(void);
  1427. /*! \brief Writes the bit group 'Suspend_Mode' of register 'USB_Power_W_HOST'. */
  1428. void GH_USB_set_Power_W_HOST_Suspend_Mode(U8 data);
  1429. /*! \brief Reads the bit group 'Suspend_Mode' from the mirror variable of register 'USB_Power_W_HOST'. */
  1430. U8 GH_USB_getm_Power_W_HOST_Suspend_Mode(void);
  1431. /*! \brief Writes the bit group 'Resume' of register 'USB_Power_W_HOST'. */
  1432. void GH_USB_set_Power_W_HOST_Resume(U8 data);
  1433. /*! \brief Reads the bit group 'Resume' from the mirror variable of register 'USB_Power_W_HOST'. */
  1434. U8 GH_USB_getm_Power_W_HOST_Resume(void);
  1435. /*! \brief Writes the bit group 'Reset' of register 'USB_Power_W_HOST'. */
  1436. void GH_USB_set_Power_W_HOST_Reset(U8 data);
  1437. /*! \brief Reads the bit group 'Reset' from the mirror variable of register 'USB_Power_W_HOST'. */
  1438. U8 GH_USB_getm_Power_W_HOST_Reset(void);
  1439. /*! \brief Writes the bit group 'HS_Enab' of register 'USB_Power_W_HOST'. */
  1440. void GH_USB_set_Power_W_HOST_HS_Enab(U8 data);
  1441. /*! \brief Reads the bit group 'HS_Enab' from the mirror variable of register 'USB_Power_W_HOST'. */
  1442. U8 GH_USB_getm_Power_W_HOST_HS_Enab(void);
  1443. #else /* GH_INLINE_LEVEL < 2 */
  1444. GH_INLINE void GH_USB_set_Power_W_HOST(U8 data)
  1445. {
  1446. m_usb_power_w_host.all = data;
  1447. *(volatile U8 *)REG_USB_POWER_W_HOST = data;
  1448. #if GH_USB_ENABLE_DEBUG_PRINT
  1449. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST] <-- 0x%08x\n",
  1450. REG_USB_POWER_W_HOST,data,data);
  1451. #endif
  1452. }
  1453. GH_INLINE U8 GH_USB_getm_Power_W_HOST(void)
  1454. {
  1455. #if GH_USB_ENABLE_DEBUG_PRINT
  1456. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST] --> 0x%08x\n",
  1457. m_usb_power_w_host.all);
  1458. #endif
  1459. return m_usb_power_w_host.all;
  1460. }
  1461. GH_INLINE void GH_USB_set_Power_W_HOST_Enable_SuspendM(U8 data)
  1462. {
  1463. m_usb_power_w_host.bitc.enable_suspendm = data;
  1464. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1465. #if GH_USB_ENABLE_DEBUG_PRINT
  1466. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Enable_SuspendM] <-- 0x%08x\n",
  1467. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1468. #endif
  1469. }
  1470. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Enable_SuspendM(void)
  1471. {
  1472. #if GH_USB_ENABLE_DEBUG_PRINT
  1473. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Enable_SuspendM] --> 0x%08x\n",
  1474. m_usb_power_w_host.bitc.enable_suspendm);
  1475. #endif
  1476. return m_usb_power_w_host.bitc.enable_suspendm;
  1477. }
  1478. GH_INLINE void GH_USB_set_Power_W_HOST_Suspend_Mode(U8 data)
  1479. {
  1480. m_usb_power_w_host.bitc.suspend_mode = data;
  1481. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1482. #if GH_USB_ENABLE_DEBUG_PRINT
  1483. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Suspend_Mode] <-- 0x%08x\n",
  1484. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1485. #endif
  1486. }
  1487. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Suspend_Mode(void)
  1488. {
  1489. #if GH_USB_ENABLE_DEBUG_PRINT
  1490. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Suspend_Mode] --> 0x%08x\n",
  1491. m_usb_power_w_host.bitc.suspend_mode);
  1492. #endif
  1493. return m_usb_power_w_host.bitc.suspend_mode;
  1494. }
  1495. GH_INLINE void GH_USB_set_Power_W_HOST_Resume(U8 data)
  1496. {
  1497. m_usb_power_w_host.bitc.resume = data;
  1498. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1499. #if GH_USB_ENABLE_DEBUG_PRINT
  1500. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Resume] <-- 0x%08x\n",
  1501. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1502. #endif
  1503. }
  1504. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Resume(void)
  1505. {
  1506. #if GH_USB_ENABLE_DEBUG_PRINT
  1507. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Resume] --> 0x%08x\n",
  1508. m_usb_power_w_host.bitc.resume);
  1509. #endif
  1510. return m_usb_power_w_host.bitc.resume;
  1511. }
  1512. GH_INLINE void GH_USB_set_Power_W_HOST_Reset(U8 data)
  1513. {
  1514. m_usb_power_w_host.bitc.reset = data;
  1515. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1516. #if GH_USB_ENABLE_DEBUG_PRINT
  1517. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Reset] <-- 0x%08x\n",
  1518. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1519. #endif
  1520. }
  1521. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Reset(void)
  1522. {
  1523. #if GH_USB_ENABLE_DEBUG_PRINT
  1524. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Reset] --> 0x%08x\n",
  1525. m_usb_power_w_host.bitc.reset);
  1526. #endif
  1527. return m_usb_power_w_host.bitc.reset;
  1528. }
  1529. GH_INLINE void GH_USB_set_Power_W_HOST_HS_Enab(U8 data)
  1530. {
  1531. m_usb_power_w_host.bitc.hs_enab = data;
  1532. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1533. #if GH_USB_ENABLE_DEBUG_PRINT
  1534. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_HS_Enab] <-- 0x%08x\n",
  1535. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1536. #endif
  1537. }
  1538. GH_INLINE U8 GH_USB_getm_Power_W_HOST_HS_Enab(void)
  1539. {
  1540. #if GH_USB_ENABLE_DEBUG_PRINT
  1541. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_HS_Enab] --> 0x%08x\n",
  1542. m_usb_power_w_host.bitc.hs_enab);
  1543. #endif
  1544. return m_usb_power_w_host.bitc.hs_enab;
  1545. }
  1546. #endif /* GH_INLINE_LEVEL < 2 */
  1547. /*----------------------------------------------------------------------------*/
  1548. /* register USB_IntrTx (read) */
  1549. /*----------------------------------------------------------------------------*/
  1550. #if GH_INLINE_LEVEL == 0
  1551. /*! \brief Reads the register 'USB_IntrTx'. */
  1552. U16 GH_USB_get_IntrTx(void);
  1553. /*! \brief Reads the bit group 'EP0' of register 'USB_IntrTx'. */
  1554. U8 GH_USB_get_IntrTx_EP0(void);
  1555. /*! \brief Reads the bit group 'EP1Tx' of register 'USB_IntrTx'. */
  1556. U8 GH_USB_get_IntrTx_EP1Tx(void);
  1557. /*! \brief Reads the bit group 'EP2Tx' of register 'USB_IntrTx'. */
  1558. U8 GH_USB_get_IntrTx_EP2Tx(void);
  1559. /*! \brief Reads the bit group 'EP3Tx' of register 'USB_IntrTx'. */
  1560. U8 GH_USB_get_IntrTx_EP3Tx(void);
  1561. /*! \brief Reads the bit group 'EP4Tx' of register 'USB_IntrTx'. */
  1562. U8 GH_USB_get_IntrTx_EP4Tx(void);
  1563. /*! \brief Reads the bit group 'EP5Tx' of register 'USB_IntrTx'. */
  1564. U8 GH_USB_get_IntrTx_EP5Tx(void);
  1565. /*! \brief Reads the bit group 'EP6Tx' of register 'USB_IntrTx'. */
  1566. U8 GH_USB_get_IntrTx_EP6Tx(void);
  1567. /*! \brief Reads the bit group 'EP7Tx' of register 'USB_IntrTx'. */
  1568. U8 GH_USB_get_IntrTx_EP7Tx(void);
  1569. /*! \brief Reads the bit group 'EP8Tx' of register 'USB_IntrTx'. */
  1570. U8 GH_USB_get_IntrTx_EP8Tx(void);
  1571. /*! \brief Reads the bit group 'EP9Tx' of register 'USB_IntrTx'. */
  1572. U8 GH_USB_get_IntrTx_EP9Tx(void);
  1573. /*! \brief Reads the bit group 'EP10Tx' of register 'USB_IntrTx'. */
  1574. U8 GH_USB_get_IntrTx_EP10Tx(void);
  1575. /*! \brief Reads the bit group 'EP11Tx' of register 'USB_IntrTx'. */
  1576. U8 GH_USB_get_IntrTx_EP11Tx(void);
  1577. /*! \brief Reads the bit group 'EP12Tx' of register 'USB_IntrTx'. */
  1578. U8 GH_USB_get_IntrTx_EP12Tx(void);
  1579. /*! \brief Reads the bit group 'EP13Tx' of register 'USB_IntrTx'. */
  1580. U8 GH_USB_get_IntrTx_EP13Tx(void);
  1581. /*! \brief Reads the bit group 'EP14Tx' of register 'USB_IntrTx'. */
  1582. U8 GH_USB_get_IntrTx_EP14Tx(void);
  1583. /*! \brief Reads the bit group 'EP15Tx' of register 'USB_IntrTx'. */
  1584. U8 GH_USB_get_IntrTx_EP15Tx(void);
  1585. #else /* GH_INLINE_LEVEL == 0 */
  1586. GH_INLINE U16 GH_USB_get_IntrTx(void)
  1587. {
  1588. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1589. #if GH_USB_ENABLE_DEBUG_PRINT
  1590. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx] --> 0x%08x\n",
  1591. REG_USB_INTRTX,value);
  1592. #endif
  1593. return value;
  1594. }
  1595. GH_INLINE U8 GH_USB_get_IntrTx_EP0(void)
  1596. {
  1597. GH_USB_INTRTX_S tmp_value;
  1598. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1599. tmp_value.all = value;
  1600. #if GH_USB_ENABLE_DEBUG_PRINT
  1601. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP0] --> 0x%08x\n",
  1602. REG_USB_INTRTX,value);
  1603. #endif
  1604. return tmp_value.bitc.ep0;
  1605. }
  1606. GH_INLINE U8 GH_USB_get_IntrTx_EP1Tx(void)
  1607. {
  1608. GH_USB_INTRTX_S tmp_value;
  1609. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1610. tmp_value.all = value;
  1611. #if GH_USB_ENABLE_DEBUG_PRINT
  1612. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP1Tx] --> 0x%08x\n",
  1613. REG_USB_INTRTX,value);
  1614. #endif
  1615. return tmp_value.bitc.ep1tx;
  1616. }
  1617. GH_INLINE U8 GH_USB_get_IntrTx_EP2Tx(void)
  1618. {
  1619. GH_USB_INTRTX_S tmp_value;
  1620. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1621. tmp_value.all = value;
  1622. #if GH_USB_ENABLE_DEBUG_PRINT
  1623. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP2Tx] --> 0x%08x\n",
  1624. REG_USB_INTRTX,value);
  1625. #endif
  1626. return tmp_value.bitc.ep2tx;
  1627. }
  1628. GH_INLINE U8 GH_USB_get_IntrTx_EP3Tx(void)
  1629. {
  1630. GH_USB_INTRTX_S tmp_value;
  1631. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1632. tmp_value.all = value;
  1633. #if GH_USB_ENABLE_DEBUG_PRINT
  1634. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP3Tx] --> 0x%08x\n",
  1635. REG_USB_INTRTX,value);
  1636. #endif
  1637. return tmp_value.bitc.ep3tx;
  1638. }
  1639. GH_INLINE U8 GH_USB_get_IntrTx_EP4Tx(void)
  1640. {
  1641. GH_USB_INTRTX_S tmp_value;
  1642. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1643. tmp_value.all = value;
  1644. #if GH_USB_ENABLE_DEBUG_PRINT
  1645. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP4Tx] --> 0x%08x\n",
  1646. REG_USB_INTRTX,value);
  1647. #endif
  1648. return tmp_value.bitc.ep4tx;
  1649. }
  1650. GH_INLINE U8 GH_USB_get_IntrTx_EP5Tx(void)
  1651. {
  1652. GH_USB_INTRTX_S tmp_value;
  1653. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1654. tmp_value.all = value;
  1655. #if GH_USB_ENABLE_DEBUG_PRINT
  1656. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP5Tx] --> 0x%08x\n",
  1657. REG_USB_INTRTX,value);
  1658. #endif
  1659. return tmp_value.bitc.ep5tx;
  1660. }
  1661. GH_INLINE U8 GH_USB_get_IntrTx_EP6Tx(void)
  1662. {
  1663. GH_USB_INTRTX_S tmp_value;
  1664. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1665. tmp_value.all = value;
  1666. #if GH_USB_ENABLE_DEBUG_PRINT
  1667. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP6Tx] --> 0x%08x\n",
  1668. REG_USB_INTRTX,value);
  1669. #endif
  1670. return tmp_value.bitc.ep6tx;
  1671. }
  1672. GH_INLINE U8 GH_USB_get_IntrTx_EP7Tx(void)
  1673. {
  1674. GH_USB_INTRTX_S tmp_value;
  1675. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1676. tmp_value.all = value;
  1677. #if GH_USB_ENABLE_DEBUG_PRINT
  1678. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP7Tx] --> 0x%08x\n",
  1679. REG_USB_INTRTX,value);
  1680. #endif
  1681. return tmp_value.bitc.ep7tx;
  1682. }
  1683. GH_INLINE U8 GH_USB_get_IntrTx_EP8Tx(void)
  1684. {
  1685. GH_USB_INTRTX_S tmp_value;
  1686. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1687. tmp_value.all = value;
  1688. #if GH_USB_ENABLE_DEBUG_PRINT
  1689. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP8Tx] --> 0x%08x\n",
  1690. REG_USB_INTRTX,value);
  1691. #endif
  1692. return tmp_value.bitc.ep8tx;
  1693. }
  1694. GH_INLINE U8 GH_USB_get_IntrTx_EP9Tx(void)
  1695. {
  1696. GH_USB_INTRTX_S tmp_value;
  1697. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1698. tmp_value.all = value;
  1699. #if GH_USB_ENABLE_DEBUG_PRINT
  1700. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP9Tx] --> 0x%08x\n",
  1701. REG_USB_INTRTX,value);
  1702. #endif
  1703. return tmp_value.bitc.ep9tx;
  1704. }
  1705. GH_INLINE U8 GH_USB_get_IntrTx_EP10Tx(void)
  1706. {
  1707. GH_USB_INTRTX_S tmp_value;
  1708. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1709. tmp_value.all = value;
  1710. #if GH_USB_ENABLE_DEBUG_PRINT
  1711. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP10Tx] --> 0x%08x\n",
  1712. REG_USB_INTRTX,value);
  1713. #endif
  1714. return tmp_value.bitc.ep10tx;
  1715. }
  1716. GH_INLINE U8 GH_USB_get_IntrTx_EP11Tx(void)
  1717. {
  1718. GH_USB_INTRTX_S tmp_value;
  1719. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1720. tmp_value.all = value;
  1721. #if GH_USB_ENABLE_DEBUG_PRINT
  1722. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP11Tx] --> 0x%08x\n",
  1723. REG_USB_INTRTX,value);
  1724. #endif
  1725. return tmp_value.bitc.ep11tx;
  1726. }
  1727. GH_INLINE U8 GH_USB_get_IntrTx_EP12Tx(void)
  1728. {
  1729. GH_USB_INTRTX_S tmp_value;
  1730. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1731. tmp_value.all = value;
  1732. #if GH_USB_ENABLE_DEBUG_PRINT
  1733. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP12Tx] --> 0x%08x\n",
  1734. REG_USB_INTRTX,value);
  1735. #endif
  1736. return tmp_value.bitc.ep12tx;
  1737. }
  1738. GH_INLINE U8 GH_USB_get_IntrTx_EP13Tx(void)
  1739. {
  1740. GH_USB_INTRTX_S tmp_value;
  1741. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1742. tmp_value.all = value;
  1743. #if GH_USB_ENABLE_DEBUG_PRINT
  1744. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP13Tx] --> 0x%08x\n",
  1745. REG_USB_INTRTX,value);
  1746. #endif
  1747. return tmp_value.bitc.ep13tx;
  1748. }
  1749. GH_INLINE U8 GH_USB_get_IntrTx_EP14Tx(void)
  1750. {
  1751. GH_USB_INTRTX_S tmp_value;
  1752. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1753. tmp_value.all = value;
  1754. #if GH_USB_ENABLE_DEBUG_PRINT
  1755. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP14Tx] --> 0x%08x\n",
  1756. REG_USB_INTRTX,value);
  1757. #endif
  1758. return tmp_value.bitc.ep14tx;
  1759. }
  1760. GH_INLINE U8 GH_USB_get_IntrTx_EP15Tx(void)
  1761. {
  1762. GH_USB_INTRTX_S tmp_value;
  1763. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1764. tmp_value.all = value;
  1765. #if GH_USB_ENABLE_DEBUG_PRINT
  1766. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP15Tx] --> 0x%08x\n",
  1767. REG_USB_INTRTX,value);
  1768. #endif
  1769. return tmp_value.bitc.ep15tx;
  1770. }
  1771. #endif /* GH_INLINE_LEVEL == 0 */
  1772. /*----------------------------------------------------------------------------*/
  1773. /* register USB_IntrRx (read) */
  1774. /*----------------------------------------------------------------------------*/
  1775. #if GH_INLINE_LEVEL == 0
  1776. /*! \brief Reads the register 'USB_IntrRx'. */
  1777. U16 GH_USB_get_IntrRx(void);
  1778. /*! \brief Reads the bit group 'EP1Rx' of register 'USB_IntrRx'. */
  1779. U8 GH_USB_get_IntrRx_EP1Rx(void);
  1780. /*! \brief Reads the bit group 'EP2Rx' of register 'USB_IntrRx'. */
  1781. U8 GH_USB_get_IntrRx_EP2Rx(void);
  1782. /*! \brief Reads the bit group 'EP3Rx' of register 'USB_IntrRx'. */
  1783. U8 GH_USB_get_IntrRx_EP3Rx(void);
  1784. /*! \brief Reads the bit group 'EP4Rx' of register 'USB_IntrRx'. */
  1785. U8 GH_USB_get_IntrRx_EP4Rx(void);
  1786. /*! \brief Reads the bit group 'EP5Rx' of register 'USB_IntrRx'. */
  1787. U8 GH_USB_get_IntrRx_EP5Rx(void);
  1788. /*! \brief Reads the bit group 'EP6Rx' of register 'USB_IntrRx'. */
  1789. U8 GH_USB_get_IntrRx_EP6Rx(void);
  1790. /*! \brief Reads the bit group 'EP7Rx' of register 'USB_IntrRx'. */
  1791. U8 GH_USB_get_IntrRx_EP7Rx(void);
  1792. /*! \brief Reads the bit group 'EP8Rx' of register 'USB_IntrRx'. */
  1793. U8 GH_USB_get_IntrRx_EP8Rx(void);
  1794. /*! \brief Reads the bit group 'EP9Rx' of register 'USB_IntrRx'. */
  1795. U8 GH_USB_get_IntrRx_EP9Rx(void);
  1796. /*! \brief Reads the bit group 'EP10Rx' of register 'USB_IntrRx'. */
  1797. U8 GH_USB_get_IntrRx_EP10Rx(void);
  1798. /*! \brief Reads the bit group 'EP11Rx' of register 'USB_IntrRx'. */
  1799. U8 GH_USB_get_IntrRx_EP11Rx(void);
  1800. /*! \brief Reads the bit group 'EP12Rx' of register 'USB_IntrRx'. */
  1801. U8 GH_USB_get_IntrRx_EP12Rx(void);
  1802. /*! \brief Reads the bit group 'EP13Rx' of register 'USB_IntrRx'. */
  1803. U8 GH_USB_get_IntrRx_EP13Rx(void);
  1804. /*! \brief Reads the bit group 'EP14Rx' of register 'USB_IntrRx'. */
  1805. U8 GH_USB_get_IntrRx_EP14Rx(void);
  1806. /*! \brief Reads the bit group 'EP15Rx' of register 'USB_IntrRx'. */
  1807. U8 GH_USB_get_IntrRx_EP15Rx(void);
  1808. #else /* GH_INLINE_LEVEL == 0 */
  1809. GH_INLINE U16 GH_USB_get_IntrRx(void)
  1810. {
  1811. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1812. #if GH_USB_ENABLE_DEBUG_PRINT
  1813. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx] --> 0x%08x\n",
  1814. REG_USB_INTRRX,value);
  1815. #endif
  1816. return value;
  1817. }
  1818. GH_INLINE U8 GH_USB_get_IntrRx_EP1Rx(void)
  1819. {
  1820. GH_USB_INTRRX_S tmp_value;
  1821. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1822. tmp_value.all = value;
  1823. #if GH_USB_ENABLE_DEBUG_PRINT
  1824. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP1Rx] --> 0x%08x\n",
  1825. REG_USB_INTRRX,value);
  1826. #endif
  1827. return tmp_value.bitc.ep1rx;
  1828. }
  1829. GH_INLINE U8 GH_USB_get_IntrRx_EP2Rx(void)
  1830. {
  1831. GH_USB_INTRRX_S tmp_value;
  1832. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1833. tmp_value.all = value;
  1834. #if GH_USB_ENABLE_DEBUG_PRINT
  1835. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP2Rx] --> 0x%08x\n",
  1836. REG_USB_INTRRX,value);
  1837. #endif
  1838. return tmp_value.bitc.ep2rx;
  1839. }
  1840. GH_INLINE U8 GH_USB_get_IntrRx_EP3Rx(void)
  1841. {
  1842. GH_USB_INTRRX_S tmp_value;
  1843. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1844. tmp_value.all = value;
  1845. #if GH_USB_ENABLE_DEBUG_PRINT
  1846. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP3Rx] --> 0x%08x\n",
  1847. REG_USB_INTRRX,value);
  1848. #endif
  1849. return tmp_value.bitc.ep3rx;
  1850. }
  1851. GH_INLINE U8 GH_USB_get_IntrRx_EP4Rx(void)
  1852. {
  1853. GH_USB_INTRRX_S tmp_value;
  1854. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1855. tmp_value.all = value;
  1856. #if GH_USB_ENABLE_DEBUG_PRINT
  1857. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP4Rx] --> 0x%08x\n",
  1858. REG_USB_INTRRX,value);
  1859. #endif
  1860. return tmp_value.bitc.ep4rx;
  1861. }
  1862. GH_INLINE U8 GH_USB_get_IntrRx_EP5Rx(void)
  1863. {
  1864. GH_USB_INTRRX_S tmp_value;
  1865. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1866. tmp_value.all = value;
  1867. #if GH_USB_ENABLE_DEBUG_PRINT
  1868. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP5Rx] --> 0x%08x\n",
  1869. REG_USB_INTRRX,value);
  1870. #endif
  1871. return tmp_value.bitc.ep5rx;
  1872. }
  1873. GH_INLINE U8 GH_USB_get_IntrRx_EP6Rx(void)
  1874. {
  1875. GH_USB_INTRRX_S tmp_value;
  1876. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1877. tmp_value.all = value;
  1878. #if GH_USB_ENABLE_DEBUG_PRINT
  1879. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP6Rx] --> 0x%08x\n",
  1880. REG_USB_INTRRX,value);
  1881. #endif
  1882. return tmp_value.bitc.ep6rx;
  1883. }
  1884. GH_INLINE U8 GH_USB_get_IntrRx_EP7Rx(void)
  1885. {
  1886. GH_USB_INTRRX_S tmp_value;
  1887. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1888. tmp_value.all = value;
  1889. #if GH_USB_ENABLE_DEBUG_PRINT
  1890. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP7Rx] --> 0x%08x\n",
  1891. REG_USB_INTRRX,value);
  1892. #endif
  1893. return tmp_value.bitc.ep7rx;
  1894. }
  1895. GH_INLINE U8 GH_USB_get_IntrRx_EP8Rx(void)
  1896. {
  1897. GH_USB_INTRRX_S tmp_value;
  1898. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1899. tmp_value.all = value;
  1900. #if GH_USB_ENABLE_DEBUG_PRINT
  1901. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP8Rx] --> 0x%08x\n",
  1902. REG_USB_INTRRX,value);
  1903. #endif
  1904. return tmp_value.bitc.ep8rx;
  1905. }
  1906. GH_INLINE U8 GH_USB_get_IntrRx_EP9Rx(void)
  1907. {
  1908. GH_USB_INTRRX_S tmp_value;
  1909. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1910. tmp_value.all = value;
  1911. #if GH_USB_ENABLE_DEBUG_PRINT
  1912. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP9Rx] --> 0x%08x\n",
  1913. REG_USB_INTRRX,value);
  1914. #endif
  1915. return tmp_value.bitc.ep9rx;
  1916. }
  1917. GH_INLINE U8 GH_USB_get_IntrRx_EP10Rx(void)
  1918. {
  1919. GH_USB_INTRRX_S tmp_value;
  1920. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1921. tmp_value.all = value;
  1922. #if GH_USB_ENABLE_DEBUG_PRINT
  1923. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP10Rx] --> 0x%08x\n",
  1924. REG_USB_INTRRX,value);
  1925. #endif
  1926. return tmp_value.bitc.ep10rx;
  1927. }
  1928. GH_INLINE U8 GH_USB_get_IntrRx_EP11Rx(void)
  1929. {
  1930. GH_USB_INTRRX_S tmp_value;
  1931. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1932. tmp_value.all = value;
  1933. #if GH_USB_ENABLE_DEBUG_PRINT
  1934. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP11Rx] --> 0x%08x\n",
  1935. REG_USB_INTRRX,value);
  1936. #endif
  1937. return tmp_value.bitc.ep11rx;
  1938. }
  1939. GH_INLINE U8 GH_USB_get_IntrRx_EP12Rx(void)
  1940. {
  1941. GH_USB_INTRRX_S tmp_value;
  1942. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1943. tmp_value.all = value;
  1944. #if GH_USB_ENABLE_DEBUG_PRINT
  1945. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP12Rx] --> 0x%08x\n",
  1946. REG_USB_INTRRX,value);
  1947. #endif
  1948. return tmp_value.bitc.ep12rx;
  1949. }
  1950. GH_INLINE U8 GH_USB_get_IntrRx_EP13Rx(void)
  1951. {
  1952. GH_USB_INTRRX_S tmp_value;
  1953. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1954. tmp_value.all = value;
  1955. #if GH_USB_ENABLE_DEBUG_PRINT
  1956. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP13Rx] --> 0x%08x\n",
  1957. REG_USB_INTRRX,value);
  1958. #endif
  1959. return tmp_value.bitc.ep13rx;
  1960. }
  1961. GH_INLINE U8 GH_USB_get_IntrRx_EP14Rx(void)
  1962. {
  1963. GH_USB_INTRRX_S tmp_value;
  1964. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1965. tmp_value.all = value;
  1966. #if GH_USB_ENABLE_DEBUG_PRINT
  1967. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP14Rx] --> 0x%08x\n",
  1968. REG_USB_INTRRX,value);
  1969. #endif
  1970. return tmp_value.bitc.ep14rx;
  1971. }
  1972. GH_INLINE U8 GH_USB_get_IntrRx_EP15Rx(void)
  1973. {
  1974. GH_USB_INTRRX_S tmp_value;
  1975. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  1976. tmp_value.all = value;
  1977. #if GH_USB_ENABLE_DEBUG_PRINT
  1978. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP15Rx] --> 0x%08x\n",
  1979. REG_USB_INTRRX,value);
  1980. #endif
  1981. return tmp_value.bitc.ep15rx;
  1982. }
  1983. #endif /* GH_INLINE_LEVEL == 0 */
  1984. /*----------------------------------------------------------------------------*/
  1985. /* register USB_IntrTxE (read/write) */
  1986. /*----------------------------------------------------------------------------*/
  1987. #if GH_INLINE_LEVEL == 0
  1988. /*! \brief Writes the register 'USB_IntrTxE'. */
  1989. void GH_USB_set_IntrTxE(U16 data);
  1990. /*! \brief Reads the register 'USB_IntrTxE'. */
  1991. U16 GH_USB_get_IntrTxE(void);
  1992. /*! \brief Writes the bit group 'EP0' of register 'USB_IntrTxE'. */
  1993. void GH_USB_set_IntrTxE_EP0(U8 data);
  1994. /*! \brief Reads the bit group 'EP0' of register 'USB_IntrTxE'. */
  1995. U8 GH_USB_get_IntrTxE_EP0(void);
  1996. /*! \brief Writes the bit group 'EP1Tx' of register 'USB_IntrTxE'. */
  1997. void GH_USB_set_IntrTxE_EP1Tx(U8 data);
  1998. /*! \brief Reads the bit group 'EP1Tx' of register 'USB_IntrTxE'. */
  1999. U8 GH_USB_get_IntrTxE_EP1Tx(void);
  2000. /*! \brief Writes the bit group 'EP2Tx' of register 'USB_IntrTxE'. */
  2001. void GH_USB_set_IntrTxE_EP2Tx(U8 data);
  2002. /*! \brief Reads the bit group 'EP2Tx' of register 'USB_IntrTxE'. */
  2003. U8 GH_USB_get_IntrTxE_EP2Tx(void);
  2004. /*! \brief Writes the bit group 'EP3Tx' of register 'USB_IntrTxE'. */
  2005. void GH_USB_set_IntrTxE_EP3Tx(U8 data);
  2006. /*! \brief Reads the bit group 'EP3Tx' of register 'USB_IntrTxE'. */
  2007. U8 GH_USB_get_IntrTxE_EP3Tx(void);
  2008. /*! \brief Writes the bit group 'EP4Tx' of register 'USB_IntrTxE'. */
  2009. void GH_USB_set_IntrTxE_EP4Tx(U8 data);
  2010. /*! \brief Reads the bit group 'EP4Tx' of register 'USB_IntrTxE'. */
  2011. U8 GH_USB_get_IntrTxE_EP4Tx(void);
  2012. /*! \brief Writes the bit group 'EP5Tx' of register 'USB_IntrTxE'. */
  2013. void GH_USB_set_IntrTxE_EP5Tx(U8 data);
  2014. /*! \brief Reads the bit group 'EP5Tx' of register 'USB_IntrTxE'. */
  2015. U8 GH_USB_get_IntrTxE_EP5Tx(void);
  2016. /*! \brief Writes the bit group 'EP6Tx' of register 'USB_IntrTxE'. */
  2017. void GH_USB_set_IntrTxE_EP6Tx(U8 data);
  2018. /*! \brief Reads the bit group 'EP6Tx' of register 'USB_IntrTxE'. */
  2019. U8 GH_USB_get_IntrTxE_EP6Tx(void);
  2020. /*! \brief Writes the bit group 'EP7Tx' of register 'USB_IntrTxE'. */
  2021. void GH_USB_set_IntrTxE_EP7Tx(U8 data);
  2022. /*! \brief Reads the bit group 'EP7Tx' of register 'USB_IntrTxE'. */
  2023. U8 GH_USB_get_IntrTxE_EP7Tx(void);
  2024. /*! \brief Writes the bit group 'EP8Tx' of register 'USB_IntrTxE'. */
  2025. void GH_USB_set_IntrTxE_EP8Tx(U8 data);
  2026. /*! \brief Reads the bit group 'EP8Tx' of register 'USB_IntrTxE'. */
  2027. U8 GH_USB_get_IntrTxE_EP8Tx(void);
  2028. /*! \brief Writes the bit group 'EP9Tx' of register 'USB_IntrTxE'. */
  2029. void GH_USB_set_IntrTxE_EP9Tx(U8 data);
  2030. /*! \brief Reads the bit group 'EP9Tx' of register 'USB_IntrTxE'. */
  2031. U8 GH_USB_get_IntrTxE_EP9Tx(void);
  2032. /*! \brief Writes the bit group 'EP10Tx' of register 'USB_IntrTxE'. */
  2033. void GH_USB_set_IntrTxE_EP10Tx(U8 data);
  2034. /*! \brief Reads the bit group 'EP10Tx' of register 'USB_IntrTxE'. */
  2035. U8 GH_USB_get_IntrTxE_EP10Tx(void);
  2036. /*! \brief Writes the bit group 'EP11Tx' of register 'USB_IntrTxE'. */
  2037. void GH_USB_set_IntrTxE_EP11Tx(U8 data);
  2038. /*! \brief Reads the bit group 'EP11Tx' of register 'USB_IntrTxE'. */
  2039. U8 GH_USB_get_IntrTxE_EP11Tx(void);
  2040. /*! \brief Writes the bit group 'EP12Tx' of register 'USB_IntrTxE'. */
  2041. void GH_USB_set_IntrTxE_EP12Tx(U8 data);
  2042. /*! \brief Reads the bit group 'EP12Tx' of register 'USB_IntrTxE'. */
  2043. U8 GH_USB_get_IntrTxE_EP12Tx(void);
  2044. /*! \brief Writes the bit group 'EP13Tx' of register 'USB_IntrTxE'. */
  2045. void GH_USB_set_IntrTxE_EP13Tx(U8 data);
  2046. /*! \brief Reads the bit group 'EP13Tx' of register 'USB_IntrTxE'. */
  2047. U8 GH_USB_get_IntrTxE_EP13Tx(void);
  2048. /*! \brief Writes the bit group 'EP14Tx' of register 'USB_IntrTxE'. */
  2049. void GH_USB_set_IntrTxE_EP14Tx(U8 data);
  2050. /*! \brief Reads the bit group 'EP14Tx' of register 'USB_IntrTxE'. */
  2051. U8 GH_USB_get_IntrTxE_EP14Tx(void);
  2052. /*! \brief Writes the bit group 'EP15Tx' of register 'USB_IntrTxE'. */
  2053. void GH_USB_set_IntrTxE_EP15Tx(U8 data);
  2054. /*! \brief Reads the bit group 'EP15Tx' of register 'USB_IntrTxE'. */
  2055. U8 GH_USB_get_IntrTxE_EP15Tx(void);
  2056. #else /* GH_INLINE_LEVEL == 0 */
  2057. GH_INLINE void GH_USB_set_IntrTxE(U16 data)
  2058. {
  2059. *(volatile U16 *)REG_USB_INTRTXE = data;
  2060. #if GH_USB_ENABLE_DEBUG_PRINT
  2061. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE] <-- 0x%08x\n",
  2062. REG_USB_INTRTXE,data,data);
  2063. #endif
  2064. }
  2065. GH_INLINE U16 GH_USB_get_IntrTxE(void)
  2066. {
  2067. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2068. #if GH_USB_ENABLE_DEBUG_PRINT
  2069. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE] --> 0x%08x\n",
  2070. REG_USB_INTRTXE,value);
  2071. #endif
  2072. return value;
  2073. }
  2074. GH_INLINE void GH_USB_set_IntrTxE_EP0(U8 data)
  2075. {
  2076. GH_USB_INTRTXE_S d;
  2077. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2078. d.bitc.ep0 = data;
  2079. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2080. #if GH_USB_ENABLE_DEBUG_PRINT
  2081. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP0] <-- 0x%08x\n",
  2082. REG_USB_INTRTXE,d.all,d.all);
  2083. #endif
  2084. }
  2085. GH_INLINE U8 GH_USB_get_IntrTxE_EP0(void)
  2086. {
  2087. GH_USB_INTRTXE_S tmp_value;
  2088. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2089. tmp_value.all = value;
  2090. #if GH_USB_ENABLE_DEBUG_PRINT
  2091. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP0] --> 0x%08x\n",
  2092. REG_USB_INTRTXE,value);
  2093. #endif
  2094. return tmp_value.bitc.ep0;
  2095. }
  2096. GH_INLINE void GH_USB_set_IntrTxE_EP1Tx(U8 data)
  2097. {
  2098. GH_USB_INTRTXE_S d;
  2099. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2100. d.bitc.ep1tx = data;
  2101. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2102. #if GH_USB_ENABLE_DEBUG_PRINT
  2103. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP1Tx] <-- 0x%08x\n",
  2104. REG_USB_INTRTXE,d.all,d.all);
  2105. #endif
  2106. }
  2107. GH_INLINE U8 GH_USB_get_IntrTxE_EP1Tx(void)
  2108. {
  2109. GH_USB_INTRTXE_S tmp_value;
  2110. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2111. tmp_value.all = value;
  2112. #if GH_USB_ENABLE_DEBUG_PRINT
  2113. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP1Tx] --> 0x%08x\n",
  2114. REG_USB_INTRTXE,value);
  2115. #endif
  2116. return tmp_value.bitc.ep1tx;
  2117. }
  2118. GH_INLINE void GH_USB_set_IntrTxE_EP2Tx(U8 data)
  2119. {
  2120. GH_USB_INTRTXE_S d;
  2121. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2122. d.bitc.ep2tx = data;
  2123. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2124. #if GH_USB_ENABLE_DEBUG_PRINT
  2125. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP2Tx] <-- 0x%08x\n",
  2126. REG_USB_INTRTXE,d.all,d.all);
  2127. #endif
  2128. }
  2129. GH_INLINE U8 GH_USB_get_IntrTxE_EP2Tx(void)
  2130. {
  2131. GH_USB_INTRTXE_S tmp_value;
  2132. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2133. tmp_value.all = value;
  2134. #if GH_USB_ENABLE_DEBUG_PRINT
  2135. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP2Tx] --> 0x%08x\n",
  2136. REG_USB_INTRTXE,value);
  2137. #endif
  2138. return tmp_value.bitc.ep2tx;
  2139. }
  2140. GH_INLINE void GH_USB_set_IntrTxE_EP3Tx(U8 data)
  2141. {
  2142. GH_USB_INTRTXE_S d;
  2143. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2144. d.bitc.ep3tx = data;
  2145. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2146. #if GH_USB_ENABLE_DEBUG_PRINT
  2147. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP3Tx] <-- 0x%08x\n",
  2148. REG_USB_INTRTXE,d.all,d.all);
  2149. #endif
  2150. }
  2151. GH_INLINE U8 GH_USB_get_IntrTxE_EP3Tx(void)
  2152. {
  2153. GH_USB_INTRTXE_S tmp_value;
  2154. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2155. tmp_value.all = value;
  2156. #if GH_USB_ENABLE_DEBUG_PRINT
  2157. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP3Tx] --> 0x%08x\n",
  2158. REG_USB_INTRTXE,value);
  2159. #endif
  2160. return tmp_value.bitc.ep3tx;
  2161. }
  2162. GH_INLINE void GH_USB_set_IntrTxE_EP4Tx(U8 data)
  2163. {
  2164. GH_USB_INTRTXE_S d;
  2165. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2166. d.bitc.ep4tx = data;
  2167. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2168. #if GH_USB_ENABLE_DEBUG_PRINT
  2169. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP4Tx] <-- 0x%08x\n",
  2170. REG_USB_INTRTXE,d.all,d.all);
  2171. #endif
  2172. }
  2173. GH_INLINE U8 GH_USB_get_IntrTxE_EP4Tx(void)
  2174. {
  2175. GH_USB_INTRTXE_S tmp_value;
  2176. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2177. tmp_value.all = value;
  2178. #if GH_USB_ENABLE_DEBUG_PRINT
  2179. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP4Tx] --> 0x%08x\n",
  2180. REG_USB_INTRTXE,value);
  2181. #endif
  2182. return tmp_value.bitc.ep4tx;
  2183. }
  2184. GH_INLINE void GH_USB_set_IntrTxE_EP5Tx(U8 data)
  2185. {
  2186. GH_USB_INTRTXE_S d;
  2187. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2188. d.bitc.ep5tx = data;
  2189. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2190. #if GH_USB_ENABLE_DEBUG_PRINT
  2191. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP5Tx] <-- 0x%08x\n",
  2192. REG_USB_INTRTXE,d.all,d.all);
  2193. #endif
  2194. }
  2195. GH_INLINE U8 GH_USB_get_IntrTxE_EP5Tx(void)
  2196. {
  2197. GH_USB_INTRTXE_S tmp_value;
  2198. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2199. tmp_value.all = value;
  2200. #if GH_USB_ENABLE_DEBUG_PRINT
  2201. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP5Tx] --> 0x%08x\n",
  2202. REG_USB_INTRTXE,value);
  2203. #endif
  2204. return tmp_value.bitc.ep5tx;
  2205. }
  2206. GH_INLINE void GH_USB_set_IntrTxE_EP6Tx(U8 data)
  2207. {
  2208. GH_USB_INTRTXE_S d;
  2209. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2210. d.bitc.ep6tx = data;
  2211. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2212. #if GH_USB_ENABLE_DEBUG_PRINT
  2213. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP6Tx] <-- 0x%08x\n",
  2214. REG_USB_INTRTXE,d.all,d.all);
  2215. #endif
  2216. }
  2217. GH_INLINE U8 GH_USB_get_IntrTxE_EP6Tx(void)
  2218. {
  2219. GH_USB_INTRTXE_S tmp_value;
  2220. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2221. tmp_value.all = value;
  2222. #if GH_USB_ENABLE_DEBUG_PRINT
  2223. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP6Tx] --> 0x%08x\n",
  2224. REG_USB_INTRTXE,value);
  2225. #endif
  2226. return tmp_value.bitc.ep6tx;
  2227. }
  2228. GH_INLINE void GH_USB_set_IntrTxE_EP7Tx(U8 data)
  2229. {
  2230. GH_USB_INTRTXE_S d;
  2231. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2232. d.bitc.ep7tx = data;
  2233. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2234. #if GH_USB_ENABLE_DEBUG_PRINT
  2235. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP7Tx] <-- 0x%08x\n",
  2236. REG_USB_INTRTXE,d.all,d.all);
  2237. #endif
  2238. }
  2239. GH_INLINE U8 GH_USB_get_IntrTxE_EP7Tx(void)
  2240. {
  2241. GH_USB_INTRTXE_S tmp_value;
  2242. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2243. tmp_value.all = value;
  2244. #if GH_USB_ENABLE_DEBUG_PRINT
  2245. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP7Tx] --> 0x%08x\n",
  2246. REG_USB_INTRTXE,value);
  2247. #endif
  2248. return tmp_value.bitc.ep7tx;
  2249. }
  2250. GH_INLINE void GH_USB_set_IntrTxE_EP8Tx(U8 data)
  2251. {
  2252. GH_USB_INTRTXE_S d;
  2253. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2254. d.bitc.ep8tx = data;
  2255. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2256. #if GH_USB_ENABLE_DEBUG_PRINT
  2257. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP8Tx] <-- 0x%08x\n",
  2258. REG_USB_INTRTXE,d.all,d.all);
  2259. #endif
  2260. }
  2261. GH_INLINE U8 GH_USB_get_IntrTxE_EP8Tx(void)
  2262. {
  2263. GH_USB_INTRTXE_S tmp_value;
  2264. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2265. tmp_value.all = value;
  2266. #if GH_USB_ENABLE_DEBUG_PRINT
  2267. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP8Tx] --> 0x%08x\n",
  2268. REG_USB_INTRTXE,value);
  2269. #endif
  2270. return tmp_value.bitc.ep8tx;
  2271. }
  2272. GH_INLINE void GH_USB_set_IntrTxE_EP9Tx(U8 data)
  2273. {
  2274. GH_USB_INTRTXE_S d;
  2275. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2276. d.bitc.ep9tx = data;
  2277. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2278. #if GH_USB_ENABLE_DEBUG_PRINT
  2279. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP9Tx] <-- 0x%08x\n",
  2280. REG_USB_INTRTXE,d.all,d.all);
  2281. #endif
  2282. }
  2283. GH_INLINE U8 GH_USB_get_IntrTxE_EP9Tx(void)
  2284. {
  2285. GH_USB_INTRTXE_S tmp_value;
  2286. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2287. tmp_value.all = value;
  2288. #if GH_USB_ENABLE_DEBUG_PRINT
  2289. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP9Tx] --> 0x%08x\n",
  2290. REG_USB_INTRTXE,value);
  2291. #endif
  2292. return tmp_value.bitc.ep9tx;
  2293. }
  2294. GH_INLINE void GH_USB_set_IntrTxE_EP10Tx(U8 data)
  2295. {
  2296. GH_USB_INTRTXE_S d;
  2297. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2298. d.bitc.ep10tx = data;
  2299. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2300. #if GH_USB_ENABLE_DEBUG_PRINT
  2301. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP10Tx] <-- 0x%08x\n",
  2302. REG_USB_INTRTXE,d.all,d.all);
  2303. #endif
  2304. }
  2305. GH_INLINE U8 GH_USB_get_IntrTxE_EP10Tx(void)
  2306. {
  2307. GH_USB_INTRTXE_S tmp_value;
  2308. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2309. tmp_value.all = value;
  2310. #if GH_USB_ENABLE_DEBUG_PRINT
  2311. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP10Tx] --> 0x%08x\n",
  2312. REG_USB_INTRTXE,value);
  2313. #endif
  2314. return tmp_value.bitc.ep10tx;
  2315. }
  2316. GH_INLINE void GH_USB_set_IntrTxE_EP11Tx(U8 data)
  2317. {
  2318. GH_USB_INTRTXE_S d;
  2319. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2320. d.bitc.ep11tx = data;
  2321. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2322. #if GH_USB_ENABLE_DEBUG_PRINT
  2323. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP11Tx] <-- 0x%08x\n",
  2324. REG_USB_INTRTXE,d.all,d.all);
  2325. #endif
  2326. }
  2327. GH_INLINE U8 GH_USB_get_IntrTxE_EP11Tx(void)
  2328. {
  2329. GH_USB_INTRTXE_S tmp_value;
  2330. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2331. tmp_value.all = value;
  2332. #if GH_USB_ENABLE_DEBUG_PRINT
  2333. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP11Tx] --> 0x%08x\n",
  2334. REG_USB_INTRTXE,value);
  2335. #endif
  2336. return tmp_value.bitc.ep11tx;
  2337. }
  2338. GH_INLINE void GH_USB_set_IntrTxE_EP12Tx(U8 data)
  2339. {
  2340. GH_USB_INTRTXE_S d;
  2341. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2342. d.bitc.ep12tx = data;
  2343. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2344. #if GH_USB_ENABLE_DEBUG_PRINT
  2345. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP12Tx] <-- 0x%08x\n",
  2346. REG_USB_INTRTXE,d.all,d.all);
  2347. #endif
  2348. }
  2349. GH_INLINE U8 GH_USB_get_IntrTxE_EP12Tx(void)
  2350. {
  2351. GH_USB_INTRTXE_S tmp_value;
  2352. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2353. tmp_value.all = value;
  2354. #if GH_USB_ENABLE_DEBUG_PRINT
  2355. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP12Tx] --> 0x%08x\n",
  2356. REG_USB_INTRTXE,value);
  2357. #endif
  2358. return tmp_value.bitc.ep12tx;
  2359. }
  2360. GH_INLINE void GH_USB_set_IntrTxE_EP13Tx(U8 data)
  2361. {
  2362. GH_USB_INTRTXE_S d;
  2363. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2364. d.bitc.ep13tx = data;
  2365. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2366. #if GH_USB_ENABLE_DEBUG_PRINT
  2367. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP13Tx] <-- 0x%08x\n",
  2368. REG_USB_INTRTXE,d.all,d.all);
  2369. #endif
  2370. }
  2371. GH_INLINE U8 GH_USB_get_IntrTxE_EP13Tx(void)
  2372. {
  2373. GH_USB_INTRTXE_S tmp_value;
  2374. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2375. tmp_value.all = value;
  2376. #if GH_USB_ENABLE_DEBUG_PRINT
  2377. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP13Tx] --> 0x%08x\n",
  2378. REG_USB_INTRTXE,value);
  2379. #endif
  2380. return tmp_value.bitc.ep13tx;
  2381. }
  2382. GH_INLINE void GH_USB_set_IntrTxE_EP14Tx(U8 data)
  2383. {
  2384. GH_USB_INTRTXE_S d;
  2385. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2386. d.bitc.ep14tx = data;
  2387. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2388. #if GH_USB_ENABLE_DEBUG_PRINT
  2389. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP14Tx] <-- 0x%08x\n",
  2390. REG_USB_INTRTXE,d.all,d.all);
  2391. #endif
  2392. }
  2393. GH_INLINE U8 GH_USB_get_IntrTxE_EP14Tx(void)
  2394. {
  2395. GH_USB_INTRTXE_S tmp_value;
  2396. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2397. tmp_value.all = value;
  2398. #if GH_USB_ENABLE_DEBUG_PRINT
  2399. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP14Tx] --> 0x%08x\n",
  2400. REG_USB_INTRTXE,value);
  2401. #endif
  2402. return tmp_value.bitc.ep14tx;
  2403. }
  2404. GH_INLINE void GH_USB_set_IntrTxE_EP15Tx(U8 data)
  2405. {
  2406. GH_USB_INTRTXE_S d;
  2407. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2408. d.bitc.ep15tx = data;
  2409. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2410. #if GH_USB_ENABLE_DEBUG_PRINT
  2411. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP15Tx] <-- 0x%08x\n",
  2412. REG_USB_INTRTXE,d.all,d.all);
  2413. #endif
  2414. }
  2415. GH_INLINE U8 GH_USB_get_IntrTxE_EP15Tx(void)
  2416. {
  2417. GH_USB_INTRTXE_S tmp_value;
  2418. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2419. tmp_value.all = value;
  2420. #if GH_USB_ENABLE_DEBUG_PRINT
  2421. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP15Tx] --> 0x%08x\n",
  2422. REG_USB_INTRTXE,value);
  2423. #endif
  2424. return tmp_value.bitc.ep15tx;
  2425. }
  2426. #endif /* GH_INLINE_LEVEL == 0 */
  2427. /*----------------------------------------------------------------------------*/
  2428. /* register USB_IntrRxE (read/write) */
  2429. /*----------------------------------------------------------------------------*/
  2430. #if GH_INLINE_LEVEL == 0
  2431. /*! \brief Writes the register 'USB_IntrRxE'. */
  2432. void GH_USB_set_IntrRxE(U16 data);
  2433. /*! \brief Reads the register 'USB_IntrRxE'. */
  2434. U16 GH_USB_get_IntrRxE(void);
  2435. /*! \brief Writes the bit group 'EP1Rx' of register 'USB_IntrRxE'. */
  2436. void GH_USB_set_IntrRxE_EP1Rx(U8 data);
  2437. /*! \brief Reads the bit group 'EP1Rx' of register 'USB_IntrRxE'. */
  2438. U8 GH_USB_get_IntrRxE_EP1Rx(void);
  2439. /*! \brief Writes the bit group 'EP2Rx' of register 'USB_IntrRxE'. */
  2440. void GH_USB_set_IntrRxE_EP2Rx(U8 data);
  2441. /*! \brief Reads the bit group 'EP2Rx' of register 'USB_IntrRxE'. */
  2442. U8 GH_USB_get_IntrRxE_EP2Rx(void);
  2443. /*! \brief Writes the bit group 'EP3Rx' of register 'USB_IntrRxE'. */
  2444. void GH_USB_set_IntrRxE_EP3Rx(U8 data);
  2445. /*! \brief Reads the bit group 'EP3Rx' of register 'USB_IntrRxE'. */
  2446. U8 GH_USB_get_IntrRxE_EP3Rx(void);
  2447. /*! \brief Writes the bit group 'EP4Rx' of register 'USB_IntrRxE'. */
  2448. void GH_USB_set_IntrRxE_EP4Rx(U8 data);
  2449. /*! \brief Reads the bit group 'EP4Rx' of register 'USB_IntrRxE'. */
  2450. U8 GH_USB_get_IntrRxE_EP4Rx(void);
  2451. /*! \brief Writes the bit group 'EP5Rx' of register 'USB_IntrRxE'. */
  2452. void GH_USB_set_IntrRxE_EP5Rx(U8 data);
  2453. /*! \brief Reads the bit group 'EP5Rx' of register 'USB_IntrRxE'. */
  2454. U8 GH_USB_get_IntrRxE_EP5Rx(void);
  2455. /*! \brief Writes the bit group 'EP6Rx' of register 'USB_IntrRxE'. */
  2456. void GH_USB_set_IntrRxE_EP6Rx(U8 data);
  2457. /*! \brief Reads the bit group 'EP6Rx' of register 'USB_IntrRxE'. */
  2458. U8 GH_USB_get_IntrRxE_EP6Rx(void);
  2459. /*! \brief Writes the bit group 'EP7Rx' of register 'USB_IntrRxE'. */
  2460. void GH_USB_set_IntrRxE_EP7Rx(U8 data);
  2461. /*! \brief Reads the bit group 'EP7Rx' of register 'USB_IntrRxE'. */
  2462. U8 GH_USB_get_IntrRxE_EP7Rx(void);
  2463. /*! \brief Writes the bit group 'EP8Rx' of register 'USB_IntrRxE'. */
  2464. void GH_USB_set_IntrRxE_EP8Rx(U8 data);
  2465. /*! \brief Reads the bit group 'EP8Rx' of register 'USB_IntrRxE'. */
  2466. U8 GH_USB_get_IntrRxE_EP8Rx(void);
  2467. /*! \brief Writes the bit group 'EP9Rx' of register 'USB_IntrRxE'. */
  2468. void GH_USB_set_IntrRxE_EP9Rx(U8 data);
  2469. /*! \brief Reads the bit group 'EP9Rx' of register 'USB_IntrRxE'. */
  2470. U8 GH_USB_get_IntrRxE_EP9Rx(void);
  2471. /*! \brief Writes the bit group 'EP10Rx' of register 'USB_IntrRxE'. */
  2472. void GH_USB_set_IntrRxE_EP10Rx(U8 data);
  2473. /*! \brief Reads the bit group 'EP10Rx' of register 'USB_IntrRxE'. */
  2474. U8 GH_USB_get_IntrRxE_EP10Rx(void);
  2475. /*! \brief Writes the bit group 'EP11Rx' of register 'USB_IntrRxE'. */
  2476. void GH_USB_set_IntrRxE_EP11Rx(U8 data);
  2477. /*! \brief Reads the bit group 'EP11Rx' of register 'USB_IntrRxE'. */
  2478. U8 GH_USB_get_IntrRxE_EP11Rx(void);
  2479. /*! \brief Writes the bit group 'EP12Rx' of register 'USB_IntrRxE'. */
  2480. void GH_USB_set_IntrRxE_EP12Rx(U8 data);
  2481. /*! \brief Reads the bit group 'EP12Rx' of register 'USB_IntrRxE'. */
  2482. U8 GH_USB_get_IntrRxE_EP12Rx(void);
  2483. /*! \brief Writes the bit group 'EP13Rx' of register 'USB_IntrRxE'. */
  2484. void GH_USB_set_IntrRxE_EP13Rx(U8 data);
  2485. /*! \brief Reads the bit group 'EP13Rx' of register 'USB_IntrRxE'. */
  2486. U8 GH_USB_get_IntrRxE_EP13Rx(void);
  2487. /*! \brief Writes the bit group 'EP14Rx' of register 'USB_IntrRxE'. */
  2488. void GH_USB_set_IntrRxE_EP14Rx(U8 data);
  2489. /*! \brief Reads the bit group 'EP14Rx' of register 'USB_IntrRxE'. */
  2490. U8 GH_USB_get_IntrRxE_EP14Rx(void);
  2491. /*! \brief Writes the bit group 'EP15Rx' of register 'USB_IntrRxE'. */
  2492. void GH_USB_set_IntrRxE_EP15Rx(U8 data);
  2493. /*! \brief Reads the bit group 'EP15Rx' of register 'USB_IntrRxE'. */
  2494. U8 GH_USB_get_IntrRxE_EP15Rx(void);
  2495. #else /* GH_INLINE_LEVEL == 0 */
  2496. GH_INLINE void GH_USB_set_IntrRxE(U16 data)
  2497. {
  2498. *(volatile U16 *)REG_USB_INTRRXE = data;
  2499. #if GH_USB_ENABLE_DEBUG_PRINT
  2500. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE] <-- 0x%08x\n",
  2501. REG_USB_INTRRXE,data,data);
  2502. #endif
  2503. }
  2504. GH_INLINE U16 GH_USB_get_IntrRxE(void)
  2505. {
  2506. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2507. #if GH_USB_ENABLE_DEBUG_PRINT
  2508. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE] --> 0x%08x\n",
  2509. REG_USB_INTRRXE,value);
  2510. #endif
  2511. return value;
  2512. }
  2513. GH_INLINE void GH_USB_set_IntrRxE_EP1Rx(U8 data)
  2514. {
  2515. GH_USB_INTRRXE_S d;
  2516. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2517. d.bitc.ep1rx = data;
  2518. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2519. #if GH_USB_ENABLE_DEBUG_PRINT
  2520. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP1Rx] <-- 0x%08x\n",
  2521. REG_USB_INTRRXE,d.all,d.all);
  2522. #endif
  2523. }
  2524. GH_INLINE U8 GH_USB_get_IntrRxE_EP1Rx(void)
  2525. {
  2526. GH_USB_INTRRXE_S tmp_value;
  2527. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2528. tmp_value.all = value;
  2529. #if GH_USB_ENABLE_DEBUG_PRINT
  2530. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP1Rx] --> 0x%08x\n",
  2531. REG_USB_INTRRXE,value);
  2532. #endif
  2533. return tmp_value.bitc.ep1rx;
  2534. }
  2535. GH_INLINE void GH_USB_set_IntrRxE_EP2Rx(U8 data)
  2536. {
  2537. GH_USB_INTRRXE_S d;
  2538. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2539. d.bitc.ep2rx = data;
  2540. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2541. #if GH_USB_ENABLE_DEBUG_PRINT
  2542. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP2Rx] <-- 0x%08x\n",
  2543. REG_USB_INTRRXE,d.all,d.all);
  2544. #endif
  2545. }
  2546. GH_INLINE U8 GH_USB_get_IntrRxE_EP2Rx(void)
  2547. {
  2548. GH_USB_INTRRXE_S tmp_value;
  2549. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2550. tmp_value.all = value;
  2551. #if GH_USB_ENABLE_DEBUG_PRINT
  2552. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP2Rx] --> 0x%08x\n",
  2553. REG_USB_INTRRXE,value);
  2554. #endif
  2555. return tmp_value.bitc.ep2rx;
  2556. }
  2557. GH_INLINE void GH_USB_set_IntrRxE_EP3Rx(U8 data)
  2558. {
  2559. GH_USB_INTRRXE_S d;
  2560. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2561. d.bitc.ep3rx = data;
  2562. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2563. #if GH_USB_ENABLE_DEBUG_PRINT
  2564. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP3Rx] <-- 0x%08x\n",
  2565. REG_USB_INTRRXE,d.all,d.all);
  2566. #endif
  2567. }
  2568. GH_INLINE U8 GH_USB_get_IntrRxE_EP3Rx(void)
  2569. {
  2570. GH_USB_INTRRXE_S tmp_value;
  2571. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2572. tmp_value.all = value;
  2573. #if GH_USB_ENABLE_DEBUG_PRINT
  2574. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP3Rx] --> 0x%08x\n",
  2575. REG_USB_INTRRXE,value);
  2576. #endif
  2577. return tmp_value.bitc.ep3rx;
  2578. }
  2579. GH_INLINE void GH_USB_set_IntrRxE_EP4Rx(U8 data)
  2580. {
  2581. GH_USB_INTRRXE_S d;
  2582. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2583. d.bitc.ep4rx = data;
  2584. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2585. #if GH_USB_ENABLE_DEBUG_PRINT
  2586. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP4Rx] <-- 0x%08x\n",
  2587. REG_USB_INTRRXE,d.all,d.all);
  2588. #endif
  2589. }
  2590. GH_INLINE U8 GH_USB_get_IntrRxE_EP4Rx(void)
  2591. {
  2592. GH_USB_INTRRXE_S tmp_value;
  2593. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2594. tmp_value.all = value;
  2595. #if GH_USB_ENABLE_DEBUG_PRINT
  2596. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP4Rx] --> 0x%08x\n",
  2597. REG_USB_INTRRXE,value);
  2598. #endif
  2599. return tmp_value.bitc.ep4rx;
  2600. }
  2601. GH_INLINE void GH_USB_set_IntrRxE_EP5Rx(U8 data)
  2602. {
  2603. GH_USB_INTRRXE_S d;
  2604. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2605. d.bitc.ep5rx = data;
  2606. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2607. #if GH_USB_ENABLE_DEBUG_PRINT
  2608. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP5Rx] <-- 0x%08x\n",
  2609. REG_USB_INTRRXE,d.all,d.all);
  2610. #endif
  2611. }
  2612. GH_INLINE U8 GH_USB_get_IntrRxE_EP5Rx(void)
  2613. {
  2614. GH_USB_INTRRXE_S tmp_value;
  2615. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2616. tmp_value.all = value;
  2617. #if GH_USB_ENABLE_DEBUG_PRINT
  2618. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP5Rx] --> 0x%08x\n",
  2619. REG_USB_INTRRXE,value);
  2620. #endif
  2621. return tmp_value.bitc.ep5rx;
  2622. }
  2623. GH_INLINE void GH_USB_set_IntrRxE_EP6Rx(U8 data)
  2624. {
  2625. GH_USB_INTRRXE_S d;
  2626. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2627. d.bitc.ep6rx = data;
  2628. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2629. #if GH_USB_ENABLE_DEBUG_PRINT
  2630. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP6Rx] <-- 0x%08x\n",
  2631. REG_USB_INTRRXE,d.all,d.all);
  2632. #endif
  2633. }
  2634. GH_INLINE U8 GH_USB_get_IntrRxE_EP6Rx(void)
  2635. {
  2636. GH_USB_INTRRXE_S tmp_value;
  2637. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2638. tmp_value.all = value;
  2639. #if GH_USB_ENABLE_DEBUG_PRINT
  2640. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP6Rx] --> 0x%08x\n",
  2641. REG_USB_INTRRXE,value);
  2642. #endif
  2643. return tmp_value.bitc.ep6rx;
  2644. }
  2645. GH_INLINE void GH_USB_set_IntrRxE_EP7Rx(U8 data)
  2646. {
  2647. GH_USB_INTRRXE_S d;
  2648. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2649. d.bitc.ep7rx = data;
  2650. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2651. #if GH_USB_ENABLE_DEBUG_PRINT
  2652. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP7Rx] <-- 0x%08x\n",
  2653. REG_USB_INTRRXE,d.all,d.all);
  2654. #endif
  2655. }
  2656. GH_INLINE U8 GH_USB_get_IntrRxE_EP7Rx(void)
  2657. {
  2658. GH_USB_INTRRXE_S tmp_value;
  2659. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2660. tmp_value.all = value;
  2661. #if GH_USB_ENABLE_DEBUG_PRINT
  2662. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP7Rx] --> 0x%08x\n",
  2663. REG_USB_INTRRXE,value);
  2664. #endif
  2665. return tmp_value.bitc.ep7rx;
  2666. }
  2667. GH_INLINE void GH_USB_set_IntrRxE_EP8Rx(U8 data)
  2668. {
  2669. GH_USB_INTRRXE_S d;
  2670. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2671. d.bitc.ep8rx = data;
  2672. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2673. #if GH_USB_ENABLE_DEBUG_PRINT
  2674. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP8Rx] <-- 0x%08x\n",
  2675. REG_USB_INTRRXE,d.all,d.all);
  2676. #endif
  2677. }
  2678. GH_INLINE U8 GH_USB_get_IntrRxE_EP8Rx(void)
  2679. {
  2680. GH_USB_INTRRXE_S tmp_value;
  2681. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2682. tmp_value.all = value;
  2683. #if GH_USB_ENABLE_DEBUG_PRINT
  2684. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP8Rx] --> 0x%08x\n",
  2685. REG_USB_INTRRXE,value);
  2686. #endif
  2687. return tmp_value.bitc.ep8rx;
  2688. }
  2689. GH_INLINE void GH_USB_set_IntrRxE_EP9Rx(U8 data)
  2690. {
  2691. GH_USB_INTRRXE_S d;
  2692. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2693. d.bitc.ep9rx = data;
  2694. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2695. #if GH_USB_ENABLE_DEBUG_PRINT
  2696. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP9Rx] <-- 0x%08x\n",
  2697. REG_USB_INTRRXE,d.all,d.all);
  2698. #endif
  2699. }
  2700. GH_INLINE U8 GH_USB_get_IntrRxE_EP9Rx(void)
  2701. {
  2702. GH_USB_INTRRXE_S tmp_value;
  2703. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2704. tmp_value.all = value;
  2705. #if GH_USB_ENABLE_DEBUG_PRINT
  2706. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP9Rx] --> 0x%08x\n",
  2707. REG_USB_INTRRXE,value);
  2708. #endif
  2709. return tmp_value.bitc.ep9rx;
  2710. }
  2711. GH_INLINE void GH_USB_set_IntrRxE_EP10Rx(U8 data)
  2712. {
  2713. GH_USB_INTRRXE_S d;
  2714. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2715. d.bitc.ep10rx = data;
  2716. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2717. #if GH_USB_ENABLE_DEBUG_PRINT
  2718. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP10Rx] <-- 0x%08x\n",
  2719. REG_USB_INTRRXE,d.all,d.all);
  2720. #endif
  2721. }
  2722. GH_INLINE U8 GH_USB_get_IntrRxE_EP10Rx(void)
  2723. {
  2724. GH_USB_INTRRXE_S tmp_value;
  2725. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2726. tmp_value.all = value;
  2727. #if GH_USB_ENABLE_DEBUG_PRINT
  2728. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP10Rx] --> 0x%08x\n",
  2729. REG_USB_INTRRXE,value);
  2730. #endif
  2731. return tmp_value.bitc.ep10rx;
  2732. }
  2733. GH_INLINE void GH_USB_set_IntrRxE_EP11Rx(U8 data)
  2734. {
  2735. GH_USB_INTRRXE_S d;
  2736. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2737. d.bitc.ep11rx = data;
  2738. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2739. #if GH_USB_ENABLE_DEBUG_PRINT
  2740. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP11Rx] <-- 0x%08x\n",
  2741. REG_USB_INTRRXE,d.all,d.all);
  2742. #endif
  2743. }
  2744. GH_INLINE U8 GH_USB_get_IntrRxE_EP11Rx(void)
  2745. {
  2746. GH_USB_INTRRXE_S tmp_value;
  2747. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2748. tmp_value.all = value;
  2749. #if GH_USB_ENABLE_DEBUG_PRINT
  2750. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP11Rx] --> 0x%08x\n",
  2751. REG_USB_INTRRXE,value);
  2752. #endif
  2753. return tmp_value.bitc.ep11rx;
  2754. }
  2755. GH_INLINE void GH_USB_set_IntrRxE_EP12Rx(U8 data)
  2756. {
  2757. GH_USB_INTRRXE_S d;
  2758. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2759. d.bitc.ep12rx = data;
  2760. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2761. #if GH_USB_ENABLE_DEBUG_PRINT
  2762. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP12Rx] <-- 0x%08x\n",
  2763. REG_USB_INTRRXE,d.all,d.all);
  2764. #endif
  2765. }
  2766. GH_INLINE U8 GH_USB_get_IntrRxE_EP12Rx(void)
  2767. {
  2768. GH_USB_INTRRXE_S tmp_value;
  2769. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2770. tmp_value.all = value;
  2771. #if GH_USB_ENABLE_DEBUG_PRINT
  2772. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP12Rx] --> 0x%08x\n",
  2773. REG_USB_INTRRXE,value);
  2774. #endif
  2775. return tmp_value.bitc.ep12rx;
  2776. }
  2777. GH_INLINE void GH_USB_set_IntrRxE_EP13Rx(U8 data)
  2778. {
  2779. GH_USB_INTRRXE_S d;
  2780. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2781. d.bitc.ep13rx = data;
  2782. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2783. #if GH_USB_ENABLE_DEBUG_PRINT
  2784. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP13Rx] <-- 0x%08x\n",
  2785. REG_USB_INTRRXE,d.all,d.all);
  2786. #endif
  2787. }
  2788. GH_INLINE U8 GH_USB_get_IntrRxE_EP13Rx(void)
  2789. {
  2790. GH_USB_INTRRXE_S tmp_value;
  2791. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2792. tmp_value.all = value;
  2793. #if GH_USB_ENABLE_DEBUG_PRINT
  2794. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP13Rx] --> 0x%08x\n",
  2795. REG_USB_INTRRXE,value);
  2796. #endif
  2797. return tmp_value.bitc.ep13rx;
  2798. }
  2799. GH_INLINE void GH_USB_set_IntrRxE_EP14Rx(U8 data)
  2800. {
  2801. GH_USB_INTRRXE_S d;
  2802. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2803. d.bitc.ep14rx = data;
  2804. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2805. #if GH_USB_ENABLE_DEBUG_PRINT
  2806. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP14Rx] <-- 0x%08x\n",
  2807. REG_USB_INTRRXE,d.all,d.all);
  2808. #endif
  2809. }
  2810. GH_INLINE U8 GH_USB_get_IntrRxE_EP14Rx(void)
  2811. {
  2812. GH_USB_INTRRXE_S tmp_value;
  2813. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2814. tmp_value.all = value;
  2815. #if GH_USB_ENABLE_DEBUG_PRINT
  2816. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP14Rx] --> 0x%08x\n",
  2817. REG_USB_INTRRXE,value);
  2818. #endif
  2819. return tmp_value.bitc.ep14rx;
  2820. }
  2821. GH_INLINE void GH_USB_set_IntrRxE_EP15Rx(U8 data)
  2822. {
  2823. GH_USB_INTRRXE_S d;
  2824. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  2825. d.bitc.ep15rx = data;
  2826. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  2827. #if GH_USB_ENABLE_DEBUG_PRINT
  2828. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP15Rx] <-- 0x%08x\n",
  2829. REG_USB_INTRRXE,d.all,d.all);
  2830. #endif
  2831. }
  2832. GH_INLINE U8 GH_USB_get_IntrRxE_EP15Rx(void)
  2833. {
  2834. GH_USB_INTRRXE_S tmp_value;
  2835. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  2836. tmp_value.all = value;
  2837. #if GH_USB_ENABLE_DEBUG_PRINT
  2838. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP15Rx] --> 0x%08x\n",
  2839. REG_USB_INTRRXE,value);
  2840. #endif
  2841. return tmp_value.bitc.ep15rx;
  2842. }
  2843. #endif /* GH_INLINE_LEVEL == 0 */
  2844. /*----------------------------------------------------------------------------*/
  2845. /* register USB_IntrUSB (read) */
  2846. /*----------------------------------------------------------------------------*/
  2847. #if GH_INLINE_LEVEL == 0
  2848. /*! \brief Reads the register 'USB_IntrUSB'. */
  2849. U8 GH_USB_get_IntrUSB(void);
  2850. /*! \brief Reads the bit group 'Suspend' of register 'USB_IntrUSB'. */
  2851. U8 GH_USB_get_IntrUSB_Suspend(void);
  2852. /*! \brief Reads the bit group 'Resume' of register 'USB_IntrUSB'. */
  2853. U8 GH_USB_get_IntrUSB_Resume(void);
  2854. /*! \brief Reads the bit group 'Reset_Babble' of register 'USB_IntrUSB'. */
  2855. U8 GH_USB_get_IntrUSB_Reset_Babble(void);
  2856. /*! \brief Reads the bit group 'SOF' of register 'USB_IntrUSB'. */
  2857. U8 GH_USB_get_IntrUSB_SOF(void);
  2858. /*! \brief Reads the bit group 'Conn' of register 'USB_IntrUSB'. */
  2859. U8 GH_USB_get_IntrUSB_Conn(void);
  2860. /*! \brief Reads the bit group 'Discon' of register 'USB_IntrUSB'. */
  2861. U8 GH_USB_get_IntrUSB_Discon(void);
  2862. /*! \brief Reads the bit group 'Sess_Req' of register 'USB_IntrUSB'. */
  2863. U8 GH_USB_get_IntrUSB_Sess_Req(void);
  2864. /*! \brief Reads the bit group 'VBus_Error' of register 'USB_IntrUSB'. */
  2865. U8 GH_USB_get_IntrUSB_VBus_Error(void);
  2866. #else /* GH_INLINE_LEVEL == 0 */
  2867. GH_INLINE U8 GH_USB_get_IntrUSB(void)
  2868. {
  2869. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2870. #if GH_USB_ENABLE_DEBUG_PRINT
  2871. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB] --> 0x%08x\n",
  2872. REG_USB_INTRUSB,value);
  2873. #endif
  2874. return value;
  2875. }
  2876. GH_INLINE U8 GH_USB_get_IntrUSB_Suspend(void)
  2877. {
  2878. GH_USB_INTRUSB_S tmp_value;
  2879. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2880. tmp_value.all = value;
  2881. #if GH_USB_ENABLE_DEBUG_PRINT
  2882. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Suspend] --> 0x%08x\n",
  2883. REG_USB_INTRUSB,value);
  2884. #endif
  2885. return tmp_value.bitc.suspend;
  2886. }
  2887. GH_INLINE U8 GH_USB_get_IntrUSB_Resume(void)
  2888. {
  2889. GH_USB_INTRUSB_S tmp_value;
  2890. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2891. tmp_value.all = value;
  2892. #if GH_USB_ENABLE_DEBUG_PRINT
  2893. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Resume] --> 0x%08x\n",
  2894. REG_USB_INTRUSB,value);
  2895. #endif
  2896. return tmp_value.bitc.resume;
  2897. }
  2898. GH_INLINE U8 GH_USB_get_IntrUSB_Reset_Babble(void)
  2899. {
  2900. GH_USB_INTRUSB_S tmp_value;
  2901. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2902. tmp_value.all = value;
  2903. #if GH_USB_ENABLE_DEBUG_PRINT
  2904. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Reset_Babble] --> 0x%08x\n",
  2905. REG_USB_INTRUSB,value);
  2906. #endif
  2907. return tmp_value.bitc.reset_babble;
  2908. }
  2909. GH_INLINE U8 GH_USB_get_IntrUSB_SOF(void)
  2910. {
  2911. GH_USB_INTRUSB_S tmp_value;
  2912. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2913. tmp_value.all = value;
  2914. #if GH_USB_ENABLE_DEBUG_PRINT
  2915. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_SOF] --> 0x%08x\n",
  2916. REG_USB_INTRUSB,value);
  2917. #endif
  2918. return tmp_value.bitc.sof;
  2919. }
  2920. GH_INLINE U8 GH_USB_get_IntrUSB_Conn(void)
  2921. {
  2922. GH_USB_INTRUSB_S tmp_value;
  2923. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2924. tmp_value.all = value;
  2925. #if GH_USB_ENABLE_DEBUG_PRINT
  2926. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Conn] --> 0x%08x\n",
  2927. REG_USB_INTRUSB,value);
  2928. #endif
  2929. return tmp_value.bitc.conn;
  2930. }
  2931. GH_INLINE U8 GH_USB_get_IntrUSB_Discon(void)
  2932. {
  2933. GH_USB_INTRUSB_S tmp_value;
  2934. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2935. tmp_value.all = value;
  2936. #if GH_USB_ENABLE_DEBUG_PRINT
  2937. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Discon] --> 0x%08x\n",
  2938. REG_USB_INTRUSB,value);
  2939. #endif
  2940. return tmp_value.bitc.discon;
  2941. }
  2942. GH_INLINE U8 GH_USB_get_IntrUSB_Sess_Req(void)
  2943. {
  2944. GH_USB_INTRUSB_S tmp_value;
  2945. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2946. tmp_value.all = value;
  2947. #if GH_USB_ENABLE_DEBUG_PRINT
  2948. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Sess_Req] --> 0x%08x\n",
  2949. REG_USB_INTRUSB,value);
  2950. #endif
  2951. return tmp_value.bitc.sess_req;
  2952. }
  2953. GH_INLINE U8 GH_USB_get_IntrUSB_VBus_Error(void)
  2954. {
  2955. GH_USB_INTRUSB_S tmp_value;
  2956. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  2957. tmp_value.all = value;
  2958. #if GH_USB_ENABLE_DEBUG_PRINT
  2959. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_VBus_Error] --> 0x%08x\n",
  2960. REG_USB_INTRUSB,value);
  2961. #endif
  2962. return tmp_value.bitc.vbus_error;
  2963. }
  2964. #endif /* GH_INLINE_LEVEL == 0 */
  2965. /*----------------------------------------------------------------------------*/
  2966. /* register USB_IntrUSBE (read/write) */
  2967. /*----------------------------------------------------------------------------*/
  2968. #if GH_INLINE_LEVEL == 0
  2969. /*! \brief Writes the register 'USB_IntrUSBE'. */
  2970. void GH_USB_set_IntrUSBE(U8 data);
  2971. /*! \brief Reads the register 'USB_IntrUSBE'. */
  2972. U8 GH_USB_get_IntrUSBE(void);
  2973. /*! \brief Writes the bit group 'Suspend' of register 'USB_IntrUSBE'. */
  2974. void GH_USB_set_IntrUSBE_Suspend(U8 data);
  2975. /*! \brief Reads the bit group 'Suspend' of register 'USB_IntrUSBE'. */
  2976. U8 GH_USB_get_IntrUSBE_Suspend(void);
  2977. /*! \brief Writes the bit group 'Resume' of register 'USB_IntrUSBE'. */
  2978. void GH_USB_set_IntrUSBE_Resume(U8 data);
  2979. /*! \brief Reads the bit group 'Resume' of register 'USB_IntrUSBE'. */
  2980. U8 GH_USB_get_IntrUSBE_Resume(void);
  2981. /*! \brief Writes the bit group 'Reset_Babble' of register 'USB_IntrUSBE'. */
  2982. void GH_USB_set_IntrUSBE_Reset_Babble(U8 data);
  2983. /*! \brief Reads the bit group 'Reset_Babble' of register 'USB_IntrUSBE'. */
  2984. U8 GH_USB_get_IntrUSBE_Reset_Babble(void);
  2985. /*! \brief Writes the bit group 'SOF' of register 'USB_IntrUSBE'. */
  2986. void GH_USB_set_IntrUSBE_SOF(U8 data);
  2987. /*! \brief Reads the bit group 'SOF' of register 'USB_IntrUSBE'. */
  2988. U8 GH_USB_get_IntrUSBE_SOF(void);
  2989. /*! \brief Writes the bit group 'Conn' of register 'USB_IntrUSBE'. */
  2990. void GH_USB_set_IntrUSBE_Conn(U8 data);
  2991. /*! \brief Reads the bit group 'Conn' of register 'USB_IntrUSBE'. */
  2992. U8 GH_USB_get_IntrUSBE_Conn(void);
  2993. /*! \brief Writes the bit group 'Discon' of register 'USB_IntrUSBE'. */
  2994. void GH_USB_set_IntrUSBE_Discon(U8 data);
  2995. /*! \brief Reads the bit group 'Discon' of register 'USB_IntrUSBE'. */
  2996. U8 GH_USB_get_IntrUSBE_Discon(void);
  2997. /*! \brief Writes the bit group 'Sess_Req' of register 'USB_IntrUSBE'. */
  2998. void GH_USB_set_IntrUSBE_Sess_Req(U8 data);
  2999. /*! \brief Reads the bit group 'Sess_Req' of register 'USB_IntrUSBE'. */
  3000. U8 GH_USB_get_IntrUSBE_Sess_Req(void);
  3001. /*! \brief Writes the bit group 'VBus_Error' of register 'USB_IntrUSBE'. */
  3002. void GH_USB_set_IntrUSBE_VBus_Error(U8 data);
  3003. /*! \brief Reads the bit group 'VBus_Error' of register 'USB_IntrUSBE'. */
  3004. U8 GH_USB_get_IntrUSBE_VBus_Error(void);
  3005. #else /* GH_INLINE_LEVEL == 0 */
  3006. GH_INLINE void GH_USB_set_IntrUSBE(U8 data)
  3007. {
  3008. *(volatile U8 *)REG_USB_INTRUSBE = data;
  3009. #if GH_USB_ENABLE_DEBUG_PRINT
  3010. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE] <-- 0x%08x\n",
  3011. REG_USB_INTRUSBE,data,data);
  3012. #endif
  3013. }
  3014. GH_INLINE U8 GH_USB_get_IntrUSBE(void)
  3015. {
  3016. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3017. #if GH_USB_ENABLE_DEBUG_PRINT
  3018. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE] --> 0x%08x\n",
  3019. REG_USB_INTRUSBE,value);
  3020. #endif
  3021. return value;
  3022. }
  3023. GH_INLINE void GH_USB_set_IntrUSBE_Suspend(U8 data)
  3024. {
  3025. GH_USB_INTRUSBE_S d;
  3026. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3027. d.bitc.suspend = data;
  3028. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3029. #if GH_USB_ENABLE_DEBUG_PRINT
  3030. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Suspend] <-- 0x%08x\n",
  3031. REG_USB_INTRUSBE,d.all,d.all);
  3032. #endif
  3033. }
  3034. GH_INLINE U8 GH_USB_get_IntrUSBE_Suspend(void)
  3035. {
  3036. GH_USB_INTRUSBE_S tmp_value;
  3037. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3038. tmp_value.all = value;
  3039. #if GH_USB_ENABLE_DEBUG_PRINT
  3040. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Suspend] --> 0x%08x\n",
  3041. REG_USB_INTRUSBE,value);
  3042. #endif
  3043. return tmp_value.bitc.suspend;
  3044. }
  3045. GH_INLINE void GH_USB_set_IntrUSBE_Resume(U8 data)
  3046. {
  3047. GH_USB_INTRUSBE_S d;
  3048. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3049. d.bitc.resume = data;
  3050. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3051. #if GH_USB_ENABLE_DEBUG_PRINT
  3052. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Resume] <-- 0x%08x\n",
  3053. REG_USB_INTRUSBE,d.all,d.all);
  3054. #endif
  3055. }
  3056. GH_INLINE U8 GH_USB_get_IntrUSBE_Resume(void)
  3057. {
  3058. GH_USB_INTRUSBE_S tmp_value;
  3059. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3060. tmp_value.all = value;
  3061. #if GH_USB_ENABLE_DEBUG_PRINT
  3062. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Resume] --> 0x%08x\n",
  3063. REG_USB_INTRUSBE,value);
  3064. #endif
  3065. return tmp_value.bitc.resume;
  3066. }
  3067. GH_INLINE void GH_USB_set_IntrUSBE_Reset_Babble(U8 data)
  3068. {
  3069. GH_USB_INTRUSBE_S d;
  3070. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3071. d.bitc.reset_babble = data;
  3072. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3073. #if GH_USB_ENABLE_DEBUG_PRINT
  3074. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Reset_Babble] <-- 0x%08x\n",
  3075. REG_USB_INTRUSBE,d.all,d.all);
  3076. #endif
  3077. }
  3078. GH_INLINE U8 GH_USB_get_IntrUSBE_Reset_Babble(void)
  3079. {
  3080. GH_USB_INTRUSBE_S tmp_value;
  3081. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3082. tmp_value.all = value;
  3083. #if GH_USB_ENABLE_DEBUG_PRINT
  3084. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Reset_Babble] --> 0x%08x\n",
  3085. REG_USB_INTRUSBE,value);
  3086. #endif
  3087. return tmp_value.bitc.reset_babble;
  3088. }
  3089. GH_INLINE void GH_USB_set_IntrUSBE_SOF(U8 data)
  3090. {
  3091. GH_USB_INTRUSBE_S d;
  3092. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3093. d.bitc.sof = data;
  3094. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3095. #if GH_USB_ENABLE_DEBUG_PRINT
  3096. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_SOF] <-- 0x%08x\n",
  3097. REG_USB_INTRUSBE,d.all,d.all);
  3098. #endif
  3099. }
  3100. GH_INLINE U8 GH_USB_get_IntrUSBE_SOF(void)
  3101. {
  3102. GH_USB_INTRUSBE_S tmp_value;
  3103. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3104. tmp_value.all = value;
  3105. #if GH_USB_ENABLE_DEBUG_PRINT
  3106. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_SOF] --> 0x%08x\n",
  3107. REG_USB_INTRUSBE,value);
  3108. #endif
  3109. return tmp_value.bitc.sof;
  3110. }
  3111. GH_INLINE void GH_USB_set_IntrUSBE_Conn(U8 data)
  3112. {
  3113. GH_USB_INTRUSBE_S d;
  3114. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3115. d.bitc.conn = data;
  3116. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3117. #if GH_USB_ENABLE_DEBUG_PRINT
  3118. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Conn] <-- 0x%08x\n",
  3119. REG_USB_INTRUSBE,d.all,d.all);
  3120. #endif
  3121. }
  3122. GH_INLINE U8 GH_USB_get_IntrUSBE_Conn(void)
  3123. {
  3124. GH_USB_INTRUSBE_S tmp_value;
  3125. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3126. tmp_value.all = value;
  3127. #if GH_USB_ENABLE_DEBUG_PRINT
  3128. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Conn] --> 0x%08x\n",
  3129. REG_USB_INTRUSBE,value);
  3130. #endif
  3131. return tmp_value.bitc.conn;
  3132. }
  3133. GH_INLINE void GH_USB_set_IntrUSBE_Discon(U8 data)
  3134. {
  3135. GH_USB_INTRUSBE_S d;
  3136. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3137. d.bitc.discon = data;
  3138. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3139. #if GH_USB_ENABLE_DEBUG_PRINT
  3140. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Discon] <-- 0x%08x\n",
  3141. REG_USB_INTRUSBE,d.all,d.all);
  3142. #endif
  3143. }
  3144. GH_INLINE U8 GH_USB_get_IntrUSBE_Discon(void)
  3145. {
  3146. GH_USB_INTRUSBE_S tmp_value;
  3147. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3148. tmp_value.all = value;
  3149. #if GH_USB_ENABLE_DEBUG_PRINT
  3150. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Discon] --> 0x%08x\n",
  3151. REG_USB_INTRUSBE,value);
  3152. #endif
  3153. return tmp_value.bitc.discon;
  3154. }
  3155. GH_INLINE void GH_USB_set_IntrUSBE_Sess_Req(U8 data)
  3156. {
  3157. GH_USB_INTRUSBE_S d;
  3158. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3159. d.bitc.sess_req = data;
  3160. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3161. #if GH_USB_ENABLE_DEBUG_PRINT
  3162. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Sess_Req] <-- 0x%08x\n",
  3163. REG_USB_INTRUSBE,d.all,d.all);
  3164. #endif
  3165. }
  3166. GH_INLINE U8 GH_USB_get_IntrUSBE_Sess_Req(void)
  3167. {
  3168. GH_USB_INTRUSBE_S tmp_value;
  3169. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3170. tmp_value.all = value;
  3171. #if GH_USB_ENABLE_DEBUG_PRINT
  3172. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Sess_Req] --> 0x%08x\n",
  3173. REG_USB_INTRUSBE,value);
  3174. #endif
  3175. return tmp_value.bitc.sess_req;
  3176. }
  3177. GH_INLINE void GH_USB_set_IntrUSBE_VBus_Error(U8 data)
  3178. {
  3179. GH_USB_INTRUSBE_S d;
  3180. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  3181. d.bitc.vbus_error = data;
  3182. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  3183. #if GH_USB_ENABLE_DEBUG_PRINT
  3184. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_VBus_Error] <-- 0x%08x\n",
  3185. REG_USB_INTRUSBE,d.all,d.all);
  3186. #endif
  3187. }
  3188. GH_INLINE U8 GH_USB_get_IntrUSBE_VBus_Error(void)
  3189. {
  3190. GH_USB_INTRUSBE_S tmp_value;
  3191. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  3192. tmp_value.all = value;
  3193. #if GH_USB_ENABLE_DEBUG_PRINT
  3194. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_VBus_Error] --> 0x%08x\n",
  3195. REG_USB_INTRUSBE,value);
  3196. #endif
  3197. return tmp_value.bitc.vbus_error;
  3198. }
  3199. #endif /* GH_INLINE_LEVEL == 0 */
  3200. /*----------------------------------------------------------------------------*/
  3201. /* register USB_Frame (read) */
  3202. /*----------------------------------------------------------------------------*/
  3203. #if GH_INLINE_LEVEL == 0
  3204. /*! \brief Reads the register 'USB_Frame'. */
  3205. U16 GH_USB_get_Frame(void);
  3206. /*! \brief Reads the bit group 'Number' of register 'USB_Frame'. */
  3207. U16 GH_USB_get_Frame_Number(void);
  3208. #else /* GH_INLINE_LEVEL == 0 */
  3209. GH_INLINE U16 GH_USB_get_Frame(void)
  3210. {
  3211. U16 value = (*(volatile U16 *)REG_USB_FRAME);
  3212. #if GH_USB_ENABLE_DEBUG_PRINT
  3213. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Frame] --> 0x%08x\n",
  3214. REG_USB_FRAME,value);
  3215. #endif
  3216. return value;
  3217. }
  3218. GH_INLINE U16 GH_USB_get_Frame_Number(void)
  3219. {
  3220. GH_USB_FRAME_S tmp_value;
  3221. U16 value = (*(volatile U16 *)REG_USB_FRAME);
  3222. tmp_value.all = value;
  3223. #if GH_USB_ENABLE_DEBUG_PRINT
  3224. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Frame_Number] --> 0x%08x\n",
  3225. REG_USB_FRAME,value);
  3226. #endif
  3227. return tmp_value.bitc.number;
  3228. }
  3229. #endif /* GH_INLINE_LEVEL == 0 */
  3230. /*----------------------------------------------------------------------------*/
  3231. /* register USB_Index (read/write) */
  3232. /*----------------------------------------------------------------------------*/
  3233. #if GH_INLINE_LEVEL == 0
  3234. /*! \brief Writes the register 'USB_Index'. */
  3235. void GH_USB_set_Index(U8 data);
  3236. /*! \brief Reads the register 'USB_Index'. */
  3237. U8 GH_USB_get_Index(void);
  3238. /*! \brief Writes the bit group 'SelectedEndpoint' of register 'USB_Index'. */
  3239. void GH_USB_set_Index_SelectedEndpoint(U8 data);
  3240. /*! \brief Reads the bit group 'SelectedEndpoint' of register 'USB_Index'. */
  3241. U8 GH_USB_get_Index_SelectedEndpoint(void);
  3242. #else /* GH_INLINE_LEVEL == 0 */
  3243. GH_INLINE void GH_USB_set_Index(U8 data)
  3244. {
  3245. *(volatile U8 *)REG_USB_INDEX = data;
  3246. #if GH_USB_ENABLE_DEBUG_PRINT
  3247. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Index] <-- 0x%08x\n",
  3248. REG_USB_INDEX,data,data);
  3249. #endif
  3250. }
  3251. GH_INLINE U8 GH_USB_get_Index(void)
  3252. {
  3253. U8 value = (*(volatile U8 *)REG_USB_INDEX);
  3254. #if GH_USB_ENABLE_DEBUG_PRINT
  3255. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Index] --> 0x%08x\n",
  3256. REG_USB_INDEX,value);
  3257. #endif
  3258. return value;
  3259. }
  3260. GH_INLINE void GH_USB_set_Index_SelectedEndpoint(U8 data)
  3261. {
  3262. GH_USB_INDEX_S d;
  3263. d.all = *(volatile U8 *)REG_USB_INDEX;
  3264. d.bitc.selectedendpoint = data;
  3265. *(volatile U8 *)REG_USB_INDEX = d.all;
  3266. #if GH_USB_ENABLE_DEBUG_PRINT
  3267. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Index_SelectedEndpoint] <-- 0x%08x\n",
  3268. REG_USB_INDEX,d.all,d.all);
  3269. #endif
  3270. }
  3271. GH_INLINE U8 GH_USB_get_Index_SelectedEndpoint(void)
  3272. {
  3273. GH_USB_INDEX_S tmp_value;
  3274. U8 value = (*(volatile U8 *)REG_USB_INDEX);
  3275. tmp_value.all = value;
  3276. #if GH_USB_ENABLE_DEBUG_PRINT
  3277. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Index_SelectedEndpoint] --> 0x%08x\n",
  3278. REG_USB_INDEX,value);
  3279. #endif
  3280. return tmp_value.bitc.selectedendpoint;
  3281. }
  3282. #endif /* GH_INLINE_LEVEL == 0 */
  3283. /*----------------------------------------------------------------------------*/
  3284. /* register USB_Testmode (read/write) */
  3285. /*----------------------------------------------------------------------------*/
  3286. #if GH_INLINE_LEVEL == 0
  3287. /*! \brief Writes the register 'USB_Testmode'. */
  3288. void GH_USB_set_Testmode(U8 data);
  3289. /*! \brief Reads the register 'USB_Testmode'. */
  3290. U8 GH_USB_get_Testmode(void);
  3291. /*! \brief Writes the bit group 'Test_SE0_NAK' of register 'USB_Testmode'. */
  3292. void GH_USB_set_Testmode_Test_SE0_NAK(U8 data);
  3293. /*! \brief Reads the bit group 'Test_SE0_NAK' of register 'USB_Testmode'. */
  3294. U8 GH_USB_get_Testmode_Test_SE0_NAK(void);
  3295. /*! \brief Writes the bit group 'Test_J' of register 'USB_Testmode'. */
  3296. void GH_USB_set_Testmode_Test_J(U8 data);
  3297. /*! \brief Reads the bit group 'Test_J' of register 'USB_Testmode'. */
  3298. U8 GH_USB_get_Testmode_Test_J(void);
  3299. /*! \brief Writes the bit group 'Test_K' of register 'USB_Testmode'. */
  3300. void GH_USB_set_Testmode_Test_K(U8 data);
  3301. /*! \brief Reads the bit group 'Test_K' of register 'USB_Testmode'. */
  3302. U8 GH_USB_get_Testmode_Test_K(void);
  3303. /*! \brief Writes the bit group 'Test_Packet' of register 'USB_Testmode'. */
  3304. void GH_USB_set_Testmode_Test_Packet(U8 data);
  3305. /*! \brief Reads the bit group 'Test_Packet' of register 'USB_Testmode'. */
  3306. U8 GH_USB_get_Testmode_Test_Packet(void);
  3307. /*! \brief Writes the bit group 'Force_HS' of register 'USB_Testmode'. */
  3308. void GH_USB_set_Testmode_Force_HS(U8 data);
  3309. /*! \brief Reads the bit group 'Force_HS' of register 'USB_Testmode'. */
  3310. U8 GH_USB_get_Testmode_Force_HS(void);
  3311. /*! \brief Writes the bit group 'Force_FS' of register 'USB_Testmode'. */
  3312. void GH_USB_set_Testmode_Force_FS(U8 data);
  3313. /*! \brief Reads the bit group 'Force_FS' of register 'USB_Testmode'. */
  3314. U8 GH_USB_get_Testmode_Force_FS(void);
  3315. /*! \brief Writes the bit group 'FIFO_Access' of register 'USB_Testmode'. */
  3316. void GH_USB_set_Testmode_FIFO_Access(U8 data);
  3317. /*! \brief Reads the bit group 'FIFO_Access' of register 'USB_Testmode'. */
  3318. U8 GH_USB_get_Testmode_FIFO_Access(void);
  3319. /*! \brief Writes the bit group 'Force_Host' of register 'USB_Testmode'. */
  3320. void GH_USB_set_Testmode_Force_Host(U8 data);
  3321. /*! \brief Reads the bit group 'Force_Host' of register 'USB_Testmode'. */
  3322. U8 GH_USB_get_Testmode_Force_Host(void);
  3323. #else /* GH_INLINE_LEVEL == 0 */
  3324. GH_INLINE void GH_USB_set_Testmode(U8 data)
  3325. {
  3326. *(volatile U8 *)REG_USB_TESTMODE = data;
  3327. #if GH_USB_ENABLE_DEBUG_PRINT
  3328. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode] <-- 0x%08x\n",
  3329. REG_USB_TESTMODE,data,data);
  3330. #endif
  3331. }
  3332. GH_INLINE U8 GH_USB_get_Testmode(void)
  3333. {
  3334. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3335. #if GH_USB_ENABLE_DEBUG_PRINT
  3336. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode] --> 0x%08x\n",
  3337. REG_USB_TESTMODE,value);
  3338. #endif
  3339. return value;
  3340. }
  3341. GH_INLINE void GH_USB_set_Testmode_Test_SE0_NAK(U8 data)
  3342. {
  3343. GH_USB_TESTMODE_S d;
  3344. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3345. d.bitc.test_se0_nak = data;
  3346. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3347. #if GH_USB_ENABLE_DEBUG_PRINT
  3348. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_SE0_NAK] <-- 0x%08x\n",
  3349. REG_USB_TESTMODE,d.all,d.all);
  3350. #endif
  3351. }
  3352. GH_INLINE U8 GH_USB_get_Testmode_Test_SE0_NAK(void)
  3353. {
  3354. GH_USB_TESTMODE_S tmp_value;
  3355. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3356. tmp_value.all = value;
  3357. #if GH_USB_ENABLE_DEBUG_PRINT
  3358. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_SE0_NAK] --> 0x%08x\n",
  3359. REG_USB_TESTMODE,value);
  3360. #endif
  3361. return tmp_value.bitc.test_se0_nak;
  3362. }
  3363. GH_INLINE void GH_USB_set_Testmode_Test_J(U8 data)
  3364. {
  3365. GH_USB_TESTMODE_S d;
  3366. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3367. d.bitc.test_j = data;
  3368. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3369. #if GH_USB_ENABLE_DEBUG_PRINT
  3370. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_J] <-- 0x%08x\n",
  3371. REG_USB_TESTMODE,d.all,d.all);
  3372. #endif
  3373. }
  3374. GH_INLINE U8 GH_USB_get_Testmode_Test_J(void)
  3375. {
  3376. GH_USB_TESTMODE_S tmp_value;
  3377. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3378. tmp_value.all = value;
  3379. #if GH_USB_ENABLE_DEBUG_PRINT
  3380. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_J] --> 0x%08x\n",
  3381. REG_USB_TESTMODE,value);
  3382. #endif
  3383. return tmp_value.bitc.test_j;
  3384. }
  3385. GH_INLINE void GH_USB_set_Testmode_Test_K(U8 data)
  3386. {
  3387. GH_USB_TESTMODE_S d;
  3388. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3389. d.bitc.test_k = data;
  3390. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3391. #if GH_USB_ENABLE_DEBUG_PRINT
  3392. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_K] <-- 0x%08x\n",
  3393. REG_USB_TESTMODE,d.all,d.all);
  3394. #endif
  3395. }
  3396. GH_INLINE U8 GH_USB_get_Testmode_Test_K(void)
  3397. {
  3398. GH_USB_TESTMODE_S tmp_value;
  3399. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3400. tmp_value.all = value;
  3401. #if GH_USB_ENABLE_DEBUG_PRINT
  3402. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_K] --> 0x%08x\n",
  3403. REG_USB_TESTMODE,value);
  3404. #endif
  3405. return tmp_value.bitc.test_k;
  3406. }
  3407. GH_INLINE void GH_USB_set_Testmode_Test_Packet(U8 data)
  3408. {
  3409. GH_USB_TESTMODE_S d;
  3410. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3411. d.bitc.test_packet = data;
  3412. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3413. #if GH_USB_ENABLE_DEBUG_PRINT
  3414. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_Packet] <-- 0x%08x\n",
  3415. REG_USB_TESTMODE,d.all,d.all);
  3416. #endif
  3417. }
  3418. GH_INLINE U8 GH_USB_get_Testmode_Test_Packet(void)
  3419. {
  3420. GH_USB_TESTMODE_S tmp_value;
  3421. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3422. tmp_value.all = value;
  3423. #if GH_USB_ENABLE_DEBUG_PRINT
  3424. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_Packet] --> 0x%08x\n",
  3425. REG_USB_TESTMODE,value);
  3426. #endif
  3427. return tmp_value.bitc.test_packet;
  3428. }
  3429. GH_INLINE void GH_USB_set_Testmode_Force_HS(U8 data)
  3430. {
  3431. GH_USB_TESTMODE_S d;
  3432. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3433. d.bitc.force_hs = data;
  3434. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3435. #if GH_USB_ENABLE_DEBUG_PRINT
  3436. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Force_HS] <-- 0x%08x\n",
  3437. REG_USB_TESTMODE,d.all,d.all);
  3438. #endif
  3439. }
  3440. GH_INLINE U8 GH_USB_get_Testmode_Force_HS(void)
  3441. {
  3442. GH_USB_TESTMODE_S tmp_value;
  3443. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3444. tmp_value.all = value;
  3445. #if GH_USB_ENABLE_DEBUG_PRINT
  3446. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Force_HS] --> 0x%08x\n",
  3447. REG_USB_TESTMODE,value);
  3448. #endif
  3449. return tmp_value.bitc.force_hs;
  3450. }
  3451. GH_INLINE void GH_USB_set_Testmode_Force_FS(U8 data)
  3452. {
  3453. GH_USB_TESTMODE_S d;
  3454. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3455. d.bitc.force_fs = data;
  3456. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3457. #if GH_USB_ENABLE_DEBUG_PRINT
  3458. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Force_FS] <-- 0x%08x\n",
  3459. REG_USB_TESTMODE,d.all,d.all);
  3460. #endif
  3461. }
  3462. GH_INLINE U8 GH_USB_get_Testmode_Force_FS(void)
  3463. {
  3464. GH_USB_TESTMODE_S tmp_value;
  3465. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3466. tmp_value.all = value;
  3467. #if GH_USB_ENABLE_DEBUG_PRINT
  3468. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Force_FS] --> 0x%08x\n",
  3469. REG_USB_TESTMODE,value);
  3470. #endif
  3471. return tmp_value.bitc.force_fs;
  3472. }
  3473. GH_INLINE void GH_USB_set_Testmode_FIFO_Access(U8 data)
  3474. {
  3475. GH_USB_TESTMODE_S d;
  3476. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3477. d.bitc.fifo_access = data;
  3478. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3479. #if GH_USB_ENABLE_DEBUG_PRINT
  3480. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_FIFO_Access] <-- 0x%08x\n",
  3481. REG_USB_TESTMODE,d.all,d.all);
  3482. #endif
  3483. }
  3484. GH_INLINE U8 GH_USB_get_Testmode_FIFO_Access(void)
  3485. {
  3486. GH_USB_TESTMODE_S tmp_value;
  3487. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3488. tmp_value.all = value;
  3489. #if GH_USB_ENABLE_DEBUG_PRINT
  3490. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_FIFO_Access] --> 0x%08x\n",
  3491. REG_USB_TESTMODE,value);
  3492. #endif
  3493. return tmp_value.bitc.fifo_access;
  3494. }
  3495. GH_INLINE void GH_USB_set_Testmode_Force_Host(U8 data)
  3496. {
  3497. GH_USB_TESTMODE_S d;
  3498. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  3499. d.bitc.force_host = data;
  3500. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  3501. #if GH_USB_ENABLE_DEBUG_PRINT
  3502. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Force_Host] <-- 0x%08x\n",
  3503. REG_USB_TESTMODE,d.all,d.all);
  3504. #endif
  3505. }
  3506. GH_INLINE U8 GH_USB_get_Testmode_Force_Host(void)
  3507. {
  3508. GH_USB_TESTMODE_S tmp_value;
  3509. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  3510. tmp_value.all = value;
  3511. #if GH_USB_ENABLE_DEBUG_PRINT
  3512. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Force_Host] --> 0x%08x\n",
  3513. REG_USB_TESTMODE,value);
  3514. #endif
  3515. return tmp_value.bitc.force_host;
  3516. }
  3517. #endif /* GH_INLINE_LEVEL == 0 */
  3518. /*----------------------------------------------------------------------------*/
  3519. /* register USB_CSR0L_R_PERI (read) */
  3520. /*----------------------------------------------------------------------------*/
  3521. #if GH_INLINE_LEVEL == 0
  3522. /*! \brief Reads the register 'USB_CSR0L_R_PERI'. */
  3523. U8 GH_USB_get_CSR0L_R_PERI(void);
  3524. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_CSR0L_R_PERI'. */
  3525. U8 GH_USB_get_CSR0L_R_PERI_RxPktRdy(void);
  3526. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_CSR0L_R_PERI'. */
  3527. U8 GH_USB_get_CSR0L_R_PERI_TxPktRdy(void);
  3528. /*! \brief Reads the bit group 'SentStall' of register 'USB_CSR0L_R_PERI'. */
  3529. U8 GH_USB_get_CSR0L_R_PERI_SentStall(void);
  3530. /*! \brief Reads the bit group 'SetupEnd' of register 'USB_CSR0L_R_PERI'. */
  3531. U8 GH_USB_get_CSR0L_R_PERI_SetupEnd(void);
  3532. #else /* GH_INLINE_LEVEL == 0 */
  3533. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI(void)
  3534. {
  3535. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  3536. #if GH_USB_ENABLE_DEBUG_PRINT
  3537. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI] --> 0x%08x\n",
  3538. REG_USB_CSR0L_R_PERI,value);
  3539. #endif
  3540. return value;
  3541. }
  3542. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_RxPktRdy(void)
  3543. {
  3544. GH_USB_CSR0L_R_PERI_S tmp_value;
  3545. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  3546. tmp_value.all = value;
  3547. #if GH_USB_ENABLE_DEBUG_PRINT
  3548. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_RxPktRdy] --> 0x%08x\n",
  3549. REG_USB_CSR0L_R_PERI,value);
  3550. #endif
  3551. return tmp_value.bitc.rxpktrdy;
  3552. }
  3553. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_TxPktRdy(void)
  3554. {
  3555. GH_USB_CSR0L_R_PERI_S tmp_value;
  3556. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  3557. tmp_value.all = value;
  3558. #if GH_USB_ENABLE_DEBUG_PRINT
  3559. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_TxPktRdy] --> 0x%08x\n",
  3560. REG_USB_CSR0L_R_PERI,value);
  3561. #endif
  3562. return tmp_value.bitc.txpktrdy;
  3563. }
  3564. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_SentStall(void)
  3565. {
  3566. GH_USB_CSR0L_R_PERI_S tmp_value;
  3567. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  3568. tmp_value.all = value;
  3569. #if GH_USB_ENABLE_DEBUG_PRINT
  3570. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_SentStall] --> 0x%08x\n",
  3571. REG_USB_CSR0L_R_PERI,value);
  3572. #endif
  3573. return tmp_value.bitc.sentstall;
  3574. }
  3575. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_SetupEnd(void)
  3576. {
  3577. GH_USB_CSR0L_R_PERI_S tmp_value;
  3578. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  3579. tmp_value.all = value;
  3580. #if GH_USB_ENABLE_DEBUG_PRINT
  3581. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_SetupEnd] --> 0x%08x\n",
  3582. REG_USB_CSR0L_R_PERI,value);
  3583. #endif
  3584. return tmp_value.bitc.setupend;
  3585. }
  3586. #endif /* GH_INLINE_LEVEL == 0 */
  3587. /*----------------------------------------------------------------------------*/
  3588. /* register USB_CSR0L_W_PERI (write) */
  3589. /*----------------------------------------------------------------------------*/
  3590. #if GH_INLINE_LEVEL < 2
  3591. /*! \brief Writes the register 'USB_CSR0L_W_PERI'. */
  3592. void GH_USB_set_CSR0L_W_PERI(U8 data);
  3593. /*! \brief Reads the mirror variable of the register 'USB_CSR0L_W_PERI'. */
  3594. U8 GH_USB_getm_CSR0L_W_PERI(void);
  3595. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_CSR0L_W_PERI'. */
  3596. void GH_USB_set_CSR0L_W_PERI_TxPktRdy(U8 data);
  3597. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  3598. U8 GH_USB_getm_CSR0L_W_PERI_TxPktRdy(void);
  3599. /*! \brief Writes the bit group 'SentStall' of register 'USB_CSR0L_W_PERI'. */
  3600. void GH_USB_set_CSR0L_W_PERI_SentStall(U8 data);
  3601. /*! \brief Reads the bit group 'SentStall' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  3602. U8 GH_USB_getm_CSR0L_W_PERI_SentStall(void);
  3603. /*! \brief Writes the bit group 'DataEnd' of register 'USB_CSR0L_W_PERI'. */
  3604. void GH_USB_set_CSR0L_W_PERI_DataEnd(U8 data);
  3605. /*! \brief Reads the bit group 'DataEnd' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  3606. U8 GH_USB_getm_CSR0L_W_PERI_DataEnd(void);
  3607. /*! \brief Writes the bit group 'SendStall' of register 'USB_CSR0L_W_PERI'. */
  3608. void GH_USB_set_CSR0L_W_PERI_SendStall(U8 data);
  3609. /*! \brief Reads the bit group 'SendStall' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  3610. U8 GH_USB_getm_CSR0L_W_PERI_SendStall(void);
  3611. /*! \brief Writes the bit group 'ServicedRxPktRdy' of register 'USB_CSR0L_W_PERI'. */
  3612. void GH_USB_set_CSR0L_W_PERI_ServicedRxPktRdy(U8 data);
  3613. /*! \brief Reads the bit group 'ServicedRxPktRdy' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  3614. U8 GH_USB_getm_CSR0L_W_PERI_ServicedRxPktRdy(void);
  3615. /*! \brief Writes the bit group 'ServicedSetupEnd' of register 'USB_CSR0L_W_PERI'. */
  3616. void GH_USB_set_CSR0L_W_PERI_ServicedSetupEnd(U8 data);
  3617. /*! \brief Reads the bit group 'ServicedSetupEnd' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  3618. U8 GH_USB_getm_CSR0L_W_PERI_ServicedSetupEnd(void);
  3619. #else /* GH_INLINE_LEVEL < 2 */
  3620. GH_INLINE void GH_USB_set_CSR0L_W_PERI(U8 data)
  3621. {
  3622. m_usb_csr0l_w_peri.all = data;
  3623. *(volatile U8 *)REG_USB_CSR0L_W_PERI = data;
  3624. #if GH_USB_ENABLE_DEBUG_PRINT
  3625. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI] <-- 0x%08x\n",
  3626. REG_USB_CSR0L_W_PERI,data,data);
  3627. #endif
  3628. }
  3629. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI(void)
  3630. {
  3631. #if GH_USB_ENABLE_DEBUG_PRINT
  3632. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI] --> 0x%08x\n",
  3633. m_usb_csr0l_w_peri.all);
  3634. #endif
  3635. return m_usb_csr0l_w_peri.all;
  3636. }
  3637. GH_INLINE void GH_USB_set_CSR0L_W_PERI_TxPktRdy(U8 data)
  3638. {
  3639. m_usb_csr0l_w_peri.bitc.txpktrdy = data;
  3640. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  3641. #if GH_USB_ENABLE_DEBUG_PRINT
  3642. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_TxPktRdy] <-- 0x%08x\n",
  3643. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  3644. #endif
  3645. }
  3646. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_TxPktRdy(void)
  3647. {
  3648. #if GH_USB_ENABLE_DEBUG_PRINT
  3649. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_TxPktRdy] --> 0x%08x\n",
  3650. m_usb_csr0l_w_peri.bitc.txpktrdy);
  3651. #endif
  3652. return m_usb_csr0l_w_peri.bitc.txpktrdy;
  3653. }
  3654. GH_INLINE void GH_USB_set_CSR0L_W_PERI_SentStall(U8 data)
  3655. {
  3656. m_usb_csr0l_w_peri.bitc.sentstall = data;
  3657. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  3658. #if GH_USB_ENABLE_DEBUG_PRINT
  3659. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_SentStall] <-- 0x%08x\n",
  3660. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  3661. #endif
  3662. }
  3663. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_SentStall(void)
  3664. {
  3665. #if GH_USB_ENABLE_DEBUG_PRINT
  3666. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_SentStall] --> 0x%08x\n",
  3667. m_usb_csr0l_w_peri.bitc.sentstall);
  3668. #endif
  3669. return m_usb_csr0l_w_peri.bitc.sentstall;
  3670. }
  3671. GH_INLINE void GH_USB_set_CSR0L_W_PERI_DataEnd(U8 data)
  3672. {
  3673. m_usb_csr0l_w_peri.bitc.dataend = data;
  3674. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  3675. #if GH_USB_ENABLE_DEBUG_PRINT
  3676. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_DataEnd] <-- 0x%08x\n",
  3677. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  3678. #endif
  3679. }
  3680. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_DataEnd(void)
  3681. {
  3682. #if GH_USB_ENABLE_DEBUG_PRINT
  3683. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_DataEnd] --> 0x%08x\n",
  3684. m_usb_csr0l_w_peri.bitc.dataend);
  3685. #endif
  3686. return m_usb_csr0l_w_peri.bitc.dataend;
  3687. }
  3688. GH_INLINE void GH_USB_set_CSR0L_W_PERI_SendStall(U8 data)
  3689. {
  3690. m_usb_csr0l_w_peri.bitc.sendstall = data;
  3691. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  3692. #if GH_USB_ENABLE_DEBUG_PRINT
  3693. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_SendStall] <-- 0x%08x\n",
  3694. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  3695. #endif
  3696. }
  3697. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_SendStall(void)
  3698. {
  3699. #if GH_USB_ENABLE_DEBUG_PRINT
  3700. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_SendStall] --> 0x%08x\n",
  3701. m_usb_csr0l_w_peri.bitc.sendstall);
  3702. #endif
  3703. return m_usb_csr0l_w_peri.bitc.sendstall;
  3704. }
  3705. GH_INLINE void GH_USB_set_CSR0L_W_PERI_ServicedRxPktRdy(U8 data)
  3706. {
  3707. m_usb_csr0l_w_peri.bitc.servicedrxpktrdy = data;
  3708. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  3709. #if GH_USB_ENABLE_DEBUG_PRINT
  3710. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_ServicedRxPktRdy] <-- 0x%08x\n",
  3711. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  3712. #endif
  3713. }
  3714. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_ServicedRxPktRdy(void)
  3715. {
  3716. #if GH_USB_ENABLE_DEBUG_PRINT
  3717. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_ServicedRxPktRdy] --> 0x%08x\n",
  3718. m_usb_csr0l_w_peri.bitc.servicedrxpktrdy);
  3719. #endif
  3720. return m_usb_csr0l_w_peri.bitc.servicedrxpktrdy;
  3721. }
  3722. GH_INLINE void GH_USB_set_CSR0L_W_PERI_ServicedSetupEnd(U8 data)
  3723. {
  3724. m_usb_csr0l_w_peri.bitc.servicedsetupend = data;
  3725. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  3726. #if GH_USB_ENABLE_DEBUG_PRINT
  3727. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_ServicedSetupEnd] <-- 0x%08x\n",
  3728. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  3729. #endif
  3730. }
  3731. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_ServicedSetupEnd(void)
  3732. {
  3733. #if GH_USB_ENABLE_DEBUG_PRINT
  3734. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_ServicedSetupEnd] --> 0x%08x\n",
  3735. m_usb_csr0l_w_peri.bitc.servicedsetupend);
  3736. #endif
  3737. return m_usb_csr0l_w_peri.bitc.servicedsetupend;
  3738. }
  3739. #endif /* GH_INLINE_LEVEL < 2 */
  3740. /*----------------------------------------------------------------------------*/
  3741. /* register USB_CSR0H_W_PERI (write) */
  3742. /*----------------------------------------------------------------------------*/
  3743. #if GH_INLINE_LEVEL < 2
  3744. /*! \brief Writes the register 'USB_CSR0H_W_PERI'. */
  3745. void GH_USB_set_CSR0H_W_PERI(U8 data);
  3746. /*! \brief Reads the mirror variable of the register 'USB_CSR0H_W_PERI'. */
  3747. U8 GH_USB_getm_CSR0H_W_PERI(void);
  3748. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_CSR0H_W_PERI'. */
  3749. void GH_USB_set_CSR0H_W_PERI_FlushFIFO(U8 data);
  3750. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_CSR0H_W_PERI'. */
  3751. U8 GH_USB_getm_CSR0H_W_PERI_FlushFIFO(void);
  3752. #else /* GH_INLINE_LEVEL < 2 */
  3753. GH_INLINE void GH_USB_set_CSR0H_W_PERI(U8 data)
  3754. {
  3755. m_usb_csr0h_w_peri.all = data;
  3756. *(volatile U8 *)REG_USB_CSR0H_W_PERI = data;
  3757. #if GH_USB_ENABLE_DEBUG_PRINT
  3758. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_PERI] <-- 0x%08x\n",
  3759. REG_USB_CSR0H_W_PERI,data,data);
  3760. #endif
  3761. }
  3762. GH_INLINE U8 GH_USB_getm_CSR0H_W_PERI(void)
  3763. {
  3764. #if GH_USB_ENABLE_DEBUG_PRINT
  3765. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_PERI] --> 0x%08x\n",
  3766. m_usb_csr0h_w_peri.all);
  3767. #endif
  3768. return m_usb_csr0h_w_peri.all;
  3769. }
  3770. GH_INLINE void GH_USB_set_CSR0H_W_PERI_FlushFIFO(U8 data)
  3771. {
  3772. m_usb_csr0h_w_peri.bitc.flushfifo = data;
  3773. *(volatile U8 *)REG_USB_CSR0H_W_PERI = m_usb_csr0h_w_peri.all;
  3774. #if GH_USB_ENABLE_DEBUG_PRINT
  3775. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_PERI_FlushFIFO] <-- 0x%08x\n",
  3776. REG_USB_CSR0H_W_PERI,m_usb_csr0h_w_peri.all,m_usb_csr0h_w_peri.all);
  3777. #endif
  3778. }
  3779. GH_INLINE U8 GH_USB_getm_CSR0H_W_PERI_FlushFIFO(void)
  3780. {
  3781. #if GH_USB_ENABLE_DEBUG_PRINT
  3782. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_PERI_FlushFIFO] --> 0x%08x\n",
  3783. m_usb_csr0h_w_peri.bitc.flushfifo);
  3784. #endif
  3785. return m_usb_csr0h_w_peri.bitc.flushfifo;
  3786. }
  3787. #endif /* GH_INLINE_LEVEL < 2 */
  3788. /*----------------------------------------------------------------------------*/
  3789. /* register USB_CSR0L_R_HOST (read) */
  3790. /*----------------------------------------------------------------------------*/
  3791. #if GH_INLINE_LEVEL == 0
  3792. /*! \brief Reads the register 'USB_CSR0L_R_HOST'. */
  3793. U8 GH_USB_get_CSR0L_R_HOST(void);
  3794. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_CSR0L_R_HOST'. */
  3795. U8 GH_USB_get_CSR0L_R_HOST_RxPktRdy(void);
  3796. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_CSR0L_R_HOST'. */
  3797. U8 GH_USB_get_CSR0L_R_HOST_TxPktRdy(void);
  3798. /*! \brief Reads the bit group 'RxStall' of register 'USB_CSR0L_R_HOST'. */
  3799. U8 GH_USB_get_CSR0L_R_HOST_RxStall(void);
  3800. /*! \brief Reads the bit group 'SetupPkt' of register 'USB_CSR0L_R_HOST'. */
  3801. U8 GH_USB_get_CSR0L_R_HOST_SetupPkt(void);
  3802. /*! \brief Reads the bit group 'Error' of register 'USB_CSR0L_R_HOST'. */
  3803. U8 GH_USB_get_CSR0L_R_HOST_Error(void);
  3804. /*! \brief Reads the bit group 'ReqPkt' of register 'USB_CSR0L_R_HOST'. */
  3805. U8 GH_USB_get_CSR0L_R_HOST_ReqPkt(void);
  3806. /*! \brief Reads the bit group 'StatusPkt' of register 'USB_CSR0L_R_HOST'. */
  3807. U8 GH_USB_get_CSR0L_R_HOST_StatusPkt(void);
  3808. /*! \brief Reads the bit group 'NAKTimeout' of register 'USB_CSR0L_R_HOST'. */
  3809. U8 GH_USB_get_CSR0L_R_HOST_NAKTimeout(void);
  3810. #else /* GH_INLINE_LEVEL == 0 */
  3811. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST(void)
  3812. {
  3813. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3814. #if GH_USB_ENABLE_DEBUG_PRINT
  3815. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST] --> 0x%08x\n",
  3816. REG_USB_CSR0L_R_HOST,value);
  3817. #endif
  3818. return value;
  3819. }
  3820. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_RxPktRdy(void)
  3821. {
  3822. GH_USB_CSR0L_R_HOST_S tmp_value;
  3823. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3824. tmp_value.all = value;
  3825. #if GH_USB_ENABLE_DEBUG_PRINT
  3826. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_RxPktRdy] --> 0x%08x\n",
  3827. REG_USB_CSR0L_R_HOST,value);
  3828. #endif
  3829. return tmp_value.bitc.rxpktrdy;
  3830. }
  3831. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_TxPktRdy(void)
  3832. {
  3833. GH_USB_CSR0L_R_HOST_S tmp_value;
  3834. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3835. tmp_value.all = value;
  3836. #if GH_USB_ENABLE_DEBUG_PRINT
  3837. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_TxPktRdy] --> 0x%08x\n",
  3838. REG_USB_CSR0L_R_HOST,value);
  3839. #endif
  3840. return tmp_value.bitc.txpktrdy;
  3841. }
  3842. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_RxStall(void)
  3843. {
  3844. GH_USB_CSR0L_R_HOST_S tmp_value;
  3845. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3846. tmp_value.all = value;
  3847. #if GH_USB_ENABLE_DEBUG_PRINT
  3848. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_RxStall] --> 0x%08x\n",
  3849. REG_USB_CSR0L_R_HOST,value);
  3850. #endif
  3851. return tmp_value.bitc.rxstall;
  3852. }
  3853. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_SetupPkt(void)
  3854. {
  3855. GH_USB_CSR0L_R_HOST_S tmp_value;
  3856. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3857. tmp_value.all = value;
  3858. #if GH_USB_ENABLE_DEBUG_PRINT
  3859. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_SetupPkt] --> 0x%08x\n",
  3860. REG_USB_CSR0L_R_HOST,value);
  3861. #endif
  3862. return tmp_value.bitc.setuppkt;
  3863. }
  3864. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_Error(void)
  3865. {
  3866. GH_USB_CSR0L_R_HOST_S tmp_value;
  3867. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3868. tmp_value.all = value;
  3869. #if GH_USB_ENABLE_DEBUG_PRINT
  3870. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_Error] --> 0x%08x\n",
  3871. REG_USB_CSR0L_R_HOST,value);
  3872. #endif
  3873. return tmp_value.bitc.error;
  3874. }
  3875. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_ReqPkt(void)
  3876. {
  3877. GH_USB_CSR0L_R_HOST_S tmp_value;
  3878. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3879. tmp_value.all = value;
  3880. #if GH_USB_ENABLE_DEBUG_PRINT
  3881. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_ReqPkt] --> 0x%08x\n",
  3882. REG_USB_CSR0L_R_HOST,value);
  3883. #endif
  3884. return tmp_value.bitc.reqpkt;
  3885. }
  3886. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_StatusPkt(void)
  3887. {
  3888. GH_USB_CSR0L_R_HOST_S tmp_value;
  3889. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3890. tmp_value.all = value;
  3891. #if GH_USB_ENABLE_DEBUG_PRINT
  3892. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_StatusPkt] --> 0x%08x\n",
  3893. REG_USB_CSR0L_R_HOST,value);
  3894. #endif
  3895. return tmp_value.bitc.statuspkt;
  3896. }
  3897. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_NAKTimeout(void)
  3898. {
  3899. GH_USB_CSR0L_R_HOST_S tmp_value;
  3900. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  3901. tmp_value.all = value;
  3902. #if GH_USB_ENABLE_DEBUG_PRINT
  3903. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_NAKTimeout] --> 0x%08x\n",
  3904. REG_USB_CSR0L_R_HOST,value);
  3905. #endif
  3906. return tmp_value.bitc.naktimeout;
  3907. }
  3908. #endif /* GH_INLINE_LEVEL == 0 */
  3909. /*----------------------------------------------------------------------------*/
  3910. /* register USB_CSR0H_R_HOST (read) */
  3911. /*----------------------------------------------------------------------------*/
  3912. #if GH_INLINE_LEVEL == 0
  3913. /*! \brief Reads the register 'USB_CSR0H_R_HOST'. */
  3914. U8 GH_USB_get_CSR0H_R_HOST(void);
  3915. /*! \brief Reads the bit group 'DataToggle' of register 'USB_CSR0H_R_HOST'. */
  3916. U8 GH_USB_get_CSR0H_R_HOST_DataToggle(void);
  3917. /*! \brief Reads the bit group 'DisPing' of register 'USB_CSR0H_R_HOST'. */
  3918. U8 GH_USB_get_CSR0H_R_HOST_DisPing(void);
  3919. #else /* GH_INLINE_LEVEL == 0 */
  3920. GH_INLINE U8 GH_USB_get_CSR0H_R_HOST(void)
  3921. {
  3922. U8 value = (*(volatile U8 *)REG_USB_CSR0H_R_HOST);
  3923. #if GH_USB_ENABLE_DEBUG_PRINT
  3924. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0H_R_HOST] --> 0x%08x\n",
  3925. REG_USB_CSR0H_R_HOST,value);
  3926. #endif
  3927. return value;
  3928. }
  3929. GH_INLINE U8 GH_USB_get_CSR0H_R_HOST_DataToggle(void)
  3930. {
  3931. GH_USB_CSR0H_R_HOST_S tmp_value;
  3932. U8 value = (*(volatile U8 *)REG_USB_CSR0H_R_HOST);
  3933. tmp_value.all = value;
  3934. #if GH_USB_ENABLE_DEBUG_PRINT
  3935. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0H_R_HOST_DataToggle] --> 0x%08x\n",
  3936. REG_USB_CSR0H_R_HOST,value);
  3937. #endif
  3938. return tmp_value.bitc.datatoggle;
  3939. }
  3940. GH_INLINE U8 GH_USB_get_CSR0H_R_HOST_DisPing(void)
  3941. {
  3942. GH_USB_CSR0H_R_HOST_S tmp_value;
  3943. U8 value = (*(volatile U8 *)REG_USB_CSR0H_R_HOST);
  3944. tmp_value.all = value;
  3945. #if GH_USB_ENABLE_DEBUG_PRINT
  3946. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0H_R_HOST_DisPing] --> 0x%08x\n",
  3947. REG_USB_CSR0H_R_HOST,value);
  3948. #endif
  3949. return tmp_value.bitc.disping;
  3950. }
  3951. #endif /* GH_INLINE_LEVEL == 0 */
  3952. /*----------------------------------------------------------------------------*/
  3953. /* register USB_CSR0L_W_HOST (write) */
  3954. /*----------------------------------------------------------------------------*/
  3955. #if GH_INLINE_LEVEL < 2
  3956. /*! \brief Writes the register 'USB_CSR0L_W_HOST'. */
  3957. void GH_USB_set_CSR0L_W_HOST(U8 data);
  3958. /*! \brief Reads the mirror variable of the register 'USB_CSR0L_W_HOST'. */
  3959. U8 GH_USB_getm_CSR0L_W_HOST(void);
  3960. /*! \brief Writes the bit group 'RxPktRdy' of register 'USB_CSR0L_W_HOST'. */
  3961. void GH_USB_set_CSR0L_W_HOST_RxPktRdy(U8 data);
  3962. /*! \brief Reads the bit group 'RxPktRdy' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3963. U8 GH_USB_getm_CSR0L_W_HOST_RxPktRdy(void);
  3964. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_CSR0L_W_HOST'. */
  3965. void GH_USB_set_CSR0L_W_HOST_TxPktRdy(U8 data);
  3966. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3967. U8 GH_USB_getm_CSR0L_W_HOST_TxPktRdy(void);
  3968. /*! \brief Writes the bit group 'RxStall' of register 'USB_CSR0L_W_HOST'. */
  3969. void GH_USB_set_CSR0L_W_HOST_RxStall(U8 data);
  3970. /*! \brief Reads the bit group 'RxStall' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3971. U8 GH_USB_getm_CSR0L_W_HOST_RxStall(void);
  3972. /*! \brief Writes the bit group 'SetupPkt' of register 'USB_CSR0L_W_HOST'. */
  3973. void GH_USB_set_CSR0L_W_HOST_SetupPkt(U8 data);
  3974. /*! \brief Reads the bit group 'SetupPkt' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3975. U8 GH_USB_getm_CSR0L_W_HOST_SetupPkt(void);
  3976. /*! \brief Writes the bit group 'Error' of register 'USB_CSR0L_W_HOST'. */
  3977. void GH_USB_set_CSR0L_W_HOST_Error(U8 data);
  3978. /*! \brief Reads the bit group 'Error' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3979. U8 GH_USB_getm_CSR0L_W_HOST_Error(void);
  3980. /*! \brief Writes the bit group 'ReqPkt' of register 'USB_CSR0L_W_HOST'. */
  3981. void GH_USB_set_CSR0L_W_HOST_ReqPkt(U8 data);
  3982. /*! \brief Reads the bit group 'ReqPkt' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3983. U8 GH_USB_getm_CSR0L_W_HOST_ReqPkt(void);
  3984. /*! \brief Writes the bit group 'StatusPkt' of register 'USB_CSR0L_W_HOST'. */
  3985. void GH_USB_set_CSR0L_W_HOST_StatusPkt(U8 data);
  3986. /*! \brief Reads the bit group 'StatusPkt' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3987. U8 GH_USB_getm_CSR0L_W_HOST_StatusPkt(void);
  3988. /*! \brief Writes the bit group 'NAKTimeout' of register 'USB_CSR0L_W_HOST'. */
  3989. void GH_USB_set_CSR0L_W_HOST_NAKTimeout(U8 data);
  3990. /*! \brief Reads the bit group 'NAKTimeout' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  3991. U8 GH_USB_getm_CSR0L_W_HOST_NAKTimeout(void);
  3992. #else /* GH_INLINE_LEVEL < 2 */
  3993. GH_INLINE void GH_USB_set_CSR0L_W_HOST(U8 data)
  3994. {
  3995. m_usb_csr0l_w_host.all = data;
  3996. *(volatile U8 *)REG_USB_CSR0L_W_HOST = data;
  3997. #if GH_USB_ENABLE_DEBUG_PRINT
  3998. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST] <-- 0x%08x\n",
  3999. REG_USB_CSR0L_W_HOST,data,data);
  4000. #endif
  4001. }
  4002. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST(void)
  4003. {
  4004. #if GH_USB_ENABLE_DEBUG_PRINT
  4005. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST] --> 0x%08x\n",
  4006. m_usb_csr0l_w_host.all);
  4007. #endif
  4008. return m_usb_csr0l_w_host.all;
  4009. }
  4010. GH_INLINE void GH_USB_set_CSR0L_W_HOST_RxPktRdy(U8 data)
  4011. {
  4012. m_usb_csr0l_w_host.bitc.rxpktrdy = data;
  4013. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4014. #if GH_USB_ENABLE_DEBUG_PRINT
  4015. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_RxPktRdy] <-- 0x%08x\n",
  4016. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4017. #endif
  4018. }
  4019. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_RxPktRdy(void)
  4020. {
  4021. #if GH_USB_ENABLE_DEBUG_PRINT
  4022. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_RxPktRdy] --> 0x%08x\n",
  4023. m_usb_csr0l_w_host.bitc.rxpktrdy);
  4024. #endif
  4025. return m_usb_csr0l_w_host.bitc.rxpktrdy;
  4026. }
  4027. GH_INLINE void GH_USB_set_CSR0L_W_HOST_TxPktRdy(U8 data)
  4028. {
  4029. m_usb_csr0l_w_host.bitc.txpktrdy = data;
  4030. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4031. #if GH_USB_ENABLE_DEBUG_PRINT
  4032. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_TxPktRdy] <-- 0x%08x\n",
  4033. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4034. #endif
  4035. }
  4036. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_TxPktRdy(void)
  4037. {
  4038. #if GH_USB_ENABLE_DEBUG_PRINT
  4039. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_TxPktRdy] --> 0x%08x\n",
  4040. m_usb_csr0l_w_host.bitc.txpktrdy);
  4041. #endif
  4042. return m_usb_csr0l_w_host.bitc.txpktrdy;
  4043. }
  4044. GH_INLINE void GH_USB_set_CSR0L_W_HOST_RxStall(U8 data)
  4045. {
  4046. m_usb_csr0l_w_host.bitc.rxstall = data;
  4047. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4048. #if GH_USB_ENABLE_DEBUG_PRINT
  4049. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_RxStall] <-- 0x%08x\n",
  4050. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4051. #endif
  4052. }
  4053. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_RxStall(void)
  4054. {
  4055. #if GH_USB_ENABLE_DEBUG_PRINT
  4056. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_RxStall] --> 0x%08x\n",
  4057. m_usb_csr0l_w_host.bitc.rxstall);
  4058. #endif
  4059. return m_usb_csr0l_w_host.bitc.rxstall;
  4060. }
  4061. GH_INLINE void GH_USB_set_CSR0L_W_HOST_SetupPkt(U8 data)
  4062. {
  4063. m_usb_csr0l_w_host.bitc.setuppkt = data;
  4064. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4065. #if GH_USB_ENABLE_DEBUG_PRINT
  4066. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_SetupPkt] <-- 0x%08x\n",
  4067. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4068. #endif
  4069. }
  4070. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_SetupPkt(void)
  4071. {
  4072. #if GH_USB_ENABLE_DEBUG_PRINT
  4073. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_SetupPkt] --> 0x%08x\n",
  4074. m_usb_csr0l_w_host.bitc.setuppkt);
  4075. #endif
  4076. return m_usb_csr0l_w_host.bitc.setuppkt;
  4077. }
  4078. GH_INLINE void GH_USB_set_CSR0L_W_HOST_Error(U8 data)
  4079. {
  4080. m_usb_csr0l_w_host.bitc.error = data;
  4081. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4082. #if GH_USB_ENABLE_DEBUG_PRINT
  4083. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_Error] <-- 0x%08x\n",
  4084. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4085. #endif
  4086. }
  4087. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_Error(void)
  4088. {
  4089. #if GH_USB_ENABLE_DEBUG_PRINT
  4090. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_Error] --> 0x%08x\n",
  4091. m_usb_csr0l_w_host.bitc.error);
  4092. #endif
  4093. return m_usb_csr0l_w_host.bitc.error;
  4094. }
  4095. GH_INLINE void GH_USB_set_CSR0L_W_HOST_ReqPkt(U8 data)
  4096. {
  4097. m_usb_csr0l_w_host.bitc.reqpkt = data;
  4098. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4099. #if GH_USB_ENABLE_DEBUG_PRINT
  4100. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_ReqPkt] <-- 0x%08x\n",
  4101. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4102. #endif
  4103. }
  4104. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_ReqPkt(void)
  4105. {
  4106. #if GH_USB_ENABLE_DEBUG_PRINT
  4107. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_ReqPkt] --> 0x%08x\n",
  4108. m_usb_csr0l_w_host.bitc.reqpkt);
  4109. #endif
  4110. return m_usb_csr0l_w_host.bitc.reqpkt;
  4111. }
  4112. GH_INLINE void GH_USB_set_CSR0L_W_HOST_StatusPkt(U8 data)
  4113. {
  4114. m_usb_csr0l_w_host.bitc.statuspkt = data;
  4115. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4116. #if GH_USB_ENABLE_DEBUG_PRINT
  4117. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_StatusPkt] <-- 0x%08x\n",
  4118. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4119. #endif
  4120. }
  4121. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_StatusPkt(void)
  4122. {
  4123. #if GH_USB_ENABLE_DEBUG_PRINT
  4124. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_StatusPkt] --> 0x%08x\n",
  4125. m_usb_csr0l_w_host.bitc.statuspkt);
  4126. #endif
  4127. return m_usb_csr0l_w_host.bitc.statuspkt;
  4128. }
  4129. GH_INLINE void GH_USB_set_CSR0L_W_HOST_NAKTimeout(U8 data)
  4130. {
  4131. m_usb_csr0l_w_host.bitc.naktimeout = data;
  4132. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  4133. #if GH_USB_ENABLE_DEBUG_PRINT
  4134. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_NAKTimeout] <-- 0x%08x\n",
  4135. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  4136. #endif
  4137. }
  4138. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_NAKTimeout(void)
  4139. {
  4140. #if GH_USB_ENABLE_DEBUG_PRINT
  4141. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_NAKTimeout] --> 0x%08x\n",
  4142. m_usb_csr0l_w_host.bitc.naktimeout);
  4143. #endif
  4144. return m_usb_csr0l_w_host.bitc.naktimeout;
  4145. }
  4146. #endif /* GH_INLINE_LEVEL < 2 */
  4147. /*----------------------------------------------------------------------------*/
  4148. /* register USB_CSR0H_W_HOST (write) */
  4149. /*----------------------------------------------------------------------------*/
  4150. #if GH_INLINE_LEVEL < 2
  4151. /*! \brief Writes the register 'USB_CSR0H_W_HOST'. */
  4152. void GH_USB_set_CSR0H_W_HOST(U8 data);
  4153. /*! \brief Reads the mirror variable of the register 'USB_CSR0H_W_HOST'. */
  4154. U8 GH_USB_getm_CSR0H_W_HOST(void);
  4155. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_CSR0H_W_HOST'. */
  4156. void GH_USB_set_CSR0H_W_HOST_FlushFIFO(U8 data);
  4157. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  4158. U8 GH_USB_getm_CSR0H_W_HOST_FlushFIFO(void);
  4159. /*! \brief Writes the bit group 'DataToggle' of register 'USB_CSR0H_W_HOST'. */
  4160. void GH_USB_set_CSR0H_W_HOST_DataToggle(U8 data);
  4161. /*! \brief Reads the bit group 'DataToggle' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  4162. U8 GH_USB_getm_CSR0H_W_HOST_DataToggle(void);
  4163. /*! \brief Writes the bit group 'DataToggleWriteEnable' of register 'USB_CSR0H_W_HOST'. */
  4164. void GH_USB_set_CSR0H_W_HOST_DataToggleWriteEnable(U8 data);
  4165. /*! \brief Reads the bit group 'DataToggleWriteEnable' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  4166. U8 GH_USB_getm_CSR0H_W_HOST_DataToggleWriteEnable(void);
  4167. /*! \brief Writes the bit group 'DisPing' of register 'USB_CSR0H_W_HOST'. */
  4168. void GH_USB_set_CSR0H_W_HOST_DisPing(U8 data);
  4169. /*! \brief Reads the bit group 'DisPing' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  4170. U8 GH_USB_getm_CSR0H_W_HOST_DisPing(void);
  4171. #else /* GH_INLINE_LEVEL < 2 */
  4172. GH_INLINE void GH_USB_set_CSR0H_W_HOST(U8 data)
  4173. {
  4174. m_usb_csr0h_w_host.all = data;
  4175. *(volatile U8 *)REG_USB_CSR0H_W_HOST = data;
  4176. #if GH_USB_ENABLE_DEBUG_PRINT
  4177. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST] <-- 0x%08x\n",
  4178. REG_USB_CSR0H_W_HOST,data,data);
  4179. #endif
  4180. }
  4181. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST(void)
  4182. {
  4183. #if GH_USB_ENABLE_DEBUG_PRINT
  4184. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST] --> 0x%08x\n",
  4185. m_usb_csr0h_w_host.all);
  4186. #endif
  4187. return m_usb_csr0h_w_host.all;
  4188. }
  4189. GH_INLINE void GH_USB_set_CSR0H_W_HOST_FlushFIFO(U8 data)
  4190. {
  4191. m_usb_csr0h_w_host.bitc.flushfifo = data;
  4192. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  4193. #if GH_USB_ENABLE_DEBUG_PRINT
  4194. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_FlushFIFO] <-- 0x%08x\n",
  4195. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  4196. #endif
  4197. }
  4198. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_FlushFIFO(void)
  4199. {
  4200. #if GH_USB_ENABLE_DEBUG_PRINT
  4201. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_FlushFIFO] --> 0x%08x\n",
  4202. m_usb_csr0h_w_host.bitc.flushfifo);
  4203. #endif
  4204. return m_usb_csr0h_w_host.bitc.flushfifo;
  4205. }
  4206. GH_INLINE void GH_USB_set_CSR0H_W_HOST_DataToggle(U8 data)
  4207. {
  4208. m_usb_csr0h_w_host.bitc.datatoggle = data;
  4209. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  4210. #if GH_USB_ENABLE_DEBUG_PRINT
  4211. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_DataToggle] <-- 0x%08x\n",
  4212. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  4213. #endif
  4214. }
  4215. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_DataToggle(void)
  4216. {
  4217. #if GH_USB_ENABLE_DEBUG_PRINT
  4218. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_DataToggle] --> 0x%08x\n",
  4219. m_usb_csr0h_w_host.bitc.datatoggle);
  4220. #endif
  4221. return m_usb_csr0h_w_host.bitc.datatoggle;
  4222. }
  4223. GH_INLINE void GH_USB_set_CSR0H_W_HOST_DataToggleWriteEnable(U8 data)
  4224. {
  4225. m_usb_csr0h_w_host.bitc.datatogglewriteenable = data;
  4226. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  4227. #if GH_USB_ENABLE_DEBUG_PRINT
  4228. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_DataToggleWriteEnable] <-- 0x%08x\n",
  4229. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  4230. #endif
  4231. }
  4232. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_DataToggleWriteEnable(void)
  4233. {
  4234. #if GH_USB_ENABLE_DEBUG_PRINT
  4235. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_DataToggleWriteEnable] --> 0x%08x\n",
  4236. m_usb_csr0h_w_host.bitc.datatogglewriteenable);
  4237. #endif
  4238. return m_usb_csr0h_w_host.bitc.datatogglewriteenable;
  4239. }
  4240. GH_INLINE void GH_USB_set_CSR0H_W_HOST_DisPing(U8 data)
  4241. {
  4242. m_usb_csr0h_w_host.bitc.disping = data;
  4243. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  4244. #if GH_USB_ENABLE_DEBUG_PRINT
  4245. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_DisPing] <-- 0x%08x\n",
  4246. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  4247. #endif
  4248. }
  4249. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_DisPing(void)
  4250. {
  4251. #if GH_USB_ENABLE_DEBUG_PRINT
  4252. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_DisPing] --> 0x%08x\n",
  4253. m_usb_csr0h_w_host.bitc.disping);
  4254. #endif
  4255. return m_usb_csr0h_w_host.bitc.disping;
  4256. }
  4257. #endif /* GH_INLINE_LEVEL < 2 */
  4258. /*----------------------------------------------------------------------------*/
  4259. /* register USB_Count0 (read) */
  4260. /*----------------------------------------------------------------------------*/
  4261. #if GH_INLINE_LEVEL == 0
  4262. /*! \brief Reads the register 'USB_Count0'. */
  4263. U8 GH_USB_get_Count0(void);
  4264. /*! \brief Reads the bit group 'Endpoint0RxCount' of register 'USB_Count0'. */
  4265. U8 GH_USB_get_Count0_Endpoint0RxCount(void);
  4266. #else /* GH_INLINE_LEVEL == 0 */
  4267. GH_INLINE U8 GH_USB_get_Count0(void)
  4268. {
  4269. U8 value = (*(volatile U8 *)REG_USB_COUNT0);
  4270. #if GH_USB_ENABLE_DEBUG_PRINT
  4271. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Count0] --> 0x%08x\n",
  4272. REG_USB_COUNT0,value);
  4273. #endif
  4274. return value;
  4275. }
  4276. GH_INLINE U8 GH_USB_get_Count0_Endpoint0RxCount(void)
  4277. {
  4278. GH_USB_COUNT0_S tmp_value;
  4279. U8 value = (*(volatile U8 *)REG_USB_COUNT0);
  4280. tmp_value.all = value;
  4281. #if GH_USB_ENABLE_DEBUG_PRINT
  4282. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Count0_Endpoint0RxCount] --> 0x%08x\n",
  4283. REG_USB_COUNT0,value);
  4284. #endif
  4285. return tmp_value.bitc.endpoint0rxcount;
  4286. }
  4287. #endif /* GH_INLINE_LEVEL == 0 */
  4288. /*----------------------------------------------------------------------------*/
  4289. /* register USB_Type0 (read/write) */
  4290. /*----------------------------------------------------------------------------*/
  4291. #if GH_INLINE_LEVEL == 0
  4292. /*! \brief Writes the register 'USB_Type0'. */
  4293. void GH_USB_set_Type0(U8 data);
  4294. /*! \brief Reads the register 'USB_Type0'. */
  4295. U8 GH_USB_get_Type0(void);
  4296. /*! \brief Writes the bit group 'Speed' of register 'USB_Type0'. */
  4297. void GH_USB_set_Type0_Speed(U8 data);
  4298. /*! \brief Reads the bit group 'Speed' of register 'USB_Type0'. */
  4299. U8 GH_USB_get_Type0_Speed(void);
  4300. #else /* GH_INLINE_LEVEL == 0 */
  4301. GH_INLINE void GH_USB_set_Type0(U8 data)
  4302. {
  4303. *(volatile U8 *)REG_USB_TYPE0 = data;
  4304. #if GH_USB_ENABLE_DEBUG_PRINT
  4305. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Type0] <-- 0x%08x\n",
  4306. REG_USB_TYPE0,data,data);
  4307. #endif
  4308. }
  4309. GH_INLINE U8 GH_USB_get_Type0(void)
  4310. {
  4311. U8 value = (*(volatile U8 *)REG_USB_TYPE0);
  4312. #if GH_USB_ENABLE_DEBUG_PRINT
  4313. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Type0] --> 0x%08x\n",
  4314. REG_USB_TYPE0,value);
  4315. #endif
  4316. return value;
  4317. }
  4318. GH_INLINE void GH_USB_set_Type0_Speed(U8 data)
  4319. {
  4320. GH_USB_TYPE0_S d;
  4321. d.all = *(volatile U8 *)REG_USB_TYPE0;
  4322. d.bitc.speed = data;
  4323. *(volatile U8 *)REG_USB_TYPE0 = d.all;
  4324. #if GH_USB_ENABLE_DEBUG_PRINT
  4325. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Type0_Speed] <-- 0x%08x\n",
  4326. REG_USB_TYPE0,d.all,d.all);
  4327. #endif
  4328. }
  4329. GH_INLINE U8 GH_USB_get_Type0_Speed(void)
  4330. {
  4331. GH_USB_TYPE0_S tmp_value;
  4332. U8 value = (*(volatile U8 *)REG_USB_TYPE0);
  4333. tmp_value.all = value;
  4334. #if GH_USB_ENABLE_DEBUG_PRINT
  4335. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Type0_Speed] --> 0x%08x\n",
  4336. REG_USB_TYPE0,value);
  4337. #endif
  4338. return tmp_value.bitc.speed;
  4339. }
  4340. #endif /* GH_INLINE_LEVEL == 0 */
  4341. /*----------------------------------------------------------------------------*/
  4342. /* register USB_NAKLimit0_HOST (read/write) */
  4343. /*----------------------------------------------------------------------------*/
  4344. #if GH_INLINE_LEVEL == 0
  4345. /*! \brief Writes the register 'USB_NAKLimit0_HOST'. */
  4346. void GH_USB_set_NAKLimit0_HOST(U8 data);
  4347. /*! \brief Reads the register 'USB_NAKLimit0_HOST'. */
  4348. U8 GH_USB_get_NAKLimit0_HOST(void);
  4349. /*! \brief Writes the bit group 'Endpoint0NAKLimit' of register 'USB_NAKLimit0_HOST'. */
  4350. void GH_USB_set_NAKLimit0_HOST_Endpoint0NAKLimit(U8 data);
  4351. /*! \brief Reads the bit group 'Endpoint0NAKLimit' of register 'USB_NAKLimit0_HOST'. */
  4352. U8 GH_USB_get_NAKLimit0_HOST_Endpoint0NAKLimit(void);
  4353. #else /* GH_INLINE_LEVEL == 0 */
  4354. GH_INLINE void GH_USB_set_NAKLimit0_HOST(U8 data)
  4355. {
  4356. *(volatile U8 *)REG_USB_NAKLIMIT0_HOST = data;
  4357. #if GH_USB_ENABLE_DEBUG_PRINT
  4358. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_NAKLimit0_HOST] <-- 0x%08x\n",
  4359. REG_USB_NAKLIMIT0_HOST,data,data);
  4360. #endif
  4361. }
  4362. GH_INLINE U8 GH_USB_get_NAKLimit0_HOST(void)
  4363. {
  4364. U8 value = (*(volatile U8 *)REG_USB_NAKLIMIT0_HOST);
  4365. #if GH_USB_ENABLE_DEBUG_PRINT
  4366. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_NAKLimit0_HOST] --> 0x%08x\n",
  4367. REG_USB_NAKLIMIT0_HOST,value);
  4368. #endif
  4369. return value;
  4370. }
  4371. GH_INLINE void GH_USB_set_NAKLimit0_HOST_Endpoint0NAKLimit(U8 data)
  4372. {
  4373. GH_USB_NAKLIMIT0_HOST_S d;
  4374. d.all = *(volatile U8 *)REG_USB_NAKLIMIT0_HOST;
  4375. d.bitc.endpoint0naklimit = data;
  4376. *(volatile U8 *)REG_USB_NAKLIMIT0_HOST = d.all;
  4377. #if GH_USB_ENABLE_DEBUG_PRINT
  4378. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_NAKLimit0_HOST_Endpoint0NAKLimit] <-- 0x%08x\n",
  4379. REG_USB_NAKLIMIT0_HOST,d.all,d.all);
  4380. #endif
  4381. }
  4382. GH_INLINE U8 GH_USB_get_NAKLimit0_HOST_Endpoint0NAKLimit(void)
  4383. {
  4384. GH_USB_NAKLIMIT0_HOST_S tmp_value;
  4385. U8 value = (*(volatile U8 *)REG_USB_NAKLIMIT0_HOST);
  4386. tmp_value.all = value;
  4387. #if GH_USB_ENABLE_DEBUG_PRINT
  4388. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_NAKLimit0_HOST_Endpoint0NAKLimit] --> 0x%08x\n",
  4389. REG_USB_NAKLIMIT0_HOST,value);
  4390. #endif
  4391. return tmp_value.bitc.endpoint0naklimit;
  4392. }
  4393. #endif /* GH_INLINE_LEVEL == 0 */
  4394. /*----------------------------------------------------------------------------*/
  4395. /* register USB_ConfigData (read) */
  4396. /*----------------------------------------------------------------------------*/
  4397. #if GH_INLINE_LEVEL == 0
  4398. /*! \brief Reads the register 'USB_ConfigData'. */
  4399. U8 GH_USB_get_ConfigData(void);
  4400. /*! \brief Reads the bit group 'UTMI_DataWidth' of register 'USB_ConfigData'. */
  4401. U8 GH_USB_get_ConfigData_UTMI_DataWidth(void);
  4402. /*! \brief Reads the bit group 'SoftConE' of register 'USB_ConfigData'. */
  4403. U8 GH_USB_get_ConfigData_SoftConE(void);
  4404. /*! \brief Reads the bit group 'DynFIFO_Sizing' of register 'USB_ConfigData'. */
  4405. U8 GH_USB_get_ConfigData_DynFIFO_Sizing(void);
  4406. /*! \brief Reads the bit group 'HBTxE' of register 'USB_ConfigData'. */
  4407. U8 GH_USB_get_ConfigData_HBTxE(void);
  4408. /*! \brief Reads the bit group 'HBRxE' of register 'USB_ConfigData'. */
  4409. U8 GH_USB_get_ConfigData_HBRxE(void);
  4410. /*! \brief Reads the bit group 'BigEndian' of register 'USB_ConfigData'. */
  4411. U8 GH_USB_get_ConfigData_BigEndian(void);
  4412. /*! \brief Reads the bit group 'MPTxE' of register 'USB_ConfigData'. */
  4413. U8 GH_USB_get_ConfigData_MPTxE(void);
  4414. /*! \brief Reads the bit group 'MPRxE' of register 'USB_ConfigData'. */
  4415. U8 GH_USB_get_ConfigData_MPRxE(void);
  4416. #else /* GH_INLINE_LEVEL == 0 */
  4417. GH_INLINE U8 GH_USB_get_ConfigData(void)
  4418. {
  4419. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4420. #if GH_USB_ENABLE_DEBUG_PRINT
  4421. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData] --> 0x%08x\n",
  4422. REG_USB_CONFIGDATA,value);
  4423. #endif
  4424. return value;
  4425. }
  4426. GH_INLINE U8 GH_USB_get_ConfigData_UTMI_DataWidth(void)
  4427. {
  4428. GH_USB_CONFIGDATA_S tmp_value;
  4429. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4430. tmp_value.all = value;
  4431. #if GH_USB_ENABLE_DEBUG_PRINT
  4432. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_UTMI_DataWidth] --> 0x%08x\n",
  4433. REG_USB_CONFIGDATA,value);
  4434. #endif
  4435. return tmp_value.bitc.utmi_datawidth;
  4436. }
  4437. GH_INLINE U8 GH_USB_get_ConfigData_SoftConE(void)
  4438. {
  4439. GH_USB_CONFIGDATA_S tmp_value;
  4440. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4441. tmp_value.all = value;
  4442. #if GH_USB_ENABLE_DEBUG_PRINT
  4443. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_SoftConE] --> 0x%08x\n",
  4444. REG_USB_CONFIGDATA,value);
  4445. #endif
  4446. return tmp_value.bitc.softcone;
  4447. }
  4448. GH_INLINE U8 GH_USB_get_ConfigData_DynFIFO_Sizing(void)
  4449. {
  4450. GH_USB_CONFIGDATA_S tmp_value;
  4451. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4452. tmp_value.all = value;
  4453. #if GH_USB_ENABLE_DEBUG_PRINT
  4454. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_DynFIFO_Sizing] --> 0x%08x\n",
  4455. REG_USB_CONFIGDATA,value);
  4456. #endif
  4457. return tmp_value.bitc.dynfifo_sizing;
  4458. }
  4459. GH_INLINE U8 GH_USB_get_ConfigData_HBTxE(void)
  4460. {
  4461. GH_USB_CONFIGDATA_S tmp_value;
  4462. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4463. tmp_value.all = value;
  4464. #if GH_USB_ENABLE_DEBUG_PRINT
  4465. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_HBTxE] --> 0x%08x\n",
  4466. REG_USB_CONFIGDATA,value);
  4467. #endif
  4468. return tmp_value.bitc.hbtxe;
  4469. }
  4470. GH_INLINE U8 GH_USB_get_ConfigData_HBRxE(void)
  4471. {
  4472. GH_USB_CONFIGDATA_S tmp_value;
  4473. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4474. tmp_value.all = value;
  4475. #if GH_USB_ENABLE_DEBUG_PRINT
  4476. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_HBRxE] --> 0x%08x\n",
  4477. REG_USB_CONFIGDATA,value);
  4478. #endif
  4479. return tmp_value.bitc.hbrxe;
  4480. }
  4481. GH_INLINE U8 GH_USB_get_ConfigData_BigEndian(void)
  4482. {
  4483. GH_USB_CONFIGDATA_S tmp_value;
  4484. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4485. tmp_value.all = value;
  4486. #if GH_USB_ENABLE_DEBUG_PRINT
  4487. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_BigEndian] --> 0x%08x\n",
  4488. REG_USB_CONFIGDATA,value);
  4489. #endif
  4490. return tmp_value.bitc.bigendian;
  4491. }
  4492. GH_INLINE U8 GH_USB_get_ConfigData_MPTxE(void)
  4493. {
  4494. GH_USB_CONFIGDATA_S tmp_value;
  4495. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4496. tmp_value.all = value;
  4497. #if GH_USB_ENABLE_DEBUG_PRINT
  4498. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_MPTxE] --> 0x%08x\n",
  4499. REG_USB_CONFIGDATA,value);
  4500. #endif
  4501. return tmp_value.bitc.mptxe;
  4502. }
  4503. GH_INLINE U8 GH_USB_get_ConfigData_MPRxE(void)
  4504. {
  4505. GH_USB_CONFIGDATA_S tmp_value;
  4506. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  4507. tmp_value.all = value;
  4508. #if GH_USB_ENABLE_DEBUG_PRINT
  4509. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_MPRxE] --> 0x%08x\n",
  4510. REG_USB_CONFIGDATA,value);
  4511. #endif
  4512. return tmp_value.bitc.mprxe;
  4513. }
  4514. #endif /* GH_INLINE_LEVEL == 0 */
  4515. /*----------------------------------------------------------------------------*/
  4516. /* register USB_TxMaxP (read/write) */
  4517. /*----------------------------------------------------------------------------*/
  4518. #if GH_INLINE_LEVEL == 0
  4519. /*! \brief Writes the register 'USB_TxMaxP'. */
  4520. void GH_USB_set_TxMaxP(U16 data);
  4521. /*! \brief Reads the register 'USB_TxMaxP'. */
  4522. U16 GH_USB_get_TxMaxP(void);
  4523. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_TxMaxP'. */
  4524. void GH_USB_set_TxMaxP_TxMaxP(U16 data);
  4525. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_TxMaxP'. */
  4526. U16 GH_USB_get_TxMaxP_TxMaxP(void);
  4527. /*! \brief Writes the bit group 'multiplier' of register 'USB_TxMaxP'. */
  4528. void GH_USB_set_TxMaxP_multiplier(U8 data);
  4529. /*! \brief Reads the bit group 'multiplier' of register 'USB_TxMaxP'. */
  4530. U8 GH_USB_get_TxMaxP_multiplier(void);
  4531. #else /* GH_INLINE_LEVEL == 0 */
  4532. GH_INLINE void GH_USB_set_TxMaxP(U16 data)
  4533. {
  4534. *(volatile U16 *)REG_USB_TXMAXP = data;
  4535. #if GH_USB_ENABLE_DEBUG_PRINT
  4536. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxP] <-- 0x%08x\n",
  4537. REG_USB_TXMAXP,data,data);
  4538. #endif
  4539. }
  4540. GH_INLINE U16 GH_USB_get_TxMaxP(void)
  4541. {
  4542. U16 value = (*(volatile U16 *)REG_USB_TXMAXP);
  4543. #if GH_USB_ENABLE_DEBUG_PRINT
  4544. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxP] --> 0x%08x\n",
  4545. REG_USB_TXMAXP,value);
  4546. #endif
  4547. return value;
  4548. }
  4549. GH_INLINE void GH_USB_set_TxMaxP_TxMaxP(U16 data)
  4550. {
  4551. GH_USB_TXMAXP_S d;
  4552. d.all = *(volatile U16 *)REG_USB_TXMAXP;
  4553. d.bitc.txmaxp = data;
  4554. *(volatile U16 *)REG_USB_TXMAXP = d.all;
  4555. #if GH_USB_ENABLE_DEBUG_PRINT
  4556. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxP_TxMaxP] <-- 0x%08x\n",
  4557. REG_USB_TXMAXP,d.all,d.all);
  4558. #endif
  4559. }
  4560. GH_INLINE U16 GH_USB_get_TxMaxP_TxMaxP(void)
  4561. {
  4562. GH_USB_TXMAXP_S tmp_value;
  4563. U16 value = (*(volatile U16 *)REG_USB_TXMAXP);
  4564. tmp_value.all = value;
  4565. #if GH_USB_ENABLE_DEBUG_PRINT
  4566. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxP_TxMaxP] --> 0x%08x\n",
  4567. REG_USB_TXMAXP,value);
  4568. #endif
  4569. return tmp_value.bitc.txmaxp;
  4570. }
  4571. GH_INLINE void GH_USB_set_TxMaxP_multiplier(U8 data)
  4572. {
  4573. GH_USB_TXMAXP_S d;
  4574. d.all = *(volatile U16 *)REG_USB_TXMAXP;
  4575. d.bitc.multiplier = data;
  4576. *(volatile U16 *)REG_USB_TXMAXP = d.all;
  4577. #if GH_USB_ENABLE_DEBUG_PRINT
  4578. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxP_multiplier] <-- 0x%08x\n",
  4579. REG_USB_TXMAXP,d.all,d.all);
  4580. #endif
  4581. }
  4582. GH_INLINE U8 GH_USB_get_TxMaxP_multiplier(void)
  4583. {
  4584. GH_USB_TXMAXP_S tmp_value;
  4585. U16 value = (*(volatile U16 *)REG_USB_TXMAXP);
  4586. tmp_value.all = value;
  4587. #if GH_USB_ENABLE_DEBUG_PRINT
  4588. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxP_multiplier] --> 0x%08x\n",
  4589. REG_USB_TXMAXP,value);
  4590. #endif
  4591. return tmp_value.bitc.multiplier;
  4592. }
  4593. #endif /* GH_INLINE_LEVEL == 0 */
  4594. /*----------------------------------------------------------------------------*/
  4595. /* register USB_TXCSRL_R_PERI (read) */
  4596. /*----------------------------------------------------------------------------*/
  4597. #if GH_INLINE_LEVEL == 0
  4598. /*! \brief Reads the register 'USB_TXCSRL_R_PERI'. */
  4599. U8 GH_USB_get_TXCSRL_R_PERI(void);
  4600. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_TXCSRL_R_PERI'. */
  4601. U8 GH_USB_get_TXCSRL_R_PERI_TxPktRdy(void);
  4602. /*! \brief Reads the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_R_PERI'. */
  4603. U8 GH_USB_get_TXCSRL_R_PERI_FIFONotEmpty(void);
  4604. /*! \brief Reads the bit group 'UnderRun' of register 'USB_TXCSRL_R_PERI'. */
  4605. U8 GH_USB_get_TXCSRL_R_PERI_UnderRun(void);
  4606. /*! \brief Reads the bit group 'SendStall' of register 'USB_TXCSRL_R_PERI'. */
  4607. U8 GH_USB_get_TXCSRL_R_PERI_SendStall(void);
  4608. /*! \brief Reads the bit group 'SentStall' of register 'USB_TXCSRL_R_PERI'. */
  4609. U8 GH_USB_get_TXCSRL_R_PERI_SentStall(void);
  4610. /*! \brief Reads the bit group 'IncompTx' of register 'USB_TXCSRL_R_PERI'. */
  4611. U8 GH_USB_get_TXCSRL_R_PERI_IncompTx(void);
  4612. #else /* GH_INLINE_LEVEL == 0 */
  4613. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI(void)
  4614. {
  4615. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  4616. #if GH_USB_ENABLE_DEBUG_PRINT
  4617. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI] --> 0x%08x\n",
  4618. REG_USB_TXCSRL_R_PERI,value);
  4619. #endif
  4620. return value;
  4621. }
  4622. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_TxPktRdy(void)
  4623. {
  4624. GH_USB_TXCSRL_R_PERI_S tmp_value;
  4625. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  4626. tmp_value.all = value;
  4627. #if GH_USB_ENABLE_DEBUG_PRINT
  4628. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_TxPktRdy] --> 0x%08x\n",
  4629. REG_USB_TXCSRL_R_PERI,value);
  4630. #endif
  4631. return tmp_value.bitc.txpktrdy;
  4632. }
  4633. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_FIFONotEmpty(void)
  4634. {
  4635. GH_USB_TXCSRL_R_PERI_S tmp_value;
  4636. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  4637. tmp_value.all = value;
  4638. #if GH_USB_ENABLE_DEBUG_PRINT
  4639. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_FIFONotEmpty] --> 0x%08x\n",
  4640. REG_USB_TXCSRL_R_PERI,value);
  4641. #endif
  4642. return tmp_value.bitc.fifonotempty;
  4643. }
  4644. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_UnderRun(void)
  4645. {
  4646. GH_USB_TXCSRL_R_PERI_S tmp_value;
  4647. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  4648. tmp_value.all = value;
  4649. #if GH_USB_ENABLE_DEBUG_PRINT
  4650. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_UnderRun] --> 0x%08x\n",
  4651. REG_USB_TXCSRL_R_PERI,value);
  4652. #endif
  4653. return tmp_value.bitc.underrun;
  4654. }
  4655. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_SendStall(void)
  4656. {
  4657. GH_USB_TXCSRL_R_PERI_S tmp_value;
  4658. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  4659. tmp_value.all = value;
  4660. #if GH_USB_ENABLE_DEBUG_PRINT
  4661. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_SendStall] --> 0x%08x\n",
  4662. REG_USB_TXCSRL_R_PERI,value);
  4663. #endif
  4664. return tmp_value.bitc.sendstall;
  4665. }
  4666. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_SentStall(void)
  4667. {
  4668. GH_USB_TXCSRL_R_PERI_S tmp_value;
  4669. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  4670. tmp_value.all = value;
  4671. #if GH_USB_ENABLE_DEBUG_PRINT
  4672. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_SentStall] --> 0x%08x\n",
  4673. REG_USB_TXCSRL_R_PERI,value);
  4674. #endif
  4675. return tmp_value.bitc.sentstall;
  4676. }
  4677. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_IncompTx(void)
  4678. {
  4679. GH_USB_TXCSRL_R_PERI_S tmp_value;
  4680. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  4681. tmp_value.all = value;
  4682. #if GH_USB_ENABLE_DEBUG_PRINT
  4683. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_IncompTx] --> 0x%08x\n",
  4684. REG_USB_TXCSRL_R_PERI,value);
  4685. #endif
  4686. return tmp_value.bitc.incomptx;
  4687. }
  4688. #endif /* GH_INLINE_LEVEL == 0 */
  4689. /*----------------------------------------------------------------------------*/
  4690. /* register USB_TXCSRH_R_PERI (read) */
  4691. /*----------------------------------------------------------------------------*/
  4692. #if GH_INLINE_LEVEL == 0
  4693. /*! \brief Reads the register 'USB_TXCSRH_R_PERI'. */
  4694. U8 GH_USB_get_TXCSRH_R_PERI(void);
  4695. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_TXCSRH_R_PERI'. */
  4696. U8 GH_USB_get_TXCSRH_R_PERI_DMAReqMode(void);
  4697. /*! \brief Reads the bit group 'FrcDataTog' of register 'USB_TXCSRH_R_PERI'. */
  4698. U8 GH_USB_get_TXCSRH_R_PERI_FrcDataTog(void);
  4699. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_TXCSRH_R_PERI'. */
  4700. U8 GH_USB_get_TXCSRH_R_PERI_DMAReqEnab(void);
  4701. /*! \brief Reads the bit group 'Mode' of register 'USB_TXCSRH_R_PERI'. */
  4702. U8 GH_USB_get_TXCSRH_R_PERI_Mode(void);
  4703. /*! \brief Reads the bit group 'ISO' of register 'USB_TXCSRH_R_PERI'. */
  4704. U8 GH_USB_get_TXCSRH_R_PERI_ISO(void);
  4705. /*! \brief Reads the bit group 'AutoSet' of register 'USB_TXCSRH_R_PERI'. */
  4706. U8 GH_USB_get_TXCSRH_R_PERI_AutoSet(void);
  4707. #else /* GH_INLINE_LEVEL == 0 */
  4708. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI(void)
  4709. {
  4710. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  4711. #if GH_USB_ENABLE_DEBUG_PRINT
  4712. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI] --> 0x%08x\n",
  4713. REG_USB_TXCSRH_R_PERI,value);
  4714. #endif
  4715. return value;
  4716. }
  4717. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_DMAReqMode(void)
  4718. {
  4719. GH_USB_TXCSRH_R_PERI_S tmp_value;
  4720. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  4721. tmp_value.all = value;
  4722. #if GH_USB_ENABLE_DEBUG_PRINT
  4723. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_DMAReqMode] --> 0x%08x\n",
  4724. REG_USB_TXCSRH_R_PERI,value);
  4725. #endif
  4726. return tmp_value.bitc.dmareqmode;
  4727. }
  4728. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_FrcDataTog(void)
  4729. {
  4730. GH_USB_TXCSRH_R_PERI_S tmp_value;
  4731. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  4732. tmp_value.all = value;
  4733. #if GH_USB_ENABLE_DEBUG_PRINT
  4734. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_FrcDataTog] --> 0x%08x\n",
  4735. REG_USB_TXCSRH_R_PERI,value);
  4736. #endif
  4737. return tmp_value.bitc.frcdatatog;
  4738. }
  4739. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_DMAReqEnab(void)
  4740. {
  4741. GH_USB_TXCSRH_R_PERI_S tmp_value;
  4742. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  4743. tmp_value.all = value;
  4744. #if GH_USB_ENABLE_DEBUG_PRINT
  4745. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_DMAReqEnab] --> 0x%08x\n",
  4746. REG_USB_TXCSRH_R_PERI,value);
  4747. #endif
  4748. return tmp_value.bitc.dmareqenab;
  4749. }
  4750. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_Mode(void)
  4751. {
  4752. GH_USB_TXCSRH_R_PERI_S tmp_value;
  4753. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  4754. tmp_value.all = value;
  4755. #if GH_USB_ENABLE_DEBUG_PRINT
  4756. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_Mode] --> 0x%08x\n",
  4757. REG_USB_TXCSRH_R_PERI,value);
  4758. #endif
  4759. return tmp_value.bitc.mode;
  4760. }
  4761. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_ISO(void)
  4762. {
  4763. GH_USB_TXCSRH_R_PERI_S tmp_value;
  4764. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  4765. tmp_value.all = value;
  4766. #if GH_USB_ENABLE_DEBUG_PRINT
  4767. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_ISO] --> 0x%08x\n",
  4768. REG_USB_TXCSRH_R_PERI,value);
  4769. #endif
  4770. return tmp_value.bitc.iso;
  4771. }
  4772. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_AutoSet(void)
  4773. {
  4774. GH_USB_TXCSRH_R_PERI_S tmp_value;
  4775. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  4776. tmp_value.all = value;
  4777. #if GH_USB_ENABLE_DEBUG_PRINT
  4778. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_AutoSet] --> 0x%08x\n",
  4779. REG_USB_TXCSRH_R_PERI,value);
  4780. #endif
  4781. return tmp_value.bitc.autoset;
  4782. }
  4783. #endif /* GH_INLINE_LEVEL == 0 */
  4784. /*----------------------------------------------------------------------------*/
  4785. /* register USB_TXCSRL_W_PERI (write) */
  4786. /*----------------------------------------------------------------------------*/
  4787. #if GH_INLINE_LEVEL < 2
  4788. /*! \brief Writes the register 'USB_TXCSRL_W_PERI'. */
  4789. void GH_USB_set_TXCSRL_W_PERI(U8 data);
  4790. /*! \brief Reads the mirror variable of the register 'USB_TXCSRL_W_PERI'. */
  4791. U8 GH_USB_getm_TXCSRL_W_PERI(void);
  4792. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_TXCSRL_W_PERI'. */
  4793. void GH_USB_set_TXCSRL_W_PERI_TxPktRdy(U8 data);
  4794. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4795. U8 GH_USB_getm_TXCSRL_W_PERI_TxPktRdy(void);
  4796. /*! \brief Writes the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_W_PERI'. */
  4797. void GH_USB_set_TXCSRL_W_PERI_FIFONotEmpty(U8 data);
  4798. /*! \brief Reads the bit group 'FIFONotEmpty' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4799. U8 GH_USB_getm_TXCSRL_W_PERI_FIFONotEmpty(void);
  4800. /*! \brief Writes the bit group 'UnderRun' of register 'USB_TXCSRL_W_PERI'. */
  4801. void GH_USB_set_TXCSRL_W_PERI_UnderRun(U8 data);
  4802. /*! \brief Reads the bit group 'UnderRun' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4803. U8 GH_USB_getm_TXCSRL_W_PERI_UnderRun(void);
  4804. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_TXCSRL_W_PERI'. */
  4805. void GH_USB_set_TXCSRL_W_PERI_FlushFIFO(U8 data);
  4806. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4807. U8 GH_USB_getm_TXCSRL_W_PERI_FlushFIFO(void);
  4808. /*! \brief Writes the bit group 'SendStall' of register 'USB_TXCSRL_W_PERI'. */
  4809. void GH_USB_set_TXCSRL_W_PERI_SendStall(U8 data);
  4810. /*! \brief Reads the bit group 'SendStall' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4811. U8 GH_USB_getm_TXCSRL_W_PERI_SendStall(void);
  4812. /*! \brief Writes the bit group 'SentStall' of register 'USB_TXCSRL_W_PERI'. */
  4813. void GH_USB_set_TXCSRL_W_PERI_SentStall(U8 data);
  4814. /*! \brief Reads the bit group 'SentStall' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4815. U8 GH_USB_getm_TXCSRL_W_PERI_SentStall(void);
  4816. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_TXCSRL_W_PERI'. */
  4817. void GH_USB_set_TXCSRL_W_PERI_ClrDataTog(U8 data);
  4818. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4819. U8 GH_USB_getm_TXCSRL_W_PERI_ClrDataTog(void);
  4820. /*! \brief Writes the bit group 'IncompTx' of register 'USB_TXCSRL_W_PERI'. */
  4821. void GH_USB_set_TXCSRL_W_PERI_IncompTx(U8 data);
  4822. /*! \brief Reads the bit group 'IncompTx' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  4823. U8 GH_USB_getm_TXCSRL_W_PERI_IncompTx(void);
  4824. #else /* GH_INLINE_LEVEL < 2 */
  4825. GH_INLINE void GH_USB_set_TXCSRL_W_PERI(U8 data)
  4826. {
  4827. m_usb_txcsrl_w_peri.all = data;
  4828. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = data;
  4829. #if GH_USB_ENABLE_DEBUG_PRINT
  4830. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI] <-- 0x%08x\n",
  4831. REG_USB_TXCSRL_W_PERI,data,data);
  4832. #endif
  4833. }
  4834. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI(void)
  4835. {
  4836. #if GH_USB_ENABLE_DEBUG_PRINT
  4837. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI] --> 0x%08x\n",
  4838. m_usb_txcsrl_w_peri.all);
  4839. #endif
  4840. return m_usb_txcsrl_w_peri.all;
  4841. }
  4842. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_TxPktRdy(U8 data)
  4843. {
  4844. m_usb_txcsrl_w_peri.bitc.txpktrdy = data;
  4845. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4846. #if GH_USB_ENABLE_DEBUG_PRINT
  4847. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_TxPktRdy] <-- 0x%08x\n",
  4848. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4849. #endif
  4850. }
  4851. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_TxPktRdy(void)
  4852. {
  4853. #if GH_USB_ENABLE_DEBUG_PRINT
  4854. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_TxPktRdy] --> 0x%08x\n",
  4855. m_usb_txcsrl_w_peri.bitc.txpktrdy);
  4856. #endif
  4857. return m_usb_txcsrl_w_peri.bitc.txpktrdy;
  4858. }
  4859. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_FIFONotEmpty(U8 data)
  4860. {
  4861. m_usb_txcsrl_w_peri.bitc.fifonotempty = data;
  4862. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4863. #if GH_USB_ENABLE_DEBUG_PRINT
  4864. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_FIFONotEmpty] <-- 0x%08x\n",
  4865. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4866. #endif
  4867. }
  4868. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_FIFONotEmpty(void)
  4869. {
  4870. #if GH_USB_ENABLE_DEBUG_PRINT
  4871. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_FIFONotEmpty] --> 0x%08x\n",
  4872. m_usb_txcsrl_w_peri.bitc.fifonotempty);
  4873. #endif
  4874. return m_usb_txcsrl_w_peri.bitc.fifonotempty;
  4875. }
  4876. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_UnderRun(U8 data)
  4877. {
  4878. m_usb_txcsrl_w_peri.bitc.underrun = data;
  4879. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4880. #if GH_USB_ENABLE_DEBUG_PRINT
  4881. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_UnderRun] <-- 0x%08x\n",
  4882. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4883. #endif
  4884. }
  4885. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_UnderRun(void)
  4886. {
  4887. #if GH_USB_ENABLE_DEBUG_PRINT
  4888. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_UnderRun] --> 0x%08x\n",
  4889. m_usb_txcsrl_w_peri.bitc.underrun);
  4890. #endif
  4891. return m_usb_txcsrl_w_peri.bitc.underrun;
  4892. }
  4893. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_FlushFIFO(U8 data)
  4894. {
  4895. m_usb_txcsrl_w_peri.bitc.flushfifo = data;
  4896. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4897. #if GH_USB_ENABLE_DEBUG_PRINT
  4898. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_FlushFIFO] <-- 0x%08x\n",
  4899. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4900. #endif
  4901. }
  4902. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_FlushFIFO(void)
  4903. {
  4904. #if GH_USB_ENABLE_DEBUG_PRINT
  4905. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_FlushFIFO] --> 0x%08x\n",
  4906. m_usb_txcsrl_w_peri.bitc.flushfifo);
  4907. #endif
  4908. return m_usb_txcsrl_w_peri.bitc.flushfifo;
  4909. }
  4910. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_SendStall(U8 data)
  4911. {
  4912. m_usb_txcsrl_w_peri.bitc.sendstall = data;
  4913. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4914. #if GH_USB_ENABLE_DEBUG_PRINT
  4915. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_SendStall] <-- 0x%08x\n",
  4916. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4917. #endif
  4918. }
  4919. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_SendStall(void)
  4920. {
  4921. #if GH_USB_ENABLE_DEBUG_PRINT
  4922. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_SendStall] --> 0x%08x\n",
  4923. m_usb_txcsrl_w_peri.bitc.sendstall);
  4924. #endif
  4925. return m_usb_txcsrl_w_peri.bitc.sendstall;
  4926. }
  4927. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_SentStall(U8 data)
  4928. {
  4929. m_usb_txcsrl_w_peri.bitc.sentstall = data;
  4930. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4931. #if GH_USB_ENABLE_DEBUG_PRINT
  4932. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_SentStall] <-- 0x%08x\n",
  4933. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4934. #endif
  4935. }
  4936. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_SentStall(void)
  4937. {
  4938. #if GH_USB_ENABLE_DEBUG_PRINT
  4939. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_SentStall] --> 0x%08x\n",
  4940. m_usb_txcsrl_w_peri.bitc.sentstall);
  4941. #endif
  4942. return m_usb_txcsrl_w_peri.bitc.sentstall;
  4943. }
  4944. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_ClrDataTog(U8 data)
  4945. {
  4946. m_usb_txcsrl_w_peri.bitc.clrdatatog = data;
  4947. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4948. #if GH_USB_ENABLE_DEBUG_PRINT
  4949. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_ClrDataTog] <-- 0x%08x\n",
  4950. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4951. #endif
  4952. }
  4953. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_ClrDataTog(void)
  4954. {
  4955. #if GH_USB_ENABLE_DEBUG_PRINT
  4956. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_ClrDataTog] --> 0x%08x\n",
  4957. m_usb_txcsrl_w_peri.bitc.clrdatatog);
  4958. #endif
  4959. return m_usb_txcsrl_w_peri.bitc.clrdatatog;
  4960. }
  4961. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_IncompTx(U8 data)
  4962. {
  4963. m_usb_txcsrl_w_peri.bitc.incomptx = data;
  4964. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  4965. #if GH_USB_ENABLE_DEBUG_PRINT
  4966. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_IncompTx] <-- 0x%08x\n",
  4967. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  4968. #endif
  4969. }
  4970. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_IncompTx(void)
  4971. {
  4972. #if GH_USB_ENABLE_DEBUG_PRINT
  4973. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_IncompTx] --> 0x%08x\n",
  4974. m_usb_txcsrl_w_peri.bitc.incomptx);
  4975. #endif
  4976. return m_usb_txcsrl_w_peri.bitc.incomptx;
  4977. }
  4978. #endif /* GH_INLINE_LEVEL < 2 */
  4979. /*----------------------------------------------------------------------------*/
  4980. /* register USB_TXCSRH_W_PERI (write) */
  4981. /*----------------------------------------------------------------------------*/
  4982. #if GH_INLINE_LEVEL < 2
  4983. /*! \brief Writes the register 'USB_TXCSRH_W_PERI'. */
  4984. void GH_USB_set_TXCSRH_W_PERI(U8 data);
  4985. /*! \brief Reads the mirror variable of the register 'USB_TXCSRH_W_PERI'. */
  4986. U8 GH_USB_getm_TXCSRH_W_PERI(void);
  4987. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_TXCSRH_W_PERI'. */
  4988. void GH_USB_set_TXCSRH_W_PERI_DMAReqMode(U8 data);
  4989. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  4990. U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqMode(void);
  4991. /*! \brief Writes the bit group 'FrcDataTog' of register 'USB_TXCSRH_W_PERI'. */
  4992. void GH_USB_set_TXCSRH_W_PERI_FrcDataTog(U8 data);
  4993. /*! \brief Reads the bit group 'FrcDataTog' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  4994. U8 GH_USB_getm_TXCSRH_W_PERI_FrcDataTog(void);
  4995. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_TXCSRH_W_PERI'. */
  4996. void GH_USB_set_TXCSRH_W_PERI_DMAReqEnab(U8 data);
  4997. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  4998. U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqEnab(void);
  4999. /*! \brief Writes the bit group 'Mode' of register 'USB_TXCSRH_W_PERI'. */
  5000. void GH_USB_set_TXCSRH_W_PERI_Mode(U8 data);
  5001. /*! \brief Reads the bit group 'Mode' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  5002. U8 GH_USB_getm_TXCSRH_W_PERI_Mode(void);
  5003. /*! \brief Writes the bit group 'ISO' of register 'USB_TXCSRH_W_PERI'. */
  5004. void GH_USB_set_TXCSRH_W_PERI_ISO(U8 data);
  5005. /*! \brief Reads the bit group 'ISO' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  5006. U8 GH_USB_getm_TXCSRH_W_PERI_ISO(void);
  5007. /*! \brief Writes the bit group 'AutoSet' of register 'USB_TXCSRH_W_PERI'. */
  5008. void GH_USB_set_TXCSRH_W_PERI_AutoSet(U8 data);
  5009. /*! \brief Reads the bit group 'AutoSet' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  5010. U8 GH_USB_getm_TXCSRH_W_PERI_AutoSet(void);
  5011. #else /* GH_INLINE_LEVEL < 2 */
  5012. GH_INLINE void GH_USB_set_TXCSRH_W_PERI(U8 data)
  5013. {
  5014. m_usb_txcsrh_w_peri.all = data;
  5015. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = data;
  5016. #if GH_USB_ENABLE_DEBUG_PRINT
  5017. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI] <-- 0x%08x\n",
  5018. REG_USB_TXCSRH_W_PERI,data,data);
  5019. #endif
  5020. }
  5021. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI(void)
  5022. {
  5023. #if GH_USB_ENABLE_DEBUG_PRINT
  5024. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI] --> 0x%08x\n",
  5025. m_usb_txcsrh_w_peri.all);
  5026. #endif
  5027. return m_usb_txcsrh_w_peri.all;
  5028. }
  5029. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_DMAReqMode(U8 data)
  5030. {
  5031. m_usb_txcsrh_w_peri.bitc.dmareqmode = data;
  5032. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  5033. #if GH_USB_ENABLE_DEBUG_PRINT
  5034. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_DMAReqMode] <-- 0x%08x\n",
  5035. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  5036. #endif
  5037. }
  5038. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqMode(void)
  5039. {
  5040. #if GH_USB_ENABLE_DEBUG_PRINT
  5041. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_DMAReqMode] --> 0x%08x\n",
  5042. m_usb_txcsrh_w_peri.bitc.dmareqmode);
  5043. #endif
  5044. return m_usb_txcsrh_w_peri.bitc.dmareqmode;
  5045. }
  5046. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_FrcDataTog(U8 data)
  5047. {
  5048. m_usb_txcsrh_w_peri.bitc.frcdatatog = data;
  5049. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  5050. #if GH_USB_ENABLE_DEBUG_PRINT
  5051. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_FrcDataTog] <-- 0x%08x\n",
  5052. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  5053. #endif
  5054. }
  5055. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_FrcDataTog(void)
  5056. {
  5057. #if GH_USB_ENABLE_DEBUG_PRINT
  5058. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_FrcDataTog] --> 0x%08x\n",
  5059. m_usb_txcsrh_w_peri.bitc.frcdatatog);
  5060. #endif
  5061. return m_usb_txcsrh_w_peri.bitc.frcdatatog;
  5062. }
  5063. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_DMAReqEnab(U8 data)
  5064. {
  5065. m_usb_txcsrh_w_peri.bitc.dmareqenab = data;
  5066. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  5067. #if GH_USB_ENABLE_DEBUG_PRINT
  5068. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_DMAReqEnab] <-- 0x%08x\n",
  5069. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  5070. #endif
  5071. }
  5072. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqEnab(void)
  5073. {
  5074. #if GH_USB_ENABLE_DEBUG_PRINT
  5075. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_DMAReqEnab] --> 0x%08x\n",
  5076. m_usb_txcsrh_w_peri.bitc.dmareqenab);
  5077. #endif
  5078. return m_usb_txcsrh_w_peri.bitc.dmareqenab;
  5079. }
  5080. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_Mode(U8 data)
  5081. {
  5082. m_usb_txcsrh_w_peri.bitc.mode = data;
  5083. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  5084. #if GH_USB_ENABLE_DEBUG_PRINT
  5085. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_Mode] <-- 0x%08x\n",
  5086. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  5087. #endif
  5088. }
  5089. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_Mode(void)
  5090. {
  5091. #if GH_USB_ENABLE_DEBUG_PRINT
  5092. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_Mode] --> 0x%08x\n",
  5093. m_usb_txcsrh_w_peri.bitc.mode);
  5094. #endif
  5095. return m_usb_txcsrh_w_peri.bitc.mode;
  5096. }
  5097. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_ISO(U8 data)
  5098. {
  5099. m_usb_txcsrh_w_peri.bitc.iso = data;
  5100. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  5101. #if GH_USB_ENABLE_DEBUG_PRINT
  5102. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_ISO] <-- 0x%08x\n",
  5103. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  5104. #endif
  5105. }
  5106. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_ISO(void)
  5107. {
  5108. #if GH_USB_ENABLE_DEBUG_PRINT
  5109. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_ISO] --> 0x%08x\n",
  5110. m_usb_txcsrh_w_peri.bitc.iso);
  5111. #endif
  5112. return m_usb_txcsrh_w_peri.bitc.iso;
  5113. }
  5114. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_AutoSet(U8 data)
  5115. {
  5116. m_usb_txcsrh_w_peri.bitc.autoset = data;
  5117. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  5118. #if GH_USB_ENABLE_DEBUG_PRINT
  5119. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_AutoSet] <-- 0x%08x\n",
  5120. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  5121. #endif
  5122. }
  5123. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_AutoSet(void)
  5124. {
  5125. #if GH_USB_ENABLE_DEBUG_PRINT
  5126. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_AutoSet] --> 0x%08x\n",
  5127. m_usb_txcsrh_w_peri.bitc.autoset);
  5128. #endif
  5129. return m_usb_txcsrh_w_peri.bitc.autoset;
  5130. }
  5131. #endif /* GH_INLINE_LEVEL < 2 */
  5132. /*----------------------------------------------------------------------------*/
  5133. /* register USB_TXCSRL_R_HOST (read) */
  5134. /*----------------------------------------------------------------------------*/
  5135. #if GH_INLINE_LEVEL == 0
  5136. /*! \brief Reads the register 'USB_TXCSRL_R_HOST'. */
  5137. U8 GH_USB_get_TXCSRL_R_HOST(void);
  5138. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_TXCSRL_R_HOST'. */
  5139. U8 GH_USB_get_TXCSRL_R_HOST_TxPktRdy(void);
  5140. /*! \brief Reads the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_R_HOST'. */
  5141. U8 GH_USB_get_TXCSRL_R_HOST_FIFONotEmpty(void);
  5142. /*! \brief Reads the bit group 'Error' of register 'USB_TXCSRL_R_HOST'. */
  5143. U8 GH_USB_get_TXCSRL_R_HOST_Error(void);
  5144. /*! \brief Reads the bit group 'SetupPkt' of register 'USB_TXCSRL_R_HOST'. */
  5145. U8 GH_USB_get_TXCSRL_R_HOST_SetupPkt(void);
  5146. /*! \brief Reads the bit group 'RxStall' of register 'USB_TXCSRL_R_HOST'. */
  5147. U8 GH_USB_get_TXCSRL_R_HOST_RxStall(void);
  5148. /*! \brief Reads the bit group 'IncompTx' of register 'USB_TXCSRL_R_HOST'. */
  5149. U8 GH_USB_get_TXCSRL_R_HOST_IncompTx(void);
  5150. #else /* GH_INLINE_LEVEL == 0 */
  5151. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST(void)
  5152. {
  5153. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  5154. #if GH_USB_ENABLE_DEBUG_PRINT
  5155. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST] --> 0x%08x\n",
  5156. REG_USB_TXCSRL_R_HOST,value);
  5157. #endif
  5158. return value;
  5159. }
  5160. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_TxPktRdy(void)
  5161. {
  5162. GH_USB_TXCSRL_R_HOST_S tmp_value;
  5163. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  5164. tmp_value.all = value;
  5165. #if GH_USB_ENABLE_DEBUG_PRINT
  5166. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_TxPktRdy] --> 0x%08x\n",
  5167. REG_USB_TXCSRL_R_HOST,value);
  5168. #endif
  5169. return tmp_value.bitc.txpktrdy;
  5170. }
  5171. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_FIFONotEmpty(void)
  5172. {
  5173. GH_USB_TXCSRL_R_HOST_S tmp_value;
  5174. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  5175. tmp_value.all = value;
  5176. #if GH_USB_ENABLE_DEBUG_PRINT
  5177. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_FIFONotEmpty] --> 0x%08x\n",
  5178. REG_USB_TXCSRL_R_HOST,value);
  5179. #endif
  5180. return tmp_value.bitc.fifonotempty;
  5181. }
  5182. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_Error(void)
  5183. {
  5184. GH_USB_TXCSRL_R_HOST_S tmp_value;
  5185. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  5186. tmp_value.all = value;
  5187. #if GH_USB_ENABLE_DEBUG_PRINT
  5188. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_Error] --> 0x%08x\n",
  5189. REG_USB_TXCSRL_R_HOST,value);
  5190. #endif
  5191. return tmp_value.bitc.error;
  5192. }
  5193. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_SetupPkt(void)
  5194. {
  5195. GH_USB_TXCSRL_R_HOST_S tmp_value;
  5196. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  5197. tmp_value.all = value;
  5198. #if GH_USB_ENABLE_DEBUG_PRINT
  5199. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_SetupPkt] --> 0x%08x\n",
  5200. REG_USB_TXCSRL_R_HOST,value);
  5201. #endif
  5202. return tmp_value.bitc.setuppkt;
  5203. }
  5204. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_RxStall(void)
  5205. {
  5206. GH_USB_TXCSRL_R_HOST_S tmp_value;
  5207. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  5208. tmp_value.all = value;
  5209. #if GH_USB_ENABLE_DEBUG_PRINT
  5210. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_RxStall] --> 0x%08x\n",
  5211. REG_USB_TXCSRL_R_HOST,value);
  5212. #endif
  5213. return tmp_value.bitc.rxstall;
  5214. }
  5215. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_IncompTx(void)
  5216. {
  5217. GH_USB_TXCSRL_R_HOST_S tmp_value;
  5218. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  5219. tmp_value.all = value;
  5220. #if GH_USB_ENABLE_DEBUG_PRINT
  5221. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_IncompTx] --> 0x%08x\n",
  5222. REG_USB_TXCSRL_R_HOST,value);
  5223. #endif
  5224. return tmp_value.bitc.incomptx;
  5225. }
  5226. #endif /* GH_INLINE_LEVEL == 0 */
  5227. /*----------------------------------------------------------------------------*/
  5228. /* register USB_TXCSRH_R_HOST (read) */
  5229. /*----------------------------------------------------------------------------*/
  5230. #if GH_INLINE_LEVEL == 0
  5231. /*! \brief Reads the register 'USB_TXCSRH_R_HOST'. */
  5232. U8 GH_USB_get_TXCSRH_R_HOST(void);
  5233. /*! \brief Reads the bit group 'DataToggle' of register 'USB_TXCSRH_R_HOST'. */
  5234. U8 GH_USB_get_TXCSRH_R_HOST_DataToggle(void);
  5235. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_TXCSRH_R_HOST'. */
  5236. U8 GH_USB_get_TXCSRH_R_HOST_DMAReqMode(void);
  5237. /*! \brief Reads the bit group 'FrcDataTog' of register 'USB_TXCSRH_R_HOST'. */
  5238. U8 GH_USB_get_TXCSRH_R_HOST_FrcDataTog(void);
  5239. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_TXCSRH_R_HOST'. */
  5240. U8 GH_USB_get_TXCSRH_R_HOST_DMAReqEnab(void);
  5241. /*! \brief Reads the bit group 'Mode' of register 'USB_TXCSRH_R_HOST'. */
  5242. U8 GH_USB_get_TXCSRH_R_HOST_Mode(void);
  5243. /*! \brief Reads the bit group 'AutoSet' of register 'USB_TXCSRH_R_HOST'. */
  5244. U8 GH_USB_get_TXCSRH_R_HOST_AutoSet(void);
  5245. #else /* GH_INLINE_LEVEL == 0 */
  5246. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST(void)
  5247. {
  5248. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  5249. #if GH_USB_ENABLE_DEBUG_PRINT
  5250. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST] --> 0x%08x\n",
  5251. REG_USB_TXCSRH_R_HOST,value);
  5252. #endif
  5253. return value;
  5254. }
  5255. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_DataToggle(void)
  5256. {
  5257. GH_USB_TXCSRH_R_HOST_S tmp_value;
  5258. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  5259. tmp_value.all = value;
  5260. #if GH_USB_ENABLE_DEBUG_PRINT
  5261. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_DataToggle] --> 0x%08x\n",
  5262. REG_USB_TXCSRH_R_HOST,value);
  5263. #endif
  5264. return tmp_value.bitc.datatoggle;
  5265. }
  5266. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_DMAReqMode(void)
  5267. {
  5268. GH_USB_TXCSRH_R_HOST_S tmp_value;
  5269. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  5270. tmp_value.all = value;
  5271. #if GH_USB_ENABLE_DEBUG_PRINT
  5272. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_DMAReqMode] --> 0x%08x\n",
  5273. REG_USB_TXCSRH_R_HOST,value);
  5274. #endif
  5275. return tmp_value.bitc.dmareqmode;
  5276. }
  5277. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_FrcDataTog(void)
  5278. {
  5279. GH_USB_TXCSRH_R_HOST_S tmp_value;
  5280. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  5281. tmp_value.all = value;
  5282. #if GH_USB_ENABLE_DEBUG_PRINT
  5283. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_FrcDataTog] --> 0x%08x\n",
  5284. REG_USB_TXCSRH_R_HOST,value);
  5285. #endif
  5286. return tmp_value.bitc.frcdatatog;
  5287. }
  5288. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_DMAReqEnab(void)
  5289. {
  5290. GH_USB_TXCSRH_R_HOST_S tmp_value;
  5291. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  5292. tmp_value.all = value;
  5293. #if GH_USB_ENABLE_DEBUG_PRINT
  5294. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_DMAReqEnab] --> 0x%08x\n",
  5295. REG_USB_TXCSRH_R_HOST,value);
  5296. #endif
  5297. return tmp_value.bitc.dmareqenab;
  5298. }
  5299. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_Mode(void)
  5300. {
  5301. GH_USB_TXCSRH_R_HOST_S tmp_value;
  5302. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  5303. tmp_value.all = value;
  5304. #if GH_USB_ENABLE_DEBUG_PRINT
  5305. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_Mode] --> 0x%08x\n",
  5306. REG_USB_TXCSRH_R_HOST,value);
  5307. #endif
  5308. return tmp_value.bitc.mode;
  5309. }
  5310. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_AutoSet(void)
  5311. {
  5312. GH_USB_TXCSRH_R_HOST_S tmp_value;
  5313. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  5314. tmp_value.all = value;
  5315. #if GH_USB_ENABLE_DEBUG_PRINT
  5316. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_AutoSet] --> 0x%08x\n",
  5317. REG_USB_TXCSRH_R_HOST,value);
  5318. #endif
  5319. return tmp_value.bitc.autoset;
  5320. }
  5321. #endif /* GH_INLINE_LEVEL == 0 */
  5322. /*----------------------------------------------------------------------------*/
  5323. /* register USB_TXCSRL_W_HOST (write) */
  5324. /*----------------------------------------------------------------------------*/
  5325. #if GH_INLINE_LEVEL < 2
  5326. /*! \brief Writes the register 'USB_TXCSRL_W_HOST'. */
  5327. void GH_USB_set_TXCSRL_W_HOST(U8 data);
  5328. /*! \brief Reads the mirror variable of the register 'USB_TXCSRL_W_HOST'. */
  5329. U8 GH_USB_getm_TXCSRL_W_HOST(void);
  5330. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_TXCSRL_W_HOST'. */
  5331. void GH_USB_set_TXCSRL_W_HOST_TxPktRdy(U8 data);
  5332. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5333. U8 GH_USB_getm_TXCSRL_W_HOST_TxPktRdy(void);
  5334. /*! \brief Writes the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_W_HOST'. */
  5335. void GH_USB_set_TXCSRL_W_HOST_FIFONotEmpty(U8 data);
  5336. /*! \brief Reads the bit group 'FIFONotEmpty' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5337. U8 GH_USB_getm_TXCSRL_W_HOST_FIFONotEmpty(void);
  5338. /*! \brief Writes the bit group 'Error' of register 'USB_TXCSRL_W_HOST'. */
  5339. void GH_USB_set_TXCSRL_W_HOST_Error(U8 data);
  5340. /*! \brief Reads the bit group 'Error' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5341. U8 GH_USB_getm_TXCSRL_W_HOST_Error(void);
  5342. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_TXCSRL_W_HOST'. */
  5343. void GH_USB_set_TXCSRL_W_HOST_FlushFIFO(U8 data);
  5344. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5345. U8 GH_USB_getm_TXCSRL_W_HOST_FlushFIFO(void);
  5346. /*! \brief Writes the bit group 'SetupPkt' of register 'USB_TXCSRL_W_HOST'. */
  5347. void GH_USB_set_TXCSRL_W_HOST_SetupPkt(U8 data);
  5348. /*! \brief Reads the bit group 'SetupPkt' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5349. U8 GH_USB_getm_TXCSRL_W_HOST_SetupPkt(void);
  5350. /*! \brief Writes the bit group 'RxStall' of register 'USB_TXCSRL_W_HOST'. */
  5351. void GH_USB_set_TXCSRL_W_HOST_RxStall(U8 data);
  5352. /*! \brief Reads the bit group 'RxStall' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5353. U8 GH_USB_getm_TXCSRL_W_HOST_RxStall(void);
  5354. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_TXCSRL_W_HOST'. */
  5355. void GH_USB_set_TXCSRL_W_HOST_ClrDataTog(U8 data);
  5356. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5357. U8 GH_USB_getm_TXCSRL_W_HOST_ClrDataTog(void);
  5358. /*! \brief Writes the bit group 'IncompTx' of register 'USB_TXCSRL_W_HOST'. */
  5359. void GH_USB_set_TXCSRL_W_HOST_IncompTx(U8 data);
  5360. /*! \brief Reads the bit group 'IncompTx' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  5361. U8 GH_USB_getm_TXCSRL_W_HOST_IncompTx(void);
  5362. #else /* GH_INLINE_LEVEL < 2 */
  5363. GH_INLINE void GH_USB_set_TXCSRL_W_HOST(U8 data)
  5364. {
  5365. m_usb_txcsrl_w_host.all = data;
  5366. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = data;
  5367. #if GH_USB_ENABLE_DEBUG_PRINT
  5368. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST] <-- 0x%08x\n",
  5369. REG_USB_TXCSRL_W_HOST,data,data);
  5370. #endif
  5371. }
  5372. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST(void)
  5373. {
  5374. #if GH_USB_ENABLE_DEBUG_PRINT
  5375. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST] --> 0x%08x\n",
  5376. m_usb_txcsrl_w_host.all);
  5377. #endif
  5378. return m_usb_txcsrl_w_host.all;
  5379. }
  5380. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_TxPktRdy(U8 data)
  5381. {
  5382. m_usb_txcsrl_w_host.bitc.txpktrdy = data;
  5383. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5384. #if GH_USB_ENABLE_DEBUG_PRINT
  5385. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_TxPktRdy] <-- 0x%08x\n",
  5386. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5387. #endif
  5388. }
  5389. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_TxPktRdy(void)
  5390. {
  5391. #if GH_USB_ENABLE_DEBUG_PRINT
  5392. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_TxPktRdy] --> 0x%08x\n",
  5393. m_usb_txcsrl_w_host.bitc.txpktrdy);
  5394. #endif
  5395. return m_usb_txcsrl_w_host.bitc.txpktrdy;
  5396. }
  5397. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_FIFONotEmpty(U8 data)
  5398. {
  5399. m_usb_txcsrl_w_host.bitc.fifonotempty = data;
  5400. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5401. #if GH_USB_ENABLE_DEBUG_PRINT
  5402. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_FIFONotEmpty] <-- 0x%08x\n",
  5403. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5404. #endif
  5405. }
  5406. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_FIFONotEmpty(void)
  5407. {
  5408. #if GH_USB_ENABLE_DEBUG_PRINT
  5409. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_FIFONotEmpty] --> 0x%08x\n",
  5410. m_usb_txcsrl_w_host.bitc.fifonotempty);
  5411. #endif
  5412. return m_usb_txcsrl_w_host.bitc.fifonotempty;
  5413. }
  5414. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_Error(U8 data)
  5415. {
  5416. m_usb_txcsrl_w_host.bitc.error = data;
  5417. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5418. #if GH_USB_ENABLE_DEBUG_PRINT
  5419. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_Error] <-- 0x%08x\n",
  5420. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5421. #endif
  5422. }
  5423. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_Error(void)
  5424. {
  5425. #if GH_USB_ENABLE_DEBUG_PRINT
  5426. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_Error] --> 0x%08x\n",
  5427. m_usb_txcsrl_w_host.bitc.error);
  5428. #endif
  5429. return m_usb_txcsrl_w_host.bitc.error;
  5430. }
  5431. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_FlushFIFO(U8 data)
  5432. {
  5433. m_usb_txcsrl_w_host.bitc.flushfifo = data;
  5434. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5435. #if GH_USB_ENABLE_DEBUG_PRINT
  5436. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_FlushFIFO] <-- 0x%08x\n",
  5437. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5438. #endif
  5439. }
  5440. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_FlushFIFO(void)
  5441. {
  5442. #if GH_USB_ENABLE_DEBUG_PRINT
  5443. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_FlushFIFO] --> 0x%08x\n",
  5444. m_usb_txcsrl_w_host.bitc.flushfifo);
  5445. #endif
  5446. return m_usb_txcsrl_w_host.bitc.flushfifo;
  5447. }
  5448. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_SetupPkt(U8 data)
  5449. {
  5450. m_usb_txcsrl_w_host.bitc.setuppkt = data;
  5451. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5452. #if GH_USB_ENABLE_DEBUG_PRINT
  5453. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_SetupPkt] <-- 0x%08x\n",
  5454. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5455. #endif
  5456. }
  5457. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_SetupPkt(void)
  5458. {
  5459. #if GH_USB_ENABLE_DEBUG_PRINT
  5460. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_SetupPkt] --> 0x%08x\n",
  5461. m_usb_txcsrl_w_host.bitc.setuppkt);
  5462. #endif
  5463. return m_usb_txcsrl_w_host.bitc.setuppkt;
  5464. }
  5465. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_RxStall(U8 data)
  5466. {
  5467. m_usb_txcsrl_w_host.bitc.rxstall = data;
  5468. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5469. #if GH_USB_ENABLE_DEBUG_PRINT
  5470. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_RxStall] <-- 0x%08x\n",
  5471. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5472. #endif
  5473. }
  5474. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_RxStall(void)
  5475. {
  5476. #if GH_USB_ENABLE_DEBUG_PRINT
  5477. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_RxStall] --> 0x%08x\n",
  5478. m_usb_txcsrl_w_host.bitc.rxstall);
  5479. #endif
  5480. return m_usb_txcsrl_w_host.bitc.rxstall;
  5481. }
  5482. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_ClrDataTog(U8 data)
  5483. {
  5484. m_usb_txcsrl_w_host.bitc.clrdatatog = data;
  5485. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5486. #if GH_USB_ENABLE_DEBUG_PRINT
  5487. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_ClrDataTog] <-- 0x%08x\n",
  5488. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5489. #endif
  5490. }
  5491. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_ClrDataTog(void)
  5492. {
  5493. #if GH_USB_ENABLE_DEBUG_PRINT
  5494. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_ClrDataTog] --> 0x%08x\n",
  5495. m_usb_txcsrl_w_host.bitc.clrdatatog);
  5496. #endif
  5497. return m_usb_txcsrl_w_host.bitc.clrdatatog;
  5498. }
  5499. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_IncompTx(U8 data)
  5500. {
  5501. m_usb_txcsrl_w_host.bitc.incomptx = data;
  5502. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  5503. #if GH_USB_ENABLE_DEBUG_PRINT
  5504. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_IncompTx] <-- 0x%08x\n",
  5505. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  5506. #endif
  5507. }
  5508. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_IncompTx(void)
  5509. {
  5510. #if GH_USB_ENABLE_DEBUG_PRINT
  5511. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_IncompTx] --> 0x%08x\n",
  5512. m_usb_txcsrl_w_host.bitc.incomptx);
  5513. #endif
  5514. return m_usb_txcsrl_w_host.bitc.incomptx;
  5515. }
  5516. #endif /* GH_INLINE_LEVEL < 2 */
  5517. /*----------------------------------------------------------------------------*/
  5518. /* register USB_TXCSRH_W_HOST (write) */
  5519. /*----------------------------------------------------------------------------*/
  5520. #if GH_INLINE_LEVEL < 2
  5521. /*! \brief Writes the register 'USB_TXCSRH_W_HOST'. */
  5522. void GH_USB_set_TXCSRH_W_HOST(U8 data);
  5523. /*! \brief Reads the mirror variable of the register 'USB_TXCSRH_W_HOST'. */
  5524. U8 GH_USB_getm_TXCSRH_W_HOST(void);
  5525. /*! \brief Writes the bit group 'DataToggle' of register 'USB_TXCSRH_W_HOST'. */
  5526. void GH_USB_set_TXCSRH_W_HOST_DataToggle(U8 data);
  5527. /*! \brief Reads the bit group 'DataToggle' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  5528. U8 GH_USB_getm_TXCSRH_W_HOST_DataToggle(void);
  5529. /*! \brief Writes the bit group 'DataToggleWriteEnable' of register 'USB_TXCSRH_W_HOST'. */
  5530. void GH_USB_set_TXCSRH_W_HOST_DataToggleWriteEnable(U8 data);
  5531. /*! \brief Reads the bit group 'DataToggleWriteEnable' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  5532. U8 GH_USB_getm_TXCSRH_W_HOST_DataToggleWriteEnable(void);
  5533. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_TXCSRH_W_HOST'. */
  5534. void GH_USB_set_TXCSRH_W_HOST_DMAReqMode(U8 data);
  5535. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  5536. U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqMode(void);
  5537. /*! \brief Writes the bit group 'FrcDataTog' of register 'USB_TXCSRH_W_HOST'. */
  5538. void GH_USB_set_TXCSRH_W_HOST_FrcDataTog(U8 data);
  5539. /*! \brief Reads the bit group 'FrcDataTog' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  5540. U8 GH_USB_getm_TXCSRH_W_HOST_FrcDataTog(void);
  5541. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_TXCSRH_W_HOST'. */
  5542. void GH_USB_set_TXCSRH_W_HOST_DMAReqEnab(U8 data);
  5543. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  5544. U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqEnab(void);
  5545. /*! \brief Writes the bit group 'Mode' of register 'USB_TXCSRH_W_HOST'. */
  5546. void GH_USB_set_TXCSRH_W_HOST_Mode(U8 data);
  5547. /*! \brief Reads the bit group 'Mode' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  5548. U8 GH_USB_getm_TXCSRH_W_HOST_Mode(void);
  5549. /*! \brief Writes the bit group 'AutoSet' of register 'USB_TXCSRH_W_HOST'. */
  5550. void GH_USB_set_TXCSRH_W_HOST_AutoSet(U8 data);
  5551. /*! \brief Reads the bit group 'AutoSet' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  5552. U8 GH_USB_getm_TXCSRH_W_HOST_AutoSet(void);
  5553. #else /* GH_INLINE_LEVEL < 2 */
  5554. GH_INLINE void GH_USB_set_TXCSRH_W_HOST(U8 data)
  5555. {
  5556. m_usb_txcsrh_w_host.all = data;
  5557. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = data;
  5558. #if GH_USB_ENABLE_DEBUG_PRINT
  5559. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST] <-- 0x%08x\n",
  5560. REG_USB_TXCSRH_W_HOST,data,data);
  5561. #endif
  5562. }
  5563. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST(void)
  5564. {
  5565. #if GH_USB_ENABLE_DEBUG_PRINT
  5566. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST] --> 0x%08x\n",
  5567. m_usb_txcsrh_w_host.all);
  5568. #endif
  5569. return m_usb_txcsrh_w_host.all;
  5570. }
  5571. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DataToggle(U8 data)
  5572. {
  5573. m_usb_txcsrh_w_host.bitc.datatoggle = data;
  5574. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  5575. #if GH_USB_ENABLE_DEBUG_PRINT
  5576. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DataToggle] <-- 0x%08x\n",
  5577. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  5578. #endif
  5579. }
  5580. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DataToggle(void)
  5581. {
  5582. #if GH_USB_ENABLE_DEBUG_PRINT
  5583. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DataToggle] --> 0x%08x\n",
  5584. m_usb_txcsrh_w_host.bitc.datatoggle);
  5585. #endif
  5586. return m_usb_txcsrh_w_host.bitc.datatoggle;
  5587. }
  5588. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DataToggleWriteEnable(U8 data)
  5589. {
  5590. m_usb_txcsrh_w_host.bitc.datatogglewriteenable = data;
  5591. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  5592. #if GH_USB_ENABLE_DEBUG_PRINT
  5593. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DataToggleWriteEnable] <-- 0x%08x\n",
  5594. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  5595. #endif
  5596. }
  5597. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DataToggleWriteEnable(void)
  5598. {
  5599. #if GH_USB_ENABLE_DEBUG_PRINT
  5600. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DataToggleWriteEnable] --> 0x%08x\n",
  5601. m_usb_txcsrh_w_host.bitc.datatogglewriteenable);
  5602. #endif
  5603. return m_usb_txcsrh_w_host.bitc.datatogglewriteenable;
  5604. }
  5605. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DMAReqMode(U8 data)
  5606. {
  5607. m_usb_txcsrh_w_host.bitc.dmareqmode = data;
  5608. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  5609. #if GH_USB_ENABLE_DEBUG_PRINT
  5610. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DMAReqMode] <-- 0x%08x\n",
  5611. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  5612. #endif
  5613. }
  5614. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqMode(void)
  5615. {
  5616. #if GH_USB_ENABLE_DEBUG_PRINT
  5617. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DMAReqMode] --> 0x%08x\n",
  5618. m_usb_txcsrh_w_host.bitc.dmareqmode);
  5619. #endif
  5620. return m_usb_txcsrh_w_host.bitc.dmareqmode;
  5621. }
  5622. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_FrcDataTog(U8 data)
  5623. {
  5624. m_usb_txcsrh_w_host.bitc.frcdatatog = data;
  5625. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  5626. #if GH_USB_ENABLE_DEBUG_PRINT
  5627. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_FrcDataTog] <-- 0x%08x\n",
  5628. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  5629. #endif
  5630. }
  5631. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_FrcDataTog(void)
  5632. {
  5633. #if GH_USB_ENABLE_DEBUG_PRINT
  5634. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_FrcDataTog] --> 0x%08x\n",
  5635. m_usb_txcsrh_w_host.bitc.frcdatatog);
  5636. #endif
  5637. return m_usb_txcsrh_w_host.bitc.frcdatatog;
  5638. }
  5639. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DMAReqEnab(U8 data)
  5640. {
  5641. m_usb_txcsrh_w_host.bitc.dmareqenab = data;
  5642. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  5643. #if GH_USB_ENABLE_DEBUG_PRINT
  5644. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DMAReqEnab] <-- 0x%08x\n",
  5645. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  5646. #endif
  5647. }
  5648. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqEnab(void)
  5649. {
  5650. #if GH_USB_ENABLE_DEBUG_PRINT
  5651. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DMAReqEnab] --> 0x%08x\n",
  5652. m_usb_txcsrh_w_host.bitc.dmareqenab);
  5653. #endif
  5654. return m_usb_txcsrh_w_host.bitc.dmareqenab;
  5655. }
  5656. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_Mode(U8 data)
  5657. {
  5658. m_usb_txcsrh_w_host.bitc.mode = data;
  5659. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  5660. #if GH_USB_ENABLE_DEBUG_PRINT
  5661. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_Mode] <-- 0x%08x\n",
  5662. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  5663. #endif
  5664. }
  5665. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_Mode(void)
  5666. {
  5667. #if GH_USB_ENABLE_DEBUG_PRINT
  5668. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_Mode] --> 0x%08x\n",
  5669. m_usb_txcsrh_w_host.bitc.mode);
  5670. #endif
  5671. return m_usb_txcsrh_w_host.bitc.mode;
  5672. }
  5673. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_AutoSet(U8 data)
  5674. {
  5675. m_usb_txcsrh_w_host.bitc.autoset = data;
  5676. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  5677. #if GH_USB_ENABLE_DEBUG_PRINT
  5678. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_AutoSet] <-- 0x%08x\n",
  5679. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  5680. #endif
  5681. }
  5682. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_AutoSet(void)
  5683. {
  5684. #if GH_USB_ENABLE_DEBUG_PRINT
  5685. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_AutoSet] --> 0x%08x\n",
  5686. m_usb_txcsrh_w_host.bitc.autoset);
  5687. #endif
  5688. return m_usb_txcsrh_w_host.bitc.autoset;
  5689. }
  5690. #endif /* GH_INLINE_LEVEL < 2 */
  5691. /*----------------------------------------------------------------------------*/
  5692. /* register USB_RxMaxP (read/write) */
  5693. /*----------------------------------------------------------------------------*/
  5694. #if GH_INLINE_LEVEL == 0
  5695. /*! \brief Writes the register 'USB_RxMaxP'. */
  5696. void GH_USB_set_RxMaxP(U16 data);
  5697. /*! \brief Reads the register 'USB_RxMaxP'. */
  5698. U16 GH_USB_get_RxMaxP(void);
  5699. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_RxMaxP'. */
  5700. void GH_USB_set_RxMaxP_TxMaxP(U16 data);
  5701. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_RxMaxP'. */
  5702. U16 GH_USB_get_RxMaxP_TxMaxP(void);
  5703. /*! \brief Writes the bit group 'multiplier' of register 'USB_RxMaxP'. */
  5704. void GH_USB_set_RxMaxP_multiplier(U8 data);
  5705. /*! \brief Reads the bit group 'multiplier' of register 'USB_RxMaxP'. */
  5706. U8 GH_USB_get_RxMaxP_multiplier(void);
  5707. #else /* GH_INLINE_LEVEL == 0 */
  5708. GH_INLINE void GH_USB_set_RxMaxP(U16 data)
  5709. {
  5710. *(volatile U16 *)REG_USB_RXMAXP = data;
  5711. #if GH_USB_ENABLE_DEBUG_PRINT
  5712. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxP] <-- 0x%08x\n",
  5713. REG_USB_RXMAXP,data,data);
  5714. #endif
  5715. }
  5716. GH_INLINE U16 GH_USB_get_RxMaxP(void)
  5717. {
  5718. U16 value = (*(volatile U16 *)REG_USB_RXMAXP);
  5719. #if GH_USB_ENABLE_DEBUG_PRINT
  5720. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxP] --> 0x%08x\n",
  5721. REG_USB_RXMAXP,value);
  5722. #endif
  5723. return value;
  5724. }
  5725. GH_INLINE void GH_USB_set_RxMaxP_TxMaxP(U16 data)
  5726. {
  5727. GH_USB_RXMAXP_S d;
  5728. d.all = *(volatile U16 *)REG_USB_RXMAXP;
  5729. d.bitc.txmaxp = data;
  5730. *(volatile U16 *)REG_USB_RXMAXP = d.all;
  5731. #if GH_USB_ENABLE_DEBUG_PRINT
  5732. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxP_TxMaxP] <-- 0x%08x\n",
  5733. REG_USB_RXMAXP,d.all,d.all);
  5734. #endif
  5735. }
  5736. GH_INLINE U16 GH_USB_get_RxMaxP_TxMaxP(void)
  5737. {
  5738. GH_USB_RXMAXP_S tmp_value;
  5739. U16 value = (*(volatile U16 *)REG_USB_RXMAXP);
  5740. tmp_value.all = value;
  5741. #if GH_USB_ENABLE_DEBUG_PRINT
  5742. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxP_TxMaxP] --> 0x%08x\n",
  5743. REG_USB_RXMAXP,value);
  5744. #endif
  5745. return tmp_value.bitc.txmaxp;
  5746. }
  5747. GH_INLINE void GH_USB_set_RxMaxP_multiplier(U8 data)
  5748. {
  5749. GH_USB_RXMAXP_S d;
  5750. d.all = *(volatile U16 *)REG_USB_RXMAXP;
  5751. d.bitc.multiplier = data;
  5752. *(volatile U16 *)REG_USB_RXMAXP = d.all;
  5753. #if GH_USB_ENABLE_DEBUG_PRINT
  5754. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxP_multiplier] <-- 0x%08x\n",
  5755. REG_USB_RXMAXP,d.all,d.all);
  5756. #endif
  5757. }
  5758. GH_INLINE U8 GH_USB_get_RxMaxP_multiplier(void)
  5759. {
  5760. GH_USB_RXMAXP_S tmp_value;
  5761. U16 value = (*(volatile U16 *)REG_USB_RXMAXP);
  5762. tmp_value.all = value;
  5763. #if GH_USB_ENABLE_DEBUG_PRINT
  5764. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxP_multiplier] --> 0x%08x\n",
  5765. REG_USB_RXMAXP,value);
  5766. #endif
  5767. return tmp_value.bitc.multiplier;
  5768. }
  5769. #endif /* GH_INLINE_LEVEL == 0 */
  5770. /*----------------------------------------------------------------------------*/
  5771. /* register USB_RXCSRL_R_PERI (read) */
  5772. /*----------------------------------------------------------------------------*/
  5773. #if GH_INLINE_LEVEL == 0
  5774. /*! \brief Reads the register 'USB_RXCSRL_R_PERI'. */
  5775. U8 GH_USB_get_RXCSRL_R_PERI(void);
  5776. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_RXCSRL_R_PERI'. */
  5777. U8 GH_USB_get_RXCSRL_R_PERI_RxPktRdy(void);
  5778. /*! \brief Reads the bit group 'FIFOFull' of register 'USB_RXCSRL_R_PERI'. */
  5779. U8 GH_USB_get_RXCSRL_R_PERI_FIFOFull(void);
  5780. /*! \brief Reads the bit group 'OverRun' of register 'USB_RXCSRL_R_PERI'. */
  5781. U8 GH_USB_get_RXCSRL_R_PERI_OverRun(void);
  5782. /*! \brief Reads the bit group 'DataError' of register 'USB_RXCSRL_R_PERI'. */
  5783. U8 GH_USB_get_RXCSRL_R_PERI_DataError(void);
  5784. /*! \brief Reads the bit group 'SendStall' of register 'USB_RXCSRL_R_PERI'. */
  5785. U8 GH_USB_get_RXCSRL_R_PERI_SendStall(void);
  5786. /*! \brief Reads the bit group 'SentStall' of register 'USB_RXCSRL_R_PERI'. */
  5787. U8 GH_USB_get_RXCSRL_R_PERI_SentStall(void);
  5788. #else /* GH_INLINE_LEVEL == 0 */
  5789. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI(void)
  5790. {
  5791. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  5792. #if GH_USB_ENABLE_DEBUG_PRINT
  5793. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI] --> 0x%08x\n",
  5794. REG_USB_RXCSRL_R_PERI,value);
  5795. #endif
  5796. return value;
  5797. }
  5798. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_RxPktRdy(void)
  5799. {
  5800. GH_USB_RXCSRL_R_PERI_S tmp_value;
  5801. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  5802. tmp_value.all = value;
  5803. #if GH_USB_ENABLE_DEBUG_PRINT
  5804. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_RxPktRdy] --> 0x%08x\n",
  5805. REG_USB_RXCSRL_R_PERI,value);
  5806. #endif
  5807. return tmp_value.bitc.rxpktrdy;
  5808. }
  5809. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_FIFOFull(void)
  5810. {
  5811. GH_USB_RXCSRL_R_PERI_S tmp_value;
  5812. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  5813. tmp_value.all = value;
  5814. #if GH_USB_ENABLE_DEBUG_PRINT
  5815. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_FIFOFull] --> 0x%08x\n",
  5816. REG_USB_RXCSRL_R_PERI,value);
  5817. #endif
  5818. return tmp_value.bitc.fifofull;
  5819. }
  5820. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_OverRun(void)
  5821. {
  5822. GH_USB_RXCSRL_R_PERI_S tmp_value;
  5823. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  5824. tmp_value.all = value;
  5825. #if GH_USB_ENABLE_DEBUG_PRINT
  5826. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_OverRun] --> 0x%08x\n",
  5827. REG_USB_RXCSRL_R_PERI,value);
  5828. #endif
  5829. return tmp_value.bitc.overrun;
  5830. }
  5831. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_DataError(void)
  5832. {
  5833. GH_USB_RXCSRL_R_PERI_S tmp_value;
  5834. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  5835. tmp_value.all = value;
  5836. #if GH_USB_ENABLE_DEBUG_PRINT
  5837. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_DataError] --> 0x%08x\n",
  5838. REG_USB_RXCSRL_R_PERI,value);
  5839. #endif
  5840. return tmp_value.bitc.dataerror;
  5841. }
  5842. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_SendStall(void)
  5843. {
  5844. GH_USB_RXCSRL_R_PERI_S tmp_value;
  5845. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  5846. tmp_value.all = value;
  5847. #if GH_USB_ENABLE_DEBUG_PRINT
  5848. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_SendStall] --> 0x%08x\n",
  5849. REG_USB_RXCSRL_R_PERI,value);
  5850. #endif
  5851. return tmp_value.bitc.sendstall;
  5852. }
  5853. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_SentStall(void)
  5854. {
  5855. GH_USB_RXCSRL_R_PERI_S tmp_value;
  5856. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  5857. tmp_value.all = value;
  5858. #if GH_USB_ENABLE_DEBUG_PRINT
  5859. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_SentStall] --> 0x%08x\n",
  5860. REG_USB_RXCSRL_R_PERI,value);
  5861. #endif
  5862. return tmp_value.bitc.sentstall;
  5863. }
  5864. #endif /* GH_INLINE_LEVEL == 0 */
  5865. /*----------------------------------------------------------------------------*/
  5866. /* register USB_RXCSRH_R_PERI (read) */
  5867. /*----------------------------------------------------------------------------*/
  5868. #if GH_INLINE_LEVEL == 0
  5869. /*! \brief Reads the register 'USB_RXCSRH_R_PERI'. */
  5870. U8 GH_USB_get_RXCSRH_R_PERI(void);
  5871. /*! \brief Reads the bit group 'IncompRx' of register 'USB_RXCSRH_R_PERI'. */
  5872. U8 GH_USB_get_RXCSRH_R_PERI_IncompRx(void);
  5873. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_RXCSRH_R_PERI'. */
  5874. U8 GH_USB_get_RXCSRH_R_PERI_DMAReqMode(void);
  5875. /*! \brief Reads the bit group 'DisNyet_PIDError' of register 'USB_RXCSRH_R_PERI'. */
  5876. U8 GH_USB_get_RXCSRH_R_PERI_DisNyet_PIDError(void);
  5877. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_RXCSRH_R_PERI'. */
  5878. U8 GH_USB_get_RXCSRH_R_PERI_DMAReqEnab(void);
  5879. /*! \brief Reads the bit group 'ISO' of register 'USB_RXCSRH_R_PERI'. */
  5880. U8 GH_USB_get_RXCSRH_R_PERI_ISO(void);
  5881. /*! \brief Reads the bit group 'AutoClear' of register 'USB_RXCSRH_R_PERI'. */
  5882. U8 GH_USB_get_RXCSRH_R_PERI_AutoClear(void);
  5883. #else /* GH_INLINE_LEVEL == 0 */
  5884. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI(void)
  5885. {
  5886. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  5887. #if GH_USB_ENABLE_DEBUG_PRINT
  5888. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI] --> 0x%08x\n",
  5889. REG_USB_RXCSRH_R_PERI,value);
  5890. #endif
  5891. return value;
  5892. }
  5893. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_IncompRx(void)
  5894. {
  5895. GH_USB_RXCSRH_R_PERI_S tmp_value;
  5896. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  5897. tmp_value.all = value;
  5898. #if GH_USB_ENABLE_DEBUG_PRINT
  5899. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_IncompRx] --> 0x%08x\n",
  5900. REG_USB_RXCSRH_R_PERI,value);
  5901. #endif
  5902. return tmp_value.bitc.incomprx;
  5903. }
  5904. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_DMAReqMode(void)
  5905. {
  5906. GH_USB_RXCSRH_R_PERI_S tmp_value;
  5907. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  5908. tmp_value.all = value;
  5909. #if GH_USB_ENABLE_DEBUG_PRINT
  5910. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_DMAReqMode] --> 0x%08x\n",
  5911. REG_USB_RXCSRH_R_PERI,value);
  5912. #endif
  5913. return tmp_value.bitc.dmareqmode;
  5914. }
  5915. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_DisNyet_PIDError(void)
  5916. {
  5917. GH_USB_RXCSRH_R_PERI_S tmp_value;
  5918. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  5919. tmp_value.all = value;
  5920. #if GH_USB_ENABLE_DEBUG_PRINT
  5921. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_DisNyet_PIDError] --> 0x%08x\n",
  5922. REG_USB_RXCSRH_R_PERI,value);
  5923. #endif
  5924. return tmp_value.bitc.disnyet_piderror;
  5925. }
  5926. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_DMAReqEnab(void)
  5927. {
  5928. GH_USB_RXCSRH_R_PERI_S tmp_value;
  5929. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  5930. tmp_value.all = value;
  5931. #if GH_USB_ENABLE_DEBUG_PRINT
  5932. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_DMAReqEnab] --> 0x%08x\n",
  5933. REG_USB_RXCSRH_R_PERI,value);
  5934. #endif
  5935. return tmp_value.bitc.dmareqenab;
  5936. }
  5937. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_ISO(void)
  5938. {
  5939. GH_USB_RXCSRH_R_PERI_S tmp_value;
  5940. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  5941. tmp_value.all = value;
  5942. #if GH_USB_ENABLE_DEBUG_PRINT
  5943. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_ISO] --> 0x%08x\n",
  5944. REG_USB_RXCSRH_R_PERI,value);
  5945. #endif
  5946. return tmp_value.bitc.iso;
  5947. }
  5948. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_AutoClear(void)
  5949. {
  5950. GH_USB_RXCSRH_R_PERI_S tmp_value;
  5951. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  5952. tmp_value.all = value;
  5953. #if GH_USB_ENABLE_DEBUG_PRINT
  5954. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_AutoClear] --> 0x%08x\n",
  5955. REG_USB_RXCSRH_R_PERI,value);
  5956. #endif
  5957. return tmp_value.bitc.autoclear;
  5958. }
  5959. #endif /* GH_INLINE_LEVEL == 0 */
  5960. /*----------------------------------------------------------------------------*/
  5961. /* register USB_RXCSRL_W_PERI (write) */
  5962. /*----------------------------------------------------------------------------*/
  5963. #if GH_INLINE_LEVEL < 2
  5964. /*! \brief Writes the register 'USB_RXCSRL_W_PERI'. */
  5965. void GH_USB_set_RXCSRL_W_PERI(U8 data);
  5966. /*! \brief Reads the mirror variable of the register 'USB_RXCSRL_W_PERI'. */
  5967. U8 GH_USB_getm_RXCSRL_W_PERI(void);
  5968. /*! \brief Writes the bit group 'RxPktRdy' of register 'USB_RXCSRL_W_PERI'. */
  5969. void GH_USB_set_RXCSRL_W_PERI_RxPktRdy(U8 data);
  5970. /*! \brief Reads the bit group 'RxPktRdy' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  5971. U8 GH_USB_getm_RXCSRL_W_PERI_RxPktRdy(void);
  5972. /*! \brief Writes the bit group 'OverRun' of register 'USB_RXCSRL_W_PERI'. */
  5973. void GH_USB_set_RXCSRL_W_PERI_OverRun(U8 data);
  5974. /*! \brief Reads the bit group 'OverRun' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  5975. U8 GH_USB_getm_RXCSRL_W_PERI_OverRun(void);
  5976. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_RXCSRL_W_PERI'. */
  5977. void GH_USB_set_RXCSRL_W_PERI_FlushFIFO(U8 data);
  5978. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  5979. U8 GH_USB_getm_RXCSRL_W_PERI_FlushFIFO(void);
  5980. /*! \brief Writes the bit group 'SendStall' of register 'USB_RXCSRL_W_PERI'. */
  5981. void GH_USB_set_RXCSRL_W_PERI_SendStall(U8 data);
  5982. /*! \brief Reads the bit group 'SendStall' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  5983. U8 GH_USB_getm_RXCSRL_W_PERI_SendStall(void);
  5984. /*! \brief Writes the bit group 'SentStall' of register 'USB_RXCSRL_W_PERI'. */
  5985. void GH_USB_set_RXCSRL_W_PERI_SentStall(U8 data);
  5986. /*! \brief Reads the bit group 'SentStall' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  5987. U8 GH_USB_getm_RXCSRL_W_PERI_SentStall(void);
  5988. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_RXCSRL_W_PERI'. */
  5989. void GH_USB_set_RXCSRL_W_PERI_ClrDataTog(U8 data);
  5990. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  5991. U8 GH_USB_getm_RXCSRL_W_PERI_ClrDataTog(void);
  5992. #else /* GH_INLINE_LEVEL < 2 */
  5993. GH_INLINE void GH_USB_set_RXCSRL_W_PERI(U8 data)
  5994. {
  5995. m_usb_rxcsrl_w_peri.all = data;
  5996. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = data;
  5997. #if GH_USB_ENABLE_DEBUG_PRINT
  5998. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI] <-- 0x%08x\n",
  5999. REG_USB_RXCSRL_W_PERI,data,data);
  6000. #endif
  6001. }
  6002. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI(void)
  6003. {
  6004. #if GH_USB_ENABLE_DEBUG_PRINT
  6005. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI] --> 0x%08x\n",
  6006. m_usb_rxcsrl_w_peri.all);
  6007. #endif
  6008. return m_usb_rxcsrl_w_peri.all;
  6009. }
  6010. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_RxPktRdy(U8 data)
  6011. {
  6012. m_usb_rxcsrl_w_peri.bitc.rxpktrdy = data;
  6013. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  6014. #if GH_USB_ENABLE_DEBUG_PRINT
  6015. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_RxPktRdy] <-- 0x%08x\n",
  6016. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  6017. #endif
  6018. }
  6019. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_RxPktRdy(void)
  6020. {
  6021. #if GH_USB_ENABLE_DEBUG_PRINT
  6022. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_RxPktRdy] --> 0x%08x\n",
  6023. m_usb_rxcsrl_w_peri.bitc.rxpktrdy);
  6024. #endif
  6025. return m_usb_rxcsrl_w_peri.bitc.rxpktrdy;
  6026. }
  6027. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_OverRun(U8 data)
  6028. {
  6029. m_usb_rxcsrl_w_peri.bitc.overrun = data;
  6030. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  6031. #if GH_USB_ENABLE_DEBUG_PRINT
  6032. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_OverRun] <-- 0x%08x\n",
  6033. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  6034. #endif
  6035. }
  6036. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_OverRun(void)
  6037. {
  6038. #if GH_USB_ENABLE_DEBUG_PRINT
  6039. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_OverRun] --> 0x%08x\n",
  6040. m_usb_rxcsrl_w_peri.bitc.overrun);
  6041. #endif
  6042. return m_usb_rxcsrl_w_peri.bitc.overrun;
  6043. }
  6044. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_FlushFIFO(U8 data)
  6045. {
  6046. m_usb_rxcsrl_w_peri.bitc.flushfifo = data;
  6047. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  6048. #if GH_USB_ENABLE_DEBUG_PRINT
  6049. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_FlushFIFO] <-- 0x%08x\n",
  6050. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  6051. #endif
  6052. }
  6053. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_FlushFIFO(void)
  6054. {
  6055. #if GH_USB_ENABLE_DEBUG_PRINT
  6056. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_FlushFIFO] --> 0x%08x\n",
  6057. m_usb_rxcsrl_w_peri.bitc.flushfifo);
  6058. #endif
  6059. return m_usb_rxcsrl_w_peri.bitc.flushfifo;
  6060. }
  6061. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_SendStall(U8 data)
  6062. {
  6063. m_usb_rxcsrl_w_peri.bitc.sendstall = data;
  6064. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  6065. #if GH_USB_ENABLE_DEBUG_PRINT
  6066. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_SendStall] <-- 0x%08x\n",
  6067. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  6068. #endif
  6069. }
  6070. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_SendStall(void)
  6071. {
  6072. #if GH_USB_ENABLE_DEBUG_PRINT
  6073. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_SendStall] --> 0x%08x\n",
  6074. m_usb_rxcsrl_w_peri.bitc.sendstall);
  6075. #endif
  6076. return m_usb_rxcsrl_w_peri.bitc.sendstall;
  6077. }
  6078. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_SentStall(U8 data)
  6079. {
  6080. m_usb_rxcsrl_w_peri.bitc.sentstall = data;
  6081. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  6082. #if GH_USB_ENABLE_DEBUG_PRINT
  6083. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_SentStall] <-- 0x%08x\n",
  6084. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  6085. #endif
  6086. }
  6087. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_SentStall(void)
  6088. {
  6089. #if GH_USB_ENABLE_DEBUG_PRINT
  6090. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_SentStall] --> 0x%08x\n",
  6091. m_usb_rxcsrl_w_peri.bitc.sentstall);
  6092. #endif
  6093. return m_usb_rxcsrl_w_peri.bitc.sentstall;
  6094. }
  6095. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_ClrDataTog(U8 data)
  6096. {
  6097. m_usb_rxcsrl_w_peri.bitc.clrdatatog = data;
  6098. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  6099. #if GH_USB_ENABLE_DEBUG_PRINT
  6100. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_ClrDataTog] <-- 0x%08x\n",
  6101. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  6102. #endif
  6103. }
  6104. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_ClrDataTog(void)
  6105. {
  6106. #if GH_USB_ENABLE_DEBUG_PRINT
  6107. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_ClrDataTog] --> 0x%08x\n",
  6108. m_usb_rxcsrl_w_peri.bitc.clrdatatog);
  6109. #endif
  6110. return m_usb_rxcsrl_w_peri.bitc.clrdatatog;
  6111. }
  6112. #endif /* GH_INLINE_LEVEL < 2 */
  6113. /*----------------------------------------------------------------------------*/
  6114. /* register USB_RXCSRH_W_PERI (write) */
  6115. /*----------------------------------------------------------------------------*/
  6116. #if GH_INLINE_LEVEL < 2
  6117. /*! \brief Writes the register 'USB_RXCSRH_W_PERI'. */
  6118. void GH_USB_set_RXCSRH_W_PERI(U8 data);
  6119. /*! \brief Reads the mirror variable of the register 'USB_RXCSRH_W_PERI'. */
  6120. U8 GH_USB_getm_RXCSRH_W_PERI(void);
  6121. /*! \brief Writes the bit group 'IncompRx' of register 'USB_RXCSRH_W_PERI'. */
  6122. void GH_USB_set_RXCSRH_W_PERI_IncompRx(U8 data);
  6123. /*! \brief Reads the bit group 'IncompRx' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  6124. U8 GH_USB_getm_RXCSRH_W_PERI_IncompRx(void);
  6125. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_RXCSRH_W_PERI'. */
  6126. void GH_USB_set_RXCSRH_W_PERI_DMAReqMode(U8 data);
  6127. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  6128. U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqMode(void);
  6129. /*! \brief Writes the bit group 'DisNyet_PIDError' of register 'USB_RXCSRH_W_PERI'. */
  6130. void GH_USB_set_RXCSRH_W_PERI_DisNyet_PIDError(U8 data);
  6131. /*! \brief Reads the bit group 'DisNyet_PIDError' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  6132. U8 GH_USB_getm_RXCSRH_W_PERI_DisNyet_PIDError(void);
  6133. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_RXCSRH_W_PERI'. */
  6134. void GH_USB_set_RXCSRH_W_PERI_DMAReqEnab(U8 data);
  6135. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  6136. U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqEnab(void);
  6137. /*! \brief Writes the bit group 'ISO' of register 'USB_RXCSRH_W_PERI'. */
  6138. void GH_USB_set_RXCSRH_W_PERI_ISO(U8 data);
  6139. /*! \brief Reads the bit group 'ISO' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  6140. U8 GH_USB_getm_RXCSRH_W_PERI_ISO(void);
  6141. /*! \brief Writes the bit group 'AutoClear' of register 'USB_RXCSRH_W_PERI'. */
  6142. void GH_USB_set_RXCSRH_W_PERI_AutoClear(U8 data);
  6143. /*! \brief Reads the bit group 'AutoClear' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  6144. U8 GH_USB_getm_RXCSRH_W_PERI_AutoClear(void);
  6145. #else /* GH_INLINE_LEVEL < 2 */
  6146. GH_INLINE void GH_USB_set_RXCSRH_W_PERI(U8 data)
  6147. {
  6148. m_usb_rxcsrh_w_peri.all = data;
  6149. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = data;
  6150. #if GH_USB_ENABLE_DEBUG_PRINT
  6151. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI] <-- 0x%08x\n",
  6152. REG_USB_RXCSRH_W_PERI,data,data);
  6153. #endif
  6154. }
  6155. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI(void)
  6156. {
  6157. #if GH_USB_ENABLE_DEBUG_PRINT
  6158. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI] --> 0x%08x\n",
  6159. m_usb_rxcsrh_w_peri.all);
  6160. #endif
  6161. return m_usb_rxcsrh_w_peri.all;
  6162. }
  6163. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_IncompRx(U8 data)
  6164. {
  6165. m_usb_rxcsrh_w_peri.bitc.incomprx = data;
  6166. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  6167. #if GH_USB_ENABLE_DEBUG_PRINT
  6168. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_IncompRx] <-- 0x%08x\n",
  6169. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  6170. #endif
  6171. }
  6172. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_IncompRx(void)
  6173. {
  6174. #if GH_USB_ENABLE_DEBUG_PRINT
  6175. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_IncompRx] --> 0x%08x\n",
  6176. m_usb_rxcsrh_w_peri.bitc.incomprx);
  6177. #endif
  6178. return m_usb_rxcsrh_w_peri.bitc.incomprx;
  6179. }
  6180. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_DMAReqMode(U8 data)
  6181. {
  6182. m_usb_rxcsrh_w_peri.bitc.dmareqmode = data;
  6183. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  6184. #if GH_USB_ENABLE_DEBUG_PRINT
  6185. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_DMAReqMode] <-- 0x%08x\n",
  6186. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  6187. #endif
  6188. }
  6189. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqMode(void)
  6190. {
  6191. #if GH_USB_ENABLE_DEBUG_PRINT
  6192. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_DMAReqMode] --> 0x%08x\n",
  6193. m_usb_rxcsrh_w_peri.bitc.dmareqmode);
  6194. #endif
  6195. return m_usb_rxcsrh_w_peri.bitc.dmareqmode;
  6196. }
  6197. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_DisNyet_PIDError(U8 data)
  6198. {
  6199. m_usb_rxcsrh_w_peri.bitc.disnyet_piderror = data;
  6200. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  6201. #if GH_USB_ENABLE_DEBUG_PRINT
  6202. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_DisNyet_PIDError] <-- 0x%08x\n",
  6203. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  6204. #endif
  6205. }
  6206. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_DisNyet_PIDError(void)
  6207. {
  6208. #if GH_USB_ENABLE_DEBUG_PRINT
  6209. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_DisNyet_PIDError] --> 0x%08x\n",
  6210. m_usb_rxcsrh_w_peri.bitc.disnyet_piderror);
  6211. #endif
  6212. return m_usb_rxcsrh_w_peri.bitc.disnyet_piderror;
  6213. }
  6214. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_DMAReqEnab(U8 data)
  6215. {
  6216. m_usb_rxcsrh_w_peri.bitc.dmareqenab = data;
  6217. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  6218. #if GH_USB_ENABLE_DEBUG_PRINT
  6219. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_DMAReqEnab] <-- 0x%08x\n",
  6220. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  6221. #endif
  6222. }
  6223. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqEnab(void)
  6224. {
  6225. #if GH_USB_ENABLE_DEBUG_PRINT
  6226. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_DMAReqEnab] --> 0x%08x\n",
  6227. m_usb_rxcsrh_w_peri.bitc.dmareqenab);
  6228. #endif
  6229. return m_usb_rxcsrh_w_peri.bitc.dmareqenab;
  6230. }
  6231. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_ISO(U8 data)
  6232. {
  6233. m_usb_rxcsrh_w_peri.bitc.iso = data;
  6234. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  6235. #if GH_USB_ENABLE_DEBUG_PRINT
  6236. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_ISO] <-- 0x%08x\n",
  6237. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  6238. #endif
  6239. }
  6240. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_ISO(void)
  6241. {
  6242. #if GH_USB_ENABLE_DEBUG_PRINT
  6243. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_ISO] --> 0x%08x\n",
  6244. m_usb_rxcsrh_w_peri.bitc.iso);
  6245. #endif
  6246. return m_usb_rxcsrh_w_peri.bitc.iso;
  6247. }
  6248. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_AutoClear(U8 data)
  6249. {
  6250. m_usb_rxcsrh_w_peri.bitc.autoclear = data;
  6251. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  6252. #if GH_USB_ENABLE_DEBUG_PRINT
  6253. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_AutoClear] <-- 0x%08x\n",
  6254. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  6255. #endif
  6256. }
  6257. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_AutoClear(void)
  6258. {
  6259. #if GH_USB_ENABLE_DEBUG_PRINT
  6260. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_AutoClear] --> 0x%08x\n",
  6261. m_usb_rxcsrh_w_peri.bitc.autoclear);
  6262. #endif
  6263. return m_usb_rxcsrh_w_peri.bitc.autoclear;
  6264. }
  6265. #endif /* GH_INLINE_LEVEL < 2 */
  6266. /*----------------------------------------------------------------------------*/
  6267. /* register USB_RXCSRL_R_HOST (read) */
  6268. /*----------------------------------------------------------------------------*/
  6269. #if GH_INLINE_LEVEL == 0
  6270. /*! \brief Reads the register 'USB_RXCSRL_R_HOST'. */
  6271. U8 GH_USB_get_RXCSRL_R_HOST(void);
  6272. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_RXCSRL_R_HOST'. */
  6273. U8 GH_USB_get_RXCSRL_R_HOST_RxPktRdy(void);
  6274. /*! \brief Reads the bit group 'FIFOFull' of register 'USB_RXCSRL_R_HOST'. */
  6275. U8 GH_USB_get_RXCSRL_R_HOST_FIFOFull(void);
  6276. /*! \brief Reads the bit group 'Error' of register 'USB_RXCSRL_R_HOST'. */
  6277. U8 GH_USB_get_RXCSRL_R_HOST_Error(void);
  6278. /*! \brief Reads the bit group 'DataError_NAKTimeout' of register 'USB_RXCSRL_R_HOST'. */
  6279. U8 GH_USB_get_RXCSRL_R_HOST_DataError_NAKTimeout(void);
  6280. /*! \brief Reads the bit group 'ReqPkt' of register 'USB_RXCSRL_R_HOST'. */
  6281. U8 GH_USB_get_RXCSRL_R_HOST_ReqPkt(void);
  6282. /*! \brief Reads the bit group 'RxStall' of register 'USB_RXCSRL_R_HOST'. */
  6283. U8 GH_USB_get_RXCSRL_R_HOST_RxStall(void);
  6284. #else /* GH_INLINE_LEVEL == 0 */
  6285. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST(void)
  6286. {
  6287. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  6288. #if GH_USB_ENABLE_DEBUG_PRINT
  6289. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST] --> 0x%08x\n",
  6290. REG_USB_RXCSRL_R_HOST,value);
  6291. #endif
  6292. return value;
  6293. }
  6294. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_RxPktRdy(void)
  6295. {
  6296. GH_USB_RXCSRL_R_HOST_S tmp_value;
  6297. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  6298. tmp_value.all = value;
  6299. #if GH_USB_ENABLE_DEBUG_PRINT
  6300. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_RxPktRdy] --> 0x%08x\n",
  6301. REG_USB_RXCSRL_R_HOST,value);
  6302. #endif
  6303. return tmp_value.bitc.rxpktrdy;
  6304. }
  6305. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_FIFOFull(void)
  6306. {
  6307. GH_USB_RXCSRL_R_HOST_S tmp_value;
  6308. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  6309. tmp_value.all = value;
  6310. #if GH_USB_ENABLE_DEBUG_PRINT
  6311. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_FIFOFull] --> 0x%08x\n",
  6312. REG_USB_RXCSRL_R_HOST,value);
  6313. #endif
  6314. return tmp_value.bitc.fifofull;
  6315. }
  6316. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_Error(void)
  6317. {
  6318. GH_USB_RXCSRL_R_HOST_S tmp_value;
  6319. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  6320. tmp_value.all = value;
  6321. #if GH_USB_ENABLE_DEBUG_PRINT
  6322. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_Error] --> 0x%08x\n",
  6323. REG_USB_RXCSRL_R_HOST,value);
  6324. #endif
  6325. return tmp_value.bitc.error;
  6326. }
  6327. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_DataError_NAKTimeout(void)
  6328. {
  6329. GH_USB_RXCSRL_R_HOST_S tmp_value;
  6330. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  6331. tmp_value.all = value;
  6332. #if GH_USB_ENABLE_DEBUG_PRINT
  6333. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_DataError_NAKTimeout] --> 0x%08x\n",
  6334. REG_USB_RXCSRL_R_HOST,value);
  6335. #endif
  6336. return tmp_value.bitc.dataerror_naktimeout;
  6337. }
  6338. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_ReqPkt(void)
  6339. {
  6340. GH_USB_RXCSRL_R_HOST_S tmp_value;
  6341. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  6342. tmp_value.all = value;
  6343. #if GH_USB_ENABLE_DEBUG_PRINT
  6344. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_ReqPkt] --> 0x%08x\n",
  6345. REG_USB_RXCSRL_R_HOST,value);
  6346. #endif
  6347. return tmp_value.bitc.reqpkt;
  6348. }
  6349. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_RxStall(void)
  6350. {
  6351. GH_USB_RXCSRL_R_HOST_S tmp_value;
  6352. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  6353. tmp_value.all = value;
  6354. #if GH_USB_ENABLE_DEBUG_PRINT
  6355. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_RxStall] --> 0x%08x\n",
  6356. REG_USB_RXCSRL_R_HOST,value);
  6357. #endif
  6358. return tmp_value.bitc.rxstall;
  6359. }
  6360. #endif /* GH_INLINE_LEVEL == 0 */
  6361. /*----------------------------------------------------------------------------*/
  6362. /* register USB_RXCSRH_R_HOST (read) */
  6363. /*----------------------------------------------------------------------------*/
  6364. #if GH_INLINE_LEVEL == 0
  6365. /*! \brief Reads the register 'USB_RXCSRH_R_HOST'. */
  6366. U8 GH_USB_get_RXCSRH_R_HOST(void);
  6367. /*! \brief Reads the bit group 'IncompRx' of register 'USB_RXCSRH_R_HOST'. */
  6368. U8 GH_USB_get_RXCSRH_R_HOST_IncompRx(void);
  6369. /*! \brief Reads the bit group 'DataToggle' of register 'USB_RXCSRH_R_HOST'. */
  6370. U8 GH_USB_get_RXCSRH_R_HOST_DataToggle(void);
  6371. /*! \brief Reads the bit group 'DataToggleWriteEnable' of register 'USB_RXCSRH_R_HOST'. */
  6372. U8 GH_USB_get_RXCSRH_R_HOST_DataToggleWriteEnable(void);
  6373. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_RXCSRH_R_HOST'. */
  6374. U8 GH_USB_get_RXCSRH_R_HOST_DMAReqMode(void);
  6375. /*! \brief Reads the bit group 'PIDError' of register 'USB_RXCSRH_R_HOST'. */
  6376. U8 GH_USB_get_RXCSRH_R_HOST_PIDError(void);
  6377. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_RXCSRH_R_HOST'. */
  6378. U8 GH_USB_get_RXCSRH_R_HOST_DMAReqEnab(void);
  6379. /*! \brief Reads the bit group 'AutoReq' of register 'USB_RXCSRH_R_HOST'. */
  6380. U8 GH_USB_get_RXCSRH_R_HOST_AutoReq(void);
  6381. /*! \brief Reads the bit group 'AutoClear' of register 'USB_RXCSRH_R_HOST'. */
  6382. U8 GH_USB_get_RXCSRH_R_HOST_AutoClear(void);
  6383. #else /* GH_INLINE_LEVEL == 0 */
  6384. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST(void)
  6385. {
  6386. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6387. #if GH_USB_ENABLE_DEBUG_PRINT
  6388. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST] --> 0x%08x\n",
  6389. REG_USB_RXCSRH_R_HOST,value);
  6390. #endif
  6391. return value;
  6392. }
  6393. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_IncompRx(void)
  6394. {
  6395. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6396. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6397. tmp_value.all = value;
  6398. #if GH_USB_ENABLE_DEBUG_PRINT
  6399. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_IncompRx] --> 0x%08x\n",
  6400. REG_USB_RXCSRH_R_HOST,value);
  6401. #endif
  6402. return tmp_value.bitc.incomprx;
  6403. }
  6404. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DataToggle(void)
  6405. {
  6406. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6407. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6408. tmp_value.all = value;
  6409. #if GH_USB_ENABLE_DEBUG_PRINT
  6410. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DataToggle] --> 0x%08x\n",
  6411. REG_USB_RXCSRH_R_HOST,value);
  6412. #endif
  6413. return tmp_value.bitc.datatoggle;
  6414. }
  6415. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DataToggleWriteEnable(void)
  6416. {
  6417. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6418. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6419. tmp_value.all = value;
  6420. #if GH_USB_ENABLE_DEBUG_PRINT
  6421. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DataToggleWriteEnable] --> 0x%08x\n",
  6422. REG_USB_RXCSRH_R_HOST,value);
  6423. #endif
  6424. return tmp_value.bitc.datatogglewriteenable;
  6425. }
  6426. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DMAReqMode(void)
  6427. {
  6428. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6429. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6430. tmp_value.all = value;
  6431. #if GH_USB_ENABLE_DEBUG_PRINT
  6432. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DMAReqMode] --> 0x%08x\n",
  6433. REG_USB_RXCSRH_R_HOST,value);
  6434. #endif
  6435. return tmp_value.bitc.dmareqmode;
  6436. }
  6437. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_PIDError(void)
  6438. {
  6439. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6440. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6441. tmp_value.all = value;
  6442. #if GH_USB_ENABLE_DEBUG_PRINT
  6443. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_PIDError] --> 0x%08x\n",
  6444. REG_USB_RXCSRH_R_HOST,value);
  6445. #endif
  6446. return tmp_value.bitc.piderror;
  6447. }
  6448. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DMAReqEnab(void)
  6449. {
  6450. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6451. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6452. tmp_value.all = value;
  6453. #if GH_USB_ENABLE_DEBUG_PRINT
  6454. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DMAReqEnab] --> 0x%08x\n",
  6455. REG_USB_RXCSRH_R_HOST,value);
  6456. #endif
  6457. return tmp_value.bitc.dmareqenab;
  6458. }
  6459. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_AutoReq(void)
  6460. {
  6461. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6462. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6463. tmp_value.all = value;
  6464. #if GH_USB_ENABLE_DEBUG_PRINT
  6465. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_AutoReq] --> 0x%08x\n",
  6466. REG_USB_RXCSRH_R_HOST,value);
  6467. #endif
  6468. return tmp_value.bitc.autoreq;
  6469. }
  6470. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_AutoClear(void)
  6471. {
  6472. GH_USB_RXCSRH_R_HOST_S tmp_value;
  6473. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  6474. tmp_value.all = value;
  6475. #if GH_USB_ENABLE_DEBUG_PRINT
  6476. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_AutoClear] --> 0x%08x\n",
  6477. REG_USB_RXCSRH_R_HOST,value);
  6478. #endif
  6479. return tmp_value.bitc.autoclear;
  6480. }
  6481. #endif /* GH_INLINE_LEVEL == 0 */
  6482. /*----------------------------------------------------------------------------*/
  6483. /* register USB_RXCSRL_W_HOST (write) */
  6484. /*----------------------------------------------------------------------------*/
  6485. #if GH_INLINE_LEVEL < 2
  6486. /*! \brief Writes the register 'USB_RXCSRL_W_HOST'. */
  6487. void GH_USB_set_RXCSRL_W_HOST(U8 data);
  6488. /*! \brief Reads the mirror variable of the register 'USB_RXCSRL_W_HOST'. */
  6489. U8 GH_USB_getm_RXCSRL_W_HOST(void);
  6490. /*! \brief Writes the bit group 'RxPktRdy' of register 'USB_RXCSRL_W_HOST'. */
  6491. void GH_USB_set_RXCSRL_W_HOST_RxPktRdy(U8 data);
  6492. /*! \brief Reads the bit group 'RxPktRdy' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  6493. U8 GH_USB_getm_RXCSRL_W_HOST_RxPktRdy(void);
  6494. /*! \brief Writes the bit group 'Error' of register 'USB_RXCSRL_W_HOST'. */
  6495. void GH_USB_set_RXCSRL_W_HOST_Error(U8 data);
  6496. /*! \brief Reads the bit group 'Error' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  6497. U8 GH_USB_getm_RXCSRL_W_HOST_Error(void);
  6498. /*! \brief Writes the bit group 'DataError_NAKTimeout' of register 'USB_RXCSRL_W_HOST'. */
  6499. void GH_USB_set_RXCSRL_W_HOST_DataError_NAKTimeout(U8 data);
  6500. /*! \brief Reads the bit group 'DataError_NAKTimeout' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  6501. U8 GH_USB_getm_RXCSRL_W_HOST_DataError_NAKTimeout(void);
  6502. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_RXCSRL_W_HOST'. */
  6503. void GH_USB_set_RXCSRL_W_HOST_FlushFIFO(U8 data);
  6504. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  6505. U8 GH_USB_getm_RXCSRL_W_HOST_FlushFIFO(void);
  6506. /*! \brief Writes the bit group 'ReqPkt' of register 'USB_RXCSRL_W_HOST'. */
  6507. void GH_USB_set_RXCSRL_W_HOST_ReqPkt(U8 data);
  6508. /*! \brief Reads the bit group 'ReqPkt' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  6509. U8 GH_USB_getm_RXCSRL_W_HOST_ReqPkt(void);
  6510. /*! \brief Writes the bit group 'RxStall' of register 'USB_RXCSRL_W_HOST'. */
  6511. void GH_USB_set_RXCSRL_W_HOST_RxStall(U8 data);
  6512. /*! \brief Reads the bit group 'RxStall' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  6513. U8 GH_USB_getm_RXCSRL_W_HOST_RxStall(void);
  6514. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_RXCSRL_W_HOST'. */
  6515. void GH_USB_set_RXCSRL_W_HOST_ClrDataTog(U8 data);
  6516. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  6517. U8 GH_USB_getm_RXCSRL_W_HOST_ClrDataTog(void);
  6518. #else /* GH_INLINE_LEVEL < 2 */
  6519. GH_INLINE void GH_USB_set_RXCSRL_W_HOST(U8 data)
  6520. {
  6521. m_usb_rxcsrl_w_host.all = data;
  6522. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = data;
  6523. #if GH_USB_ENABLE_DEBUG_PRINT
  6524. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST] <-- 0x%08x\n",
  6525. REG_USB_RXCSRL_W_HOST,data,data);
  6526. #endif
  6527. }
  6528. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST(void)
  6529. {
  6530. #if GH_USB_ENABLE_DEBUG_PRINT
  6531. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST] --> 0x%08x\n",
  6532. m_usb_rxcsrl_w_host.all);
  6533. #endif
  6534. return m_usb_rxcsrl_w_host.all;
  6535. }
  6536. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_RxPktRdy(U8 data)
  6537. {
  6538. m_usb_rxcsrl_w_host.bitc.rxpktrdy = data;
  6539. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  6540. #if GH_USB_ENABLE_DEBUG_PRINT
  6541. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_RxPktRdy] <-- 0x%08x\n",
  6542. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  6543. #endif
  6544. }
  6545. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_RxPktRdy(void)
  6546. {
  6547. #if GH_USB_ENABLE_DEBUG_PRINT
  6548. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_RxPktRdy] --> 0x%08x\n",
  6549. m_usb_rxcsrl_w_host.bitc.rxpktrdy);
  6550. #endif
  6551. return m_usb_rxcsrl_w_host.bitc.rxpktrdy;
  6552. }
  6553. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_Error(U8 data)
  6554. {
  6555. m_usb_rxcsrl_w_host.bitc.error = data;
  6556. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  6557. #if GH_USB_ENABLE_DEBUG_PRINT
  6558. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_Error] <-- 0x%08x\n",
  6559. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  6560. #endif
  6561. }
  6562. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_Error(void)
  6563. {
  6564. #if GH_USB_ENABLE_DEBUG_PRINT
  6565. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_Error] --> 0x%08x\n",
  6566. m_usb_rxcsrl_w_host.bitc.error);
  6567. #endif
  6568. return m_usb_rxcsrl_w_host.bitc.error;
  6569. }
  6570. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_DataError_NAKTimeout(U8 data)
  6571. {
  6572. m_usb_rxcsrl_w_host.bitc.dataerror_naktimeout = data;
  6573. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  6574. #if GH_USB_ENABLE_DEBUG_PRINT
  6575. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_DataError_NAKTimeout] <-- 0x%08x\n",
  6576. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  6577. #endif
  6578. }
  6579. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_DataError_NAKTimeout(void)
  6580. {
  6581. #if GH_USB_ENABLE_DEBUG_PRINT
  6582. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_DataError_NAKTimeout] --> 0x%08x\n",
  6583. m_usb_rxcsrl_w_host.bitc.dataerror_naktimeout);
  6584. #endif
  6585. return m_usb_rxcsrl_w_host.bitc.dataerror_naktimeout;
  6586. }
  6587. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_FlushFIFO(U8 data)
  6588. {
  6589. m_usb_rxcsrl_w_host.bitc.flushfifo = data;
  6590. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  6591. #if GH_USB_ENABLE_DEBUG_PRINT
  6592. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_FlushFIFO] <-- 0x%08x\n",
  6593. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  6594. #endif
  6595. }
  6596. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_FlushFIFO(void)
  6597. {
  6598. #if GH_USB_ENABLE_DEBUG_PRINT
  6599. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_FlushFIFO] --> 0x%08x\n",
  6600. m_usb_rxcsrl_w_host.bitc.flushfifo);
  6601. #endif
  6602. return m_usb_rxcsrl_w_host.bitc.flushfifo;
  6603. }
  6604. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_ReqPkt(U8 data)
  6605. {
  6606. m_usb_rxcsrl_w_host.bitc.reqpkt = data;
  6607. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  6608. #if GH_USB_ENABLE_DEBUG_PRINT
  6609. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_ReqPkt] <-- 0x%08x\n",
  6610. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  6611. #endif
  6612. }
  6613. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_ReqPkt(void)
  6614. {
  6615. #if GH_USB_ENABLE_DEBUG_PRINT
  6616. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_ReqPkt] --> 0x%08x\n",
  6617. m_usb_rxcsrl_w_host.bitc.reqpkt);
  6618. #endif
  6619. return m_usb_rxcsrl_w_host.bitc.reqpkt;
  6620. }
  6621. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_RxStall(U8 data)
  6622. {
  6623. m_usb_rxcsrl_w_host.bitc.rxstall = data;
  6624. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  6625. #if GH_USB_ENABLE_DEBUG_PRINT
  6626. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_RxStall] <-- 0x%08x\n",
  6627. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  6628. #endif
  6629. }
  6630. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_RxStall(void)
  6631. {
  6632. #if GH_USB_ENABLE_DEBUG_PRINT
  6633. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_RxStall] --> 0x%08x\n",
  6634. m_usb_rxcsrl_w_host.bitc.rxstall);
  6635. #endif
  6636. return m_usb_rxcsrl_w_host.bitc.rxstall;
  6637. }
  6638. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_ClrDataTog(U8 data)
  6639. {
  6640. m_usb_rxcsrl_w_host.bitc.clrdatatog = data;
  6641. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  6642. #if GH_USB_ENABLE_DEBUG_PRINT
  6643. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_ClrDataTog] <-- 0x%08x\n",
  6644. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  6645. #endif
  6646. }
  6647. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_ClrDataTog(void)
  6648. {
  6649. #if GH_USB_ENABLE_DEBUG_PRINT
  6650. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_ClrDataTog] --> 0x%08x\n",
  6651. m_usb_rxcsrl_w_host.bitc.clrdatatog);
  6652. #endif
  6653. return m_usb_rxcsrl_w_host.bitc.clrdatatog;
  6654. }
  6655. #endif /* GH_INLINE_LEVEL < 2 */
  6656. /*----------------------------------------------------------------------------*/
  6657. /* register USB_RXCSRH_W_HOST (write) */
  6658. /*----------------------------------------------------------------------------*/
  6659. #if GH_INLINE_LEVEL < 2
  6660. /*! \brief Writes the register 'USB_RXCSRH_W_HOST'. */
  6661. void GH_USB_set_RXCSRH_W_HOST(U8 data);
  6662. /*! \brief Reads the mirror variable of the register 'USB_RXCSRH_W_HOST'. */
  6663. U8 GH_USB_getm_RXCSRH_W_HOST(void);
  6664. /*! \brief Writes the bit group 'IncompRx' of register 'USB_RXCSRH_W_HOST'. */
  6665. void GH_USB_set_RXCSRH_W_HOST_IncompRx(U8 data);
  6666. /*! \brief Reads the bit group 'IncompRx' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  6667. U8 GH_USB_getm_RXCSRH_W_HOST_IncompRx(void);
  6668. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_RXCSRH_W_HOST'. */
  6669. void GH_USB_set_RXCSRH_W_HOST_DMAReqMode(U8 data);
  6670. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  6671. U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqMode(void);
  6672. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_RXCSRH_W_HOST'. */
  6673. void GH_USB_set_RXCSRH_W_HOST_DMAReqEnab(U8 data);
  6674. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  6675. U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqEnab(void);
  6676. /*! \brief Writes the bit group 'AutoReq' of register 'USB_RXCSRH_W_HOST'. */
  6677. void GH_USB_set_RXCSRH_W_HOST_AutoReq(U8 data);
  6678. /*! \brief Reads the bit group 'AutoReq' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  6679. U8 GH_USB_getm_RXCSRH_W_HOST_AutoReq(void);
  6680. /*! \brief Writes the bit group 'AutoClear' of register 'USB_RXCSRH_W_HOST'. */
  6681. void GH_USB_set_RXCSRH_W_HOST_AutoClear(U8 data);
  6682. /*! \brief Reads the bit group 'AutoClear' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  6683. U8 GH_USB_getm_RXCSRH_W_HOST_AutoClear(void);
  6684. #else /* GH_INLINE_LEVEL < 2 */
  6685. GH_INLINE void GH_USB_set_RXCSRH_W_HOST(U8 data)
  6686. {
  6687. m_usb_rxcsrh_w_host.all = data;
  6688. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = data;
  6689. #if GH_USB_ENABLE_DEBUG_PRINT
  6690. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST] <-- 0x%08x\n",
  6691. REG_USB_RXCSRH_W_HOST,data,data);
  6692. #endif
  6693. }
  6694. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST(void)
  6695. {
  6696. #if GH_USB_ENABLE_DEBUG_PRINT
  6697. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST] --> 0x%08x\n",
  6698. m_usb_rxcsrh_w_host.all);
  6699. #endif
  6700. return m_usb_rxcsrh_w_host.all;
  6701. }
  6702. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_IncompRx(U8 data)
  6703. {
  6704. m_usb_rxcsrh_w_host.bitc.incomprx = data;
  6705. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  6706. #if GH_USB_ENABLE_DEBUG_PRINT
  6707. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_IncompRx] <-- 0x%08x\n",
  6708. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  6709. #endif
  6710. }
  6711. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_IncompRx(void)
  6712. {
  6713. #if GH_USB_ENABLE_DEBUG_PRINT
  6714. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_IncompRx] --> 0x%08x\n",
  6715. m_usb_rxcsrh_w_host.bitc.incomprx);
  6716. #endif
  6717. return m_usb_rxcsrh_w_host.bitc.incomprx;
  6718. }
  6719. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_DMAReqMode(U8 data)
  6720. {
  6721. m_usb_rxcsrh_w_host.bitc.dmareqmode = data;
  6722. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  6723. #if GH_USB_ENABLE_DEBUG_PRINT
  6724. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_DMAReqMode] <-- 0x%08x\n",
  6725. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  6726. #endif
  6727. }
  6728. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqMode(void)
  6729. {
  6730. #if GH_USB_ENABLE_DEBUG_PRINT
  6731. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_DMAReqMode] --> 0x%08x\n",
  6732. m_usb_rxcsrh_w_host.bitc.dmareqmode);
  6733. #endif
  6734. return m_usb_rxcsrh_w_host.bitc.dmareqmode;
  6735. }
  6736. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_DMAReqEnab(U8 data)
  6737. {
  6738. m_usb_rxcsrh_w_host.bitc.dmareqenab = data;
  6739. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  6740. #if GH_USB_ENABLE_DEBUG_PRINT
  6741. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_DMAReqEnab] <-- 0x%08x\n",
  6742. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  6743. #endif
  6744. }
  6745. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqEnab(void)
  6746. {
  6747. #if GH_USB_ENABLE_DEBUG_PRINT
  6748. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_DMAReqEnab] --> 0x%08x\n",
  6749. m_usb_rxcsrh_w_host.bitc.dmareqenab);
  6750. #endif
  6751. return m_usb_rxcsrh_w_host.bitc.dmareqenab;
  6752. }
  6753. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_AutoReq(U8 data)
  6754. {
  6755. m_usb_rxcsrh_w_host.bitc.autoreq = data;
  6756. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  6757. #if GH_USB_ENABLE_DEBUG_PRINT
  6758. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_AutoReq] <-- 0x%08x\n",
  6759. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  6760. #endif
  6761. }
  6762. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_AutoReq(void)
  6763. {
  6764. #if GH_USB_ENABLE_DEBUG_PRINT
  6765. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_AutoReq] --> 0x%08x\n",
  6766. m_usb_rxcsrh_w_host.bitc.autoreq);
  6767. #endif
  6768. return m_usb_rxcsrh_w_host.bitc.autoreq;
  6769. }
  6770. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_AutoClear(U8 data)
  6771. {
  6772. m_usb_rxcsrh_w_host.bitc.autoclear = data;
  6773. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  6774. #if GH_USB_ENABLE_DEBUG_PRINT
  6775. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_AutoClear] <-- 0x%08x\n",
  6776. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  6777. #endif
  6778. }
  6779. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_AutoClear(void)
  6780. {
  6781. #if GH_USB_ENABLE_DEBUG_PRINT
  6782. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_AutoClear] --> 0x%08x\n",
  6783. m_usb_rxcsrh_w_host.bitc.autoclear);
  6784. #endif
  6785. return m_usb_rxcsrh_w_host.bitc.autoclear;
  6786. }
  6787. #endif /* GH_INLINE_LEVEL < 2 */
  6788. /*----------------------------------------------------------------------------*/
  6789. /* register USB_RxCount (read) */
  6790. /*----------------------------------------------------------------------------*/
  6791. #if GH_INLINE_LEVEL == 0
  6792. /*! \brief Reads the register 'USB_RxCount'. */
  6793. U8 GH_USB_get_RxCount(void);
  6794. /*! \brief Reads the bit group 'EndpointRxCount' of register 'USB_RxCount'. */
  6795. U8 GH_USB_get_RxCount_EndpointRxCount(void);
  6796. #else /* GH_INLINE_LEVEL == 0 */
  6797. GH_INLINE U8 GH_USB_get_RxCount(void)
  6798. {
  6799. U8 value = (*(volatile U8 *)REG_USB_RXCOUNT);
  6800. #if GH_USB_ENABLE_DEBUG_PRINT
  6801. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxCount] --> 0x%08x\n",
  6802. REG_USB_RXCOUNT,value);
  6803. #endif
  6804. return value;
  6805. }
  6806. GH_INLINE U8 GH_USB_get_RxCount_EndpointRxCount(void)
  6807. {
  6808. GH_USB_RXCOUNT_S tmp_value;
  6809. U8 value = (*(volatile U8 *)REG_USB_RXCOUNT);
  6810. tmp_value.all = value;
  6811. #if GH_USB_ENABLE_DEBUG_PRINT
  6812. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxCount_EndpointRxCount] --> 0x%08x\n",
  6813. REG_USB_RXCOUNT,value);
  6814. #endif
  6815. return tmp_value.bitc.endpointrxcount;
  6816. }
  6817. #endif /* GH_INLINE_LEVEL == 0 */
  6818. /*----------------------------------------------------------------------------*/
  6819. /* register USB_TxType_HOST (read/write) */
  6820. /*----------------------------------------------------------------------------*/
  6821. #if GH_INLINE_LEVEL == 0
  6822. /*! \brief Writes the register 'USB_TxType_HOST'. */
  6823. void GH_USB_set_TxType_HOST(U8 data);
  6824. /*! \brief Reads the register 'USB_TxType_HOST'. */
  6825. U8 GH_USB_get_TxType_HOST(void);
  6826. /*! \brief Writes the bit group 'TargetEndpointNumber' of register 'USB_TxType_HOST'. */
  6827. void GH_USB_set_TxType_HOST_TargetEndpointNumber(U8 data);
  6828. /*! \brief Reads the bit group 'TargetEndpointNumber' of register 'USB_TxType_HOST'. */
  6829. U8 GH_USB_get_TxType_HOST_TargetEndpointNumber(void);
  6830. /*! \brief Writes the bit group 'Protocol' of register 'USB_TxType_HOST'. */
  6831. void GH_USB_set_TxType_HOST_Protocol(U8 data);
  6832. /*! \brief Reads the bit group 'Protocol' of register 'USB_TxType_HOST'. */
  6833. U8 GH_USB_get_TxType_HOST_Protocol(void);
  6834. /*! \brief Writes the bit group 'Speed' of register 'USB_TxType_HOST'. */
  6835. void GH_USB_set_TxType_HOST_Speed(U8 data);
  6836. /*! \brief Reads the bit group 'Speed' of register 'USB_TxType_HOST'. */
  6837. U8 GH_USB_get_TxType_HOST_Speed(void);
  6838. #else /* GH_INLINE_LEVEL == 0 */
  6839. GH_INLINE void GH_USB_set_TxType_HOST(U8 data)
  6840. {
  6841. *(volatile U8 *)REG_USB_TXTYPE_HOST = data;
  6842. #if GH_USB_ENABLE_DEBUG_PRINT
  6843. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST] <-- 0x%08x\n",
  6844. REG_USB_TXTYPE_HOST,data,data);
  6845. #endif
  6846. }
  6847. GH_INLINE U8 GH_USB_get_TxType_HOST(void)
  6848. {
  6849. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  6850. #if GH_USB_ENABLE_DEBUG_PRINT
  6851. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST] --> 0x%08x\n",
  6852. REG_USB_TXTYPE_HOST,value);
  6853. #endif
  6854. return value;
  6855. }
  6856. GH_INLINE void GH_USB_set_TxType_HOST_TargetEndpointNumber(U8 data)
  6857. {
  6858. GH_USB_TXTYPE_HOST_S d;
  6859. d.all = *(volatile U8 *)REG_USB_TXTYPE_HOST;
  6860. d.bitc.targetendpointnumber = data;
  6861. *(volatile U8 *)REG_USB_TXTYPE_HOST = d.all;
  6862. #if GH_USB_ENABLE_DEBUG_PRINT
  6863. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST_TargetEndpointNumber] <-- 0x%08x\n",
  6864. REG_USB_TXTYPE_HOST,d.all,d.all);
  6865. #endif
  6866. }
  6867. GH_INLINE U8 GH_USB_get_TxType_HOST_TargetEndpointNumber(void)
  6868. {
  6869. GH_USB_TXTYPE_HOST_S tmp_value;
  6870. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  6871. tmp_value.all = value;
  6872. #if GH_USB_ENABLE_DEBUG_PRINT
  6873. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST_TargetEndpointNumber] --> 0x%08x\n",
  6874. REG_USB_TXTYPE_HOST,value);
  6875. #endif
  6876. return tmp_value.bitc.targetendpointnumber;
  6877. }
  6878. GH_INLINE void GH_USB_set_TxType_HOST_Protocol(U8 data)
  6879. {
  6880. GH_USB_TXTYPE_HOST_S d;
  6881. d.all = *(volatile U8 *)REG_USB_TXTYPE_HOST;
  6882. d.bitc.protocol = data;
  6883. *(volatile U8 *)REG_USB_TXTYPE_HOST = d.all;
  6884. #if GH_USB_ENABLE_DEBUG_PRINT
  6885. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST_Protocol] <-- 0x%08x\n",
  6886. REG_USB_TXTYPE_HOST,d.all,d.all);
  6887. #endif
  6888. }
  6889. GH_INLINE U8 GH_USB_get_TxType_HOST_Protocol(void)
  6890. {
  6891. GH_USB_TXTYPE_HOST_S tmp_value;
  6892. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  6893. tmp_value.all = value;
  6894. #if GH_USB_ENABLE_DEBUG_PRINT
  6895. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST_Protocol] --> 0x%08x\n",
  6896. REG_USB_TXTYPE_HOST,value);
  6897. #endif
  6898. return tmp_value.bitc.protocol;
  6899. }
  6900. GH_INLINE void GH_USB_set_TxType_HOST_Speed(U8 data)
  6901. {
  6902. GH_USB_TXTYPE_HOST_S d;
  6903. d.all = *(volatile U8 *)REG_USB_TXTYPE_HOST;
  6904. d.bitc.speed = data;
  6905. *(volatile U8 *)REG_USB_TXTYPE_HOST = d.all;
  6906. #if GH_USB_ENABLE_DEBUG_PRINT
  6907. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST_Speed] <-- 0x%08x\n",
  6908. REG_USB_TXTYPE_HOST,d.all,d.all);
  6909. #endif
  6910. }
  6911. GH_INLINE U8 GH_USB_get_TxType_HOST_Speed(void)
  6912. {
  6913. GH_USB_TXTYPE_HOST_S tmp_value;
  6914. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  6915. tmp_value.all = value;
  6916. #if GH_USB_ENABLE_DEBUG_PRINT
  6917. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST_Speed] --> 0x%08x\n",
  6918. REG_USB_TXTYPE_HOST,value);
  6919. #endif
  6920. return tmp_value.bitc.speed;
  6921. }
  6922. #endif /* GH_INLINE_LEVEL == 0 */
  6923. /*----------------------------------------------------------------------------*/
  6924. /* register USB_TxInterval_HOST (read/write) */
  6925. /*----------------------------------------------------------------------------*/
  6926. #if GH_INLINE_LEVEL == 0
  6927. /*! \brief Writes the register 'USB_TxInterval_HOST'. */
  6928. void GH_USB_set_TxInterval_HOST(U8 data);
  6929. /*! \brief Reads the register 'USB_TxInterval_HOST'. */
  6930. U8 GH_USB_get_TxInterval_HOST(void);
  6931. /*! \brief Writes the bit group 'TxPollingInterval_NAKLimit' of register 'USB_TxInterval_HOST'. */
  6932. void GH_USB_set_TxInterval_HOST_TxPollingInterval_NAKLimit(U8 data);
  6933. /*! \brief Reads the bit group 'TxPollingInterval_NAKLimit' of register 'USB_TxInterval_HOST'. */
  6934. U8 GH_USB_get_TxInterval_HOST_TxPollingInterval_NAKLimit(void);
  6935. #else /* GH_INLINE_LEVEL == 0 */
  6936. GH_INLINE void GH_USB_set_TxInterval_HOST(U8 data)
  6937. {
  6938. *(volatile U8 *)REG_USB_TXINTERVAL_HOST = data;
  6939. #if GH_USB_ENABLE_DEBUG_PRINT
  6940. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxInterval_HOST] <-- 0x%08x\n",
  6941. REG_USB_TXINTERVAL_HOST,data,data);
  6942. #endif
  6943. }
  6944. GH_INLINE U8 GH_USB_get_TxInterval_HOST(void)
  6945. {
  6946. U8 value = (*(volatile U8 *)REG_USB_TXINTERVAL_HOST);
  6947. #if GH_USB_ENABLE_DEBUG_PRINT
  6948. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxInterval_HOST] --> 0x%08x\n",
  6949. REG_USB_TXINTERVAL_HOST,value);
  6950. #endif
  6951. return value;
  6952. }
  6953. GH_INLINE void GH_USB_set_TxInterval_HOST_TxPollingInterval_NAKLimit(U8 data)
  6954. {
  6955. GH_USB_TXINTERVAL_HOST_S d;
  6956. d.all = *(volatile U8 *)REG_USB_TXINTERVAL_HOST;
  6957. d.bitc.txpollinginterval_naklimit = data;
  6958. *(volatile U8 *)REG_USB_TXINTERVAL_HOST = d.all;
  6959. #if GH_USB_ENABLE_DEBUG_PRINT
  6960. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxInterval_HOST_TxPollingInterval_NAKLimit] <-- 0x%08x\n",
  6961. REG_USB_TXINTERVAL_HOST,d.all,d.all);
  6962. #endif
  6963. }
  6964. GH_INLINE U8 GH_USB_get_TxInterval_HOST_TxPollingInterval_NAKLimit(void)
  6965. {
  6966. GH_USB_TXINTERVAL_HOST_S tmp_value;
  6967. U8 value = (*(volatile U8 *)REG_USB_TXINTERVAL_HOST);
  6968. tmp_value.all = value;
  6969. #if GH_USB_ENABLE_DEBUG_PRINT
  6970. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxInterval_HOST_TxPollingInterval_NAKLimit] --> 0x%08x\n",
  6971. REG_USB_TXINTERVAL_HOST,value);
  6972. #endif
  6973. return tmp_value.bitc.txpollinginterval_naklimit;
  6974. }
  6975. #endif /* GH_INLINE_LEVEL == 0 */
  6976. /*----------------------------------------------------------------------------*/
  6977. /* register USB_RxType_HOST (read/write) */
  6978. /*----------------------------------------------------------------------------*/
  6979. #if GH_INLINE_LEVEL == 0
  6980. /*! \brief Writes the register 'USB_RxType_HOST'. */
  6981. void GH_USB_set_RxType_HOST(U8 data);
  6982. /*! \brief Reads the register 'USB_RxType_HOST'. */
  6983. U8 GH_USB_get_RxType_HOST(void);
  6984. /*! \brief Writes the bit group 'TargetEndpointNumber' of register 'USB_RxType_HOST'. */
  6985. void GH_USB_set_RxType_HOST_TargetEndpointNumber(U8 data);
  6986. /*! \brief Reads the bit group 'TargetEndpointNumber' of register 'USB_RxType_HOST'. */
  6987. U8 GH_USB_get_RxType_HOST_TargetEndpointNumber(void);
  6988. /*! \brief Writes the bit group 'Protocol' of register 'USB_RxType_HOST'. */
  6989. void GH_USB_set_RxType_HOST_Protocol(U8 data);
  6990. /*! \brief Reads the bit group 'Protocol' of register 'USB_RxType_HOST'. */
  6991. U8 GH_USB_get_RxType_HOST_Protocol(void);
  6992. /*! \brief Writes the bit group 'Speed' of register 'USB_RxType_HOST'. */
  6993. void GH_USB_set_RxType_HOST_Speed(U8 data);
  6994. /*! \brief Reads the bit group 'Speed' of register 'USB_RxType_HOST'. */
  6995. U8 GH_USB_get_RxType_HOST_Speed(void);
  6996. #else /* GH_INLINE_LEVEL == 0 */
  6997. GH_INLINE void GH_USB_set_RxType_HOST(U8 data)
  6998. {
  6999. *(volatile U8 *)REG_USB_RXTYPE_HOST = data;
  7000. #if GH_USB_ENABLE_DEBUG_PRINT
  7001. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST] <-- 0x%08x\n",
  7002. REG_USB_RXTYPE_HOST,data,data);
  7003. #endif
  7004. }
  7005. GH_INLINE U8 GH_USB_get_RxType_HOST(void)
  7006. {
  7007. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  7008. #if GH_USB_ENABLE_DEBUG_PRINT
  7009. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST] --> 0x%08x\n",
  7010. REG_USB_RXTYPE_HOST,value);
  7011. #endif
  7012. return value;
  7013. }
  7014. GH_INLINE void GH_USB_set_RxType_HOST_TargetEndpointNumber(U8 data)
  7015. {
  7016. GH_USB_RXTYPE_HOST_S d;
  7017. d.all = *(volatile U8 *)REG_USB_RXTYPE_HOST;
  7018. d.bitc.targetendpointnumber = data;
  7019. *(volatile U8 *)REG_USB_RXTYPE_HOST = d.all;
  7020. #if GH_USB_ENABLE_DEBUG_PRINT
  7021. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST_TargetEndpointNumber] <-- 0x%08x\n",
  7022. REG_USB_RXTYPE_HOST,d.all,d.all);
  7023. #endif
  7024. }
  7025. GH_INLINE U8 GH_USB_get_RxType_HOST_TargetEndpointNumber(void)
  7026. {
  7027. GH_USB_RXTYPE_HOST_S tmp_value;
  7028. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  7029. tmp_value.all = value;
  7030. #if GH_USB_ENABLE_DEBUG_PRINT
  7031. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST_TargetEndpointNumber] --> 0x%08x\n",
  7032. REG_USB_RXTYPE_HOST,value);
  7033. #endif
  7034. return tmp_value.bitc.targetendpointnumber;
  7035. }
  7036. GH_INLINE void GH_USB_set_RxType_HOST_Protocol(U8 data)
  7037. {
  7038. GH_USB_RXTYPE_HOST_S d;
  7039. d.all = *(volatile U8 *)REG_USB_RXTYPE_HOST;
  7040. d.bitc.protocol = data;
  7041. *(volatile U8 *)REG_USB_RXTYPE_HOST = d.all;
  7042. #if GH_USB_ENABLE_DEBUG_PRINT
  7043. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST_Protocol] <-- 0x%08x\n",
  7044. REG_USB_RXTYPE_HOST,d.all,d.all);
  7045. #endif
  7046. }
  7047. GH_INLINE U8 GH_USB_get_RxType_HOST_Protocol(void)
  7048. {
  7049. GH_USB_RXTYPE_HOST_S tmp_value;
  7050. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  7051. tmp_value.all = value;
  7052. #if GH_USB_ENABLE_DEBUG_PRINT
  7053. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST_Protocol] --> 0x%08x\n",
  7054. REG_USB_RXTYPE_HOST,value);
  7055. #endif
  7056. return tmp_value.bitc.protocol;
  7057. }
  7058. GH_INLINE void GH_USB_set_RxType_HOST_Speed(U8 data)
  7059. {
  7060. GH_USB_RXTYPE_HOST_S d;
  7061. d.all = *(volatile U8 *)REG_USB_RXTYPE_HOST;
  7062. d.bitc.speed = data;
  7063. *(volatile U8 *)REG_USB_RXTYPE_HOST = d.all;
  7064. #if GH_USB_ENABLE_DEBUG_PRINT
  7065. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST_Speed] <-- 0x%08x\n",
  7066. REG_USB_RXTYPE_HOST,d.all,d.all);
  7067. #endif
  7068. }
  7069. GH_INLINE U8 GH_USB_get_RxType_HOST_Speed(void)
  7070. {
  7071. GH_USB_RXTYPE_HOST_S tmp_value;
  7072. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  7073. tmp_value.all = value;
  7074. #if GH_USB_ENABLE_DEBUG_PRINT
  7075. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST_Speed] --> 0x%08x\n",
  7076. REG_USB_RXTYPE_HOST,value);
  7077. #endif
  7078. return tmp_value.bitc.speed;
  7079. }
  7080. #endif /* GH_INLINE_LEVEL == 0 */
  7081. /*----------------------------------------------------------------------------*/
  7082. /* register USB_RxInterval_HOST (read/write) */
  7083. /*----------------------------------------------------------------------------*/
  7084. #if GH_INLINE_LEVEL == 0
  7085. /*! \brief Writes the register 'USB_RxInterval_HOST'. */
  7086. void GH_USB_set_RxInterval_HOST(U8 data);
  7087. /*! \brief Reads the register 'USB_RxInterval_HOST'. */
  7088. U8 GH_USB_get_RxInterval_HOST(void);
  7089. /*! \brief Writes the bit group 'RxPollingInterval_NAKLimit' of register 'USB_RxInterval_HOST'. */
  7090. void GH_USB_set_RxInterval_HOST_RxPollingInterval_NAKLimit(U8 data);
  7091. /*! \brief Reads the bit group 'RxPollingInterval_NAKLimit' of register 'USB_RxInterval_HOST'. */
  7092. U8 GH_USB_get_RxInterval_HOST_RxPollingInterval_NAKLimit(void);
  7093. #else /* GH_INLINE_LEVEL == 0 */
  7094. GH_INLINE void GH_USB_set_RxInterval_HOST(U8 data)
  7095. {
  7096. *(volatile U8 *)REG_USB_RXINTERVAL_HOST = data;
  7097. #if GH_USB_ENABLE_DEBUG_PRINT
  7098. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxInterval_HOST] <-- 0x%08x\n",
  7099. REG_USB_RXINTERVAL_HOST,data,data);
  7100. #endif
  7101. }
  7102. GH_INLINE U8 GH_USB_get_RxInterval_HOST(void)
  7103. {
  7104. U8 value = (*(volatile U8 *)REG_USB_RXINTERVAL_HOST);
  7105. #if GH_USB_ENABLE_DEBUG_PRINT
  7106. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxInterval_HOST] --> 0x%08x\n",
  7107. REG_USB_RXINTERVAL_HOST,value);
  7108. #endif
  7109. return value;
  7110. }
  7111. GH_INLINE void GH_USB_set_RxInterval_HOST_RxPollingInterval_NAKLimit(U8 data)
  7112. {
  7113. GH_USB_RXINTERVAL_HOST_S d;
  7114. d.all = *(volatile U8 *)REG_USB_RXINTERVAL_HOST;
  7115. d.bitc.rxpollinginterval_naklimit = data;
  7116. *(volatile U8 *)REG_USB_RXINTERVAL_HOST = d.all;
  7117. #if GH_USB_ENABLE_DEBUG_PRINT
  7118. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxInterval_HOST_RxPollingInterval_NAKLimit] <-- 0x%08x\n",
  7119. REG_USB_RXINTERVAL_HOST,d.all,d.all);
  7120. #endif
  7121. }
  7122. GH_INLINE U8 GH_USB_get_RxInterval_HOST_RxPollingInterval_NAKLimit(void)
  7123. {
  7124. GH_USB_RXINTERVAL_HOST_S tmp_value;
  7125. U8 value = (*(volatile U8 *)REG_USB_RXINTERVAL_HOST);
  7126. tmp_value.all = value;
  7127. #if GH_USB_ENABLE_DEBUG_PRINT
  7128. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxInterval_HOST_RxPollingInterval_NAKLimit] --> 0x%08x\n",
  7129. REG_USB_RXINTERVAL_HOST,value);
  7130. #endif
  7131. return tmp_value.bitc.rxpollinginterval_naklimit;
  7132. }
  7133. #endif /* GH_INLINE_LEVEL == 0 */
  7134. /*----------------------------------------------------------------------------*/
  7135. /* register USB_FIFOSize (read) */
  7136. /*----------------------------------------------------------------------------*/
  7137. #if GH_INLINE_LEVEL == 0
  7138. /*! \brief Reads the register 'USB_FIFOSize'. */
  7139. U8 GH_USB_get_FIFOSize(void);
  7140. /*! \brief Reads the bit group 'TxFIFOSize' of register 'USB_FIFOSize'. */
  7141. U8 GH_USB_get_FIFOSize_TxFIFOSize(void);
  7142. /*! \brief Reads the bit group 'RxFIFOSize' of register 'USB_FIFOSize'. */
  7143. U8 GH_USB_get_FIFOSize_RxFIFOSize(void);
  7144. #else /* GH_INLINE_LEVEL == 0 */
  7145. GH_INLINE U8 GH_USB_get_FIFOSize(void)
  7146. {
  7147. U8 value = (*(volatile U8 *)REG_USB_FIFOSIZE);
  7148. #if GH_USB_ENABLE_DEBUG_PRINT
  7149. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOSize] --> 0x%08x\n",
  7150. REG_USB_FIFOSIZE,value);
  7151. #endif
  7152. return value;
  7153. }
  7154. GH_INLINE U8 GH_USB_get_FIFOSize_TxFIFOSize(void)
  7155. {
  7156. GH_USB_FIFOSIZE_S tmp_value;
  7157. U8 value = (*(volatile U8 *)REG_USB_FIFOSIZE);
  7158. tmp_value.all = value;
  7159. #if GH_USB_ENABLE_DEBUG_PRINT
  7160. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOSize_TxFIFOSize] --> 0x%08x\n",
  7161. REG_USB_FIFOSIZE,value);
  7162. #endif
  7163. return tmp_value.bitc.txfifosize;
  7164. }
  7165. GH_INLINE U8 GH_USB_get_FIFOSize_RxFIFOSize(void)
  7166. {
  7167. GH_USB_FIFOSIZE_S tmp_value;
  7168. U8 value = (*(volatile U8 *)REG_USB_FIFOSIZE);
  7169. tmp_value.all = value;
  7170. #if GH_USB_ENABLE_DEBUG_PRINT
  7171. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOSize_RxFIFOSize] --> 0x%08x\n",
  7172. REG_USB_FIFOSIZE,value);
  7173. #endif
  7174. return tmp_value.bitc.rxfifosize;
  7175. }
  7176. #endif /* GH_INLINE_LEVEL == 0 */
  7177. /*----------------------------------------------------------------------------*/
  7178. /* register USB_FIFOs (read/write) */
  7179. /*----------------------------------------------------------------------------*/
  7180. #if GH_INLINE_LEVEL == 0
  7181. /*! \brief Writes the register 'USB_FIFOs'. */
  7182. void GH_USB_set_FIFOs(U8 index, U8 data);
  7183. /*! \brief Reads the register 'USB_FIFOs'. */
  7184. U8 GH_USB_get_FIFOs(U8 index);
  7185. #else /* GH_INLINE_LEVEL == 0 */
  7186. GH_INLINE void GH_USB_set_FIFOs(U8 index, U8 data)
  7187. {
  7188. *(volatile U8 *)(REG_USB_FIFOS + index * FIO_MOFFSET(USB,OFFSET_USB_EP_FIFO)) = data;
  7189. #if GH_USB_ENABLE_DEBUG_PRINT
  7190. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FIFOs] <-- 0x%08x\n",
  7191. (REG_USB_FIFOS + index * FIO_MOFFSET(USB,OFFSET_USB_EP_FIFO)),data,data);
  7192. #endif
  7193. }
  7194. GH_INLINE U8 GH_USB_get_FIFOs(U8 index)
  7195. {
  7196. U8 value = (*(volatile U8 *)(REG_USB_FIFOS + index * FIO_MOFFSET(USB,OFFSET_USB_EP_FIFO)));
  7197. #if GH_USB_ENABLE_DEBUG_PRINT
  7198. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOs] --> 0x%08x\n",
  7199. (REG_USB_FIFOS + index * FIO_MOFFSET(USB,OFFSET_USB_EP_FIFO)),value);
  7200. #endif
  7201. return value;
  7202. }
  7203. #endif /* GH_INLINE_LEVEL == 0 */
  7204. /*----------------------------------------------------------------------------*/
  7205. /* register USB_DevCtl_R (read) */
  7206. /*----------------------------------------------------------------------------*/
  7207. #if GH_INLINE_LEVEL == 0
  7208. /*! \brief Reads the register 'USB_DevCtl_R'. */
  7209. U8 GH_USB_get_DevCtl_R(void);
  7210. /*! \brief Reads the bit group 'Session' of register 'USB_DevCtl_R'. */
  7211. U8 GH_USB_get_DevCtl_R_Session(void);
  7212. /*! \brief Reads the bit group 'Host_Req' of register 'USB_DevCtl_R'. */
  7213. U8 GH_USB_get_DevCtl_R_Host_Req(void);
  7214. /*! \brief Reads the bit group 'Host_Mode' of register 'USB_DevCtl_R'. */
  7215. U8 GH_USB_get_DevCtl_R_Host_Mode(void);
  7216. /*! \brief Reads the bit group 'VBus' of register 'USB_DevCtl_R'. */
  7217. U8 GH_USB_get_DevCtl_R_VBus(void);
  7218. /*! \brief Reads the bit group 'LSDev' of register 'USB_DevCtl_R'. */
  7219. U8 GH_USB_get_DevCtl_R_LSDev(void);
  7220. /*! \brief Reads the bit group 'FSDev' of register 'USB_DevCtl_R'. */
  7221. U8 GH_USB_get_DevCtl_R_FSDev(void);
  7222. /*! \brief Reads the bit group 'B_Device' of register 'USB_DevCtl_R'. */
  7223. U8 GH_USB_get_DevCtl_R_B_Device(void);
  7224. #else /* GH_INLINE_LEVEL == 0 */
  7225. GH_INLINE U8 GH_USB_get_DevCtl_R(void)
  7226. {
  7227. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7228. #if GH_USB_ENABLE_DEBUG_PRINT
  7229. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R] --> 0x%08x\n",
  7230. REG_USB_DEVCTL_R,value);
  7231. #endif
  7232. return value;
  7233. }
  7234. GH_INLINE U8 GH_USB_get_DevCtl_R_Session(void)
  7235. {
  7236. GH_USB_DEVCTL_R_S tmp_value;
  7237. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7238. tmp_value.all = value;
  7239. #if GH_USB_ENABLE_DEBUG_PRINT
  7240. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_Session] --> 0x%08x\n",
  7241. REG_USB_DEVCTL_R,value);
  7242. #endif
  7243. return tmp_value.bitc.session;
  7244. }
  7245. GH_INLINE U8 GH_USB_get_DevCtl_R_Host_Req(void)
  7246. {
  7247. GH_USB_DEVCTL_R_S tmp_value;
  7248. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7249. tmp_value.all = value;
  7250. #if GH_USB_ENABLE_DEBUG_PRINT
  7251. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_Host_Req] --> 0x%08x\n",
  7252. REG_USB_DEVCTL_R,value);
  7253. #endif
  7254. return tmp_value.bitc.host_req;
  7255. }
  7256. GH_INLINE U8 GH_USB_get_DevCtl_R_Host_Mode(void)
  7257. {
  7258. GH_USB_DEVCTL_R_S tmp_value;
  7259. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7260. tmp_value.all = value;
  7261. #if GH_USB_ENABLE_DEBUG_PRINT
  7262. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_Host_Mode] --> 0x%08x\n",
  7263. REG_USB_DEVCTL_R,value);
  7264. #endif
  7265. return tmp_value.bitc.host_mode;
  7266. }
  7267. GH_INLINE U8 GH_USB_get_DevCtl_R_VBus(void)
  7268. {
  7269. GH_USB_DEVCTL_R_S tmp_value;
  7270. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7271. tmp_value.all = value;
  7272. #if GH_USB_ENABLE_DEBUG_PRINT
  7273. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_VBus] --> 0x%08x\n",
  7274. REG_USB_DEVCTL_R,value);
  7275. #endif
  7276. return tmp_value.bitc.vbus;
  7277. }
  7278. GH_INLINE U8 GH_USB_get_DevCtl_R_LSDev(void)
  7279. {
  7280. GH_USB_DEVCTL_R_S tmp_value;
  7281. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7282. tmp_value.all = value;
  7283. #if GH_USB_ENABLE_DEBUG_PRINT
  7284. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_LSDev] --> 0x%08x\n",
  7285. REG_USB_DEVCTL_R,value);
  7286. #endif
  7287. return tmp_value.bitc.lsdev;
  7288. }
  7289. GH_INLINE U8 GH_USB_get_DevCtl_R_FSDev(void)
  7290. {
  7291. GH_USB_DEVCTL_R_S tmp_value;
  7292. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7293. tmp_value.all = value;
  7294. #if GH_USB_ENABLE_DEBUG_PRINT
  7295. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_FSDev] --> 0x%08x\n",
  7296. REG_USB_DEVCTL_R,value);
  7297. #endif
  7298. return tmp_value.bitc.fsdev;
  7299. }
  7300. GH_INLINE U8 GH_USB_get_DevCtl_R_B_Device(void)
  7301. {
  7302. GH_USB_DEVCTL_R_S tmp_value;
  7303. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  7304. tmp_value.all = value;
  7305. #if GH_USB_ENABLE_DEBUG_PRINT
  7306. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_B_Device] --> 0x%08x\n",
  7307. REG_USB_DEVCTL_R,value);
  7308. #endif
  7309. return tmp_value.bitc.b_device;
  7310. }
  7311. #endif /* GH_INLINE_LEVEL == 0 */
  7312. /*----------------------------------------------------------------------------*/
  7313. /* register USB_DevCtl_W (write) */
  7314. /*----------------------------------------------------------------------------*/
  7315. #if GH_INLINE_LEVEL < 2
  7316. /*! \brief Writes the register 'USB_DevCtl_W'. */
  7317. void GH_USB_set_DevCtl_W(U8 data);
  7318. /*! \brief Reads the mirror variable of the register 'USB_DevCtl_W'. */
  7319. U8 GH_USB_getm_DevCtl_W(void);
  7320. /*! \brief Writes the bit group 'Session' of register 'USB_DevCtl_W'. */
  7321. void GH_USB_set_DevCtl_W_Session(U8 data);
  7322. /*! \brief Reads the bit group 'Session' from the mirror variable of register 'USB_DevCtl_W'. */
  7323. U8 GH_USB_getm_DevCtl_W_Session(void);
  7324. /*! \brief Writes the bit group 'Host_Req' of register 'USB_DevCtl_W'. */
  7325. void GH_USB_set_DevCtl_W_Host_Req(U8 data);
  7326. /*! \brief Reads the bit group 'Host_Req' from the mirror variable of register 'USB_DevCtl_W'. */
  7327. U8 GH_USB_getm_DevCtl_W_Host_Req(void);
  7328. #else /* GH_INLINE_LEVEL < 2 */
  7329. GH_INLINE void GH_USB_set_DevCtl_W(U8 data)
  7330. {
  7331. m_usb_devctl_w.all = data;
  7332. *(volatile U8 *)REG_USB_DEVCTL_W = data;
  7333. #if GH_USB_ENABLE_DEBUG_PRINT
  7334. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DevCtl_W] <-- 0x%08x\n",
  7335. REG_USB_DEVCTL_W,data,data);
  7336. #endif
  7337. }
  7338. GH_INLINE U8 GH_USB_getm_DevCtl_W(void)
  7339. {
  7340. #if GH_USB_ENABLE_DEBUG_PRINT
  7341. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_DevCtl_W] --> 0x%08x\n",
  7342. m_usb_devctl_w.all);
  7343. #endif
  7344. return m_usb_devctl_w.all;
  7345. }
  7346. GH_INLINE void GH_USB_set_DevCtl_W_Session(U8 data)
  7347. {
  7348. m_usb_devctl_w.bitc.session = data;
  7349. *(volatile U8 *)REG_USB_DEVCTL_W = m_usb_devctl_w.all;
  7350. #if GH_USB_ENABLE_DEBUG_PRINT
  7351. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DevCtl_W_Session] <-- 0x%08x\n",
  7352. REG_USB_DEVCTL_W,m_usb_devctl_w.all,m_usb_devctl_w.all);
  7353. #endif
  7354. }
  7355. GH_INLINE U8 GH_USB_getm_DevCtl_W_Session(void)
  7356. {
  7357. #if GH_USB_ENABLE_DEBUG_PRINT
  7358. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_DevCtl_W_Session] --> 0x%08x\n",
  7359. m_usb_devctl_w.bitc.session);
  7360. #endif
  7361. return m_usb_devctl_w.bitc.session;
  7362. }
  7363. GH_INLINE void GH_USB_set_DevCtl_W_Host_Req(U8 data)
  7364. {
  7365. m_usb_devctl_w.bitc.host_req = data;
  7366. *(volatile U8 *)REG_USB_DEVCTL_W = m_usb_devctl_w.all;
  7367. #if GH_USB_ENABLE_DEBUG_PRINT
  7368. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DevCtl_W_Host_Req] <-- 0x%08x\n",
  7369. REG_USB_DEVCTL_W,m_usb_devctl_w.all,m_usb_devctl_w.all);
  7370. #endif
  7371. }
  7372. GH_INLINE U8 GH_USB_getm_DevCtl_W_Host_Req(void)
  7373. {
  7374. #if GH_USB_ENABLE_DEBUG_PRINT
  7375. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_DevCtl_W_Host_Req] --> 0x%08x\n",
  7376. m_usb_devctl_w.bitc.host_req);
  7377. #endif
  7378. return m_usb_devctl_w.bitc.host_req;
  7379. }
  7380. #endif /* GH_INLINE_LEVEL < 2 */
  7381. /*----------------------------------------------------------------------------*/
  7382. /* register USB_Misc (read/write) */
  7383. /*----------------------------------------------------------------------------*/
  7384. #if GH_INLINE_LEVEL == 0
  7385. /*! \brief Writes the register 'USB_Misc'. */
  7386. void GH_USB_set_Misc(U8 data);
  7387. /*! \brief Reads the register 'USB_Misc'. */
  7388. U8 GH_USB_get_Misc(void);
  7389. /*! \brief Writes the bit group 'rx_edma' of register 'USB_Misc'. */
  7390. void GH_USB_set_Misc_rx_edma(U8 data);
  7391. /*! \brief Reads the bit group 'rx_edma' of register 'USB_Misc'. */
  7392. U8 GH_USB_get_Misc_rx_edma(void);
  7393. /*! \brief Writes the bit group 'tx_edma' of register 'USB_Misc'. */
  7394. void GH_USB_set_Misc_tx_edma(U8 data);
  7395. /*! \brief Reads the bit group 'tx_edma' of register 'USB_Misc'. */
  7396. U8 GH_USB_get_Misc_tx_edma(void);
  7397. #else /* GH_INLINE_LEVEL == 0 */
  7398. GH_INLINE void GH_USB_set_Misc(U8 data)
  7399. {
  7400. *(volatile U8 *)REG_USB_MISC = data;
  7401. #if GH_USB_ENABLE_DEBUG_PRINT
  7402. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Misc] <-- 0x%08x\n",
  7403. REG_USB_MISC,data,data);
  7404. #endif
  7405. }
  7406. GH_INLINE U8 GH_USB_get_Misc(void)
  7407. {
  7408. U8 value = (*(volatile U8 *)REG_USB_MISC);
  7409. #if GH_USB_ENABLE_DEBUG_PRINT
  7410. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Misc] --> 0x%08x\n",
  7411. REG_USB_MISC,value);
  7412. #endif
  7413. return value;
  7414. }
  7415. GH_INLINE void GH_USB_set_Misc_rx_edma(U8 data)
  7416. {
  7417. GH_USB_MISC_S d;
  7418. d.all = *(volatile U8 *)REG_USB_MISC;
  7419. d.bitc.rx_edma = data;
  7420. *(volatile U8 *)REG_USB_MISC = d.all;
  7421. #if GH_USB_ENABLE_DEBUG_PRINT
  7422. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Misc_rx_edma] <-- 0x%08x\n",
  7423. REG_USB_MISC,d.all,d.all);
  7424. #endif
  7425. }
  7426. GH_INLINE U8 GH_USB_get_Misc_rx_edma(void)
  7427. {
  7428. GH_USB_MISC_S tmp_value;
  7429. U8 value = (*(volatile U8 *)REG_USB_MISC);
  7430. tmp_value.all = value;
  7431. #if GH_USB_ENABLE_DEBUG_PRINT
  7432. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Misc_rx_edma] --> 0x%08x\n",
  7433. REG_USB_MISC,value);
  7434. #endif
  7435. return tmp_value.bitc.rx_edma;
  7436. }
  7437. GH_INLINE void GH_USB_set_Misc_tx_edma(U8 data)
  7438. {
  7439. GH_USB_MISC_S d;
  7440. d.all = *(volatile U8 *)REG_USB_MISC;
  7441. d.bitc.tx_edma = data;
  7442. *(volatile U8 *)REG_USB_MISC = d.all;
  7443. #if GH_USB_ENABLE_DEBUG_PRINT
  7444. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Misc_tx_edma] <-- 0x%08x\n",
  7445. REG_USB_MISC,d.all,d.all);
  7446. #endif
  7447. }
  7448. GH_INLINE U8 GH_USB_get_Misc_tx_edma(void)
  7449. {
  7450. GH_USB_MISC_S tmp_value;
  7451. U8 value = (*(volatile U8 *)REG_USB_MISC);
  7452. tmp_value.all = value;
  7453. #if GH_USB_ENABLE_DEBUG_PRINT
  7454. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Misc_tx_edma] --> 0x%08x\n",
  7455. REG_USB_MISC,value);
  7456. #endif
  7457. return tmp_value.bitc.tx_edma;
  7458. }
  7459. #endif /* GH_INLINE_LEVEL == 0 */
  7460. /*----------------------------------------------------------------------------*/
  7461. /* register USB_TxFIFOsz (read/write) */
  7462. /*----------------------------------------------------------------------------*/
  7463. #if GH_INLINE_LEVEL == 0
  7464. /*! \brief Writes the register 'USB_TxFIFOsz'. */
  7465. void GH_USB_set_TxFIFOsz(U8 data);
  7466. /*! \brief Reads the register 'USB_TxFIFOsz'. */
  7467. U8 GH_USB_get_TxFIFOsz(void);
  7468. /*! \brief Writes the bit group 'SZ' of register 'USB_TxFIFOsz'. */
  7469. void GH_USB_set_TxFIFOsz_SZ(U8 data);
  7470. /*! \brief Reads the bit group 'SZ' of register 'USB_TxFIFOsz'. */
  7471. U8 GH_USB_get_TxFIFOsz_SZ(void);
  7472. /*! \brief Writes the bit group 'DPB' of register 'USB_TxFIFOsz'. */
  7473. void GH_USB_set_TxFIFOsz_DPB(U8 data);
  7474. /*! \brief Reads the bit group 'DPB' of register 'USB_TxFIFOsz'. */
  7475. U8 GH_USB_get_TxFIFOsz_DPB(void);
  7476. #else /* GH_INLINE_LEVEL == 0 */
  7477. GH_INLINE void GH_USB_set_TxFIFOsz(U8 data)
  7478. {
  7479. *(volatile U8 *)REG_USB_TXFIFOSZ = data;
  7480. #if GH_USB_ENABLE_DEBUG_PRINT
  7481. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOsz] <-- 0x%08x\n",
  7482. REG_USB_TXFIFOSZ,data,data);
  7483. #endif
  7484. }
  7485. GH_INLINE U8 GH_USB_get_TxFIFOsz(void)
  7486. {
  7487. U8 value = (*(volatile U8 *)REG_USB_TXFIFOSZ);
  7488. #if GH_USB_ENABLE_DEBUG_PRINT
  7489. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOsz] --> 0x%08x\n",
  7490. REG_USB_TXFIFOSZ,value);
  7491. #endif
  7492. return value;
  7493. }
  7494. GH_INLINE void GH_USB_set_TxFIFOsz_SZ(U8 data)
  7495. {
  7496. GH_USB_TXFIFOSZ_S d;
  7497. d.all = *(volatile U8 *)REG_USB_TXFIFOSZ;
  7498. d.bitc.sz = data;
  7499. *(volatile U8 *)REG_USB_TXFIFOSZ = d.all;
  7500. #if GH_USB_ENABLE_DEBUG_PRINT
  7501. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOsz_SZ] <-- 0x%08x\n",
  7502. REG_USB_TXFIFOSZ,d.all,d.all);
  7503. #endif
  7504. }
  7505. GH_INLINE U8 GH_USB_get_TxFIFOsz_SZ(void)
  7506. {
  7507. GH_USB_TXFIFOSZ_S tmp_value;
  7508. U8 value = (*(volatile U8 *)REG_USB_TXFIFOSZ);
  7509. tmp_value.all = value;
  7510. #if GH_USB_ENABLE_DEBUG_PRINT
  7511. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOsz_SZ] --> 0x%08x\n",
  7512. REG_USB_TXFIFOSZ,value);
  7513. #endif
  7514. return tmp_value.bitc.sz;
  7515. }
  7516. GH_INLINE void GH_USB_set_TxFIFOsz_DPB(U8 data)
  7517. {
  7518. GH_USB_TXFIFOSZ_S d;
  7519. d.all = *(volatile U8 *)REG_USB_TXFIFOSZ;
  7520. d.bitc.dpb = data;
  7521. *(volatile U8 *)REG_USB_TXFIFOSZ = d.all;
  7522. #if GH_USB_ENABLE_DEBUG_PRINT
  7523. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOsz_DPB] <-- 0x%08x\n",
  7524. REG_USB_TXFIFOSZ,d.all,d.all);
  7525. #endif
  7526. }
  7527. GH_INLINE U8 GH_USB_get_TxFIFOsz_DPB(void)
  7528. {
  7529. GH_USB_TXFIFOSZ_S tmp_value;
  7530. U8 value = (*(volatile U8 *)REG_USB_TXFIFOSZ);
  7531. tmp_value.all = value;
  7532. #if GH_USB_ENABLE_DEBUG_PRINT
  7533. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOsz_DPB] --> 0x%08x\n",
  7534. REG_USB_TXFIFOSZ,value);
  7535. #endif
  7536. return tmp_value.bitc.dpb;
  7537. }
  7538. #endif /* GH_INLINE_LEVEL == 0 */
  7539. /*----------------------------------------------------------------------------*/
  7540. /* register USB_RxFIFOsz (read/write) */
  7541. /*----------------------------------------------------------------------------*/
  7542. #if GH_INLINE_LEVEL == 0
  7543. /*! \brief Writes the register 'USB_RxFIFOsz'. */
  7544. void GH_USB_set_RxFIFOsz(U8 data);
  7545. /*! \brief Reads the register 'USB_RxFIFOsz'. */
  7546. U8 GH_USB_get_RxFIFOsz(void);
  7547. /*! \brief Writes the bit group 'SZ' of register 'USB_RxFIFOsz'. */
  7548. void GH_USB_set_RxFIFOsz_SZ(U8 data);
  7549. /*! \brief Reads the bit group 'SZ' of register 'USB_RxFIFOsz'. */
  7550. U8 GH_USB_get_RxFIFOsz_SZ(void);
  7551. /*! \brief Writes the bit group 'DPB' of register 'USB_RxFIFOsz'. */
  7552. void GH_USB_set_RxFIFOsz_DPB(U8 data);
  7553. /*! \brief Reads the bit group 'DPB' of register 'USB_RxFIFOsz'. */
  7554. U8 GH_USB_get_RxFIFOsz_DPB(void);
  7555. #else /* GH_INLINE_LEVEL == 0 */
  7556. GH_INLINE void GH_USB_set_RxFIFOsz(U8 data)
  7557. {
  7558. *(volatile U8 *)REG_USB_RXFIFOSZ = data;
  7559. #if GH_USB_ENABLE_DEBUG_PRINT
  7560. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOsz] <-- 0x%08x\n",
  7561. REG_USB_RXFIFOSZ,data,data);
  7562. #endif
  7563. }
  7564. GH_INLINE U8 GH_USB_get_RxFIFOsz(void)
  7565. {
  7566. U8 value = (*(volatile U8 *)REG_USB_RXFIFOSZ);
  7567. #if GH_USB_ENABLE_DEBUG_PRINT
  7568. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOsz] --> 0x%08x\n",
  7569. REG_USB_RXFIFOSZ,value);
  7570. #endif
  7571. return value;
  7572. }
  7573. GH_INLINE void GH_USB_set_RxFIFOsz_SZ(U8 data)
  7574. {
  7575. GH_USB_RXFIFOSZ_S d;
  7576. d.all = *(volatile U8 *)REG_USB_RXFIFOSZ;
  7577. d.bitc.sz = data;
  7578. *(volatile U8 *)REG_USB_RXFIFOSZ = d.all;
  7579. #if GH_USB_ENABLE_DEBUG_PRINT
  7580. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOsz_SZ] <-- 0x%08x\n",
  7581. REG_USB_RXFIFOSZ,d.all,d.all);
  7582. #endif
  7583. }
  7584. GH_INLINE U8 GH_USB_get_RxFIFOsz_SZ(void)
  7585. {
  7586. GH_USB_RXFIFOSZ_S tmp_value;
  7587. U8 value = (*(volatile U8 *)REG_USB_RXFIFOSZ);
  7588. tmp_value.all = value;
  7589. #if GH_USB_ENABLE_DEBUG_PRINT
  7590. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOsz_SZ] --> 0x%08x\n",
  7591. REG_USB_RXFIFOSZ,value);
  7592. #endif
  7593. return tmp_value.bitc.sz;
  7594. }
  7595. GH_INLINE void GH_USB_set_RxFIFOsz_DPB(U8 data)
  7596. {
  7597. GH_USB_RXFIFOSZ_S d;
  7598. d.all = *(volatile U8 *)REG_USB_RXFIFOSZ;
  7599. d.bitc.dpb = data;
  7600. *(volatile U8 *)REG_USB_RXFIFOSZ = d.all;
  7601. #if GH_USB_ENABLE_DEBUG_PRINT
  7602. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOsz_DPB] <-- 0x%08x\n",
  7603. REG_USB_RXFIFOSZ,d.all,d.all);
  7604. #endif
  7605. }
  7606. GH_INLINE U8 GH_USB_get_RxFIFOsz_DPB(void)
  7607. {
  7608. GH_USB_RXFIFOSZ_S tmp_value;
  7609. U8 value = (*(volatile U8 *)REG_USB_RXFIFOSZ);
  7610. tmp_value.all = value;
  7611. #if GH_USB_ENABLE_DEBUG_PRINT
  7612. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOsz_DPB] --> 0x%08x\n",
  7613. REG_USB_RXFIFOSZ,value);
  7614. #endif
  7615. return tmp_value.bitc.dpb;
  7616. }
  7617. #endif /* GH_INLINE_LEVEL == 0 */
  7618. /*----------------------------------------------------------------------------*/
  7619. /* register USB_TxFIFOadd (read/write) */
  7620. /*----------------------------------------------------------------------------*/
  7621. #if GH_INLINE_LEVEL == 0
  7622. /*! \brief Writes the register 'USB_TxFIFOadd'. */
  7623. void GH_USB_set_TxFIFOadd(U16 data);
  7624. /*! \brief Reads the register 'USB_TxFIFOadd'. */
  7625. U16 GH_USB_get_TxFIFOadd(void);
  7626. /*! \brief Writes the bit group 'Startaddress' of register 'USB_TxFIFOadd'. */
  7627. void GH_USB_set_TxFIFOadd_Startaddress(U16 data);
  7628. /*! \brief Reads the bit group 'Startaddress' of register 'USB_TxFIFOadd'. */
  7629. U16 GH_USB_get_TxFIFOadd_Startaddress(void);
  7630. #else /* GH_INLINE_LEVEL == 0 */
  7631. GH_INLINE void GH_USB_set_TxFIFOadd(U16 data)
  7632. {
  7633. *(volatile U16 *)REG_USB_TXFIFOADD = data;
  7634. #if GH_USB_ENABLE_DEBUG_PRINT
  7635. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOadd] <-- 0x%08x\n",
  7636. REG_USB_TXFIFOADD,data,data);
  7637. #endif
  7638. }
  7639. GH_INLINE U16 GH_USB_get_TxFIFOadd(void)
  7640. {
  7641. U16 value = (*(volatile U16 *)REG_USB_TXFIFOADD);
  7642. #if GH_USB_ENABLE_DEBUG_PRINT
  7643. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOadd] --> 0x%08x\n",
  7644. REG_USB_TXFIFOADD,value);
  7645. #endif
  7646. return value;
  7647. }
  7648. GH_INLINE void GH_USB_set_TxFIFOadd_Startaddress(U16 data)
  7649. {
  7650. GH_USB_TXFIFOADD_S d;
  7651. d.all = *(volatile U16 *)REG_USB_TXFIFOADD;
  7652. d.bitc.startaddress = data;
  7653. *(volatile U16 *)REG_USB_TXFIFOADD = d.all;
  7654. #if GH_USB_ENABLE_DEBUG_PRINT
  7655. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOadd_Startaddress] <-- 0x%08x\n",
  7656. REG_USB_TXFIFOADD,d.all,d.all);
  7657. #endif
  7658. }
  7659. GH_INLINE U16 GH_USB_get_TxFIFOadd_Startaddress(void)
  7660. {
  7661. GH_USB_TXFIFOADD_S tmp_value;
  7662. U16 value = (*(volatile U16 *)REG_USB_TXFIFOADD);
  7663. tmp_value.all = value;
  7664. #if GH_USB_ENABLE_DEBUG_PRINT
  7665. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOadd_Startaddress] --> 0x%08x\n",
  7666. REG_USB_TXFIFOADD,value);
  7667. #endif
  7668. return tmp_value.bitc.startaddress;
  7669. }
  7670. #endif /* GH_INLINE_LEVEL == 0 */
  7671. /*----------------------------------------------------------------------------*/
  7672. /* register USB_RxFIFOadd (read/write) */
  7673. /*----------------------------------------------------------------------------*/
  7674. #if GH_INLINE_LEVEL == 0
  7675. /*! \brief Writes the register 'USB_RxFIFOadd'. */
  7676. void GH_USB_set_RxFIFOadd(U16 data);
  7677. /*! \brief Reads the register 'USB_RxFIFOadd'. */
  7678. U16 GH_USB_get_RxFIFOadd(void);
  7679. /*! \brief Writes the bit group 'Startaddress' of register 'USB_RxFIFOadd'. */
  7680. void GH_USB_set_RxFIFOadd_Startaddress(U16 data);
  7681. /*! \brief Reads the bit group 'Startaddress' of register 'USB_RxFIFOadd'. */
  7682. U16 GH_USB_get_RxFIFOadd_Startaddress(void);
  7683. #else /* GH_INLINE_LEVEL == 0 */
  7684. GH_INLINE void GH_USB_set_RxFIFOadd(U16 data)
  7685. {
  7686. *(volatile U16 *)REG_USB_RXFIFOADD = data;
  7687. #if GH_USB_ENABLE_DEBUG_PRINT
  7688. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOadd] <-- 0x%08x\n",
  7689. REG_USB_RXFIFOADD,data,data);
  7690. #endif
  7691. }
  7692. GH_INLINE U16 GH_USB_get_RxFIFOadd(void)
  7693. {
  7694. U16 value = (*(volatile U16 *)REG_USB_RXFIFOADD);
  7695. #if GH_USB_ENABLE_DEBUG_PRINT
  7696. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOadd] --> 0x%08x\n",
  7697. REG_USB_RXFIFOADD,value);
  7698. #endif
  7699. return value;
  7700. }
  7701. GH_INLINE void GH_USB_set_RxFIFOadd_Startaddress(U16 data)
  7702. {
  7703. GH_USB_RXFIFOADD_S d;
  7704. d.all = *(volatile U16 *)REG_USB_RXFIFOADD;
  7705. d.bitc.startaddress = data;
  7706. *(volatile U16 *)REG_USB_RXFIFOADD = d.all;
  7707. #if GH_USB_ENABLE_DEBUG_PRINT
  7708. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOadd_Startaddress] <-- 0x%08x\n",
  7709. REG_USB_RXFIFOADD,d.all,d.all);
  7710. #endif
  7711. }
  7712. GH_INLINE U16 GH_USB_get_RxFIFOadd_Startaddress(void)
  7713. {
  7714. GH_USB_RXFIFOADD_S tmp_value;
  7715. U16 value = (*(volatile U16 *)REG_USB_RXFIFOADD);
  7716. tmp_value.all = value;
  7717. #if GH_USB_ENABLE_DEBUG_PRINT
  7718. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOadd_Startaddress] --> 0x%08x\n",
  7719. REG_USB_RXFIFOADD,value);
  7720. #endif
  7721. return tmp_value.bitc.startaddress;
  7722. }
  7723. #endif /* GH_INLINE_LEVEL == 0 */
  7724. /*----------------------------------------------------------------------------*/
  7725. /* register USB_VStatus (read) */
  7726. /*----------------------------------------------------------------------------*/
  7727. #if GH_INLINE_LEVEL == 0
  7728. /*! \brief Reads the register 'USB_VStatus'. */
  7729. U32 GH_USB_get_VStatus(void);
  7730. #else /* GH_INLINE_LEVEL == 0 */
  7731. GH_INLINE U32 GH_USB_get_VStatus(void)
  7732. {
  7733. U32 value = (*(volatile U32 *)REG_USB_VSTATUS);
  7734. #if GH_USB_ENABLE_DEBUG_PRINT
  7735. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_VStatus] --> 0x%08x\n",
  7736. REG_USB_VSTATUS,value);
  7737. #endif
  7738. return value;
  7739. }
  7740. #endif /* GH_INLINE_LEVEL == 0 */
  7741. /*----------------------------------------------------------------------------*/
  7742. /* register USB_VControl (write) */
  7743. /*----------------------------------------------------------------------------*/
  7744. #if GH_INLINE_LEVEL < 2
  7745. /*! \brief Writes the register 'USB_VControl'. */
  7746. void GH_USB_set_VControl(U32 data);
  7747. /*! \brief Reads the mirror variable of the register 'USB_VControl'. */
  7748. U32 GH_USB_getm_VControl(void);
  7749. #else /* GH_INLINE_LEVEL < 2 */
  7750. GH_INLINE void GH_USB_set_VControl(U32 data)
  7751. {
  7752. m_usb_vcontrol = data;
  7753. *(volatile U32 *)REG_USB_VCONTROL = data;
  7754. #if GH_USB_ENABLE_DEBUG_PRINT
  7755. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_VControl] <-- 0x%08x\n",
  7756. REG_USB_VCONTROL,data,data);
  7757. #endif
  7758. }
  7759. GH_INLINE U32 GH_USB_getm_VControl(void)
  7760. {
  7761. #if GH_USB_ENABLE_DEBUG_PRINT
  7762. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_VControl] --> 0x%08x\n",
  7763. m_usb_vcontrol);
  7764. #endif
  7765. return m_usb_vcontrol;
  7766. }
  7767. #endif /* GH_INLINE_LEVEL < 2 */
  7768. /*----------------------------------------------------------------------------*/
  7769. /* register USB_HWVers (read) */
  7770. /*----------------------------------------------------------------------------*/
  7771. #if GH_INLINE_LEVEL == 0
  7772. /*! \brief Reads the register 'USB_HWVers'. */
  7773. U16 GH_USB_get_HWVers(void);
  7774. /*! \brief Reads the bit group 'MinorVersion' of register 'USB_HWVers'. */
  7775. U16 GH_USB_get_HWVers_MinorVersion(void);
  7776. /*! \brief Reads the bit group 'MajorVersion' of register 'USB_HWVers'. */
  7777. U8 GH_USB_get_HWVers_MajorVersion(void);
  7778. /*! \brief Reads the bit group 'RC' of register 'USB_HWVers'. */
  7779. U8 GH_USB_get_HWVers_RC(void);
  7780. #else /* GH_INLINE_LEVEL == 0 */
  7781. GH_INLINE U16 GH_USB_get_HWVers(void)
  7782. {
  7783. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  7784. #if GH_USB_ENABLE_DEBUG_PRINT
  7785. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers] --> 0x%08x\n",
  7786. REG_USB_HWVERS,value);
  7787. #endif
  7788. return value;
  7789. }
  7790. GH_INLINE U16 GH_USB_get_HWVers_MinorVersion(void)
  7791. {
  7792. GH_USB_HWVERS_S tmp_value;
  7793. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  7794. tmp_value.all = value;
  7795. #if GH_USB_ENABLE_DEBUG_PRINT
  7796. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers_MinorVersion] --> 0x%08x\n",
  7797. REG_USB_HWVERS,value);
  7798. #endif
  7799. return tmp_value.bitc.minorversion;
  7800. }
  7801. GH_INLINE U8 GH_USB_get_HWVers_MajorVersion(void)
  7802. {
  7803. GH_USB_HWVERS_S tmp_value;
  7804. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  7805. tmp_value.all = value;
  7806. #if GH_USB_ENABLE_DEBUG_PRINT
  7807. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers_MajorVersion] --> 0x%08x\n",
  7808. REG_USB_HWVERS,value);
  7809. #endif
  7810. return tmp_value.bitc.majorversion;
  7811. }
  7812. GH_INLINE U8 GH_USB_get_HWVers_RC(void)
  7813. {
  7814. GH_USB_HWVERS_S tmp_value;
  7815. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  7816. tmp_value.all = value;
  7817. #if GH_USB_ENABLE_DEBUG_PRINT
  7818. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers_RC] --> 0x%08x\n",
  7819. REG_USB_HWVERS,value);
  7820. #endif
  7821. return tmp_value.bitc.rc;
  7822. }
  7823. #endif /* GH_INLINE_LEVEL == 0 */
  7824. /*----------------------------------------------------------------------------*/
  7825. /* register USB_EPInfo (read) */
  7826. /*----------------------------------------------------------------------------*/
  7827. #if GH_INLINE_LEVEL == 0
  7828. /*! \brief Reads the register 'USB_EPInfo'. */
  7829. U8 GH_USB_get_EPInfo(void);
  7830. /*! \brief Reads the bit group 'TxEndPoints' of register 'USB_EPInfo'. */
  7831. U8 GH_USB_get_EPInfo_TxEndPoints(void);
  7832. /*! \brief Reads the bit group 'RxEndPoints' of register 'USB_EPInfo'. */
  7833. U8 GH_USB_get_EPInfo_RxEndPoints(void);
  7834. #else /* GH_INLINE_LEVEL == 0 */
  7835. GH_INLINE U8 GH_USB_get_EPInfo(void)
  7836. {
  7837. U8 value = (*(volatile U8 *)REG_USB_EPINFO);
  7838. #if GH_USB_ENABLE_DEBUG_PRINT
  7839. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_EPInfo] --> 0x%08x\n",
  7840. REG_USB_EPINFO,value);
  7841. #endif
  7842. return value;
  7843. }
  7844. GH_INLINE U8 GH_USB_get_EPInfo_TxEndPoints(void)
  7845. {
  7846. GH_USB_EPINFO_S tmp_value;
  7847. U8 value = (*(volatile U8 *)REG_USB_EPINFO);
  7848. tmp_value.all = value;
  7849. #if GH_USB_ENABLE_DEBUG_PRINT
  7850. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_EPInfo_TxEndPoints] --> 0x%08x\n",
  7851. REG_USB_EPINFO,value);
  7852. #endif
  7853. return tmp_value.bitc.txendpoints;
  7854. }
  7855. GH_INLINE U8 GH_USB_get_EPInfo_RxEndPoints(void)
  7856. {
  7857. GH_USB_EPINFO_S tmp_value;
  7858. U8 value = (*(volatile U8 *)REG_USB_EPINFO);
  7859. tmp_value.all = value;
  7860. #if GH_USB_ENABLE_DEBUG_PRINT
  7861. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_EPInfo_RxEndPoints] --> 0x%08x\n",
  7862. REG_USB_EPINFO,value);
  7863. #endif
  7864. return tmp_value.bitc.rxendpoints;
  7865. }
  7866. #endif /* GH_INLINE_LEVEL == 0 */
  7867. /*----------------------------------------------------------------------------*/
  7868. /* register USB_RAMInfo (read) */
  7869. /*----------------------------------------------------------------------------*/
  7870. #if GH_INLINE_LEVEL == 0
  7871. /*! \brief Reads the register 'USB_RAMInfo'. */
  7872. U8 GH_USB_get_RAMInfo(void);
  7873. /*! \brief Reads the bit group 'RamBits' of register 'USB_RAMInfo'. */
  7874. U8 GH_USB_get_RAMInfo_RamBits(void);
  7875. /*! \brief Reads the bit group 'DMAChans' of register 'USB_RAMInfo'. */
  7876. U8 GH_USB_get_RAMInfo_DMAChans(void);
  7877. #else /* GH_INLINE_LEVEL == 0 */
  7878. GH_INLINE U8 GH_USB_get_RAMInfo(void)
  7879. {
  7880. U8 value = (*(volatile U8 *)REG_USB_RAMINFO);
  7881. #if GH_USB_ENABLE_DEBUG_PRINT
  7882. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RAMInfo] --> 0x%08x\n",
  7883. REG_USB_RAMINFO,value);
  7884. #endif
  7885. return value;
  7886. }
  7887. GH_INLINE U8 GH_USB_get_RAMInfo_RamBits(void)
  7888. {
  7889. GH_USB_RAMINFO_S tmp_value;
  7890. U8 value = (*(volatile U8 *)REG_USB_RAMINFO);
  7891. tmp_value.all = value;
  7892. #if GH_USB_ENABLE_DEBUG_PRINT
  7893. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RAMInfo_RamBits] --> 0x%08x\n",
  7894. REG_USB_RAMINFO,value);
  7895. #endif
  7896. return tmp_value.bitc.rambits;
  7897. }
  7898. GH_INLINE U8 GH_USB_get_RAMInfo_DMAChans(void)
  7899. {
  7900. GH_USB_RAMINFO_S tmp_value;
  7901. U8 value = (*(volatile U8 *)REG_USB_RAMINFO);
  7902. tmp_value.all = value;
  7903. #if GH_USB_ENABLE_DEBUG_PRINT
  7904. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RAMInfo_DMAChans] --> 0x%08x\n",
  7905. REG_USB_RAMINFO,value);
  7906. #endif
  7907. return tmp_value.bitc.dmachans;
  7908. }
  7909. #endif /* GH_INLINE_LEVEL == 0 */
  7910. /*----------------------------------------------------------------------------*/
  7911. /* register USB_LinkInfo (read/write) */
  7912. /*----------------------------------------------------------------------------*/
  7913. #if GH_INLINE_LEVEL == 0
  7914. /*! \brief Writes the register 'USB_LinkInfo'. */
  7915. void GH_USB_set_LinkInfo(U8 data);
  7916. /*! \brief Reads the register 'USB_LinkInfo'. */
  7917. U8 GH_USB_get_LinkInfo(void);
  7918. /*! \brief Writes the bit group 'WTID' of register 'USB_LinkInfo'. */
  7919. void GH_USB_set_LinkInfo_WTID(U8 data);
  7920. /*! \brief Reads the bit group 'WTID' of register 'USB_LinkInfo'. */
  7921. U8 GH_USB_get_LinkInfo_WTID(void);
  7922. /*! \brief Writes the bit group 'WTCON' of register 'USB_LinkInfo'. */
  7923. void GH_USB_set_LinkInfo_WTCON(U8 data);
  7924. /*! \brief Reads the bit group 'WTCON' of register 'USB_LinkInfo'. */
  7925. U8 GH_USB_get_LinkInfo_WTCON(void);
  7926. #else /* GH_INLINE_LEVEL == 0 */
  7927. GH_INLINE void GH_USB_set_LinkInfo(U8 data)
  7928. {
  7929. *(volatile U8 *)REG_USB_LINKINFO = data;
  7930. #if GH_USB_ENABLE_DEBUG_PRINT
  7931. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LinkInfo] <-- 0x%08x\n",
  7932. REG_USB_LINKINFO,data,data);
  7933. #endif
  7934. }
  7935. GH_INLINE U8 GH_USB_get_LinkInfo(void)
  7936. {
  7937. U8 value = (*(volatile U8 *)REG_USB_LINKINFO);
  7938. #if GH_USB_ENABLE_DEBUG_PRINT
  7939. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LinkInfo] --> 0x%08x\n",
  7940. REG_USB_LINKINFO,value);
  7941. #endif
  7942. return value;
  7943. }
  7944. GH_INLINE void GH_USB_set_LinkInfo_WTID(U8 data)
  7945. {
  7946. GH_USB_LINKINFO_S d;
  7947. d.all = *(volatile U8 *)REG_USB_LINKINFO;
  7948. d.bitc.wtid = data;
  7949. *(volatile U8 *)REG_USB_LINKINFO = d.all;
  7950. #if GH_USB_ENABLE_DEBUG_PRINT
  7951. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LinkInfo_WTID] <-- 0x%08x\n",
  7952. REG_USB_LINKINFO,d.all,d.all);
  7953. #endif
  7954. }
  7955. GH_INLINE U8 GH_USB_get_LinkInfo_WTID(void)
  7956. {
  7957. GH_USB_LINKINFO_S tmp_value;
  7958. U8 value = (*(volatile U8 *)REG_USB_LINKINFO);
  7959. tmp_value.all = value;
  7960. #if GH_USB_ENABLE_DEBUG_PRINT
  7961. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LinkInfo_WTID] --> 0x%08x\n",
  7962. REG_USB_LINKINFO,value);
  7963. #endif
  7964. return tmp_value.bitc.wtid;
  7965. }
  7966. GH_INLINE void GH_USB_set_LinkInfo_WTCON(U8 data)
  7967. {
  7968. GH_USB_LINKINFO_S d;
  7969. d.all = *(volatile U8 *)REG_USB_LINKINFO;
  7970. d.bitc.wtcon = data;
  7971. *(volatile U8 *)REG_USB_LINKINFO = d.all;
  7972. #if GH_USB_ENABLE_DEBUG_PRINT
  7973. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LinkInfo_WTCON] <-- 0x%08x\n",
  7974. REG_USB_LINKINFO,d.all,d.all);
  7975. #endif
  7976. }
  7977. GH_INLINE U8 GH_USB_get_LinkInfo_WTCON(void)
  7978. {
  7979. GH_USB_LINKINFO_S tmp_value;
  7980. U8 value = (*(volatile U8 *)REG_USB_LINKINFO);
  7981. tmp_value.all = value;
  7982. #if GH_USB_ENABLE_DEBUG_PRINT
  7983. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LinkInfo_WTCON] --> 0x%08x\n",
  7984. REG_USB_LINKINFO,value);
  7985. #endif
  7986. return tmp_value.bitc.wtcon;
  7987. }
  7988. #endif /* GH_INLINE_LEVEL == 0 */
  7989. /*----------------------------------------------------------------------------*/
  7990. /* register USB_VPLen (read/write) */
  7991. /*----------------------------------------------------------------------------*/
  7992. #if GH_INLINE_LEVEL == 0
  7993. /*! \brief Writes the register 'USB_VPLen'. */
  7994. void GH_USB_set_VPLen(U8 data);
  7995. /*! \brief Reads the register 'USB_VPLen'. */
  7996. U8 GH_USB_get_VPLen(void);
  7997. #else /* GH_INLINE_LEVEL == 0 */
  7998. GH_INLINE void GH_USB_set_VPLen(U8 data)
  7999. {
  8000. *(volatile U8 *)REG_USB_VPLEN = data;
  8001. #if GH_USB_ENABLE_DEBUG_PRINT
  8002. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_VPLen] <-- 0x%08x\n",
  8003. REG_USB_VPLEN,data,data);
  8004. #endif
  8005. }
  8006. GH_INLINE U8 GH_USB_get_VPLen(void)
  8007. {
  8008. U8 value = (*(volatile U8 *)REG_USB_VPLEN);
  8009. #if GH_USB_ENABLE_DEBUG_PRINT
  8010. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_VPLen] --> 0x%08x\n",
  8011. REG_USB_VPLEN,value);
  8012. #endif
  8013. return value;
  8014. }
  8015. #endif /* GH_INLINE_LEVEL == 0 */
  8016. /*----------------------------------------------------------------------------*/
  8017. /* register USB_HS_EOF1 (read/write) */
  8018. /*----------------------------------------------------------------------------*/
  8019. #if GH_INLINE_LEVEL == 0
  8020. /*! \brief Writes the register 'USB_HS_EOF1'. */
  8021. void GH_USB_set_HS_EOF1(U8 data);
  8022. /*! \brief Reads the register 'USB_HS_EOF1'. */
  8023. U8 GH_USB_get_HS_EOF1(void);
  8024. #else /* GH_INLINE_LEVEL == 0 */
  8025. GH_INLINE void GH_USB_set_HS_EOF1(U8 data)
  8026. {
  8027. *(volatile U8 *)REG_USB_HS_EOF1 = data;
  8028. #if GH_USB_ENABLE_DEBUG_PRINT
  8029. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_HS_EOF1] <-- 0x%08x\n",
  8030. REG_USB_HS_EOF1,data,data);
  8031. #endif
  8032. }
  8033. GH_INLINE U8 GH_USB_get_HS_EOF1(void)
  8034. {
  8035. U8 value = (*(volatile U8 *)REG_USB_HS_EOF1);
  8036. #if GH_USB_ENABLE_DEBUG_PRINT
  8037. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HS_EOF1] --> 0x%08x\n",
  8038. REG_USB_HS_EOF1,value);
  8039. #endif
  8040. return value;
  8041. }
  8042. #endif /* GH_INLINE_LEVEL == 0 */
  8043. /*----------------------------------------------------------------------------*/
  8044. /* register USB_FS_EOF1 (read/write) */
  8045. /*----------------------------------------------------------------------------*/
  8046. #if GH_INLINE_LEVEL == 0
  8047. /*! \brief Writes the register 'USB_FS_EOF1'. */
  8048. void GH_USB_set_FS_EOF1(U8 data);
  8049. /*! \brief Reads the register 'USB_FS_EOF1'. */
  8050. U8 GH_USB_get_FS_EOF1(void);
  8051. #else /* GH_INLINE_LEVEL == 0 */
  8052. GH_INLINE void GH_USB_set_FS_EOF1(U8 data)
  8053. {
  8054. *(volatile U8 *)REG_USB_FS_EOF1 = data;
  8055. #if GH_USB_ENABLE_DEBUG_PRINT
  8056. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FS_EOF1] <-- 0x%08x\n",
  8057. REG_USB_FS_EOF1,data,data);
  8058. #endif
  8059. }
  8060. GH_INLINE U8 GH_USB_get_FS_EOF1(void)
  8061. {
  8062. U8 value = (*(volatile U8 *)REG_USB_FS_EOF1);
  8063. #if GH_USB_ENABLE_DEBUG_PRINT
  8064. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FS_EOF1] --> 0x%08x\n",
  8065. REG_USB_FS_EOF1,value);
  8066. #endif
  8067. return value;
  8068. }
  8069. #endif /* GH_INLINE_LEVEL == 0 */
  8070. /*----------------------------------------------------------------------------*/
  8071. /* register USB_LS_EOF1 (read/write) */
  8072. /*----------------------------------------------------------------------------*/
  8073. #if GH_INLINE_LEVEL == 0
  8074. /*! \brief Writes the register 'USB_LS_EOF1'. */
  8075. void GH_USB_set_LS_EOF1(U8 data);
  8076. /*! \brief Reads the register 'USB_LS_EOF1'. */
  8077. U8 GH_USB_get_LS_EOF1(void);
  8078. #else /* GH_INLINE_LEVEL == 0 */
  8079. GH_INLINE void GH_USB_set_LS_EOF1(U8 data)
  8080. {
  8081. *(volatile U8 *)REG_USB_LS_EOF1 = data;
  8082. #if GH_USB_ENABLE_DEBUG_PRINT
  8083. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LS_EOF1] <-- 0x%08x\n",
  8084. REG_USB_LS_EOF1,data,data);
  8085. #endif
  8086. }
  8087. GH_INLINE U8 GH_USB_get_LS_EOF1(void)
  8088. {
  8089. U8 value = (*(volatile U8 *)REG_USB_LS_EOF1);
  8090. #if GH_USB_ENABLE_DEBUG_PRINT
  8091. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LS_EOF1] --> 0x%08x\n",
  8092. REG_USB_LS_EOF1,value);
  8093. #endif
  8094. return value;
  8095. }
  8096. #endif /* GH_INLINE_LEVEL == 0 */
  8097. /*----------------------------------------------------------------------------*/
  8098. /* register USB_SOFT_RST (read/write) */
  8099. /*----------------------------------------------------------------------------*/
  8100. #if GH_INLINE_LEVEL == 0
  8101. /*! \brief Writes the register 'USB_SOFT_RST'. */
  8102. void GH_USB_set_SOFT_RST(U8 data);
  8103. /*! \brief Reads the register 'USB_SOFT_RST'. */
  8104. U8 GH_USB_get_SOFT_RST(void);
  8105. /*! \brief Writes the bit group 'NRST' of register 'USB_SOFT_RST'. */
  8106. void GH_USB_set_SOFT_RST_NRST(U8 data);
  8107. /*! \brief Reads the bit group 'NRST' of register 'USB_SOFT_RST'. */
  8108. U8 GH_USB_get_SOFT_RST_NRST(void);
  8109. /*! \brief Writes the bit group 'NRSTX' of register 'USB_SOFT_RST'. */
  8110. void GH_USB_set_SOFT_RST_NRSTX(U8 data);
  8111. /*! \brief Reads the bit group 'NRSTX' of register 'USB_SOFT_RST'. */
  8112. U8 GH_USB_get_SOFT_RST_NRSTX(void);
  8113. #else /* GH_INLINE_LEVEL == 0 */
  8114. GH_INLINE void GH_USB_set_SOFT_RST(U8 data)
  8115. {
  8116. *(volatile U8 *)REG_USB_SOFT_RST = data;
  8117. #if GH_USB_ENABLE_DEBUG_PRINT
  8118. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_SOFT_RST] <-- 0x%08x\n",
  8119. REG_USB_SOFT_RST,data,data);
  8120. #endif
  8121. }
  8122. GH_INLINE U8 GH_USB_get_SOFT_RST(void)
  8123. {
  8124. U8 value = (*(volatile U8 *)REG_USB_SOFT_RST);
  8125. #if GH_USB_ENABLE_DEBUG_PRINT
  8126. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_SOFT_RST] --> 0x%08x\n",
  8127. REG_USB_SOFT_RST,value);
  8128. #endif
  8129. return value;
  8130. }
  8131. GH_INLINE void GH_USB_set_SOFT_RST_NRST(U8 data)
  8132. {
  8133. GH_USB_SOFT_RST_S d;
  8134. d.all = *(volatile U8 *)REG_USB_SOFT_RST;
  8135. d.bitc.nrst = data;
  8136. *(volatile U8 *)REG_USB_SOFT_RST = d.all;
  8137. #if GH_USB_ENABLE_DEBUG_PRINT
  8138. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_SOFT_RST_NRST] <-- 0x%08x\n",
  8139. REG_USB_SOFT_RST,d.all,d.all);
  8140. #endif
  8141. }
  8142. GH_INLINE U8 GH_USB_get_SOFT_RST_NRST(void)
  8143. {
  8144. GH_USB_SOFT_RST_S tmp_value;
  8145. U8 value = (*(volatile U8 *)REG_USB_SOFT_RST);
  8146. tmp_value.all = value;
  8147. #if GH_USB_ENABLE_DEBUG_PRINT
  8148. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_SOFT_RST_NRST] --> 0x%08x\n",
  8149. REG_USB_SOFT_RST,value);
  8150. #endif
  8151. return tmp_value.bitc.nrst;
  8152. }
  8153. GH_INLINE void GH_USB_set_SOFT_RST_NRSTX(U8 data)
  8154. {
  8155. GH_USB_SOFT_RST_S d;
  8156. d.all = *(volatile U8 *)REG_USB_SOFT_RST;
  8157. d.bitc.nrstx = data;
  8158. *(volatile U8 *)REG_USB_SOFT_RST = d.all;
  8159. #if GH_USB_ENABLE_DEBUG_PRINT
  8160. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_SOFT_RST_NRSTX] <-- 0x%08x\n",
  8161. REG_USB_SOFT_RST,d.all,d.all);
  8162. #endif
  8163. }
  8164. GH_INLINE U8 GH_USB_get_SOFT_RST_NRSTX(void)
  8165. {
  8166. GH_USB_SOFT_RST_S tmp_value;
  8167. U8 value = (*(volatile U8 *)REG_USB_SOFT_RST);
  8168. tmp_value.all = value;
  8169. #if GH_USB_ENABLE_DEBUG_PRINT
  8170. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_SOFT_RST_NRSTX] --> 0x%08x\n",
  8171. REG_USB_SOFT_RST,value);
  8172. #endif
  8173. return tmp_value.bitc.nrstx;
  8174. }
  8175. #endif /* GH_INLINE_LEVEL == 0 */
  8176. /*----------------------------------------------------------------------------*/
  8177. /* register USB_TxFuncAddr (read/write) */
  8178. /*----------------------------------------------------------------------------*/
  8179. #if GH_INLINE_LEVEL == 0
  8180. /*! \brief Writes the register 'USB_TxFuncAddr'. */
  8181. void GH_USB_set_TxFuncAddr(U8 index, U8 data);
  8182. /*! \brief Reads the register 'USB_TxFuncAddr'. */
  8183. U8 GH_USB_get_TxFuncAddr(U8 index);
  8184. /*! \brief Writes the bit group 'AddressofTargetFunction' of register 'USB_TxFuncAddr'. */
  8185. void GH_USB_set_TxFuncAddr_AddressofTargetFunction(U8 index, U8 data);
  8186. /*! \brief Reads the bit group 'AddressofTargetFunction' of register 'USB_TxFuncAddr'. */
  8187. U8 GH_USB_get_TxFuncAddr_AddressofTargetFunction(U8 index);
  8188. #else /* GH_INLINE_LEVEL == 0 */
  8189. GH_INLINE void GH_USB_set_TxFuncAddr(U8 index, U8 data)
  8190. {
  8191. *(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  8192. #if GH_USB_ENABLE_DEBUG_PRINT
  8193. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFuncAddr] <-- 0x%08x\n",
  8194. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  8195. #endif
  8196. }
  8197. GH_INLINE U8 GH_USB_get_TxFuncAddr(U8 index)
  8198. {
  8199. U8 value = (*(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8200. #if GH_USB_ENABLE_DEBUG_PRINT
  8201. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFuncAddr] --> 0x%08x\n",
  8202. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8203. #endif
  8204. return value;
  8205. }
  8206. GH_INLINE void GH_USB_set_TxFuncAddr_AddressofTargetFunction(U8 index, U8 data)
  8207. {
  8208. GH_USB_TXFUNCADDR_S d;
  8209. d.all = *(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008));
  8210. d.bitc.addressoftargetfunction = data;
  8211. *(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8212. #if GH_USB_ENABLE_DEBUG_PRINT
  8213. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFuncAddr_AddressofTargetFunction] <-- 0x%08x\n",
  8214. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8215. #endif
  8216. }
  8217. GH_INLINE U8 GH_USB_get_TxFuncAddr_AddressofTargetFunction(U8 index)
  8218. {
  8219. GH_USB_TXFUNCADDR_S tmp_value;
  8220. U8 value = (*(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8221. tmp_value.all = value;
  8222. #if GH_USB_ENABLE_DEBUG_PRINT
  8223. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFuncAddr_AddressofTargetFunction] --> 0x%08x\n",
  8224. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8225. #endif
  8226. return tmp_value.bitc.addressoftargetfunction;
  8227. }
  8228. #endif /* GH_INLINE_LEVEL == 0 */
  8229. /*----------------------------------------------------------------------------*/
  8230. /* register USB_TxHubAddr (read/write) */
  8231. /*----------------------------------------------------------------------------*/
  8232. #if GH_INLINE_LEVEL == 0
  8233. /*! \brief Writes the register 'USB_TxHubAddr'. */
  8234. void GH_USB_set_TxHubAddr(U8 index, U8 data);
  8235. /*! \brief Reads the register 'USB_TxHubAddr'. */
  8236. U8 GH_USB_get_TxHubAddr(U8 index);
  8237. /*! \brief Writes the bit group 'HubAddress' of register 'USB_TxHubAddr'. */
  8238. void GH_USB_set_TxHubAddr_HubAddress(U8 index, U8 data);
  8239. /*! \brief Reads the bit group 'HubAddress' of register 'USB_TxHubAddr'. */
  8240. U8 GH_USB_get_TxHubAddr_HubAddress(U8 index);
  8241. /*! \brief Writes the bit group 'MultipleTranslators' of register 'USB_TxHubAddr'. */
  8242. void GH_USB_set_TxHubAddr_MultipleTranslators(U8 index, U8 data);
  8243. /*! \brief Reads the bit group 'MultipleTranslators' of register 'USB_TxHubAddr'. */
  8244. U8 GH_USB_get_TxHubAddr_MultipleTranslators(U8 index);
  8245. #else /* GH_INLINE_LEVEL == 0 */
  8246. GH_INLINE void GH_USB_set_TxHubAddr(U8 index, U8 data)
  8247. {
  8248. *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  8249. #if GH_USB_ENABLE_DEBUG_PRINT
  8250. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubAddr] <-- 0x%08x\n",
  8251. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  8252. #endif
  8253. }
  8254. GH_INLINE U8 GH_USB_get_TxHubAddr(U8 index)
  8255. {
  8256. U8 value = (*(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8257. #if GH_USB_ENABLE_DEBUG_PRINT
  8258. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubAddr] --> 0x%08x\n",
  8259. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8260. #endif
  8261. return value;
  8262. }
  8263. GH_INLINE void GH_USB_set_TxHubAddr_HubAddress(U8 index, U8 data)
  8264. {
  8265. GH_USB_TXHUBADDR_S d;
  8266. d.all = *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  8267. d.bitc.hubaddress = data;
  8268. *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8269. #if GH_USB_ENABLE_DEBUG_PRINT
  8270. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubAddr_HubAddress] <-- 0x%08x\n",
  8271. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8272. #endif
  8273. }
  8274. GH_INLINE U8 GH_USB_get_TxHubAddr_HubAddress(U8 index)
  8275. {
  8276. GH_USB_TXHUBADDR_S tmp_value;
  8277. U8 value = (*(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8278. tmp_value.all = value;
  8279. #if GH_USB_ENABLE_DEBUG_PRINT
  8280. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubAddr_HubAddress] --> 0x%08x\n",
  8281. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8282. #endif
  8283. return tmp_value.bitc.hubaddress;
  8284. }
  8285. GH_INLINE void GH_USB_set_TxHubAddr_MultipleTranslators(U8 index, U8 data)
  8286. {
  8287. GH_USB_TXHUBADDR_S d;
  8288. d.all = *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  8289. d.bitc.multipletranslators = data;
  8290. *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8291. #if GH_USB_ENABLE_DEBUG_PRINT
  8292. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubAddr_MultipleTranslators] <-- 0x%08x\n",
  8293. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8294. #endif
  8295. }
  8296. GH_INLINE U8 GH_USB_get_TxHubAddr_MultipleTranslators(U8 index)
  8297. {
  8298. GH_USB_TXHUBADDR_S tmp_value;
  8299. U8 value = (*(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8300. tmp_value.all = value;
  8301. #if GH_USB_ENABLE_DEBUG_PRINT
  8302. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubAddr_MultipleTranslators] --> 0x%08x\n",
  8303. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8304. #endif
  8305. return tmp_value.bitc.multipletranslators;
  8306. }
  8307. #endif /* GH_INLINE_LEVEL == 0 */
  8308. /*----------------------------------------------------------------------------*/
  8309. /* register USB_TxHubPort (read/write) */
  8310. /*----------------------------------------------------------------------------*/
  8311. #if GH_INLINE_LEVEL == 0
  8312. /*! \brief Writes the register 'USB_TxHubPort'. */
  8313. void GH_USB_set_TxHubPort(U8 index, U8 data);
  8314. /*! \brief Reads the register 'USB_TxHubPort'. */
  8315. U8 GH_USB_get_TxHubPort(U8 index);
  8316. /*! \brief Writes the bit group 'HubPort' of register 'USB_TxHubPort'. */
  8317. void GH_USB_set_TxHubPort_HubPort(U8 index, U8 data);
  8318. /*! \brief Reads the bit group 'HubPort' of register 'USB_TxHubPort'. */
  8319. U8 GH_USB_get_TxHubPort_HubPort(U8 index);
  8320. #else /* GH_INLINE_LEVEL == 0 */
  8321. GH_INLINE void GH_USB_set_TxHubPort(U8 index, U8 data)
  8322. {
  8323. *(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = data;
  8324. #if GH_USB_ENABLE_DEBUG_PRINT
  8325. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubPort] <-- 0x%08x\n",
  8326. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  8327. #endif
  8328. }
  8329. GH_INLINE U8 GH_USB_get_TxHubPort(U8 index)
  8330. {
  8331. U8 value = (*(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  8332. #if GH_USB_ENABLE_DEBUG_PRINT
  8333. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubPort] --> 0x%08x\n",
  8334. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  8335. #endif
  8336. return value;
  8337. }
  8338. GH_INLINE void GH_USB_set_TxHubPort_HubPort(U8 index, U8 data)
  8339. {
  8340. GH_USB_TXHUBPORT_S d;
  8341. d.all = *(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008));
  8342. d.bitc.hubport = data;
  8343. *(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8344. #if GH_USB_ENABLE_DEBUG_PRINT
  8345. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubPort_HubPort] <-- 0x%08x\n",
  8346. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8347. #endif
  8348. }
  8349. GH_INLINE U8 GH_USB_get_TxHubPort_HubPort(U8 index)
  8350. {
  8351. GH_USB_TXHUBPORT_S tmp_value;
  8352. U8 value = (*(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  8353. tmp_value.all = value;
  8354. #if GH_USB_ENABLE_DEBUG_PRINT
  8355. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubPort_HubPort] --> 0x%08x\n",
  8356. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  8357. #endif
  8358. return tmp_value.bitc.hubport;
  8359. }
  8360. #endif /* GH_INLINE_LEVEL == 0 */
  8361. /*----------------------------------------------------------------------------*/
  8362. /* register USB_RxFuncAddr (read/write) */
  8363. /*----------------------------------------------------------------------------*/
  8364. #if GH_INLINE_LEVEL == 0
  8365. /*! \brief Writes the register 'USB_RxFuncAddr'. */
  8366. void GH_USB_set_RxFuncAddr(U8 index, U8 data);
  8367. /*! \brief Reads the register 'USB_RxFuncAddr'. */
  8368. U8 GH_USB_get_RxFuncAddr(U8 index);
  8369. /*! \brief Writes the bit group 'AddressofTargetFunction' of register 'USB_RxFuncAddr'. */
  8370. void GH_USB_set_RxFuncAddr_AddressofTargetFunction(U8 index, U8 data);
  8371. /*! \brief Reads the bit group 'AddressofTargetFunction' of register 'USB_RxFuncAddr'. */
  8372. U8 GH_USB_get_RxFuncAddr_AddressofTargetFunction(U8 index);
  8373. #else /* GH_INLINE_LEVEL == 0 */
  8374. GH_INLINE void GH_USB_set_RxFuncAddr(U8 index, U8 data)
  8375. {
  8376. *(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  8377. #if GH_USB_ENABLE_DEBUG_PRINT
  8378. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFuncAddr] <-- 0x%08x\n",
  8379. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  8380. #endif
  8381. }
  8382. GH_INLINE U8 GH_USB_get_RxFuncAddr(U8 index)
  8383. {
  8384. U8 value = (*(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8385. #if GH_USB_ENABLE_DEBUG_PRINT
  8386. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFuncAddr] --> 0x%08x\n",
  8387. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8388. #endif
  8389. return value;
  8390. }
  8391. GH_INLINE void GH_USB_set_RxFuncAddr_AddressofTargetFunction(U8 index, U8 data)
  8392. {
  8393. GH_USB_RXFUNCADDR_S d;
  8394. d.all = *(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008));
  8395. d.bitc.addressoftargetfunction = data;
  8396. *(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8397. #if GH_USB_ENABLE_DEBUG_PRINT
  8398. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFuncAddr_AddressofTargetFunction] <-- 0x%08x\n",
  8399. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8400. #endif
  8401. }
  8402. GH_INLINE U8 GH_USB_get_RxFuncAddr_AddressofTargetFunction(U8 index)
  8403. {
  8404. GH_USB_RXFUNCADDR_S tmp_value;
  8405. U8 value = (*(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8406. tmp_value.all = value;
  8407. #if GH_USB_ENABLE_DEBUG_PRINT
  8408. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFuncAddr_AddressofTargetFunction] --> 0x%08x\n",
  8409. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8410. #endif
  8411. return tmp_value.bitc.addressoftargetfunction;
  8412. }
  8413. #endif /* GH_INLINE_LEVEL == 0 */
  8414. /*----------------------------------------------------------------------------*/
  8415. /* register USB_RxHubAddr (read/write) */
  8416. /*----------------------------------------------------------------------------*/
  8417. #if GH_INLINE_LEVEL == 0
  8418. /*! \brief Writes the register 'USB_RxHubAddr'. */
  8419. void GH_USB_set_RxHubAddr(U8 index, U8 data);
  8420. /*! \brief Reads the register 'USB_RxHubAddr'. */
  8421. U8 GH_USB_get_RxHubAddr(U8 index);
  8422. /*! \brief Writes the bit group 'HubAddress' of register 'USB_RxHubAddr'. */
  8423. void GH_USB_set_RxHubAddr_HubAddress(U8 index, U8 data);
  8424. /*! \brief Reads the bit group 'HubAddress' of register 'USB_RxHubAddr'. */
  8425. U8 GH_USB_get_RxHubAddr_HubAddress(U8 index);
  8426. /*! \brief Writes the bit group 'MultipleTranslators' of register 'USB_RxHubAddr'. */
  8427. void GH_USB_set_RxHubAddr_MultipleTranslators(U8 index, U8 data);
  8428. /*! \brief Reads the bit group 'MultipleTranslators' of register 'USB_RxHubAddr'. */
  8429. U8 GH_USB_get_RxHubAddr_MultipleTranslators(U8 index);
  8430. #else /* GH_INLINE_LEVEL == 0 */
  8431. GH_INLINE void GH_USB_set_RxHubAddr(U8 index, U8 data)
  8432. {
  8433. *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  8434. #if GH_USB_ENABLE_DEBUG_PRINT
  8435. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubAddr] <-- 0x%08x\n",
  8436. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  8437. #endif
  8438. }
  8439. GH_INLINE U8 GH_USB_get_RxHubAddr(U8 index)
  8440. {
  8441. U8 value = (*(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8442. #if GH_USB_ENABLE_DEBUG_PRINT
  8443. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubAddr] --> 0x%08x\n",
  8444. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8445. #endif
  8446. return value;
  8447. }
  8448. GH_INLINE void GH_USB_set_RxHubAddr_HubAddress(U8 index, U8 data)
  8449. {
  8450. GH_USB_RXHUBADDR_S d;
  8451. d.all = *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  8452. d.bitc.hubaddress = data;
  8453. *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8454. #if GH_USB_ENABLE_DEBUG_PRINT
  8455. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubAddr_HubAddress] <-- 0x%08x\n",
  8456. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8457. #endif
  8458. }
  8459. GH_INLINE U8 GH_USB_get_RxHubAddr_HubAddress(U8 index)
  8460. {
  8461. GH_USB_RXHUBADDR_S tmp_value;
  8462. U8 value = (*(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8463. tmp_value.all = value;
  8464. #if GH_USB_ENABLE_DEBUG_PRINT
  8465. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubAddr_HubAddress] --> 0x%08x\n",
  8466. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8467. #endif
  8468. return tmp_value.bitc.hubaddress;
  8469. }
  8470. GH_INLINE void GH_USB_set_RxHubAddr_MultipleTranslators(U8 index, U8 data)
  8471. {
  8472. GH_USB_RXHUBADDR_S d;
  8473. d.all = *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  8474. d.bitc.multipletranslators = data;
  8475. *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8476. #if GH_USB_ENABLE_DEBUG_PRINT
  8477. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubAddr_MultipleTranslators] <-- 0x%08x\n",
  8478. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8479. #endif
  8480. }
  8481. GH_INLINE U8 GH_USB_get_RxHubAddr_MultipleTranslators(U8 index)
  8482. {
  8483. GH_USB_RXHUBADDR_S tmp_value;
  8484. U8 value = (*(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  8485. tmp_value.all = value;
  8486. #if GH_USB_ENABLE_DEBUG_PRINT
  8487. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubAddr_MultipleTranslators] --> 0x%08x\n",
  8488. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  8489. #endif
  8490. return tmp_value.bitc.multipletranslators;
  8491. }
  8492. #endif /* GH_INLINE_LEVEL == 0 */
  8493. /*----------------------------------------------------------------------------*/
  8494. /* register USB_RxHubPort (read/write) */
  8495. /*----------------------------------------------------------------------------*/
  8496. #if GH_INLINE_LEVEL == 0
  8497. /*! \brief Writes the register 'USB_RxHubPort'. */
  8498. void GH_USB_set_RxHubPort(U8 index, U8 data);
  8499. /*! \brief Reads the register 'USB_RxHubPort'. */
  8500. U8 GH_USB_get_RxHubPort(U8 index);
  8501. /*! \brief Writes the bit group 'HubPort' of register 'USB_RxHubPort'. */
  8502. void GH_USB_set_RxHubPort_HubPort(U8 index, U8 data);
  8503. /*! \brief Reads the bit group 'HubPort' of register 'USB_RxHubPort'. */
  8504. U8 GH_USB_get_RxHubPort_HubPort(U8 index);
  8505. #else /* GH_INLINE_LEVEL == 0 */
  8506. GH_INLINE void GH_USB_set_RxHubPort(U8 index, U8 data)
  8507. {
  8508. *(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = data;
  8509. #if GH_USB_ENABLE_DEBUG_PRINT
  8510. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubPort] <-- 0x%08x\n",
  8511. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  8512. #endif
  8513. }
  8514. GH_INLINE U8 GH_USB_get_RxHubPort(U8 index)
  8515. {
  8516. U8 value = (*(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  8517. #if GH_USB_ENABLE_DEBUG_PRINT
  8518. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubPort] --> 0x%08x\n",
  8519. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  8520. #endif
  8521. return value;
  8522. }
  8523. GH_INLINE void GH_USB_set_RxHubPort_HubPort(U8 index, U8 data)
  8524. {
  8525. GH_USB_RXHUBPORT_S d;
  8526. d.all = *(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008));
  8527. d.bitc.hubport = data;
  8528. *(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  8529. #if GH_USB_ENABLE_DEBUG_PRINT
  8530. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubPort_HubPort] <-- 0x%08x\n",
  8531. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  8532. #endif
  8533. }
  8534. GH_INLINE U8 GH_USB_get_RxHubPort_HubPort(U8 index)
  8535. {
  8536. GH_USB_RXHUBPORT_S tmp_value;
  8537. U8 value = (*(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  8538. tmp_value.all = value;
  8539. #if GH_USB_ENABLE_DEBUG_PRINT
  8540. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubPort_HubPort] --> 0x%08x\n",
  8541. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  8542. #endif
  8543. return tmp_value.bitc.hubport;
  8544. }
  8545. #endif /* GH_INLINE_LEVEL == 0 */
  8546. /*----------------------------------------------------------------------------*/
  8547. /* register USB_DMA_INTR (read/write) */
  8548. /*----------------------------------------------------------------------------*/
  8549. #if GH_INLINE_LEVEL == 0
  8550. /*! \brief Writes the register 'USB_DMA_INTR'. */
  8551. void GH_USB_set_DMA_INTR(U8 data);
  8552. /*! \brief Reads the register 'USB_DMA_INTR'. */
  8553. U8 GH_USB_get_DMA_INTR(void);
  8554. /*! \brief Writes the bit group 'CH0' of register 'USB_DMA_INTR'. */
  8555. void GH_USB_set_DMA_INTR_CH0(U8 data);
  8556. /*! \brief Reads the bit group 'CH0' of register 'USB_DMA_INTR'. */
  8557. U8 GH_USB_get_DMA_INTR_CH0(void);
  8558. /*! \brief Writes the bit group 'CH1' of register 'USB_DMA_INTR'. */
  8559. void GH_USB_set_DMA_INTR_CH1(U8 data);
  8560. /*! \brief Reads the bit group 'CH1' of register 'USB_DMA_INTR'. */
  8561. U8 GH_USB_get_DMA_INTR_CH1(void);
  8562. /*! \brief Writes the bit group 'CH2' of register 'USB_DMA_INTR'. */
  8563. void GH_USB_set_DMA_INTR_CH2(U8 data);
  8564. /*! \brief Reads the bit group 'CH2' of register 'USB_DMA_INTR'. */
  8565. U8 GH_USB_get_DMA_INTR_CH2(void);
  8566. /*! \brief Writes the bit group 'CH3' of register 'USB_DMA_INTR'. */
  8567. void GH_USB_set_DMA_INTR_CH3(U8 data);
  8568. /*! \brief Reads the bit group 'CH3' of register 'USB_DMA_INTR'. */
  8569. U8 GH_USB_get_DMA_INTR_CH3(void);
  8570. /*! \brief Writes the bit group 'CH4' of register 'USB_DMA_INTR'. */
  8571. void GH_USB_set_DMA_INTR_CH4(U8 data);
  8572. /*! \brief Reads the bit group 'CH4' of register 'USB_DMA_INTR'. */
  8573. U8 GH_USB_get_DMA_INTR_CH4(void);
  8574. /*! \brief Writes the bit group 'CH5' of register 'USB_DMA_INTR'. */
  8575. void GH_USB_set_DMA_INTR_CH5(U8 data);
  8576. /*! \brief Reads the bit group 'CH5' of register 'USB_DMA_INTR'. */
  8577. U8 GH_USB_get_DMA_INTR_CH5(void);
  8578. /*! \brief Writes the bit group 'CH6' of register 'USB_DMA_INTR'. */
  8579. void GH_USB_set_DMA_INTR_CH6(U8 data);
  8580. /*! \brief Reads the bit group 'CH6' of register 'USB_DMA_INTR'. */
  8581. U8 GH_USB_get_DMA_INTR_CH6(void);
  8582. /*! \brief Writes the bit group 'CH7' of register 'USB_DMA_INTR'. */
  8583. void GH_USB_set_DMA_INTR_CH7(U8 data);
  8584. /*! \brief Reads the bit group 'CH7' of register 'USB_DMA_INTR'. */
  8585. U8 GH_USB_get_DMA_INTR_CH7(void);
  8586. #else /* GH_INLINE_LEVEL == 0 */
  8587. GH_INLINE void GH_USB_set_DMA_INTR(U8 data)
  8588. {
  8589. *(volatile U8 *)REG_USB_DMA_INTR = data;
  8590. #if GH_USB_ENABLE_DEBUG_PRINT
  8591. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR] <-- 0x%08x\n",
  8592. REG_USB_DMA_INTR,data,data);
  8593. #endif
  8594. }
  8595. GH_INLINE U8 GH_USB_get_DMA_INTR(void)
  8596. {
  8597. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8598. #if GH_USB_ENABLE_DEBUG_PRINT
  8599. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR] --> 0x%08x\n",
  8600. REG_USB_DMA_INTR,value);
  8601. #endif
  8602. return value;
  8603. }
  8604. GH_INLINE void GH_USB_set_DMA_INTR_CH0(U8 data)
  8605. {
  8606. GH_USB_DMA_INTR_S d;
  8607. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8608. d.bitc.ch0 = data;
  8609. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8610. #if GH_USB_ENABLE_DEBUG_PRINT
  8611. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH0] <-- 0x%08x\n",
  8612. REG_USB_DMA_INTR,d.all,d.all);
  8613. #endif
  8614. }
  8615. GH_INLINE U8 GH_USB_get_DMA_INTR_CH0(void)
  8616. {
  8617. GH_USB_DMA_INTR_S tmp_value;
  8618. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8619. tmp_value.all = value;
  8620. #if GH_USB_ENABLE_DEBUG_PRINT
  8621. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH0] --> 0x%08x\n",
  8622. REG_USB_DMA_INTR,value);
  8623. #endif
  8624. return tmp_value.bitc.ch0;
  8625. }
  8626. GH_INLINE void GH_USB_set_DMA_INTR_CH1(U8 data)
  8627. {
  8628. GH_USB_DMA_INTR_S d;
  8629. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8630. d.bitc.ch1 = data;
  8631. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8632. #if GH_USB_ENABLE_DEBUG_PRINT
  8633. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH1] <-- 0x%08x\n",
  8634. REG_USB_DMA_INTR,d.all,d.all);
  8635. #endif
  8636. }
  8637. GH_INLINE U8 GH_USB_get_DMA_INTR_CH1(void)
  8638. {
  8639. GH_USB_DMA_INTR_S tmp_value;
  8640. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8641. tmp_value.all = value;
  8642. #if GH_USB_ENABLE_DEBUG_PRINT
  8643. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH1] --> 0x%08x\n",
  8644. REG_USB_DMA_INTR,value);
  8645. #endif
  8646. return tmp_value.bitc.ch1;
  8647. }
  8648. GH_INLINE void GH_USB_set_DMA_INTR_CH2(U8 data)
  8649. {
  8650. GH_USB_DMA_INTR_S d;
  8651. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8652. d.bitc.ch2 = data;
  8653. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8654. #if GH_USB_ENABLE_DEBUG_PRINT
  8655. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH2] <-- 0x%08x\n",
  8656. REG_USB_DMA_INTR,d.all,d.all);
  8657. #endif
  8658. }
  8659. GH_INLINE U8 GH_USB_get_DMA_INTR_CH2(void)
  8660. {
  8661. GH_USB_DMA_INTR_S tmp_value;
  8662. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8663. tmp_value.all = value;
  8664. #if GH_USB_ENABLE_DEBUG_PRINT
  8665. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH2] --> 0x%08x\n",
  8666. REG_USB_DMA_INTR,value);
  8667. #endif
  8668. return tmp_value.bitc.ch2;
  8669. }
  8670. GH_INLINE void GH_USB_set_DMA_INTR_CH3(U8 data)
  8671. {
  8672. GH_USB_DMA_INTR_S d;
  8673. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8674. d.bitc.ch3 = data;
  8675. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8676. #if GH_USB_ENABLE_DEBUG_PRINT
  8677. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH3] <-- 0x%08x\n",
  8678. REG_USB_DMA_INTR,d.all,d.all);
  8679. #endif
  8680. }
  8681. GH_INLINE U8 GH_USB_get_DMA_INTR_CH3(void)
  8682. {
  8683. GH_USB_DMA_INTR_S tmp_value;
  8684. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8685. tmp_value.all = value;
  8686. #if GH_USB_ENABLE_DEBUG_PRINT
  8687. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH3] --> 0x%08x\n",
  8688. REG_USB_DMA_INTR,value);
  8689. #endif
  8690. return tmp_value.bitc.ch3;
  8691. }
  8692. GH_INLINE void GH_USB_set_DMA_INTR_CH4(U8 data)
  8693. {
  8694. GH_USB_DMA_INTR_S d;
  8695. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8696. d.bitc.ch4 = data;
  8697. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8698. #if GH_USB_ENABLE_DEBUG_PRINT
  8699. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH4] <-- 0x%08x\n",
  8700. REG_USB_DMA_INTR,d.all,d.all);
  8701. #endif
  8702. }
  8703. GH_INLINE U8 GH_USB_get_DMA_INTR_CH4(void)
  8704. {
  8705. GH_USB_DMA_INTR_S tmp_value;
  8706. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8707. tmp_value.all = value;
  8708. #if GH_USB_ENABLE_DEBUG_PRINT
  8709. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH4] --> 0x%08x\n",
  8710. REG_USB_DMA_INTR,value);
  8711. #endif
  8712. return tmp_value.bitc.ch4;
  8713. }
  8714. GH_INLINE void GH_USB_set_DMA_INTR_CH5(U8 data)
  8715. {
  8716. GH_USB_DMA_INTR_S d;
  8717. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8718. d.bitc.ch5 = data;
  8719. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8720. #if GH_USB_ENABLE_DEBUG_PRINT
  8721. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH5] <-- 0x%08x\n",
  8722. REG_USB_DMA_INTR,d.all,d.all);
  8723. #endif
  8724. }
  8725. GH_INLINE U8 GH_USB_get_DMA_INTR_CH5(void)
  8726. {
  8727. GH_USB_DMA_INTR_S tmp_value;
  8728. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8729. tmp_value.all = value;
  8730. #if GH_USB_ENABLE_DEBUG_PRINT
  8731. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH5] --> 0x%08x\n",
  8732. REG_USB_DMA_INTR,value);
  8733. #endif
  8734. return tmp_value.bitc.ch5;
  8735. }
  8736. GH_INLINE void GH_USB_set_DMA_INTR_CH6(U8 data)
  8737. {
  8738. GH_USB_DMA_INTR_S d;
  8739. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8740. d.bitc.ch6 = data;
  8741. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8742. #if GH_USB_ENABLE_DEBUG_PRINT
  8743. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH6] <-- 0x%08x\n",
  8744. REG_USB_DMA_INTR,d.all,d.all);
  8745. #endif
  8746. }
  8747. GH_INLINE U8 GH_USB_get_DMA_INTR_CH6(void)
  8748. {
  8749. GH_USB_DMA_INTR_S tmp_value;
  8750. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8751. tmp_value.all = value;
  8752. #if GH_USB_ENABLE_DEBUG_PRINT
  8753. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH6] --> 0x%08x\n",
  8754. REG_USB_DMA_INTR,value);
  8755. #endif
  8756. return tmp_value.bitc.ch6;
  8757. }
  8758. GH_INLINE void GH_USB_set_DMA_INTR_CH7(U8 data)
  8759. {
  8760. GH_USB_DMA_INTR_S d;
  8761. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  8762. d.bitc.ch7 = data;
  8763. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  8764. #if GH_USB_ENABLE_DEBUG_PRINT
  8765. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH7] <-- 0x%08x\n",
  8766. REG_USB_DMA_INTR,d.all,d.all);
  8767. #endif
  8768. }
  8769. GH_INLINE U8 GH_USB_get_DMA_INTR_CH7(void)
  8770. {
  8771. GH_USB_DMA_INTR_S tmp_value;
  8772. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  8773. tmp_value.all = value;
  8774. #if GH_USB_ENABLE_DEBUG_PRINT
  8775. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH7] --> 0x%08x\n",
  8776. REG_USB_DMA_INTR,value);
  8777. #endif
  8778. return tmp_value.bitc.ch7;
  8779. }
  8780. #endif /* GH_INLINE_LEVEL == 0 */
  8781. /*----------------------------------------------------------------------------*/
  8782. /* register USB_DMA_CNTL (read/write) */
  8783. /*----------------------------------------------------------------------------*/
  8784. #if GH_INLINE_LEVEL == 0
  8785. /*! \brief Writes the register 'USB_DMA_CNTL'. */
  8786. void GH_USB_set_DMA_CNTL(U8 index, U16 data);
  8787. /*! \brief Reads the register 'USB_DMA_CNTL'. */
  8788. U16 GH_USB_get_DMA_CNTL(U8 index);
  8789. /*! \brief Writes the bit group 'DMA_ENAB' of register 'USB_DMA_CNTL'. */
  8790. void GH_USB_set_DMA_CNTL_DMA_ENAB(U8 index, U8 data);
  8791. /*! \brief Reads the bit group 'DMA_ENAB' of register 'USB_DMA_CNTL'. */
  8792. U8 GH_USB_get_DMA_CNTL_DMA_ENAB(U8 index);
  8793. /*! \brief Writes the bit group 'DMA_DIR' of register 'USB_DMA_CNTL'. */
  8794. void GH_USB_set_DMA_CNTL_DMA_DIR(U8 index, U8 data);
  8795. /*! \brief Reads the bit group 'DMA_DIR' of register 'USB_DMA_CNTL'. */
  8796. U8 GH_USB_get_DMA_CNTL_DMA_DIR(U8 index);
  8797. /*! \brief Writes the bit group 'DMAMODE' of register 'USB_DMA_CNTL'. */
  8798. void GH_USB_set_DMA_CNTL_DMAMODE(U8 index, U8 data);
  8799. /*! \brief Reads the bit group 'DMAMODE' of register 'USB_DMA_CNTL'. */
  8800. U8 GH_USB_get_DMA_CNTL_DMAMODE(U8 index);
  8801. /*! \brief Writes the bit group 'DMAIE' of register 'USB_DMA_CNTL'. */
  8802. void GH_USB_set_DMA_CNTL_DMAIE(U8 index, U8 data);
  8803. /*! \brief Reads the bit group 'DMAIE' of register 'USB_DMA_CNTL'. */
  8804. U8 GH_USB_get_DMA_CNTL_DMAIE(U8 index);
  8805. /*! \brief Writes the bit group 'DMAEP' of register 'USB_DMA_CNTL'. */
  8806. void GH_USB_set_DMA_CNTL_DMAEP(U8 index, U8 data);
  8807. /*! \brief Reads the bit group 'DMAEP' of register 'USB_DMA_CNTL'. */
  8808. U8 GH_USB_get_DMA_CNTL_DMAEP(U8 index);
  8809. /*! \brief Writes the bit group 'DMA_ERR' of register 'USB_DMA_CNTL'. */
  8810. void GH_USB_set_DMA_CNTL_DMA_ERR(U8 index, U8 data);
  8811. /*! \brief Reads the bit group 'DMA_ERR' of register 'USB_DMA_CNTL'. */
  8812. U8 GH_USB_get_DMA_CNTL_DMA_ERR(U8 index);
  8813. /*! \brief Writes the bit group 'DMA_BRSTM' of register 'USB_DMA_CNTL'. */
  8814. void GH_USB_set_DMA_CNTL_DMA_BRSTM(U8 index, U8 data);
  8815. /*! \brief Reads the bit group 'DMA_BRSTM' of register 'USB_DMA_CNTL'. */
  8816. U8 GH_USB_get_DMA_CNTL_DMA_BRSTM(U8 index);
  8817. #else /* GH_INLINE_LEVEL == 0 */
  8818. GH_INLINE void GH_USB_set_DMA_CNTL(U8 index, U16 data)
  8819. {
  8820. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = data;
  8821. #if GH_USB_ENABLE_DEBUG_PRINT
  8822. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL] <-- 0x%08x\n",
  8823. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),data,data);
  8824. #endif
  8825. }
  8826. GH_INLINE U16 GH_USB_get_DMA_CNTL(U8 index)
  8827. {
  8828. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8829. #if GH_USB_ENABLE_DEBUG_PRINT
  8830. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL] --> 0x%08x\n",
  8831. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8832. #endif
  8833. return value;
  8834. }
  8835. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_ENAB(U8 index, U8 data)
  8836. {
  8837. GH_USB_DMA_CNTL_S d;
  8838. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  8839. d.bitc.dma_enab = data;
  8840. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  8841. #if GH_USB_ENABLE_DEBUG_PRINT
  8842. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_ENAB] <-- 0x%08x\n",
  8843. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  8844. #endif
  8845. }
  8846. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_ENAB(U8 index)
  8847. {
  8848. GH_USB_DMA_CNTL_S tmp_value;
  8849. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8850. tmp_value.all = value;
  8851. #if GH_USB_ENABLE_DEBUG_PRINT
  8852. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_ENAB] --> 0x%08x\n",
  8853. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8854. #endif
  8855. return tmp_value.bitc.dma_enab;
  8856. }
  8857. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_DIR(U8 index, U8 data)
  8858. {
  8859. GH_USB_DMA_CNTL_S d;
  8860. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  8861. d.bitc.dma_dir = data;
  8862. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  8863. #if GH_USB_ENABLE_DEBUG_PRINT
  8864. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_DIR] <-- 0x%08x\n",
  8865. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  8866. #endif
  8867. }
  8868. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_DIR(U8 index)
  8869. {
  8870. GH_USB_DMA_CNTL_S tmp_value;
  8871. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8872. tmp_value.all = value;
  8873. #if GH_USB_ENABLE_DEBUG_PRINT
  8874. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_DIR] --> 0x%08x\n",
  8875. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8876. #endif
  8877. return tmp_value.bitc.dma_dir;
  8878. }
  8879. GH_INLINE void GH_USB_set_DMA_CNTL_DMAMODE(U8 index, U8 data)
  8880. {
  8881. GH_USB_DMA_CNTL_S d;
  8882. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  8883. d.bitc.dmamode = data;
  8884. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  8885. #if GH_USB_ENABLE_DEBUG_PRINT
  8886. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMAMODE] <-- 0x%08x\n",
  8887. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  8888. #endif
  8889. }
  8890. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMAMODE(U8 index)
  8891. {
  8892. GH_USB_DMA_CNTL_S tmp_value;
  8893. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8894. tmp_value.all = value;
  8895. #if GH_USB_ENABLE_DEBUG_PRINT
  8896. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMAMODE] --> 0x%08x\n",
  8897. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8898. #endif
  8899. return tmp_value.bitc.dmamode;
  8900. }
  8901. GH_INLINE void GH_USB_set_DMA_CNTL_DMAIE(U8 index, U8 data)
  8902. {
  8903. GH_USB_DMA_CNTL_S d;
  8904. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  8905. d.bitc.dmaie = data;
  8906. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  8907. #if GH_USB_ENABLE_DEBUG_PRINT
  8908. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMAIE] <-- 0x%08x\n",
  8909. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  8910. #endif
  8911. }
  8912. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMAIE(U8 index)
  8913. {
  8914. GH_USB_DMA_CNTL_S tmp_value;
  8915. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8916. tmp_value.all = value;
  8917. #if GH_USB_ENABLE_DEBUG_PRINT
  8918. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMAIE] --> 0x%08x\n",
  8919. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8920. #endif
  8921. return tmp_value.bitc.dmaie;
  8922. }
  8923. GH_INLINE void GH_USB_set_DMA_CNTL_DMAEP(U8 index, U8 data)
  8924. {
  8925. GH_USB_DMA_CNTL_S d;
  8926. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  8927. d.bitc.dmaep = data;
  8928. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  8929. #if GH_USB_ENABLE_DEBUG_PRINT
  8930. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMAEP] <-- 0x%08x\n",
  8931. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  8932. #endif
  8933. }
  8934. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMAEP(U8 index)
  8935. {
  8936. GH_USB_DMA_CNTL_S tmp_value;
  8937. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8938. tmp_value.all = value;
  8939. #if GH_USB_ENABLE_DEBUG_PRINT
  8940. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMAEP] --> 0x%08x\n",
  8941. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8942. #endif
  8943. return tmp_value.bitc.dmaep;
  8944. }
  8945. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_ERR(U8 index, U8 data)
  8946. {
  8947. GH_USB_DMA_CNTL_S d;
  8948. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  8949. d.bitc.dma_err = data;
  8950. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  8951. #if GH_USB_ENABLE_DEBUG_PRINT
  8952. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_ERR] <-- 0x%08x\n",
  8953. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  8954. #endif
  8955. }
  8956. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_ERR(U8 index)
  8957. {
  8958. GH_USB_DMA_CNTL_S tmp_value;
  8959. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8960. tmp_value.all = value;
  8961. #if GH_USB_ENABLE_DEBUG_PRINT
  8962. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_ERR] --> 0x%08x\n",
  8963. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8964. #endif
  8965. return tmp_value.bitc.dma_err;
  8966. }
  8967. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_BRSTM(U8 index, U8 data)
  8968. {
  8969. GH_USB_DMA_CNTL_S d;
  8970. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  8971. d.bitc.dma_brstm = data;
  8972. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  8973. #if GH_USB_ENABLE_DEBUG_PRINT
  8974. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_BRSTM] <-- 0x%08x\n",
  8975. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  8976. #endif
  8977. }
  8978. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_BRSTM(U8 index)
  8979. {
  8980. GH_USB_DMA_CNTL_S tmp_value;
  8981. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  8982. tmp_value.all = value;
  8983. #if GH_USB_ENABLE_DEBUG_PRINT
  8984. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_BRSTM] --> 0x%08x\n",
  8985. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  8986. #endif
  8987. return tmp_value.bitc.dma_brstm;
  8988. }
  8989. #endif /* GH_INLINE_LEVEL == 0 */
  8990. /*----------------------------------------------------------------------------*/
  8991. /* register USB_DMA_ADDR (read/write) */
  8992. /*----------------------------------------------------------------------------*/
  8993. #if GH_INLINE_LEVEL == 0
  8994. /*! \brief Writes the register 'USB_DMA_ADDR'. */
  8995. void GH_USB_set_DMA_ADDR(U8 index, U32 data);
  8996. /*! \brief Reads the register 'USB_DMA_ADDR'. */
  8997. U32 GH_USB_get_DMA_ADDR(U8 index);
  8998. #else /* GH_INLINE_LEVEL == 0 */
  8999. GH_INLINE void GH_USB_set_DMA_ADDR(U8 index, U32 data)
  9000. {
  9001. *(volatile U32 *)(REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)) = data;
  9002. #if GH_USB_ENABLE_DEBUG_PRINT
  9003. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_ADDR] <-- 0x%08x\n",
  9004. (REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)),data,data);
  9005. #endif
  9006. }
  9007. GH_INLINE U32 GH_USB_get_DMA_ADDR(U8 index)
  9008. {
  9009. U32 value = (*(volatile U32 *)(REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)));
  9010. #if GH_USB_ENABLE_DEBUG_PRINT
  9011. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_ADDR] --> 0x%08x\n",
  9012. (REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)),value);
  9013. #endif
  9014. return value;
  9015. }
  9016. #endif /* GH_INLINE_LEVEL == 0 */
  9017. /*----------------------------------------------------------------------------*/
  9018. /* register USB_DMA_COUNT (read/write) */
  9019. /*----------------------------------------------------------------------------*/
  9020. #if GH_INLINE_LEVEL == 0
  9021. /*! \brief Writes the register 'USB_DMA_COUNT'. */
  9022. void GH_USB_set_DMA_COUNT(U8 index, U32 data);
  9023. /*! \brief Reads the register 'USB_DMA_COUNT'. */
  9024. U32 GH_USB_get_DMA_COUNT(U8 index);
  9025. #else /* GH_INLINE_LEVEL == 0 */
  9026. GH_INLINE void GH_USB_set_DMA_COUNT(U8 index, U32 data)
  9027. {
  9028. *(volatile U32 *)(REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)) = data;
  9029. #if GH_USB_ENABLE_DEBUG_PRINT
  9030. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_COUNT] <-- 0x%08x\n",
  9031. (REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)),data,data);
  9032. #endif
  9033. }
  9034. GH_INLINE U32 GH_USB_get_DMA_COUNT(U8 index)
  9035. {
  9036. U32 value = (*(volatile U32 *)(REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)));
  9037. #if GH_USB_ENABLE_DEBUG_PRINT
  9038. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_COUNT] --> 0x%08x\n",
  9039. (REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)),value);
  9040. #endif
  9041. return value;
  9042. }
  9043. #endif /* GH_INLINE_LEVEL == 0 */
  9044. /*----------------------------------------------------------------------------*/
  9045. /* register USB_RqPktCount_HOST (read/write) */
  9046. /*----------------------------------------------------------------------------*/
  9047. #if GH_INLINE_LEVEL == 0
  9048. /*! \brief Writes the register 'USB_RqPktCount_HOST'. */
  9049. void GH_USB_set_RqPktCount_HOST(U16 data);
  9050. /*! \brief Reads the register 'USB_RqPktCount_HOST'. */
  9051. U16 GH_USB_get_RqPktCount_HOST(void);
  9052. #else /* GH_INLINE_LEVEL == 0 */
  9053. GH_INLINE void GH_USB_set_RqPktCount_HOST(U16 data)
  9054. {
  9055. *(volatile U16 *)REG_USB_RQPKTCOUNT_HOST = data;
  9056. #if GH_USB_ENABLE_DEBUG_PRINT
  9057. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RqPktCount_HOST] <-- 0x%08x\n",
  9058. REG_USB_RQPKTCOUNT_HOST,data,data);
  9059. #endif
  9060. }
  9061. GH_INLINE U16 GH_USB_get_RqPktCount_HOST(void)
  9062. {
  9063. U16 value = (*(volatile U16 *)REG_USB_RQPKTCOUNT_HOST);
  9064. #if GH_USB_ENABLE_DEBUG_PRINT
  9065. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RqPktCount_HOST] --> 0x%08x\n",
  9066. REG_USB_RQPKTCOUNT_HOST,value);
  9067. #endif
  9068. return value;
  9069. }
  9070. #endif /* GH_INLINE_LEVEL == 0 */
  9071. /*----------------------------------------------------------------------------*/
  9072. /* register USB_RxDPktBufDis (read/write) */
  9073. /*----------------------------------------------------------------------------*/
  9074. #if GH_INLINE_LEVEL == 0
  9075. /*! \brief Writes the register 'USB_RxDPktBufDis'. */
  9076. void GH_USB_set_RxDPktBufDis(U16 data);
  9077. /*! \brief Reads the register 'USB_RxDPktBufDis'. */
  9078. U16 GH_USB_get_RxDPktBufDis(void);
  9079. /*! \brief Writes the bit group 'EP1' of register 'USB_RxDPktBufDis'. */
  9080. void GH_USB_set_RxDPktBufDis_EP1(U8 data);
  9081. /*! \brief Reads the bit group 'EP1' of register 'USB_RxDPktBufDis'. */
  9082. U8 GH_USB_get_RxDPktBufDis_EP1(void);
  9083. /*! \brief Writes the bit group 'EP2' of register 'USB_RxDPktBufDis'. */
  9084. void GH_USB_set_RxDPktBufDis_EP2(U8 data);
  9085. /*! \brief Reads the bit group 'EP2' of register 'USB_RxDPktBufDis'. */
  9086. U8 GH_USB_get_RxDPktBufDis_EP2(void);
  9087. /*! \brief Writes the bit group 'EP3' of register 'USB_RxDPktBufDis'. */
  9088. void GH_USB_set_RxDPktBufDis_EP3(U8 data);
  9089. /*! \brief Reads the bit group 'EP3' of register 'USB_RxDPktBufDis'. */
  9090. U8 GH_USB_get_RxDPktBufDis_EP3(void);
  9091. /*! \brief Writes the bit group 'EP4' of register 'USB_RxDPktBufDis'. */
  9092. void GH_USB_set_RxDPktBufDis_EP4(U8 data);
  9093. /*! \brief Reads the bit group 'EP4' of register 'USB_RxDPktBufDis'. */
  9094. U8 GH_USB_get_RxDPktBufDis_EP4(void);
  9095. /*! \brief Writes the bit group 'EP5' of register 'USB_RxDPktBufDis'. */
  9096. void GH_USB_set_RxDPktBufDis_EP5(U8 data);
  9097. /*! \brief Reads the bit group 'EP5' of register 'USB_RxDPktBufDis'. */
  9098. U8 GH_USB_get_RxDPktBufDis_EP5(void);
  9099. /*! \brief Writes the bit group 'EP6' of register 'USB_RxDPktBufDis'. */
  9100. void GH_USB_set_RxDPktBufDis_EP6(U8 data);
  9101. /*! \brief Reads the bit group 'EP6' of register 'USB_RxDPktBufDis'. */
  9102. U8 GH_USB_get_RxDPktBufDis_EP6(void);
  9103. /*! \brief Writes the bit group 'EP7' of register 'USB_RxDPktBufDis'. */
  9104. void GH_USB_set_RxDPktBufDis_EP7(U8 data);
  9105. /*! \brief Reads the bit group 'EP7' of register 'USB_RxDPktBufDis'. */
  9106. U8 GH_USB_get_RxDPktBufDis_EP7(void);
  9107. /*! \brief Writes the bit group 'EP8' of register 'USB_RxDPktBufDis'. */
  9108. void GH_USB_set_RxDPktBufDis_EP8(U8 data);
  9109. /*! \brief Reads the bit group 'EP8' of register 'USB_RxDPktBufDis'. */
  9110. U8 GH_USB_get_RxDPktBufDis_EP8(void);
  9111. /*! \brief Writes the bit group 'EP9' of register 'USB_RxDPktBufDis'. */
  9112. void GH_USB_set_RxDPktBufDis_EP9(U8 data);
  9113. /*! \brief Reads the bit group 'EP9' of register 'USB_RxDPktBufDis'. */
  9114. U8 GH_USB_get_RxDPktBufDis_EP9(void);
  9115. /*! \brief Writes the bit group 'EP10' of register 'USB_RxDPktBufDis'. */
  9116. void GH_USB_set_RxDPktBufDis_EP10(U8 data);
  9117. /*! \brief Reads the bit group 'EP10' of register 'USB_RxDPktBufDis'. */
  9118. U8 GH_USB_get_RxDPktBufDis_EP10(void);
  9119. /*! \brief Writes the bit group 'EP11' of register 'USB_RxDPktBufDis'. */
  9120. void GH_USB_set_RxDPktBufDis_EP11(U8 data);
  9121. /*! \brief Reads the bit group 'EP11' of register 'USB_RxDPktBufDis'. */
  9122. U8 GH_USB_get_RxDPktBufDis_EP11(void);
  9123. /*! \brief Writes the bit group 'EP12' of register 'USB_RxDPktBufDis'. */
  9124. void GH_USB_set_RxDPktBufDis_EP12(U8 data);
  9125. /*! \brief Reads the bit group 'EP12' of register 'USB_RxDPktBufDis'. */
  9126. U8 GH_USB_get_RxDPktBufDis_EP12(void);
  9127. /*! \brief Writes the bit group 'EP13' of register 'USB_RxDPktBufDis'. */
  9128. void GH_USB_set_RxDPktBufDis_EP13(U8 data);
  9129. /*! \brief Reads the bit group 'EP13' of register 'USB_RxDPktBufDis'. */
  9130. U8 GH_USB_get_RxDPktBufDis_EP13(void);
  9131. /*! \brief Writes the bit group 'EP14' of register 'USB_RxDPktBufDis'. */
  9132. void GH_USB_set_RxDPktBufDis_EP14(U8 data);
  9133. /*! \brief Reads the bit group 'EP14' of register 'USB_RxDPktBufDis'. */
  9134. U8 GH_USB_get_RxDPktBufDis_EP14(void);
  9135. /*! \brief Writes the bit group 'EP15' of register 'USB_RxDPktBufDis'. */
  9136. void GH_USB_set_RxDPktBufDis_EP15(U8 data);
  9137. /*! \brief Reads the bit group 'EP15' of register 'USB_RxDPktBufDis'. */
  9138. U8 GH_USB_get_RxDPktBufDis_EP15(void);
  9139. #else /* GH_INLINE_LEVEL == 0 */
  9140. GH_INLINE void GH_USB_set_RxDPktBufDis(U16 data)
  9141. {
  9142. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = data;
  9143. #if GH_USB_ENABLE_DEBUG_PRINT
  9144. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis] <-- 0x%08x\n",
  9145. REG_USB_RXDPKTBUFDIS,data,data);
  9146. #endif
  9147. }
  9148. GH_INLINE U16 GH_USB_get_RxDPktBufDis(void)
  9149. {
  9150. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9151. #if GH_USB_ENABLE_DEBUG_PRINT
  9152. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis] --> 0x%08x\n",
  9153. REG_USB_RXDPKTBUFDIS,value);
  9154. #endif
  9155. return value;
  9156. }
  9157. GH_INLINE void GH_USB_set_RxDPktBufDis_EP1(U8 data)
  9158. {
  9159. GH_USB_RXDPKTBUFDIS_S d;
  9160. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9161. d.bitc.ep1 = data;
  9162. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9163. #if GH_USB_ENABLE_DEBUG_PRINT
  9164. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP1] <-- 0x%08x\n",
  9165. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9166. #endif
  9167. }
  9168. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP1(void)
  9169. {
  9170. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9171. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9172. tmp_value.all = value;
  9173. #if GH_USB_ENABLE_DEBUG_PRINT
  9174. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP1] --> 0x%08x\n",
  9175. REG_USB_RXDPKTBUFDIS,value);
  9176. #endif
  9177. return tmp_value.bitc.ep1;
  9178. }
  9179. GH_INLINE void GH_USB_set_RxDPktBufDis_EP2(U8 data)
  9180. {
  9181. GH_USB_RXDPKTBUFDIS_S d;
  9182. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9183. d.bitc.ep2 = data;
  9184. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9185. #if GH_USB_ENABLE_DEBUG_PRINT
  9186. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP2] <-- 0x%08x\n",
  9187. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9188. #endif
  9189. }
  9190. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP2(void)
  9191. {
  9192. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9193. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9194. tmp_value.all = value;
  9195. #if GH_USB_ENABLE_DEBUG_PRINT
  9196. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP2] --> 0x%08x\n",
  9197. REG_USB_RXDPKTBUFDIS,value);
  9198. #endif
  9199. return tmp_value.bitc.ep2;
  9200. }
  9201. GH_INLINE void GH_USB_set_RxDPktBufDis_EP3(U8 data)
  9202. {
  9203. GH_USB_RXDPKTBUFDIS_S d;
  9204. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9205. d.bitc.ep3 = data;
  9206. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9207. #if GH_USB_ENABLE_DEBUG_PRINT
  9208. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP3] <-- 0x%08x\n",
  9209. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9210. #endif
  9211. }
  9212. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP3(void)
  9213. {
  9214. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9215. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9216. tmp_value.all = value;
  9217. #if GH_USB_ENABLE_DEBUG_PRINT
  9218. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP3] --> 0x%08x\n",
  9219. REG_USB_RXDPKTBUFDIS,value);
  9220. #endif
  9221. return tmp_value.bitc.ep3;
  9222. }
  9223. GH_INLINE void GH_USB_set_RxDPktBufDis_EP4(U8 data)
  9224. {
  9225. GH_USB_RXDPKTBUFDIS_S d;
  9226. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9227. d.bitc.ep4 = data;
  9228. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9229. #if GH_USB_ENABLE_DEBUG_PRINT
  9230. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP4] <-- 0x%08x\n",
  9231. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9232. #endif
  9233. }
  9234. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP4(void)
  9235. {
  9236. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9237. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9238. tmp_value.all = value;
  9239. #if GH_USB_ENABLE_DEBUG_PRINT
  9240. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP4] --> 0x%08x\n",
  9241. REG_USB_RXDPKTBUFDIS,value);
  9242. #endif
  9243. return tmp_value.bitc.ep4;
  9244. }
  9245. GH_INLINE void GH_USB_set_RxDPktBufDis_EP5(U8 data)
  9246. {
  9247. GH_USB_RXDPKTBUFDIS_S d;
  9248. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9249. d.bitc.ep5 = data;
  9250. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9251. #if GH_USB_ENABLE_DEBUG_PRINT
  9252. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP5] <-- 0x%08x\n",
  9253. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9254. #endif
  9255. }
  9256. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP5(void)
  9257. {
  9258. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9259. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9260. tmp_value.all = value;
  9261. #if GH_USB_ENABLE_DEBUG_PRINT
  9262. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP5] --> 0x%08x\n",
  9263. REG_USB_RXDPKTBUFDIS,value);
  9264. #endif
  9265. return tmp_value.bitc.ep5;
  9266. }
  9267. GH_INLINE void GH_USB_set_RxDPktBufDis_EP6(U8 data)
  9268. {
  9269. GH_USB_RXDPKTBUFDIS_S d;
  9270. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9271. d.bitc.ep6 = data;
  9272. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9273. #if GH_USB_ENABLE_DEBUG_PRINT
  9274. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP6] <-- 0x%08x\n",
  9275. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9276. #endif
  9277. }
  9278. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP6(void)
  9279. {
  9280. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9281. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9282. tmp_value.all = value;
  9283. #if GH_USB_ENABLE_DEBUG_PRINT
  9284. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP6] --> 0x%08x\n",
  9285. REG_USB_RXDPKTBUFDIS,value);
  9286. #endif
  9287. return tmp_value.bitc.ep6;
  9288. }
  9289. GH_INLINE void GH_USB_set_RxDPktBufDis_EP7(U8 data)
  9290. {
  9291. GH_USB_RXDPKTBUFDIS_S d;
  9292. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9293. d.bitc.ep7 = data;
  9294. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9295. #if GH_USB_ENABLE_DEBUG_PRINT
  9296. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP7] <-- 0x%08x\n",
  9297. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9298. #endif
  9299. }
  9300. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP7(void)
  9301. {
  9302. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9303. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9304. tmp_value.all = value;
  9305. #if GH_USB_ENABLE_DEBUG_PRINT
  9306. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP7] --> 0x%08x\n",
  9307. REG_USB_RXDPKTBUFDIS,value);
  9308. #endif
  9309. return tmp_value.bitc.ep7;
  9310. }
  9311. GH_INLINE void GH_USB_set_RxDPktBufDis_EP8(U8 data)
  9312. {
  9313. GH_USB_RXDPKTBUFDIS_S d;
  9314. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9315. d.bitc.ep8 = data;
  9316. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9317. #if GH_USB_ENABLE_DEBUG_PRINT
  9318. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP8] <-- 0x%08x\n",
  9319. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9320. #endif
  9321. }
  9322. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP8(void)
  9323. {
  9324. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9325. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9326. tmp_value.all = value;
  9327. #if GH_USB_ENABLE_DEBUG_PRINT
  9328. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP8] --> 0x%08x\n",
  9329. REG_USB_RXDPKTBUFDIS,value);
  9330. #endif
  9331. return tmp_value.bitc.ep8;
  9332. }
  9333. GH_INLINE void GH_USB_set_RxDPktBufDis_EP9(U8 data)
  9334. {
  9335. GH_USB_RXDPKTBUFDIS_S d;
  9336. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9337. d.bitc.ep9 = data;
  9338. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9339. #if GH_USB_ENABLE_DEBUG_PRINT
  9340. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP9] <-- 0x%08x\n",
  9341. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9342. #endif
  9343. }
  9344. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP9(void)
  9345. {
  9346. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9347. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9348. tmp_value.all = value;
  9349. #if GH_USB_ENABLE_DEBUG_PRINT
  9350. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP9] --> 0x%08x\n",
  9351. REG_USB_RXDPKTBUFDIS,value);
  9352. #endif
  9353. return tmp_value.bitc.ep9;
  9354. }
  9355. GH_INLINE void GH_USB_set_RxDPktBufDis_EP10(U8 data)
  9356. {
  9357. GH_USB_RXDPKTBUFDIS_S d;
  9358. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9359. d.bitc.ep10 = data;
  9360. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9361. #if GH_USB_ENABLE_DEBUG_PRINT
  9362. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP10] <-- 0x%08x\n",
  9363. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9364. #endif
  9365. }
  9366. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP10(void)
  9367. {
  9368. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9369. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9370. tmp_value.all = value;
  9371. #if GH_USB_ENABLE_DEBUG_PRINT
  9372. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP10] --> 0x%08x\n",
  9373. REG_USB_RXDPKTBUFDIS,value);
  9374. #endif
  9375. return tmp_value.bitc.ep10;
  9376. }
  9377. GH_INLINE void GH_USB_set_RxDPktBufDis_EP11(U8 data)
  9378. {
  9379. GH_USB_RXDPKTBUFDIS_S d;
  9380. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9381. d.bitc.ep11 = data;
  9382. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9383. #if GH_USB_ENABLE_DEBUG_PRINT
  9384. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP11] <-- 0x%08x\n",
  9385. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9386. #endif
  9387. }
  9388. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP11(void)
  9389. {
  9390. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9391. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9392. tmp_value.all = value;
  9393. #if GH_USB_ENABLE_DEBUG_PRINT
  9394. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP11] --> 0x%08x\n",
  9395. REG_USB_RXDPKTBUFDIS,value);
  9396. #endif
  9397. return tmp_value.bitc.ep11;
  9398. }
  9399. GH_INLINE void GH_USB_set_RxDPktBufDis_EP12(U8 data)
  9400. {
  9401. GH_USB_RXDPKTBUFDIS_S d;
  9402. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9403. d.bitc.ep12 = data;
  9404. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9405. #if GH_USB_ENABLE_DEBUG_PRINT
  9406. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP12] <-- 0x%08x\n",
  9407. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9408. #endif
  9409. }
  9410. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP12(void)
  9411. {
  9412. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9413. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9414. tmp_value.all = value;
  9415. #if GH_USB_ENABLE_DEBUG_PRINT
  9416. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP12] --> 0x%08x\n",
  9417. REG_USB_RXDPKTBUFDIS,value);
  9418. #endif
  9419. return tmp_value.bitc.ep12;
  9420. }
  9421. GH_INLINE void GH_USB_set_RxDPktBufDis_EP13(U8 data)
  9422. {
  9423. GH_USB_RXDPKTBUFDIS_S d;
  9424. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9425. d.bitc.ep13 = data;
  9426. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9427. #if GH_USB_ENABLE_DEBUG_PRINT
  9428. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP13] <-- 0x%08x\n",
  9429. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9430. #endif
  9431. }
  9432. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP13(void)
  9433. {
  9434. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9435. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9436. tmp_value.all = value;
  9437. #if GH_USB_ENABLE_DEBUG_PRINT
  9438. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP13] --> 0x%08x\n",
  9439. REG_USB_RXDPKTBUFDIS,value);
  9440. #endif
  9441. return tmp_value.bitc.ep13;
  9442. }
  9443. GH_INLINE void GH_USB_set_RxDPktBufDis_EP14(U8 data)
  9444. {
  9445. GH_USB_RXDPKTBUFDIS_S d;
  9446. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9447. d.bitc.ep14 = data;
  9448. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9449. #if GH_USB_ENABLE_DEBUG_PRINT
  9450. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP14] <-- 0x%08x\n",
  9451. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9452. #endif
  9453. }
  9454. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP14(void)
  9455. {
  9456. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9457. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9458. tmp_value.all = value;
  9459. #if GH_USB_ENABLE_DEBUG_PRINT
  9460. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP14] --> 0x%08x\n",
  9461. REG_USB_RXDPKTBUFDIS,value);
  9462. #endif
  9463. return tmp_value.bitc.ep14;
  9464. }
  9465. GH_INLINE void GH_USB_set_RxDPktBufDis_EP15(U8 data)
  9466. {
  9467. GH_USB_RXDPKTBUFDIS_S d;
  9468. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  9469. d.bitc.ep15 = data;
  9470. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  9471. #if GH_USB_ENABLE_DEBUG_PRINT
  9472. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP15] <-- 0x%08x\n",
  9473. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  9474. #endif
  9475. }
  9476. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP15(void)
  9477. {
  9478. GH_USB_RXDPKTBUFDIS_S tmp_value;
  9479. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  9480. tmp_value.all = value;
  9481. #if GH_USB_ENABLE_DEBUG_PRINT
  9482. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP15] --> 0x%08x\n",
  9483. REG_USB_RXDPKTBUFDIS,value);
  9484. #endif
  9485. return tmp_value.bitc.ep15;
  9486. }
  9487. #endif /* GH_INLINE_LEVEL == 0 */
  9488. /*----------------------------------------------------------------------------*/
  9489. /* register USB_TxDPktBufDis (read/write) */
  9490. /*----------------------------------------------------------------------------*/
  9491. #if GH_INLINE_LEVEL == 0
  9492. /*! \brief Writes the register 'USB_TxDPktBufDis'. */
  9493. void GH_USB_set_TxDPktBufDis(U16 data);
  9494. /*! \brief Reads the register 'USB_TxDPktBufDis'. */
  9495. U16 GH_USB_get_TxDPktBufDis(void);
  9496. /*! \brief Writes the bit group 'EP1' of register 'USB_TxDPktBufDis'. */
  9497. void GH_USB_set_TxDPktBufDis_EP1(U8 data);
  9498. /*! \brief Reads the bit group 'EP1' of register 'USB_TxDPktBufDis'. */
  9499. U8 GH_USB_get_TxDPktBufDis_EP1(void);
  9500. /*! \brief Writes the bit group 'EP2' of register 'USB_TxDPktBufDis'. */
  9501. void GH_USB_set_TxDPktBufDis_EP2(U8 data);
  9502. /*! \brief Reads the bit group 'EP2' of register 'USB_TxDPktBufDis'. */
  9503. U8 GH_USB_get_TxDPktBufDis_EP2(void);
  9504. /*! \brief Writes the bit group 'EP3' of register 'USB_TxDPktBufDis'. */
  9505. void GH_USB_set_TxDPktBufDis_EP3(U8 data);
  9506. /*! \brief Reads the bit group 'EP3' of register 'USB_TxDPktBufDis'. */
  9507. U8 GH_USB_get_TxDPktBufDis_EP3(void);
  9508. /*! \brief Writes the bit group 'EP4' of register 'USB_TxDPktBufDis'. */
  9509. void GH_USB_set_TxDPktBufDis_EP4(U8 data);
  9510. /*! \brief Reads the bit group 'EP4' of register 'USB_TxDPktBufDis'. */
  9511. U8 GH_USB_get_TxDPktBufDis_EP4(void);
  9512. /*! \brief Writes the bit group 'EP5' of register 'USB_TxDPktBufDis'. */
  9513. void GH_USB_set_TxDPktBufDis_EP5(U8 data);
  9514. /*! \brief Reads the bit group 'EP5' of register 'USB_TxDPktBufDis'. */
  9515. U8 GH_USB_get_TxDPktBufDis_EP5(void);
  9516. /*! \brief Writes the bit group 'EP6' of register 'USB_TxDPktBufDis'. */
  9517. void GH_USB_set_TxDPktBufDis_EP6(U8 data);
  9518. /*! \brief Reads the bit group 'EP6' of register 'USB_TxDPktBufDis'. */
  9519. U8 GH_USB_get_TxDPktBufDis_EP6(void);
  9520. /*! \brief Writes the bit group 'EP7' of register 'USB_TxDPktBufDis'. */
  9521. void GH_USB_set_TxDPktBufDis_EP7(U8 data);
  9522. /*! \brief Reads the bit group 'EP7' of register 'USB_TxDPktBufDis'. */
  9523. U8 GH_USB_get_TxDPktBufDis_EP7(void);
  9524. /*! \brief Writes the bit group 'EP8' of register 'USB_TxDPktBufDis'. */
  9525. void GH_USB_set_TxDPktBufDis_EP8(U8 data);
  9526. /*! \brief Reads the bit group 'EP8' of register 'USB_TxDPktBufDis'. */
  9527. U8 GH_USB_get_TxDPktBufDis_EP8(void);
  9528. /*! \brief Writes the bit group 'EP9' of register 'USB_TxDPktBufDis'. */
  9529. void GH_USB_set_TxDPktBufDis_EP9(U8 data);
  9530. /*! \brief Reads the bit group 'EP9' of register 'USB_TxDPktBufDis'. */
  9531. U8 GH_USB_get_TxDPktBufDis_EP9(void);
  9532. /*! \brief Writes the bit group 'EP10' of register 'USB_TxDPktBufDis'. */
  9533. void GH_USB_set_TxDPktBufDis_EP10(U8 data);
  9534. /*! \brief Reads the bit group 'EP10' of register 'USB_TxDPktBufDis'. */
  9535. U8 GH_USB_get_TxDPktBufDis_EP10(void);
  9536. /*! \brief Writes the bit group 'EP11' of register 'USB_TxDPktBufDis'. */
  9537. void GH_USB_set_TxDPktBufDis_EP11(U8 data);
  9538. /*! \brief Reads the bit group 'EP11' of register 'USB_TxDPktBufDis'. */
  9539. U8 GH_USB_get_TxDPktBufDis_EP11(void);
  9540. /*! \brief Writes the bit group 'EP12' of register 'USB_TxDPktBufDis'. */
  9541. void GH_USB_set_TxDPktBufDis_EP12(U8 data);
  9542. /*! \brief Reads the bit group 'EP12' of register 'USB_TxDPktBufDis'. */
  9543. U8 GH_USB_get_TxDPktBufDis_EP12(void);
  9544. /*! \brief Writes the bit group 'EP13' of register 'USB_TxDPktBufDis'. */
  9545. void GH_USB_set_TxDPktBufDis_EP13(U8 data);
  9546. /*! \brief Reads the bit group 'EP13' of register 'USB_TxDPktBufDis'. */
  9547. U8 GH_USB_get_TxDPktBufDis_EP13(void);
  9548. /*! \brief Writes the bit group 'EP14' of register 'USB_TxDPktBufDis'. */
  9549. void GH_USB_set_TxDPktBufDis_EP14(U8 data);
  9550. /*! \brief Reads the bit group 'EP14' of register 'USB_TxDPktBufDis'. */
  9551. U8 GH_USB_get_TxDPktBufDis_EP14(void);
  9552. /*! \brief Writes the bit group 'EP15' of register 'USB_TxDPktBufDis'. */
  9553. void GH_USB_set_TxDPktBufDis_EP15(U8 data);
  9554. /*! \brief Reads the bit group 'EP15' of register 'USB_TxDPktBufDis'. */
  9555. U8 GH_USB_get_TxDPktBufDis_EP15(void);
  9556. #else /* GH_INLINE_LEVEL == 0 */
  9557. GH_INLINE void GH_USB_set_TxDPktBufDis(U16 data)
  9558. {
  9559. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = data;
  9560. #if GH_USB_ENABLE_DEBUG_PRINT
  9561. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis] <-- 0x%08x\n",
  9562. REG_USB_TXDPKTBUFDIS,data,data);
  9563. #endif
  9564. }
  9565. GH_INLINE U16 GH_USB_get_TxDPktBufDis(void)
  9566. {
  9567. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9568. #if GH_USB_ENABLE_DEBUG_PRINT
  9569. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis] --> 0x%08x\n",
  9570. REG_USB_TXDPKTBUFDIS,value);
  9571. #endif
  9572. return value;
  9573. }
  9574. GH_INLINE void GH_USB_set_TxDPktBufDis_EP1(U8 data)
  9575. {
  9576. GH_USB_TXDPKTBUFDIS_S d;
  9577. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9578. d.bitc.ep1 = data;
  9579. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9580. #if GH_USB_ENABLE_DEBUG_PRINT
  9581. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP1] <-- 0x%08x\n",
  9582. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9583. #endif
  9584. }
  9585. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP1(void)
  9586. {
  9587. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9588. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9589. tmp_value.all = value;
  9590. #if GH_USB_ENABLE_DEBUG_PRINT
  9591. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP1] --> 0x%08x\n",
  9592. REG_USB_TXDPKTBUFDIS,value);
  9593. #endif
  9594. return tmp_value.bitc.ep1;
  9595. }
  9596. GH_INLINE void GH_USB_set_TxDPktBufDis_EP2(U8 data)
  9597. {
  9598. GH_USB_TXDPKTBUFDIS_S d;
  9599. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9600. d.bitc.ep2 = data;
  9601. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9602. #if GH_USB_ENABLE_DEBUG_PRINT
  9603. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP2] <-- 0x%08x\n",
  9604. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9605. #endif
  9606. }
  9607. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP2(void)
  9608. {
  9609. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9610. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9611. tmp_value.all = value;
  9612. #if GH_USB_ENABLE_DEBUG_PRINT
  9613. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP2] --> 0x%08x\n",
  9614. REG_USB_TXDPKTBUFDIS,value);
  9615. #endif
  9616. return tmp_value.bitc.ep2;
  9617. }
  9618. GH_INLINE void GH_USB_set_TxDPktBufDis_EP3(U8 data)
  9619. {
  9620. GH_USB_TXDPKTBUFDIS_S d;
  9621. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9622. d.bitc.ep3 = data;
  9623. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9624. #if GH_USB_ENABLE_DEBUG_PRINT
  9625. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP3] <-- 0x%08x\n",
  9626. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9627. #endif
  9628. }
  9629. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP3(void)
  9630. {
  9631. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9632. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9633. tmp_value.all = value;
  9634. #if GH_USB_ENABLE_DEBUG_PRINT
  9635. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP3] --> 0x%08x\n",
  9636. REG_USB_TXDPKTBUFDIS,value);
  9637. #endif
  9638. return tmp_value.bitc.ep3;
  9639. }
  9640. GH_INLINE void GH_USB_set_TxDPktBufDis_EP4(U8 data)
  9641. {
  9642. GH_USB_TXDPKTBUFDIS_S d;
  9643. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9644. d.bitc.ep4 = data;
  9645. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9646. #if GH_USB_ENABLE_DEBUG_PRINT
  9647. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP4] <-- 0x%08x\n",
  9648. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9649. #endif
  9650. }
  9651. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP4(void)
  9652. {
  9653. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9654. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9655. tmp_value.all = value;
  9656. #if GH_USB_ENABLE_DEBUG_PRINT
  9657. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP4] --> 0x%08x\n",
  9658. REG_USB_TXDPKTBUFDIS,value);
  9659. #endif
  9660. return tmp_value.bitc.ep4;
  9661. }
  9662. GH_INLINE void GH_USB_set_TxDPktBufDis_EP5(U8 data)
  9663. {
  9664. GH_USB_TXDPKTBUFDIS_S d;
  9665. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9666. d.bitc.ep5 = data;
  9667. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9668. #if GH_USB_ENABLE_DEBUG_PRINT
  9669. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP5] <-- 0x%08x\n",
  9670. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9671. #endif
  9672. }
  9673. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP5(void)
  9674. {
  9675. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9676. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9677. tmp_value.all = value;
  9678. #if GH_USB_ENABLE_DEBUG_PRINT
  9679. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP5] --> 0x%08x\n",
  9680. REG_USB_TXDPKTBUFDIS,value);
  9681. #endif
  9682. return tmp_value.bitc.ep5;
  9683. }
  9684. GH_INLINE void GH_USB_set_TxDPktBufDis_EP6(U8 data)
  9685. {
  9686. GH_USB_TXDPKTBUFDIS_S d;
  9687. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9688. d.bitc.ep6 = data;
  9689. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9690. #if GH_USB_ENABLE_DEBUG_PRINT
  9691. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP6] <-- 0x%08x\n",
  9692. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9693. #endif
  9694. }
  9695. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP6(void)
  9696. {
  9697. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9698. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9699. tmp_value.all = value;
  9700. #if GH_USB_ENABLE_DEBUG_PRINT
  9701. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP6] --> 0x%08x\n",
  9702. REG_USB_TXDPKTBUFDIS,value);
  9703. #endif
  9704. return tmp_value.bitc.ep6;
  9705. }
  9706. GH_INLINE void GH_USB_set_TxDPktBufDis_EP7(U8 data)
  9707. {
  9708. GH_USB_TXDPKTBUFDIS_S d;
  9709. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9710. d.bitc.ep7 = data;
  9711. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9712. #if GH_USB_ENABLE_DEBUG_PRINT
  9713. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP7] <-- 0x%08x\n",
  9714. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9715. #endif
  9716. }
  9717. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP7(void)
  9718. {
  9719. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9720. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9721. tmp_value.all = value;
  9722. #if GH_USB_ENABLE_DEBUG_PRINT
  9723. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP7] --> 0x%08x\n",
  9724. REG_USB_TXDPKTBUFDIS,value);
  9725. #endif
  9726. return tmp_value.bitc.ep7;
  9727. }
  9728. GH_INLINE void GH_USB_set_TxDPktBufDis_EP8(U8 data)
  9729. {
  9730. GH_USB_TXDPKTBUFDIS_S d;
  9731. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9732. d.bitc.ep8 = data;
  9733. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9734. #if GH_USB_ENABLE_DEBUG_PRINT
  9735. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP8] <-- 0x%08x\n",
  9736. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9737. #endif
  9738. }
  9739. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP8(void)
  9740. {
  9741. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9742. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9743. tmp_value.all = value;
  9744. #if GH_USB_ENABLE_DEBUG_PRINT
  9745. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP8] --> 0x%08x\n",
  9746. REG_USB_TXDPKTBUFDIS,value);
  9747. #endif
  9748. return tmp_value.bitc.ep8;
  9749. }
  9750. GH_INLINE void GH_USB_set_TxDPktBufDis_EP9(U8 data)
  9751. {
  9752. GH_USB_TXDPKTBUFDIS_S d;
  9753. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9754. d.bitc.ep9 = data;
  9755. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9756. #if GH_USB_ENABLE_DEBUG_PRINT
  9757. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP9] <-- 0x%08x\n",
  9758. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9759. #endif
  9760. }
  9761. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP9(void)
  9762. {
  9763. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9764. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9765. tmp_value.all = value;
  9766. #if GH_USB_ENABLE_DEBUG_PRINT
  9767. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP9] --> 0x%08x\n",
  9768. REG_USB_TXDPKTBUFDIS,value);
  9769. #endif
  9770. return tmp_value.bitc.ep9;
  9771. }
  9772. GH_INLINE void GH_USB_set_TxDPktBufDis_EP10(U8 data)
  9773. {
  9774. GH_USB_TXDPKTBUFDIS_S d;
  9775. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9776. d.bitc.ep10 = data;
  9777. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9778. #if GH_USB_ENABLE_DEBUG_PRINT
  9779. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP10] <-- 0x%08x\n",
  9780. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9781. #endif
  9782. }
  9783. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP10(void)
  9784. {
  9785. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9786. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9787. tmp_value.all = value;
  9788. #if GH_USB_ENABLE_DEBUG_PRINT
  9789. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP10] --> 0x%08x\n",
  9790. REG_USB_TXDPKTBUFDIS,value);
  9791. #endif
  9792. return tmp_value.bitc.ep10;
  9793. }
  9794. GH_INLINE void GH_USB_set_TxDPktBufDis_EP11(U8 data)
  9795. {
  9796. GH_USB_TXDPKTBUFDIS_S d;
  9797. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9798. d.bitc.ep11 = data;
  9799. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9800. #if GH_USB_ENABLE_DEBUG_PRINT
  9801. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP11] <-- 0x%08x\n",
  9802. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9803. #endif
  9804. }
  9805. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP11(void)
  9806. {
  9807. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9808. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9809. tmp_value.all = value;
  9810. #if GH_USB_ENABLE_DEBUG_PRINT
  9811. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP11] --> 0x%08x\n",
  9812. REG_USB_TXDPKTBUFDIS,value);
  9813. #endif
  9814. return tmp_value.bitc.ep11;
  9815. }
  9816. GH_INLINE void GH_USB_set_TxDPktBufDis_EP12(U8 data)
  9817. {
  9818. GH_USB_TXDPKTBUFDIS_S d;
  9819. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9820. d.bitc.ep12 = data;
  9821. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9822. #if GH_USB_ENABLE_DEBUG_PRINT
  9823. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP12] <-- 0x%08x\n",
  9824. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9825. #endif
  9826. }
  9827. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP12(void)
  9828. {
  9829. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9830. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9831. tmp_value.all = value;
  9832. #if GH_USB_ENABLE_DEBUG_PRINT
  9833. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP12] --> 0x%08x\n",
  9834. REG_USB_TXDPKTBUFDIS,value);
  9835. #endif
  9836. return tmp_value.bitc.ep12;
  9837. }
  9838. GH_INLINE void GH_USB_set_TxDPktBufDis_EP13(U8 data)
  9839. {
  9840. GH_USB_TXDPKTBUFDIS_S d;
  9841. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9842. d.bitc.ep13 = data;
  9843. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9844. #if GH_USB_ENABLE_DEBUG_PRINT
  9845. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP13] <-- 0x%08x\n",
  9846. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9847. #endif
  9848. }
  9849. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP13(void)
  9850. {
  9851. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9852. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9853. tmp_value.all = value;
  9854. #if GH_USB_ENABLE_DEBUG_PRINT
  9855. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP13] --> 0x%08x\n",
  9856. REG_USB_TXDPKTBUFDIS,value);
  9857. #endif
  9858. return tmp_value.bitc.ep13;
  9859. }
  9860. GH_INLINE void GH_USB_set_TxDPktBufDis_EP14(U8 data)
  9861. {
  9862. GH_USB_TXDPKTBUFDIS_S d;
  9863. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9864. d.bitc.ep14 = data;
  9865. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9866. #if GH_USB_ENABLE_DEBUG_PRINT
  9867. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP14] <-- 0x%08x\n",
  9868. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9869. #endif
  9870. }
  9871. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP14(void)
  9872. {
  9873. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9874. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9875. tmp_value.all = value;
  9876. #if GH_USB_ENABLE_DEBUG_PRINT
  9877. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP14] --> 0x%08x\n",
  9878. REG_USB_TXDPKTBUFDIS,value);
  9879. #endif
  9880. return tmp_value.bitc.ep14;
  9881. }
  9882. GH_INLINE void GH_USB_set_TxDPktBufDis_EP15(U8 data)
  9883. {
  9884. GH_USB_TXDPKTBUFDIS_S d;
  9885. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  9886. d.bitc.ep15 = data;
  9887. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  9888. #if GH_USB_ENABLE_DEBUG_PRINT
  9889. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP15] <-- 0x%08x\n",
  9890. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  9891. #endif
  9892. }
  9893. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP15(void)
  9894. {
  9895. GH_USB_TXDPKTBUFDIS_S tmp_value;
  9896. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  9897. tmp_value.all = value;
  9898. #if GH_USB_ENABLE_DEBUG_PRINT
  9899. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP15] --> 0x%08x\n",
  9900. REG_USB_TXDPKTBUFDIS,value);
  9901. #endif
  9902. return tmp_value.bitc.ep15;
  9903. }
  9904. #endif /* GH_INLINE_LEVEL == 0 */
  9905. /*----------------------------------------------------------------------------*/
  9906. /* register USB_C_T_UCH (read/write) */
  9907. /*----------------------------------------------------------------------------*/
  9908. #if GH_INLINE_LEVEL == 0
  9909. /*! \brief Writes the register 'USB_C_T_UCH'. */
  9910. void GH_USB_set_C_T_UCH(U16 data);
  9911. /*! \brief Reads the register 'USB_C_T_UCH'. */
  9912. U16 GH_USB_get_C_T_UCH(void);
  9913. #else /* GH_INLINE_LEVEL == 0 */
  9914. GH_INLINE void GH_USB_set_C_T_UCH(U16 data)
  9915. {
  9916. *(volatile U16 *)REG_USB_C_T_UCH = data;
  9917. #if GH_USB_ENABLE_DEBUG_PRINT
  9918. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_UCH] <-- 0x%08x\n",
  9919. REG_USB_C_T_UCH,data,data);
  9920. #endif
  9921. }
  9922. GH_INLINE U16 GH_USB_get_C_T_UCH(void)
  9923. {
  9924. U16 value = (*(volatile U16 *)REG_USB_C_T_UCH);
  9925. #if GH_USB_ENABLE_DEBUG_PRINT
  9926. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_UCH] --> 0x%08x\n",
  9927. REG_USB_C_T_UCH,value);
  9928. #endif
  9929. return value;
  9930. }
  9931. #endif /* GH_INLINE_LEVEL == 0 */
  9932. /*----------------------------------------------------------------------------*/
  9933. /* register USB_C_T_HSRTN (read/write) */
  9934. /*----------------------------------------------------------------------------*/
  9935. #if GH_INLINE_LEVEL == 0
  9936. /*! \brief Writes the register 'USB_C_T_HSRTN'. */
  9937. void GH_USB_set_C_T_HSRTN(U16 data);
  9938. /*! \brief Reads the register 'USB_C_T_HSRTN'. */
  9939. U16 GH_USB_get_C_T_HSRTN(void);
  9940. #else /* GH_INLINE_LEVEL == 0 */
  9941. GH_INLINE void GH_USB_set_C_T_HSRTN(U16 data)
  9942. {
  9943. *(volatile U16 *)REG_USB_C_T_HSRTN = data;
  9944. #if GH_USB_ENABLE_DEBUG_PRINT
  9945. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_HSRTN] <-- 0x%08x\n",
  9946. REG_USB_C_T_HSRTN,data,data);
  9947. #endif
  9948. }
  9949. GH_INLINE U16 GH_USB_get_C_T_HSRTN(void)
  9950. {
  9951. U16 value = (*(volatile U16 *)REG_USB_C_T_HSRTN);
  9952. #if GH_USB_ENABLE_DEBUG_PRINT
  9953. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_HSRTN] --> 0x%08x\n",
  9954. REG_USB_C_T_HSRTN,value);
  9955. #endif
  9956. return value;
  9957. }
  9958. #endif /* GH_INLINE_LEVEL == 0 */
  9959. /*----------------------------------------------------------------------------*/
  9960. /* register USB_C_T_HSBT (read/write) */
  9961. /*----------------------------------------------------------------------------*/
  9962. #if GH_INLINE_LEVEL == 0
  9963. /*! \brief Writes the register 'USB_C_T_HSBT'. */
  9964. void GH_USB_set_C_T_HSBT(U8 data);
  9965. /*! \brief Reads the register 'USB_C_T_HSBT'. */
  9966. U8 GH_USB_get_C_T_HSBT(void);
  9967. /*! \brief Writes the bit group 'HSTimeoutAdder' of register 'USB_C_T_HSBT'. */
  9968. void GH_USB_set_C_T_HSBT_HSTimeoutAdder(U8 data);
  9969. /*! \brief Reads the bit group 'HSTimeoutAdder' of register 'USB_C_T_HSBT'. */
  9970. U8 GH_USB_get_C_T_HSBT_HSTimeoutAdder(void);
  9971. #else /* GH_INLINE_LEVEL == 0 */
  9972. GH_INLINE void GH_USB_set_C_T_HSBT(U8 data)
  9973. {
  9974. *(volatile U8 *)REG_USB_C_T_HSBT = data;
  9975. #if GH_USB_ENABLE_DEBUG_PRINT
  9976. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_HSBT] <-- 0x%08x\n",
  9977. REG_USB_C_T_HSBT,data,data);
  9978. #endif
  9979. }
  9980. GH_INLINE U8 GH_USB_get_C_T_HSBT(void)
  9981. {
  9982. U8 value = (*(volatile U8 *)REG_USB_C_T_HSBT);
  9983. #if GH_USB_ENABLE_DEBUG_PRINT
  9984. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_HSBT] --> 0x%08x\n",
  9985. REG_USB_C_T_HSBT,value);
  9986. #endif
  9987. return value;
  9988. }
  9989. GH_INLINE void GH_USB_set_C_T_HSBT_HSTimeoutAdder(U8 data)
  9990. {
  9991. GH_USB_C_T_HSBT_S d;
  9992. d.all = *(volatile U8 *)REG_USB_C_T_HSBT;
  9993. d.bitc.hstimeoutadder = data;
  9994. *(volatile U8 *)REG_USB_C_T_HSBT = d.all;
  9995. #if GH_USB_ENABLE_DEBUG_PRINT
  9996. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_HSBT_HSTimeoutAdder] <-- 0x%08x\n",
  9997. REG_USB_C_T_HSBT,d.all,d.all);
  9998. #endif
  9999. }
  10000. GH_INLINE U8 GH_USB_get_C_T_HSBT_HSTimeoutAdder(void)
  10001. {
  10002. GH_USB_C_T_HSBT_S tmp_value;
  10003. U8 value = (*(volatile U8 *)REG_USB_C_T_HSBT);
  10004. tmp_value.all = value;
  10005. #if GH_USB_ENABLE_DEBUG_PRINT
  10006. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_HSBT_HSTimeoutAdder] --> 0x%08x\n",
  10007. REG_USB_C_T_HSBT,value);
  10008. #endif
  10009. return tmp_value.bitc.hstimeoutadder;
  10010. }
  10011. #endif /* GH_INLINE_LEVEL == 0 */
  10012. /*----------------------------------------------------------------------------*/
  10013. /* register USB_LPM_ATTR (read) */
  10014. /*----------------------------------------------------------------------------*/
  10015. #if GH_INLINE_LEVEL == 0
  10016. /*! \brief Reads the register 'USB_LPM_ATTR'. */
  10017. U16 GH_USB_get_LPM_ATTR(void);
  10018. /*! \brief Reads the bit group 'LinkState' of register 'USB_LPM_ATTR'. */
  10019. U8 GH_USB_get_LPM_ATTR_LinkState(void);
  10020. /*! \brief Reads the bit group 'HIRD' of register 'USB_LPM_ATTR'. */
  10021. U8 GH_USB_get_LPM_ATTR_HIRD(void);
  10022. /*! \brief Reads the bit group 'RmtWak' of register 'USB_LPM_ATTR'. */
  10023. U8 GH_USB_get_LPM_ATTR_RmtWak(void);
  10024. /*! \brief Reads the bit group 'EndPnt' of register 'USB_LPM_ATTR'. */
  10025. U8 GH_USB_get_LPM_ATTR_EndPnt(void);
  10026. #else /* GH_INLINE_LEVEL == 0 */
  10027. GH_INLINE U16 GH_USB_get_LPM_ATTR(void)
  10028. {
  10029. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  10030. #if GH_USB_ENABLE_DEBUG_PRINT
  10031. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR] --> 0x%08x\n",
  10032. REG_USB_LPM_ATTR,value);
  10033. #endif
  10034. return value;
  10035. }
  10036. GH_INLINE U8 GH_USB_get_LPM_ATTR_LinkState(void)
  10037. {
  10038. GH_USB_LPM_ATTR_S tmp_value;
  10039. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  10040. tmp_value.all = value;
  10041. #if GH_USB_ENABLE_DEBUG_PRINT
  10042. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_LinkState] --> 0x%08x\n",
  10043. REG_USB_LPM_ATTR,value);
  10044. #endif
  10045. return tmp_value.bitc.linkstate;
  10046. }
  10047. GH_INLINE U8 GH_USB_get_LPM_ATTR_HIRD(void)
  10048. {
  10049. GH_USB_LPM_ATTR_S tmp_value;
  10050. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  10051. tmp_value.all = value;
  10052. #if GH_USB_ENABLE_DEBUG_PRINT
  10053. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_HIRD] --> 0x%08x\n",
  10054. REG_USB_LPM_ATTR,value);
  10055. #endif
  10056. return tmp_value.bitc.hird;
  10057. }
  10058. GH_INLINE U8 GH_USB_get_LPM_ATTR_RmtWak(void)
  10059. {
  10060. GH_USB_LPM_ATTR_S tmp_value;
  10061. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  10062. tmp_value.all = value;
  10063. #if GH_USB_ENABLE_DEBUG_PRINT
  10064. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_RmtWak] --> 0x%08x\n",
  10065. REG_USB_LPM_ATTR,value);
  10066. #endif
  10067. return tmp_value.bitc.rmtwak;
  10068. }
  10069. GH_INLINE U8 GH_USB_get_LPM_ATTR_EndPnt(void)
  10070. {
  10071. GH_USB_LPM_ATTR_S tmp_value;
  10072. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  10073. tmp_value.all = value;
  10074. #if GH_USB_ENABLE_DEBUG_PRINT
  10075. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_EndPnt] --> 0x%08x\n",
  10076. REG_USB_LPM_ATTR,value);
  10077. #endif
  10078. return tmp_value.bitc.endpnt;
  10079. }
  10080. #endif /* GH_INLINE_LEVEL == 0 */
  10081. /*----------------------------------------------------------------------------*/
  10082. /* register USB_LPM_CNTRL_PERI (read/write) */
  10083. /*----------------------------------------------------------------------------*/
  10084. #if GH_INLINE_LEVEL == 0
  10085. /*! \brief Writes the register 'USB_LPM_CNTRL_PERI'. */
  10086. void GH_USB_set_LPM_CNTRL_PERI(U8 data);
  10087. /*! \brief Reads the register 'USB_LPM_CNTRL_PERI'. */
  10088. U8 GH_USB_get_LPM_CNTRL_PERI(void);
  10089. /*! \brief Writes the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_PERI'. */
  10090. void GH_USB_set_LPM_CNTRL_PERI_LPMXMT(U8 data);
  10091. /*! \brief Reads the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_PERI'. */
  10092. U8 GH_USB_get_LPM_CNTRL_PERI_LPMXMT(void);
  10093. /*! \brief Writes the bit group 'LPMRES' of register 'USB_LPM_CNTRL_PERI'. */
  10094. void GH_USB_set_LPM_CNTRL_PERI_LPMRES(U8 data);
  10095. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_CNTRL_PERI'. */
  10096. U8 GH_USB_get_LPM_CNTRL_PERI_LPMRES(void);
  10097. /*! \brief Writes the bit group 'LPMEN' of register 'USB_LPM_CNTRL_PERI'. */
  10098. void GH_USB_set_LPM_CNTRL_PERI_LPMEN(U8 data);
  10099. /*! \brief Reads the bit group 'LPMEN' of register 'USB_LPM_CNTRL_PERI'. */
  10100. U8 GH_USB_get_LPM_CNTRL_PERI_LPMEN(void);
  10101. /*! \brief Writes the bit group 'LPMNAK' of register 'USB_LPM_CNTRL_PERI'. */
  10102. void GH_USB_set_LPM_CNTRL_PERI_LPMNAK(U8 data);
  10103. /*! \brief Reads the bit group 'LPMNAK' of register 'USB_LPM_CNTRL_PERI'. */
  10104. U8 GH_USB_get_LPM_CNTRL_PERI_LPMNAK(void);
  10105. #else /* GH_INLINE_LEVEL == 0 */
  10106. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI(U8 data)
  10107. {
  10108. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = data;
  10109. #if GH_USB_ENABLE_DEBUG_PRINT
  10110. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI] <-- 0x%08x\n",
  10111. REG_USB_LPM_CNTRL_PERI,data,data);
  10112. #endif
  10113. }
  10114. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI(void)
  10115. {
  10116. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  10117. #if GH_USB_ENABLE_DEBUG_PRINT
  10118. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI] --> 0x%08x\n",
  10119. REG_USB_LPM_CNTRL_PERI,value);
  10120. #endif
  10121. return value;
  10122. }
  10123. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMXMT(U8 data)
  10124. {
  10125. GH_USB_LPM_CNTRL_PERI_S d;
  10126. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  10127. d.bitc.lpmxmt = data;
  10128. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  10129. #if GH_USB_ENABLE_DEBUG_PRINT
  10130. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMXMT] <-- 0x%08x\n",
  10131. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  10132. #endif
  10133. }
  10134. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMXMT(void)
  10135. {
  10136. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  10137. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  10138. tmp_value.all = value;
  10139. #if GH_USB_ENABLE_DEBUG_PRINT
  10140. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMXMT] --> 0x%08x\n",
  10141. REG_USB_LPM_CNTRL_PERI,value);
  10142. #endif
  10143. return tmp_value.bitc.lpmxmt;
  10144. }
  10145. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMRES(U8 data)
  10146. {
  10147. GH_USB_LPM_CNTRL_PERI_S d;
  10148. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  10149. d.bitc.lpmres = data;
  10150. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  10151. #if GH_USB_ENABLE_DEBUG_PRINT
  10152. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMRES] <-- 0x%08x\n",
  10153. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  10154. #endif
  10155. }
  10156. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMRES(void)
  10157. {
  10158. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  10159. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  10160. tmp_value.all = value;
  10161. #if GH_USB_ENABLE_DEBUG_PRINT
  10162. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMRES] --> 0x%08x\n",
  10163. REG_USB_LPM_CNTRL_PERI,value);
  10164. #endif
  10165. return tmp_value.bitc.lpmres;
  10166. }
  10167. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMEN(U8 data)
  10168. {
  10169. GH_USB_LPM_CNTRL_PERI_S d;
  10170. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  10171. d.bitc.lpmen = data;
  10172. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  10173. #if GH_USB_ENABLE_DEBUG_PRINT
  10174. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMEN] <-- 0x%08x\n",
  10175. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  10176. #endif
  10177. }
  10178. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMEN(void)
  10179. {
  10180. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  10181. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  10182. tmp_value.all = value;
  10183. #if GH_USB_ENABLE_DEBUG_PRINT
  10184. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMEN] --> 0x%08x\n",
  10185. REG_USB_LPM_CNTRL_PERI,value);
  10186. #endif
  10187. return tmp_value.bitc.lpmen;
  10188. }
  10189. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMNAK(U8 data)
  10190. {
  10191. GH_USB_LPM_CNTRL_PERI_S d;
  10192. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  10193. d.bitc.lpmnak = data;
  10194. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  10195. #if GH_USB_ENABLE_DEBUG_PRINT
  10196. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMNAK] <-- 0x%08x\n",
  10197. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  10198. #endif
  10199. }
  10200. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMNAK(void)
  10201. {
  10202. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  10203. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  10204. tmp_value.all = value;
  10205. #if GH_USB_ENABLE_DEBUG_PRINT
  10206. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMNAK] --> 0x%08x\n",
  10207. REG_USB_LPM_CNTRL_PERI,value);
  10208. #endif
  10209. return tmp_value.bitc.lpmnak;
  10210. }
  10211. #endif /* GH_INLINE_LEVEL == 0 */
  10212. /*----------------------------------------------------------------------------*/
  10213. /* register USB_LPM_CNTRL_HOST (read/write) */
  10214. /*----------------------------------------------------------------------------*/
  10215. #if GH_INLINE_LEVEL == 0
  10216. /*! \brief Writes the register 'USB_LPM_CNTRL_HOST'. */
  10217. void GH_USB_set_LPM_CNTRL_HOST(U8 data);
  10218. /*! \brief Reads the register 'USB_LPM_CNTRL_HOST'. */
  10219. U8 GH_USB_get_LPM_CNTRL_HOST(void);
  10220. /*! \brief Writes the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_HOST'. */
  10221. void GH_USB_set_LPM_CNTRL_HOST_LPMXMT(U8 data);
  10222. /*! \brief Reads the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_HOST'. */
  10223. U8 GH_USB_get_LPM_CNTRL_HOST_LPMXMT(void);
  10224. /*! \brief Writes the bit group 'LPMRES' of register 'USB_LPM_CNTRL_HOST'. */
  10225. void GH_USB_set_LPM_CNTRL_HOST_LPMRES(U8 data);
  10226. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_CNTRL_HOST'. */
  10227. U8 GH_USB_get_LPM_CNTRL_HOST_LPMRES(void);
  10228. #else /* GH_INLINE_LEVEL == 0 */
  10229. GH_INLINE void GH_USB_set_LPM_CNTRL_HOST(U8 data)
  10230. {
  10231. *(volatile U8 *)REG_USB_LPM_CNTRL_HOST = data;
  10232. #if GH_USB_ENABLE_DEBUG_PRINT
  10233. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_HOST] <-- 0x%08x\n",
  10234. REG_USB_LPM_CNTRL_HOST,data,data);
  10235. #endif
  10236. }
  10237. GH_INLINE U8 GH_USB_get_LPM_CNTRL_HOST(void)
  10238. {
  10239. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_HOST);
  10240. #if GH_USB_ENABLE_DEBUG_PRINT
  10241. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_HOST] --> 0x%08x\n",
  10242. REG_USB_LPM_CNTRL_HOST,value);
  10243. #endif
  10244. return value;
  10245. }
  10246. GH_INLINE void GH_USB_set_LPM_CNTRL_HOST_LPMXMT(U8 data)
  10247. {
  10248. GH_USB_LPM_CNTRL_HOST_S d;
  10249. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_HOST;
  10250. d.bitc.lpmxmt = data;
  10251. *(volatile U8 *)REG_USB_LPM_CNTRL_HOST = d.all;
  10252. #if GH_USB_ENABLE_DEBUG_PRINT
  10253. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_HOST_LPMXMT] <-- 0x%08x\n",
  10254. REG_USB_LPM_CNTRL_HOST,d.all,d.all);
  10255. #endif
  10256. }
  10257. GH_INLINE U8 GH_USB_get_LPM_CNTRL_HOST_LPMXMT(void)
  10258. {
  10259. GH_USB_LPM_CNTRL_HOST_S tmp_value;
  10260. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_HOST);
  10261. tmp_value.all = value;
  10262. #if GH_USB_ENABLE_DEBUG_PRINT
  10263. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_HOST_LPMXMT] --> 0x%08x\n",
  10264. REG_USB_LPM_CNTRL_HOST,value);
  10265. #endif
  10266. return tmp_value.bitc.lpmxmt;
  10267. }
  10268. GH_INLINE void GH_USB_set_LPM_CNTRL_HOST_LPMRES(U8 data)
  10269. {
  10270. GH_USB_LPM_CNTRL_HOST_S d;
  10271. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_HOST;
  10272. d.bitc.lpmres = data;
  10273. *(volatile U8 *)REG_USB_LPM_CNTRL_HOST = d.all;
  10274. #if GH_USB_ENABLE_DEBUG_PRINT
  10275. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_HOST_LPMRES] <-- 0x%08x\n",
  10276. REG_USB_LPM_CNTRL_HOST,d.all,d.all);
  10277. #endif
  10278. }
  10279. GH_INLINE U8 GH_USB_get_LPM_CNTRL_HOST_LPMRES(void)
  10280. {
  10281. GH_USB_LPM_CNTRL_HOST_S tmp_value;
  10282. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_HOST);
  10283. tmp_value.all = value;
  10284. #if GH_USB_ENABLE_DEBUG_PRINT
  10285. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_HOST_LPMRES] --> 0x%08x\n",
  10286. REG_USB_LPM_CNTRL_HOST,value);
  10287. #endif
  10288. return tmp_value.bitc.lpmres;
  10289. }
  10290. #endif /* GH_INLINE_LEVEL == 0 */
  10291. /*----------------------------------------------------------------------------*/
  10292. /* register USB_LPM_INTREN (read/write) */
  10293. /*----------------------------------------------------------------------------*/
  10294. #if GH_INLINE_LEVEL == 0
  10295. /*! \brief Writes the register 'USB_LPM_INTREN'. */
  10296. void GH_USB_set_LPM_INTREN(U8 data);
  10297. /*! \brief Reads the register 'USB_LPM_INTREN'. */
  10298. U8 GH_USB_get_LPM_INTREN(void);
  10299. /*! \brief Writes the bit group 'LPMSTEN' of register 'USB_LPM_INTREN'. */
  10300. void GH_USB_set_LPM_INTREN_LPMSTEN(U8 data);
  10301. /*! \brief Reads the bit group 'LPMSTEN' of register 'USB_LPM_INTREN'. */
  10302. U8 GH_USB_get_LPM_INTREN_LPMSTEN(void);
  10303. /*! \brief Writes the bit group 'LPMNYEN' of register 'USB_LPM_INTREN'. */
  10304. void GH_USB_set_LPM_INTREN_LPMNYEN(U8 data);
  10305. /*! \brief Reads the bit group 'LPMNYEN' of register 'USB_LPM_INTREN'. */
  10306. U8 GH_USB_get_LPM_INTREN_LPMNYEN(void);
  10307. /*! \brief Writes the bit group 'LPMACKEN' of register 'USB_LPM_INTREN'. */
  10308. void GH_USB_set_LPM_INTREN_LPMACKEN(U8 data);
  10309. /*! \brief Reads the bit group 'LPMACKEN' of register 'USB_LPM_INTREN'. */
  10310. U8 GH_USB_get_LPM_INTREN_LPMACKEN(void);
  10311. /*! \brief Writes the bit group 'LPMNCEN' of register 'USB_LPM_INTREN'. */
  10312. void GH_USB_set_LPM_INTREN_LPMNCEN(U8 data);
  10313. /*! \brief Reads the bit group 'LPMNCEN' of register 'USB_LPM_INTREN'. */
  10314. U8 GH_USB_get_LPM_INTREN_LPMNCEN(void);
  10315. /*! \brief Writes the bit group 'LPMRESEN' of register 'USB_LPM_INTREN'. */
  10316. void GH_USB_set_LPM_INTREN_LPMRESEN(U8 data);
  10317. /*! \brief Reads the bit group 'LPMRESEN' of register 'USB_LPM_INTREN'. */
  10318. U8 GH_USB_get_LPM_INTREN_LPMRESEN(void);
  10319. /*! \brief Writes the bit group 'LPMERREN' of register 'USB_LPM_INTREN'. */
  10320. void GH_USB_set_LPM_INTREN_LPMERREN(U8 data);
  10321. /*! \brief Reads the bit group 'LPMERREN' of register 'USB_LPM_INTREN'. */
  10322. U8 GH_USB_get_LPM_INTREN_LPMERREN(void);
  10323. #else /* GH_INLINE_LEVEL == 0 */
  10324. GH_INLINE void GH_USB_set_LPM_INTREN(U8 data)
  10325. {
  10326. *(volatile U8 *)REG_USB_LPM_INTREN = data;
  10327. #if GH_USB_ENABLE_DEBUG_PRINT
  10328. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN] <-- 0x%08x\n",
  10329. REG_USB_LPM_INTREN,data,data);
  10330. #endif
  10331. }
  10332. GH_INLINE U8 GH_USB_get_LPM_INTREN(void)
  10333. {
  10334. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  10335. #if GH_USB_ENABLE_DEBUG_PRINT
  10336. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN] --> 0x%08x\n",
  10337. REG_USB_LPM_INTREN,value);
  10338. #endif
  10339. return value;
  10340. }
  10341. GH_INLINE void GH_USB_set_LPM_INTREN_LPMSTEN(U8 data)
  10342. {
  10343. GH_USB_LPM_INTREN_S d;
  10344. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  10345. d.bitc.lpmsten = data;
  10346. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  10347. #if GH_USB_ENABLE_DEBUG_PRINT
  10348. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMSTEN] <-- 0x%08x\n",
  10349. REG_USB_LPM_INTREN,d.all,d.all);
  10350. #endif
  10351. }
  10352. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMSTEN(void)
  10353. {
  10354. GH_USB_LPM_INTREN_S tmp_value;
  10355. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  10356. tmp_value.all = value;
  10357. #if GH_USB_ENABLE_DEBUG_PRINT
  10358. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMSTEN] --> 0x%08x\n",
  10359. REG_USB_LPM_INTREN,value);
  10360. #endif
  10361. return tmp_value.bitc.lpmsten;
  10362. }
  10363. GH_INLINE void GH_USB_set_LPM_INTREN_LPMNYEN(U8 data)
  10364. {
  10365. GH_USB_LPM_INTREN_S d;
  10366. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  10367. d.bitc.lpmnyen = data;
  10368. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  10369. #if GH_USB_ENABLE_DEBUG_PRINT
  10370. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMNYEN] <-- 0x%08x\n",
  10371. REG_USB_LPM_INTREN,d.all,d.all);
  10372. #endif
  10373. }
  10374. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMNYEN(void)
  10375. {
  10376. GH_USB_LPM_INTREN_S tmp_value;
  10377. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  10378. tmp_value.all = value;
  10379. #if GH_USB_ENABLE_DEBUG_PRINT
  10380. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMNYEN] --> 0x%08x\n",
  10381. REG_USB_LPM_INTREN,value);
  10382. #endif
  10383. return tmp_value.bitc.lpmnyen;
  10384. }
  10385. GH_INLINE void GH_USB_set_LPM_INTREN_LPMACKEN(U8 data)
  10386. {
  10387. GH_USB_LPM_INTREN_S d;
  10388. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  10389. d.bitc.lpmacken = data;
  10390. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  10391. #if GH_USB_ENABLE_DEBUG_PRINT
  10392. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMACKEN] <-- 0x%08x\n",
  10393. REG_USB_LPM_INTREN,d.all,d.all);
  10394. #endif
  10395. }
  10396. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMACKEN(void)
  10397. {
  10398. GH_USB_LPM_INTREN_S tmp_value;
  10399. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  10400. tmp_value.all = value;
  10401. #if GH_USB_ENABLE_DEBUG_PRINT
  10402. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMACKEN] --> 0x%08x\n",
  10403. REG_USB_LPM_INTREN,value);
  10404. #endif
  10405. return tmp_value.bitc.lpmacken;
  10406. }
  10407. GH_INLINE void GH_USB_set_LPM_INTREN_LPMNCEN(U8 data)
  10408. {
  10409. GH_USB_LPM_INTREN_S d;
  10410. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  10411. d.bitc.lpmncen = data;
  10412. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  10413. #if GH_USB_ENABLE_DEBUG_PRINT
  10414. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMNCEN] <-- 0x%08x\n",
  10415. REG_USB_LPM_INTREN,d.all,d.all);
  10416. #endif
  10417. }
  10418. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMNCEN(void)
  10419. {
  10420. GH_USB_LPM_INTREN_S tmp_value;
  10421. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  10422. tmp_value.all = value;
  10423. #if GH_USB_ENABLE_DEBUG_PRINT
  10424. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMNCEN] --> 0x%08x\n",
  10425. REG_USB_LPM_INTREN,value);
  10426. #endif
  10427. return tmp_value.bitc.lpmncen;
  10428. }
  10429. GH_INLINE void GH_USB_set_LPM_INTREN_LPMRESEN(U8 data)
  10430. {
  10431. GH_USB_LPM_INTREN_S d;
  10432. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  10433. d.bitc.lpmresen = data;
  10434. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  10435. #if GH_USB_ENABLE_DEBUG_PRINT
  10436. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMRESEN] <-- 0x%08x\n",
  10437. REG_USB_LPM_INTREN,d.all,d.all);
  10438. #endif
  10439. }
  10440. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMRESEN(void)
  10441. {
  10442. GH_USB_LPM_INTREN_S tmp_value;
  10443. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  10444. tmp_value.all = value;
  10445. #if GH_USB_ENABLE_DEBUG_PRINT
  10446. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMRESEN] --> 0x%08x\n",
  10447. REG_USB_LPM_INTREN,value);
  10448. #endif
  10449. return tmp_value.bitc.lpmresen;
  10450. }
  10451. GH_INLINE void GH_USB_set_LPM_INTREN_LPMERREN(U8 data)
  10452. {
  10453. GH_USB_LPM_INTREN_S d;
  10454. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  10455. d.bitc.lpmerren = data;
  10456. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  10457. #if GH_USB_ENABLE_DEBUG_PRINT
  10458. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMERREN] <-- 0x%08x\n",
  10459. REG_USB_LPM_INTREN,d.all,d.all);
  10460. #endif
  10461. }
  10462. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMERREN(void)
  10463. {
  10464. GH_USB_LPM_INTREN_S tmp_value;
  10465. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  10466. tmp_value.all = value;
  10467. #if GH_USB_ENABLE_DEBUG_PRINT
  10468. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMERREN] --> 0x%08x\n",
  10469. REG_USB_LPM_INTREN,value);
  10470. #endif
  10471. return tmp_value.bitc.lpmerren;
  10472. }
  10473. #endif /* GH_INLINE_LEVEL == 0 */
  10474. /*----------------------------------------------------------------------------*/
  10475. /* register USB_LPM_INTR_PERI (read) */
  10476. /*----------------------------------------------------------------------------*/
  10477. #if GH_INLINE_LEVEL == 0
  10478. /*! \brief Reads the register 'USB_LPM_INTR_PERI'. */
  10479. U8 GH_USB_get_LPM_INTR_PERI(void);
  10480. /*! \brief Reads the bit group 'LPMST' of register 'USB_LPM_INTR_PERI'. */
  10481. U8 GH_USB_get_LPM_INTR_PERI_LPMST(void);
  10482. /*! \brief Reads the bit group 'LPMNY' of register 'USB_LPM_INTR_PERI'. */
  10483. U8 GH_USB_get_LPM_INTR_PERI_LPMNY(void);
  10484. /*! \brief Reads the bit group 'LPMACK' of register 'USB_LPM_INTR_PERI'. */
  10485. U8 GH_USB_get_LPM_INTR_PERI_LPMACK(void);
  10486. /*! \brief Reads the bit group 'LPMNC' of register 'USB_LPM_INTR_PERI'. */
  10487. U8 GH_USB_get_LPM_INTR_PERI_LPMNC(void);
  10488. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_INTR_PERI'. */
  10489. U8 GH_USB_get_LPM_INTR_PERI_LPMRES(void);
  10490. /*! \brief Reads the bit group 'LPMERR' of register 'USB_LPM_INTR_PERI'. */
  10491. U8 GH_USB_get_LPM_INTR_PERI_LPMERR(void);
  10492. #else /* GH_INLINE_LEVEL == 0 */
  10493. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI(void)
  10494. {
  10495. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  10496. #if GH_USB_ENABLE_DEBUG_PRINT
  10497. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI] --> 0x%08x\n",
  10498. REG_USB_LPM_INTR_PERI,value);
  10499. #endif
  10500. return value;
  10501. }
  10502. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMST(void)
  10503. {
  10504. GH_USB_LPM_INTR_PERI_S tmp_value;
  10505. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  10506. tmp_value.all = value;
  10507. #if GH_USB_ENABLE_DEBUG_PRINT
  10508. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMST] --> 0x%08x\n",
  10509. REG_USB_LPM_INTR_PERI,value);
  10510. #endif
  10511. return tmp_value.bitc.lpmst;
  10512. }
  10513. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMNY(void)
  10514. {
  10515. GH_USB_LPM_INTR_PERI_S tmp_value;
  10516. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  10517. tmp_value.all = value;
  10518. #if GH_USB_ENABLE_DEBUG_PRINT
  10519. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMNY] --> 0x%08x\n",
  10520. REG_USB_LPM_INTR_PERI,value);
  10521. #endif
  10522. return tmp_value.bitc.lpmny;
  10523. }
  10524. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMACK(void)
  10525. {
  10526. GH_USB_LPM_INTR_PERI_S tmp_value;
  10527. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  10528. tmp_value.all = value;
  10529. #if GH_USB_ENABLE_DEBUG_PRINT
  10530. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMACK] --> 0x%08x\n",
  10531. REG_USB_LPM_INTR_PERI,value);
  10532. #endif
  10533. return tmp_value.bitc.lpmack;
  10534. }
  10535. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMNC(void)
  10536. {
  10537. GH_USB_LPM_INTR_PERI_S tmp_value;
  10538. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  10539. tmp_value.all = value;
  10540. #if GH_USB_ENABLE_DEBUG_PRINT
  10541. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMNC] --> 0x%08x\n",
  10542. REG_USB_LPM_INTR_PERI,value);
  10543. #endif
  10544. return tmp_value.bitc.lpmnc;
  10545. }
  10546. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMRES(void)
  10547. {
  10548. GH_USB_LPM_INTR_PERI_S tmp_value;
  10549. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  10550. tmp_value.all = value;
  10551. #if GH_USB_ENABLE_DEBUG_PRINT
  10552. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMRES] --> 0x%08x\n",
  10553. REG_USB_LPM_INTR_PERI,value);
  10554. #endif
  10555. return tmp_value.bitc.lpmres;
  10556. }
  10557. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMERR(void)
  10558. {
  10559. GH_USB_LPM_INTR_PERI_S tmp_value;
  10560. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  10561. tmp_value.all = value;
  10562. #if GH_USB_ENABLE_DEBUG_PRINT
  10563. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMERR] --> 0x%08x\n",
  10564. REG_USB_LPM_INTR_PERI,value);
  10565. #endif
  10566. return tmp_value.bitc.lpmerr;
  10567. }
  10568. #endif /* GH_INLINE_LEVEL == 0 */
  10569. /*----------------------------------------------------------------------------*/
  10570. /* register USB_LPM_INTR_HOST (read) */
  10571. /*----------------------------------------------------------------------------*/
  10572. #if GH_INLINE_LEVEL == 0
  10573. /*! \brief Reads the register 'USB_LPM_INTR_HOST'. */
  10574. U8 GH_USB_get_LPM_INTR_HOST(void);
  10575. /*! \brief Reads the bit group 'LPMST' of register 'USB_LPM_INTR_HOST'. */
  10576. U8 GH_USB_get_LPM_INTR_HOST_LPMST(void);
  10577. /*! \brief Reads the bit group 'LPMNY' of register 'USB_LPM_INTR_HOST'. */
  10578. U8 GH_USB_get_LPM_INTR_HOST_LPMNY(void);
  10579. /*! \brief Reads the bit group 'LPMACK' of register 'USB_LPM_INTR_HOST'. */
  10580. U8 GH_USB_get_LPM_INTR_HOST_LPMACK(void);
  10581. /*! \brief Reads the bit group 'LPMNC' of register 'USB_LPM_INTR_HOST'. */
  10582. U8 GH_USB_get_LPM_INTR_HOST_LPMNC(void);
  10583. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_INTR_HOST'. */
  10584. U8 GH_USB_get_LPM_INTR_HOST_LPMRES(void);
  10585. /*! \brief Reads the bit group 'LPMERR' of register 'USB_LPM_INTR_HOST'. */
  10586. U8 GH_USB_get_LPM_INTR_HOST_LPMERR(void);
  10587. #else /* GH_INLINE_LEVEL == 0 */
  10588. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST(void)
  10589. {
  10590. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  10591. #if GH_USB_ENABLE_DEBUG_PRINT
  10592. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST] --> 0x%08x\n",
  10593. REG_USB_LPM_INTR_HOST,value);
  10594. #endif
  10595. return value;
  10596. }
  10597. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMST(void)
  10598. {
  10599. GH_USB_LPM_INTR_HOST_S tmp_value;
  10600. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  10601. tmp_value.all = value;
  10602. #if GH_USB_ENABLE_DEBUG_PRINT
  10603. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMST] --> 0x%08x\n",
  10604. REG_USB_LPM_INTR_HOST,value);
  10605. #endif
  10606. return tmp_value.bitc.lpmst;
  10607. }
  10608. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMNY(void)
  10609. {
  10610. GH_USB_LPM_INTR_HOST_S tmp_value;
  10611. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  10612. tmp_value.all = value;
  10613. #if GH_USB_ENABLE_DEBUG_PRINT
  10614. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMNY] --> 0x%08x\n",
  10615. REG_USB_LPM_INTR_HOST,value);
  10616. #endif
  10617. return tmp_value.bitc.lpmny;
  10618. }
  10619. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMACK(void)
  10620. {
  10621. GH_USB_LPM_INTR_HOST_S tmp_value;
  10622. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  10623. tmp_value.all = value;
  10624. #if GH_USB_ENABLE_DEBUG_PRINT
  10625. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMACK] --> 0x%08x\n",
  10626. REG_USB_LPM_INTR_HOST,value);
  10627. #endif
  10628. return tmp_value.bitc.lpmack;
  10629. }
  10630. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMNC(void)
  10631. {
  10632. GH_USB_LPM_INTR_HOST_S tmp_value;
  10633. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  10634. tmp_value.all = value;
  10635. #if GH_USB_ENABLE_DEBUG_PRINT
  10636. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMNC] --> 0x%08x\n",
  10637. REG_USB_LPM_INTR_HOST,value);
  10638. #endif
  10639. return tmp_value.bitc.lpmnc;
  10640. }
  10641. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMRES(void)
  10642. {
  10643. GH_USB_LPM_INTR_HOST_S tmp_value;
  10644. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  10645. tmp_value.all = value;
  10646. #if GH_USB_ENABLE_DEBUG_PRINT
  10647. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMRES] --> 0x%08x\n",
  10648. REG_USB_LPM_INTR_HOST,value);
  10649. #endif
  10650. return tmp_value.bitc.lpmres;
  10651. }
  10652. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMERR(void)
  10653. {
  10654. GH_USB_LPM_INTR_HOST_S tmp_value;
  10655. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  10656. tmp_value.all = value;
  10657. #if GH_USB_ENABLE_DEBUG_PRINT
  10658. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMERR] --> 0x%08x\n",
  10659. REG_USB_LPM_INTR_HOST,value);
  10660. #endif
  10661. return tmp_value.bitc.lpmerr;
  10662. }
  10663. #endif /* GH_INLINE_LEVEL == 0 */
  10664. /*----------------------------------------------------------------------------*/
  10665. /* register USB_LPM_FADDR_HOST (read) */
  10666. /*----------------------------------------------------------------------------*/
  10667. #if GH_INLINE_LEVEL == 0
  10668. /*! \brief Reads the register 'USB_LPM_FADDR_HOST'. */
  10669. U8 GH_USB_get_LPM_FADDR_HOST(void);
  10670. /*! \brief Reads the bit group 'LPMFADDR' of register 'USB_LPM_FADDR_HOST'. */
  10671. U8 GH_USB_get_LPM_FADDR_HOST_LPMFADDR(void);
  10672. #else /* GH_INLINE_LEVEL == 0 */
  10673. GH_INLINE U8 GH_USB_get_LPM_FADDR_HOST(void)
  10674. {
  10675. U8 value = (*(volatile U8 *)REG_USB_LPM_FADDR_HOST);
  10676. #if GH_USB_ENABLE_DEBUG_PRINT
  10677. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_FADDR_HOST] --> 0x%08x\n",
  10678. REG_USB_LPM_FADDR_HOST,value);
  10679. #endif
  10680. return value;
  10681. }
  10682. GH_INLINE U8 GH_USB_get_LPM_FADDR_HOST_LPMFADDR(void)
  10683. {
  10684. GH_USB_LPM_FADDR_HOST_S tmp_value;
  10685. U8 value = (*(volatile U8 *)REG_USB_LPM_FADDR_HOST);
  10686. tmp_value.all = value;
  10687. #if GH_USB_ENABLE_DEBUG_PRINT
  10688. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_FADDR_HOST_LPMFADDR] --> 0x%08x\n",
  10689. REG_USB_LPM_FADDR_HOST,value);
  10690. #endif
  10691. return tmp_value.bitc.lpmfaddr;
  10692. }
  10693. #endif /* GH_INLINE_LEVEL == 0 */
  10694. /*----------------------------------------------------------------------------*/
  10695. /* register USB_FIFOs_U32 (read/write) */
  10696. /*----------------------------------------------------------------------------*/
  10697. #if GH_INLINE_LEVEL == 0
  10698. /*! \brief Writes the register 'USB_FIFOs_U32'. */
  10699. void GH_USB_set_FIFOs_U32(U8 index, U32 data);
  10700. /*! \brief Reads the register 'USB_FIFOs_U32'. */
  10701. U32 GH_USB_get_FIFOs_U32(U8 index);
  10702. #else
  10703. GH_INLINE void GH_USB_set_FIFOs_U32(U8 index, U32 data)
  10704. {
  10705. *(volatile U32 *)(REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,OFFSET_USB_FIFOS_U32)) = data;
  10706. #if GH_USB_ENABLE_DEBUG_PRINT
  10707. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FIFOs_U32] <-- 0x%08x\n",
  10708. (REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,OFFSET_USB_FIFOS_U32)),data,data);
  10709. #endif
  10710. }
  10711. GH_INLINE U32 GH_USB_get_FIFOs_U32(U8 index)
  10712. {
  10713. U32 value = (*(volatile U32 *)(REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,OFFSET_USB_FIFOS_U32)));
  10714. #if GH_USB_ENABLE_DEBUG_PRINT
  10715. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOs_U32] --> 0x%08x\n",
  10716. (REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,OFFSET_USB_FIFOS_U32)),value);
  10717. #endif
  10718. return value;
  10719. }
  10720. #endif /* GH_INLINE_LEVEL == 0 */
  10721. /* init function */
  10722. /*----------------------------------------------------------------------------*/
  10723. /*! \brief Initialises the registers and mirror variables. */
  10724. void GH_USB_init(void);
  10725. #ifdef __cplusplus
  10726. }
  10727. #endif
  10728. #endif /* _GH_USB_H */
  10729. /*----------------------------------------------------------------------------*/
  10730. /* end of file */
  10731. /*----------------------------------------------------------------------------*/