gh_usb.h 515 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184
  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,0x90006000) /* read/write */
  59. #define REG_USB_POWER_R_PERI FIO_ADDRESS(USB,0x90006001) /* read */
  60. #define REG_USB_POWER_W_PERI FIO_ADDRESS(USB,0x90006001) /* write */
  61. #define REG_USB_POWER_R_HOST FIO_ADDRESS(USB,0x90006001) /* read */
  62. #define REG_USB_POWER_W_HOST FIO_ADDRESS(USB,0x90006001) /* write */
  63. #define REG_USB_INTRTX FIO_ADDRESS(USB,0x90006002) /* read */
  64. #define REG_USB_INTRTX_L FIO_ADDRESS(USB,0x90006002) /* read */
  65. #define REG_USB_INTRTX_H FIO_ADDRESS(USB,0x90006003) /* read */
  66. #define REG_USB_INTRRX FIO_ADDRESS(USB,0x90006004) /* read */
  67. #define REG_USB_INTRRX_L FIO_ADDRESS(USB,0x90006004) /* read */
  68. #define REG_USB_INTRRX_H FIO_ADDRESS(USB,0x90006005) /* read */
  69. #define REG_USB_INTRTXE FIO_ADDRESS(USB,0x90006006) /* read/write */
  70. #define REG_USB_INTRTXE_L FIO_ADDRESS(USB,0x90006006) /* read/write */
  71. #define REG_USB_INTRTXE_H FIO_ADDRESS(USB,0x90006007) /* read/write */
  72. #define REG_USB_INTRRXE FIO_ADDRESS(USB,0x90006008) /* read/write */
  73. #define REG_USB_INTRRXE_L FIO_ADDRESS(USB,0x90006008) /* read/write */
  74. #define REG_USB_INTRRXE_H FIO_ADDRESS(USB,0x90006009) /* read/write */
  75. #define REG_USB_INTRUSB FIO_ADDRESS(USB,0x9000600A) /* read */
  76. #define REG_USB_INTRUSBE FIO_ADDRESS(USB,0x9000600B) /* read/write */
  77. #define REG_USB_FRAME FIO_ADDRESS(USB,0x9000600C) /* read */
  78. #define REG_USB_INDEX FIO_ADDRESS(USB,0x9000600E) /* read/write */
  79. #define REG_USB_TESTMODE FIO_ADDRESS(USB,0x9000600F) /* read/write */
  80. #define REG_USB_CSR0L_R_PERI FIO_ADDRESS(USB,0x90006012) /* read */
  81. #define REG_USB_CSR0L_W_PERI FIO_ADDRESS(USB,0x90006012) /* write */
  82. #define REG_USB_CSR0H_W_PERI FIO_ADDRESS(USB,0x90006013) /* write */
  83. #define REG_USB_CSR0L_R_HOST FIO_ADDRESS(USB,0x90006012) /* read */
  84. #define REG_USB_CSR0H_R_HOST FIO_ADDRESS(USB,0x90006013) /* read */
  85. #define REG_USB_CSR0L_W_HOST FIO_ADDRESS(USB,0x90006012) /* write */
  86. #define REG_USB_CSR0H_W_HOST FIO_ADDRESS(USB,0x90006013) /* write */
  87. #define REG_USB_COUNT0 FIO_ADDRESS(USB,0x90006018) /* read */
  88. #define REG_USB_TYPE0 FIO_ADDRESS(USB,0x9000601A) /* read/write */
  89. #define REG_USB_NAKLIMIT0_HOST FIO_ADDRESS(USB,0x9000601B) /* read/write */
  90. #define REG_USB_CONFIGDATA FIO_ADDRESS(USB,0x9000601F) /* read */
  91. #define REG_USB_TXMAXP FIO_ADDRESS(USB,0x90006010) /* read/write */
  92. #define REG_USB_TXMAXPL FIO_ADDRESS(USB,0x90006010) /* read/write */
  93. #define REG_USB_TXMAXPH FIO_ADDRESS(USB,0x90006010) /* read/write */
  94. #define REG_USB_TXCSRL_R_PERI FIO_ADDRESS(USB,0x90006012) /* read */
  95. #define REG_USB_TXCSRH_R_PERI FIO_ADDRESS(USB,0x90006013) /* read */
  96. #define REG_USB_TXCSRL_W_PERI FIO_ADDRESS(USB,0x90006012) /* write */
  97. #define REG_USB_TXCSRH_W_PERI FIO_ADDRESS(USB,0x90006013) /* write */
  98. #define REG_USB_TXCSRL_R_HOST FIO_ADDRESS(USB,0x90006012) /* read */
  99. #define REG_USB_TXCSRH_R_HOST FIO_ADDRESS(USB,0x90006013) /* read */
  100. #define REG_USB_TXCSRL_W_HOST FIO_ADDRESS(USB,0x90006012) /* write */
  101. #define REG_USB_TXCSRH_W_HOST FIO_ADDRESS(USB,0x90006013) /* write */
  102. #define REG_USB_RXMAXP FIO_ADDRESS(USB,0x90006014) /* read/write */
  103. #define REG_USB_RXMAXPL FIO_ADDRESS(USB,0x90006014) /* read/write */
  104. #define REG_USB_RXMAXPH FIO_ADDRESS(USB,0x90006015) /* read/write */
  105. #define REG_USB_RXCSRL_R_PERI FIO_ADDRESS(USB,0x90006016) /* read */
  106. #define REG_USB_RXCSRH_R_PERI FIO_ADDRESS(USB,0x90006017) /* read */
  107. #define REG_USB_RXCSRL_W_PERI FIO_ADDRESS(USB,0x90006016) /* write */
  108. #define REG_USB_RXCSRH_W_PERI FIO_ADDRESS(USB,0x90006017) /* write */
  109. #define REG_USB_RXCSRL_R_HOST FIO_ADDRESS(USB,0x90006016) /* read */
  110. #define REG_USB_RXCSRH_R_HOST FIO_ADDRESS(USB,0x90006017) /* read */
  111. #define REG_USB_RXCSRL_W_HOST FIO_ADDRESS(USB,0x90006016) /* write */
  112. #define REG_USB_RXCSRH_W_HOST FIO_ADDRESS(USB,0x90006017) /* write */
  113. #define REG_USB_RXCOUNT FIO_ADDRESS(USB,0x90006018) /* read */
  114. #define REG_USB_TXTYPE_HOST FIO_ADDRESS(USB,0x9000610A) /* read/write */
  115. #define REG_USB_TXINTERVAL_HOST FIO_ADDRESS(USB,0x9000601B) /* read/write */
  116. #define REG_USB_RXTYPE_HOST FIO_ADDRESS(USB,0x9000601C) /* read/write */
  117. #define REG_USB_RXINTERVAL_HOST FIO_ADDRESS(USB,0x9000601D) /* read/write */
  118. #define REG_USB_FIFOSIZE FIO_ADDRESS(USB,0x9000601F) /* read */
  119. #define REG_USB_FIFOS FIO_ADDRESS(USB,0x90006400) /* read/write */
  120. #define REG_USB_FIFOS_U32 FIO_ADDRESS(USB,0x90006400) /* read/write */
  121. #define REG_USB_DEVCTL_R FIO_ADDRESS(USB,0x90006060) /* read */
  122. #define REG_USB_DEVCTL_W FIO_ADDRESS(USB,0x90006060) /* write */
  123. #define REG_USB_MISC FIO_ADDRESS(USB,0x90006061) /* read/write */
  124. #define REG_USB_TXFIFOSZ FIO_ADDRESS(USB,0x90006062) /* read/write */
  125. #define REG_USB_RXFIFOSZ FIO_ADDRESS(USB,0x90006063) /* read/write */
  126. #define REG_USB_TXFIFOADD FIO_ADDRESS(USB,0x90006064) /* read/write */
  127. #define REG_USB_RXFIFOADD FIO_ADDRESS(USB,0x90006066) /* read/write */
  128. #define REG_USB_VSTATUS FIO_ADDRESS(USB,0x90006068) /* read */
  129. #define REG_USB_VCONTROL FIO_ADDRESS(USB,0x90006068) /* write */
  130. #define REG_USB_HWVERS FIO_ADDRESS(USB,0x9000606C) /* read */
  131. #define REG_USB_EPINFO FIO_ADDRESS(USB,0x90006078) /* read */
  132. #define REG_USB_RAMINFO FIO_ADDRESS(USB,0x90006079) /* read */
  133. #define REG_USB_LINKINFO FIO_ADDRESS(USB,0x9000607A) /* read/write */
  134. #define REG_USB_VPLEN FIO_ADDRESS(USB,0x9000607B) /* read/write */
  135. #define REG_USB_HS_EOF1 FIO_ADDRESS(USB,0x9000607C) /* read/write */
  136. #define REG_USB_FS_EOF1 FIO_ADDRESS(USB,0x9000607D) /* read/write */
  137. #define REG_USB_LS_EOF1 FIO_ADDRESS(USB,0x9000607E) /* read/write */
  138. #define REG_USB_SOFT_RST FIO_ADDRESS(USB,0x9000607F) /* read/write */
  139. #define REG_USB_TXFUNCADDR FIO_ADDRESS(USB,0x90006080) /* read/write */
  140. #define REG_USB_TXHUBADDR FIO_ADDRESS(USB,0x90006082) /* read/write */
  141. #define REG_USB_TXHUBPORT FIO_ADDRESS(USB,0x90006083) /* read/write */
  142. #define REG_USB_RXFUNCADDR FIO_ADDRESS(USB,0x90006084) /* read/write */
  143. #define REG_USB_RXHUBADDR FIO_ADDRESS(USB,0x90006086) /* read/write */
  144. #define REG_USB_RXHUBPORT FIO_ADDRESS(USB,0x90006087) /* read/write */
  145. #define REG_USB_DMA_INTR FIO_ADDRESS(USB,0x90006200) /* read/write */
  146. #define REG_USB_DMA_CNTL FIO_ADDRESS(USB,0x90006204) /* read/write */
  147. #define REG_USB_DMA_ADDR FIO_ADDRESS(USB,0x90006208) /* read/write */
  148. #define REG_USB_DMA_COUNT FIO_ADDRESS(USB,0x9000620C) /* read/write */
  149. #define REG_USB_RQPKTCOUNT_HOST FIO_ADDRESS(USB,0x90006300) /* read/write */
  150. #define REG_USB_RXDPKTBUFDIS FIO_ADDRESS(USB,0x90006340) /* read/write */
  151. #define REG_USB_TXDPKTBUFDIS FIO_ADDRESS(USB,0x90006342) /* read/write */
  152. #define REG_USB_C_T_UCH FIO_ADDRESS(USB,0x90006344) /* read/write */
  153. #define REG_USB_C_T_HSRTN FIO_ADDRESS(USB,0x90006346) /* read/write */
  154. #define REG_USB_C_T_HSBT FIO_ADDRESS(USB,0x90006348) /* read/write */
  155. #define REG_USB_LPM_ATTR FIO_ADDRESS(USB,0x90006360) /* read */
  156. #define REG_USB_LPM_CNTRL_PERI FIO_ADDRESS(USB,0x90006362) /* read/write */
  157. #define REG_USB_LPM_CNTRL_HOST FIO_ADDRESS(USB,0x90006362) /* read/write */
  158. #define REG_USB_LPM_INTREN FIO_ADDRESS(USB,0x90006363) /* read/write */
  159. #define REG_USB_LPM_INTR_PERI FIO_ADDRESS(USB,0x90006364) /* read */
  160. #define REG_USB_LPM_INTR_HOST FIO_ADDRESS(USB,0x90006364) /* read */
  161. #define REG_USB_LPM_FADDR_HOST FIO_ADDRESS(USB,0x90006365) /* read */
  162. #define OFFSET_EP_FIFO_IDX (0x40)
  163. #define REG_USB_ADDR_FIFO_EP(i) FIO_ADDRESS(USB, (REG_USB_FIFOS + OFFSET_EP_FIFO_IDX*(i)))
  164. /*----------------------------------------------------------------------------*/
  165. /* bit group structures */
  166. /*----------------------------------------------------------------------------*/
  167. typedef union { /* USB_FAddr */
  168. U8 all;
  169. struct {
  170. U8 funcaddr : 7;
  171. U8 : 1;
  172. } bitc;
  173. } GH_USB_FADDR_S;
  174. typedef union { /* USB_Power_R_PERI */
  175. U8 all;
  176. struct {
  177. U8 enable_suspendm : 1;
  178. U8 suspend_mode : 1;
  179. U8 resume : 1;
  180. U8 reset : 1;
  181. U8 hs_mode : 1;
  182. U8 hs_enab : 1;
  183. U8 soft_conn : 1;
  184. U8 iso_update : 1;
  185. } bitc;
  186. } GH_USB_POWER_R_PERI_S;
  187. typedef union { /* USB_Power_W_PERI */
  188. U8 all;
  189. struct {
  190. U8 enable_suspendm : 1;
  191. U8 : 1;
  192. U8 resume : 1;
  193. U8 : 2;
  194. U8 hs_enab : 1;
  195. U8 soft_conn : 1;
  196. U8 iso_update : 1;
  197. } bitc;
  198. } GH_USB_POWER_W_PERI_S;
  199. typedef union { /* USB_Power_R_HOST */
  200. U8 all;
  201. struct {
  202. U8 enable_suspendm : 1;
  203. U8 : 1;
  204. U8 resume : 1;
  205. U8 reset : 1;
  206. U8 hs_mode : 1;
  207. U8 hs_enab : 1;
  208. U8 : 2;
  209. } bitc;
  210. } GH_USB_POWER_R_HOST_S;
  211. typedef union { /* USB_Power_W_HOST */
  212. U8 all;
  213. struct {
  214. U8 enable_suspendm : 1;
  215. U8 suspend_mode : 1;
  216. U8 resume : 1;
  217. U8 reset : 1;
  218. U8 : 1;
  219. U8 hs_enab : 1;
  220. U8 : 2;
  221. } bitc;
  222. } GH_USB_POWER_W_HOST_S;
  223. typedef union { /* USB_IntrTx */
  224. U16 all;
  225. struct {
  226. U16 ep0 : 1;
  227. U16 ep1tx : 1;
  228. U16 ep2tx : 1;
  229. U16 ep3tx : 1;
  230. U16 ep4tx : 1;
  231. U16 ep5tx : 1;
  232. U16 ep6tx : 1;
  233. U16 ep7tx : 1;
  234. U16 ep8tx : 1;
  235. U16 ep9tx : 1;
  236. U16 ep10tx : 1;
  237. U16 ep11tx : 1;
  238. U16 ep12tx : 1;
  239. U16 ep13tx : 1;
  240. U16 ep14tx : 1;
  241. U16 ep15tx : 1;
  242. } bitc;
  243. } GH_USB_INTRTX_S;
  244. typedef union { /* USB_IntrTx_L */
  245. U8 all;
  246. struct {
  247. U8 ep0 : 1;
  248. U8 ep1tx : 1;
  249. U8 ep2tx : 1;
  250. U8 ep3tx : 1;
  251. U8 ep4tx : 1;
  252. U8 ep5tx : 1;
  253. U8 ep6tx : 1;
  254. U8 ep7tx : 1;
  255. } bitc;
  256. } GH_USB_INTRTX_L_S;
  257. typedef union { /* USB_IntrTx_H */
  258. U8 all;
  259. struct {
  260. U8 ep8tx : 1;
  261. U8 ep9tx : 1;
  262. U8 ep10tx : 1;
  263. U8 ep11tx : 1;
  264. U8 ep12tx : 1;
  265. U8 ep13tx : 1;
  266. U8 ep14tx : 1;
  267. U8 ep15tx : 1;
  268. } bitc;
  269. } GH_USB_INTRTX_H_S;
  270. typedef union { /* USB_IntrRx */
  271. U16 all;
  272. struct {
  273. U16 : 1;
  274. U16 ep1rx : 1;
  275. U16 ep2rx : 1;
  276. U16 ep3rx : 1;
  277. U16 ep4rx : 1;
  278. U16 ep5rx : 1;
  279. U16 ep6rx : 1;
  280. U16 ep7rx : 1;
  281. U16 ep8rx : 1;
  282. U16 ep9rx : 1;
  283. U16 ep10rx : 1;
  284. U16 ep11rx : 1;
  285. U16 ep12rx : 1;
  286. U16 ep13rx : 1;
  287. U16 ep14rx : 1;
  288. U16 ep15rx : 1;
  289. } bitc;
  290. } GH_USB_INTRRX_S;
  291. typedef union { /* USB_IntrRx_L */
  292. U8 all;
  293. struct {
  294. U8 : 1;
  295. U8 ep1rx : 1;
  296. U8 ep2rx : 1;
  297. U8 ep3rx : 1;
  298. U8 ep4rx : 1;
  299. U8 ep5rx : 1;
  300. U8 ep6rx : 1;
  301. U8 ep7rx : 1;
  302. } bitc;
  303. } GH_USB_INTRRX_L_S;
  304. typedef union { /* USB_IntrRx_H */
  305. U8 all;
  306. struct {
  307. U8 ep8rx : 1;
  308. U8 ep9rx : 1;
  309. U8 ep10rx : 1;
  310. U8 ep11rx : 1;
  311. U8 ep12rx : 1;
  312. U8 ep13rx : 1;
  313. U8 ep14rx : 1;
  314. U8 ep15rx : 1;
  315. } bitc;
  316. } GH_USB_INTRRX_H_S;
  317. typedef union { /* USB_IntrTxE */
  318. U16 all;
  319. struct {
  320. U16 ep0 : 1;
  321. U16 ep1tx : 1;
  322. U16 ep2tx : 1;
  323. U16 ep3tx : 1;
  324. U16 ep4tx : 1;
  325. U16 ep5tx : 1;
  326. U16 ep6tx : 1;
  327. U16 ep7tx : 1;
  328. U16 ep8tx : 1;
  329. U16 ep9tx : 1;
  330. U16 ep10tx : 1;
  331. U16 ep11tx : 1;
  332. U16 ep12tx : 1;
  333. U16 ep13tx : 1;
  334. U16 ep14tx : 1;
  335. U16 ep15tx : 1;
  336. } bitc;
  337. } GH_USB_INTRTXE_S;
  338. typedef union { /* USB_IntrTxE_L */
  339. U8 all;
  340. struct {
  341. U8 ep0 : 1;
  342. U8 ep1tx : 1;
  343. U8 ep2tx : 1;
  344. U8 ep3tx : 1;
  345. U8 ep4tx : 1;
  346. U8 ep5tx : 1;
  347. U8 ep6tx : 1;
  348. U8 ep7tx : 1;
  349. } bitc;
  350. } GH_USB_INTRTXE_L_S;
  351. typedef union { /* USB_IntrTxE_H */
  352. U8 all;
  353. struct {
  354. U8 ep8tx : 1;
  355. U8 ep9tx : 1;
  356. U8 ep10tx : 1;
  357. U8 ep11tx : 1;
  358. U8 ep12tx : 1;
  359. U8 ep13tx : 1;
  360. U8 ep14tx : 1;
  361. U8 ep15tx : 1;
  362. } bitc;
  363. } GH_USB_INTRTXE_H_S;
  364. typedef union { /* USB_IntrRxE */
  365. U16 all;
  366. struct {
  367. U16 : 1;
  368. U16 ep1rx : 1;
  369. U16 ep2rx : 1;
  370. U16 ep3rx : 1;
  371. U16 ep4rx : 1;
  372. U16 ep5rx : 1;
  373. U16 ep6rx : 1;
  374. U16 ep7rx : 1;
  375. U16 ep8rx : 1;
  376. U16 ep9rx : 1;
  377. U16 ep10rx : 1;
  378. U16 ep11rx : 1;
  379. U16 ep12rx : 1;
  380. U16 ep13rx : 1;
  381. U16 ep14rx : 1;
  382. U16 ep15rx : 1;
  383. } bitc;
  384. } GH_USB_INTRRXE_S;
  385. typedef union { /* USB_IntrRxE_L */
  386. U8 all;
  387. struct {
  388. U8 : 1;
  389. U8 ep1rx : 1;
  390. U8 ep2rx : 1;
  391. U8 ep3rx : 1;
  392. U8 ep4rx : 1;
  393. U8 ep5rx : 1;
  394. U8 ep6rx : 1;
  395. U8 ep7rx : 1;
  396. } bitc;
  397. } GH_USB_INTRRXE_L_S;
  398. typedef union { /* USB_IntrRxE_H */
  399. U8 all;
  400. struct {
  401. U8 ep8rx : 1;
  402. U8 ep9rx : 1;
  403. U8 ep10rx : 1;
  404. U8 ep11rx : 1;
  405. U8 ep12rx : 1;
  406. U8 ep13rx : 1;
  407. U8 ep14rx : 1;
  408. U8 ep15rx : 1;
  409. } bitc;
  410. } GH_USB_INTRRXE_H_S;
  411. typedef union { /* USB_IntrUSB */
  412. U8 all;
  413. struct {
  414. U8 suspend : 1;
  415. U8 resume : 1;
  416. U8 reset_babble : 1;
  417. U8 sof : 1;
  418. U8 conn : 1;
  419. U8 discon : 1;
  420. U8 sess_req : 1;
  421. U8 vbus_error : 1;
  422. } bitc;
  423. } GH_USB_INTRUSB_S;
  424. typedef union { /* USB_IntrUSBE */
  425. U8 all;
  426. struct {
  427. U8 suspend : 1;
  428. U8 resume : 1;
  429. U8 reset_babble : 1;
  430. U8 sof : 1;
  431. U8 conn : 1;
  432. U8 discon : 1;
  433. U8 sess_req : 1;
  434. U8 vbus_error : 1;
  435. } bitc;
  436. } GH_USB_INTRUSBE_S;
  437. typedef union { /* USB_Frame */
  438. U16 all;
  439. struct {
  440. U16 number : 11;
  441. U16 : 5;
  442. } bitc;
  443. } GH_USB_FRAME_S;
  444. typedef union { /* USB_Index */
  445. U8 all;
  446. struct {
  447. U8 selectedendpoint : 4;
  448. U8 : 4;
  449. } bitc;
  450. } GH_USB_INDEX_S;
  451. typedef union { /* USB_Testmode */
  452. U8 all;
  453. struct {
  454. U8 test_se0_nak : 1;
  455. U8 test_j : 1;
  456. U8 test_k : 1;
  457. U8 test_packet : 1;
  458. U8 force_hs : 1;
  459. U8 force_fs : 1;
  460. U8 fifo_access : 1;
  461. U8 force_host : 1;
  462. } bitc;
  463. } GH_USB_TESTMODE_S;
  464. typedef union { /* USB_CSR0L_R_PERI */
  465. U8 all;
  466. struct {
  467. U8 rxpktrdy : 1;
  468. U8 txpktrdy : 1;
  469. U8 sentstall : 1;
  470. U8 : 1;
  471. U8 setupend : 1;
  472. U8 : 3;
  473. } bitc;
  474. } GH_USB_CSR0L_R_PERI_S;
  475. typedef union { /* USB_CSR0L_W_PERI */
  476. U8 all;
  477. struct {
  478. U8 : 1;
  479. U8 txpktrdy : 1;
  480. U8 sentstall : 1;
  481. U8 dataend : 1;
  482. U8 : 1;
  483. U8 sendstall : 1;
  484. U8 servicedrxpktrdy : 1;
  485. U8 servicedsetupend : 1;
  486. } bitc;
  487. } GH_USB_CSR0L_W_PERI_S;
  488. typedef union { /* USB_CSR0H_W_PERI */
  489. U8 all;
  490. struct {
  491. U8 flushfifo : 1;
  492. U8 : 7;
  493. } bitc;
  494. } GH_USB_CSR0H_W_PERI_S;
  495. typedef union { /* USB_CSR0L_R_HOST */
  496. U8 all;
  497. struct {
  498. U8 rxpktrdy : 1;
  499. U8 txpktrdy : 1;
  500. U8 rxstall : 1;
  501. U8 setuppkt : 1;
  502. U8 error : 1;
  503. U8 reqpkt : 1;
  504. U8 statuspkt : 1;
  505. U8 naktimeout : 1;
  506. } bitc;
  507. } GH_USB_CSR0L_R_HOST_S;
  508. typedef union { /* USB_CSR0H_R_HOST */
  509. U8 all;
  510. struct {
  511. U8 : 1;
  512. U8 datatoggle : 1;
  513. U8 : 1;
  514. U8 disping : 1;
  515. U8 : 4;
  516. } bitc;
  517. } GH_USB_CSR0H_R_HOST_S;
  518. typedef union { /* USB_CSR0L_W_HOST */
  519. U8 all;
  520. struct {
  521. U8 rxpktrdy : 1;
  522. U8 txpktrdy : 1;
  523. U8 rxstall : 1;
  524. U8 setuppkt : 1;
  525. U8 error : 1;
  526. U8 reqpkt : 1;
  527. U8 statuspkt : 1;
  528. U8 naktimeout : 1;
  529. } bitc;
  530. } GH_USB_CSR0L_W_HOST_S;
  531. typedef union { /* USB_CSR0H_W_HOST */
  532. U8 all;
  533. struct {
  534. U8 flushfifo : 1;
  535. U8 datatoggle : 1;
  536. U8 datatogglewriteenable : 1;
  537. U8 disping : 1;
  538. U8 : 4;
  539. } bitc;
  540. } GH_USB_CSR0H_W_HOST_S;
  541. typedef union { /* USB_Count0 */
  542. U8 all;
  543. struct {
  544. U8 endpoint0rxcount : 8;
  545. } bitc;
  546. } GH_USB_COUNT0_S;
  547. typedef union { /* USB_Type0 */
  548. U8 all;
  549. struct {
  550. U8 : 6;
  551. U8 speed : 2;
  552. } bitc;
  553. } GH_USB_TYPE0_S;
  554. typedef union { /* USB_NAKLimit0_HOST */
  555. U8 all;
  556. struct {
  557. U8 endpoint0naklimit : 5;
  558. U8 : 3;
  559. } bitc;
  560. } GH_USB_NAKLIMIT0_HOST_S;
  561. typedef union { /* USB_ConfigData */
  562. U8 all;
  563. struct {
  564. U8 utmi_datawidth : 1;
  565. U8 softcone : 1;
  566. U8 dynfifo_sizing : 1;
  567. U8 hbtxe : 1;
  568. U8 hbrxe : 1;
  569. U8 bigendian : 1;
  570. U8 mptxe : 1;
  571. U8 mprxe : 1;
  572. } bitc;
  573. } GH_USB_CONFIGDATA_S;
  574. typedef union { /* USB_TxMaxP */
  575. U16 all;
  576. struct {
  577. U16 txmaxp : 11;
  578. U16 multiplier : 5;
  579. } bitc;
  580. } GH_USB_TXMAXP_S;
  581. typedef union { /* USB_TxMaxPL */
  582. U8 all;
  583. struct {
  584. U8 txmaxp : 8;
  585. } bitc;
  586. } GH_USB_TXMAXPL_S;
  587. typedef union { /* USB_TxMaxPH */
  588. U8 all;
  589. struct {
  590. U8 txmaxp : 3;
  591. U8 multiplier : 5;
  592. } bitc;
  593. } GH_USB_TXMAXPH_S;
  594. typedef union { /* USB_TXCSRL_R_PERI */
  595. U8 all;
  596. struct {
  597. U8 txpktrdy : 1;
  598. U8 fifonotempty : 1;
  599. U8 underrun : 1;
  600. U8 : 1;
  601. U8 sendstall : 1;
  602. U8 sentstall : 1;
  603. U8 : 1;
  604. U8 incomptx : 1;
  605. } bitc;
  606. } GH_USB_TXCSRL_R_PERI_S;
  607. typedef union { /* USB_TXCSRH_R_PERI */
  608. U8 all;
  609. struct {
  610. U8 : 2;
  611. U8 dmareqmode : 1;
  612. U8 frcdatatog : 1;
  613. U8 dmareqenab : 1;
  614. U8 mode : 1;
  615. U8 iso : 1;
  616. U8 autoset : 1;
  617. } bitc;
  618. } GH_USB_TXCSRH_R_PERI_S;
  619. typedef union { /* USB_TXCSRL_W_PERI */
  620. U8 all;
  621. struct {
  622. U8 txpktrdy : 1;
  623. U8 fifonotempty : 1;
  624. U8 underrun : 1;
  625. U8 flushfifo : 1;
  626. U8 sendstall : 1;
  627. U8 sentstall : 1;
  628. U8 clrdatatog : 1;
  629. U8 incomptx : 1;
  630. } bitc;
  631. } GH_USB_TXCSRL_W_PERI_S;
  632. typedef union { /* USB_TXCSRH_W_PERI */
  633. U8 all;
  634. struct {
  635. U8 : 2;
  636. U8 dmareqmode : 1;
  637. U8 frcdatatog : 1;
  638. U8 dmareqenab : 1;
  639. U8 mode : 1;
  640. U8 iso : 1;
  641. U8 autoset : 1;
  642. } bitc;
  643. } GH_USB_TXCSRH_W_PERI_S;
  644. typedef union { /* USB_TXCSRL_R_HOST */
  645. U8 all;
  646. struct {
  647. U8 txpktrdy : 1;
  648. U8 fifonotempty : 1;
  649. U8 error : 1;
  650. U8 : 1;
  651. U8 setuppkt : 1;
  652. U8 rxstall : 1;
  653. U8 : 1;
  654. U8 incomptx : 1;
  655. } bitc;
  656. } GH_USB_TXCSRL_R_HOST_S;
  657. typedef union { /* USB_TXCSRH_R_HOST */
  658. U8 all;
  659. struct {
  660. U8 datatoggle : 1;
  661. U8 : 1;
  662. U8 dmareqmode : 1;
  663. U8 frcdatatog : 1;
  664. U8 dmareqenab : 1;
  665. U8 mode : 1;
  666. U8 : 1;
  667. U8 autoset : 1;
  668. } bitc;
  669. } GH_USB_TXCSRH_R_HOST_S;
  670. typedef union { /* USB_TXCSRL_W_HOST */
  671. U8 all;
  672. struct {
  673. U8 txpktrdy : 1;
  674. U8 fifonotempty : 1;
  675. U8 error : 1;
  676. U8 flushfifo : 1;
  677. U8 setuppkt : 1;
  678. U8 rxstall : 1;
  679. U8 clrdatatog : 1;
  680. U8 incomptx : 1;
  681. } bitc;
  682. } GH_USB_TXCSRL_W_HOST_S;
  683. typedef union { /* USB_TXCSRH_W_HOST */
  684. U8 all;
  685. struct {
  686. U8 datatoggle : 1;
  687. U8 datatogglewriteenable : 1;
  688. U8 dmareqmode : 1;
  689. U8 frcdatatog : 1;
  690. U8 dmareqenab : 1;
  691. U8 mode : 1;
  692. U8 : 1;
  693. U8 autoset : 1;
  694. } bitc;
  695. } GH_USB_TXCSRH_W_HOST_S;
  696. typedef union { /* USB_RxMaxP */
  697. U16 all;
  698. struct {
  699. U16 txmaxp : 11;
  700. U16 multiplier : 5;
  701. } bitc;
  702. } GH_USB_RXMAXP_S;
  703. typedef union { /* USB_RxMaxPL */
  704. U8 all;
  705. struct {
  706. U8 txmaxp : 8;
  707. } bitc;
  708. } GH_USB_RXMAXPL_S;
  709. typedef union { /* USB_RxMaxPH */
  710. U8 all;
  711. struct {
  712. U8 txmaxp : 3;
  713. U8 multiplier : 5;
  714. } bitc;
  715. } GH_USB_RXMAXPH_S;
  716. typedef union { /* USB_RXCSRL_R_PERI */
  717. U8 all;
  718. struct {
  719. U8 rxpktrdy : 1;
  720. U8 fifofull : 1;
  721. U8 overrun : 1;
  722. U8 dataerror : 1;
  723. U8 : 1;
  724. U8 sendstall : 1;
  725. U8 sentstall : 1;
  726. U8 : 1;
  727. } bitc;
  728. } GH_USB_RXCSRL_R_PERI_S;
  729. typedef union { /* USB_RXCSRH_R_PERI */
  730. U8 all;
  731. struct {
  732. U8 incomprx : 1;
  733. U8 : 2;
  734. U8 dmareqmode : 1;
  735. U8 disnyet_piderror : 1;
  736. U8 dmareqenab : 1;
  737. U8 iso : 1;
  738. U8 autoclear : 1;
  739. } bitc;
  740. } GH_USB_RXCSRH_R_PERI_S;
  741. typedef union { /* USB_RXCSRL_W_PERI */
  742. U8 all;
  743. struct {
  744. U8 rxpktrdy : 1;
  745. U8 : 1;
  746. U8 overrun : 1;
  747. U8 : 1;
  748. U8 flushfifo : 1;
  749. U8 sendstall : 1;
  750. U8 sentstall : 1;
  751. U8 clrdatatog : 1;
  752. } bitc;
  753. } GH_USB_RXCSRL_W_PERI_S;
  754. typedef union { /* USB_RXCSRH_W_PERI */
  755. U8 all;
  756. struct {
  757. U8 incomprx : 1;
  758. U8 : 2;
  759. U8 dmareqmode : 1;
  760. U8 disnyet_piderror : 1;
  761. U8 dmareqenab : 1;
  762. U8 iso : 1;
  763. U8 autoclear : 1;
  764. } bitc;
  765. } GH_USB_RXCSRH_W_PERI_S;
  766. typedef union { /* USB_RXCSRL_R_HOST */
  767. U8 all;
  768. struct {
  769. U8 rxpktrdy : 1;
  770. U8 fifofull : 1;
  771. U8 error : 1;
  772. U8 dataerror_naktimeout : 1;
  773. U8 : 1;
  774. U8 reqpkt : 1;
  775. U8 rxstall : 1;
  776. U8 : 1;
  777. } bitc;
  778. } GH_USB_RXCSRL_R_HOST_S;
  779. typedef union { /* USB_RXCSRH_R_HOST */
  780. U8 all;
  781. struct {
  782. U8 incomprx : 1;
  783. U8 datatoggle : 1;
  784. U8 datatogglewriteenable : 1;
  785. U8 dmareqmode : 1;
  786. U8 piderror : 1;
  787. U8 dmareqenab : 1;
  788. U8 autoreq : 1;
  789. U8 autoclear : 1;
  790. } bitc;
  791. } GH_USB_RXCSRH_R_HOST_S;
  792. typedef union { /* USB_RXCSRL_W_HOST */
  793. U8 all;
  794. struct {
  795. U8 rxpktrdy : 1;
  796. U8 : 1;
  797. U8 error : 1;
  798. U8 dataerror_naktimeout : 1;
  799. U8 flushfifo : 1;
  800. U8 reqpkt : 1;
  801. U8 rxstall : 1;
  802. U8 clrdatatog : 1;
  803. } bitc;
  804. } GH_USB_RXCSRL_W_HOST_S;
  805. typedef union { /* USB_RXCSRH_W_HOST */
  806. U8 all;
  807. struct {
  808. U8 incomprx : 1;
  809. U8 : 2;
  810. U8 dmareqmode : 1;
  811. U8 : 1;
  812. U8 dmareqenab : 1;
  813. U8 autoreq : 1;
  814. U8 autoclear : 1;
  815. } bitc;
  816. } GH_USB_RXCSRH_W_HOST_S;
  817. typedef union { /* USB_RxCount */
  818. U16 all;
  819. struct {
  820. U16 endpointrxcount : 14;
  821. U16 : 2;
  822. } bitc;
  823. } GH_USB_RXCOUNT_S;
  824. typedef union { /* USB_TxType_HOST */
  825. U8 all;
  826. struct {
  827. U8 targetendpointnumber : 4;
  828. U8 protocol : 2;
  829. U8 speed : 2;
  830. } bitc;
  831. } GH_USB_TXTYPE_HOST_S;
  832. typedef union { /* USB_TxInterval_HOST */
  833. U8 all;
  834. struct {
  835. U8 txpollinginterval_naklimit : 8;
  836. } bitc;
  837. } GH_USB_TXINTERVAL_HOST_S;
  838. typedef union { /* USB_RxType_HOST */
  839. U8 all;
  840. struct {
  841. U8 targetendpointnumber : 4;
  842. U8 protocol : 2;
  843. U8 speed : 2;
  844. } bitc;
  845. } GH_USB_RXTYPE_HOST_S;
  846. typedef union { /* USB_RxInterval_HOST */
  847. U8 all;
  848. struct {
  849. U8 rxpollinginterval_naklimit : 8;
  850. } bitc;
  851. } GH_USB_RXINTERVAL_HOST_S;
  852. typedef union { /* USB_FIFOSize */
  853. U8 all;
  854. struct {
  855. U8 txfifosize : 4;
  856. U8 rxfifosize : 4;
  857. } bitc;
  858. } GH_USB_FIFOSIZE_S;
  859. typedef union { /* USB_DevCtl_R */
  860. U8 all;
  861. struct {
  862. U8 session : 1;
  863. U8 host_req : 1;
  864. U8 host_mode : 1;
  865. U8 vbus : 2;
  866. U8 lsdev : 1;
  867. U8 fsdev : 1;
  868. U8 b_device : 1;
  869. } bitc;
  870. } GH_USB_DEVCTL_R_S;
  871. typedef union { /* USB_DevCtl_W */
  872. U8 all;
  873. struct {
  874. U8 session : 1;
  875. U8 host_req : 1;
  876. U8 : 6;
  877. } bitc;
  878. } GH_USB_DEVCTL_W_S;
  879. typedef union { /* USB_Misc */
  880. U8 all;
  881. struct {
  882. U8 rx_edma : 1;
  883. U8 tx_edma : 1;
  884. U8 : 6;
  885. } bitc;
  886. } GH_USB_MISC_S;
  887. typedef union { /* USB_TxFIFOsz */
  888. U8 all;
  889. struct {
  890. U8 sz : 4;
  891. U8 dpb : 1;
  892. U8 : 3;
  893. } bitc;
  894. } GH_USB_TXFIFOSZ_S;
  895. typedef union { /* USB_RxFIFOsz */
  896. U8 all;
  897. struct {
  898. U8 sz : 4;
  899. U8 dpb : 1;
  900. U8 : 3;
  901. } bitc;
  902. } GH_USB_RXFIFOSZ_S;
  903. typedef union { /* USB_TxFIFOadd */
  904. U16 all;
  905. struct {
  906. U16 startaddress : 13;
  907. U16 : 3;
  908. } bitc;
  909. } GH_USB_TXFIFOADD_S;
  910. typedef union { /* USB_RxFIFOadd */
  911. U16 all;
  912. struct {
  913. U16 startaddress : 13;
  914. U16 : 3;
  915. } bitc;
  916. } GH_USB_RXFIFOADD_S;
  917. typedef union { /* USB_HWVers */
  918. U16 all;
  919. struct {
  920. U16 minorversion : 10;
  921. U16 majorversion : 5;
  922. U16 rc : 1;
  923. } bitc;
  924. } GH_USB_HWVERS_S;
  925. typedef union { /* USB_EPInfo */
  926. U8 all;
  927. struct {
  928. U8 txendpoints : 4;
  929. U8 rxendpoints : 4;
  930. } bitc;
  931. } GH_USB_EPINFO_S;
  932. typedef union { /* USB_RAMInfo */
  933. U8 all;
  934. struct {
  935. U8 rambits : 4;
  936. U8 dmachans : 4;
  937. } bitc;
  938. } GH_USB_RAMINFO_S;
  939. typedef union { /* USB_LinkInfo */
  940. U8 all;
  941. struct {
  942. U8 wtid : 4;
  943. U8 wtcon : 4;
  944. } bitc;
  945. } GH_USB_LINKINFO_S;
  946. typedef union { /* USB_SOFT_RST */
  947. U8 all;
  948. struct {
  949. U8 nrst : 1;
  950. U8 nrstx : 1;
  951. U8 : 6;
  952. } bitc;
  953. } GH_USB_SOFT_RST_S;
  954. typedef union { /* USB_TxFuncAddr */
  955. U8 all;
  956. struct {
  957. U8 addressoftargetfunction : 7;
  958. U8 : 1;
  959. } bitc;
  960. } GH_USB_TXFUNCADDR_S;
  961. typedef union { /* USB_TxHubAddr */
  962. U8 all;
  963. struct {
  964. U8 hubaddress : 7;
  965. U8 multipletranslators : 1;
  966. } bitc;
  967. } GH_USB_TXHUBADDR_S;
  968. typedef union { /* USB_TxHubPort */
  969. U8 all;
  970. struct {
  971. U8 hubport : 7;
  972. U8 : 1;
  973. } bitc;
  974. } GH_USB_TXHUBPORT_S;
  975. typedef union { /* USB_RxFuncAddr */
  976. U8 all;
  977. struct {
  978. U8 addressoftargetfunction : 7;
  979. U8 : 1;
  980. } bitc;
  981. } GH_USB_RXFUNCADDR_S;
  982. typedef union { /* USB_RxHubAddr */
  983. U8 all;
  984. struct {
  985. U8 hubaddress : 7;
  986. U8 multipletranslators : 1;
  987. } bitc;
  988. } GH_USB_RXHUBADDR_S;
  989. typedef union { /* USB_RxHubPort */
  990. U8 all;
  991. struct {
  992. U8 hubport : 7;
  993. U8 : 1;
  994. } bitc;
  995. } GH_USB_RXHUBPORT_S;
  996. typedef union { /* USB_DMA_INTR */
  997. U8 all;
  998. struct {
  999. U8 ch0 : 1;
  1000. U8 ch1 : 1;
  1001. U8 ch2 : 1;
  1002. U8 ch3 : 1;
  1003. U8 ch4 : 1;
  1004. U8 ch5 : 1;
  1005. U8 ch6 : 1;
  1006. U8 ch7 : 1;
  1007. } bitc;
  1008. } GH_USB_DMA_INTR_S;
  1009. typedef union { /* USB_DMA_CNTL */
  1010. U16 all;
  1011. struct {
  1012. U16 dma_enab : 1;
  1013. U16 dma_dir : 1;
  1014. U16 dmamode : 1;
  1015. U16 dmaie : 1;
  1016. U16 dmaep : 4;
  1017. U16 dma_err : 1;
  1018. U16 dma_brstm : 2;
  1019. U16 : 5;
  1020. } bitc;
  1021. } GH_USB_DMA_CNTL_S;
  1022. typedef union { /* USB_RxDPktBufDis */
  1023. U16 all;
  1024. struct {
  1025. U16 : 1;
  1026. U16 ep1 : 1;
  1027. U16 ep2 : 1;
  1028. U16 ep3 : 1;
  1029. U16 ep4 : 1;
  1030. U16 ep5 : 1;
  1031. U16 ep6 : 1;
  1032. U16 ep7 : 1;
  1033. U16 ep8 : 1;
  1034. U16 ep9 : 1;
  1035. U16 ep10 : 1;
  1036. U16 ep11 : 1;
  1037. U16 ep12 : 1;
  1038. U16 ep13 : 1;
  1039. U16 ep14 : 1;
  1040. U16 ep15 : 1;
  1041. } bitc;
  1042. } GH_USB_RXDPKTBUFDIS_S;
  1043. typedef union { /* USB_TxDPktBufDis */
  1044. U16 all;
  1045. struct {
  1046. U16 : 1;
  1047. U16 ep1 : 1;
  1048. U16 ep2 : 1;
  1049. U16 ep3 : 1;
  1050. U16 ep4 : 1;
  1051. U16 ep5 : 1;
  1052. U16 ep6 : 1;
  1053. U16 ep7 : 1;
  1054. U16 ep8 : 1;
  1055. U16 ep9 : 1;
  1056. U16 ep10 : 1;
  1057. U16 ep11 : 1;
  1058. U16 ep12 : 1;
  1059. U16 ep13 : 1;
  1060. U16 ep14 : 1;
  1061. U16 ep15 : 1;
  1062. } bitc;
  1063. } GH_USB_TXDPKTBUFDIS_S;
  1064. typedef union { /* USB_C_T_HSBT */
  1065. U8 all;
  1066. struct {
  1067. U8 hstimeoutadder : 4;
  1068. U8 : 4;
  1069. } bitc;
  1070. } GH_USB_C_T_HSBT_S;
  1071. typedef union { /* USB_LPM_ATTR */
  1072. U16 all;
  1073. struct {
  1074. U16 linkstate : 4;
  1075. U16 hird : 4;
  1076. U16 rmtwak : 1;
  1077. U16 : 3;
  1078. U16 endpnt : 4;
  1079. } bitc;
  1080. } GH_USB_LPM_ATTR_S;
  1081. typedef union { /* USB_LPM_CNTRL_PERI */
  1082. U8 all;
  1083. struct {
  1084. U8 lpmxmt : 1;
  1085. U8 lpmres : 1;
  1086. U8 lpmen : 2;
  1087. U8 lpmnak : 1;
  1088. U8 : 3;
  1089. } bitc;
  1090. } GH_USB_LPM_CNTRL_PERI_S;
  1091. typedef union { /* USB_LPM_CNTRL_HOST */
  1092. U8 all;
  1093. struct {
  1094. U8 lpmxmt : 1;
  1095. U8 lpmres : 1;
  1096. U8 : 6;
  1097. } bitc;
  1098. } GH_USB_LPM_CNTRL_HOST_S;
  1099. typedef union { /* USB_LPM_INTREN */
  1100. U8 all;
  1101. struct {
  1102. U8 lpmsten : 1;
  1103. U8 lpmnyen : 1;
  1104. U8 lpmacken : 1;
  1105. U8 lpmncen : 1;
  1106. U8 lpmresen : 1;
  1107. U8 lpmerren : 1;
  1108. U8 : 2;
  1109. } bitc;
  1110. } GH_USB_LPM_INTREN_S;
  1111. typedef union { /* USB_LPM_INTR_PERI */
  1112. U8 all;
  1113. struct {
  1114. U8 lpmst : 1;
  1115. U8 lpmny : 1;
  1116. U8 lpmack : 1;
  1117. U8 lpmnc : 1;
  1118. U8 lpmres : 1;
  1119. U8 lpmerr : 1;
  1120. U8 : 2;
  1121. } bitc;
  1122. } GH_USB_LPM_INTR_PERI_S;
  1123. typedef union { /* USB_LPM_INTR_HOST */
  1124. U8 all;
  1125. struct {
  1126. U8 lpmst : 1;
  1127. U8 lpmny : 1;
  1128. U8 lpmack : 1;
  1129. U8 lpmnc : 1;
  1130. U8 lpmres : 1;
  1131. U8 lpmerr : 1;
  1132. U8 : 2;
  1133. } bitc;
  1134. } GH_USB_LPM_INTR_HOST_S;
  1135. typedef union { /* USB_LPM_FADDR_HOST */
  1136. U8 all;
  1137. struct {
  1138. U8 lpmfaddr : 7;
  1139. U8 : 1;
  1140. } bitc;
  1141. } GH_USB_LPM_FADDR_HOST_S;
  1142. /*----------------------------------------------------------------------------*/
  1143. /* mirror variables */
  1144. /*----------------------------------------------------------------------------*/
  1145. extern GH_USB_POWER_W_PERI_S m_usb_power_w_peri;
  1146. extern GH_USB_POWER_W_HOST_S m_usb_power_w_host;
  1147. extern GH_USB_CSR0L_W_PERI_S m_usb_csr0l_w_peri;
  1148. extern GH_USB_CSR0H_W_PERI_S m_usb_csr0h_w_peri;
  1149. extern GH_USB_CSR0L_W_HOST_S m_usb_csr0l_w_host;
  1150. extern GH_USB_CSR0H_W_HOST_S m_usb_csr0h_w_host;
  1151. extern GH_USB_TXCSRL_W_PERI_S m_usb_txcsrl_w_peri;
  1152. extern GH_USB_TXCSRH_W_PERI_S m_usb_txcsrh_w_peri;
  1153. extern GH_USB_TXCSRL_W_HOST_S m_usb_txcsrl_w_host;
  1154. extern GH_USB_TXCSRH_W_HOST_S m_usb_txcsrh_w_host;
  1155. extern GH_USB_RXCSRL_W_PERI_S m_usb_rxcsrl_w_peri;
  1156. extern GH_USB_RXCSRH_W_PERI_S m_usb_rxcsrh_w_peri;
  1157. extern GH_USB_RXCSRL_W_HOST_S m_usb_rxcsrl_w_host;
  1158. extern GH_USB_RXCSRH_W_HOST_S m_usb_rxcsrh_w_host;
  1159. extern GH_USB_DEVCTL_W_S m_usb_devctl_w;
  1160. extern U32 m_usb_vcontrol;
  1161. #ifdef __cplusplus
  1162. extern "C" {
  1163. #endif
  1164. /*----------------------------------------------------------------------------*/
  1165. /* register USB_FAddr (read/write) */
  1166. /*----------------------------------------------------------------------------*/
  1167. #if GH_INLINE_LEVEL == 0
  1168. /*! \brief Writes the register 'USB_FAddr'. */
  1169. void GH_USB_set_FAddr(U8 data);
  1170. /*! \brief Reads the register 'USB_FAddr'. */
  1171. U8 GH_USB_get_FAddr(void);
  1172. /*! \brief Writes the bit group 'FuncAddr' of register 'USB_FAddr'. */
  1173. void GH_USB_set_FAddr_FuncAddr(U8 data);
  1174. /*! \brief Reads the bit group 'FuncAddr' of register 'USB_FAddr'. */
  1175. U8 GH_USB_get_FAddr_FuncAddr(void);
  1176. #else /* GH_INLINE_LEVEL == 0 */
  1177. GH_INLINE void GH_USB_set_FAddr(U8 data)
  1178. {
  1179. *(volatile U8 *)REG_USB_FADDR = data;
  1180. #if GH_USB_ENABLE_DEBUG_PRINT
  1181. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FAddr] <-- 0x%08x\n",
  1182. REG_USB_FADDR,data,data);
  1183. #endif
  1184. }
  1185. GH_INLINE U8 GH_USB_get_FAddr(void)
  1186. {
  1187. U8 value = (*(volatile U8 *)REG_USB_FADDR);
  1188. #if GH_USB_ENABLE_DEBUG_PRINT
  1189. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FAddr] --> 0x%08x\n",
  1190. REG_USB_FADDR,value);
  1191. #endif
  1192. return value;
  1193. }
  1194. GH_INLINE void GH_USB_set_FAddr_FuncAddr(U8 data)
  1195. {
  1196. GH_USB_FADDR_S d;
  1197. d.all = *(volatile U8 *)REG_USB_FADDR;
  1198. d.bitc.funcaddr = data;
  1199. *(volatile U8 *)REG_USB_FADDR = d.all;
  1200. #if GH_USB_ENABLE_DEBUG_PRINT
  1201. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FAddr_FuncAddr] <-- 0x%08x\n",
  1202. REG_USB_FADDR,d.all,d.all);
  1203. #endif
  1204. }
  1205. GH_INLINE U8 GH_USB_get_FAddr_FuncAddr(void)
  1206. {
  1207. GH_USB_FADDR_S tmp_value;
  1208. U8 value = (*(volatile U8 *)REG_USB_FADDR);
  1209. tmp_value.all = value;
  1210. #if GH_USB_ENABLE_DEBUG_PRINT
  1211. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FAddr_FuncAddr] --> 0x%08x\n",
  1212. REG_USB_FADDR,value);
  1213. #endif
  1214. return tmp_value.bitc.funcaddr;
  1215. }
  1216. #endif /* GH_INLINE_LEVEL == 0 */
  1217. /*----------------------------------------------------------------------------*/
  1218. /* register USB_Power_R_PERI (read) */
  1219. /*----------------------------------------------------------------------------*/
  1220. #if GH_INLINE_LEVEL == 0
  1221. /*! \brief Reads the register 'USB_Power_R_PERI'. */
  1222. U8 GH_USB_get_Power_R_PERI(void);
  1223. /*! \brief Reads the bit group 'Enable_SuspendM' of register 'USB_Power_R_PERI'. */
  1224. U8 GH_USB_get_Power_R_PERI_Enable_SuspendM(void);
  1225. /*! \brief Reads the bit group 'Suspend_Mode' of register 'USB_Power_R_PERI'. */
  1226. U8 GH_USB_get_Power_R_PERI_Suspend_Mode(void);
  1227. /*! \brief Reads the bit group 'Resume' of register 'USB_Power_R_PERI'. */
  1228. U8 GH_USB_get_Power_R_PERI_Resume(void);
  1229. /*! \brief Reads the bit group 'Reset' of register 'USB_Power_R_PERI'. */
  1230. U8 GH_USB_get_Power_R_PERI_Reset(void);
  1231. /*! \brief Reads the bit group 'HS_Mode' of register 'USB_Power_R_PERI'. */
  1232. U8 GH_USB_get_Power_R_PERI_HS_Mode(void);
  1233. /*! \brief Reads the bit group 'HS_Enab' of register 'USB_Power_R_PERI'. */
  1234. U8 GH_USB_get_Power_R_PERI_HS_Enab(void);
  1235. /*! \brief Reads the bit group 'Soft_Conn' of register 'USB_Power_R_PERI'. */
  1236. U8 GH_USB_get_Power_R_PERI_Soft_Conn(void);
  1237. /*! \brief Reads the bit group 'ISO_Update' of register 'USB_Power_R_PERI'. */
  1238. U8 GH_USB_get_Power_R_PERI_ISO_Update(void);
  1239. #else /* GH_INLINE_LEVEL == 0 */
  1240. GH_INLINE U8 GH_USB_get_Power_R_PERI(void)
  1241. {
  1242. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1243. #if GH_USB_ENABLE_DEBUG_PRINT
  1244. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI] --> 0x%08x\n",
  1245. REG_USB_POWER_R_PERI,value);
  1246. #endif
  1247. return value;
  1248. }
  1249. GH_INLINE U8 GH_USB_get_Power_R_PERI_Enable_SuspendM(void)
  1250. {
  1251. GH_USB_POWER_R_PERI_S tmp_value;
  1252. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1253. tmp_value.all = value;
  1254. #if GH_USB_ENABLE_DEBUG_PRINT
  1255. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Enable_SuspendM] --> 0x%08x\n",
  1256. REG_USB_POWER_R_PERI,value);
  1257. #endif
  1258. return tmp_value.bitc.enable_suspendm;
  1259. }
  1260. GH_INLINE U8 GH_USB_get_Power_R_PERI_Suspend_Mode(void)
  1261. {
  1262. GH_USB_POWER_R_PERI_S tmp_value;
  1263. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1264. tmp_value.all = value;
  1265. #if GH_USB_ENABLE_DEBUG_PRINT
  1266. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Suspend_Mode] --> 0x%08x\n",
  1267. REG_USB_POWER_R_PERI,value);
  1268. #endif
  1269. return tmp_value.bitc.suspend_mode;
  1270. }
  1271. GH_INLINE U8 GH_USB_get_Power_R_PERI_Resume(void)
  1272. {
  1273. GH_USB_POWER_R_PERI_S tmp_value;
  1274. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1275. tmp_value.all = value;
  1276. #if GH_USB_ENABLE_DEBUG_PRINT
  1277. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Resume] --> 0x%08x\n",
  1278. REG_USB_POWER_R_PERI,value);
  1279. #endif
  1280. return tmp_value.bitc.resume;
  1281. }
  1282. GH_INLINE U8 GH_USB_get_Power_R_PERI_Reset(void)
  1283. {
  1284. GH_USB_POWER_R_PERI_S tmp_value;
  1285. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1286. tmp_value.all = value;
  1287. #if GH_USB_ENABLE_DEBUG_PRINT
  1288. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Reset] --> 0x%08x\n",
  1289. REG_USB_POWER_R_PERI,value);
  1290. #endif
  1291. return tmp_value.bitc.reset;
  1292. }
  1293. GH_INLINE U8 GH_USB_get_Power_R_PERI_HS_Mode(void)
  1294. {
  1295. GH_USB_POWER_R_PERI_S tmp_value;
  1296. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1297. tmp_value.all = value;
  1298. #if GH_USB_ENABLE_DEBUG_PRINT
  1299. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_HS_Mode] --> 0x%08x\n",
  1300. REG_USB_POWER_R_PERI,value);
  1301. #endif
  1302. return tmp_value.bitc.hs_mode;
  1303. }
  1304. GH_INLINE U8 GH_USB_get_Power_R_PERI_HS_Enab(void)
  1305. {
  1306. GH_USB_POWER_R_PERI_S tmp_value;
  1307. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1308. tmp_value.all = value;
  1309. #if GH_USB_ENABLE_DEBUG_PRINT
  1310. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_HS_Enab] --> 0x%08x\n",
  1311. REG_USB_POWER_R_PERI,value);
  1312. #endif
  1313. return tmp_value.bitc.hs_enab;
  1314. }
  1315. GH_INLINE U8 GH_USB_get_Power_R_PERI_Soft_Conn(void)
  1316. {
  1317. GH_USB_POWER_R_PERI_S tmp_value;
  1318. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1319. tmp_value.all = value;
  1320. #if GH_USB_ENABLE_DEBUG_PRINT
  1321. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_Soft_Conn] --> 0x%08x\n",
  1322. REG_USB_POWER_R_PERI,value);
  1323. #endif
  1324. return tmp_value.bitc.soft_conn;
  1325. }
  1326. GH_INLINE U8 GH_USB_get_Power_R_PERI_ISO_Update(void)
  1327. {
  1328. GH_USB_POWER_R_PERI_S tmp_value;
  1329. U8 value = (*(volatile U8 *)REG_USB_POWER_R_PERI);
  1330. tmp_value.all = value;
  1331. #if GH_USB_ENABLE_DEBUG_PRINT
  1332. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_PERI_ISO_Update] --> 0x%08x\n",
  1333. REG_USB_POWER_R_PERI,value);
  1334. #endif
  1335. return tmp_value.bitc.iso_update;
  1336. }
  1337. #endif /* GH_INLINE_LEVEL == 0 */
  1338. /*----------------------------------------------------------------------------*/
  1339. /* register USB_Power_W_PERI (write) */
  1340. /*----------------------------------------------------------------------------*/
  1341. #if GH_INLINE_LEVEL < 2
  1342. /*! \brief Writes the register 'USB_Power_W_PERI'. */
  1343. void GH_USB_set_Power_W_PERI(U8 data);
  1344. /*! \brief Reads the mirror variable of the register 'USB_Power_W_PERI'. */
  1345. U8 GH_USB_getm_Power_W_PERI(void);
  1346. /*! \brief Writes the bit group 'Enable_SuspendM' of register 'USB_Power_W_PERI'. */
  1347. void GH_USB_set_Power_W_PERI_Enable_SuspendM(U8 data);
  1348. /*! \brief Reads the bit group 'Enable_SuspendM' from the mirror variable of register 'USB_Power_W_PERI'. */
  1349. U8 GH_USB_getm_Power_W_PERI_Enable_SuspendM(void);
  1350. /*! \brief Writes the bit group 'Resume' of register 'USB_Power_W_PERI'. */
  1351. void GH_USB_set_Power_W_PERI_Resume(U8 data);
  1352. /*! \brief Reads the bit group 'Resume' from the mirror variable of register 'USB_Power_W_PERI'. */
  1353. U8 GH_USB_getm_Power_W_PERI_Resume(void);
  1354. /*! \brief Writes the bit group 'HS_Enab' of register 'USB_Power_W_PERI'. */
  1355. void GH_USB_set_Power_W_PERI_HS_Enab(U8 data);
  1356. /*! \brief Reads the bit group 'HS_Enab' from the mirror variable of register 'USB_Power_W_PERI'. */
  1357. U8 GH_USB_getm_Power_W_PERI_HS_Enab(void);
  1358. /*! \brief Writes the bit group 'Soft_Conn' of register 'USB_Power_W_PERI'. */
  1359. void GH_USB_set_Power_W_PERI_Soft_Conn(U8 data);
  1360. /*! \brief Reads the bit group 'Soft_Conn' from the mirror variable of register 'USB_Power_W_PERI'. */
  1361. U8 GH_USB_getm_Power_W_PERI_Soft_Conn(void);
  1362. /*! \brief Writes the bit group 'ISO_Update' of register 'USB_Power_W_PERI'. */
  1363. void GH_USB_set_Power_W_PERI_ISO_Update(U8 data);
  1364. /*! \brief Reads the bit group 'ISO_Update' from the mirror variable of register 'USB_Power_W_PERI'. */
  1365. U8 GH_USB_getm_Power_W_PERI_ISO_Update(void);
  1366. #else /* GH_INLINE_LEVEL < 2 */
  1367. GH_INLINE void GH_USB_set_Power_W_PERI(U8 data)
  1368. {
  1369. m_usb_power_w_peri.all = data;
  1370. *(volatile U8 *)REG_USB_POWER_W_PERI = data;
  1371. #if GH_USB_ENABLE_DEBUG_PRINT
  1372. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI] <-- 0x%08x\n",
  1373. REG_USB_POWER_W_PERI,data,data);
  1374. #endif
  1375. }
  1376. GH_INLINE U8 GH_USB_getm_Power_W_PERI(void)
  1377. {
  1378. #if GH_USB_ENABLE_DEBUG_PRINT
  1379. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI] --> 0x%08x\n",
  1380. m_usb_power_w_peri.all);
  1381. #endif
  1382. return m_usb_power_w_peri.all;
  1383. }
  1384. GH_INLINE void GH_USB_set_Power_W_PERI_Enable_SuspendM(U8 data)
  1385. {
  1386. m_usb_power_w_peri.bitc.enable_suspendm = data;
  1387. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1388. #if GH_USB_ENABLE_DEBUG_PRINT
  1389. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_Enable_SuspendM] <-- 0x%08x\n",
  1390. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1391. #endif
  1392. }
  1393. GH_INLINE U8 GH_USB_getm_Power_W_PERI_Enable_SuspendM(void)
  1394. {
  1395. #if GH_USB_ENABLE_DEBUG_PRINT
  1396. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_Enable_SuspendM] --> 0x%08x\n",
  1397. m_usb_power_w_peri.bitc.enable_suspendm);
  1398. #endif
  1399. return m_usb_power_w_peri.bitc.enable_suspendm;
  1400. }
  1401. GH_INLINE void GH_USB_set_Power_W_PERI_Resume(U8 data)
  1402. {
  1403. m_usb_power_w_peri.bitc.resume = data;
  1404. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1405. #if GH_USB_ENABLE_DEBUG_PRINT
  1406. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_Resume] <-- 0x%08x\n",
  1407. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1408. #endif
  1409. }
  1410. GH_INLINE U8 GH_USB_getm_Power_W_PERI_Resume(void)
  1411. {
  1412. #if GH_USB_ENABLE_DEBUG_PRINT
  1413. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_Resume] --> 0x%08x\n",
  1414. m_usb_power_w_peri.bitc.resume);
  1415. #endif
  1416. return m_usb_power_w_peri.bitc.resume;
  1417. }
  1418. GH_INLINE void GH_USB_set_Power_W_PERI_HS_Enab(U8 data)
  1419. {
  1420. m_usb_power_w_peri.bitc.hs_enab = data;
  1421. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1422. #if GH_USB_ENABLE_DEBUG_PRINT
  1423. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_HS_Enab] <-- 0x%08x\n",
  1424. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1425. #endif
  1426. }
  1427. GH_INLINE U8 GH_USB_getm_Power_W_PERI_HS_Enab(void)
  1428. {
  1429. #if GH_USB_ENABLE_DEBUG_PRINT
  1430. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_HS_Enab] --> 0x%08x\n",
  1431. m_usb_power_w_peri.bitc.hs_enab);
  1432. #endif
  1433. return m_usb_power_w_peri.bitc.hs_enab;
  1434. }
  1435. GH_INLINE void GH_USB_set_Power_W_PERI_Soft_Conn(U8 data)
  1436. {
  1437. m_usb_power_w_peri.bitc.soft_conn = data;
  1438. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1439. #if GH_USB_ENABLE_DEBUG_PRINT
  1440. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_Soft_Conn] <-- 0x%08x\n",
  1441. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1442. #endif
  1443. }
  1444. GH_INLINE U8 GH_USB_getm_Power_W_PERI_Soft_Conn(void)
  1445. {
  1446. #if GH_USB_ENABLE_DEBUG_PRINT
  1447. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_Soft_Conn] --> 0x%08x\n",
  1448. m_usb_power_w_peri.bitc.soft_conn);
  1449. #endif
  1450. return m_usb_power_w_peri.bitc.soft_conn;
  1451. }
  1452. GH_INLINE void GH_USB_set_Power_W_PERI_ISO_Update(U8 data)
  1453. {
  1454. m_usb_power_w_peri.bitc.iso_update = data;
  1455. *(volatile U8 *)REG_USB_POWER_W_PERI = m_usb_power_w_peri.all;
  1456. #if GH_USB_ENABLE_DEBUG_PRINT
  1457. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_PERI_ISO_Update] <-- 0x%08x\n",
  1458. REG_USB_POWER_W_PERI,m_usb_power_w_peri.all,m_usb_power_w_peri.all);
  1459. #endif
  1460. }
  1461. GH_INLINE U8 GH_USB_getm_Power_W_PERI_ISO_Update(void)
  1462. {
  1463. #if GH_USB_ENABLE_DEBUG_PRINT
  1464. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_PERI_ISO_Update] --> 0x%08x\n",
  1465. m_usb_power_w_peri.bitc.iso_update);
  1466. #endif
  1467. return m_usb_power_w_peri.bitc.iso_update;
  1468. }
  1469. #endif /* GH_INLINE_LEVEL < 2 */
  1470. /*----------------------------------------------------------------------------*/
  1471. /* register USB_Power_R_HOST (read) */
  1472. /*----------------------------------------------------------------------------*/
  1473. #if GH_INLINE_LEVEL == 0
  1474. /*! \brief Reads the register 'USB_Power_R_HOST'. */
  1475. U8 GH_USB_get_Power_R_HOST(void);
  1476. /*! \brief Reads the bit group 'Enable_SuspendM' of register 'USB_Power_R_HOST'. */
  1477. U8 GH_USB_get_Power_R_HOST_Enable_SuspendM(void);
  1478. /*! \brief Reads the bit group 'Resume' of register 'USB_Power_R_HOST'. */
  1479. U8 GH_USB_get_Power_R_HOST_Resume(void);
  1480. /*! \brief Reads the bit group 'Reset' of register 'USB_Power_R_HOST'. */
  1481. U8 GH_USB_get_Power_R_HOST_Reset(void);
  1482. /*! \brief Reads the bit group 'HS_Mode' of register 'USB_Power_R_HOST'. */
  1483. U8 GH_USB_get_Power_R_HOST_HS_Mode(void);
  1484. /*! \brief Reads the bit group 'HS_Enab' of register 'USB_Power_R_HOST'. */
  1485. U8 GH_USB_get_Power_R_HOST_HS_Enab(void);
  1486. #else /* GH_INLINE_LEVEL == 0 */
  1487. GH_INLINE U8 GH_USB_get_Power_R_HOST(void)
  1488. {
  1489. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1490. #if GH_USB_ENABLE_DEBUG_PRINT
  1491. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST] --> 0x%08x\n",
  1492. REG_USB_POWER_R_HOST,value);
  1493. #endif
  1494. return value;
  1495. }
  1496. GH_INLINE U8 GH_USB_get_Power_R_HOST_Enable_SuspendM(void)
  1497. {
  1498. GH_USB_POWER_R_HOST_S tmp_value;
  1499. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1500. tmp_value.all = value;
  1501. #if GH_USB_ENABLE_DEBUG_PRINT
  1502. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_Enable_SuspendM] --> 0x%08x\n",
  1503. REG_USB_POWER_R_HOST,value);
  1504. #endif
  1505. return tmp_value.bitc.enable_suspendm;
  1506. }
  1507. GH_INLINE U8 GH_USB_get_Power_R_HOST_Resume(void)
  1508. {
  1509. GH_USB_POWER_R_HOST_S tmp_value;
  1510. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1511. tmp_value.all = value;
  1512. #if GH_USB_ENABLE_DEBUG_PRINT
  1513. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_Resume] --> 0x%08x\n",
  1514. REG_USB_POWER_R_HOST,value);
  1515. #endif
  1516. return tmp_value.bitc.resume;
  1517. }
  1518. GH_INLINE U8 GH_USB_get_Power_R_HOST_Reset(void)
  1519. {
  1520. GH_USB_POWER_R_HOST_S tmp_value;
  1521. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1522. tmp_value.all = value;
  1523. #if GH_USB_ENABLE_DEBUG_PRINT
  1524. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_Reset] --> 0x%08x\n",
  1525. REG_USB_POWER_R_HOST,value);
  1526. #endif
  1527. return tmp_value.bitc.reset;
  1528. }
  1529. GH_INLINE U8 GH_USB_get_Power_R_HOST_HS_Mode(void)
  1530. {
  1531. GH_USB_POWER_R_HOST_S tmp_value;
  1532. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1533. tmp_value.all = value;
  1534. #if GH_USB_ENABLE_DEBUG_PRINT
  1535. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_HS_Mode] --> 0x%08x\n",
  1536. REG_USB_POWER_R_HOST,value);
  1537. #endif
  1538. return tmp_value.bitc.hs_mode;
  1539. }
  1540. GH_INLINE U8 GH_USB_get_Power_R_HOST_HS_Enab(void)
  1541. {
  1542. GH_USB_POWER_R_HOST_S tmp_value;
  1543. U8 value = (*(volatile U8 *)REG_USB_POWER_R_HOST);
  1544. tmp_value.all = value;
  1545. #if GH_USB_ENABLE_DEBUG_PRINT
  1546. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Power_R_HOST_HS_Enab] --> 0x%08x\n",
  1547. REG_USB_POWER_R_HOST,value);
  1548. #endif
  1549. return tmp_value.bitc.hs_enab;
  1550. }
  1551. #endif /* GH_INLINE_LEVEL == 0 */
  1552. /*----------------------------------------------------------------------------*/
  1553. /* register USB_Power_W_HOST (write) */
  1554. /*----------------------------------------------------------------------------*/
  1555. #if GH_INLINE_LEVEL < 2
  1556. /*! \brief Writes the register 'USB_Power_W_HOST'. */
  1557. void GH_USB_set_Power_W_HOST(U8 data);
  1558. /*! \brief Reads the mirror variable of the register 'USB_Power_W_HOST'. */
  1559. U8 GH_USB_getm_Power_W_HOST(void);
  1560. /*! \brief Writes the bit group 'Enable_SuspendM' of register 'USB_Power_W_HOST'. */
  1561. void GH_USB_set_Power_W_HOST_Enable_SuspendM(U8 data);
  1562. /*! \brief Reads the bit group 'Enable_SuspendM' from the mirror variable of register 'USB_Power_W_HOST'. */
  1563. U8 GH_USB_getm_Power_W_HOST_Enable_SuspendM(void);
  1564. /*! \brief Writes the bit group 'Suspend_Mode' of register 'USB_Power_W_HOST'. */
  1565. void GH_USB_set_Power_W_HOST_Suspend_Mode(U8 data);
  1566. /*! \brief Reads the bit group 'Suspend_Mode' from the mirror variable of register 'USB_Power_W_HOST'. */
  1567. U8 GH_USB_getm_Power_W_HOST_Suspend_Mode(void);
  1568. /*! \brief Writes the bit group 'Resume' of register 'USB_Power_W_HOST'. */
  1569. void GH_USB_set_Power_W_HOST_Resume(U8 data);
  1570. /*! \brief Reads the bit group 'Resume' from the mirror variable of register 'USB_Power_W_HOST'. */
  1571. U8 GH_USB_getm_Power_W_HOST_Resume(void);
  1572. /*! \brief Writes the bit group 'Reset' of register 'USB_Power_W_HOST'. */
  1573. void GH_USB_set_Power_W_HOST_Reset(U8 data);
  1574. /*! \brief Reads the bit group 'Reset' from the mirror variable of register 'USB_Power_W_HOST'. */
  1575. U8 GH_USB_getm_Power_W_HOST_Reset(void);
  1576. /*! \brief Writes the bit group 'HS_Enab' of register 'USB_Power_W_HOST'. */
  1577. void GH_USB_set_Power_W_HOST_HS_Enab(U8 data);
  1578. /*! \brief Reads the bit group 'HS_Enab' from the mirror variable of register 'USB_Power_W_HOST'. */
  1579. U8 GH_USB_getm_Power_W_HOST_HS_Enab(void);
  1580. #else /* GH_INLINE_LEVEL < 2 */
  1581. GH_INLINE void GH_USB_set_Power_W_HOST(U8 data)
  1582. {
  1583. m_usb_power_w_host.all = data;
  1584. *(volatile U8 *)REG_USB_POWER_W_HOST = data;
  1585. #if GH_USB_ENABLE_DEBUG_PRINT
  1586. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST] <-- 0x%08x\n",
  1587. REG_USB_POWER_W_HOST,data,data);
  1588. #endif
  1589. }
  1590. GH_INLINE U8 GH_USB_getm_Power_W_HOST(void)
  1591. {
  1592. #if GH_USB_ENABLE_DEBUG_PRINT
  1593. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST] --> 0x%08x\n",
  1594. m_usb_power_w_host.all);
  1595. #endif
  1596. return m_usb_power_w_host.all;
  1597. }
  1598. GH_INLINE void GH_USB_set_Power_W_HOST_Enable_SuspendM(U8 data)
  1599. {
  1600. m_usb_power_w_host.bitc.enable_suspendm = data;
  1601. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1602. #if GH_USB_ENABLE_DEBUG_PRINT
  1603. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Enable_SuspendM] <-- 0x%08x\n",
  1604. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1605. #endif
  1606. }
  1607. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Enable_SuspendM(void)
  1608. {
  1609. #if GH_USB_ENABLE_DEBUG_PRINT
  1610. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Enable_SuspendM] --> 0x%08x\n",
  1611. m_usb_power_w_host.bitc.enable_suspendm);
  1612. #endif
  1613. return m_usb_power_w_host.bitc.enable_suspendm;
  1614. }
  1615. GH_INLINE void GH_USB_set_Power_W_HOST_Suspend_Mode(U8 data)
  1616. {
  1617. m_usb_power_w_host.bitc.suspend_mode = data;
  1618. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1619. #if GH_USB_ENABLE_DEBUG_PRINT
  1620. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Suspend_Mode] <-- 0x%08x\n",
  1621. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1622. #endif
  1623. }
  1624. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Suspend_Mode(void)
  1625. {
  1626. #if GH_USB_ENABLE_DEBUG_PRINT
  1627. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Suspend_Mode] --> 0x%08x\n",
  1628. m_usb_power_w_host.bitc.suspend_mode);
  1629. #endif
  1630. return m_usb_power_w_host.bitc.suspend_mode;
  1631. }
  1632. GH_INLINE void GH_USB_set_Power_W_HOST_Resume(U8 data)
  1633. {
  1634. m_usb_power_w_host.bitc.resume = data;
  1635. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1636. #if GH_USB_ENABLE_DEBUG_PRINT
  1637. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Resume] <-- 0x%08x\n",
  1638. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1639. #endif
  1640. }
  1641. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Resume(void)
  1642. {
  1643. #if GH_USB_ENABLE_DEBUG_PRINT
  1644. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Resume] --> 0x%08x\n",
  1645. m_usb_power_w_host.bitc.resume);
  1646. #endif
  1647. return m_usb_power_w_host.bitc.resume;
  1648. }
  1649. GH_INLINE void GH_USB_set_Power_W_HOST_Reset(U8 data)
  1650. {
  1651. m_usb_power_w_host.bitc.reset = data;
  1652. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1653. #if GH_USB_ENABLE_DEBUG_PRINT
  1654. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_Reset] <-- 0x%08x\n",
  1655. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1656. #endif
  1657. }
  1658. GH_INLINE U8 GH_USB_getm_Power_W_HOST_Reset(void)
  1659. {
  1660. #if GH_USB_ENABLE_DEBUG_PRINT
  1661. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_Reset] --> 0x%08x\n",
  1662. m_usb_power_w_host.bitc.reset);
  1663. #endif
  1664. return m_usb_power_w_host.bitc.reset;
  1665. }
  1666. GH_INLINE void GH_USB_set_Power_W_HOST_HS_Enab(U8 data)
  1667. {
  1668. m_usb_power_w_host.bitc.hs_enab = data;
  1669. *(volatile U8 *)REG_USB_POWER_W_HOST = m_usb_power_w_host.all;
  1670. #if GH_USB_ENABLE_DEBUG_PRINT
  1671. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Power_W_HOST_HS_Enab] <-- 0x%08x\n",
  1672. REG_USB_POWER_W_HOST,m_usb_power_w_host.all,m_usb_power_w_host.all);
  1673. #endif
  1674. }
  1675. GH_INLINE U8 GH_USB_getm_Power_W_HOST_HS_Enab(void)
  1676. {
  1677. #if GH_USB_ENABLE_DEBUG_PRINT
  1678. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_Power_W_HOST_HS_Enab] --> 0x%08x\n",
  1679. m_usb_power_w_host.bitc.hs_enab);
  1680. #endif
  1681. return m_usb_power_w_host.bitc.hs_enab;
  1682. }
  1683. #endif /* GH_INLINE_LEVEL < 2 */
  1684. /*----------------------------------------------------------------------------*/
  1685. /* register USB_IntrTx (read) */
  1686. /*----------------------------------------------------------------------------*/
  1687. #if GH_INLINE_LEVEL == 0
  1688. /*! \brief Reads the register 'USB_IntrTx'. */
  1689. U16 GH_USB_get_IntrTx(void);
  1690. /*! \brief Reads the bit group 'EP0' of register 'USB_IntrTx'. */
  1691. U8 GH_USB_get_IntrTx_EP0(void);
  1692. /*! \brief Reads the bit group 'EP1Tx' of register 'USB_IntrTx'. */
  1693. U8 GH_USB_get_IntrTx_EP1Tx(void);
  1694. /*! \brief Reads the bit group 'EP2Tx' of register 'USB_IntrTx'. */
  1695. U8 GH_USB_get_IntrTx_EP2Tx(void);
  1696. /*! \brief Reads the bit group 'EP3Tx' of register 'USB_IntrTx'. */
  1697. U8 GH_USB_get_IntrTx_EP3Tx(void);
  1698. /*! \brief Reads the bit group 'EP4Tx' of register 'USB_IntrTx'. */
  1699. U8 GH_USB_get_IntrTx_EP4Tx(void);
  1700. /*! \brief Reads the bit group 'EP5Tx' of register 'USB_IntrTx'. */
  1701. U8 GH_USB_get_IntrTx_EP5Tx(void);
  1702. /*! \brief Reads the bit group 'EP6Tx' of register 'USB_IntrTx'. */
  1703. U8 GH_USB_get_IntrTx_EP6Tx(void);
  1704. /*! \brief Reads the bit group 'EP7Tx' of register 'USB_IntrTx'. */
  1705. U8 GH_USB_get_IntrTx_EP7Tx(void);
  1706. /*! \brief Reads the bit group 'EP8Tx' of register 'USB_IntrTx'. */
  1707. U8 GH_USB_get_IntrTx_EP8Tx(void);
  1708. /*! \brief Reads the bit group 'EP9Tx' of register 'USB_IntrTx'. */
  1709. U8 GH_USB_get_IntrTx_EP9Tx(void);
  1710. /*! \brief Reads the bit group 'EP10Tx' of register 'USB_IntrTx'. */
  1711. U8 GH_USB_get_IntrTx_EP10Tx(void);
  1712. /*! \brief Reads the bit group 'EP11Tx' of register 'USB_IntrTx'. */
  1713. U8 GH_USB_get_IntrTx_EP11Tx(void);
  1714. /*! \brief Reads the bit group 'EP12Tx' of register 'USB_IntrTx'. */
  1715. U8 GH_USB_get_IntrTx_EP12Tx(void);
  1716. /*! \brief Reads the bit group 'EP13Tx' of register 'USB_IntrTx'. */
  1717. U8 GH_USB_get_IntrTx_EP13Tx(void);
  1718. /*! \brief Reads the bit group 'EP14Tx' of register 'USB_IntrTx'. */
  1719. U8 GH_USB_get_IntrTx_EP14Tx(void);
  1720. /*! \brief Reads the bit group 'EP15Tx' of register 'USB_IntrTx'. */
  1721. U8 GH_USB_get_IntrTx_EP15Tx(void);
  1722. #else /* GH_INLINE_LEVEL == 0 */
  1723. GH_INLINE U16 GH_USB_get_IntrTx(void)
  1724. {
  1725. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1726. #if GH_USB_ENABLE_DEBUG_PRINT
  1727. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx] --> 0x%08x\n",
  1728. REG_USB_INTRTX,value);
  1729. #endif
  1730. return value;
  1731. }
  1732. GH_INLINE U8 GH_USB_get_IntrTx_EP0(void)
  1733. {
  1734. GH_USB_INTRTX_S tmp_value;
  1735. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1736. tmp_value.all = value;
  1737. #if GH_USB_ENABLE_DEBUG_PRINT
  1738. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP0] --> 0x%08x\n",
  1739. REG_USB_INTRTX,value);
  1740. #endif
  1741. return tmp_value.bitc.ep0;
  1742. }
  1743. GH_INLINE U8 GH_USB_get_IntrTx_EP1Tx(void)
  1744. {
  1745. GH_USB_INTRTX_S tmp_value;
  1746. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1747. tmp_value.all = value;
  1748. #if GH_USB_ENABLE_DEBUG_PRINT
  1749. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP1Tx] --> 0x%08x\n",
  1750. REG_USB_INTRTX,value);
  1751. #endif
  1752. return tmp_value.bitc.ep1tx;
  1753. }
  1754. GH_INLINE U8 GH_USB_get_IntrTx_EP2Tx(void)
  1755. {
  1756. GH_USB_INTRTX_S tmp_value;
  1757. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1758. tmp_value.all = value;
  1759. #if GH_USB_ENABLE_DEBUG_PRINT
  1760. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP2Tx] --> 0x%08x\n",
  1761. REG_USB_INTRTX,value);
  1762. #endif
  1763. return tmp_value.bitc.ep2tx;
  1764. }
  1765. GH_INLINE U8 GH_USB_get_IntrTx_EP3Tx(void)
  1766. {
  1767. GH_USB_INTRTX_S tmp_value;
  1768. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1769. tmp_value.all = value;
  1770. #if GH_USB_ENABLE_DEBUG_PRINT
  1771. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP3Tx] --> 0x%08x\n",
  1772. REG_USB_INTRTX,value);
  1773. #endif
  1774. return tmp_value.bitc.ep3tx;
  1775. }
  1776. GH_INLINE U8 GH_USB_get_IntrTx_EP4Tx(void)
  1777. {
  1778. GH_USB_INTRTX_S tmp_value;
  1779. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1780. tmp_value.all = value;
  1781. #if GH_USB_ENABLE_DEBUG_PRINT
  1782. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP4Tx] --> 0x%08x\n",
  1783. REG_USB_INTRTX,value);
  1784. #endif
  1785. return tmp_value.bitc.ep4tx;
  1786. }
  1787. GH_INLINE U8 GH_USB_get_IntrTx_EP5Tx(void)
  1788. {
  1789. GH_USB_INTRTX_S tmp_value;
  1790. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1791. tmp_value.all = value;
  1792. #if GH_USB_ENABLE_DEBUG_PRINT
  1793. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP5Tx] --> 0x%08x\n",
  1794. REG_USB_INTRTX,value);
  1795. #endif
  1796. return tmp_value.bitc.ep5tx;
  1797. }
  1798. GH_INLINE U8 GH_USB_get_IntrTx_EP6Tx(void)
  1799. {
  1800. GH_USB_INTRTX_S tmp_value;
  1801. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1802. tmp_value.all = value;
  1803. #if GH_USB_ENABLE_DEBUG_PRINT
  1804. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP6Tx] --> 0x%08x\n",
  1805. REG_USB_INTRTX,value);
  1806. #endif
  1807. return tmp_value.bitc.ep6tx;
  1808. }
  1809. GH_INLINE U8 GH_USB_get_IntrTx_EP7Tx(void)
  1810. {
  1811. GH_USB_INTRTX_S tmp_value;
  1812. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1813. tmp_value.all = value;
  1814. #if GH_USB_ENABLE_DEBUG_PRINT
  1815. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP7Tx] --> 0x%08x\n",
  1816. REG_USB_INTRTX,value);
  1817. #endif
  1818. return tmp_value.bitc.ep7tx;
  1819. }
  1820. GH_INLINE U8 GH_USB_get_IntrTx_EP8Tx(void)
  1821. {
  1822. GH_USB_INTRTX_S tmp_value;
  1823. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1824. tmp_value.all = value;
  1825. #if GH_USB_ENABLE_DEBUG_PRINT
  1826. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP8Tx] --> 0x%08x\n",
  1827. REG_USB_INTRTX,value);
  1828. #endif
  1829. return tmp_value.bitc.ep8tx;
  1830. }
  1831. GH_INLINE U8 GH_USB_get_IntrTx_EP9Tx(void)
  1832. {
  1833. GH_USB_INTRTX_S tmp_value;
  1834. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1835. tmp_value.all = value;
  1836. #if GH_USB_ENABLE_DEBUG_PRINT
  1837. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP9Tx] --> 0x%08x\n",
  1838. REG_USB_INTRTX,value);
  1839. #endif
  1840. return tmp_value.bitc.ep9tx;
  1841. }
  1842. GH_INLINE U8 GH_USB_get_IntrTx_EP10Tx(void)
  1843. {
  1844. GH_USB_INTRTX_S tmp_value;
  1845. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1846. tmp_value.all = value;
  1847. #if GH_USB_ENABLE_DEBUG_PRINT
  1848. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP10Tx] --> 0x%08x\n",
  1849. REG_USB_INTRTX,value);
  1850. #endif
  1851. return tmp_value.bitc.ep10tx;
  1852. }
  1853. GH_INLINE U8 GH_USB_get_IntrTx_EP11Tx(void)
  1854. {
  1855. GH_USB_INTRTX_S tmp_value;
  1856. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1857. tmp_value.all = value;
  1858. #if GH_USB_ENABLE_DEBUG_PRINT
  1859. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP11Tx] --> 0x%08x\n",
  1860. REG_USB_INTRTX,value);
  1861. #endif
  1862. return tmp_value.bitc.ep11tx;
  1863. }
  1864. GH_INLINE U8 GH_USB_get_IntrTx_EP12Tx(void)
  1865. {
  1866. GH_USB_INTRTX_S tmp_value;
  1867. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1868. tmp_value.all = value;
  1869. #if GH_USB_ENABLE_DEBUG_PRINT
  1870. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP12Tx] --> 0x%08x\n",
  1871. REG_USB_INTRTX,value);
  1872. #endif
  1873. return tmp_value.bitc.ep12tx;
  1874. }
  1875. GH_INLINE U8 GH_USB_get_IntrTx_EP13Tx(void)
  1876. {
  1877. GH_USB_INTRTX_S tmp_value;
  1878. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1879. tmp_value.all = value;
  1880. #if GH_USB_ENABLE_DEBUG_PRINT
  1881. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP13Tx] --> 0x%08x\n",
  1882. REG_USB_INTRTX,value);
  1883. #endif
  1884. return tmp_value.bitc.ep13tx;
  1885. }
  1886. GH_INLINE U8 GH_USB_get_IntrTx_EP14Tx(void)
  1887. {
  1888. GH_USB_INTRTX_S tmp_value;
  1889. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1890. tmp_value.all = value;
  1891. #if GH_USB_ENABLE_DEBUG_PRINT
  1892. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP14Tx] --> 0x%08x\n",
  1893. REG_USB_INTRTX,value);
  1894. #endif
  1895. return tmp_value.bitc.ep14tx;
  1896. }
  1897. GH_INLINE U8 GH_USB_get_IntrTx_EP15Tx(void)
  1898. {
  1899. GH_USB_INTRTX_S tmp_value;
  1900. U16 value = (*(volatile U16 *)REG_USB_INTRTX);
  1901. tmp_value.all = value;
  1902. #if GH_USB_ENABLE_DEBUG_PRINT
  1903. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_EP15Tx] --> 0x%08x\n",
  1904. REG_USB_INTRTX,value);
  1905. #endif
  1906. return tmp_value.bitc.ep15tx;
  1907. }
  1908. #endif /* GH_INLINE_LEVEL == 0 */
  1909. /*----------------------------------------------------------------------------*/
  1910. /* register USB_IntrTx_L (read) */
  1911. /*----------------------------------------------------------------------------*/
  1912. #if GH_INLINE_LEVEL == 0
  1913. /*! \brief Reads the register 'USB_IntrTx_L'. */
  1914. U8 GH_USB_get_IntrTx_L(void);
  1915. /*! \brief Reads the bit group 'EP0' of register 'USB_IntrTx_L'. */
  1916. U8 GH_USB_get_IntrTx_L_EP0(void);
  1917. /*! \brief Reads the bit group 'EP1Tx' of register 'USB_IntrTx_L'. */
  1918. U8 GH_USB_get_IntrTx_L_EP1Tx(void);
  1919. /*! \brief Reads the bit group 'EP2Tx' of register 'USB_IntrTx_L'. */
  1920. U8 GH_USB_get_IntrTx_L_EP2Tx(void);
  1921. /*! \brief Reads the bit group 'EP3Tx' of register 'USB_IntrTx_L'. */
  1922. U8 GH_USB_get_IntrTx_L_EP3Tx(void);
  1923. /*! \brief Reads the bit group 'EP4Tx' of register 'USB_IntrTx_L'. */
  1924. U8 GH_USB_get_IntrTx_L_EP4Tx(void);
  1925. /*! \brief Reads the bit group 'EP5Tx' of register 'USB_IntrTx_L'. */
  1926. U8 GH_USB_get_IntrTx_L_EP5Tx(void);
  1927. /*! \brief Reads the bit group 'EP6Tx' of register 'USB_IntrTx_L'. */
  1928. U8 GH_USB_get_IntrTx_L_EP6Tx(void);
  1929. /*! \brief Reads the bit group 'EP7Tx' of register 'USB_IntrTx_L'. */
  1930. U8 GH_USB_get_IntrTx_L_EP7Tx(void);
  1931. #else /* GH_INLINE_LEVEL == 0 */
  1932. GH_INLINE U8 GH_USB_get_IntrTx_L(void)
  1933. {
  1934. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  1935. #if GH_USB_ENABLE_DEBUG_PRINT
  1936. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L] --> 0x%08x\n",
  1937. REG_USB_INTRTX_L,value);
  1938. #endif
  1939. return value;
  1940. }
  1941. GH_INLINE U8 GH_USB_get_IntrTx_L_EP0(void)
  1942. {
  1943. GH_USB_INTRTX_L_S tmp_value;
  1944. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  1945. tmp_value.all = value;
  1946. #if GH_USB_ENABLE_DEBUG_PRINT
  1947. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP0] --> 0x%08x\n",
  1948. REG_USB_INTRTX_L,value);
  1949. #endif
  1950. return tmp_value.bitc.ep0;
  1951. }
  1952. GH_INLINE U8 GH_USB_get_IntrTx_L_EP1Tx(void)
  1953. {
  1954. GH_USB_INTRTX_L_S tmp_value;
  1955. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  1956. tmp_value.all = value;
  1957. #if GH_USB_ENABLE_DEBUG_PRINT
  1958. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP1Tx] --> 0x%08x\n",
  1959. REG_USB_INTRTX_L,value);
  1960. #endif
  1961. return tmp_value.bitc.ep1tx;
  1962. }
  1963. GH_INLINE U8 GH_USB_get_IntrTx_L_EP2Tx(void)
  1964. {
  1965. GH_USB_INTRTX_L_S tmp_value;
  1966. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  1967. tmp_value.all = value;
  1968. #if GH_USB_ENABLE_DEBUG_PRINT
  1969. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP2Tx] --> 0x%08x\n",
  1970. REG_USB_INTRTX_L,value);
  1971. #endif
  1972. return tmp_value.bitc.ep2tx;
  1973. }
  1974. GH_INLINE U8 GH_USB_get_IntrTx_L_EP3Tx(void)
  1975. {
  1976. GH_USB_INTRTX_L_S tmp_value;
  1977. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  1978. tmp_value.all = value;
  1979. #if GH_USB_ENABLE_DEBUG_PRINT
  1980. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP3Tx] --> 0x%08x\n",
  1981. REG_USB_INTRTX_L,value);
  1982. #endif
  1983. return tmp_value.bitc.ep3tx;
  1984. }
  1985. GH_INLINE U8 GH_USB_get_IntrTx_L_EP4Tx(void)
  1986. {
  1987. GH_USB_INTRTX_L_S tmp_value;
  1988. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  1989. tmp_value.all = value;
  1990. #if GH_USB_ENABLE_DEBUG_PRINT
  1991. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP4Tx] --> 0x%08x\n",
  1992. REG_USB_INTRTX_L,value);
  1993. #endif
  1994. return tmp_value.bitc.ep4tx;
  1995. }
  1996. GH_INLINE U8 GH_USB_get_IntrTx_L_EP5Tx(void)
  1997. {
  1998. GH_USB_INTRTX_L_S tmp_value;
  1999. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  2000. tmp_value.all = value;
  2001. #if GH_USB_ENABLE_DEBUG_PRINT
  2002. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP5Tx] --> 0x%08x\n",
  2003. REG_USB_INTRTX_L,value);
  2004. #endif
  2005. return tmp_value.bitc.ep5tx;
  2006. }
  2007. GH_INLINE U8 GH_USB_get_IntrTx_L_EP6Tx(void)
  2008. {
  2009. GH_USB_INTRTX_L_S tmp_value;
  2010. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  2011. tmp_value.all = value;
  2012. #if GH_USB_ENABLE_DEBUG_PRINT
  2013. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP6Tx] --> 0x%08x\n",
  2014. REG_USB_INTRTX_L,value);
  2015. #endif
  2016. return tmp_value.bitc.ep6tx;
  2017. }
  2018. GH_INLINE U8 GH_USB_get_IntrTx_L_EP7Tx(void)
  2019. {
  2020. GH_USB_INTRTX_L_S tmp_value;
  2021. U8 value = (*(volatile U8 *)REG_USB_INTRTX_L);
  2022. tmp_value.all = value;
  2023. #if GH_USB_ENABLE_DEBUG_PRINT
  2024. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_L_EP7Tx] --> 0x%08x\n",
  2025. REG_USB_INTRTX_L,value);
  2026. #endif
  2027. return tmp_value.bitc.ep7tx;
  2028. }
  2029. #endif /* GH_INLINE_LEVEL == 0 */
  2030. /*----------------------------------------------------------------------------*/
  2031. /* register USB_IntrTx_H (read) */
  2032. /*----------------------------------------------------------------------------*/
  2033. #if GH_INLINE_LEVEL == 0
  2034. /*! \brief Reads the register 'USB_IntrTx_H'. */
  2035. U8 GH_USB_get_IntrTx_H(void);
  2036. /*! \brief Reads the bit group 'EP8Tx' of register 'USB_IntrTx_H'. */
  2037. U8 GH_USB_get_IntrTx_H_EP8Tx(void);
  2038. /*! \brief Reads the bit group 'EP9Tx' of register 'USB_IntrTx_H'. */
  2039. U8 GH_USB_get_IntrTx_H_EP9Tx(void);
  2040. /*! \brief Reads the bit group 'EP10Tx' of register 'USB_IntrTx_H'. */
  2041. U8 GH_USB_get_IntrTx_H_EP10Tx(void);
  2042. /*! \brief Reads the bit group 'EP11Tx' of register 'USB_IntrTx_H'. */
  2043. U8 GH_USB_get_IntrTx_H_EP11Tx(void);
  2044. /*! \brief Reads the bit group 'EP12Tx' of register 'USB_IntrTx_H'. */
  2045. U8 GH_USB_get_IntrTx_H_EP12Tx(void);
  2046. /*! \brief Reads the bit group 'EP13Tx' of register 'USB_IntrTx_H'. */
  2047. U8 GH_USB_get_IntrTx_H_EP13Tx(void);
  2048. /*! \brief Reads the bit group 'EP14Tx' of register 'USB_IntrTx_H'. */
  2049. U8 GH_USB_get_IntrTx_H_EP14Tx(void);
  2050. /*! \brief Reads the bit group 'EP15Tx' of register 'USB_IntrTx_H'. */
  2051. U8 GH_USB_get_IntrTx_H_EP15Tx(void);
  2052. #else /* GH_INLINE_LEVEL == 0 */
  2053. GH_INLINE U8 GH_USB_get_IntrTx_H(void)
  2054. {
  2055. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2056. #if GH_USB_ENABLE_DEBUG_PRINT
  2057. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H] --> 0x%08x\n",
  2058. REG_USB_INTRTX_H,value);
  2059. #endif
  2060. return value;
  2061. }
  2062. GH_INLINE U8 GH_USB_get_IntrTx_H_EP8Tx(void)
  2063. {
  2064. GH_USB_INTRTX_H_S tmp_value;
  2065. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2066. tmp_value.all = value;
  2067. #if GH_USB_ENABLE_DEBUG_PRINT
  2068. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP8Tx] --> 0x%08x\n",
  2069. REG_USB_INTRTX_H,value);
  2070. #endif
  2071. return tmp_value.bitc.ep8tx;
  2072. }
  2073. GH_INLINE U8 GH_USB_get_IntrTx_H_EP9Tx(void)
  2074. {
  2075. GH_USB_INTRTX_H_S tmp_value;
  2076. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2077. tmp_value.all = value;
  2078. #if GH_USB_ENABLE_DEBUG_PRINT
  2079. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP9Tx] --> 0x%08x\n",
  2080. REG_USB_INTRTX_H,value);
  2081. #endif
  2082. return tmp_value.bitc.ep9tx;
  2083. }
  2084. GH_INLINE U8 GH_USB_get_IntrTx_H_EP10Tx(void)
  2085. {
  2086. GH_USB_INTRTX_H_S tmp_value;
  2087. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2088. tmp_value.all = value;
  2089. #if GH_USB_ENABLE_DEBUG_PRINT
  2090. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP10Tx] --> 0x%08x\n",
  2091. REG_USB_INTRTX_H,value);
  2092. #endif
  2093. return tmp_value.bitc.ep10tx;
  2094. }
  2095. GH_INLINE U8 GH_USB_get_IntrTx_H_EP11Tx(void)
  2096. {
  2097. GH_USB_INTRTX_H_S tmp_value;
  2098. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2099. tmp_value.all = value;
  2100. #if GH_USB_ENABLE_DEBUG_PRINT
  2101. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP11Tx] --> 0x%08x\n",
  2102. REG_USB_INTRTX_H,value);
  2103. #endif
  2104. return tmp_value.bitc.ep11tx;
  2105. }
  2106. GH_INLINE U8 GH_USB_get_IntrTx_H_EP12Tx(void)
  2107. {
  2108. GH_USB_INTRTX_H_S tmp_value;
  2109. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2110. tmp_value.all = value;
  2111. #if GH_USB_ENABLE_DEBUG_PRINT
  2112. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP12Tx] --> 0x%08x\n",
  2113. REG_USB_INTRTX_H,value);
  2114. #endif
  2115. return tmp_value.bitc.ep12tx;
  2116. }
  2117. GH_INLINE U8 GH_USB_get_IntrTx_H_EP13Tx(void)
  2118. {
  2119. GH_USB_INTRTX_H_S tmp_value;
  2120. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2121. tmp_value.all = value;
  2122. #if GH_USB_ENABLE_DEBUG_PRINT
  2123. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP13Tx] --> 0x%08x\n",
  2124. REG_USB_INTRTX_H,value);
  2125. #endif
  2126. return tmp_value.bitc.ep13tx;
  2127. }
  2128. GH_INLINE U8 GH_USB_get_IntrTx_H_EP14Tx(void)
  2129. {
  2130. GH_USB_INTRTX_H_S tmp_value;
  2131. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2132. tmp_value.all = value;
  2133. #if GH_USB_ENABLE_DEBUG_PRINT
  2134. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP14Tx] --> 0x%08x\n",
  2135. REG_USB_INTRTX_H,value);
  2136. #endif
  2137. return tmp_value.bitc.ep14tx;
  2138. }
  2139. GH_INLINE U8 GH_USB_get_IntrTx_H_EP15Tx(void)
  2140. {
  2141. GH_USB_INTRTX_H_S tmp_value;
  2142. U8 value = (*(volatile U8 *)REG_USB_INTRTX_H);
  2143. tmp_value.all = value;
  2144. #if GH_USB_ENABLE_DEBUG_PRINT
  2145. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTx_H_EP15Tx] --> 0x%08x\n",
  2146. REG_USB_INTRTX_H,value);
  2147. #endif
  2148. return tmp_value.bitc.ep15tx;
  2149. }
  2150. #endif /* GH_INLINE_LEVEL == 0 */
  2151. /*----------------------------------------------------------------------------*/
  2152. /* register USB_IntrRx (read) */
  2153. /*----------------------------------------------------------------------------*/
  2154. #if GH_INLINE_LEVEL == 0
  2155. /*! \brief Reads the register 'USB_IntrRx'. */
  2156. U16 GH_USB_get_IntrRx(void);
  2157. /*! \brief Reads the bit group 'EP1Rx' of register 'USB_IntrRx'. */
  2158. U8 GH_USB_get_IntrRx_EP1Rx(void);
  2159. /*! \brief Reads the bit group 'EP2Rx' of register 'USB_IntrRx'. */
  2160. U8 GH_USB_get_IntrRx_EP2Rx(void);
  2161. /*! \brief Reads the bit group 'EP3Rx' of register 'USB_IntrRx'. */
  2162. U8 GH_USB_get_IntrRx_EP3Rx(void);
  2163. /*! \brief Reads the bit group 'EP4Rx' of register 'USB_IntrRx'. */
  2164. U8 GH_USB_get_IntrRx_EP4Rx(void);
  2165. /*! \brief Reads the bit group 'EP5Rx' of register 'USB_IntrRx'. */
  2166. U8 GH_USB_get_IntrRx_EP5Rx(void);
  2167. /*! \brief Reads the bit group 'EP6Rx' of register 'USB_IntrRx'. */
  2168. U8 GH_USB_get_IntrRx_EP6Rx(void);
  2169. /*! \brief Reads the bit group 'EP7Rx' of register 'USB_IntrRx'. */
  2170. U8 GH_USB_get_IntrRx_EP7Rx(void);
  2171. /*! \brief Reads the bit group 'EP8Rx' of register 'USB_IntrRx'. */
  2172. U8 GH_USB_get_IntrRx_EP8Rx(void);
  2173. /*! \brief Reads the bit group 'EP9Rx' of register 'USB_IntrRx'. */
  2174. U8 GH_USB_get_IntrRx_EP9Rx(void);
  2175. /*! \brief Reads the bit group 'EP10Rx' of register 'USB_IntrRx'. */
  2176. U8 GH_USB_get_IntrRx_EP10Rx(void);
  2177. /*! \brief Reads the bit group 'EP11Rx' of register 'USB_IntrRx'. */
  2178. U8 GH_USB_get_IntrRx_EP11Rx(void);
  2179. /*! \brief Reads the bit group 'EP12Rx' of register 'USB_IntrRx'. */
  2180. U8 GH_USB_get_IntrRx_EP12Rx(void);
  2181. /*! \brief Reads the bit group 'EP13Rx' of register 'USB_IntrRx'. */
  2182. U8 GH_USB_get_IntrRx_EP13Rx(void);
  2183. /*! \brief Reads the bit group 'EP14Rx' of register 'USB_IntrRx'. */
  2184. U8 GH_USB_get_IntrRx_EP14Rx(void);
  2185. /*! \brief Reads the bit group 'EP15Rx' of register 'USB_IntrRx'. */
  2186. U8 GH_USB_get_IntrRx_EP15Rx(void);
  2187. #else /* GH_INLINE_LEVEL == 0 */
  2188. GH_INLINE U16 GH_USB_get_IntrRx(void)
  2189. {
  2190. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2191. #if GH_USB_ENABLE_DEBUG_PRINT
  2192. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx] --> 0x%08x\n",
  2193. REG_USB_INTRRX,value);
  2194. #endif
  2195. return value;
  2196. }
  2197. GH_INLINE U8 GH_USB_get_IntrRx_EP1Rx(void)
  2198. {
  2199. GH_USB_INTRRX_S tmp_value;
  2200. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2201. tmp_value.all = value;
  2202. #if GH_USB_ENABLE_DEBUG_PRINT
  2203. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP1Rx] --> 0x%08x\n",
  2204. REG_USB_INTRRX,value);
  2205. #endif
  2206. return tmp_value.bitc.ep1rx;
  2207. }
  2208. GH_INLINE U8 GH_USB_get_IntrRx_EP2Rx(void)
  2209. {
  2210. GH_USB_INTRRX_S tmp_value;
  2211. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2212. tmp_value.all = value;
  2213. #if GH_USB_ENABLE_DEBUG_PRINT
  2214. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP2Rx] --> 0x%08x\n",
  2215. REG_USB_INTRRX,value);
  2216. #endif
  2217. return tmp_value.bitc.ep2rx;
  2218. }
  2219. GH_INLINE U8 GH_USB_get_IntrRx_EP3Rx(void)
  2220. {
  2221. GH_USB_INTRRX_S tmp_value;
  2222. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2223. tmp_value.all = value;
  2224. #if GH_USB_ENABLE_DEBUG_PRINT
  2225. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP3Rx] --> 0x%08x\n",
  2226. REG_USB_INTRRX,value);
  2227. #endif
  2228. return tmp_value.bitc.ep3rx;
  2229. }
  2230. GH_INLINE U8 GH_USB_get_IntrRx_EP4Rx(void)
  2231. {
  2232. GH_USB_INTRRX_S tmp_value;
  2233. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2234. tmp_value.all = value;
  2235. #if GH_USB_ENABLE_DEBUG_PRINT
  2236. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP4Rx] --> 0x%08x\n",
  2237. REG_USB_INTRRX,value);
  2238. #endif
  2239. return tmp_value.bitc.ep4rx;
  2240. }
  2241. GH_INLINE U8 GH_USB_get_IntrRx_EP5Rx(void)
  2242. {
  2243. GH_USB_INTRRX_S tmp_value;
  2244. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2245. tmp_value.all = value;
  2246. #if GH_USB_ENABLE_DEBUG_PRINT
  2247. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP5Rx] --> 0x%08x\n",
  2248. REG_USB_INTRRX,value);
  2249. #endif
  2250. return tmp_value.bitc.ep5rx;
  2251. }
  2252. GH_INLINE U8 GH_USB_get_IntrRx_EP6Rx(void)
  2253. {
  2254. GH_USB_INTRRX_S tmp_value;
  2255. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2256. tmp_value.all = value;
  2257. #if GH_USB_ENABLE_DEBUG_PRINT
  2258. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP6Rx] --> 0x%08x\n",
  2259. REG_USB_INTRRX,value);
  2260. #endif
  2261. return tmp_value.bitc.ep6rx;
  2262. }
  2263. GH_INLINE U8 GH_USB_get_IntrRx_EP7Rx(void)
  2264. {
  2265. GH_USB_INTRRX_S tmp_value;
  2266. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2267. tmp_value.all = value;
  2268. #if GH_USB_ENABLE_DEBUG_PRINT
  2269. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP7Rx] --> 0x%08x\n",
  2270. REG_USB_INTRRX,value);
  2271. #endif
  2272. return tmp_value.bitc.ep7rx;
  2273. }
  2274. GH_INLINE U8 GH_USB_get_IntrRx_EP8Rx(void)
  2275. {
  2276. GH_USB_INTRRX_S tmp_value;
  2277. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2278. tmp_value.all = value;
  2279. #if GH_USB_ENABLE_DEBUG_PRINT
  2280. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP8Rx] --> 0x%08x\n",
  2281. REG_USB_INTRRX,value);
  2282. #endif
  2283. return tmp_value.bitc.ep8rx;
  2284. }
  2285. GH_INLINE U8 GH_USB_get_IntrRx_EP9Rx(void)
  2286. {
  2287. GH_USB_INTRRX_S tmp_value;
  2288. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2289. tmp_value.all = value;
  2290. #if GH_USB_ENABLE_DEBUG_PRINT
  2291. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP9Rx] --> 0x%08x\n",
  2292. REG_USB_INTRRX,value);
  2293. #endif
  2294. return tmp_value.bitc.ep9rx;
  2295. }
  2296. GH_INLINE U8 GH_USB_get_IntrRx_EP10Rx(void)
  2297. {
  2298. GH_USB_INTRRX_S tmp_value;
  2299. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2300. tmp_value.all = value;
  2301. #if GH_USB_ENABLE_DEBUG_PRINT
  2302. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP10Rx] --> 0x%08x\n",
  2303. REG_USB_INTRRX,value);
  2304. #endif
  2305. return tmp_value.bitc.ep10rx;
  2306. }
  2307. GH_INLINE U8 GH_USB_get_IntrRx_EP11Rx(void)
  2308. {
  2309. GH_USB_INTRRX_S tmp_value;
  2310. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2311. tmp_value.all = value;
  2312. #if GH_USB_ENABLE_DEBUG_PRINT
  2313. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP11Rx] --> 0x%08x\n",
  2314. REG_USB_INTRRX,value);
  2315. #endif
  2316. return tmp_value.bitc.ep11rx;
  2317. }
  2318. GH_INLINE U8 GH_USB_get_IntrRx_EP12Rx(void)
  2319. {
  2320. GH_USB_INTRRX_S tmp_value;
  2321. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2322. tmp_value.all = value;
  2323. #if GH_USB_ENABLE_DEBUG_PRINT
  2324. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP12Rx] --> 0x%08x\n",
  2325. REG_USB_INTRRX,value);
  2326. #endif
  2327. return tmp_value.bitc.ep12rx;
  2328. }
  2329. GH_INLINE U8 GH_USB_get_IntrRx_EP13Rx(void)
  2330. {
  2331. GH_USB_INTRRX_S tmp_value;
  2332. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2333. tmp_value.all = value;
  2334. #if GH_USB_ENABLE_DEBUG_PRINT
  2335. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP13Rx] --> 0x%08x\n",
  2336. REG_USB_INTRRX,value);
  2337. #endif
  2338. return tmp_value.bitc.ep13rx;
  2339. }
  2340. GH_INLINE U8 GH_USB_get_IntrRx_EP14Rx(void)
  2341. {
  2342. GH_USB_INTRRX_S tmp_value;
  2343. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2344. tmp_value.all = value;
  2345. #if GH_USB_ENABLE_DEBUG_PRINT
  2346. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP14Rx] --> 0x%08x\n",
  2347. REG_USB_INTRRX,value);
  2348. #endif
  2349. return tmp_value.bitc.ep14rx;
  2350. }
  2351. GH_INLINE U8 GH_USB_get_IntrRx_EP15Rx(void)
  2352. {
  2353. GH_USB_INTRRX_S tmp_value;
  2354. U16 value = (*(volatile U16 *)REG_USB_INTRRX);
  2355. tmp_value.all = value;
  2356. #if GH_USB_ENABLE_DEBUG_PRINT
  2357. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_EP15Rx] --> 0x%08x\n",
  2358. REG_USB_INTRRX,value);
  2359. #endif
  2360. return tmp_value.bitc.ep15rx;
  2361. }
  2362. #endif /* GH_INLINE_LEVEL == 0 */
  2363. /*----------------------------------------------------------------------------*/
  2364. /* register USB_IntrRx_L (read) */
  2365. /*----------------------------------------------------------------------------*/
  2366. #if GH_INLINE_LEVEL == 0
  2367. /*! \brief Reads the register 'USB_IntrRx_L'. */
  2368. U8 GH_USB_get_IntrRx_L(void);
  2369. /*! \brief Reads the bit group 'EP1Rx' of register 'USB_IntrRx_L'. */
  2370. U8 GH_USB_get_IntrRx_L_EP1Rx(void);
  2371. /*! \brief Reads the bit group 'EP2Rx' of register 'USB_IntrRx_L'. */
  2372. U8 GH_USB_get_IntrRx_L_EP2Rx(void);
  2373. /*! \brief Reads the bit group 'EP3Rx' of register 'USB_IntrRx_L'. */
  2374. U8 GH_USB_get_IntrRx_L_EP3Rx(void);
  2375. /*! \brief Reads the bit group 'EP4Rx' of register 'USB_IntrRx_L'. */
  2376. U8 GH_USB_get_IntrRx_L_EP4Rx(void);
  2377. /*! \brief Reads the bit group 'EP5Rx' of register 'USB_IntrRx_L'. */
  2378. U8 GH_USB_get_IntrRx_L_EP5Rx(void);
  2379. /*! \brief Reads the bit group 'EP6Rx' of register 'USB_IntrRx_L'. */
  2380. U8 GH_USB_get_IntrRx_L_EP6Rx(void);
  2381. /*! \brief Reads the bit group 'EP7Rx' of register 'USB_IntrRx_L'. */
  2382. U8 GH_USB_get_IntrRx_L_EP7Rx(void);
  2383. #else /* GH_INLINE_LEVEL == 0 */
  2384. GH_INLINE U8 GH_USB_get_IntrRx_L(void)
  2385. {
  2386. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  2387. #if GH_USB_ENABLE_DEBUG_PRINT
  2388. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_L] --> 0x%08x\n",
  2389. REG_USB_INTRRX_L,value);
  2390. #endif
  2391. return value;
  2392. }
  2393. GH_INLINE U8 GH_USB_get_IntrRx_L_EP1Rx(void)
  2394. {
  2395. GH_USB_INTRRX_L_S tmp_value;
  2396. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  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_IntrRx_L_EP1Rx] --> 0x%08x\n",
  2400. REG_USB_INTRRX_L,value);
  2401. #endif
  2402. return tmp_value.bitc.ep1rx;
  2403. }
  2404. GH_INLINE U8 GH_USB_get_IntrRx_L_EP2Rx(void)
  2405. {
  2406. GH_USB_INTRRX_L_S tmp_value;
  2407. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  2408. tmp_value.all = value;
  2409. #if GH_USB_ENABLE_DEBUG_PRINT
  2410. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_L_EP2Rx] --> 0x%08x\n",
  2411. REG_USB_INTRRX_L,value);
  2412. #endif
  2413. return tmp_value.bitc.ep2rx;
  2414. }
  2415. GH_INLINE U8 GH_USB_get_IntrRx_L_EP3Rx(void)
  2416. {
  2417. GH_USB_INTRRX_L_S tmp_value;
  2418. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  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_IntrRx_L_EP3Rx] --> 0x%08x\n",
  2422. REG_USB_INTRRX_L,value);
  2423. #endif
  2424. return tmp_value.bitc.ep3rx;
  2425. }
  2426. GH_INLINE U8 GH_USB_get_IntrRx_L_EP4Rx(void)
  2427. {
  2428. GH_USB_INTRRX_L_S tmp_value;
  2429. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  2430. tmp_value.all = value;
  2431. #if GH_USB_ENABLE_DEBUG_PRINT
  2432. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_L_EP4Rx] --> 0x%08x\n",
  2433. REG_USB_INTRRX_L,value);
  2434. #endif
  2435. return tmp_value.bitc.ep4rx;
  2436. }
  2437. GH_INLINE U8 GH_USB_get_IntrRx_L_EP5Rx(void)
  2438. {
  2439. GH_USB_INTRRX_L_S tmp_value;
  2440. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  2441. tmp_value.all = value;
  2442. #if GH_USB_ENABLE_DEBUG_PRINT
  2443. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_L_EP5Rx] --> 0x%08x\n",
  2444. REG_USB_INTRRX_L,value);
  2445. #endif
  2446. return tmp_value.bitc.ep5rx;
  2447. }
  2448. GH_INLINE U8 GH_USB_get_IntrRx_L_EP6Rx(void)
  2449. {
  2450. GH_USB_INTRRX_L_S tmp_value;
  2451. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  2452. tmp_value.all = value;
  2453. #if GH_USB_ENABLE_DEBUG_PRINT
  2454. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_L_EP6Rx] --> 0x%08x\n",
  2455. REG_USB_INTRRX_L,value);
  2456. #endif
  2457. return tmp_value.bitc.ep6rx;
  2458. }
  2459. GH_INLINE U8 GH_USB_get_IntrRx_L_EP7Rx(void)
  2460. {
  2461. GH_USB_INTRRX_L_S tmp_value;
  2462. U8 value = (*(volatile U8 *)REG_USB_INTRRX_L);
  2463. tmp_value.all = value;
  2464. #if GH_USB_ENABLE_DEBUG_PRINT
  2465. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_L_EP7Rx] --> 0x%08x\n",
  2466. REG_USB_INTRRX_L,value);
  2467. #endif
  2468. return tmp_value.bitc.ep7rx;
  2469. }
  2470. #endif /* GH_INLINE_LEVEL == 0 */
  2471. /*----------------------------------------------------------------------------*/
  2472. /* register USB_IntrRx_H (read) */
  2473. /*----------------------------------------------------------------------------*/
  2474. #if GH_INLINE_LEVEL == 0
  2475. /*! \brief Reads the register 'USB_IntrRx_H'. */
  2476. U8 GH_USB_get_IntrRx_H(void);
  2477. /*! \brief Reads the bit group 'EP8Rx' of register 'USB_IntrRx_H'. */
  2478. U8 GH_USB_get_IntrRx_H_EP8Rx(void);
  2479. /*! \brief Reads the bit group 'EP9Rx' of register 'USB_IntrRx_H'. */
  2480. U8 GH_USB_get_IntrRx_H_EP9Rx(void);
  2481. /*! \brief Reads the bit group 'EP10Rx' of register 'USB_IntrRx_H'. */
  2482. U8 GH_USB_get_IntrRx_H_EP10Rx(void);
  2483. /*! \brief Reads the bit group 'EP11Rx' of register 'USB_IntrRx_H'. */
  2484. U8 GH_USB_get_IntrRx_H_EP11Rx(void);
  2485. /*! \brief Reads the bit group 'EP12Rx' of register 'USB_IntrRx_H'. */
  2486. U8 GH_USB_get_IntrRx_H_EP12Rx(void);
  2487. /*! \brief Reads the bit group 'EP13Rx' of register 'USB_IntrRx_H'. */
  2488. U8 GH_USB_get_IntrRx_H_EP13Rx(void);
  2489. /*! \brief Reads the bit group 'EP14Rx' of register 'USB_IntrRx_H'. */
  2490. U8 GH_USB_get_IntrRx_H_EP14Rx(void);
  2491. /*! \brief Reads the bit group 'EP15Rx' of register 'USB_IntrRx_H'. */
  2492. U8 GH_USB_get_IntrRx_H_EP15Rx(void);
  2493. #else /* GH_INLINE_LEVEL == 0 */
  2494. GH_INLINE U8 GH_USB_get_IntrRx_H(void)
  2495. {
  2496. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2497. #if GH_USB_ENABLE_DEBUG_PRINT
  2498. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H] --> 0x%08x\n",
  2499. REG_USB_INTRRX_H,value);
  2500. #endif
  2501. return value;
  2502. }
  2503. GH_INLINE U8 GH_USB_get_IntrRx_H_EP8Rx(void)
  2504. {
  2505. GH_USB_INTRRX_H_S tmp_value;
  2506. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2507. tmp_value.all = value;
  2508. #if GH_USB_ENABLE_DEBUG_PRINT
  2509. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP8Rx] --> 0x%08x\n",
  2510. REG_USB_INTRRX_H,value);
  2511. #endif
  2512. return tmp_value.bitc.ep8rx;
  2513. }
  2514. GH_INLINE U8 GH_USB_get_IntrRx_H_EP9Rx(void)
  2515. {
  2516. GH_USB_INTRRX_H_S tmp_value;
  2517. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2518. tmp_value.all = value;
  2519. #if GH_USB_ENABLE_DEBUG_PRINT
  2520. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP9Rx] --> 0x%08x\n",
  2521. REG_USB_INTRRX_H,value);
  2522. #endif
  2523. return tmp_value.bitc.ep9rx;
  2524. }
  2525. GH_INLINE U8 GH_USB_get_IntrRx_H_EP10Rx(void)
  2526. {
  2527. GH_USB_INTRRX_H_S tmp_value;
  2528. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2529. tmp_value.all = value;
  2530. #if GH_USB_ENABLE_DEBUG_PRINT
  2531. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP10Rx] --> 0x%08x\n",
  2532. REG_USB_INTRRX_H,value);
  2533. #endif
  2534. return tmp_value.bitc.ep10rx;
  2535. }
  2536. GH_INLINE U8 GH_USB_get_IntrRx_H_EP11Rx(void)
  2537. {
  2538. GH_USB_INTRRX_H_S tmp_value;
  2539. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2540. tmp_value.all = value;
  2541. #if GH_USB_ENABLE_DEBUG_PRINT
  2542. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP11Rx] --> 0x%08x\n",
  2543. REG_USB_INTRRX_H,value);
  2544. #endif
  2545. return tmp_value.bitc.ep11rx;
  2546. }
  2547. GH_INLINE U8 GH_USB_get_IntrRx_H_EP12Rx(void)
  2548. {
  2549. GH_USB_INTRRX_H_S tmp_value;
  2550. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2551. tmp_value.all = value;
  2552. #if GH_USB_ENABLE_DEBUG_PRINT
  2553. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP12Rx] --> 0x%08x\n",
  2554. REG_USB_INTRRX_H,value);
  2555. #endif
  2556. return tmp_value.bitc.ep12rx;
  2557. }
  2558. GH_INLINE U8 GH_USB_get_IntrRx_H_EP13Rx(void)
  2559. {
  2560. GH_USB_INTRRX_H_S tmp_value;
  2561. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2562. tmp_value.all = value;
  2563. #if GH_USB_ENABLE_DEBUG_PRINT
  2564. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP13Rx] --> 0x%08x\n",
  2565. REG_USB_INTRRX_H,value);
  2566. #endif
  2567. return tmp_value.bitc.ep13rx;
  2568. }
  2569. GH_INLINE U8 GH_USB_get_IntrRx_H_EP14Rx(void)
  2570. {
  2571. GH_USB_INTRRX_H_S tmp_value;
  2572. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2573. tmp_value.all = value;
  2574. #if GH_USB_ENABLE_DEBUG_PRINT
  2575. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP14Rx] --> 0x%08x\n",
  2576. REG_USB_INTRRX_H,value);
  2577. #endif
  2578. return tmp_value.bitc.ep14rx;
  2579. }
  2580. GH_INLINE U8 GH_USB_get_IntrRx_H_EP15Rx(void)
  2581. {
  2582. GH_USB_INTRRX_H_S tmp_value;
  2583. U8 value = (*(volatile U8 *)REG_USB_INTRRX_H);
  2584. tmp_value.all = value;
  2585. #if GH_USB_ENABLE_DEBUG_PRINT
  2586. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRx_H_EP15Rx] --> 0x%08x\n",
  2587. REG_USB_INTRRX_H,value);
  2588. #endif
  2589. return tmp_value.bitc.ep15rx;
  2590. }
  2591. #endif /* GH_INLINE_LEVEL == 0 */
  2592. /*----------------------------------------------------------------------------*/
  2593. /* register USB_IntrTxE (read/write) */
  2594. /*----------------------------------------------------------------------------*/
  2595. #if GH_INLINE_LEVEL == 0
  2596. /*! \brief Writes the register 'USB_IntrTxE'. */
  2597. void GH_USB_set_IntrTxE(U16 data);
  2598. /*! \brief Reads the register 'USB_IntrTxE'. */
  2599. U16 GH_USB_get_IntrTxE(void);
  2600. /*! \brief Writes the bit group 'EP0' of register 'USB_IntrTxE'. */
  2601. void GH_USB_set_IntrTxE_EP0(U8 data);
  2602. /*! \brief Reads the bit group 'EP0' of register 'USB_IntrTxE'. */
  2603. U8 GH_USB_get_IntrTxE_EP0(void);
  2604. /*! \brief Writes the bit group 'EP1Tx' of register 'USB_IntrTxE'. */
  2605. void GH_USB_set_IntrTxE_EP1Tx(U8 data);
  2606. /*! \brief Reads the bit group 'EP1Tx' of register 'USB_IntrTxE'. */
  2607. U8 GH_USB_get_IntrTxE_EP1Tx(void);
  2608. /*! \brief Writes the bit group 'EP2Tx' of register 'USB_IntrTxE'. */
  2609. void GH_USB_set_IntrTxE_EP2Tx(U8 data);
  2610. /*! \brief Reads the bit group 'EP2Tx' of register 'USB_IntrTxE'. */
  2611. U8 GH_USB_get_IntrTxE_EP2Tx(void);
  2612. /*! \brief Writes the bit group 'EP3Tx' of register 'USB_IntrTxE'. */
  2613. void GH_USB_set_IntrTxE_EP3Tx(U8 data);
  2614. /*! \brief Reads the bit group 'EP3Tx' of register 'USB_IntrTxE'. */
  2615. U8 GH_USB_get_IntrTxE_EP3Tx(void);
  2616. /*! \brief Writes the bit group 'EP4Tx' of register 'USB_IntrTxE'. */
  2617. void GH_USB_set_IntrTxE_EP4Tx(U8 data);
  2618. /*! \brief Reads the bit group 'EP4Tx' of register 'USB_IntrTxE'. */
  2619. U8 GH_USB_get_IntrTxE_EP4Tx(void);
  2620. /*! \brief Writes the bit group 'EP5Tx' of register 'USB_IntrTxE'. */
  2621. void GH_USB_set_IntrTxE_EP5Tx(U8 data);
  2622. /*! \brief Reads the bit group 'EP5Tx' of register 'USB_IntrTxE'. */
  2623. U8 GH_USB_get_IntrTxE_EP5Tx(void);
  2624. /*! \brief Writes the bit group 'EP6Tx' of register 'USB_IntrTxE'. */
  2625. void GH_USB_set_IntrTxE_EP6Tx(U8 data);
  2626. /*! \brief Reads the bit group 'EP6Tx' of register 'USB_IntrTxE'. */
  2627. U8 GH_USB_get_IntrTxE_EP6Tx(void);
  2628. /*! \brief Writes the bit group 'EP7Tx' of register 'USB_IntrTxE'. */
  2629. void GH_USB_set_IntrTxE_EP7Tx(U8 data);
  2630. /*! \brief Reads the bit group 'EP7Tx' of register 'USB_IntrTxE'. */
  2631. U8 GH_USB_get_IntrTxE_EP7Tx(void);
  2632. /*! \brief Writes the bit group 'EP8Tx' of register 'USB_IntrTxE'. */
  2633. void GH_USB_set_IntrTxE_EP8Tx(U8 data);
  2634. /*! \brief Reads the bit group 'EP8Tx' of register 'USB_IntrTxE'. */
  2635. U8 GH_USB_get_IntrTxE_EP8Tx(void);
  2636. /*! \brief Writes the bit group 'EP9Tx' of register 'USB_IntrTxE'. */
  2637. void GH_USB_set_IntrTxE_EP9Tx(U8 data);
  2638. /*! \brief Reads the bit group 'EP9Tx' of register 'USB_IntrTxE'. */
  2639. U8 GH_USB_get_IntrTxE_EP9Tx(void);
  2640. /*! \brief Writes the bit group 'EP10Tx' of register 'USB_IntrTxE'. */
  2641. void GH_USB_set_IntrTxE_EP10Tx(U8 data);
  2642. /*! \brief Reads the bit group 'EP10Tx' of register 'USB_IntrTxE'. */
  2643. U8 GH_USB_get_IntrTxE_EP10Tx(void);
  2644. /*! \brief Writes the bit group 'EP11Tx' of register 'USB_IntrTxE'. */
  2645. void GH_USB_set_IntrTxE_EP11Tx(U8 data);
  2646. /*! \brief Reads the bit group 'EP11Tx' of register 'USB_IntrTxE'. */
  2647. U8 GH_USB_get_IntrTxE_EP11Tx(void);
  2648. /*! \brief Writes the bit group 'EP12Tx' of register 'USB_IntrTxE'. */
  2649. void GH_USB_set_IntrTxE_EP12Tx(U8 data);
  2650. /*! \brief Reads the bit group 'EP12Tx' of register 'USB_IntrTxE'. */
  2651. U8 GH_USB_get_IntrTxE_EP12Tx(void);
  2652. /*! \brief Writes the bit group 'EP13Tx' of register 'USB_IntrTxE'. */
  2653. void GH_USB_set_IntrTxE_EP13Tx(U8 data);
  2654. /*! \brief Reads the bit group 'EP13Tx' of register 'USB_IntrTxE'. */
  2655. U8 GH_USB_get_IntrTxE_EP13Tx(void);
  2656. /*! \brief Writes the bit group 'EP14Tx' of register 'USB_IntrTxE'. */
  2657. void GH_USB_set_IntrTxE_EP14Tx(U8 data);
  2658. /*! \brief Reads the bit group 'EP14Tx' of register 'USB_IntrTxE'. */
  2659. U8 GH_USB_get_IntrTxE_EP14Tx(void);
  2660. /*! \brief Writes the bit group 'EP15Tx' of register 'USB_IntrTxE'. */
  2661. void GH_USB_set_IntrTxE_EP15Tx(U8 data);
  2662. /*! \brief Reads the bit group 'EP15Tx' of register 'USB_IntrTxE'. */
  2663. U8 GH_USB_get_IntrTxE_EP15Tx(void);
  2664. #else /* GH_INLINE_LEVEL == 0 */
  2665. GH_INLINE void GH_USB_set_IntrTxE(U16 data)
  2666. {
  2667. *(volatile U16 *)REG_USB_INTRTXE = data;
  2668. #if GH_USB_ENABLE_DEBUG_PRINT
  2669. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE] <-- 0x%08x\n",
  2670. REG_USB_INTRTXE,data,data);
  2671. #endif
  2672. }
  2673. GH_INLINE U16 GH_USB_get_IntrTxE(void)
  2674. {
  2675. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2676. #if GH_USB_ENABLE_DEBUG_PRINT
  2677. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE] --> 0x%08x\n",
  2678. REG_USB_INTRTXE,value);
  2679. #endif
  2680. return value;
  2681. }
  2682. GH_INLINE void GH_USB_set_IntrTxE_EP0(U8 data)
  2683. {
  2684. GH_USB_INTRTXE_S d;
  2685. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2686. d.bitc.ep0 = data;
  2687. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2688. #if GH_USB_ENABLE_DEBUG_PRINT
  2689. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP0] <-- 0x%08x\n",
  2690. REG_USB_INTRTXE,d.all,d.all);
  2691. #endif
  2692. }
  2693. GH_INLINE U8 GH_USB_get_IntrTxE_EP0(void)
  2694. {
  2695. GH_USB_INTRTXE_S tmp_value;
  2696. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2697. tmp_value.all = value;
  2698. #if GH_USB_ENABLE_DEBUG_PRINT
  2699. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP0] --> 0x%08x\n",
  2700. REG_USB_INTRTXE,value);
  2701. #endif
  2702. return tmp_value.bitc.ep0;
  2703. }
  2704. GH_INLINE void GH_USB_set_IntrTxE_EP1Tx(U8 data)
  2705. {
  2706. GH_USB_INTRTXE_S d;
  2707. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2708. d.bitc.ep1tx = data;
  2709. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2710. #if GH_USB_ENABLE_DEBUG_PRINT
  2711. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP1Tx] <-- 0x%08x\n",
  2712. REG_USB_INTRTXE,d.all,d.all);
  2713. #endif
  2714. }
  2715. GH_INLINE U8 GH_USB_get_IntrTxE_EP1Tx(void)
  2716. {
  2717. GH_USB_INTRTXE_S tmp_value;
  2718. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2719. tmp_value.all = value;
  2720. #if GH_USB_ENABLE_DEBUG_PRINT
  2721. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP1Tx] --> 0x%08x\n",
  2722. REG_USB_INTRTXE,value);
  2723. #endif
  2724. return tmp_value.bitc.ep1tx;
  2725. }
  2726. GH_INLINE void GH_USB_set_IntrTxE_EP2Tx(U8 data)
  2727. {
  2728. GH_USB_INTRTXE_S d;
  2729. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2730. d.bitc.ep2tx = data;
  2731. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2732. #if GH_USB_ENABLE_DEBUG_PRINT
  2733. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP2Tx] <-- 0x%08x\n",
  2734. REG_USB_INTRTXE,d.all,d.all);
  2735. #endif
  2736. }
  2737. GH_INLINE U8 GH_USB_get_IntrTxE_EP2Tx(void)
  2738. {
  2739. GH_USB_INTRTXE_S tmp_value;
  2740. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2741. tmp_value.all = value;
  2742. #if GH_USB_ENABLE_DEBUG_PRINT
  2743. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP2Tx] --> 0x%08x\n",
  2744. REG_USB_INTRTXE,value);
  2745. #endif
  2746. return tmp_value.bitc.ep2tx;
  2747. }
  2748. GH_INLINE void GH_USB_set_IntrTxE_EP3Tx(U8 data)
  2749. {
  2750. GH_USB_INTRTXE_S d;
  2751. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2752. d.bitc.ep3tx = data;
  2753. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2754. #if GH_USB_ENABLE_DEBUG_PRINT
  2755. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP3Tx] <-- 0x%08x\n",
  2756. REG_USB_INTRTXE,d.all,d.all);
  2757. #endif
  2758. }
  2759. GH_INLINE U8 GH_USB_get_IntrTxE_EP3Tx(void)
  2760. {
  2761. GH_USB_INTRTXE_S tmp_value;
  2762. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2763. tmp_value.all = value;
  2764. #if GH_USB_ENABLE_DEBUG_PRINT
  2765. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP3Tx] --> 0x%08x\n",
  2766. REG_USB_INTRTXE,value);
  2767. #endif
  2768. return tmp_value.bitc.ep3tx;
  2769. }
  2770. GH_INLINE void GH_USB_set_IntrTxE_EP4Tx(U8 data)
  2771. {
  2772. GH_USB_INTRTXE_S d;
  2773. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2774. d.bitc.ep4tx = data;
  2775. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2776. #if GH_USB_ENABLE_DEBUG_PRINT
  2777. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP4Tx] <-- 0x%08x\n",
  2778. REG_USB_INTRTXE,d.all,d.all);
  2779. #endif
  2780. }
  2781. GH_INLINE U8 GH_USB_get_IntrTxE_EP4Tx(void)
  2782. {
  2783. GH_USB_INTRTXE_S tmp_value;
  2784. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2785. tmp_value.all = value;
  2786. #if GH_USB_ENABLE_DEBUG_PRINT
  2787. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP4Tx] --> 0x%08x\n",
  2788. REG_USB_INTRTXE,value);
  2789. #endif
  2790. return tmp_value.bitc.ep4tx;
  2791. }
  2792. GH_INLINE void GH_USB_set_IntrTxE_EP5Tx(U8 data)
  2793. {
  2794. GH_USB_INTRTXE_S d;
  2795. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2796. d.bitc.ep5tx = data;
  2797. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2798. #if GH_USB_ENABLE_DEBUG_PRINT
  2799. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP5Tx] <-- 0x%08x\n",
  2800. REG_USB_INTRTXE,d.all,d.all);
  2801. #endif
  2802. }
  2803. GH_INLINE U8 GH_USB_get_IntrTxE_EP5Tx(void)
  2804. {
  2805. GH_USB_INTRTXE_S tmp_value;
  2806. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2807. tmp_value.all = value;
  2808. #if GH_USB_ENABLE_DEBUG_PRINT
  2809. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP5Tx] --> 0x%08x\n",
  2810. REG_USB_INTRTXE,value);
  2811. #endif
  2812. return tmp_value.bitc.ep5tx;
  2813. }
  2814. GH_INLINE void GH_USB_set_IntrTxE_EP6Tx(U8 data)
  2815. {
  2816. GH_USB_INTRTXE_S d;
  2817. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2818. d.bitc.ep6tx = data;
  2819. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2820. #if GH_USB_ENABLE_DEBUG_PRINT
  2821. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP6Tx] <-- 0x%08x\n",
  2822. REG_USB_INTRTXE,d.all,d.all);
  2823. #endif
  2824. }
  2825. GH_INLINE U8 GH_USB_get_IntrTxE_EP6Tx(void)
  2826. {
  2827. GH_USB_INTRTXE_S tmp_value;
  2828. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2829. tmp_value.all = value;
  2830. #if GH_USB_ENABLE_DEBUG_PRINT
  2831. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP6Tx] --> 0x%08x\n",
  2832. REG_USB_INTRTXE,value);
  2833. #endif
  2834. return tmp_value.bitc.ep6tx;
  2835. }
  2836. GH_INLINE void GH_USB_set_IntrTxE_EP7Tx(U8 data)
  2837. {
  2838. GH_USB_INTRTXE_S d;
  2839. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2840. d.bitc.ep7tx = data;
  2841. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2842. #if GH_USB_ENABLE_DEBUG_PRINT
  2843. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP7Tx] <-- 0x%08x\n",
  2844. REG_USB_INTRTXE,d.all,d.all);
  2845. #endif
  2846. }
  2847. GH_INLINE U8 GH_USB_get_IntrTxE_EP7Tx(void)
  2848. {
  2849. GH_USB_INTRTXE_S tmp_value;
  2850. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2851. tmp_value.all = value;
  2852. #if GH_USB_ENABLE_DEBUG_PRINT
  2853. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP7Tx] --> 0x%08x\n",
  2854. REG_USB_INTRTXE,value);
  2855. #endif
  2856. return tmp_value.bitc.ep7tx;
  2857. }
  2858. GH_INLINE void GH_USB_set_IntrTxE_EP8Tx(U8 data)
  2859. {
  2860. GH_USB_INTRTXE_S d;
  2861. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2862. d.bitc.ep8tx = data;
  2863. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2864. #if GH_USB_ENABLE_DEBUG_PRINT
  2865. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP8Tx] <-- 0x%08x\n",
  2866. REG_USB_INTRTXE,d.all,d.all);
  2867. #endif
  2868. }
  2869. GH_INLINE U8 GH_USB_get_IntrTxE_EP8Tx(void)
  2870. {
  2871. GH_USB_INTRTXE_S tmp_value;
  2872. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2873. tmp_value.all = value;
  2874. #if GH_USB_ENABLE_DEBUG_PRINT
  2875. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP8Tx] --> 0x%08x\n",
  2876. REG_USB_INTRTXE,value);
  2877. #endif
  2878. return tmp_value.bitc.ep8tx;
  2879. }
  2880. GH_INLINE void GH_USB_set_IntrTxE_EP9Tx(U8 data)
  2881. {
  2882. GH_USB_INTRTXE_S d;
  2883. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2884. d.bitc.ep9tx = data;
  2885. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2886. #if GH_USB_ENABLE_DEBUG_PRINT
  2887. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP9Tx] <-- 0x%08x\n",
  2888. REG_USB_INTRTXE,d.all,d.all);
  2889. #endif
  2890. }
  2891. GH_INLINE U8 GH_USB_get_IntrTxE_EP9Tx(void)
  2892. {
  2893. GH_USB_INTRTXE_S tmp_value;
  2894. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2895. tmp_value.all = value;
  2896. #if GH_USB_ENABLE_DEBUG_PRINT
  2897. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP9Tx] --> 0x%08x\n",
  2898. REG_USB_INTRTXE,value);
  2899. #endif
  2900. return tmp_value.bitc.ep9tx;
  2901. }
  2902. GH_INLINE void GH_USB_set_IntrTxE_EP10Tx(U8 data)
  2903. {
  2904. GH_USB_INTRTXE_S d;
  2905. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2906. d.bitc.ep10tx = data;
  2907. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2908. #if GH_USB_ENABLE_DEBUG_PRINT
  2909. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP10Tx] <-- 0x%08x\n",
  2910. REG_USB_INTRTXE,d.all,d.all);
  2911. #endif
  2912. }
  2913. GH_INLINE U8 GH_USB_get_IntrTxE_EP10Tx(void)
  2914. {
  2915. GH_USB_INTRTXE_S tmp_value;
  2916. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2917. tmp_value.all = value;
  2918. #if GH_USB_ENABLE_DEBUG_PRINT
  2919. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP10Tx] --> 0x%08x\n",
  2920. REG_USB_INTRTXE,value);
  2921. #endif
  2922. return tmp_value.bitc.ep10tx;
  2923. }
  2924. GH_INLINE void GH_USB_set_IntrTxE_EP11Tx(U8 data)
  2925. {
  2926. GH_USB_INTRTXE_S d;
  2927. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2928. d.bitc.ep11tx = data;
  2929. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2930. #if GH_USB_ENABLE_DEBUG_PRINT
  2931. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP11Tx] <-- 0x%08x\n",
  2932. REG_USB_INTRTXE,d.all,d.all);
  2933. #endif
  2934. }
  2935. GH_INLINE U8 GH_USB_get_IntrTxE_EP11Tx(void)
  2936. {
  2937. GH_USB_INTRTXE_S tmp_value;
  2938. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2939. tmp_value.all = value;
  2940. #if GH_USB_ENABLE_DEBUG_PRINT
  2941. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP11Tx] --> 0x%08x\n",
  2942. REG_USB_INTRTXE,value);
  2943. #endif
  2944. return tmp_value.bitc.ep11tx;
  2945. }
  2946. GH_INLINE void GH_USB_set_IntrTxE_EP12Tx(U8 data)
  2947. {
  2948. GH_USB_INTRTXE_S d;
  2949. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2950. d.bitc.ep12tx = data;
  2951. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2952. #if GH_USB_ENABLE_DEBUG_PRINT
  2953. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP12Tx] <-- 0x%08x\n",
  2954. REG_USB_INTRTXE,d.all,d.all);
  2955. #endif
  2956. }
  2957. GH_INLINE U8 GH_USB_get_IntrTxE_EP12Tx(void)
  2958. {
  2959. GH_USB_INTRTXE_S tmp_value;
  2960. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2961. tmp_value.all = value;
  2962. #if GH_USB_ENABLE_DEBUG_PRINT
  2963. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP12Tx] --> 0x%08x\n",
  2964. REG_USB_INTRTXE,value);
  2965. #endif
  2966. return tmp_value.bitc.ep12tx;
  2967. }
  2968. GH_INLINE void GH_USB_set_IntrTxE_EP13Tx(U8 data)
  2969. {
  2970. GH_USB_INTRTXE_S d;
  2971. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2972. d.bitc.ep13tx = data;
  2973. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2974. #if GH_USB_ENABLE_DEBUG_PRINT
  2975. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP13Tx] <-- 0x%08x\n",
  2976. REG_USB_INTRTXE,d.all,d.all);
  2977. #endif
  2978. }
  2979. GH_INLINE U8 GH_USB_get_IntrTxE_EP13Tx(void)
  2980. {
  2981. GH_USB_INTRTXE_S tmp_value;
  2982. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  2983. tmp_value.all = value;
  2984. #if GH_USB_ENABLE_DEBUG_PRINT
  2985. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP13Tx] --> 0x%08x\n",
  2986. REG_USB_INTRTXE,value);
  2987. #endif
  2988. return tmp_value.bitc.ep13tx;
  2989. }
  2990. GH_INLINE void GH_USB_set_IntrTxE_EP14Tx(U8 data)
  2991. {
  2992. GH_USB_INTRTXE_S d;
  2993. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  2994. d.bitc.ep14tx = data;
  2995. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  2996. #if GH_USB_ENABLE_DEBUG_PRINT
  2997. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP14Tx] <-- 0x%08x\n",
  2998. REG_USB_INTRTXE,d.all,d.all);
  2999. #endif
  3000. }
  3001. GH_INLINE U8 GH_USB_get_IntrTxE_EP14Tx(void)
  3002. {
  3003. GH_USB_INTRTXE_S tmp_value;
  3004. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  3005. tmp_value.all = value;
  3006. #if GH_USB_ENABLE_DEBUG_PRINT
  3007. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP14Tx] --> 0x%08x\n",
  3008. REG_USB_INTRTXE,value);
  3009. #endif
  3010. return tmp_value.bitc.ep14tx;
  3011. }
  3012. GH_INLINE void GH_USB_set_IntrTxE_EP15Tx(U8 data)
  3013. {
  3014. GH_USB_INTRTXE_S d;
  3015. d.all = *(volatile U16 *)REG_USB_INTRTXE;
  3016. d.bitc.ep15tx = data;
  3017. *(volatile U16 *)REG_USB_INTRTXE = d.all;
  3018. #if GH_USB_ENABLE_DEBUG_PRINT
  3019. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_EP15Tx] <-- 0x%08x\n",
  3020. REG_USB_INTRTXE,d.all,d.all);
  3021. #endif
  3022. }
  3023. GH_INLINE U8 GH_USB_get_IntrTxE_EP15Tx(void)
  3024. {
  3025. GH_USB_INTRTXE_S tmp_value;
  3026. U16 value = (*(volatile U16 *)REG_USB_INTRTXE);
  3027. tmp_value.all = value;
  3028. #if GH_USB_ENABLE_DEBUG_PRINT
  3029. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_EP15Tx] --> 0x%08x\n",
  3030. REG_USB_INTRTXE,value);
  3031. #endif
  3032. return tmp_value.bitc.ep15tx;
  3033. }
  3034. #endif /* GH_INLINE_LEVEL == 0 */
  3035. /*----------------------------------------------------------------------------*/
  3036. /* register USB_IntrTxE_L (read/write) */
  3037. /*----------------------------------------------------------------------------*/
  3038. #if GH_INLINE_LEVEL == 0
  3039. /*! \brief Writes the register 'USB_IntrTxE_L'. */
  3040. void GH_USB_set_IntrTxE_L(U8 data);
  3041. /*! \brief Reads the register 'USB_IntrTxE_L'. */
  3042. U8 GH_USB_get_IntrTxE_L(void);
  3043. /*! \brief Writes the bit group 'EP0' of register 'USB_IntrTxE_L'. */
  3044. void GH_USB_set_IntrTxE_L_EP0(U8 data);
  3045. /*! \brief Reads the bit group 'EP0' of register 'USB_IntrTxE_L'. */
  3046. U8 GH_USB_get_IntrTxE_L_EP0(void);
  3047. /*! \brief Writes the bit group 'EP1Tx' of register 'USB_IntrTxE_L'. */
  3048. void GH_USB_set_IntrTxE_L_EP1Tx(U8 data);
  3049. /*! \brief Reads the bit group 'EP1Tx' of register 'USB_IntrTxE_L'. */
  3050. U8 GH_USB_get_IntrTxE_L_EP1Tx(void);
  3051. /*! \brief Writes the bit group 'EP2Tx' of register 'USB_IntrTxE_L'. */
  3052. void GH_USB_set_IntrTxE_L_EP2Tx(U8 data);
  3053. /*! \brief Reads the bit group 'EP2Tx' of register 'USB_IntrTxE_L'. */
  3054. U8 GH_USB_get_IntrTxE_L_EP2Tx(void);
  3055. /*! \brief Writes the bit group 'EP3Tx' of register 'USB_IntrTxE_L'. */
  3056. void GH_USB_set_IntrTxE_L_EP3Tx(U8 data);
  3057. /*! \brief Reads the bit group 'EP3Tx' of register 'USB_IntrTxE_L'. */
  3058. U8 GH_USB_get_IntrTxE_L_EP3Tx(void);
  3059. /*! \brief Writes the bit group 'EP4Tx' of register 'USB_IntrTxE_L'. */
  3060. void GH_USB_set_IntrTxE_L_EP4Tx(U8 data);
  3061. /*! \brief Reads the bit group 'EP4Tx' of register 'USB_IntrTxE_L'. */
  3062. U8 GH_USB_get_IntrTxE_L_EP4Tx(void);
  3063. /*! \brief Writes the bit group 'EP5Tx' of register 'USB_IntrTxE_L'. */
  3064. void GH_USB_set_IntrTxE_L_EP5Tx(U8 data);
  3065. /*! \brief Reads the bit group 'EP5Tx' of register 'USB_IntrTxE_L'. */
  3066. U8 GH_USB_get_IntrTxE_L_EP5Tx(void);
  3067. /*! \brief Writes the bit group 'EP6Tx' of register 'USB_IntrTxE_L'. */
  3068. void GH_USB_set_IntrTxE_L_EP6Tx(U8 data);
  3069. /*! \brief Reads the bit group 'EP6Tx' of register 'USB_IntrTxE_L'. */
  3070. U8 GH_USB_get_IntrTxE_L_EP6Tx(void);
  3071. /*! \brief Writes the bit group 'EP7Tx' of register 'USB_IntrTxE_L'. */
  3072. void GH_USB_set_IntrTxE_L_EP7Tx(U8 data);
  3073. /*! \brief Reads the bit group 'EP7Tx' of register 'USB_IntrTxE_L'. */
  3074. U8 GH_USB_get_IntrTxE_L_EP7Tx(void);
  3075. #else /* GH_INLINE_LEVEL == 0 */
  3076. GH_INLINE void GH_USB_set_IntrTxE_L(U8 data)
  3077. {
  3078. *(volatile U8 *)REG_USB_INTRTXE_L = data;
  3079. #if GH_USB_ENABLE_DEBUG_PRINT
  3080. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L] <-- 0x%08x\n",
  3081. REG_USB_INTRTXE_L,data,data);
  3082. #endif
  3083. }
  3084. GH_INLINE U8 GH_USB_get_IntrTxE_L(void)
  3085. {
  3086. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3087. #if GH_USB_ENABLE_DEBUG_PRINT
  3088. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L] --> 0x%08x\n",
  3089. REG_USB_INTRTXE_L,value);
  3090. #endif
  3091. return value;
  3092. }
  3093. GH_INLINE void GH_USB_set_IntrTxE_L_EP0(U8 data)
  3094. {
  3095. GH_USB_INTRTXE_L_S d;
  3096. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3097. d.bitc.ep0 = data;
  3098. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3099. #if GH_USB_ENABLE_DEBUG_PRINT
  3100. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP0] <-- 0x%08x\n",
  3101. REG_USB_INTRTXE_L,d.all,d.all);
  3102. #endif
  3103. }
  3104. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP0(void)
  3105. {
  3106. GH_USB_INTRTXE_L_S tmp_value;
  3107. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3108. tmp_value.all = value;
  3109. #if GH_USB_ENABLE_DEBUG_PRINT
  3110. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP0] --> 0x%08x\n",
  3111. REG_USB_INTRTXE_L,value);
  3112. #endif
  3113. return tmp_value.bitc.ep0;
  3114. }
  3115. GH_INLINE void GH_USB_set_IntrTxE_L_EP1Tx(U8 data)
  3116. {
  3117. GH_USB_INTRTXE_L_S d;
  3118. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3119. d.bitc.ep1tx = data;
  3120. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3121. #if GH_USB_ENABLE_DEBUG_PRINT
  3122. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP1Tx] <-- 0x%08x\n",
  3123. REG_USB_INTRTXE_L,d.all,d.all);
  3124. #endif
  3125. }
  3126. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP1Tx(void)
  3127. {
  3128. GH_USB_INTRTXE_L_S tmp_value;
  3129. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3130. tmp_value.all = value;
  3131. #if GH_USB_ENABLE_DEBUG_PRINT
  3132. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP1Tx] --> 0x%08x\n",
  3133. REG_USB_INTRTXE_L,value);
  3134. #endif
  3135. return tmp_value.bitc.ep1tx;
  3136. }
  3137. GH_INLINE void GH_USB_set_IntrTxE_L_EP2Tx(U8 data)
  3138. {
  3139. GH_USB_INTRTXE_L_S d;
  3140. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3141. d.bitc.ep2tx = data;
  3142. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3143. #if GH_USB_ENABLE_DEBUG_PRINT
  3144. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP2Tx] <-- 0x%08x\n",
  3145. REG_USB_INTRTXE_L,d.all,d.all);
  3146. #endif
  3147. }
  3148. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP2Tx(void)
  3149. {
  3150. GH_USB_INTRTXE_L_S tmp_value;
  3151. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3152. tmp_value.all = value;
  3153. #if GH_USB_ENABLE_DEBUG_PRINT
  3154. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP2Tx] --> 0x%08x\n",
  3155. REG_USB_INTRTXE_L,value);
  3156. #endif
  3157. return tmp_value.bitc.ep2tx;
  3158. }
  3159. GH_INLINE void GH_USB_set_IntrTxE_L_EP3Tx(U8 data)
  3160. {
  3161. GH_USB_INTRTXE_L_S d;
  3162. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3163. d.bitc.ep3tx = data;
  3164. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3165. #if GH_USB_ENABLE_DEBUG_PRINT
  3166. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP3Tx] <-- 0x%08x\n",
  3167. REG_USB_INTRTXE_L,d.all,d.all);
  3168. #endif
  3169. }
  3170. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP3Tx(void)
  3171. {
  3172. GH_USB_INTRTXE_L_S tmp_value;
  3173. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3174. tmp_value.all = value;
  3175. #if GH_USB_ENABLE_DEBUG_PRINT
  3176. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP3Tx] --> 0x%08x\n",
  3177. REG_USB_INTRTXE_L,value);
  3178. #endif
  3179. return tmp_value.bitc.ep3tx;
  3180. }
  3181. GH_INLINE void GH_USB_set_IntrTxE_L_EP4Tx(U8 data)
  3182. {
  3183. GH_USB_INTRTXE_L_S d;
  3184. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3185. d.bitc.ep4tx = data;
  3186. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3187. #if GH_USB_ENABLE_DEBUG_PRINT
  3188. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP4Tx] <-- 0x%08x\n",
  3189. REG_USB_INTRTXE_L,d.all,d.all);
  3190. #endif
  3191. }
  3192. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP4Tx(void)
  3193. {
  3194. GH_USB_INTRTXE_L_S tmp_value;
  3195. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3196. tmp_value.all = value;
  3197. #if GH_USB_ENABLE_DEBUG_PRINT
  3198. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP4Tx] --> 0x%08x\n",
  3199. REG_USB_INTRTXE_L,value);
  3200. #endif
  3201. return tmp_value.bitc.ep4tx;
  3202. }
  3203. GH_INLINE void GH_USB_set_IntrTxE_L_EP5Tx(U8 data)
  3204. {
  3205. GH_USB_INTRTXE_L_S d;
  3206. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3207. d.bitc.ep5tx = data;
  3208. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3209. #if GH_USB_ENABLE_DEBUG_PRINT
  3210. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP5Tx] <-- 0x%08x\n",
  3211. REG_USB_INTRTXE_L,d.all,d.all);
  3212. #endif
  3213. }
  3214. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP5Tx(void)
  3215. {
  3216. GH_USB_INTRTXE_L_S tmp_value;
  3217. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3218. tmp_value.all = value;
  3219. #if GH_USB_ENABLE_DEBUG_PRINT
  3220. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP5Tx] --> 0x%08x\n",
  3221. REG_USB_INTRTXE_L,value);
  3222. #endif
  3223. return tmp_value.bitc.ep5tx;
  3224. }
  3225. GH_INLINE void GH_USB_set_IntrTxE_L_EP6Tx(U8 data)
  3226. {
  3227. GH_USB_INTRTXE_L_S d;
  3228. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3229. d.bitc.ep6tx = data;
  3230. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3231. #if GH_USB_ENABLE_DEBUG_PRINT
  3232. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP6Tx] <-- 0x%08x\n",
  3233. REG_USB_INTRTXE_L,d.all,d.all);
  3234. #endif
  3235. }
  3236. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP6Tx(void)
  3237. {
  3238. GH_USB_INTRTXE_L_S tmp_value;
  3239. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3240. tmp_value.all = value;
  3241. #if GH_USB_ENABLE_DEBUG_PRINT
  3242. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP6Tx] --> 0x%08x\n",
  3243. REG_USB_INTRTXE_L,value);
  3244. #endif
  3245. return tmp_value.bitc.ep6tx;
  3246. }
  3247. GH_INLINE void GH_USB_set_IntrTxE_L_EP7Tx(U8 data)
  3248. {
  3249. GH_USB_INTRTXE_L_S d;
  3250. d.all = *(volatile U8 *)REG_USB_INTRTXE_L;
  3251. d.bitc.ep7tx = data;
  3252. *(volatile U8 *)REG_USB_INTRTXE_L = d.all;
  3253. #if GH_USB_ENABLE_DEBUG_PRINT
  3254. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_L_EP7Tx] <-- 0x%08x\n",
  3255. REG_USB_INTRTXE_L,d.all,d.all);
  3256. #endif
  3257. }
  3258. GH_INLINE U8 GH_USB_get_IntrTxE_L_EP7Tx(void)
  3259. {
  3260. GH_USB_INTRTXE_L_S tmp_value;
  3261. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_L);
  3262. tmp_value.all = value;
  3263. #if GH_USB_ENABLE_DEBUG_PRINT
  3264. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_L_EP7Tx] --> 0x%08x\n",
  3265. REG_USB_INTRTXE_L,value);
  3266. #endif
  3267. return tmp_value.bitc.ep7tx;
  3268. }
  3269. #endif /* GH_INLINE_LEVEL == 0 */
  3270. /*----------------------------------------------------------------------------*/
  3271. /* register USB_IntrTxE_H (read/write) */
  3272. /*----------------------------------------------------------------------------*/
  3273. #if GH_INLINE_LEVEL == 0
  3274. /*! \brief Writes the register 'USB_IntrTxE_H'. */
  3275. void GH_USB_set_IntrTxE_H(U8 data);
  3276. /*! \brief Reads the register 'USB_IntrTxE_H'. */
  3277. U8 GH_USB_get_IntrTxE_H(void);
  3278. /*! \brief Writes the bit group 'EP8Tx' of register 'USB_IntrTxE_H'. */
  3279. void GH_USB_set_IntrTxE_H_EP8Tx(U8 data);
  3280. /*! \brief Reads the bit group 'EP8Tx' of register 'USB_IntrTxE_H'. */
  3281. U8 GH_USB_get_IntrTxE_H_EP8Tx(void);
  3282. /*! \brief Writes the bit group 'EP9Tx' of register 'USB_IntrTxE_H'. */
  3283. void GH_USB_set_IntrTxE_H_EP9Tx(U8 data);
  3284. /*! \brief Reads the bit group 'EP9Tx' of register 'USB_IntrTxE_H'. */
  3285. U8 GH_USB_get_IntrTxE_H_EP9Tx(void);
  3286. /*! \brief Writes the bit group 'EP10Tx' of register 'USB_IntrTxE_H'. */
  3287. void GH_USB_set_IntrTxE_H_EP10Tx(U8 data);
  3288. /*! \brief Reads the bit group 'EP10Tx' of register 'USB_IntrTxE_H'. */
  3289. U8 GH_USB_get_IntrTxE_H_EP10Tx(void);
  3290. /*! \brief Writes the bit group 'EP11Tx' of register 'USB_IntrTxE_H'. */
  3291. void GH_USB_set_IntrTxE_H_EP11Tx(U8 data);
  3292. /*! \brief Reads the bit group 'EP11Tx' of register 'USB_IntrTxE_H'. */
  3293. U8 GH_USB_get_IntrTxE_H_EP11Tx(void);
  3294. /*! \brief Writes the bit group 'EP12Tx' of register 'USB_IntrTxE_H'. */
  3295. void GH_USB_set_IntrTxE_H_EP12Tx(U8 data);
  3296. /*! \brief Reads the bit group 'EP12Tx' of register 'USB_IntrTxE_H'. */
  3297. U8 GH_USB_get_IntrTxE_H_EP12Tx(void);
  3298. /*! \brief Writes the bit group 'EP13Tx' of register 'USB_IntrTxE_H'. */
  3299. void GH_USB_set_IntrTxE_H_EP13Tx(U8 data);
  3300. /*! \brief Reads the bit group 'EP13Tx' of register 'USB_IntrTxE_H'. */
  3301. U8 GH_USB_get_IntrTxE_H_EP13Tx(void);
  3302. /*! \brief Writes the bit group 'EP14Tx' of register 'USB_IntrTxE_H'. */
  3303. void GH_USB_set_IntrTxE_H_EP14Tx(U8 data);
  3304. /*! \brief Reads the bit group 'EP14Tx' of register 'USB_IntrTxE_H'. */
  3305. U8 GH_USB_get_IntrTxE_H_EP14Tx(void);
  3306. /*! \brief Writes the bit group 'EP15Tx' of register 'USB_IntrTxE_H'. */
  3307. void GH_USB_set_IntrTxE_H_EP15Tx(U8 data);
  3308. /*! \brief Reads the bit group 'EP15Tx' of register 'USB_IntrTxE_H'. */
  3309. U8 GH_USB_get_IntrTxE_H_EP15Tx(void);
  3310. #else /* GH_INLINE_LEVEL == 0 */
  3311. GH_INLINE void GH_USB_set_IntrTxE_H(U8 data)
  3312. {
  3313. *(volatile U8 *)REG_USB_INTRTXE_H = data;
  3314. #if GH_USB_ENABLE_DEBUG_PRINT
  3315. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H] <-- 0x%08x\n",
  3316. REG_USB_INTRTXE_H,data,data);
  3317. #endif
  3318. }
  3319. GH_INLINE U8 GH_USB_get_IntrTxE_H(void)
  3320. {
  3321. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3322. #if GH_USB_ENABLE_DEBUG_PRINT
  3323. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H] --> 0x%08x\n",
  3324. REG_USB_INTRTXE_H,value);
  3325. #endif
  3326. return value;
  3327. }
  3328. GH_INLINE void GH_USB_set_IntrTxE_H_EP8Tx(U8 data)
  3329. {
  3330. GH_USB_INTRTXE_H_S d;
  3331. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3332. d.bitc.ep8tx = data;
  3333. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3334. #if GH_USB_ENABLE_DEBUG_PRINT
  3335. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP8Tx] <-- 0x%08x\n",
  3336. REG_USB_INTRTXE_H,d.all,d.all);
  3337. #endif
  3338. }
  3339. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP8Tx(void)
  3340. {
  3341. GH_USB_INTRTXE_H_S tmp_value;
  3342. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3343. tmp_value.all = value;
  3344. #if GH_USB_ENABLE_DEBUG_PRINT
  3345. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP8Tx] --> 0x%08x\n",
  3346. REG_USB_INTRTXE_H,value);
  3347. #endif
  3348. return tmp_value.bitc.ep8tx;
  3349. }
  3350. GH_INLINE void GH_USB_set_IntrTxE_H_EP9Tx(U8 data)
  3351. {
  3352. GH_USB_INTRTXE_H_S d;
  3353. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3354. d.bitc.ep9tx = data;
  3355. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3356. #if GH_USB_ENABLE_DEBUG_PRINT
  3357. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP9Tx] <-- 0x%08x\n",
  3358. REG_USB_INTRTXE_H,d.all,d.all);
  3359. #endif
  3360. }
  3361. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP9Tx(void)
  3362. {
  3363. GH_USB_INTRTXE_H_S tmp_value;
  3364. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3365. tmp_value.all = value;
  3366. #if GH_USB_ENABLE_DEBUG_PRINT
  3367. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP9Tx] --> 0x%08x\n",
  3368. REG_USB_INTRTXE_H,value);
  3369. #endif
  3370. return tmp_value.bitc.ep9tx;
  3371. }
  3372. GH_INLINE void GH_USB_set_IntrTxE_H_EP10Tx(U8 data)
  3373. {
  3374. GH_USB_INTRTXE_H_S d;
  3375. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3376. d.bitc.ep10tx = data;
  3377. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3378. #if GH_USB_ENABLE_DEBUG_PRINT
  3379. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP10Tx] <-- 0x%08x\n",
  3380. REG_USB_INTRTXE_H,d.all,d.all);
  3381. #endif
  3382. }
  3383. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP10Tx(void)
  3384. {
  3385. GH_USB_INTRTXE_H_S tmp_value;
  3386. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3387. tmp_value.all = value;
  3388. #if GH_USB_ENABLE_DEBUG_PRINT
  3389. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP10Tx] --> 0x%08x\n",
  3390. REG_USB_INTRTXE_H,value);
  3391. #endif
  3392. return tmp_value.bitc.ep10tx;
  3393. }
  3394. GH_INLINE void GH_USB_set_IntrTxE_H_EP11Tx(U8 data)
  3395. {
  3396. GH_USB_INTRTXE_H_S d;
  3397. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3398. d.bitc.ep11tx = data;
  3399. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3400. #if GH_USB_ENABLE_DEBUG_PRINT
  3401. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP11Tx] <-- 0x%08x\n",
  3402. REG_USB_INTRTXE_H,d.all,d.all);
  3403. #endif
  3404. }
  3405. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP11Tx(void)
  3406. {
  3407. GH_USB_INTRTXE_H_S tmp_value;
  3408. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3409. tmp_value.all = value;
  3410. #if GH_USB_ENABLE_DEBUG_PRINT
  3411. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP11Tx] --> 0x%08x\n",
  3412. REG_USB_INTRTXE_H,value);
  3413. #endif
  3414. return tmp_value.bitc.ep11tx;
  3415. }
  3416. GH_INLINE void GH_USB_set_IntrTxE_H_EP12Tx(U8 data)
  3417. {
  3418. GH_USB_INTRTXE_H_S d;
  3419. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3420. d.bitc.ep12tx = data;
  3421. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3422. #if GH_USB_ENABLE_DEBUG_PRINT
  3423. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP12Tx] <-- 0x%08x\n",
  3424. REG_USB_INTRTXE_H,d.all,d.all);
  3425. #endif
  3426. }
  3427. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP12Tx(void)
  3428. {
  3429. GH_USB_INTRTXE_H_S tmp_value;
  3430. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3431. tmp_value.all = value;
  3432. #if GH_USB_ENABLE_DEBUG_PRINT
  3433. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP12Tx] --> 0x%08x\n",
  3434. REG_USB_INTRTXE_H,value);
  3435. #endif
  3436. return tmp_value.bitc.ep12tx;
  3437. }
  3438. GH_INLINE void GH_USB_set_IntrTxE_H_EP13Tx(U8 data)
  3439. {
  3440. GH_USB_INTRTXE_H_S d;
  3441. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3442. d.bitc.ep13tx = data;
  3443. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3444. #if GH_USB_ENABLE_DEBUG_PRINT
  3445. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP13Tx] <-- 0x%08x\n",
  3446. REG_USB_INTRTXE_H,d.all,d.all);
  3447. #endif
  3448. }
  3449. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP13Tx(void)
  3450. {
  3451. GH_USB_INTRTXE_H_S tmp_value;
  3452. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3453. tmp_value.all = value;
  3454. #if GH_USB_ENABLE_DEBUG_PRINT
  3455. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP13Tx] --> 0x%08x\n",
  3456. REG_USB_INTRTXE_H,value);
  3457. #endif
  3458. return tmp_value.bitc.ep13tx;
  3459. }
  3460. GH_INLINE void GH_USB_set_IntrTxE_H_EP14Tx(U8 data)
  3461. {
  3462. GH_USB_INTRTXE_H_S d;
  3463. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3464. d.bitc.ep14tx = data;
  3465. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3466. #if GH_USB_ENABLE_DEBUG_PRINT
  3467. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP14Tx] <-- 0x%08x\n",
  3468. REG_USB_INTRTXE_H,d.all,d.all);
  3469. #endif
  3470. }
  3471. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP14Tx(void)
  3472. {
  3473. GH_USB_INTRTXE_H_S tmp_value;
  3474. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3475. tmp_value.all = value;
  3476. #if GH_USB_ENABLE_DEBUG_PRINT
  3477. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP14Tx] --> 0x%08x\n",
  3478. REG_USB_INTRTXE_H,value);
  3479. #endif
  3480. return tmp_value.bitc.ep14tx;
  3481. }
  3482. GH_INLINE void GH_USB_set_IntrTxE_H_EP15Tx(U8 data)
  3483. {
  3484. GH_USB_INTRTXE_H_S d;
  3485. d.all = *(volatile U8 *)REG_USB_INTRTXE_H;
  3486. d.bitc.ep15tx = data;
  3487. *(volatile U8 *)REG_USB_INTRTXE_H = d.all;
  3488. #if GH_USB_ENABLE_DEBUG_PRINT
  3489. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrTxE_H_EP15Tx] <-- 0x%08x\n",
  3490. REG_USB_INTRTXE_H,d.all,d.all);
  3491. #endif
  3492. }
  3493. GH_INLINE U8 GH_USB_get_IntrTxE_H_EP15Tx(void)
  3494. {
  3495. GH_USB_INTRTXE_H_S tmp_value;
  3496. U8 value = (*(volatile U8 *)REG_USB_INTRTXE_H);
  3497. tmp_value.all = value;
  3498. #if GH_USB_ENABLE_DEBUG_PRINT
  3499. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrTxE_H_EP15Tx] --> 0x%08x\n",
  3500. REG_USB_INTRTXE_H,value);
  3501. #endif
  3502. return tmp_value.bitc.ep15tx;
  3503. }
  3504. #endif /* GH_INLINE_LEVEL == 0 */
  3505. /*----------------------------------------------------------------------------*/
  3506. /* register USB_IntrRxE (read/write) */
  3507. /*----------------------------------------------------------------------------*/
  3508. #if GH_INLINE_LEVEL == 0
  3509. /*! \brief Writes the register 'USB_IntrRxE'. */
  3510. void GH_USB_set_IntrRxE(U16 data);
  3511. /*! \brief Reads the register 'USB_IntrRxE'. */
  3512. U16 GH_USB_get_IntrRxE(void);
  3513. /*! \brief Writes the bit group 'EP1Rx' of register 'USB_IntrRxE'. */
  3514. void GH_USB_set_IntrRxE_EP1Rx(U8 data);
  3515. /*! \brief Reads the bit group 'EP1Rx' of register 'USB_IntrRxE'. */
  3516. U8 GH_USB_get_IntrRxE_EP1Rx(void);
  3517. /*! \brief Writes the bit group 'EP2Rx' of register 'USB_IntrRxE'. */
  3518. void GH_USB_set_IntrRxE_EP2Rx(U8 data);
  3519. /*! \brief Reads the bit group 'EP2Rx' of register 'USB_IntrRxE'. */
  3520. U8 GH_USB_get_IntrRxE_EP2Rx(void);
  3521. /*! \brief Writes the bit group 'EP3Rx' of register 'USB_IntrRxE'. */
  3522. void GH_USB_set_IntrRxE_EP3Rx(U8 data);
  3523. /*! \brief Reads the bit group 'EP3Rx' of register 'USB_IntrRxE'. */
  3524. U8 GH_USB_get_IntrRxE_EP3Rx(void);
  3525. /*! \brief Writes the bit group 'EP4Rx' of register 'USB_IntrRxE'. */
  3526. void GH_USB_set_IntrRxE_EP4Rx(U8 data);
  3527. /*! \brief Reads the bit group 'EP4Rx' of register 'USB_IntrRxE'. */
  3528. U8 GH_USB_get_IntrRxE_EP4Rx(void);
  3529. /*! \brief Writes the bit group 'EP5Rx' of register 'USB_IntrRxE'. */
  3530. void GH_USB_set_IntrRxE_EP5Rx(U8 data);
  3531. /*! \brief Reads the bit group 'EP5Rx' of register 'USB_IntrRxE'. */
  3532. U8 GH_USB_get_IntrRxE_EP5Rx(void);
  3533. /*! \brief Writes the bit group 'EP6Rx' of register 'USB_IntrRxE'. */
  3534. void GH_USB_set_IntrRxE_EP6Rx(U8 data);
  3535. /*! \brief Reads the bit group 'EP6Rx' of register 'USB_IntrRxE'. */
  3536. U8 GH_USB_get_IntrRxE_EP6Rx(void);
  3537. /*! \brief Writes the bit group 'EP7Rx' of register 'USB_IntrRxE'. */
  3538. void GH_USB_set_IntrRxE_EP7Rx(U8 data);
  3539. /*! \brief Reads the bit group 'EP7Rx' of register 'USB_IntrRxE'. */
  3540. U8 GH_USB_get_IntrRxE_EP7Rx(void);
  3541. /*! \brief Writes the bit group 'EP8Rx' of register 'USB_IntrRxE'. */
  3542. void GH_USB_set_IntrRxE_EP8Rx(U8 data);
  3543. /*! \brief Reads the bit group 'EP8Rx' of register 'USB_IntrRxE'. */
  3544. U8 GH_USB_get_IntrRxE_EP8Rx(void);
  3545. /*! \brief Writes the bit group 'EP9Rx' of register 'USB_IntrRxE'. */
  3546. void GH_USB_set_IntrRxE_EP9Rx(U8 data);
  3547. /*! \brief Reads the bit group 'EP9Rx' of register 'USB_IntrRxE'. */
  3548. U8 GH_USB_get_IntrRxE_EP9Rx(void);
  3549. /*! \brief Writes the bit group 'EP10Rx' of register 'USB_IntrRxE'. */
  3550. void GH_USB_set_IntrRxE_EP10Rx(U8 data);
  3551. /*! \brief Reads the bit group 'EP10Rx' of register 'USB_IntrRxE'. */
  3552. U8 GH_USB_get_IntrRxE_EP10Rx(void);
  3553. /*! \brief Writes the bit group 'EP11Rx' of register 'USB_IntrRxE'. */
  3554. void GH_USB_set_IntrRxE_EP11Rx(U8 data);
  3555. /*! \brief Reads the bit group 'EP11Rx' of register 'USB_IntrRxE'. */
  3556. U8 GH_USB_get_IntrRxE_EP11Rx(void);
  3557. /*! \brief Writes the bit group 'EP12Rx' of register 'USB_IntrRxE'. */
  3558. void GH_USB_set_IntrRxE_EP12Rx(U8 data);
  3559. /*! \brief Reads the bit group 'EP12Rx' of register 'USB_IntrRxE'. */
  3560. U8 GH_USB_get_IntrRxE_EP12Rx(void);
  3561. /*! \brief Writes the bit group 'EP13Rx' of register 'USB_IntrRxE'. */
  3562. void GH_USB_set_IntrRxE_EP13Rx(U8 data);
  3563. /*! \brief Reads the bit group 'EP13Rx' of register 'USB_IntrRxE'. */
  3564. U8 GH_USB_get_IntrRxE_EP13Rx(void);
  3565. /*! \brief Writes the bit group 'EP14Rx' of register 'USB_IntrRxE'. */
  3566. void GH_USB_set_IntrRxE_EP14Rx(U8 data);
  3567. /*! \brief Reads the bit group 'EP14Rx' of register 'USB_IntrRxE'. */
  3568. U8 GH_USB_get_IntrRxE_EP14Rx(void);
  3569. /*! \brief Writes the bit group 'EP15Rx' of register 'USB_IntrRxE'. */
  3570. void GH_USB_set_IntrRxE_EP15Rx(U8 data);
  3571. /*! \brief Reads the bit group 'EP15Rx' of register 'USB_IntrRxE'. */
  3572. U8 GH_USB_get_IntrRxE_EP15Rx(void);
  3573. #else /* GH_INLINE_LEVEL == 0 */
  3574. GH_INLINE void GH_USB_set_IntrRxE(U16 data)
  3575. {
  3576. *(volatile U16 *)REG_USB_INTRRXE = data;
  3577. #if GH_USB_ENABLE_DEBUG_PRINT
  3578. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE] <-- 0x%08x\n",
  3579. REG_USB_INTRRXE,data,data);
  3580. #endif
  3581. }
  3582. GH_INLINE U16 GH_USB_get_IntrRxE(void)
  3583. {
  3584. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3585. #if GH_USB_ENABLE_DEBUG_PRINT
  3586. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE] --> 0x%08x\n",
  3587. REG_USB_INTRRXE,value);
  3588. #endif
  3589. return value;
  3590. }
  3591. GH_INLINE void GH_USB_set_IntrRxE_EP1Rx(U8 data)
  3592. {
  3593. GH_USB_INTRRXE_S d;
  3594. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3595. d.bitc.ep1rx = data;
  3596. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3597. #if GH_USB_ENABLE_DEBUG_PRINT
  3598. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP1Rx] <-- 0x%08x\n",
  3599. REG_USB_INTRRXE,d.all,d.all);
  3600. #endif
  3601. }
  3602. GH_INLINE U8 GH_USB_get_IntrRxE_EP1Rx(void)
  3603. {
  3604. GH_USB_INTRRXE_S tmp_value;
  3605. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3606. tmp_value.all = value;
  3607. #if GH_USB_ENABLE_DEBUG_PRINT
  3608. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP1Rx] --> 0x%08x\n",
  3609. REG_USB_INTRRXE,value);
  3610. #endif
  3611. return tmp_value.bitc.ep1rx;
  3612. }
  3613. GH_INLINE void GH_USB_set_IntrRxE_EP2Rx(U8 data)
  3614. {
  3615. GH_USB_INTRRXE_S d;
  3616. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3617. d.bitc.ep2rx = data;
  3618. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3619. #if GH_USB_ENABLE_DEBUG_PRINT
  3620. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP2Rx] <-- 0x%08x\n",
  3621. REG_USB_INTRRXE,d.all,d.all);
  3622. #endif
  3623. }
  3624. GH_INLINE U8 GH_USB_get_IntrRxE_EP2Rx(void)
  3625. {
  3626. GH_USB_INTRRXE_S tmp_value;
  3627. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3628. tmp_value.all = value;
  3629. #if GH_USB_ENABLE_DEBUG_PRINT
  3630. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP2Rx] --> 0x%08x\n",
  3631. REG_USB_INTRRXE,value);
  3632. #endif
  3633. return tmp_value.bitc.ep2rx;
  3634. }
  3635. GH_INLINE void GH_USB_set_IntrRxE_EP3Rx(U8 data)
  3636. {
  3637. GH_USB_INTRRXE_S d;
  3638. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3639. d.bitc.ep3rx = data;
  3640. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3641. #if GH_USB_ENABLE_DEBUG_PRINT
  3642. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP3Rx] <-- 0x%08x\n",
  3643. REG_USB_INTRRXE,d.all,d.all);
  3644. #endif
  3645. }
  3646. GH_INLINE U8 GH_USB_get_IntrRxE_EP3Rx(void)
  3647. {
  3648. GH_USB_INTRRXE_S tmp_value;
  3649. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3650. tmp_value.all = value;
  3651. #if GH_USB_ENABLE_DEBUG_PRINT
  3652. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP3Rx] --> 0x%08x\n",
  3653. REG_USB_INTRRXE,value);
  3654. #endif
  3655. return tmp_value.bitc.ep3rx;
  3656. }
  3657. GH_INLINE void GH_USB_set_IntrRxE_EP4Rx(U8 data)
  3658. {
  3659. GH_USB_INTRRXE_S d;
  3660. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3661. d.bitc.ep4rx = data;
  3662. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3663. #if GH_USB_ENABLE_DEBUG_PRINT
  3664. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP4Rx] <-- 0x%08x\n",
  3665. REG_USB_INTRRXE,d.all,d.all);
  3666. #endif
  3667. }
  3668. GH_INLINE U8 GH_USB_get_IntrRxE_EP4Rx(void)
  3669. {
  3670. GH_USB_INTRRXE_S tmp_value;
  3671. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3672. tmp_value.all = value;
  3673. #if GH_USB_ENABLE_DEBUG_PRINT
  3674. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP4Rx] --> 0x%08x\n",
  3675. REG_USB_INTRRXE,value);
  3676. #endif
  3677. return tmp_value.bitc.ep4rx;
  3678. }
  3679. GH_INLINE void GH_USB_set_IntrRxE_EP5Rx(U8 data)
  3680. {
  3681. GH_USB_INTRRXE_S d;
  3682. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3683. d.bitc.ep5rx = data;
  3684. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3685. #if GH_USB_ENABLE_DEBUG_PRINT
  3686. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP5Rx] <-- 0x%08x\n",
  3687. REG_USB_INTRRXE,d.all,d.all);
  3688. #endif
  3689. }
  3690. GH_INLINE U8 GH_USB_get_IntrRxE_EP5Rx(void)
  3691. {
  3692. GH_USB_INTRRXE_S tmp_value;
  3693. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3694. tmp_value.all = value;
  3695. #if GH_USB_ENABLE_DEBUG_PRINT
  3696. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP5Rx] --> 0x%08x\n",
  3697. REG_USB_INTRRXE,value);
  3698. #endif
  3699. return tmp_value.bitc.ep5rx;
  3700. }
  3701. GH_INLINE void GH_USB_set_IntrRxE_EP6Rx(U8 data)
  3702. {
  3703. GH_USB_INTRRXE_S d;
  3704. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3705. d.bitc.ep6rx = data;
  3706. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3707. #if GH_USB_ENABLE_DEBUG_PRINT
  3708. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP6Rx] <-- 0x%08x\n",
  3709. REG_USB_INTRRXE,d.all,d.all);
  3710. #endif
  3711. }
  3712. GH_INLINE U8 GH_USB_get_IntrRxE_EP6Rx(void)
  3713. {
  3714. GH_USB_INTRRXE_S tmp_value;
  3715. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3716. tmp_value.all = value;
  3717. #if GH_USB_ENABLE_DEBUG_PRINT
  3718. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP6Rx] --> 0x%08x\n",
  3719. REG_USB_INTRRXE,value);
  3720. #endif
  3721. return tmp_value.bitc.ep6rx;
  3722. }
  3723. GH_INLINE void GH_USB_set_IntrRxE_EP7Rx(U8 data)
  3724. {
  3725. GH_USB_INTRRXE_S d;
  3726. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3727. d.bitc.ep7rx = data;
  3728. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3729. #if GH_USB_ENABLE_DEBUG_PRINT
  3730. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP7Rx] <-- 0x%08x\n",
  3731. REG_USB_INTRRXE,d.all,d.all);
  3732. #endif
  3733. }
  3734. GH_INLINE U8 GH_USB_get_IntrRxE_EP7Rx(void)
  3735. {
  3736. GH_USB_INTRRXE_S tmp_value;
  3737. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3738. tmp_value.all = value;
  3739. #if GH_USB_ENABLE_DEBUG_PRINT
  3740. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP7Rx] --> 0x%08x\n",
  3741. REG_USB_INTRRXE,value);
  3742. #endif
  3743. return tmp_value.bitc.ep7rx;
  3744. }
  3745. GH_INLINE void GH_USB_set_IntrRxE_EP8Rx(U8 data)
  3746. {
  3747. GH_USB_INTRRXE_S d;
  3748. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3749. d.bitc.ep8rx = data;
  3750. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3751. #if GH_USB_ENABLE_DEBUG_PRINT
  3752. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP8Rx] <-- 0x%08x\n",
  3753. REG_USB_INTRRXE,d.all,d.all);
  3754. #endif
  3755. }
  3756. GH_INLINE U8 GH_USB_get_IntrRxE_EP8Rx(void)
  3757. {
  3758. GH_USB_INTRRXE_S tmp_value;
  3759. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3760. tmp_value.all = value;
  3761. #if GH_USB_ENABLE_DEBUG_PRINT
  3762. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP8Rx] --> 0x%08x\n",
  3763. REG_USB_INTRRXE,value);
  3764. #endif
  3765. return tmp_value.bitc.ep8rx;
  3766. }
  3767. GH_INLINE void GH_USB_set_IntrRxE_EP9Rx(U8 data)
  3768. {
  3769. GH_USB_INTRRXE_S d;
  3770. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3771. d.bitc.ep9rx = data;
  3772. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3773. #if GH_USB_ENABLE_DEBUG_PRINT
  3774. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP9Rx] <-- 0x%08x\n",
  3775. REG_USB_INTRRXE,d.all,d.all);
  3776. #endif
  3777. }
  3778. GH_INLINE U8 GH_USB_get_IntrRxE_EP9Rx(void)
  3779. {
  3780. GH_USB_INTRRXE_S tmp_value;
  3781. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3782. tmp_value.all = value;
  3783. #if GH_USB_ENABLE_DEBUG_PRINT
  3784. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP9Rx] --> 0x%08x\n",
  3785. REG_USB_INTRRXE,value);
  3786. #endif
  3787. return tmp_value.bitc.ep9rx;
  3788. }
  3789. GH_INLINE void GH_USB_set_IntrRxE_EP10Rx(U8 data)
  3790. {
  3791. GH_USB_INTRRXE_S d;
  3792. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3793. d.bitc.ep10rx = data;
  3794. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3795. #if GH_USB_ENABLE_DEBUG_PRINT
  3796. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP10Rx] <-- 0x%08x\n",
  3797. REG_USB_INTRRXE,d.all,d.all);
  3798. #endif
  3799. }
  3800. GH_INLINE U8 GH_USB_get_IntrRxE_EP10Rx(void)
  3801. {
  3802. GH_USB_INTRRXE_S tmp_value;
  3803. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3804. tmp_value.all = value;
  3805. #if GH_USB_ENABLE_DEBUG_PRINT
  3806. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP10Rx] --> 0x%08x\n",
  3807. REG_USB_INTRRXE,value);
  3808. #endif
  3809. return tmp_value.bitc.ep10rx;
  3810. }
  3811. GH_INLINE void GH_USB_set_IntrRxE_EP11Rx(U8 data)
  3812. {
  3813. GH_USB_INTRRXE_S d;
  3814. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3815. d.bitc.ep11rx = data;
  3816. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3817. #if GH_USB_ENABLE_DEBUG_PRINT
  3818. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP11Rx] <-- 0x%08x\n",
  3819. REG_USB_INTRRXE,d.all,d.all);
  3820. #endif
  3821. }
  3822. GH_INLINE U8 GH_USB_get_IntrRxE_EP11Rx(void)
  3823. {
  3824. GH_USB_INTRRXE_S tmp_value;
  3825. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3826. tmp_value.all = value;
  3827. #if GH_USB_ENABLE_DEBUG_PRINT
  3828. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP11Rx] --> 0x%08x\n",
  3829. REG_USB_INTRRXE,value);
  3830. #endif
  3831. return tmp_value.bitc.ep11rx;
  3832. }
  3833. GH_INLINE void GH_USB_set_IntrRxE_EP12Rx(U8 data)
  3834. {
  3835. GH_USB_INTRRXE_S d;
  3836. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3837. d.bitc.ep12rx = data;
  3838. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3839. #if GH_USB_ENABLE_DEBUG_PRINT
  3840. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP12Rx] <-- 0x%08x\n",
  3841. REG_USB_INTRRXE,d.all,d.all);
  3842. #endif
  3843. }
  3844. GH_INLINE U8 GH_USB_get_IntrRxE_EP12Rx(void)
  3845. {
  3846. GH_USB_INTRRXE_S tmp_value;
  3847. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3848. tmp_value.all = value;
  3849. #if GH_USB_ENABLE_DEBUG_PRINT
  3850. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP12Rx] --> 0x%08x\n",
  3851. REG_USB_INTRRXE,value);
  3852. #endif
  3853. return tmp_value.bitc.ep12rx;
  3854. }
  3855. GH_INLINE void GH_USB_set_IntrRxE_EP13Rx(U8 data)
  3856. {
  3857. GH_USB_INTRRXE_S d;
  3858. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3859. d.bitc.ep13rx = data;
  3860. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3861. #if GH_USB_ENABLE_DEBUG_PRINT
  3862. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP13Rx] <-- 0x%08x\n",
  3863. REG_USB_INTRRXE,d.all,d.all);
  3864. #endif
  3865. }
  3866. GH_INLINE U8 GH_USB_get_IntrRxE_EP13Rx(void)
  3867. {
  3868. GH_USB_INTRRXE_S tmp_value;
  3869. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3870. tmp_value.all = value;
  3871. #if GH_USB_ENABLE_DEBUG_PRINT
  3872. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP13Rx] --> 0x%08x\n",
  3873. REG_USB_INTRRXE,value);
  3874. #endif
  3875. return tmp_value.bitc.ep13rx;
  3876. }
  3877. GH_INLINE void GH_USB_set_IntrRxE_EP14Rx(U8 data)
  3878. {
  3879. GH_USB_INTRRXE_S d;
  3880. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3881. d.bitc.ep14rx = data;
  3882. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3883. #if GH_USB_ENABLE_DEBUG_PRINT
  3884. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP14Rx] <-- 0x%08x\n",
  3885. REG_USB_INTRRXE,d.all,d.all);
  3886. #endif
  3887. }
  3888. GH_INLINE U8 GH_USB_get_IntrRxE_EP14Rx(void)
  3889. {
  3890. GH_USB_INTRRXE_S tmp_value;
  3891. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3892. tmp_value.all = value;
  3893. #if GH_USB_ENABLE_DEBUG_PRINT
  3894. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP14Rx] --> 0x%08x\n",
  3895. REG_USB_INTRRXE,value);
  3896. #endif
  3897. return tmp_value.bitc.ep14rx;
  3898. }
  3899. GH_INLINE void GH_USB_set_IntrRxE_EP15Rx(U8 data)
  3900. {
  3901. GH_USB_INTRRXE_S d;
  3902. d.all = *(volatile U16 *)REG_USB_INTRRXE;
  3903. d.bitc.ep15rx = data;
  3904. *(volatile U16 *)REG_USB_INTRRXE = d.all;
  3905. #if GH_USB_ENABLE_DEBUG_PRINT
  3906. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_EP15Rx] <-- 0x%08x\n",
  3907. REG_USB_INTRRXE,d.all,d.all);
  3908. #endif
  3909. }
  3910. GH_INLINE U8 GH_USB_get_IntrRxE_EP15Rx(void)
  3911. {
  3912. GH_USB_INTRRXE_S tmp_value;
  3913. U16 value = (*(volatile U16 *)REG_USB_INTRRXE);
  3914. tmp_value.all = value;
  3915. #if GH_USB_ENABLE_DEBUG_PRINT
  3916. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_EP15Rx] --> 0x%08x\n",
  3917. REG_USB_INTRRXE,value);
  3918. #endif
  3919. return tmp_value.bitc.ep15rx;
  3920. }
  3921. #endif /* GH_INLINE_LEVEL == 0 */
  3922. /*----------------------------------------------------------------------------*/
  3923. /* register USB_IntrRxE_L (read/write) */
  3924. /*----------------------------------------------------------------------------*/
  3925. #if GH_INLINE_LEVEL == 0
  3926. /*! \brief Writes the register 'USB_IntrRxE_L'. */
  3927. void GH_USB_set_IntrRxE_L(U8 data);
  3928. /*! \brief Reads the register 'USB_IntrRxE_L'. */
  3929. U8 GH_USB_get_IntrRxE_L(void);
  3930. /*! \brief Writes the bit group 'EP1Rx' of register 'USB_IntrRxE_L'. */
  3931. void GH_USB_set_IntrRxE_L_EP1Rx(U8 data);
  3932. /*! \brief Reads the bit group 'EP1Rx' of register 'USB_IntrRxE_L'. */
  3933. U8 GH_USB_get_IntrRxE_L_EP1Rx(void);
  3934. /*! \brief Writes the bit group 'EP2Rx' of register 'USB_IntrRxE_L'. */
  3935. void GH_USB_set_IntrRxE_L_EP2Rx(U8 data);
  3936. /*! \brief Reads the bit group 'EP2Rx' of register 'USB_IntrRxE_L'. */
  3937. U8 GH_USB_get_IntrRxE_L_EP2Rx(void);
  3938. /*! \brief Writes the bit group 'EP3Rx' of register 'USB_IntrRxE_L'. */
  3939. void GH_USB_set_IntrRxE_L_EP3Rx(U8 data);
  3940. /*! \brief Reads the bit group 'EP3Rx' of register 'USB_IntrRxE_L'. */
  3941. U8 GH_USB_get_IntrRxE_L_EP3Rx(void);
  3942. /*! \brief Writes the bit group 'EP4Rx' of register 'USB_IntrRxE_L'. */
  3943. void GH_USB_set_IntrRxE_L_EP4Rx(U8 data);
  3944. /*! \brief Reads the bit group 'EP4Rx' of register 'USB_IntrRxE_L'. */
  3945. U8 GH_USB_get_IntrRxE_L_EP4Rx(void);
  3946. /*! \brief Writes the bit group 'EP5Rx' of register 'USB_IntrRxE_L'. */
  3947. void GH_USB_set_IntrRxE_L_EP5Rx(U8 data);
  3948. /*! \brief Reads the bit group 'EP5Rx' of register 'USB_IntrRxE_L'. */
  3949. U8 GH_USB_get_IntrRxE_L_EP5Rx(void);
  3950. /*! \brief Writes the bit group 'EP6Rx' of register 'USB_IntrRxE_L'. */
  3951. void GH_USB_set_IntrRxE_L_EP6Rx(U8 data);
  3952. /*! \brief Reads the bit group 'EP6Rx' of register 'USB_IntrRxE_L'. */
  3953. U8 GH_USB_get_IntrRxE_L_EP6Rx(void);
  3954. /*! \brief Writes the bit group 'EP7Rx' of register 'USB_IntrRxE_L'. */
  3955. void GH_USB_set_IntrRxE_L_EP7Rx(U8 data);
  3956. /*! \brief Reads the bit group 'EP7Rx' of register 'USB_IntrRxE_L'. */
  3957. U8 GH_USB_get_IntrRxE_L_EP7Rx(void);
  3958. #else /* GH_INLINE_LEVEL == 0 */
  3959. GH_INLINE void GH_USB_set_IntrRxE_L(U8 data)
  3960. {
  3961. *(volatile U8 *)REG_USB_INTRRXE_L = data;
  3962. #if GH_USB_ENABLE_DEBUG_PRINT
  3963. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L] <-- 0x%08x\n",
  3964. REG_USB_INTRRXE_L,data,data);
  3965. #endif
  3966. }
  3967. GH_INLINE U8 GH_USB_get_IntrRxE_L(void)
  3968. {
  3969. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  3970. #if GH_USB_ENABLE_DEBUG_PRINT
  3971. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L] --> 0x%08x\n",
  3972. REG_USB_INTRRXE_L,value);
  3973. #endif
  3974. return value;
  3975. }
  3976. GH_INLINE void GH_USB_set_IntrRxE_L_EP1Rx(U8 data)
  3977. {
  3978. GH_USB_INTRRXE_L_S d;
  3979. d.all = *(volatile U8 *)REG_USB_INTRRXE_L;
  3980. d.bitc.ep1rx = data;
  3981. *(volatile U8 *)REG_USB_INTRRXE_L = d.all;
  3982. #if GH_USB_ENABLE_DEBUG_PRINT
  3983. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L_EP1Rx] <-- 0x%08x\n",
  3984. REG_USB_INTRRXE_L,d.all,d.all);
  3985. #endif
  3986. }
  3987. GH_INLINE U8 GH_USB_get_IntrRxE_L_EP1Rx(void)
  3988. {
  3989. GH_USB_INTRRXE_L_S tmp_value;
  3990. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  3991. tmp_value.all = value;
  3992. #if GH_USB_ENABLE_DEBUG_PRINT
  3993. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L_EP1Rx] --> 0x%08x\n",
  3994. REG_USB_INTRRXE_L,value);
  3995. #endif
  3996. return tmp_value.bitc.ep1rx;
  3997. }
  3998. GH_INLINE void GH_USB_set_IntrRxE_L_EP2Rx(U8 data)
  3999. {
  4000. GH_USB_INTRRXE_L_S d;
  4001. d.all = *(volatile U8 *)REG_USB_INTRRXE_L;
  4002. d.bitc.ep2rx = data;
  4003. *(volatile U8 *)REG_USB_INTRRXE_L = d.all;
  4004. #if GH_USB_ENABLE_DEBUG_PRINT
  4005. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L_EP2Rx] <-- 0x%08x\n",
  4006. REG_USB_INTRRXE_L,d.all,d.all);
  4007. #endif
  4008. }
  4009. GH_INLINE U8 GH_USB_get_IntrRxE_L_EP2Rx(void)
  4010. {
  4011. GH_USB_INTRRXE_L_S tmp_value;
  4012. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  4013. tmp_value.all = value;
  4014. #if GH_USB_ENABLE_DEBUG_PRINT
  4015. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L_EP2Rx] --> 0x%08x\n",
  4016. REG_USB_INTRRXE_L,value);
  4017. #endif
  4018. return tmp_value.bitc.ep2rx;
  4019. }
  4020. GH_INLINE void GH_USB_set_IntrRxE_L_EP3Rx(U8 data)
  4021. {
  4022. GH_USB_INTRRXE_L_S d;
  4023. d.all = *(volatile U8 *)REG_USB_INTRRXE_L;
  4024. d.bitc.ep3rx = data;
  4025. *(volatile U8 *)REG_USB_INTRRXE_L = d.all;
  4026. #if GH_USB_ENABLE_DEBUG_PRINT
  4027. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L_EP3Rx] <-- 0x%08x\n",
  4028. REG_USB_INTRRXE_L,d.all,d.all);
  4029. #endif
  4030. }
  4031. GH_INLINE U8 GH_USB_get_IntrRxE_L_EP3Rx(void)
  4032. {
  4033. GH_USB_INTRRXE_L_S tmp_value;
  4034. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  4035. tmp_value.all = value;
  4036. #if GH_USB_ENABLE_DEBUG_PRINT
  4037. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L_EP3Rx] --> 0x%08x\n",
  4038. REG_USB_INTRRXE_L,value);
  4039. #endif
  4040. return tmp_value.bitc.ep3rx;
  4041. }
  4042. GH_INLINE void GH_USB_set_IntrRxE_L_EP4Rx(U8 data)
  4043. {
  4044. GH_USB_INTRRXE_L_S d;
  4045. d.all = *(volatile U8 *)REG_USB_INTRRXE_L;
  4046. d.bitc.ep4rx = data;
  4047. *(volatile U8 *)REG_USB_INTRRXE_L = d.all;
  4048. #if GH_USB_ENABLE_DEBUG_PRINT
  4049. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L_EP4Rx] <-- 0x%08x\n",
  4050. REG_USB_INTRRXE_L,d.all,d.all);
  4051. #endif
  4052. }
  4053. GH_INLINE U8 GH_USB_get_IntrRxE_L_EP4Rx(void)
  4054. {
  4055. GH_USB_INTRRXE_L_S tmp_value;
  4056. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  4057. tmp_value.all = value;
  4058. #if GH_USB_ENABLE_DEBUG_PRINT
  4059. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L_EP4Rx] --> 0x%08x\n",
  4060. REG_USB_INTRRXE_L,value);
  4061. #endif
  4062. return tmp_value.bitc.ep4rx;
  4063. }
  4064. GH_INLINE void GH_USB_set_IntrRxE_L_EP5Rx(U8 data)
  4065. {
  4066. GH_USB_INTRRXE_L_S d;
  4067. d.all = *(volatile U8 *)REG_USB_INTRRXE_L;
  4068. d.bitc.ep5rx = data;
  4069. *(volatile U8 *)REG_USB_INTRRXE_L = d.all;
  4070. #if GH_USB_ENABLE_DEBUG_PRINT
  4071. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L_EP5Rx] <-- 0x%08x\n",
  4072. REG_USB_INTRRXE_L,d.all,d.all);
  4073. #endif
  4074. }
  4075. GH_INLINE U8 GH_USB_get_IntrRxE_L_EP5Rx(void)
  4076. {
  4077. GH_USB_INTRRXE_L_S tmp_value;
  4078. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  4079. tmp_value.all = value;
  4080. #if GH_USB_ENABLE_DEBUG_PRINT
  4081. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L_EP5Rx] --> 0x%08x\n",
  4082. REG_USB_INTRRXE_L,value);
  4083. #endif
  4084. return tmp_value.bitc.ep5rx;
  4085. }
  4086. GH_INLINE void GH_USB_set_IntrRxE_L_EP6Rx(U8 data)
  4087. {
  4088. GH_USB_INTRRXE_L_S d;
  4089. d.all = *(volatile U8 *)REG_USB_INTRRXE_L;
  4090. d.bitc.ep6rx = data;
  4091. *(volatile U8 *)REG_USB_INTRRXE_L = d.all;
  4092. #if GH_USB_ENABLE_DEBUG_PRINT
  4093. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L_EP6Rx] <-- 0x%08x\n",
  4094. REG_USB_INTRRXE_L,d.all,d.all);
  4095. #endif
  4096. }
  4097. GH_INLINE U8 GH_USB_get_IntrRxE_L_EP6Rx(void)
  4098. {
  4099. GH_USB_INTRRXE_L_S tmp_value;
  4100. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  4101. tmp_value.all = value;
  4102. #if GH_USB_ENABLE_DEBUG_PRINT
  4103. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L_EP6Rx] --> 0x%08x\n",
  4104. REG_USB_INTRRXE_L,value);
  4105. #endif
  4106. return tmp_value.bitc.ep6rx;
  4107. }
  4108. GH_INLINE void GH_USB_set_IntrRxE_L_EP7Rx(U8 data)
  4109. {
  4110. GH_USB_INTRRXE_L_S d;
  4111. d.all = *(volatile U8 *)REG_USB_INTRRXE_L;
  4112. d.bitc.ep7rx = data;
  4113. *(volatile U8 *)REG_USB_INTRRXE_L = d.all;
  4114. #if GH_USB_ENABLE_DEBUG_PRINT
  4115. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_L_EP7Rx] <-- 0x%08x\n",
  4116. REG_USB_INTRRXE_L,d.all,d.all);
  4117. #endif
  4118. }
  4119. GH_INLINE U8 GH_USB_get_IntrRxE_L_EP7Rx(void)
  4120. {
  4121. GH_USB_INTRRXE_L_S tmp_value;
  4122. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_L);
  4123. tmp_value.all = value;
  4124. #if GH_USB_ENABLE_DEBUG_PRINT
  4125. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_L_EP7Rx] --> 0x%08x\n",
  4126. REG_USB_INTRRXE_L,value);
  4127. #endif
  4128. return tmp_value.bitc.ep7rx;
  4129. }
  4130. #endif /* GH_INLINE_LEVEL == 0 */
  4131. /*----------------------------------------------------------------------------*/
  4132. /* register USB_IntrRxE_H (read/write) */
  4133. /*----------------------------------------------------------------------------*/
  4134. #if GH_INLINE_LEVEL == 0
  4135. /*! \brief Writes the register 'USB_IntrRxE_H'. */
  4136. void GH_USB_set_IntrRxE_H(U8 data);
  4137. /*! \brief Reads the register 'USB_IntrRxE_H'. */
  4138. U8 GH_USB_get_IntrRxE_H(void);
  4139. /*! \brief Writes the bit group 'EP8Rx' of register 'USB_IntrRxE_H'. */
  4140. void GH_USB_set_IntrRxE_H_EP8Rx(U8 data);
  4141. /*! \brief Reads the bit group 'EP8Rx' of register 'USB_IntrRxE_H'. */
  4142. U8 GH_USB_get_IntrRxE_H_EP8Rx(void);
  4143. /*! \brief Writes the bit group 'EP9Rx' of register 'USB_IntrRxE_H'. */
  4144. void GH_USB_set_IntrRxE_H_EP9Rx(U8 data);
  4145. /*! \brief Reads the bit group 'EP9Rx' of register 'USB_IntrRxE_H'. */
  4146. U8 GH_USB_get_IntrRxE_H_EP9Rx(void);
  4147. /*! \brief Writes the bit group 'EP10Rx' of register 'USB_IntrRxE_H'. */
  4148. void GH_USB_set_IntrRxE_H_EP10Rx(U8 data);
  4149. /*! \brief Reads the bit group 'EP10Rx' of register 'USB_IntrRxE_H'. */
  4150. U8 GH_USB_get_IntrRxE_H_EP10Rx(void);
  4151. /*! \brief Writes the bit group 'EP11Rx' of register 'USB_IntrRxE_H'. */
  4152. void GH_USB_set_IntrRxE_H_EP11Rx(U8 data);
  4153. /*! \brief Reads the bit group 'EP11Rx' of register 'USB_IntrRxE_H'. */
  4154. U8 GH_USB_get_IntrRxE_H_EP11Rx(void);
  4155. /*! \brief Writes the bit group 'EP12Rx' of register 'USB_IntrRxE_H'. */
  4156. void GH_USB_set_IntrRxE_H_EP12Rx(U8 data);
  4157. /*! \brief Reads the bit group 'EP12Rx' of register 'USB_IntrRxE_H'. */
  4158. U8 GH_USB_get_IntrRxE_H_EP12Rx(void);
  4159. /*! \brief Writes the bit group 'EP13Rx' of register 'USB_IntrRxE_H'. */
  4160. void GH_USB_set_IntrRxE_H_EP13Rx(U8 data);
  4161. /*! \brief Reads the bit group 'EP13Rx' of register 'USB_IntrRxE_H'. */
  4162. U8 GH_USB_get_IntrRxE_H_EP13Rx(void);
  4163. /*! \brief Writes the bit group 'EP14Rx' of register 'USB_IntrRxE_H'. */
  4164. void GH_USB_set_IntrRxE_H_EP14Rx(U8 data);
  4165. /*! \brief Reads the bit group 'EP14Rx' of register 'USB_IntrRxE_H'. */
  4166. U8 GH_USB_get_IntrRxE_H_EP14Rx(void);
  4167. /*! \brief Writes the bit group 'EP15Rx' of register 'USB_IntrRxE_H'. */
  4168. void GH_USB_set_IntrRxE_H_EP15Rx(U8 data);
  4169. /*! \brief Reads the bit group 'EP15Rx' of register 'USB_IntrRxE_H'. */
  4170. U8 GH_USB_get_IntrRxE_H_EP15Rx(void);
  4171. #else /* GH_INLINE_LEVEL == 0 */
  4172. GH_INLINE void GH_USB_set_IntrRxE_H(U8 data)
  4173. {
  4174. *(volatile U8 *)REG_USB_INTRRXE_H = data;
  4175. #if GH_USB_ENABLE_DEBUG_PRINT
  4176. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H] <-- 0x%08x\n",
  4177. REG_USB_INTRRXE_H,data,data);
  4178. #endif
  4179. }
  4180. GH_INLINE U8 GH_USB_get_IntrRxE_H(void)
  4181. {
  4182. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4183. #if GH_USB_ENABLE_DEBUG_PRINT
  4184. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H] --> 0x%08x\n",
  4185. REG_USB_INTRRXE_H,value);
  4186. #endif
  4187. return value;
  4188. }
  4189. GH_INLINE void GH_USB_set_IntrRxE_H_EP8Rx(U8 data)
  4190. {
  4191. GH_USB_INTRRXE_H_S d;
  4192. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4193. d.bitc.ep8rx = data;
  4194. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4195. #if GH_USB_ENABLE_DEBUG_PRINT
  4196. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP8Rx] <-- 0x%08x\n",
  4197. REG_USB_INTRRXE_H,d.all,d.all);
  4198. #endif
  4199. }
  4200. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP8Rx(void)
  4201. {
  4202. GH_USB_INTRRXE_H_S tmp_value;
  4203. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4204. tmp_value.all = value;
  4205. #if GH_USB_ENABLE_DEBUG_PRINT
  4206. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP8Rx] --> 0x%08x\n",
  4207. REG_USB_INTRRXE_H,value);
  4208. #endif
  4209. return tmp_value.bitc.ep8rx;
  4210. }
  4211. GH_INLINE void GH_USB_set_IntrRxE_H_EP9Rx(U8 data)
  4212. {
  4213. GH_USB_INTRRXE_H_S d;
  4214. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4215. d.bitc.ep9rx = data;
  4216. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4217. #if GH_USB_ENABLE_DEBUG_PRINT
  4218. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP9Rx] <-- 0x%08x\n",
  4219. REG_USB_INTRRXE_H,d.all,d.all);
  4220. #endif
  4221. }
  4222. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP9Rx(void)
  4223. {
  4224. GH_USB_INTRRXE_H_S tmp_value;
  4225. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4226. tmp_value.all = value;
  4227. #if GH_USB_ENABLE_DEBUG_PRINT
  4228. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP9Rx] --> 0x%08x\n",
  4229. REG_USB_INTRRXE_H,value);
  4230. #endif
  4231. return tmp_value.bitc.ep9rx;
  4232. }
  4233. GH_INLINE void GH_USB_set_IntrRxE_H_EP10Rx(U8 data)
  4234. {
  4235. GH_USB_INTRRXE_H_S d;
  4236. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4237. d.bitc.ep10rx = data;
  4238. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4239. #if GH_USB_ENABLE_DEBUG_PRINT
  4240. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP10Rx] <-- 0x%08x\n",
  4241. REG_USB_INTRRXE_H,d.all,d.all);
  4242. #endif
  4243. }
  4244. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP10Rx(void)
  4245. {
  4246. GH_USB_INTRRXE_H_S tmp_value;
  4247. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4248. tmp_value.all = value;
  4249. #if GH_USB_ENABLE_DEBUG_PRINT
  4250. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP10Rx] --> 0x%08x\n",
  4251. REG_USB_INTRRXE_H,value);
  4252. #endif
  4253. return tmp_value.bitc.ep10rx;
  4254. }
  4255. GH_INLINE void GH_USB_set_IntrRxE_H_EP11Rx(U8 data)
  4256. {
  4257. GH_USB_INTRRXE_H_S d;
  4258. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4259. d.bitc.ep11rx = data;
  4260. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4261. #if GH_USB_ENABLE_DEBUG_PRINT
  4262. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP11Rx] <-- 0x%08x\n",
  4263. REG_USB_INTRRXE_H,d.all,d.all);
  4264. #endif
  4265. }
  4266. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP11Rx(void)
  4267. {
  4268. GH_USB_INTRRXE_H_S tmp_value;
  4269. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4270. tmp_value.all = value;
  4271. #if GH_USB_ENABLE_DEBUG_PRINT
  4272. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP11Rx] --> 0x%08x\n",
  4273. REG_USB_INTRRXE_H,value);
  4274. #endif
  4275. return tmp_value.bitc.ep11rx;
  4276. }
  4277. GH_INLINE void GH_USB_set_IntrRxE_H_EP12Rx(U8 data)
  4278. {
  4279. GH_USB_INTRRXE_H_S d;
  4280. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4281. d.bitc.ep12rx = data;
  4282. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4283. #if GH_USB_ENABLE_DEBUG_PRINT
  4284. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP12Rx] <-- 0x%08x\n",
  4285. REG_USB_INTRRXE_H,d.all,d.all);
  4286. #endif
  4287. }
  4288. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP12Rx(void)
  4289. {
  4290. GH_USB_INTRRXE_H_S tmp_value;
  4291. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4292. tmp_value.all = value;
  4293. #if GH_USB_ENABLE_DEBUG_PRINT
  4294. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP12Rx] --> 0x%08x\n",
  4295. REG_USB_INTRRXE_H,value);
  4296. #endif
  4297. return tmp_value.bitc.ep12rx;
  4298. }
  4299. GH_INLINE void GH_USB_set_IntrRxE_H_EP13Rx(U8 data)
  4300. {
  4301. GH_USB_INTRRXE_H_S d;
  4302. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4303. d.bitc.ep13rx = data;
  4304. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4305. #if GH_USB_ENABLE_DEBUG_PRINT
  4306. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP13Rx] <-- 0x%08x\n",
  4307. REG_USB_INTRRXE_H,d.all,d.all);
  4308. #endif
  4309. }
  4310. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP13Rx(void)
  4311. {
  4312. GH_USB_INTRRXE_H_S tmp_value;
  4313. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4314. tmp_value.all = value;
  4315. #if GH_USB_ENABLE_DEBUG_PRINT
  4316. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP13Rx] --> 0x%08x\n",
  4317. REG_USB_INTRRXE_H,value);
  4318. #endif
  4319. return tmp_value.bitc.ep13rx;
  4320. }
  4321. GH_INLINE void GH_USB_set_IntrRxE_H_EP14Rx(U8 data)
  4322. {
  4323. GH_USB_INTRRXE_H_S d;
  4324. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4325. d.bitc.ep14rx = data;
  4326. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4327. #if GH_USB_ENABLE_DEBUG_PRINT
  4328. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP14Rx] <-- 0x%08x\n",
  4329. REG_USB_INTRRXE_H,d.all,d.all);
  4330. #endif
  4331. }
  4332. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP14Rx(void)
  4333. {
  4334. GH_USB_INTRRXE_H_S tmp_value;
  4335. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4336. tmp_value.all = value;
  4337. #if GH_USB_ENABLE_DEBUG_PRINT
  4338. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP14Rx] --> 0x%08x\n",
  4339. REG_USB_INTRRXE_H,value);
  4340. #endif
  4341. return tmp_value.bitc.ep14rx;
  4342. }
  4343. GH_INLINE void GH_USB_set_IntrRxE_H_EP15Rx(U8 data)
  4344. {
  4345. GH_USB_INTRRXE_H_S d;
  4346. d.all = *(volatile U8 *)REG_USB_INTRRXE_H;
  4347. d.bitc.ep15rx = data;
  4348. *(volatile U8 *)REG_USB_INTRRXE_H = d.all;
  4349. #if GH_USB_ENABLE_DEBUG_PRINT
  4350. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrRxE_H_EP15Rx] <-- 0x%08x\n",
  4351. REG_USB_INTRRXE_H,d.all,d.all);
  4352. #endif
  4353. }
  4354. GH_INLINE U8 GH_USB_get_IntrRxE_H_EP15Rx(void)
  4355. {
  4356. GH_USB_INTRRXE_H_S tmp_value;
  4357. U8 value = (*(volatile U8 *)REG_USB_INTRRXE_H);
  4358. tmp_value.all = value;
  4359. #if GH_USB_ENABLE_DEBUG_PRINT
  4360. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrRxE_H_EP15Rx] --> 0x%08x\n",
  4361. REG_USB_INTRRXE_H,value);
  4362. #endif
  4363. return tmp_value.bitc.ep15rx;
  4364. }
  4365. #endif /* GH_INLINE_LEVEL == 0 */
  4366. /*----------------------------------------------------------------------------*/
  4367. /* register USB_IntrUSB (read) */
  4368. /*----------------------------------------------------------------------------*/
  4369. #if GH_INLINE_LEVEL == 0
  4370. /*! \brief Reads the register 'USB_IntrUSB'. */
  4371. U8 GH_USB_get_IntrUSB(void);
  4372. /*! \brief Reads the bit group 'Suspend' of register 'USB_IntrUSB'. */
  4373. U8 GH_USB_get_IntrUSB_Suspend(void);
  4374. /*! \brief Reads the bit group 'Resume' of register 'USB_IntrUSB'. */
  4375. U8 GH_USB_get_IntrUSB_Resume(void);
  4376. /*! \brief Reads the bit group 'Reset_Babble' of register 'USB_IntrUSB'. */
  4377. U8 GH_USB_get_IntrUSB_Reset_Babble(void);
  4378. /*! \brief Reads the bit group 'SOF' of register 'USB_IntrUSB'. */
  4379. U8 GH_USB_get_IntrUSB_SOF(void);
  4380. /*! \brief Reads the bit group 'Conn' of register 'USB_IntrUSB'. */
  4381. U8 GH_USB_get_IntrUSB_Conn(void);
  4382. /*! \brief Reads the bit group 'Discon' of register 'USB_IntrUSB'. */
  4383. U8 GH_USB_get_IntrUSB_Discon(void);
  4384. /*! \brief Reads the bit group 'Sess_Req' of register 'USB_IntrUSB'. */
  4385. U8 GH_USB_get_IntrUSB_Sess_Req(void);
  4386. /*! \brief Reads the bit group 'VBus_Error' of register 'USB_IntrUSB'. */
  4387. U8 GH_USB_get_IntrUSB_VBus_Error(void);
  4388. #else /* GH_INLINE_LEVEL == 0 */
  4389. GH_INLINE U8 GH_USB_get_IntrUSB(void)
  4390. {
  4391. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4392. #if GH_USB_ENABLE_DEBUG_PRINT
  4393. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB] --> 0x%08x\n",
  4394. REG_USB_INTRUSB,value);
  4395. #endif
  4396. return value;
  4397. }
  4398. GH_INLINE U8 GH_USB_get_IntrUSB_Suspend(void)
  4399. {
  4400. GH_USB_INTRUSB_S tmp_value;
  4401. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4402. tmp_value.all = value;
  4403. #if GH_USB_ENABLE_DEBUG_PRINT
  4404. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Suspend] --> 0x%08x\n",
  4405. REG_USB_INTRUSB,value);
  4406. #endif
  4407. return tmp_value.bitc.suspend;
  4408. }
  4409. GH_INLINE U8 GH_USB_get_IntrUSB_Resume(void)
  4410. {
  4411. GH_USB_INTRUSB_S tmp_value;
  4412. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4413. tmp_value.all = value;
  4414. #if GH_USB_ENABLE_DEBUG_PRINT
  4415. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Resume] --> 0x%08x\n",
  4416. REG_USB_INTRUSB,value);
  4417. #endif
  4418. return tmp_value.bitc.resume;
  4419. }
  4420. GH_INLINE U8 GH_USB_get_IntrUSB_Reset_Babble(void)
  4421. {
  4422. GH_USB_INTRUSB_S tmp_value;
  4423. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4424. tmp_value.all = value;
  4425. #if GH_USB_ENABLE_DEBUG_PRINT
  4426. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Reset_Babble] --> 0x%08x\n",
  4427. REG_USB_INTRUSB,value);
  4428. #endif
  4429. return tmp_value.bitc.reset_babble;
  4430. }
  4431. GH_INLINE U8 GH_USB_get_IntrUSB_SOF(void)
  4432. {
  4433. GH_USB_INTRUSB_S tmp_value;
  4434. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4435. tmp_value.all = value;
  4436. #if GH_USB_ENABLE_DEBUG_PRINT
  4437. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_SOF] --> 0x%08x\n",
  4438. REG_USB_INTRUSB,value);
  4439. #endif
  4440. return tmp_value.bitc.sof;
  4441. }
  4442. GH_INLINE U8 GH_USB_get_IntrUSB_Conn(void)
  4443. {
  4444. GH_USB_INTRUSB_S tmp_value;
  4445. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4446. tmp_value.all = value;
  4447. #if GH_USB_ENABLE_DEBUG_PRINT
  4448. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Conn] --> 0x%08x\n",
  4449. REG_USB_INTRUSB,value);
  4450. #endif
  4451. return tmp_value.bitc.conn;
  4452. }
  4453. GH_INLINE U8 GH_USB_get_IntrUSB_Discon(void)
  4454. {
  4455. GH_USB_INTRUSB_S tmp_value;
  4456. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4457. tmp_value.all = value;
  4458. #if GH_USB_ENABLE_DEBUG_PRINT
  4459. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Discon] --> 0x%08x\n",
  4460. REG_USB_INTRUSB,value);
  4461. #endif
  4462. return tmp_value.bitc.discon;
  4463. }
  4464. GH_INLINE U8 GH_USB_get_IntrUSB_Sess_Req(void)
  4465. {
  4466. GH_USB_INTRUSB_S tmp_value;
  4467. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4468. tmp_value.all = value;
  4469. #if GH_USB_ENABLE_DEBUG_PRINT
  4470. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_Sess_Req] --> 0x%08x\n",
  4471. REG_USB_INTRUSB,value);
  4472. #endif
  4473. return tmp_value.bitc.sess_req;
  4474. }
  4475. GH_INLINE U8 GH_USB_get_IntrUSB_VBus_Error(void)
  4476. {
  4477. GH_USB_INTRUSB_S tmp_value;
  4478. U8 value = (*(volatile U8 *)REG_USB_INTRUSB);
  4479. tmp_value.all = value;
  4480. #if GH_USB_ENABLE_DEBUG_PRINT
  4481. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSB_VBus_Error] --> 0x%08x\n",
  4482. REG_USB_INTRUSB,value);
  4483. #endif
  4484. return tmp_value.bitc.vbus_error;
  4485. }
  4486. #endif /* GH_INLINE_LEVEL == 0 */
  4487. /*----------------------------------------------------------------------------*/
  4488. /* register USB_IntrUSBE (read/write) */
  4489. /*----------------------------------------------------------------------------*/
  4490. #if GH_INLINE_LEVEL == 0
  4491. /*! \brief Writes the register 'USB_IntrUSBE'. */
  4492. void GH_USB_set_IntrUSBE(U8 data);
  4493. /*! \brief Reads the register 'USB_IntrUSBE'. */
  4494. U8 GH_USB_get_IntrUSBE(void);
  4495. /*! \brief Writes the bit group 'Suspend' of register 'USB_IntrUSBE'. */
  4496. void GH_USB_set_IntrUSBE_Suspend(U8 data);
  4497. /*! \brief Reads the bit group 'Suspend' of register 'USB_IntrUSBE'. */
  4498. U8 GH_USB_get_IntrUSBE_Suspend(void);
  4499. /*! \brief Writes the bit group 'Resume' of register 'USB_IntrUSBE'. */
  4500. void GH_USB_set_IntrUSBE_Resume(U8 data);
  4501. /*! \brief Reads the bit group 'Resume' of register 'USB_IntrUSBE'. */
  4502. U8 GH_USB_get_IntrUSBE_Resume(void);
  4503. /*! \brief Writes the bit group 'Reset_Babble' of register 'USB_IntrUSBE'. */
  4504. void GH_USB_set_IntrUSBE_Reset_Babble(U8 data);
  4505. /*! \brief Reads the bit group 'Reset_Babble' of register 'USB_IntrUSBE'. */
  4506. U8 GH_USB_get_IntrUSBE_Reset_Babble(void);
  4507. /*! \brief Writes the bit group 'SOF' of register 'USB_IntrUSBE'. */
  4508. void GH_USB_set_IntrUSBE_SOF(U8 data);
  4509. /*! \brief Reads the bit group 'SOF' of register 'USB_IntrUSBE'. */
  4510. U8 GH_USB_get_IntrUSBE_SOF(void);
  4511. /*! \brief Writes the bit group 'Conn' of register 'USB_IntrUSBE'. */
  4512. void GH_USB_set_IntrUSBE_Conn(U8 data);
  4513. /*! \brief Reads the bit group 'Conn' of register 'USB_IntrUSBE'. */
  4514. U8 GH_USB_get_IntrUSBE_Conn(void);
  4515. /*! \brief Writes the bit group 'Discon' of register 'USB_IntrUSBE'. */
  4516. void GH_USB_set_IntrUSBE_Discon(U8 data);
  4517. /*! \brief Reads the bit group 'Discon' of register 'USB_IntrUSBE'. */
  4518. U8 GH_USB_get_IntrUSBE_Discon(void);
  4519. /*! \brief Writes the bit group 'Sess_Req' of register 'USB_IntrUSBE'. */
  4520. void GH_USB_set_IntrUSBE_Sess_Req(U8 data);
  4521. /*! \brief Reads the bit group 'Sess_Req' of register 'USB_IntrUSBE'. */
  4522. U8 GH_USB_get_IntrUSBE_Sess_Req(void);
  4523. /*! \brief Writes the bit group 'VBus_Error' of register 'USB_IntrUSBE'. */
  4524. void GH_USB_set_IntrUSBE_VBus_Error(U8 data);
  4525. /*! \brief Reads the bit group 'VBus_Error' of register 'USB_IntrUSBE'. */
  4526. U8 GH_USB_get_IntrUSBE_VBus_Error(void);
  4527. #else /* GH_INLINE_LEVEL == 0 */
  4528. GH_INLINE void GH_USB_set_IntrUSBE(U8 data)
  4529. {
  4530. *(volatile U8 *)REG_USB_INTRUSBE = data;
  4531. #if GH_USB_ENABLE_DEBUG_PRINT
  4532. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE] <-- 0x%08x\n",
  4533. REG_USB_INTRUSBE,data,data);
  4534. #endif
  4535. }
  4536. GH_INLINE U8 GH_USB_get_IntrUSBE(void)
  4537. {
  4538. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  4539. #if GH_USB_ENABLE_DEBUG_PRINT
  4540. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE] --> 0x%08x\n",
  4541. REG_USB_INTRUSBE,value);
  4542. #endif
  4543. return value;
  4544. }
  4545. GH_INLINE void GH_USB_set_IntrUSBE_Suspend(U8 data)
  4546. {
  4547. GH_USB_INTRUSBE_S d;
  4548. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4549. d.bitc.suspend = data;
  4550. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4551. #if GH_USB_ENABLE_DEBUG_PRINT
  4552. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Suspend] <-- 0x%08x\n",
  4553. REG_USB_INTRUSBE,d.all,d.all);
  4554. #endif
  4555. }
  4556. GH_INLINE U8 GH_USB_get_IntrUSBE_Suspend(void)
  4557. {
  4558. GH_USB_INTRUSBE_S tmp_value;
  4559. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  4560. tmp_value.all = value;
  4561. #if GH_USB_ENABLE_DEBUG_PRINT
  4562. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Suspend] --> 0x%08x\n",
  4563. REG_USB_INTRUSBE,value);
  4564. #endif
  4565. return tmp_value.bitc.suspend;
  4566. }
  4567. GH_INLINE void GH_USB_set_IntrUSBE_Resume(U8 data)
  4568. {
  4569. GH_USB_INTRUSBE_S d;
  4570. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4571. d.bitc.resume = data;
  4572. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4573. #if GH_USB_ENABLE_DEBUG_PRINT
  4574. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Resume] <-- 0x%08x\n",
  4575. REG_USB_INTRUSBE,d.all,d.all);
  4576. #endif
  4577. }
  4578. GH_INLINE U8 GH_USB_get_IntrUSBE_Resume(void)
  4579. {
  4580. GH_USB_INTRUSBE_S tmp_value;
  4581. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  4582. tmp_value.all = value;
  4583. #if GH_USB_ENABLE_DEBUG_PRINT
  4584. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Resume] --> 0x%08x\n",
  4585. REG_USB_INTRUSBE,value);
  4586. #endif
  4587. return tmp_value.bitc.resume;
  4588. }
  4589. GH_INLINE void GH_USB_set_IntrUSBE_Reset_Babble(U8 data)
  4590. {
  4591. GH_USB_INTRUSBE_S d;
  4592. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4593. d.bitc.reset_babble = data;
  4594. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4595. #if GH_USB_ENABLE_DEBUG_PRINT
  4596. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Reset_Babble] <-- 0x%08x\n",
  4597. REG_USB_INTRUSBE,d.all,d.all);
  4598. #endif
  4599. }
  4600. GH_INLINE U8 GH_USB_get_IntrUSBE_Reset_Babble(void)
  4601. {
  4602. GH_USB_INTRUSBE_S tmp_value;
  4603. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  4604. tmp_value.all = value;
  4605. #if GH_USB_ENABLE_DEBUG_PRINT
  4606. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Reset_Babble] --> 0x%08x\n",
  4607. REG_USB_INTRUSBE,value);
  4608. #endif
  4609. return tmp_value.bitc.reset_babble;
  4610. }
  4611. GH_INLINE void GH_USB_set_IntrUSBE_SOF(U8 data)
  4612. {
  4613. GH_USB_INTRUSBE_S d;
  4614. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4615. d.bitc.sof = data;
  4616. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4617. #if GH_USB_ENABLE_DEBUG_PRINT
  4618. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_SOF] <-- 0x%08x\n",
  4619. REG_USB_INTRUSBE,d.all,d.all);
  4620. #endif
  4621. }
  4622. GH_INLINE U8 GH_USB_get_IntrUSBE_SOF(void)
  4623. {
  4624. GH_USB_INTRUSBE_S tmp_value;
  4625. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  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_IntrUSBE_SOF] --> 0x%08x\n",
  4629. REG_USB_INTRUSBE,value);
  4630. #endif
  4631. return tmp_value.bitc.sof;
  4632. }
  4633. GH_INLINE void GH_USB_set_IntrUSBE_Conn(U8 data)
  4634. {
  4635. GH_USB_INTRUSBE_S d;
  4636. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4637. d.bitc.conn = data;
  4638. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4639. #if GH_USB_ENABLE_DEBUG_PRINT
  4640. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Conn] <-- 0x%08x\n",
  4641. REG_USB_INTRUSBE,d.all,d.all);
  4642. #endif
  4643. }
  4644. GH_INLINE U8 GH_USB_get_IntrUSBE_Conn(void)
  4645. {
  4646. GH_USB_INTRUSBE_S tmp_value;
  4647. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  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_IntrUSBE_Conn] --> 0x%08x\n",
  4651. REG_USB_INTRUSBE,value);
  4652. #endif
  4653. return tmp_value.bitc.conn;
  4654. }
  4655. GH_INLINE void GH_USB_set_IntrUSBE_Discon(U8 data)
  4656. {
  4657. GH_USB_INTRUSBE_S d;
  4658. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4659. d.bitc.discon = data;
  4660. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4661. #if GH_USB_ENABLE_DEBUG_PRINT
  4662. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Discon] <-- 0x%08x\n",
  4663. REG_USB_INTRUSBE,d.all,d.all);
  4664. #endif
  4665. }
  4666. GH_INLINE U8 GH_USB_get_IntrUSBE_Discon(void)
  4667. {
  4668. GH_USB_INTRUSBE_S tmp_value;
  4669. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  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_IntrUSBE_Discon] --> 0x%08x\n",
  4673. REG_USB_INTRUSBE,value);
  4674. #endif
  4675. return tmp_value.bitc.discon;
  4676. }
  4677. GH_INLINE void GH_USB_set_IntrUSBE_Sess_Req(U8 data)
  4678. {
  4679. GH_USB_INTRUSBE_S d;
  4680. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4681. d.bitc.sess_req = data;
  4682. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4683. #if GH_USB_ENABLE_DEBUG_PRINT
  4684. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_Sess_Req] <-- 0x%08x\n",
  4685. REG_USB_INTRUSBE,d.all,d.all);
  4686. #endif
  4687. }
  4688. GH_INLINE U8 GH_USB_get_IntrUSBE_Sess_Req(void)
  4689. {
  4690. GH_USB_INTRUSBE_S tmp_value;
  4691. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  4692. tmp_value.all = value;
  4693. #if GH_USB_ENABLE_DEBUG_PRINT
  4694. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_Sess_Req] --> 0x%08x\n",
  4695. REG_USB_INTRUSBE,value);
  4696. #endif
  4697. return tmp_value.bitc.sess_req;
  4698. }
  4699. GH_INLINE void GH_USB_set_IntrUSBE_VBus_Error(U8 data)
  4700. {
  4701. GH_USB_INTRUSBE_S d;
  4702. d.all = *(volatile U8 *)REG_USB_INTRUSBE;
  4703. d.bitc.vbus_error = data;
  4704. *(volatile U8 *)REG_USB_INTRUSBE = d.all;
  4705. #if GH_USB_ENABLE_DEBUG_PRINT
  4706. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_IntrUSBE_VBus_Error] <-- 0x%08x\n",
  4707. REG_USB_INTRUSBE,d.all,d.all);
  4708. #endif
  4709. }
  4710. GH_INLINE U8 GH_USB_get_IntrUSBE_VBus_Error(void)
  4711. {
  4712. GH_USB_INTRUSBE_S tmp_value;
  4713. U8 value = (*(volatile U8 *)REG_USB_INTRUSBE);
  4714. tmp_value.all = value;
  4715. #if GH_USB_ENABLE_DEBUG_PRINT
  4716. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_IntrUSBE_VBus_Error] --> 0x%08x\n",
  4717. REG_USB_INTRUSBE,value);
  4718. #endif
  4719. return tmp_value.bitc.vbus_error;
  4720. }
  4721. #endif /* GH_INLINE_LEVEL == 0 */
  4722. /*----------------------------------------------------------------------------*/
  4723. /* register USB_Frame (read) */
  4724. /*----------------------------------------------------------------------------*/
  4725. #if GH_INLINE_LEVEL == 0
  4726. /*! \brief Reads the register 'USB_Frame'. */
  4727. U16 GH_USB_get_Frame(void);
  4728. /*! \brief Reads the bit group 'Number' of register 'USB_Frame'. */
  4729. U16 GH_USB_get_Frame_Number(void);
  4730. #else /* GH_INLINE_LEVEL == 0 */
  4731. GH_INLINE U16 GH_USB_get_Frame(void)
  4732. {
  4733. U16 value = (*(volatile U16 *)REG_USB_FRAME);
  4734. #if GH_USB_ENABLE_DEBUG_PRINT
  4735. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Frame] --> 0x%08x\n",
  4736. REG_USB_FRAME,value);
  4737. #endif
  4738. return value;
  4739. }
  4740. GH_INLINE U16 GH_USB_get_Frame_Number(void)
  4741. {
  4742. GH_USB_FRAME_S tmp_value;
  4743. U16 value = (*(volatile U16 *)REG_USB_FRAME);
  4744. tmp_value.all = value;
  4745. #if GH_USB_ENABLE_DEBUG_PRINT
  4746. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Frame_Number] --> 0x%08x\n",
  4747. REG_USB_FRAME,value);
  4748. #endif
  4749. return tmp_value.bitc.number;
  4750. }
  4751. #endif /* GH_INLINE_LEVEL == 0 */
  4752. /*----------------------------------------------------------------------------*/
  4753. /* register USB_Index (read/write) */
  4754. /*----------------------------------------------------------------------------*/
  4755. #if GH_INLINE_LEVEL == 0
  4756. /*! \brief Writes the register 'USB_Index'. */
  4757. void GH_USB_set_Index(U8 data);
  4758. /*! \brief Reads the register 'USB_Index'. */
  4759. U8 GH_USB_get_Index(void);
  4760. /*! \brief Writes the bit group 'SelectedEndpoint' of register 'USB_Index'. */
  4761. void GH_USB_set_Index_SelectedEndpoint(U8 data);
  4762. /*! \brief Reads the bit group 'SelectedEndpoint' of register 'USB_Index'. */
  4763. U8 GH_USB_get_Index_SelectedEndpoint(void);
  4764. #else /* GH_INLINE_LEVEL == 0 */
  4765. GH_INLINE void GH_USB_set_Index(U8 data)
  4766. {
  4767. *(volatile U8 *)REG_USB_INDEX = data;
  4768. #if GH_USB_ENABLE_DEBUG_PRINT
  4769. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Index] <-- 0x%08x\n",
  4770. REG_USB_INDEX,data,data);
  4771. #endif
  4772. }
  4773. GH_INLINE U8 GH_USB_get_Index(void)
  4774. {
  4775. U8 value = (*(volatile U8 *)REG_USB_INDEX);
  4776. #if GH_USB_ENABLE_DEBUG_PRINT
  4777. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Index] --> 0x%08x\n",
  4778. REG_USB_INDEX,value);
  4779. #endif
  4780. return value;
  4781. }
  4782. GH_INLINE void GH_USB_set_Index_SelectedEndpoint(U8 data)
  4783. {
  4784. GH_USB_INDEX_S d;
  4785. d.all = *(volatile U8 *)REG_USB_INDEX;
  4786. d.bitc.selectedendpoint = data;
  4787. *(volatile U8 *)REG_USB_INDEX = d.all;
  4788. #if GH_USB_ENABLE_DEBUG_PRINT
  4789. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Index_SelectedEndpoint] <-- 0x%08x\n",
  4790. REG_USB_INDEX,d.all,d.all);
  4791. #endif
  4792. }
  4793. GH_INLINE U8 GH_USB_get_Index_SelectedEndpoint(void)
  4794. {
  4795. GH_USB_INDEX_S tmp_value;
  4796. U8 value = (*(volatile U8 *)REG_USB_INDEX);
  4797. tmp_value.all = value;
  4798. #if GH_USB_ENABLE_DEBUG_PRINT
  4799. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Index_SelectedEndpoint] --> 0x%08x\n",
  4800. REG_USB_INDEX,value);
  4801. #endif
  4802. return tmp_value.bitc.selectedendpoint;
  4803. }
  4804. #endif /* GH_INLINE_LEVEL == 0 */
  4805. /*----------------------------------------------------------------------------*/
  4806. /* register USB_Testmode (read/write) */
  4807. /*----------------------------------------------------------------------------*/
  4808. #if GH_INLINE_LEVEL == 0
  4809. /*! \brief Writes the register 'USB_Testmode'. */
  4810. void GH_USB_set_Testmode(U8 data);
  4811. /*! \brief Reads the register 'USB_Testmode'. */
  4812. U8 GH_USB_get_Testmode(void);
  4813. /*! \brief Writes the bit group 'Test_SE0_NAK' of register 'USB_Testmode'. */
  4814. void GH_USB_set_Testmode_Test_SE0_NAK(U8 data);
  4815. /*! \brief Reads the bit group 'Test_SE0_NAK' of register 'USB_Testmode'. */
  4816. U8 GH_USB_get_Testmode_Test_SE0_NAK(void);
  4817. /*! \brief Writes the bit group 'Test_J' of register 'USB_Testmode'. */
  4818. void GH_USB_set_Testmode_Test_J(U8 data);
  4819. /*! \brief Reads the bit group 'Test_J' of register 'USB_Testmode'. */
  4820. U8 GH_USB_get_Testmode_Test_J(void);
  4821. /*! \brief Writes the bit group 'Test_K' of register 'USB_Testmode'. */
  4822. void GH_USB_set_Testmode_Test_K(U8 data);
  4823. /*! \brief Reads the bit group 'Test_K' of register 'USB_Testmode'. */
  4824. U8 GH_USB_get_Testmode_Test_K(void);
  4825. /*! \brief Writes the bit group 'Test_Packet' of register 'USB_Testmode'. */
  4826. void GH_USB_set_Testmode_Test_Packet(U8 data);
  4827. /*! \brief Reads the bit group 'Test_Packet' of register 'USB_Testmode'. */
  4828. U8 GH_USB_get_Testmode_Test_Packet(void);
  4829. /*! \brief Writes the bit group 'Force_HS' of register 'USB_Testmode'. */
  4830. void GH_USB_set_Testmode_Force_HS(U8 data);
  4831. /*! \brief Reads the bit group 'Force_HS' of register 'USB_Testmode'. */
  4832. U8 GH_USB_get_Testmode_Force_HS(void);
  4833. /*! \brief Writes the bit group 'Force_FS' of register 'USB_Testmode'. */
  4834. void GH_USB_set_Testmode_Force_FS(U8 data);
  4835. /*! \brief Reads the bit group 'Force_FS' of register 'USB_Testmode'. */
  4836. U8 GH_USB_get_Testmode_Force_FS(void);
  4837. /*! \brief Writes the bit group 'FIFO_Access' of register 'USB_Testmode'. */
  4838. void GH_USB_set_Testmode_FIFO_Access(U8 data);
  4839. /*! \brief Reads the bit group 'FIFO_Access' of register 'USB_Testmode'. */
  4840. U8 GH_USB_get_Testmode_FIFO_Access(void);
  4841. /*! \brief Writes the bit group 'Force_Host' of register 'USB_Testmode'. */
  4842. void GH_USB_set_Testmode_Force_Host(U8 data);
  4843. /*! \brief Reads the bit group 'Force_Host' of register 'USB_Testmode'. */
  4844. U8 GH_USB_get_Testmode_Force_Host(void);
  4845. #else /* GH_INLINE_LEVEL == 0 */
  4846. GH_INLINE void GH_USB_set_Testmode(U8 data)
  4847. {
  4848. *(volatile U8 *)REG_USB_TESTMODE = data;
  4849. #if GH_USB_ENABLE_DEBUG_PRINT
  4850. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode] <-- 0x%08x\n",
  4851. REG_USB_TESTMODE,data,data);
  4852. #endif
  4853. }
  4854. GH_INLINE U8 GH_USB_get_Testmode(void)
  4855. {
  4856. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  4857. #if GH_USB_ENABLE_DEBUG_PRINT
  4858. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode] --> 0x%08x\n",
  4859. REG_USB_TESTMODE,value);
  4860. #endif
  4861. return value;
  4862. }
  4863. GH_INLINE void GH_USB_set_Testmode_Test_SE0_NAK(U8 data)
  4864. {
  4865. GH_USB_TESTMODE_S d;
  4866. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  4867. d.bitc.test_se0_nak = data;
  4868. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  4869. #if GH_USB_ENABLE_DEBUG_PRINT
  4870. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_SE0_NAK] <-- 0x%08x\n",
  4871. REG_USB_TESTMODE,d.all,d.all);
  4872. #endif
  4873. }
  4874. GH_INLINE U8 GH_USB_get_Testmode_Test_SE0_NAK(void)
  4875. {
  4876. GH_USB_TESTMODE_S tmp_value;
  4877. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  4878. tmp_value.all = value;
  4879. #if GH_USB_ENABLE_DEBUG_PRINT
  4880. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_SE0_NAK] --> 0x%08x\n",
  4881. REG_USB_TESTMODE,value);
  4882. #endif
  4883. return tmp_value.bitc.test_se0_nak;
  4884. }
  4885. GH_INLINE void GH_USB_set_Testmode_Test_J(U8 data)
  4886. {
  4887. GH_USB_TESTMODE_S d;
  4888. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  4889. d.bitc.test_j = data;
  4890. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  4891. #if GH_USB_ENABLE_DEBUG_PRINT
  4892. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_J] <-- 0x%08x\n",
  4893. REG_USB_TESTMODE,d.all,d.all);
  4894. #endif
  4895. }
  4896. GH_INLINE U8 GH_USB_get_Testmode_Test_J(void)
  4897. {
  4898. GH_USB_TESTMODE_S tmp_value;
  4899. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  4900. tmp_value.all = value;
  4901. #if GH_USB_ENABLE_DEBUG_PRINT
  4902. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_J] --> 0x%08x\n",
  4903. REG_USB_TESTMODE,value);
  4904. #endif
  4905. return tmp_value.bitc.test_j;
  4906. }
  4907. GH_INLINE void GH_USB_set_Testmode_Test_K(U8 data)
  4908. {
  4909. GH_USB_TESTMODE_S d;
  4910. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  4911. d.bitc.test_k = data;
  4912. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  4913. #if GH_USB_ENABLE_DEBUG_PRINT
  4914. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_K] <-- 0x%08x\n",
  4915. REG_USB_TESTMODE,d.all,d.all);
  4916. #endif
  4917. }
  4918. GH_INLINE U8 GH_USB_get_Testmode_Test_K(void)
  4919. {
  4920. GH_USB_TESTMODE_S tmp_value;
  4921. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  4922. tmp_value.all = value;
  4923. #if GH_USB_ENABLE_DEBUG_PRINT
  4924. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_K] --> 0x%08x\n",
  4925. REG_USB_TESTMODE,value);
  4926. #endif
  4927. return tmp_value.bitc.test_k;
  4928. }
  4929. GH_INLINE void GH_USB_set_Testmode_Test_Packet(U8 data)
  4930. {
  4931. GH_USB_TESTMODE_S d;
  4932. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  4933. d.bitc.test_packet = data;
  4934. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  4935. #if GH_USB_ENABLE_DEBUG_PRINT
  4936. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Test_Packet] <-- 0x%08x\n",
  4937. REG_USB_TESTMODE,d.all,d.all);
  4938. #endif
  4939. }
  4940. GH_INLINE U8 GH_USB_get_Testmode_Test_Packet(void)
  4941. {
  4942. GH_USB_TESTMODE_S tmp_value;
  4943. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  4944. tmp_value.all = value;
  4945. #if GH_USB_ENABLE_DEBUG_PRINT
  4946. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Test_Packet] --> 0x%08x\n",
  4947. REG_USB_TESTMODE,value);
  4948. #endif
  4949. return tmp_value.bitc.test_packet;
  4950. }
  4951. GH_INLINE void GH_USB_set_Testmode_Force_HS(U8 data)
  4952. {
  4953. GH_USB_TESTMODE_S d;
  4954. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  4955. d.bitc.force_hs = data;
  4956. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  4957. #if GH_USB_ENABLE_DEBUG_PRINT
  4958. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Force_HS] <-- 0x%08x\n",
  4959. REG_USB_TESTMODE,d.all,d.all);
  4960. #endif
  4961. }
  4962. GH_INLINE U8 GH_USB_get_Testmode_Force_HS(void)
  4963. {
  4964. GH_USB_TESTMODE_S tmp_value;
  4965. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  4966. tmp_value.all = value;
  4967. #if GH_USB_ENABLE_DEBUG_PRINT
  4968. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Force_HS] --> 0x%08x\n",
  4969. REG_USB_TESTMODE,value);
  4970. #endif
  4971. return tmp_value.bitc.force_hs;
  4972. }
  4973. GH_INLINE void GH_USB_set_Testmode_Force_FS(U8 data)
  4974. {
  4975. GH_USB_TESTMODE_S d;
  4976. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  4977. d.bitc.force_fs = data;
  4978. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  4979. #if GH_USB_ENABLE_DEBUG_PRINT
  4980. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Force_FS] <-- 0x%08x\n",
  4981. REG_USB_TESTMODE,d.all,d.all);
  4982. #endif
  4983. }
  4984. GH_INLINE U8 GH_USB_get_Testmode_Force_FS(void)
  4985. {
  4986. GH_USB_TESTMODE_S tmp_value;
  4987. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  4988. tmp_value.all = value;
  4989. #if GH_USB_ENABLE_DEBUG_PRINT
  4990. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Force_FS] --> 0x%08x\n",
  4991. REG_USB_TESTMODE,value);
  4992. #endif
  4993. return tmp_value.bitc.force_fs;
  4994. }
  4995. GH_INLINE void GH_USB_set_Testmode_FIFO_Access(U8 data)
  4996. {
  4997. GH_USB_TESTMODE_S d;
  4998. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  4999. d.bitc.fifo_access = data;
  5000. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  5001. #if GH_USB_ENABLE_DEBUG_PRINT
  5002. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_FIFO_Access] <-- 0x%08x\n",
  5003. REG_USB_TESTMODE,d.all,d.all);
  5004. #endif
  5005. }
  5006. GH_INLINE U8 GH_USB_get_Testmode_FIFO_Access(void)
  5007. {
  5008. GH_USB_TESTMODE_S tmp_value;
  5009. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  5010. tmp_value.all = value;
  5011. #if GH_USB_ENABLE_DEBUG_PRINT
  5012. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_FIFO_Access] --> 0x%08x\n",
  5013. REG_USB_TESTMODE,value);
  5014. #endif
  5015. return tmp_value.bitc.fifo_access;
  5016. }
  5017. GH_INLINE void GH_USB_set_Testmode_Force_Host(U8 data)
  5018. {
  5019. GH_USB_TESTMODE_S d;
  5020. d.all = *(volatile U8 *)REG_USB_TESTMODE;
  5021. d.bitc.force_host = data;
  5022. *(volatile U8 *)REG_USB_TESTMODE = d.all;
  5023. #if GH_USB_ENABLE_DEBUG_PRINT
  5024. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Testmode_Force_Host] <-- 0x%08x\n",
  5025. REG_USB_TESTMODE,d.all,d.all);
  5026. #endif
  5027. }
  5028. GH_INLINE U8 GH_USB_get_Testmode_Force_Host(void)
  5029. {
  5030. GH_USB_TESTMODE_S tmp_value;
  5031. U8 value = (*(volatile U8 *)REG_USB_TESTMODE);
  5032. tmp_value.all = value;
  5033. #if GH_USB_ENABLE_DEBUG_PRINT
  5034. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Testmode_Force_Host] --> 0x%08x\n",
  5035. REG_USB_TESTMODE,value);
  5036. #endif
  5037. return tmp_value.bitc.force_host;
  5038. }
  5039. #endif /* GH_INLINE_LEVEL == 0 */
  5040. /*----------------------------------------------------------------------------*/
  5041. /* register USB_CSR0L_R_PERI (read) */
  5042. /*----------------------------------------------------------------------------*/
  5043. #if GH_INLINE_LEVEL == 0
  5044. /*! \brief Reads the register 'USB_CSR0L_R_PERI'. */
  5045. U8 GH_USB_get_CSR0L_R_PERI(void);
  5046. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_CSR0L_R_PERI'. */
  5047. U8 GH_USB_get_CSR0L_R_PERI_RxPktRdy(void);
  5048. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_CSR0L_R_PERI'. */
  5049. U8 GH_USB_get_CSR0L_R_PERI_TxPktRdy(void);
  5050. /*! \brief Reads the bit group 'SentStall' of register 'USB_CSR0L_R_PERI'. */
  5051. U8 GH_USB_get_CSR0L_R_PERI_SentStall(void);
  5052. /*! \brief Reads the bit group 'SetupEnd' of register 'USB_CSR0L_R_PERI'. */
  5053. U8 GH_USB_get_CSR0L_R_PERI_SetupEnd(void);
  5054. #else /* GH_INLINE_LEVEL == 0 */
  5055. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI(void)
  5056. {
  5057. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  5058. #if GH_USB_ENABLE_DEBUG_PRINT
  5059. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI] --> 0x%08x\n",
  5060. REG_USB_CSR0L_R_PERI,value);
  5061. #endif
  5062. return value;
  5063. }
  5064. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_RxPktRdy(void)
  5065. {
  5066. GH_USB_CSR0L_R_PERI_S tmp_value;
  5067. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  5068. tmp_value.all = value;
  5069. #if GH_USB_ENABLE_DEBUG_PRINT
  5070. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_RxPktRdy] --> 0x%08x\n",
  5071. REG_USB_CSR0L_R_PERI,value);
  5072. #endif
  5073. return tmp_value.bitc.rxpktrdy;
  5074. }
  5075. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_TxPktRdy(void)
  5076. {
  5077. GH_USB_CSR0L_R_PERI_S tmp_value;
  5078. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  5079. tmp_value.all = value;
  5080. #if GH_USB_ENABLE_DEBUG_PRINT
  5081. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_TxPktRdy] --> 0x%08x\n",
  5082. REG_USB_CSR0L_R_PERI,value);
  5083. #endif
  5084. return tmp_value.bitc.txpktrdy;
  5085. }
  5086. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_SentStall(void)
  5087. {
  5088. GH_USB_CSR0L_R_PERI_S tmp_value;
  5089. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  5090. tmp_value.all = value;
  5091. #if GH_USB_ENABLE_DEBUG_PRINT
  5092. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_SentStall] --> 0x%08x\n",
  5093. REG_USB_CSR0L_R_PERI,value);
  5094. #endif
  5095. return tmp_value.bitc.sentstall;
  5096. }
  5097. GH_INLINE U8 GH_USB_get_CSR0L_R_PERI_SetupEnd(void)
  5098. {
  5099. GH_USB_CSR0L_R_PERI_S tmp_value;
  5100. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_PERI);
  5101. tmp_value.all = value;
  5102. #if GH_USB_ENABLE_DEBUG_PRINT
  5103. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_PERI_SetupEnd] --> 0x%08x\n",
  5104. REG_USB_CSR0L_R_PERI,value);
  5105. #endif
  5106. return tmp_value.bitc.setupend;
  5107. }
  5108. #endif /* GH_INLINE_LEVEL == 0 */
  5109. /*----------------------------------------------------------------------------*/
  5110. /* register USB_CSR0L_W_PERI (write) */
  5111. /*----------------------------------------------------------------------------*/
  5112. #if GH_INLINE_LEVEL < 2
  5113. /*! \brief Writes the register 'USB_CSR0L_W_PERI'. */
  5114. void GH_USB_set_CSR0L_W_PERI(U8 data);
  5115. /*! \brief Reads the mirror variable of the register 'USB_CSR0L_W_PERI'. */
  5116. U8 GH_USB_getm_CSR0L_W_PERI(void);
  5117. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_CSR0L_W_PERI'. */
  5118. void GH_USB_set_CSR0L_W_PERI_TxPktRdy(U8 data);
  5119. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  5120. U8 GH_USB_getm_CSR0L_W_PERI_TxPktRdy(void);
  5121. /*! \brief Writes the bit group 'SentStall' of register 'USB_CSR0L_W_PERI'. */
  5122. void GH_USB_set_CSR0L_W_PERI_SentStall(U8 data);
  5123. /*! \brief Reads the bit group 'SentStall' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  5124. U8 GH_USB_getm_CSR0L_W_PERI_SentStall(void);
  5125. /*! \brief Writes the bit group 'DataEnd' of register 'USB_CSR0L_W_PERI'. */
  5126. void GH_USB_set_CSR0L_W_PERI_DataEnd(U8 data);
  5127. /*! \brief Reads the bit group 'DataEnd' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  5128. U8 GH_USB_getm_CSR0L_W_PERI_DataEnd(void);
  5129. /*! \brief Writes the bit group 'SendStall' of register 'USB_CSR0L_W_PERI'. */
  5130. void GH_USB_set_CSR0L_W_PERI_SendStall(U8 data);
  5131. /*! \brief Reads the bit group 'SendStall' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  5132. U8 GH_USB_getm_CSR0L_W_PERI_SendStall(void);
  5133. /*! \brief Writes the bit group 'ServicedRxPktRdy' of register 'USB_CSR0L_W_PERI'. */
  5134. void GH_USB_set_CSR0L_W_PERI_ServicedRxPktRdy(U8 data);
  5135. /*! \brief Reads the bit group 'ServicedRxPktRdy' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  5136. U8 GH_USB_getm_CSR0L_W_PERI_ServicedRxPktRdy(void);
  5137. /*! \brief Writes the bit group 'ServicedSetupEnd' of register 'USB_CSR0L_W_PERI'. */
  5138. void GH_USB_set_CSR0L_W_PERI_ServicedSetupEnd(U8 data);
  5139. /*! \brief Reads the bit group 'ServicedSetupEnd' from the mirror variable of register 'USB_CSR0L_W_PERI'. */
  5140. U8 GH_USB_getm_CSR0L_W_PERI_ServicedSetupEnd(void);
  5141. #else /* GH_INLINE_LEVEL < 2 */
  5142. GH_INLINE void GH_USB_set_CSR0L_W_PERI(U8 data)
  5143. {
  5144. m_usb_csr0l_w_peri.all = data;
  5145. *(volatile U8 *)REG_USB_CSR0L_W_PERI = data;
  5146. #if GH_USB_ENABLE_DEBUG_PRINT
  5147. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI] <-- 0x%08x\n",
  5148. REG_USB_CSR0L_W_PERI,data,data);
  5149. #endif
  5150. }
  5151. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI(void)
  5152. {
  5153. #if GH_USB_ENABLE_DEBUG_PRINT
  5154. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI] --> 0x%08x\n",
  5155. m_usb_csr0l_w_peri.all);
  5156. #endif
  5157. return m_usb_csr0l_w_peri.all;
  5158. }
  5159. GH_INLINE void GH_USB_set_CSR0L_W_PERI_TxPktRdy(U8 data)
  5160. {
  5161. m_usb_csr0l_w_peri.bitc.txpktrdy = data;
  5162. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  5163. #if GH_USB_ENABLE_DEBUG_PRINT
  5164. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_TxPktRdy] <-- 0x%08x\n",
  5165. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  5166. #endif
  5167. }
  5168. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_TxPktRdy(void)
  5169. {
  5170. #if GH_USB_ENABLE_DEBUG_PRINT
  5171. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_TxPktRdy] --> 0x%08x\n",
  5172. m_usb_csr0l_w_peri.bitc.txpktrdy);
  5173. #endif
  5174. return m_usb_csr0l_w_peri.bitc.txpktrdy;
  5175. }
  5176. GH_INLINE void GH_USB_set_CSR0L_W_PERI_SentStall(U8 data)
  5177. {
  5178. m_usb_csr0l_w_peri.bitc.sentstall = data;
  5179. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  5180. #if GH_USB_ENABLE_DEBUG_PRINT
  5181. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_SentStall] <-- 0x%08x\n",
  5182. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  5183. #endif
  5184. }
  5185. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_SentStall(void)
  5186. {
  5187. #if GH_USB_ENABLE_DEBUG_PRINT
  5188. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_SentStall] --> 0x%08x\n",
  5189. m_usb_csr0l_w_peri.bitc.sentstall);
  5190. #endif
  5191. return m_usb_csr0l_w_peri.bitc.sentstall;
  5192. }
  5193. GH_INLINE void GH_USB_set_CSR0L_W_PERI_DataEnd(U8 data)
  5194. {
  5195. m_usb_csr0l_w_peri.bitc.dataend = data;
  5196. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  5197. #if GH_USB_ENABLE_DEBUG_PRINT
  5198. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_DataEnd] <-- 0x%08x\n",
  5199. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  5200. #endif
  5201. }
  5202. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_DataEnd(void)
  5203. {
  5204. #if GH_USB_ENABLE_DEBUG_PRINT
  5205. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_DataEnd] --> 0x%08x\n",
  5206. m_usb_csr0l_w_peri.bitc.dataend);
  5207. #endif
  5208. return m_usb_csr0l_w_peri.bitc.dataend;
  5209. }
  5210. GH_INLINE void GH_USB_set_CSR0L_W_PERI_SendStall(U8 data)
  5211. {
  5212. m_usb_csr0l_w_peri.bitc.sendstall = data;
  5213. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  5214. #if GH_USB_ENABLE_DEBUG_PRINT
  5215. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_SendStall] <-- 0x%08x\n",
  5216. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  5217. #endif
  5218. }
  5219. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_SendStall(void)
  5220. {
  5221. #if GH_USB_ENABLE_DEBUG_PRINT
  5222. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_SendStall] --> 0x%08x\n",
  5223. m_usb_csr0l_w_peri.bitc.sendstall);
  5224. #endif
  5225. return m_usb_csr0l_w_peri.bitc.sendstall;
  5226. }
  5227. GH_INLINE void GH_USB_set_CSR0L_W_PERI_ServicedRxPktRdy(U8 data)
  5228. {
  5229. m_usb_csr0l_w_peri.bitc.servicedrxpktrdy = data;
  5230. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  5231. #if GH_USB_ENABLE_DEBUG_PRINT
  5232. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_ServicedRxPktRdy] <-- 0x%08x\n",
  5233. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  5234. #endif
  5235. }
  5236. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_ServicedRxPktRdy(void)
  5237. {
  5238. #if GH_USB_ENABLE_DEBUG_PRINT
  5239. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_ServicedRxPktRdy] --> 0x%08x\n",
  5240. m_usb_csr0l_w_peri.bitc.servicedrxpktrdy);
  5241. #endif
  5242. return m_usb_csr0l_w_peri.bitc.servicedrxpktrdy;
  5243. }
  5244. GH_INLINE void GH_USB_set_CSR0L_W_PERI_ServicedSetupEnd(U8 data)
  5245. {
  5246. m_usb_csr0l_w_peri.bitc.servicedsetupend = data;
  5247. *(volatile U8 *)REG_USB_CSR0L_W_PERI = m_usb_csr0l_w_peri.all;
  5248. #if GH_USB_ENABLE_DEBUG_PRINT
  5249. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_PERI_ServicedSetupEnd] <-- 0x%08x\n",
  5250. REG_USB_CSR0L_W_PERI,m_usb_csr0l_w_peri.all,m_usb_csr0l_w_peri.all);
  5251. #endif
  5252. }
  5253. GH_INLINE U8 GH_USB_getm_CSR0L_W_PERI_ServicedSetupEnd(void)
  5254. {
  5255. #if GH_USB_ENABLE_DEBUG_PRINT
  5256. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_PERI_ServicedSetupEnd] --> 0x%08x\n",
  5257. m_usb_csr0l_w_peri.bitc.servicedsetupend);
  5258. #endif
  5259. return m_usb_csr0l_w_peri.bitc.servicedsetupend;
  5260. }
  5261. #endif /* GH_INLINE_LEVEL < 2 */
  5262. /*----------------------------------------------------------------------------*/
  5263. /* register USB_CSR0H_W_PERI (write) */
  5264. /*----------------------------------------------------------------------------*/
  5265. #if GH_INLINE_LEVEL < 2
  5266. /*! \brief Writes the register 'USB_CSR0H_W_PERI'. */
  5267. void GH_USB_set_CSR0H_W_PERI(U8 data);
  5268. /*! \brief Reads the mirror variable of the register 'USB_CSR0H_W_PERI'. */
  5269. U8 GH_USB_getm_CSR0H_W_PERI(void);
  5270. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_CSR0H_W_PERI'. */
  5271. void GH_USB_set_CSR0H_W_PERI_FlushFIFO(U8 data);
  5272. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_CSR0H_W_PERI'. */
  5273. U8 GH_USB_getm_CSR0H_W_PERI_FlushFIFO(void);
  5274. #else /* GH_INLINE_LEVEL < 2 */
  5275. GH_INLINE void GH_USB_set_CSR0H_W_PERI(U8 data)
  5276. {
  5277. m_usb_csr0h_w_peri.all = data;
  5278. *(volatile U8 *)REG_USB_CSR0H_W_PERI = data;
  5279. #if GH_USB_ENABLE_DEBUG_PRINT
  5280. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_PERI] <-- 0x%08x\n",
  5281. REG_USB_CSR0H_W_PERI,data,data);
  5282. #endif
  5283. }
  5284. GH_INLINE U8 GH_USB_getm_CSR0H_W_PERI(void)
  5285. {
  5286. #if GH_USB_ENABLE_DEBUG_PRINT
  5287. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_PERI] --> 0x%08x\n",
  5288. m_usb_csr0h_w_peri.all);
  5289. #endif
  5290. return m_usb_csr0h_w_peri.all;
  5291. }
  5292. GH_INLINE void GH_USB_set_CSR0H_W_PERI_FlushFIFO(U8 data)
  5293. {
  5294. m_usb_csr0h_w_peri.bitc.flushfifo = data;
  5295. *(volatile U8 *)REG_USB_CSR0H_W_PERI = m_usb_csr0h_w_peri.all;
  5296. #if GH_USB_ENABLE_DEBUG_PRINT
  5297. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_PERI_FlushFIFO] <-- 0x%08x\n",
  5298. REG_USB_CSR0H_W_PERI,m_usb_csr0h_w_peri.all,m_usb_csr0h_w_peri.all);
  5299. #endif
  5300. }
  5301. GH_INLINE U8 GH_USB_getm_CSR0H_W_PERI_FlushFIFO(void)
  5302. {
  5303. #if GH_USB_ENABLE_DEBUG_PRINT
  5304. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_PERI_FlushFIFO] --> 0x%08x\n",
  5305. m_usb_csr0h_w_peri.bitc.flushfifo);
  5306. #endif
  5307. return m_usb_csr0h_w_peri.bitc.flushfifo;
  5308. }
  5309. #endif /* GH_INLINE_LEVEL < 2 */
  5310. /*----------------------------------------------------------------------------*/
  5311. /* register USB_CSR0L_R_HOST (read) */
  5312. /*----------------------------------------------------------------------------*/
  5313. #if GH_INLINE_LEVEL == 0
  5314. /*! \brief Reads the register 'USB_CSR0L_R_HOST'. */
  5315. U8 GH_USB_get_CSR0L_R_HOST(void);
  5316. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_CSR0L_R_HOST'. */
  5317. U8 GH_USB_get_CSR0L_R_HOST_RxPktRdy(void);
  5318. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_CSR0L_R_HOST'. */
  5319. U8 GH_USB_get_CSR0L_R_HOST_TxPktRdy(void);
  5320. /*! \brief Reads the bit group 'RxStall' of register 'USB_CSR0L_R_HOST'. */
  5321. U8 GH_USB_get_CSR0L_R_HOST_RxStall(void);
  5322. /*! \brief Reads the bit group 'SetupPkt' of register 'USB_CSR0L_R_HOST'. */
  5323. U8 GH_USB_get_CSR0L_R_HOST_SetupPkt(void);
  5324. /*! \brief Reads the bit group 'Error' of register 'USB_CSR0L_R_HOST'. */
  5325. U8 GH_USB_get_CSR0L_R_HOST_Error(void);
  5326. /*! \brief Reads the bit group 'ReqPkt' of register 'USB_CSR0L_R_HOST'. */
  5327. U8 GH_USB_get_CSR0L_R_HOST_ReqPkt(void);
  5328. /*! \brief Reads the bit group 'StatusPkt' of register 'USB_CSR0L_R_HOST'. */
  5329. U8 GH_USB_get_CSR0L_R_HOST_StatusPkt(void);
  5330. /*! \brief Reads the bit group 'NAKTimeout' of register 'USB_CSR0L_R_HOST'. */
  5331. U8 GH_USB_get_CSR0L_R_HOST_NAKTimeout(void);
  5332. #else /* GH_INLINE_LEVEL == 0 */
  5333. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST(void)
  5334. {
  5335. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5336. #if GH_USB_ENABLE_DEBUG_PRINT
  5337. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST] --> 0x%08x\n",
  5338. REG_USB_CSR0L_R_HOST,value);
  5339. #endif
  5340. return value;
  5341. }
  5342. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_RxPktRdy(void)
  5343. {
  5344. GH_USB_CSR0L_R_HOST_S tmp_value;
  5345. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5346. tmp_value.all = value;
  5347. #if GH_USB_ENABLE_DEBUG_PRINT
  5348. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_RxPktRdy] --> 0x%08x\n",
  5349. REG_USB_CSR0L_R_HOST,value);
  5350. #endif
  5351. return tmp_value.bitc.rxpktrdy;
  5352. }
  5353. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_TxPktRdy(void)
  5354. {
  5355. GH_USB_CSR0L_R_HOST_S tmp_value;
  5356. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5357. tmp_value.all = value;
  5358. #if GH_USB_ENABLE_DEBUG_PRINT
  5359. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_TxPktRdy] --> 0x%08x\n",
  5360. REG_USB_CSR0L_R_HOST,value);
  5361. #endif
  5362. return tmp_value.bitc.txpktrdy;
  5363. }
  5364. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_RxStall(void)
  5365. {
  5366. GH_USB_CSR0L_R_HOST_S tmp_value;
  5367. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5368. tmp_value.all = value;
  5369. #if GH_USB_ENABLE_DEBUG_PRINT
  5370. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_RxStall] --> 0x%08x\n",
  5371. REG_USB_CSR0L_R_HOST,value);
  5372. #endif
  5373. return tmp_value.bitc.rxstall;
  5374. }
  5375. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_SetupPkt(void)
  5376. {
  5377. GH_USB_CSR0L_R_HOST_S tmp_value;
  5378. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5379. tmp_value.all = value;
  5380. #if GH_USB_ENABLE_DEBUG_PRINT
  5381. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_SetupPkt] --> 0x%08x\n",
  5382. REG_USB_CSR0L_R_HOST,value);
  5383. #endif
  5384. return tmp_value.bitc.setuppkt;
  5385. }
  5386. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_Error(void)
  5387. {
  5388. GH_USB_CSR0L_R_HOST_S tmp_value;
  5389. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5390. tmp_value.all = value;
  5391. #if GH_USB_ENABLE_DEBUG_PRINT
  5392. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_Error] --> 0x%08x\n",
  5393. REG_USB_CSR0L_R_HOST,value);
  5394. #endif
  5395. return tmp_value.bitc.error;
  5396. }
  5397. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_ReqPkt(void)
  5398. {
  5399. GH_USB_CSR0L_R_HOST_S tmp_value;
  5400. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5401. tmp_value.all = value;
  5402. #if GH_USB_ENABLE_DEBUG_PRINT
  5403. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_ReqPkt] --> 0x%08x\n",
  5404. REG_USB_CSR0L_R_HOST,value);
  5405. #endif
  5406. return tmp_value.bitc.reqpkt;
  5407. }
  5408. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_StatusPkt(void)
  5409. {
  5410. GH_USB_CSR0L_R_HOST_S tmp_value;
  5411. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5412. tmp_value.all = value;
  5413. #if GH_USB_ENABLE_DEBUG_PRINT
  5414. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_StatusPkt] --> 0x%08x\n",
  5415. REG_USB_CSR0L_R_HOST,value);
  5416. #endif
  5417. return tmp_value.bitc.statuspkt;
  5418. }
  5419. GH_INLINE U8 GH_USB_get_CSR0L_R_HOST_NAKTimeout(void)
  5420. {
  5421. GH_USB_CSR0L_R_HOST_S tmp_value;
  5422. U8 value = (*(volatile U8 *)REG_USB_CSR0L_R_HOST);
  5423. tmp_value.all = value;
  5424. #if GH_USB_ENABLE_DEBUG_PRINT
  5425. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0L_R_HOST_NAKTimeout] --> 0x%08x\n",
  5426. REG_USB_CSR0L_R_HOST,value);
  5427. #endif
  5428. return tmp_value.bitc.naktimeout;
  5429. }
  5430. #endif /* GH_INLINE_LEVEL == 0 */
  5431. /*----------------------------------------------------------------------------*/
  5432. /* register USB_CSR0H_R_HOST (read) */
  5433. /*----------------------------------------------------------------------------*/
  5434. #if GH_INLINE_LEVEL == 0
  5435. /*! \brief Reads the register 'USB_CSR0H_R_HOST'. */
  5436. U8 GH_USB_get_CSR0H_R_HOST(void);
  5437. /*! \brief Reads the bit group 'DataToggle' of register 'USB_CSR0H_R_HOST'. */
  5438. U8 GH_USB_get_CSR0H_R_HOST_DataToggle(void);
  5439. /*! \brief Reads the bit group 'DisPing' of register 'USB_CSR0H_R_HOST'. */
  5440. U8 GH_USB_get_CSR0H_R_HOST_DisPing(void);
  5441. #else /* GH_INLINE_LEVEL == 0 */
  5442. GH_INLINE U8 GH_USB_get_CSR0H_R_HOST(void)
  5443. {
  5444. U8 value = (*(volatile U8 *)REG_USB_CSR0H_R_HOST);
  5445. #if GH_USB_ENABLE_DEBUG_PRINT
  5446. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0H_R_HOST] --> 0x%08x\n",
  5447. REG_USB_CSR0H_R_HOST,value);
  5448. #endif
  5449. return value;
  5450. }
  5451. GH_INLINE U8 GH_USB_get_CSR0H_R_HOST_DataToggle(void)
  5452. {
  5453. GH_USB_CSR0H_R_HOST_S tmp_value;
  5454. U8 value = (*(volatile U8 *)REG_USB_CSR0H_R_HOST);
  5455. tmp_value.all = value;
  5456. #if GH_USB_ENABLE_DEBUG_PRINT
  5457. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0H_R_HOST_DataToggle] --> 0x%08x\n",
  5458. REG_USB_CSR0H_R_HOST,value);
  5459. #endif
  5460. return tmp_value.bitc.datatoggle;
  5461. }
  5462. GH_INLINE U8 GH_USB_get_CSR0H_R_HOST_DisPing(void)
  5463. {
  5464. GH_USB_CSR0H_R_HOST_S tmp_value;
  5465. U8 value = (*(volatile U8 *)REG_USB_CSR0H_R_HOST);
  5466. tmp_value.all = value;
  5467. #if GH_USB_ENABLE_DEBUG_PRINT
  5468. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_CSR0H_R_HOST_DisPing] --> 0x%08x\n",
  5469. REG_USB_CSR0H_R_HOST,value);
  5470. #endif
  5471. return tmp_value.bitc.disping;
  5472. }
  5473. #endif /* GH_INLINE_LEVEL == 0 */
  5474. /*----------------------------------------------------------------------------*/
  5475. /* register USB_CSR0L_W_HOST (write) */
  5476. /*----------------------------------------------------------------------------*/
  5477. #if GH_INLINE_LEVEL < 2
  5478. /*! \brief Writes the register 'USB_CSR0L_W_HOST'. */
  5479. void GH_USB_set_CSR0L_W_HOST(U8 data);
  5480. /*! \brief Reads the mirror variable of the register 'USB_CSR0L_W_HOST'. */
  5481. U8 GH_USB_getm_CSR0L_W_HOST(void);
  5482. /*! \brief Writes the bit group 'RxPktRdy' of register 'USB_CSR0L_W_HOST'. */
  5483. void GH_USB_set_CSR0L_W_HOST_RxPktRdy(U8 data);
  5484. /*! \brief Reads the bit group 'RxPktRdy' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5485. U8 GH_USB_getm_CSR0L_W_HOST_RxPktRdy(void);
  5486. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_CSR0L_W_HOST'. */
  5487. void GH_USB_set_CSR0L_W_HOST_TxPktRdy(U8 data);
  5488. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5489. U8 GH_USB_getm_CSR0L_W_HOST_TxPktRdy(void);
  5490. /*! \brief Writes the bit group 'RxStall' of register 'USB_CSR0L_W_HOST'. */
  5491. void GH_USB_set_CSR0L_W_HOST_RxStall(U8 data);
  5492. /*! \brief Reads the bit group 'RxStall' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5493. U8 GH_USB_getm_CSR0L_W_HOST_RxStall(void);
  5494. /*! \brief Writes the bit group 'SetupPkt' of register 'USB_CSR0L_W_HOST'. */
  5495. void GH_USB_set_CSR0L_W_HOST_SetupPkt(U8 data);
  5496. /*! \brief Reads the bit group 'SetupPkt' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5497. U8 GH_USB_getm_CSR0L_W_HOST_SetupPkt(void);
  5498. /*! \brief Writes the bit group 'Error' of register 'USB_CSR0L_W_HOST'. */
  5499. void GH_USB_set_CSR0L_W_HOST_Error(U8 data);
  5500. /*! \brief Reads the bit group 'Error' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5501. U8 GH_USB_getm_CSR0L_W_HOST_Error(void);
  5502. /*! \brief Writes the bit group 'ReqPkt' of register 'USB_CSR0L_W_HOST'. */
  5503. void GH_USB_set_CSR0L_W_HOST_ReqPkt(U8 data);
  5504. /*! \brief Reads the bit group 'ReqPkt' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5505. U8 GH_USB_getm_CSR0L_W_HOST_ReqPkt(void);
  5506. /*! \brief Writes the bit group 'StatusPkt' of register 'USB_CSR0L_W_HOST'. */
  5507. void GH_USB_set_CSR0L_W_HOST_StatusPkt(U8 data);
  5508. /*! \brief Reads the bit group 'StatusPkt' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5509. U8 GH_USB_getm_CSR0L_W_HOST_StatusPkt(void);
  5510. /*! \brief Writes the bit group 'NAKTimeout' of register 'USB_CSR0L_W_HOST'. */
  5511. void GH_USB_set_CSR0L_W_HOST_NAKTimeout(U8 data);
  5512. /*! \brief Reads the bit group 'NAKTimeout' from the mirror variable of register 'USB_CSR0L_W_HOST'. */
  5513. U8 GH_USB_getm_CSR0L_W_HOST_NAKTimeout(void);
  5514. #else /* GH_INLINE_LEVEL < 2 */
  5515. GH_INLINE void GH_USB_set_CSR0L_W_HOST(U8 data)
  5516. {
  5517. m_usb_csr0l_w_host.all = data;
  5518. *(volatile U8 *)REG_USB_CSR0L_W_HOST = data;
  5519. #if GH_USB_ENABLE_DEBUG_PRINT
  5520. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST] <-- 0x%08x\n",
  5521. REG_USB_CSR0L_W_HOST,data,data);
  5522. #endif
  5523. }
  5524. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST(void)
  5525. {
  5526. #if GH_USB_ENABLE_DEBUG_PRINT
  5527. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST] --> 0x%08x\n",
  5528. m_usb_csr0l_w_host.all);
  5529. #endif
  5530. return m_usb_csr0l_w_host.all;
  5531. }
  5532. GH_INLINE void GH_USB_set_CSR0L_W_HOST_RxPktRdy(U8 data)
  5533. {
  5534. m_usb_csr0l_w_host.bitc.rxpktrdy = data;
  5535. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5536. #if GH_USB_ENABLE_DEBUG_PRINT
  5537. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_RxPktRdy] <-- 0x%08x\n",
  5538. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5539. #endif
  5540. }
  5541. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_RxPktRdy(void)
  5542. {
  5543. #if GH_USB_ENABLE_DEBUG_PRINT
  5544. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_RxPktRdy] --> 0x%08x\n",
  5545. m_usb_csr0l_w_host.bitc.rxpktrdy);
  5546. #endif
  5547. return m_usb_csr0l_w_host.bitc.rxpktrdy;
  5548. }
  5549. GH_INLINE void GH_USB_set_CSR0L_W_HOST_TxPktRdy(U8 data)
  5550. {
  5551. m_usb_csr0l_w_host.bitc.txpktrdy = data;
  5552. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5553. #if GH_USB_ENABLE_DEBUG_PRINT
  5554. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_TxPktRdy] <-- 0x%08x\n",
  5555. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5556. #endif
  5557. }
  5558. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_TxPktRdy(void)
  5559. {
  5560. #if GH_USB_ENABLE_DEBUG_PRINT
  5561. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_TxPktRdy] --> 0x%08x\n",
  5562. m_usb_csr0l_w_host.bitc.txpktrdy);
  5563. #endif
  5564. return m_usb_csr0l_w_host.bitc.txpktrdy;
  5565. }
  5566. GH_INLINE void GH_USB_set_CSR0L_W_HOST_RxStall(U8 data)
  5567. {
  5568. m_usb_csr0l_w_host.bitc.rxstall = data;
  5569. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5570. #if GH_USB_ENABLE_DEBUG_PRINT
  5571. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_RxStall] <-- 0x%08x\n",
  5572. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5573. #endif
  5574. }
  5575. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_RxStall(void)
  5576. {
  5577. #if GH_USB_ENABLE_DEBUG_PRINT
  5578. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_RxStall] --> 0x%08x\n",
  5579. m_usb_csr0l_w_host.bitc.rxstall);
  5580. #endif
  5581. return m_usb_csr0l_w_host.bitc.rxstall;
  5582. }
  5583. GH_INLINE void GH_USB_set_CSR0L_W_HOST_SetupPkt(U8 data)
  5584. {
  5585. m_usb_csr0l_w_host.bitc.setuppkt = data;
  5586. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5587. #if GH_USB_ENABLE_DEBUG_PRINT
  5588. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_SetupPkt] <-- 0x%08x\n",
  5589. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5590. #endif
  5591. }
  5592. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_SetupPkt(void)
  5593. {
  5594. #if GH_USB_ENABLE_DEBUG_PRINT
  5595. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_SetupPkt] --> 0x%08x\n",
  5596. m_usb_csr0l_w_host.bitc.setuppkt);
  5597. #endif
  5598. return m_usb_csr0l_w_host.bitc.setuppkt;
  5599. }
  5600. GH_INLINE void GH_USB_set_CSR0L_W_HOST_Error(U8 data)
  5601. {
  5602. m_usb_csr0l_w_host.bitc.error = data;
  5603. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5604. #if GH_USB_ENABLE_DEBUG_PRINT
  5605. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_Error] <-- 0x%08x\n",
  5606. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5607. #endif
  5608. }
  5609. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_Error(void)
  5610. {
  5611. #if GH_USB_ENABLE_DEBUG_PRINT
  5612. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_Error] --> 0x%08x\n",
  5613. m_usb_csr0l_w_host.bitc.error);
  5614. #endif
  5615. return m_usb_csr0l_w_host.bitc.error;
  5616. }
  5617. GH_INLINE void GH_USB_set_CSR0L_W_HOST_ReqPkt(U8 data)
  5618. {
  5619. m_usb_csr0l_w_host.bitc.reqpkt = data;
  5620. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5621. #if GH_USB_ENABLE_DEBUG_PRINT
  5622. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_ReqPkt] <-- 0x%08x\n",
  5623. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5624. #endif
  5625. }
  5626. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_ReqPkt(void)
  5627. {
  5628. #if GH_USB_ENABLE_DEBUG_PRINT
  5629. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_ReqPkt] --> 0x%08x\n",
  5630. m_usb_csr0l_w_host.bitc.reqpkt);
  5631. #endif
  5632. return m_usb_csr0l_w_host.bitc.reqpkt;
  5633. }
  5634. GH_INLINE void GH_USB_set_CSR0L_W_HOST_StatusPkt(U8 data)
  5635. {
  5636. m_usb_csr0l_w_host.bitc.statuspkt = data;
  5637. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5638. #if GH_USB_ENABLE_DEBUG_PRINT
  5639. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_StatusPkt] <-- 0x%08x\n",
  5640. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5641. #endif
  5642. }
  5643. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_StatusPkt(void)
  5644. {
  5645. #if GH_USB_ENABLE_DEBUG_PRINT
  5646. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_StatusPkt] --> 0x%08x\n",
  5647. m_usb_csr0l_w_host.bitc.statuspkt);
  5648. #endif
  5649. return m_usb_csr0l_w_host.bitc.statuspkt;
  5650. }
  5651. GH_INLINE void GH_USB_set_CSR0L_W_HOST_NAKTimeout(U8 data)
  5652. {
  5653. m_usb_csr0l_w_host.bitc.naktimeout = data;
  5654. *(volatile U8 *)REG_USB_CSR0L_W_HOST = m_usb_csr0l_w_host.all;
  5655. #if GH_USB_ENABLE_DEBUG_PRINT
  5656. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0L_W_HOST_NAKTimeout] <-- 0x%08x\n",
  5657. REG_USB_CSR0L_W_HOST,m_usb_csr0l_w_host.all,m_usb_csr0l_w_host.all);
  5658. #endif
  5659. }
  5660. GH_INLINE U8 GH_USB_getm_CSR0L_W_HOST_NAKTimeout(void)
  5661. {
  5662. #if GH_USB_ENABLE_DEBUG_PRINT
  5663. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0L_W_HOST_NAKTimeout] --> 0x%08x\n",
  5664. m_usb_csr0l_w_host.bitc.naktimeout);
  5665. #endif
  5666. return m_usb_csr0l_w_host.bitc.naktimeout;
  5667. }
  5668. #endif /* GH_INLINE_LEVEL < 2 */
  5669. /*----------------------------------------------------------------------------*/
  5670. /* register USB_CSR0H_W_HOST (write) */
  5671. /*----------------------------------------------------------------------------*/
  5672. #if GH_INLINE_LEVEL < 2
  5673. /*! \brief Writes the register 'USB_CSR0H_W_HOST'. */
  5674. void GH_USB_set_CSR0H_W_HOST(U8 data);
  5675. /*! \brief Reads the mirror variable of the register 'USB_CSR0H_W_HOST'. */
  5676. U8 GH_USB_getm_CSR0H_W_HOST(void);
  5677. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_CSR0H_W_HOST'. */
  5678. void GH_USB_set_CSR0H_W_HOST_FlushFIFO(U8 data);
  5679. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  5680. U8 GH_USB_getm_CSR0H_W_HOST_FlushFIFO(void);
  5681. /*! \brief Writes the bit group 'DataToggle' of register 'USB_CSR0H_W_HOST'. */
  5682. void GH_USB_set_CSR0H_W_HOST_DataToggle(U8 data);
  5683. /*! \brief Reads the bit group 'DataToggle' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  5684. U8 GH_USB_getm_CSR0H_W_HOST_DataToggle(void);
  5685. /*! \brief Writes the bit group 'DataToggleWriteEnable' of register 'USB_CSR0H_W_HOST'. */
  5686. void GH_USB_set_CSR0H_W_HOST_DataToggleWriteEnable(U8 data);
  5687. /*! \brief Reads the bit group 'DataToggleWriteEnable' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  5688. U8 GH_USB_getm_CSR0H_W_HOST_DataToggleWriteEnable(void);
  5689. /*! \brief Writes the bit group 'DisPing' of register 'USB_CSR0H_W_HOST'. */
  5690. void GH_USB_set_CSR0H_W_HOST_DisPing(U8 data);
  5691. /*! \brief Reads the bit group 'DisPing' from the mirror variable of register 'USB_CSR0H_W_HOST'. */
  5692. U8 GH_USB_getm_CSR0H_W_HOST_DisPing(void);
  5693. #else /* GH_INLINE_LEVEL < 2 */
  5694. GH_INLINE void GH_USB_set_CSR0H_W_HOST(U8 data)
  5695. {
  5696. m_usb_csr0h_w_host.all = data;
  5697. *(volatile U8 *)REG_USB_CSR0H_W_HOST = data;
  5698. #if GH_USB_ENABLE_DEBUG_PRINT
  5699. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST] <-- 0x%08x\n",
  5700. REG_USB_CSR0H_W_HOST,data,data);
  5701. #endif
  5702. }
  5703. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST(void)
  5704. {
  5705. #if GH_USB_ENABLE_DEBUG_PRINT
  5706. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST] --> 0x%08x\n",
  5707. m_usb_csr0h_w_host.all);
  5708. #endif
  5709. return m_usb_csr0h_w_host.all;
  5710. }
  5711. GH_INLINE void GH_USB_set_CSR0H_W_HOST_FlushFIFO(U8 data)
  5712. {
  5713. m_usb_csr0h_w_host.bitc.flushfifo = data;
  5714. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  5715. #if GH_USB_ENABLE_DEBUG_PRINT
  5716. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_FlushFIFO] <-- 0x%08x\n",
  5717. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  5718. #endif
  5719. }
  5720. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_FlushFIFO(void)
  5721. {
  5722. #if GH_USB_ENABLE_DEBUG_PRINT
  5723. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_FlushFIFO] --> 0x%08x\n",
  5724. m_usb_csr0h_w_host.bitc.flushfifo);
  5725. #endif
  5726. return m_usb_csr0h_w_host.bitc.flushfifo;
  5727. }
  5728. GH_INLINE void GH_USB_set_CSR0H_W_HOST_DataToggle(U8 data)
  5729. {
  5730. m_usb_csr0h_w_host.bitc.datatoggle = data;
  5731. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  5732. #if GH_USB_ENABLE_DEBUG_PRINT
  5733. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_DataToggle] <-- 0x%08x\n",
  5734. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  5735. #endif
  5736. }
  5737. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_DataToggle(void)
  5738. {
  5739. #if GH_USB_ENABLE_DEBUG_PRINT
  5740. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_DataToggle] --> 0x%08x\n",
  5741. m_usb_csr0h_w_host.bitc.datatoggle);
  5742. #endif
  5743. return m_usb_csr0h_w_host.bitc.datatoggle;
  5744. }
  5745. GH_INLINE void GH_USB_set_CSR0H_W_HOST_DataToggleWriteEnable(U8 data)
  5746. {
  5747. m_usb_csr0h_w_host.bitc.datatogglewriteenable = data;
  5748. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  5749. #if GH_USB_ENABLE_DEBUG_PRINT
  5750. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_DataToggleWriteEnable] <-- 0x%08x\n",
  5751. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  5752. #endif
  5753. }
  5754. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_DataToggleWriteEnable(void)
  5755. {
  5756. #if GH_USB_ENABLE_DEBUG_PRINT
  5757. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_DataToggleWriteEnable] --> 0x%08x\n",
  5758. m_usb_csr0h_w_host.bitc.datatogglewriteenable);
  5759. #endif
  5760. return m_usb_csr0h_w_host.bitc.datatogglewriteenable;
  5761. }
  5762. GH_INLINE void GH_USB_set_CSR0H_W_HOST_DisPing(U8 data)
  5763. {
  5764. m_usb_csr0h_w_host.bitc.disping = data;
  5765. *(volatile U8 *)REG_USB_CSR0H_W_HOST = m_usb_csr0h_w_host.all;
  5766. #if GH_USB_ENABLE_DEBUG_PRINT
  5767. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_CSR0H_W_HOST_DisPing] <-- 0x%08x\n",
  5768. REG_USB_CSR0H_W_HOST,m_usb_csr0h_w_host.all,m_usb_csr0h_w_host.all);
  5769. #endif
  5770. }
  5771. GH_INLINE U8 GH_USB_getm_CSR0H_W_HOST_DisPing(void)
  5772. {
  5773. #if GH_USB_ENABLE_DEBUG_PRINT
  5774. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_CSR0H_W_HOST_DisPing] --> 0x%08x\n",
  5775. m_usb_csr0h_w_host.bitc.disping);
  5776. #endif
  5777. return m_usb_csr0h_w_host.bitc.disping;
  5778. }
  5779. #endif /* GH_INLINE_LEVEL < 2 */
  5780. /*----------------------------------------------------------------------------*/
  5781. /* register USB_Count0 (read) */
  5782. /*----------------------------------------------------------------------------*/
  5783. #if GH_INLINE_LEVEL == 0
  5784. /*! \brief Reads the register 'USB_Count0'. */
  5785. U8 GH_USB_get_Count0(void);
  5786. /*! \brief Reads the bit group 'Endpoint0RxCount' of register 'USB_Count0'. */
  5787. U8 GH_USB_get_Count0_Endpoint0RxCount(void);
  5788. #else /* GH_INLINE_LEVEL == 0 */
  5789. GH_INLINE U8 GH_USB_get_Count0(void)
  5790. {
  5791. U8 value = (*(volatile U8 *)REG_USB_COUNT0);
  5792. #if GH_USB_ENABLE_DEBUG_PRINT
  5793. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Count0] --> 0x%08x\n",
  5794. REG_USB_COUNT0,value);
  5795. #endif
  5796. return value;
  5797. }
  5798. GH_INLINE U8 GH_USB_get_Count0_Endpoint0RxCount(void)
  5799. {
  5800. GH_USB_COUNT0_S tmp_value;
  5801. U8 value = (*(volatile U8 *)REG_USB_COUNT0);
  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_Count0_Endpoint0RxCount] --> 0x%08x\n",
  5805. REG_USB_COUNT0,value);
  5806. #endif
  5807. return tmp_value.bitc.endpoint0rxcount;
  5808. }
  5809. #endif /* GH_INLINE_LEVEL == 0 */
  5810. /*----------------------------------------------------------------------------*/
  5811. /* register USB_Type0 (read/write) */
  5812. /*----------------------------------------------------------------------------*/
  5813. #if GH_INLINE_LEVEL == 0
  5814. /*! \brief Writes the register 'USB_Type0'. */
  5815. void GH_USB_set_Type0(U8 data);
  5816. /*! \brief Reads the register 'USB_Type0'. */
  5817. U8 GH_USB_get_Type0(void);
  5818. /*! \brief Writes the bit group 'Speed' of register 'USB_Type0'. */
  5819. void GH_USB_set_Type0_Speed(U8 data);
  5820. /*! \brief Reads the bit group 'Speed' of register 'USB_Type0'. */
  5821. U8 GH_USB_get_Type0_Speed(void);
  5822. #else /* GH_INLINE_LEVEL == 0 */
  5823. GH_INLINE void GH_USB_set_Type0(U8 data)
  5824. {
  5825. *(volatile U8 *)REG_USB_TYPE0 = data;
  5826. #if GH_USB_ENABLE_DEBUG_PRINT
  5827. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Type0] <-- 0x%08x\n",
  5828. REG_USB_TYPE0,data,data);
  5829. #endif
  5830. }
  5831. GH_INLINE U8 GH_USB_get_Type0(void)
  5832. {
  5833. U8 value = (*(volatile U8 *)REG_USB_TYPE0);
  5834. #if GH_USB_ENABLE_DEBUG_PRINT
  5835. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Type0] --> 0x%08x\n",
  5836. REG_USB_TYPE0,value);
  5837. #endif
  5838. return value;
  5839. }
  5840. GH_INLINE void GH_USB_set_Type0_Speed(U8 data)
  5841. {
  5842. GH_USB_TYPE0_S d;
  5843. d.all = *(volatile U8 *)REG_USB_TYPE0;
  5844. d.bitc.speed = data;
  5845. *(volatile U8 *)REG_USB_TYPE0 = d.all;
  5846. #if GH_USB_ENABLE_DEBUG_PRINT
  5847. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Type0_Speed] <-- 0x%08x\n",
  5848. REG_USB_TYPE0,d.all,d.all);
  5849. #endif
  5850. }
  5851. GH_INLINE U8 GH_USB_get_Type0_Speed(void)
  5852. {
  5853. GH_USB_TYPE0_S tmp_value;
  5854. U8 value = (*(volatile U8 *)REG_USB_TYPE0);
  5855. tmp_value.all = value;
  5856. #if GH_USB_ENABLE_DEBUG_PRINT
  5857. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Type0_Speed] --> 0x%08x\n",
  5858. REG_USB_TYPE0,value);
  5859. #endif
  5860. return tmp_value.bitc.speed;
  5861. }
  5862. #endif /* GH_INLINE_LEVEL == 0 */
  5863. /*----------------------------------------------------------------------------*/
  5864. /* register USB_NAKLimit0_HOST (read/write) */
  5865. /*----------------------------------------------------------------------------*/
  5866. #if GH_INLINE_LEVEL == 0
  5867. /*! \brief Writes the register 'USB_NAKLimit0_HOST'. */
  5868. void GH_USB_set_NAKLimit0_HOST(U8 data);
  5869. /*! \brief Reads the register 'USB_NAKLimit0_HOST'. */
  5870. U8 GH_USB_get_NAKLimit0_HOST(void);
  5871. /*! \brief Writes the bit group 'Endpoint0NAKLimit' of register 'USB_NAKLimit0_HOST'. */
  5872. void GH_USB_set_NAKLimit0_HOST_Endpoint0NAKLimit(U8 data);
  5873. /*! \brief Reads the bit group 'Endpoint0NAKLimit' of register 'USB_NAKLimit0_HOST'. */
  5874. U8 GH_USB_get_NAKLimit0_HOST_Endpoint0NAKLimit(void);
  5875. #else /* GH_INLINE_LEVEL == 0 */
  5876. GH_INLINE void GH_USB_set_NAKLimit0_HOST(U8 data)
  5877. {
  5878. *(volatile U8 *)REG_USB_NAKLIMIT0_HOST = data;
  5879. #if GH_USB_ENABLE_DEBUG_PRINT
  5880. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_NAKLimit0_HOST] <-- 0x%08x\n",
  5881. REG_USB_NAKLIMIT0_HOST,data,data);
  5882. #endif
  5883. }
  5884. GH_INLINE U8 GH_USB_get_NAKLimit0_HOST(void)
  5885. {
  5886. U8 value = (*(volatile U8 *)REG_USB_NAKLIMIT0_HOST);
  5887. #if GH_USB_ENABLE_DEBUG_PRINT
  5888. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_NAKLimit0_HOST] --> 0x%08x\n",
  5889. REG_USB_NAKLIMIT0_HOST,value);
  5890. #endif
  5891. return value;
  5892. }
  5893. GH_INLINE void GH_USB_set_NAKLimit0_HOST_Endpoint0NAKLimit(U8 data)
  5894. {
  5895. GH_USB_NAKLIMIT0_HOST_S d;
  5896. d.all = *(volatile U8 *)REG_USB_NAKLIMIT0_HOST;
  5897. d.bitc.endpoint0naklimit = data;
  5898. *(volatile U8 *)REG_USB_NAKLIMIT0_HOST = d.all;
  5899. #if GH_USB_ENABLE_DEBUG_PRINT
  5900. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_NAKLimit0_HOST_Endpoint0NAKLimit] <-- 0x%08x\n",
  5901. REG_USB_NAKLIMIT0_HOST,d.all,d.all);
  5902. #endif
  5903. }
  5904. GH_INLINE U8 GH_USB_get_NAKLimit0_HOST_Endpoint0NAKLimit(void)
  5905. {
  5906. GH_USB_NAKLIMIT0_HOST_S tmp_value;
  5907. U8 value = (*(volatile U8 *)REG_USB_NAKLIMIT0_HOST);
  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_NAKLimit0_HOST_Endpoint0NAKLimit] --> 0x%08x\n",
  5911. REG_USB_NAKLIMIT0_HOST,value);
  5912. #endif
  5913. return tmp_value.bitc.endpoint0naklimit;
  5914. }
  5915. #endif /* GH_INLINE_LEVEL == 0 */
  5916. /*----------------------------------------------------------------------------*/
  5917. /* register USB_ConfigData (read) */
  5918. /*----------------------------------------------------------------------------*/
  5919. #if GH_INLINE_LEVEL == 0
  5920. /*! \brief Reads the register 'USB_ConfigData'. */
  5921. U8 GH_USB_get_ConfigData(void);
  5922. /*! \brief Reads the bit group 'UTMI_DataWidth' of register 'USB_ConfigData'. */
  5923. U8 GH_USB_get_ConfigData_UTMI_DataWidth(void);
  5924. /*! \brief Reads the bit group 'SoftConE' of register 'USB_ConfigData'. */
  5925. U8 GH_USB_get_ConfigData_SoftConE(void);
  5926. /*! \brief Reads the bit group 'DynFIFO_Sizing' of register 'USB_ConfigData'. */
  5927. U8 GH_USB_get_ConfigData_DynFIFO_Sizing(void);
  5928. /*! \brief Reads the bit group 'HBTxE' of register 'USB_ConfigData'. */
  5929. U8 GH_USB_get_ConfigData_HBTxE(void);
  5930. /*! \brief Reads the bit group 'HBRxE' of register 'USB_ConfigData'. */
  5931. U8 GH_USB_get_ConfigData_HBRxE(void);
  5932. /*! \brief Reads the bit group 'BigEndian' of register 'USB_ConfigData'. */
  5933. U8 GH_USB_get_ConfigData_BigEndian(void);
  5934. /*! \brief Reads the bit group 'MPTxE' of register 'USB_ConfigData'. */
  5935. U8 GH_USB_get_ConfigData_MPTxE(void);
  5936. /*! \brief Reads the bit group 'MPRxE' of register 'USB_ConfigData'. */
  5937. U8 GH_USB_get_ConfigData_MPRxE(void);
  5938. #else /* GH_INLINE_LEVEL == 0 */
  5939. GH_INLINE U8 GH_USB_get_ConfigData(void)
  5940. {
  5941. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  5942. #if GH_USB_ENABLE_DEBUG_PRINT
  5943. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData] --> 0x%08x\n",
  5944. REG_USB_CONFIGDATA,value);
  5945. #endif
  5946. return value;
  5947. }
  5948. GH_INLINE U8 GH_USB_get_ConfigData_UTMI_DataWidth(void)
  5949. {
  5950. GH_USB_CONFIGDATA_S tmp_value;
  5951. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  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_ConfigData_UTMI_DataWidth] --> 0x%08x\n",
  5955. REG_USB_CONFIGDATA,value);
  5956. #endif
  5957. return tmp_value.bitc.utmi_datawidth;
  5958. }
  5959. GH_INLINE U8 GH_USB_get_ConfigData_SoftConE(void)
  5960. {
  5961. GH_USB_CONFIGDATA_S tmp_value;
  5962. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  5963. tmp_value.all = value;
  5964. #if GH_USB_ENABLE_DEBUG_PRINT
  5965. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_SoftConE] --> 0x%08x\n",
  5966. REG_USB_CONFIGDATA,value);
  5967. #endif
  5968. return tmp_value.bitc.softcone;
  5969. }
  5970. GH_INLINE U8 GH_USB_get_ConfigData_DynFIFO_Sizing(void)
  5971. {
  5972. GH_USB_CONFIGDATA_S tmp_value;
  5973. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  5974. tmp_value.all = value;
  5975. #if GH_USB_ENABLE_DEBUG_PRINT
  5976. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_DynFIFO_Sizing] --> 0x%08x\n",
  5977. REG_USB_CONFIGDATA,value);
  5978. #endif
  5979. return tmp_value.bitc.dynfifo_sizing;
  5980. }
  5981. GH_INLINE U8 GH_USB_get_ConfigData_HBTxE(void)
  5982. {
  5983. GH_USB_CONFIGDATA_S tmp_value;
  5984. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  5985. tmp_value.all = value;
  5986. #if GH_USB_ENABLE_DEBUG_PRINT
  5987. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_HBTxE] --> 0x%08x\n",
  5988. REG_USB_CONFIGDATA,value);
  5989. #endif
  5990. return tmp_value.bitc.hbtxe;
  5991. }
  5992. GH_INLINE U8 GH_USB_get_ConfigData_HBRxE(void)
  5993. {
  5994. GH_USB_CONFIGDATA_S tmp_value;
  5995. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  5996. tmp_value.all = value;
  5997. #if GH_USB_ENABLE_DEBUG_PRINT
  5998. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_HBRxE] --> 0x%08x\n",
  5999. REG_USB_CONFIGDATA,value);
  6000. #endif
  6001. return tmp_value.bitc.hbrxe;
  6002. }
  6003. GH_INLINE U8 GH_USB_get_ConfigData_BigEndian(void)
  6004. {
  6005. GH_USB_CONFIGDATA_S tmp_value;
  6006. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  6007. tmp_value.all = value;
  6008. #if GH_USB_ENABLE_DEBUG_PRINT
  6009. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_BigEndian] --> 0x%08x\n",
  6010. REG_USB_CONFIGDATA,value);
  6011. #endif
  6012. return tmp_value.bitc.bigendian;
  6013. }
  6014. GH_INLINE U8 GH_USB_get_ConfigData_MPTxE(void)
  6015. {
  6016. GH_USB_CONFIGDATA_S tmp_value;
  6017. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  6018. tmp_value.all = value;
  6019. #if GH_USB_ENABLE_DEBUG_PRINT
  6020. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_MPTxE] --> 0x%08x\n",
  6021. REG_USB_CONFIGDATA,value);
  6022. #endif
  6023. return tmp_value.bitc.mptxe;
  6024. }
  6025. GH_INLINE U8 GH_USB_get_ConfigData_MPRxE(void)
  6026. {
  6027. GH_USB_CONFIGDATA_S tmp_value;
  6028. U8 value = (*(volatile U8 *)REG_USB_CONFIGDATA);
  6029. tmp_value.all = value;
  6030. #if GH_USB_ENABLE_DEBUG_PRINT
  6031. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_ConfigData_MPRxE] --> 0x%08x\n",
  6032. REG_USB_CONFIGDATA,value);
  6033. #endif
  6034. return tmp_value.bitc.mprxe;
  6035. }
  6036. #endif /* GH_INLINE_LEVEL == 0 */
  6037. /*----------------------------------------------------------------------------*/
  6038. /* register USB_TxMaxP (read/write) */
  6039. /*----------------------------------------------------------------------------*/
  6040. #if GH_INLINE_LEVEL == 0
  6041. /*! \brief Writes the register 'USB_TxMaxP'. */
  6042. void GH_USB_set_TxMaxP(U16 data);
  6043. /*! \brief Reads the register 'USB_TxMaxP'. */
  6044. U16 GH_USB_get_TxMaxP(void);
  6045. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_TxMaxP'. */
  6046. void GH_USB_set_TxMaxP_TxMaxP(U16 data);
  6047. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_TxMaxP'. */
  6048. U16 GH_USB_get_TxMaxP_TxMaxP(void);
  6049. /*! \brief Writes the bit group 'multiplier' of register 'USB_TxMaxP'. */
  6050. void GH_USB_set_TxMaxP_multiplier(U8 data);
  6051. /*! \brief Reads the bit group 'multiplier' of register 'USB_TxMaxP'. */
  6052. U8 GH_USB_get_TxMaxP_multiplier(void);
  6053. #else /* GH_INLINE_LEVEL == 0 */
  6054. GH_INLINE void GH_USB_set_TxMaxP(U16 data)
  6055. {
  6056. *(volatile U16 *)REG_USB_TXMAXP = data;
  6057. #if GH_USB_ENABLE_DEBUG_PRINT
  6058. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxP] <-- 0x%08x\n",
  6059. REG_USB_TXMAXP,data,data);
  6060. #endif
  6061. }
  6062. GH_INLINE U16 GH_USB_get_TxMaxP(void)
  6063. {
  6064. U16 value = (*(volatile U16 *)REG_USB_TXMAXP);
  6065. #if GH_USB_ENABLE_DEBUG_PRINT
  6066. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxP] --> 0x%08x\n",
  6067. REG_USB_TXMAXP,value);
  6068. #endif
  6069. return value;
  6070. }
  6071. GH_INLINE void GH_USB_set_TxMaxP_TxMaxP(U16 data)
  6072. {
  6073. GH_USB_TXMAXP_S d;
  6074. d.all = *(volatile U16 *)REG_USB_TXMAXP;
  6075. d.bitc.txmaxp = data;
  6076. *(volatile U16 *)REG_USB_TXMAXP = d.all;
  6077. #if GH_USB_ENABLE_DEBUG_PRINT
  6078. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxP_TxMaxP] <-- 0x%08x\n",
  6079. REG_USB_TXMAXP,d.all,d.all);
  6080. #endif
  6081. }
  6082. GH_INLINE U16 GH_USB_get_TxMaxP_TxMaxP(void)
  6083. {
  6084. GH_USB_TXMAXP_S tmp_value;
  6085. U16 value = (*(volatile U16 *)REG_USB_TXMAXP);
  6086. tmp_value.all = value;
  6087. #if GH_USB_ENABLE_DEBUG_PRINT
  6088. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxP_TxMaxP] --> 0x%08x\n",
  6089. REG_USB_TXMAXP,value);
  6090. #endif
  6091. return tmp_value.bitc.txmaxp;
  6092. }
  6093. GH_INLINE void GH_USB_set_TxMaxP_multiplier(U8 data)
  6094. {
  6095. GH_USB_TXMAXP_S d;
  6096. d.all = *(volatile U16 *)REG_USB_TXMAXP;
  6097. d.bitc.multiplier = data;
  6098. *(volatile U16 *)REG_USB_TXMAXP = d.all;
  6099. #if GH_USB_ENABLE_DEBUG_PRINT
  6100. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxP_multiplier] <-- 0x%08x\n",
  6101. REG_USB_TXMAXP,d.all,d.all);
  6102. #endif
  6103. }
  6104. GH_INLINE U8 GH_USB_get_TxMaxP_multiplier(void)
  6105. {
  6106. GH_USB_TXMAXP_S tmp_value;
  6107. U16 value = (*(volatile U16 *)REG_USB_TXMAXP);
  6108. tmp_value.all = value;
  6109. #if GH_USB_ENABLE_DEBUG_PRINT
  6110. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxP_multiplier] --> 0x%08x\n",
  6111. REG_USB_TXMAXP,value);
  6112. #endif
  6113. return tmp_value.bitc.multiplier;
  6114. }
  6115. #endif /* GH_INLINE_LEVEL == 0 */
  6116. /*----------------------------------------------------------------------------*/
  6117. /* register USB_TxMaxPL (read/write) */
  6118. /*----------------------------------------------------------------------------*/
  6119. #if GH_INLINE_LEVEL == 0
  6120. /*! \brief Writes the register 'USB_TxMaxPL'. */
  6121. void GH_USB_set_TxMaxPL(U8 data);
  6122. /*! \brief Reads the register 'USB_TxMaxPL'. */
  6123. U8 GH_USB_get_TxMaxPL(void);
  6124. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_TxMaxPL'. */
  6125. void GH_USB_set_TxMaxPL_TxMaxP(U8 data);
  6126. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_TxMaxPL'. */
  6127. U8 GH_USB_get_TxMaxPL_TxMaxP(void);
  6128. #else /* GH_INLINE_LEVEL == 0 */
  6129. GH_INLINE void GH_USB_set_TxMaxPL(U8 data)
  6130. {
  6131. *(volatile U8 *)REG_USB_TXMAXPL = data;
  6132. #if GH_USB_ENABLE_DEBUG_PRINT
  6133. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxPL] <-- 0x%08x\n",
  6134. REG_USB_TXMAXPL,data,data);
  6135. #endif
  6136. }
  6137. GH_INLINE U8 GH_USB_get_TxMaxPL(void)
  6138. {
  6139. U8 value = (*(volatile U8 *)REG_USB_TXMAXPL);
  6140. #if GH_USB_ENABLE_DEBUG_PRINT
  6141. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxPL] --> 0x%08x\n",
  6142. REG_USB_TXMAXPL,value);
  6143. #endif
  6144. return value;
  6145. }
  6146. GH_INLINE void GH_USB_set_TxMaxPL_TxMaxP(U8 data)
  6147. {
  6148. GH_USB_TXMAXPL_S d;
  6149. d.all = *(volatile U8 *)REG_USB_TXMAXPL;
  6150. d.bitc.txmaxp = data;
  6151. *(volatile U8 *)REG_USB_TXMAXPL = d.all;
  6152. #if GH_USB_ENABLE_DEBUG_PRINT
  6153. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxPL_TxMaxP] <-- 0x%08x\n",
  6154. REG_USB_TXMAXPL,d.all,d.all);
  6155. #endif
  6156. }
  6157. GH_INLINE U8 GH_USB_get_TxMaxPL_TxMaxP(void)
  6158. {
  6159. GH_USB_TXMAXPL_S tmp_value;
  6160. U8 value = (*(volatile U8 *)REG_USB_TXMAXPL);
  6161. tmp_value.all = value;
  6162. #if GH_USB_ENABLE_DEBUG_PRINT
  6163. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxPL_TxMaxP] --> 0x%08x\n",
  6164. REG_USB_TXMAXPL,value);
  6165. #endif
  6166. return tmp_value.bitc.txmaxp;
  6167. }
  6168. #endif /* GH_INLINE_LEVEL == 0 */
  6169. /*----------------------------------------------------------------------------*/
  6170. /* register USB_TxMaxPH (read/write) */
  6171. /*----------------------------------------------------------------------------*/
  6172. #if GH_INLINE_LEVEL == 0
  6173. /*! \brief Writes the register 'USB_TxMaxPH'. */
  6174. void GH_USB_set_TxMaxPH(U8 data);
  6175. /*! \brief Reads the register 'USB_TxMaxPH'. */
  6176. U8 GH_USB_get_TxMaxPH(void);
  6177. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_TxMaxPH'. */
  6178. void GH_USB_set_TxMaxPH_TxMaxP(U8 data);
  6179. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_TxMaxPH'. */
  6180. U8 GH_USB_get_TxMaxPH_TxMaxP(void);
  6181. /*! \brief Writes the bit group 'multiplier' of register 'USB_TxMaxPH'. */
  6182. void GH_USB_set_TxMaxPH_multiplier(U8 data);
  6183. /*! \brief Reads the bit group 'multiplier' of register 'USB_TxMaxPH'. */
  6184. U8 GH_USB_get_TxMaxPH_multiplier(void);
  6185. #else /* GH_INLINE_LEVEL == 0 */
  6186. GH_INLINE void GH_USB_set_TxMaxPH(U8 data)
  6187. {
  6188. *(volatile U8 *)REG_USB_TXMAXPH = data;
  6189. #if GH_USB_ENABLE_DEBUG_PRINT
  6190. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxPH] <-- 0x%08x\n",
  6191. REG_USB_TXMAXPH,data,data);
  6192. #endif
  6193. }
  6194. GH_INLINE U8 GH_USB_get_TxMaxPH(void)
  6195. {
  6196. U8 value = (*(volatile U8 *)REG_USB_TXMAXPH);
  6197. #if GH_USB_ENABLE_DEBUG_PRINT
  6198. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxPH] --> 0x%08x\n",
  6199. REG_USB_TXMAXPH,value);
  6200. #endif
  6201. return value;
  6202. }
  6203. GH_INLINE void GH_USB_set_TxMaxPH_TxMaxP(U8 data)
  6204. {
  6205. GH_USB_TXMAXPH_S d;
  6206. d.all = *(volatile U8 *)REG_USB_TXMAXPH;
  6207. d.bitc.txmaxp = data;
  6208. *(volatile U8 *)REG_USB_TXMAXPH = d.all;
  6209. #if GH_USB_ENABLE_DEBUG_PRINT
  6210. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxPH_TxMaxP] <-- 0x%08x\n",
  6211. REG_USB_TXMAXPH,d.all,d.all);
  6212. #endif
  6213. }
  6214. GH_INLINE U8 GH_USB_get_TxMaxPH_TxMaxP(void)
  6215. {
  6216. GH_USB_TXMAXPH_S tmp_value;
  6217. U8 value = (*(volatile U8 *)REG_USB_TXMAXPH);
  6218. tmp_value.all = value;
  6219. #if GH_USB_ENABLE_DEBUG_PRINT
  6220. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxPH_TxMaxP] --> 0x%08x\n",
  6221. REG_USB_TXMAXPH,value);
  6222. #endif
  6223. return tmp_value.bitc.txmaxp;
  6224. }
  6225. GH_INLINE void GH_USB_set_TxMaxPH_multiplier(U8 data)
  6226. {
  6227. GH_USB_TXMAXPH_S d;
  6228. d.all = *(volatile U8 *)REG_USB_TXMAXPH;
  6229. d.bitc.multiplier = data;
  6230. *(volatile U8 *)REG_USB_TXMAXPH = d.all;
  6231. #if GH_USB_ENABLE_DEBUG_PRINT
  6232. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxMaxPH_multiplier] <-- 0x%08x\n",
  6233. REG_USB_TXMAXPH,d.all,d.all);
  6234. #endif
  6235. }
  6236. GH_INLINE U8 GH_USB_get_TxMaxPH_multiplier(void)
  6237. {
  6238. GH_USB_TXMAXPH_S tmp_value;
  6239. U8 value = (*(volatile U8 *)REG_USB_TXMAXPH);
  6240. tmp_value.all = value;
  6241. #if GH_USB_ENABLE_DEBUG_PRINT
  6242. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxMaxPH_multiplier] --> 0x%08x\n",
  6243. REG_USB_TXMAXPH,value);
  6244. #endif
  6245. return tmp_value.bitc.multiplier;
  6246. }
  6247. #endif /* GH_INLINE_LEVEL == 0 */
  6248. /*----------------------------------------------------------------------------*/
  6249. /* register USB_TXCSRL_R_PERI (read) */
  6250. /*----------------------------------------------------------------------------*/
  6251. #if GH_INLINE_LEVEL == 0
  6252. /*! \brief Reads the register 'USB_TXCSRL_R_PERI'. */
  6253. U8 GH_USB_get_TXCSRL_R_PERI(void);
  6254. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_TXCSRL_R_PERI'. */
  6255. U8 GH_USB_get_TXCSRL_R_PERI_TxPktRdy(void);
  6256. /*! \brief Reads the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_R_PERI'. */
  6257. U8 GH_USB_get_TXCSRL_R_PERI_FIFONotEmpty(void);
  6258. /*! \brief Reads the bit group 'UnderRun' of register 'USB_TXCSRL_R_PERI'. */
  6259. U8 GH_USB_get_TXCSRL_R_PERI_UnderRun(void);
  6260. /*! \brief Reads the bit group 'SendStall' of register 'USB_TXCSRL_R_PERI'. */
  6261. U8 GH_USB_get_TXCSRL_R_PERI_SendStall(void);
  6262. /*! \brief Reads the bit group 'SentStall' of register 'USB_TXCSRL_R_PERI'. */
  6263. U8 GH_USB_get_TXCSRL_R_PERI_SentStall(void);
  6264. /*! \brief Reads the bit group 'IncompTx' of register 'USB_TXCSRL_R_PERI'. */
  6265. U8 GH_USB_get_TXCSRL_R_PERI_IncompTx(void);
  6266. #else /* GH_INLINE_LEVEL == 0 */
  6267. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI(void)
  6268. {
  6269. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  6270. #if GH_USB_ENABLE_DEBUG_PRINT
  6271. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI] --> 0x%08x\n",
  6272. REG_USB_TXCSRL_R_PERI,value);
  6273. #endif
  6274. return value;
  6275. }
  6276. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_TxPktRdy(void)
  6277. {
  6278. GH_USB_TXCSRL_R_PERI_S tmp_value;
  6279. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  6280. tmp_value.all = value;
  6281. #if GH_USB_ENABLE_DEBUG_PRINT
  6282. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_TxPktRdy] --> 0x%08x\n",
  6283. REG_USB_TXCSRL_R_PERI,value);
  6284. #endif
  6285. return tmp_value.bitc.txpktrdy;
  6286. }
  6287. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_FIFONotEmpty(void)
  6288. {
  6289. GH_USB_TXCSRL_R_PERI_S tmp_value;
  6290. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  6291. tmp_value.all = value;
  6292. #if GH_USB_ENABLE_DEBUG_PRINT
  6293. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_FIFONotEmpty] --> 0x%08x\n",
  6294. REG_USB_TXCSRL_R_PERI,value);
  6295. #endif
  6296. return tmp_value.bitc.fifonotempty;
  6297. }
  6298. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_UnderRun(void)
  6299. {
  6300. GH_USB_TXCSRL_R_PERI_S tmp_value;
  6301. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  6302. tmp_value.all = value;
  6303. #if GH_USB_ENABLE_DEBUG_PRINT
  6304. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_UnderRun] --> 0x%08x\n",
  6305. REG_USB_TXCSRL_R_PERI,value);
  6306. #endif
  6307. return tmp_value.bitc.underrun;
  6308. }
  6309. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_SendStall(void)
  6310. {
  6311. GH_USB_TXCSRL_R_PERI_S tmp_value;
  6312. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  6313. tmp_value.all = value;
  6314. #if GH_USB_ENABLE_DEBUG_PRINT
  6315. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_SendStall] --> 0x%08x\n",
  6316. REG_USB_TXCSRL_R_PERI,value);
  6317. #endif
  6318. return tmp_value.bitc.sendstall;
  6319. }
  6320. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_SentStall(void)
  6321. {
  6322. GH_USB_TXCSRL_R_PERI_S tmp_value;
  6323. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  6324. tmp_value.all = value;
  6325. #if GH_USB_ENABLE_DEBUG_PRINT
  6326. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_SentStall] --> 0x%08x\n",
  6327. REG_USB_TXCSRL_R_PERI,value);
  6328. #endif
  6329. return tmp_value.bitc.sentstall;
  6330. }
  6331. GH_INLINE U8 GH_USB_get_TXCSRL_R_PERI_IncompTx(void)
  6332. {
  6333. GH_USB_TXCSRL_R_PERI_S tmp_value;
  6334. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_PERI);
  6335. tmp_value.all = value;
  6336. #if GH_USB_ENABLE_DEBUG_PRINT
  6337. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_PERI_IncompTx] --> 0x%08x\n",
  6338. REG_USB_TXCSRL_R_PERI,value);
  6339. #endif
  6340. return tmp_value.bitc.incomptx;
  6341. }
  6342. #endif /* GH_INLINE_LEVEL == 0 */
  6343. /*----------------------------------------------------------------------------*/
  6344. /* register USB_TXCSRH_R_PERI (read) */
  6345. /*----------------------------------------------------------------------------*/
  6346. #if GH_INLINE_LEVEL == 0
  6347. /*! \brief Reads the register 'USB_TXCSRH_R_PERI'. */
  6348. U8 GH_USB_get_TXCSRH_R_PERI(void);
  6349. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_TXCSRH_R_PERI'. */
  6350. U8 GH_USB_get_TXCSRH_R_PERI_DMAReqMode(void);
  6351. /*! \brief Reads the bit group 'FrcDataTog' of register 'USB_TXCSRH_R_PERI'. */
  6352. U8 GH_USB_get_TXCSRH_R_PERI_FrcDataTog(void);
  6353. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_TXCSRH_R_PERI'. */
  6354. U8 GH_USB_get_TXCSRH_R_PERI_DMAReqEnab(void);
  6355. /*! \brief Reads the bit group 'Mode' of register 'USB_TXCSRH_R_PERI'. */
  6356. U8 GH_USB_get_TXCSRH_R_PERI_Mode(void);
  6357. /*! \brief Reads the bit group 'ISO' of register 'USB_TXCSRH_R_PERI'. */
  6358. U8 GH_USB_get_TXCSRH_R_PERI_ISO(void);
  6359. /*! \brief Reads the bit group 'AutoSet' of register 'USB_TXCSRH_R_PERI'. */
  6360. U8 GH_USB_get_TXCSRH_R_PERI_AutoSet(void);
  6361. #else /* GH_INLINE_LEVEL == 0 */
  6362. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI(void)
  6363. {
  6364. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  6365. #if GH_USB_ENABLE_DEBUG_PRINT
  6366. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI] --> 0x%08x\n",
  6367. REG_USB_TXCSRH_R_PERI,value);
  6368. #endif
  6369. return value;
  6370. }
  6371. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_DMAReqMode(void)
  6372. {
  6373. GH_USB_TXCSRH_R_PERI_S tmp_value;
  6374. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  6375. tmp_value.all = value;
  6376. #if GH_USB_ENABLE_DEBUG_PRINT
  6377. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_DMAReqMode] --> 0x%08x\n",
  6378. REG_USB_TXCSRH_R_PERI,value);
  6379. #endif
  6380. return tmp_value.bitc.dmareqmode;
  6381. }
  6382. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_FrcDataTog(void)
  6383. {
  6384. GH_USB_TXCSRH_R_PERI_S tmp_value;
  6385. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  6386. tmp_value.all = value;
  6387. #if GH_USB_ENABLE_DEBUG_PRINT
  6388. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_PERI_FrcDataTog] --> 0x%08x\n",
  6389. REG_USB_TXCSRH_R_PERI,value);
  6390. #endif
  6391. return tmp_value.bitc.frcdatatog;
  6392. }
  6393. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_DMAReqEnab(void)
  6394. {
  6395. GH_USB_TXCSRH_R_PERI_S tmp_value;
  6396. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  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_TXCSRH_R_PERI_DMAReqEnab] --> 0x%08x\n",
  6400. REG_USB_TXCSRH_R_PERI,value);
  6401. #endif
  6402. return tmp_value.bitc.dmareqenab;
  6403. }
  6404. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_Mode(void)
  6405. {
  6406. GH_USB_TXCSRH_R_PERI_S tmp_value;
  6407. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  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_TXCSRH_R_PERI_Mode] --> 0x%08x\n",
  6411. REG_USB_TXCSRH_R_PERI,value);
  6412. #endif
  6413. return tmp_value.bitc.mode;
  6414. }
  6415. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_ISO(void)
  6416. {
  6417. GH_USB_TXCSRH_R_PERI_S tmp_value;
  6418. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  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_TXCSRH_R_PERI_ISO] --> 0x%08x\n",
  6422. REG_USB_TXCSRH_R_PERI,value);
  6423. #endif
  6424. return tmp_value.bitc.iso;
  6425. }
  6426. GH_INLINE U8 GH_USB_get_TXCSRH_R_PERI_AutoSet(void)
  6427. {
  6428. GH_USB_TXCSRH_R_PERI_S tmp_value;
  6429. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_PERI);
  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_TXCSRH_R_PERI_AutoSet] --> 0x%08x\n",
  6433. REG_USB_TXCSRH_R_PERI,value);
  6434. #endif
  6435. return tmp_value.bitc.autoset;
  6436. }
  6437. #endif /* GH_INLINE_LEVEL == 0 */
  6438. /*----------------------------------------------------------------------------*/
  6439. /* register USB_TXCSRL_W_PERI (write) */
  6440. /*----------------------------------------------------------------------------*/
  6441. #if GH_INLINE_LEVEL < 2
  6442. /*! \brief Writes the register 'USB_TXCSRL_W_PERI'. */
  6443. void GH_USB_set_TXCSRL_W_PERI(U8 data);
  6444. /*! \brief Reads the mirror variable of the register 'USB_TXCSRL_W_PERI'. */
  6445. U8 GH_USB_getm_TXCSRL_W_PERI(void);
  6446. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_TXCSRL_W_PERI'. */
  6447. void GH_USB_set_TXCSRL_W_PERI_TxPktRdy(U8 data);
  6448. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6449. U8 GH_USB_getm_TXCSRL_W_PERI_TxPktRdy(void);
  6450. /*! \brief Writes the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_W_PERI'. */
  6451. void GH_USB_set_TXCSRL_W_PERI_FIFONotEmpty(U8 data);
  6452. /*! \brief Reads the bit group 'FIFONotEmpty' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6453. U8 GH_USB_getm_TXCSRL_W_PERI_FIFONotEmpty(void);
  6454. /*! \brief Writes the bit group 'UnderRun' of register 'USB_TXCSRL_W_PERI'. */
  6455. void GH_USB_set_TXCSRL_W_PERI_UnderRun(U8 data);
  6456. /*! \brief Reads the bit group 'UnderRun' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6457. U8 GH_USB_getm_TXCSRL_W_PERI_UnderRun(void);
  6458. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_TXCSRL_W_PERI'. */
  6459. void GH_USB_set_TXCSRL_W_PERI_FlushFIFO(U8 data);
  6460. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6461. U8 GH_USB_getm_TXCSRL_W_PERI_FlushFIFO(void);
  6462. /*! \brief Writes the bit group 'SendStall' of register 'USB_TXCSRL_W_PERI'. */
  6463. void GH_USB_set_TXCSRL_W_PERI_SendStall(U8 data);
  6464. /*! \brief Reads the bit group 'SendStall' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6465. U8 GH_USB_getm_TXCSRL_W_PERI_SendStall(void);
  6466. /*! \brief Writes the bit group 'SentStall' of register 'USB_TXCSRL_W_PERI'. */
  6467. void GH_USB_set_TXCSRL_W_PERI_SentStall(U8 data);
  6468. /*! \brief Reads the bit group 'SentStall' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6469. U8 GH_USB_getm_TXCSRL_W_PERI_SentStall(void);
  6470. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_TXCSRL_W_PERI'. */
  6471. void GH_USB_set_TXCSRL_W_PERI_ClrDataTog(U8 data);
  6472. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6473. U8 GH_USB_getm_TXCSRL_W_PERI_ClrDataTog(void);
  6474. /*! \brief Writes the bit group 'IncompTx' of register 'USB_TXCSRL_W_PERI'. */
  6475. void GH_USB_set_TXCSRL_W_PERI_IncompTx(U8 data);
  6476. /*! \brief Reads the bit group 'IncompTx' from the mirror variable of register 'USB_TXCSRL_W_PERI'. */
  6477. U8 GH_USB_getm_TXCSRL_W_PERI_IncompTx(void);
  6478. #else /* GH_INLINE_LEVEL < 2 */
  6479. GH_INLINE void GH_USB_set_TXCSRL_W_PERI(U8 data)
  6480. {
  6481. m_usb_txcsrl_w_peri.all = data;
  6482. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = data;
  6483. #if GH_USB_ENABLE_DEBUG_PRINT
  6484. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI] <-- 0x%08x\n",
  6485. REG_USB_TXCSRL_W_PERI,data,data);
  6486. #endif
  6487. }
  6488. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI(void)
  6489. {
  6490. #if GH_USB_ENABLE_DEBUG_PRINT
  6491. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI] --> 0x%08x\n",
  6492. m_usb_txcsrl_w_peri.all);
  6493. #endif
  6494. return m_usb_txcsrl_w_peri.all;
  6495. }
  6496. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_TxPktRdy(U8 data)
  6497. {
  6498. m_usb_txcsrl_w_peri.bitc.txpktrdy = data;
  6499. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6500. #if GH_USB_ENABLE_DEBUG_PRINT
  6501. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_TxPktRdy] <-- 0x%08x\n",
  6502. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6503. #endif
  6504. }
  6505. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_TxPktRdy(void)
  6506. {
  6507. #if GH_USB_ENABLE_DEBUG_PRINT
  6508. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_TxPktRdy] --> 0x%08x\n",
  6509. m_usb_txcsrl_w_peri.bitc.txpktrdy);
  6510. #endif
  6511. return m_usb_txcsrl_w_peri.bitc.txpktrdy;
  6512. }
  6513. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_FIFONotEmpty(U8 data)
  6514. {
  6515. m_usb_txcsrl_w_peri.bitc.fifonotempty = data;
  6516. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6517. #if GH_USB_ENABLE_DEBUG_PRINT
  6518. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_FIFONotEmpty] <-- 0x%08x\n",
  6519. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6520. #endif
  6521. }
  6522. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_FIFONotEmpty(void)
  6523. {
  6524. #if GH_USB_ENABLE_DEBUG_PRINT
  6525. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_FIFONotEmpty] --> 0x%08x\n",
  6526. m_usb_txcsrl_w_peri.bitc.fifonotempty);
  6527. #endif
  6528. return m_usb_txcsrl_w_peri.bitc.fifonotempty;
  6529. }
  6530. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_UnderRun(U8 data)
  6531. {
  6532. m_usb_txcsrl_w_peri.bitc.underrun = data;
  6533. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6534. #if GH_USB_ENABLE_DEBUG_PRINT
  6535. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_UnderRun] <-- 0x%08x\n",
  6536. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6537. #endif
  6538. }
  6539. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_UnderRun(void)
  6540. {
  6541. #if GH_USB_ENABLE_DEBUG_PRINT
  6542. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_UnderRun] --> 0x%08x\n",
  6543. m_usb_txcsrl_w_peri.bitc.underrun);
  6544. #endif
  6545. return m_usb_txcsrl_w_peri.bitc.underrun;
  6546. }
  6547. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_FlushFIFO(U8 data)
  6548. {
  6549. m_usb_txcsrl_w_peri.bitc.flushfifo = data;
  6550. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6551. #if GH_USB_ENABLE_DEBUG_PRINT
  6552. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_FlushFIFO] <-- 0x%08x\n",
  6553. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6554. #endif
  6555. }
  6556. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_FlushFIFO(void)
  6557. {
  6558. #if GH_USB_ENABLE_DEBUG_PRINT
  6559. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_FlushFIFO] --> 0x%08x\n",
  6560. m_usb_txcsrl_w_peri.bitc.flushfifo);
  6561. #endif
  6562. return m_usb_txcsrl_w_peri.bitc.flushfifo;
  6563. }
  6564. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_SendStall(U8 data)
  6565. {
  6566. m_usb_txcsrl_w_peri.bitc.sendstall = data;
  6567. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6568. #if GH_USB_ENABLE_DEBUG_PRINT
  6569. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_SendStall] <-- 0x%08x\n",
  6570. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6571. #endif
  6572. }
  6573. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_SendStall(void)
  6574. {
  6575. #if GH_USB_ENABLE_DEBUG_PRINT
  6576. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_SendStall] --> 0x%08x\n",
  6577. m_usb_txcsrl_w_peri.bitc.sendstall);
  6578. #endif
  6579. return m_usb_txcsrl_w_peri.bitc.sendstall;
  6580. }
  6581. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_SentStall(U8 data)
  6582. {
  6583. m_usb_txcsrl_w_peri.bitc.sentstall = data;
  6584. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6585. #if GH_USB_ENABLE_DEBUG_PRINT
  6586. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_SentStall] <-- 0x%08x\n",
  6587. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6588. #endif
  6589. }
  6590. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_SentStall(void)
  6591. {
  6592. #if GH_USB_ENABLE_DEBUG_PRINT
  6593. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_SentStall] --> 0x%08x\n",
  6594. m_usb_txcsrl_w_peri.bitc.sentstall);
  6595. #endif
  6596. return m_usb_txcsrl_w_peri.bitc.sentstall;
  6597. }
  6598. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_ClrDataTog(U8 data)
  6599. {
  6600. m_usb_txcsrl_w_peri.bitc.clrdatatog = data;
  6601. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6602. #if GH_USB_ENABLE_DEBUG_PRINT
  6603. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_ClrDataTog] <-- 0x%08x\n",
  6604. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6605. #endif
  6606. }
  6607. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_ClrDataTog(void)
  6608. {
  6609. #if GH_USB_ENABLE_DEBUG_PRINT
  6610. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_ClrDataTog] --> 0x%08x\n",
  6611. m_usb_txcsrl_w_peri.bitc.clrdatatog);
  6612. #endif
  6613. return m_usb_txcsrl_w_peri.bitc.clrdatatog;
  6614. }
  6615. GH_INLINE void GH_USB_set_TXCSRL_W_PERI_IncompTx(U8 data)
  6616. {
  6617. m_usb_txcsrl_w_peri.bitc.incomptx = data;
  6618. *(volatile U8 *)REG_USB_TXCSRL_W_PERI = m_usb_txcsrl_w_peri.all;
  6619. #if GH_USB_ENABLE_DEBUG_PRINT
  6620. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_PERI_IncompTx] <-- 0x%08x\n",
  6621. REG_USB_TXCSRL_W_PERI,m_usb_txcsrl_w_peri.all,m_usb_txcsrl_w_peri.all);
  6622. #endif
  6623. }
  6624. GH_INLINE U8 GH_USB_getm_TXCSRL_W_PERI_IncompTx(void)
  6625. {
  6626. #if GH_USB_ENABLE_DEBUG_PRINT
  6627. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_PERI_IncompTx] --> 0x%08x\n",
  6628. m_usb_txcsrl_w_peri.bitc.incomptx);
  6629. #endif
  6630. return m_usb_txcsrl_w_peri.bitc.incomptx;
  6631. }
  6632. #endif /* GH_INLINE_LEVEL < 2 */
  6633. /*----------------------------------------------------------------------------*/
  6634. /* register USB_TXCSRH_W_PERI (write) */
  6635. /*----------------------------------------------------------------------------*/
  6636. #if GH_INLINE_LEVEL < 2
  6637. /*! \brief Writes the register 'USB_TXCSRH_W_PERI'. */
  6638. void GH_USB_set_TXCSRH_W_PERI(U8 data);
  6639. /*! \brief Reads the mirror variable of the register 'USB_TXCSRH_W_PERI'. */
  6640. U8 GH_USB_getm_TXCSRH_W_PERI(void);
  6641. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_TXCSRH_W_PERI'. */
  6642. void GH_USB_set_TXCSRH_W_PERI_DMAReqMode(U8 data);
  6643. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  6644. U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqMode(void);
  6645. /*! \brief Writes the bit group 'FrcDataTog' of register 'USB_TXCSRH_W_PERI'. */
  6646. void GH_USB_set_TXCSRH_W_PERI_FrcDataTog(U8 data);
  6647. /*! \brief Reads the bit group 'FrcDataTog' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  6648. U8 GH_USB_getm_TXCSRH_W_PERI_FrcDataTog(void);
  6649. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_TXCSRH_W_PERI'. */
  6650. void GH_USB_set_TXCSRH_W_PERI_DMAReqEnab(U8 data);
  6651. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  6652. U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqEnab(void);
  6653. /*! \brief Writes the bit group 'Mode' of register 'USB_TXCSRH_W_PERI'. */
  6654. void GH_USB_set_TXCSRH_W_PERI_Mode(U8 data);
  6655. /*! \brief Reads the bit group 'Mode' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  6656. U8 GH_USB_getm_TXCSRH_W_PERI_Mode(void);
  6657. /*! \brief Writes the bit group 'ISO' of register 'USB_TXCSRH_W_PERI'. */
  6658. void GH_USB_set_TXCSRH_W_PERI_ISO(U8 data);
  6659. /*! \brief Reads the bit group 'ISO' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  6660. U8 GH_USB_getm_TXCSRH_W_PERI_ISO(void);
  6661. /*! \brief Writes the bit group 'AutoSet' of register 'USB_TXCSRH_W_PERI'. */
  6662. void GH_USB_set_TXCSRH_W_PERI_AutoSet(U8 data);
  6663. /*! \brief Reads the bit group 'AutoSet' from the mirror variable of register 'USB_TXCSRH_W_PERI'. */
  6664. U8 GH_USB_getm_TXCSRH_W_PERI_AutoSet(void);
  6665. #else /* GH_INLINE_LEVEL < 2 */
  6666. GH_INLINE void GH_USB_set_TXCSRH_W_PERI(U8 data)
  6667. {
  6668. m_usb_txcsrh_w_peri.all = data;
  6669. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = data;
  6670. #if GH_USB_ENABLE_DEBUG_PRINT
  6671. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI] <-- 0x%08x\n",
  6672. REG_USB_TXCSRH_W_PERI,data,data);
  6673. #endif
  6674. }
  6675. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI(void)
  6676. {
  6677. #if GH_USB_ENABLE_DEBUG_PRINT
  6678. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI] --> 0x%08x\n",
  6679. m_usb_txcsrh_w_peri.all);
  6680. #endif
  6681. return m_usb_txcsrh_w_peri.all;
  6682. }
  6683. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_DMAReqMode(U8 data)
  6684. {
  6685. m_usb_txcsrh_w_peri.bitc.dmareqmode = data;
  6686. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  6687. #if GH_USB_ENABLE_DEBUG_PRINT
  6688. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_DMAReqMode] <-- 0x%08x\n",
  6689. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  6690. #endif
  6691. }
  6692. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqMode(void)
  6693. {
  6694. #if GH_USB_ENABLE_DEBUG_PRINT
  6695. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_DMAReqMode] --> 0x%08x\n",
  6696. m_usb_txcsrh_w_peri.bitc.dmareqmode);
  6697. #endif
  6698. return m_usb_txcsrh_w_peri.bitc.dmareqmode;
  6699. }
  6700. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_FrcDataTog(U8 data)
  6701. {
  6702. m_usb_txcsrh_w_peri.bitc.frcdatatog = data;
  6703. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  6704. #if GH_USB_ENABLE_DEBUG_PRINT
  6705. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_FrcDataTog] <-- 0x%08x\n",
  6706. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  6707. #endif
  6708. }
  6709. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_FrcDataTog(void)
  6710. {
  6711. #if GH_USB_ENABLE_DEBUG_PRINT
  6712. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_FrcDataTog] --> 0x%08x\n",
  6713. m_usb_txcsrh_w_peri.bitc.frcdatatog);
  6714. #endif
  6715. return m_usb_txcsrh_w_peri.bitc.frcdatatog;
  6716. }
  6717. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_DMAReqEnab(U8 data)
  6718. {
  6719. m_usb_txcsrh_w_peri.bitc.dmareqenab = data;
  6720. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  6721. #if GH_USB_ENABLE_DEBUG_PRINT
  6722. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_DMAReqEnab] <-- 0x%08x\n",
  6723. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  6724. #endif
  6725. }
  6726. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_DMAReqEnab(void)
  6727. {
  6728. #if GH_USB_ENABLE_DEBUG_PRINT
  6729. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_DMAReqEnab] --> 0x%08x\n",
  6730. m_usb_txcsrh_w_peri.bitc.dmareqenab);
  6731. #endif
  6732. return m_usb_txcsrh_w_peri.bitc.dmareqenab;
  6733. }
  6734. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_Mode(U8 data)
  6735. {
  6736. m_usb_txcsrh_w_peri.bitc.mode = data;
  6737. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  6738. #if GH_USB_ENABLE_DEBUG_PRINT
  6739. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_Mode] <-- 0x%08x\n",
  6740. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  6741. #endif
  6742. }
  6743. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_Mode(void)
  6744. {
  6745. #if GH_USB_ENABLE_DEBUG_PRINT
  6746. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_Mode] --> 0x%08x\n",
  6747. m_usb_txcsrh_w_peri.bitc.mode);
  6748. #endif
  6749. return m_usb_txcsrh_w_peri.bitc.mode;
  6750. }
  6751. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_ISO(U8 data)
  6752. {
  6753. m_usb_txcsrh_w_peri.bitc.iso = data;
  6754. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  6755. #if GH_USB_ENABLE_DEBUG_PRINT
  6756. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_ISO] <-- 0x%08x\n",
  6757. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  6758. #endif
  6759. }
  6760. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_ISO(void)
  6761. {
  6762. #if GH_USB_ENABLE_DEBUG_PRINT
  6763. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_ISO] --> 0x%08x\n",
  6764. m_usb_txcsrh_w_peri.bitc.iso);
  6765. #endif
  6766. return m_usb_txcsrh_w_peri.bitc.iso;
  6767. }
  6768. GH_INLINE void GH_USB_set_TXCSRH_W_PERI_AutoSet(U8 data)
  6769. {
  6770. m_usb_txcsrh_w_peri.bitc.autoset = data;
  6771. *(volatile U8 *)REG_USB_TXCSRH_W_PERI = m_usb_txcsrh_w_peri.all;
  6772. #if GH_USB_ENABLE_DEBUG_PRINT
  6773. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_PERI_AutoSet] <-- 0x%08x\n",
  6774. REG_USB_TXCSRH_W_PERI,m_usb_txcsrh_w_peri.all,m_usb_txcsrh_w_peri.all);
  6775. #endif
  6776. }
  6777. GH_INLINE U8 GH_USB_getm_TXCSRH_W_PERI_AutoSet(void)
  6778. {
  6779. #if GH_USB_ENABLE_DEBUG_PRINT
  6780. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_PERI_AutoSet] --> 0x%08x\n",
  6781. m_usb_txcsrh_w_peri.bitc.autoset);
  6782. #endif
  6783. return m_usb_txcsrh_w_peri.bitc.autoset;
  6784. }
  6785. #endif /* GH_INLINE_LEVEL < 2 */
  6786. /*----------------------------------------------------------------------------*/
  6787. /* register USB_TXCSRL_R_HOST (read) */
  6788. /*----------------------------------------------------------------------------*/
  6789. #if GH_INLINE_LEVEL == 0
  6790. /*! \brief Reads the register 'USB_TXCSRL_R_HOST'. */
  6791. U8 GH_USB_get_TXCSRL_R_HOST(void);
  6792. /*! \brief Reads the bit group 'TxPktRdy' of register 'USB_TXCSRL_R_HOST'. */
  6793. U8 GH_USB_get_TXCSRL_R_HOST_TxPktRdy(void);
  6794. /*! \brief Reads the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_R_HOST'. */
  6795. U8 GH_USB_get_TXCSRL_R_HOST_FIFONotEmpty(void);
  6796. /*! \brief Reads the bit group 'Error' of register 'USB_TXCSRL_R_HOST'. */
  6797. U8 GH_USB_get_TXCSRL_R_HOST_Error(void);
  6798. /*! \brief Reads the bit group 'SetupPkt' of register 'USB_TXCSRL_R_HOST'. */
  6799. U8 GH_USB_get_TXCSRL_R_HOST_SetupPkt(void);
  6800. /*! \brief Reads the bit group 'RxStall' of register 'USB_TXCSRL_R_HOST'. */
  6801. U8 GH_USB_get_TXCSRL_R_HOST_RxStall(void);
  6802. /*! \brief Reads the bit group 'IncompTx' of register 'USB_TXCSRL_R_HOST'. */
  6803. U8 GH_USB_get_TXCSRL_R_HOST_IncompTx(void);
  6804. #else /* GH_INLINE_LEVEL == 0 */
  6805. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST(void)
  6806. {
  6807. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  6808. #if GH_USB_ENABLE_DEBUG_PRINT
  6809. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST] --> 0x%08x\n",
  6810. REG_USB_TXCSRL_R_HOST,value);
  6811. #endif
  6812. return value;
  6813. }
  6814. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_TxPktRdy(void)
  6815. {
  6816. GH_USB_TXCSRL_R_HOST_S tmp_value;
  6817. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  6818. tmp_value.all = value;
  6819. #if GH_USB_ENABLE_DEBUG_PRINT
  6820. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_TxPktRdy] --> 0x%08x\n",
  6821. REG_USB_TXCSRL_R_HOST,value);
  6822. #endif
  6823. return tmp_value.bitc.txpktrdy;
  6824. }
  6825. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_FIFONotEmpty(void)
  6826. {
  6827. GH_USB_TXCSRL_R_HOST_S tmp_value;
  6828. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  6829. tmp_value.all = value;
  6830. #if GH_USB_ENABLE_DEBUG_PRINT
  6831. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_FIFONotEmpty] --> 0x%08x\n",
  6832. REG_USB_TXCSRL_R_HOST,value);
  6833. #endif
  6834. return tmp_value.bitc.fifonotempty;
  6835. }
  6836. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_Error(void)
  6837. {
  6838. GH_USB_TXCSRL_R_HOST_S tmp_value;
  6839. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  6840. tmp_value.all = value;
  6841. #if GH_USB_ENABLE_DEBUG_PRINT
  6842. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_Error] --> 0x%08x\n",
  6843. REG_USB_TXCSRL_R_HOST,value);
  6844. #endif
  6845. return tmp_value.bitc.error;
  6846. }
  6847. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_SetupPkt(void)
  6848. {
  6849. GH_USB_TXCSRL_R_HOST_S tmp_value;
  6850. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  6851. tmp_value.all = value;
  6852. #if GH_USB_ENABLE_DEBUG_PRINT
  6853. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_SetupPkt] --> 0x%08x\n",
  6854. REG_USB_TXCSRL_R_HOST,value);
  6855. #endif
  6856. return tmp_value.bitc.setuppkt;
  6857. }
  6858. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_RxStall(void)
  6859. {
  6860. GH_USB_TXCSRL_R_HOST_S tmp_value;
  6861. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  6862. tmp_value.all = value;
  6863. #if GH_USB_ENABLE_DEBUG_PRINT
  6864. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_RxStall] --> 0x%08x\n",
  6865. REG_USB_TXCSRL_R_HOST,value);
  6866. #endif
  6867. return tmp_value.bitc.rxstall;
  6868. }
  6869. GH_INLINE U8 GH_USB_get_TXCSRL_R_HOST_IncompTx(void)
  6870. {
  6871. GH_USB_TXCSRL_R_HOST_S tmp_value;
  6872. U8 value = (*(volatile U8 *)REG_USB_TXCSRL_R_HOST);
  6873. tmp_value.all = value;
  6874. #if GH_USB_ENABLE_DEBUG_PRINT
  6875. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRL_R_HOST_IncompTx] --> 0x%08x\n",
  6876. REG_USB_TXCSRL_R_HOST,value);
  6877. #endif
  6878. return tmp_value.bitc.incomptx;
  6879. }
  6880. #endif /* GH_INLINE_LEVEL == 0 */
  6881. /*----------------------------------------------------------------------------*/
  6882. /* register USB_TXCSRH_R_HOST (read) */
  6883. /*----------------------------------------------------------------------------*/
  6884. #if GH_INLINE_LEVEL == 0
  6885. /*! \brief Reads the register 'USB_TXCSRH_R_HOST'. */
  6886. U8 GH_USB_get_TXCSRH_R_HOST(void);
  6887. /*! \brief Reads the bit group 'DataToggle' of register 'USB_TXCSRH_R_HOST'. */
  6888. U8 GH_USB_get_TXCSRH_R_HOST_DataToggle(void);
  6889. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_TXCSRH_R_HOST'. */
  6890. U8 GH_USB_get_TXCSRH_R_HOST_DMAReqMode(void);
  6891. /*! \brief Reads the bit group 'FrcDataTog' of register 'USB_TXCSRH_R_HOST'. */
  6892. U8 GH_USB_get_TXCSRH_R_HOST_FrcDataTog(void);
  6893. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_TXCSRH_R_HOST'. */
  6894. U8 GH_USB_get_TXCSRH_R_HOST_DMAReqEnab(void);
  6895. /*! \brief Reads the bit group 'Mode' of register 'USB_TXCSRH_R_HOST'. */
  6896. U8 GH_USB_get_TXCSRH_R_HOST_Mode(void);
  6897. /*! \brief Reads the bit group 'AutoSet' of register 'USB_TXCSRH_R_HOST'. */
  6898. U8 GH_USB_get_TXCSRH_R_HOST_AutoSet(void);
  6899. #else /* GH_INLINE_LEVEL == 0 */
  6900. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST(void)
  6901. {
  6902. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  6903. #if GH_USB_ENABLE_DEBUG_PRINT
  6904. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST] --> 0x%08x\n",
  6905. REG_USB_TXCSRH_R_HOST,value);
  6906. #endif
  6907. return value;
  6908. }
  6909. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_DataToggle(void)
  6910. {
  6911. GH_USB_TXCSRH_R_HOST_S tmp_value;
  6912. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  6913. tmp_value.all = value;
  6914. #if GH_USB_ENABLE_DEBUG_PRINT
  6915. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_DataToggle] --> 0x%08x\n",
  6916. REG_USB_TXCSRH_R_HOST,value);
  6917. #endif
  6918. return tmp_value.bitc.datatoggle;
  6919. }
  6920. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_DMAReqMode(void)
  6921. {
  6922. GH_USB_TXCSRH_R_HOST_S tmp_value;
  6923. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  6924. tmp_value.all = value;
  6925. #if GH_USB_ENABLE_DEBUG_PRINT
  6926. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_DMAReqMode] --> 0x%08x\n",
  6927. REG_USB_TXCSRH_R_HOST,value);
  6928. #endif
  6929. return tmp_value.bitc.dmareqmode;
  6930. }
  6931. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_FrcDataTog(void)
  6932. {
  6933. GH_USB_TXCSRH_R_HOST_S tmp_value;
  6934. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  6935. tmp_value.all = value;
  6936. #if GH_USB_ENABLE_DEBUG_PRINT
  6937. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_FrcDataTog] --> 0x%08x\n",
  6938. REG_USB_TXCSRH_R_HOST,value);
  6939. #endif
  6940. return tmp_value.bitc.frcdatatog;
  6941. }
  6942. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_DMAReqEnab(void)
  6943. {
  6944. GH_USB_TXCSRH_R_HOST_S tmp_value;
  6945. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  6946. tmp_value.all = value;
  6947. #if GH_USB_ENABLE_DEBUG_PRINT
  6948. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_DMAReqEnab] --> 0x%08x\n",
  6949. REG_USB_TXCSRH_R_HOST,value);
  6950. #endif
  6951. return tmp_value.bitc.dmareqenab;
  6952. }
  6953. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_Mode(void)
  6954. {
  6955. GH_USB_TXCSRH_R_HOST_S tmp_value;
  6956. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_HOST);
  6957. tmp_value.all = value;
  6958. #if GH_USB_ENABLE_DEBUG_PRINT
  6959. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TXCSRH_R_HOST_Mode] --> 0x%08x\n",
  6960. REG_USB_TXCSRH_R_HOST,value);
  6961. #endif
  6962. return tmp_value.bitc.mode;
  6963. }
  6964. GH_INLINE U8 GH_USB_get_TXCSRH_R_HOST_AutoSet(void)
  6965. {
  6966. GH_USB_TXCSRH_R_HOST_S tmp_value;
  6967. U8 value = (*(volatile U8 *)REG_USB_TXCSRH_R_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_TXCSRH_R_HOST_AutoSet] --> 0x%08x\n",
  6971. REG_USB_TXCSRH_R_HOST,value);
  6972. #endif
  6973. return tmp_value.bitc.autoset;
  6974. }
  6975. #endif /* GH_INLINE_LEVEL == 0 */
  6976. /*----------------------------------------------------------------------------*/
  6977. /* register USB_TXCSRL_W_HOST (write) */
  6978. /*----------------------------------------------------------------------------*/
  6979. #if GH_INLINE_LEVEL < 2
  6980. /*! \brief Writes the register 'USB_TXCSRL_W_HOST'. */
  6981. void GH_USB_set_TXCSRL_W_HOST(U8 data);
  6982. /*! \brief Reads the mirror variable of the register 'USB_TXCSRL_W_HOST'. */
  6983. U8 GH_USB_getm_TXCSRL_W_HOST(void);
  6984. /*! \brief Writes the bit group 'TxPktRdy' of register 'USB_TXCSRL_W_HOST'. */
  6985. void GH_USB_set_TXCSRL_W_HOST_TxPktRdy(U8 data);
  6986. /*! \brief Reads the bit group 'TxPktRdy' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  6987. U8 GH_USB_getm_TXCSRL_W_HOST_TxPktRdy(void);
  6988. /*! \brief Writes the bit group 'FIFONotEmpty' of register 'USB_TXCSRL_W_HOST'. */
  6989. void GH_USB_set_TXCSRL_W_HOST_FIFONotEmpty(U8 data);
  6990. /*! \brief Reads the bit group 'FIFONotEmpty' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  6991. U8 GH_USB_getm_TXCSRL_W_HOST_FIFONotEmpty(void);
  6992. /*! \brief Writes the bit group 'Error' of register 'USB_TXCSRL_W_HOST'. */
  6993. void GH_USB_set_TXCSRL_W_HOST_Error(U8 data);
  6994. /*! \brief Reads the bit group 'Error' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  6995. U8 GH_USB_getm_TXCSRL_W_HOST_Error(void);
  6996. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_TXCSRL_W_HOST'. */
  6997. void GH_USB_set_TXCSRL_W_HOST_FlushFIFO(U8 data);
  6998. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  6999. U8 GH_USB_getm_TXCSRL_W_HOST_FlushFIFO(void);
  7000. /*! \brief Writes the bit group 'SetupPkt' of register 'USB_TXCSRL_W_HOST'. */
  7001. void GH_USB_set_TXCSRL_W_HOST_SetupPkt(U8 data);
  7002. /*! \brief Reads the bit group 'SetupPkt' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  7003. U8 GH_USB_getm_TXCSRL_W_HOST_SetupPkt(void);
  7004. /*! \brief Writes the bit group 'RxStall' of register 'USB_TXCSRL_W_HOST'. */
  7005. void GH_USB_set_TXCSRL_W_HOST_RxStall(U8 data);
  7006. /*! \brief Reads the bit group 'RxStall' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  7007. U8 GH_USB_getm_TXCSRL_W_HOST_RxStall(void);
  7008. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_TXCSRL_W_HOST'. */
  7009. void GH_USB_set_TXCSRL_W_HOST_ClrDataTog(U8 data);
  7010. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  7011. U8 GH_USB_getm_TXCSRL_W_HOST_ClrDataTog(void);
  7012. /*! \brief Writes the bit group 'IncompTx' of register 'USB_TXCSRL_W_HOST'. */
  7013. void GH_USB_set_TXCSRL_W_HOST_IncompTx(U8 data);
  7014. /*! \brief Reads the bit group 'IncompTx' from the mirror variable of register 'USB_TXCSRL_W_HOST'. */
  7015. U8 GH_USB_getm_TXCSRL_W_HOST_IncompTx(void);
  7016. #else /* GH_INLINE_LEVEL < 2 */
  7017. GH_INLINE void GH_USB_set_TXCSRL_W_HOST(U8 data)
  7018. {
  7019. m_usb_txcsrl_w_host.all = data;
  7020. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = data;
  7021. #if GH_USB_ENABLE_DEBUG_PRINT
  7022. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST] <-- 0x%08x\n",
  7023. REG_USB_TXCSRL_W_HOST,data,data);
  7024. #endif
  7025. }
  7026. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST(void)
  7027. {
  7028. #if GH_USB_ENABLE_DEBUG_PRINT
  7029. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST] --> 0x%08x\n",
  7030. m_usb_txcsrl_w_host.all);
  7031. #endif
  7032. return m_usb_txcsrl_w_host.all;
  7033. }
  7034. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_TxPktRdy(U8 data)
  7035. {
  7036. m_usb_txcsrl_w_host.bitc.txpktrdy = data;
  7037. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7038. #if GH_USB_ENABLE_DEBUG_PRINT
  7039. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_TxPktRdy] <-- 0x%08x\n",
  7040. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7041. #endif
  7042. }
  7043. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_TxPktRdy(void)
  7044. {
  7045. #if GH_USB_ENABLE_DEBUG_PRINT
  7046. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_TxPktRdy] --> 0x%08x\n",
  7047. m_usb_txcsrl_w_host.bitc.txpktrdy);
  7048. #endif
  7049. return m_usb_txcsrl_w_host.bitc.txpktrdy;
  7050. }
  7051. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_FIFONotEmpty(U8 data)
  7052. {
  7053. m_usb_txcsrl_w_host.bitc.fifonotempty = data;
  7054. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7055. #if GH_USB_ENABLE_DEBUG_PRINT
  7056. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_FIFONotEmpty] <-- 0x%08x\n",
  7057. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7058. #endif
  7059. }
  7060. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_FIFONotEmpty(void)
  7061. {
  7062. #if GH_USB_ENABLE_DEBUG_PRINT
  7063. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_FIFONotEmpty] --> 0x%08x\n",
  7064. m_usb_txcsrl_w_host.bitc.fifonotempty);
  7065. #endif
  7066. return m_usb_txcsrl_w_host.bitc.fifonotempty;
  7067. }
  7068. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_Error(U8 data)
  7069. {
  7070. m_usb_txcsrl_w_host.bitc.error = data;
  7071. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7072. #if GH_USB_ENABLE_DEBUG_PRINT
  7073. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_Error] <-- 0x%08x\n",
  7074. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7075. #endif
  7076. }
  7077. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_Error(void)
  7078. {
  7079. #if GH_USB_ENABLE_DEBUG_PRINT
  7080. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_Error] --> 0x%08x\n",
  7081. m_usb_txcsrl_w_host.bitc.error);
  7082. #endif
  7083. return m_usb_txcsrl_w_host.bitc.error;
  7084. }
  7085. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_FlushFIFO(U8 data)
  7086. {
  7087. m_usb_txcsrl_w_host.bitc.flushfifo = data;
  7088. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7089. #if GH_USB_ENABLE_DEBUG_PRINT
  7090. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_FlushFIFO] <-- 0x%08x\n",
  7091. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7092. #endif
  7093. }
  7094. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_FlushFIFO(void)
  7095. {
  7096. #if GH_USB_ENABLE_DEBUG_PRINT
  7097. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_FlushFIFO] --> 0x%08x\n",
  7098. m_usb_txcsrl_w_host.bitc.flushfifo);
  7099. #endif
  7100. return m_usb_txcsrl_w_host.bitc.flushfifo;
  7101. }
  7102. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_SetupPkt(U8 data)
  7103. {
  7104. m_usb_txcsrl_w_host.bitc.setuppkt = data;
  7105. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7106. #if GH_USB_ENABLE_DEBUG_PRINT
  7107. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_SetupPkt] <-- 0x%08x\n",
  7108. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7109. #endif
  7110. }
  7111. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_SetupPkt(void)
  7112. {
  7113. #if GH_USB_ENABLE_DEBUG_PRINT
  7114. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_SetupPkt] --> 0x%08x\n",
  7115. m_usb_txcsrl_w_host.bitc.setuppkt);
  7116. #endif
  7117. return m_usb_txcsrl_w_host.bitc.setuppkt;
  7118. }
  7119. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_RxStall(U8 data)
  7120. {
  7121. m_usb_txcsrl_w_host.bitc.rxstall = data;
  7122. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7123. #if GH_USB_ENABLE_DEBUG_PRINT
  7124. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_RxStall] <-- 0x%08x\n",
  7125. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7126. #endif
  7127. }
  7128. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_RxStall(void)
  7129. {
  7130. #if GH_USB_ENABLE_DEBUG_PRINT
  7131. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_RxStall] --> 0x%08x\n",
  7132. m_usb_txcsrl_w_host.bitc.rxstall);
  7133. #endif
  7134. return m_usb_txcsrl_w_host.bitc.rxstall;
  7135. }
  7136. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_ClrDataTog(U8 data)
  7137. {
  7138. m_usb_txcsrl_w_host.bitc.clrdatatog = data;
  7139. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7140. #if GH_USB_ENABLE_DEBUG_PRINT
  7141. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_ClrDataTog] <-- 0x%08x\n",
  7142. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7143. #endif
  7144. }
  7145. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_ClrDataTog(void)
  7146. {
  7147. #if GH_USB_ENABLE_DEBUG_PRINT
  7148. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_ClrDataTog] --> 0x%08x\n",
  7149. m_usb_txcsrl_w_host.bitc.clrdatatog);
  7150. #endif
  7151. return m_usb_txcsrl_w_host.bitc.clrdatatog;
  7152. }
  7153. GH_INLINE void GH_USB_set_TXCSRL_W_HOST_IncompTx(U8 data)
  7154. {
  7155. m_usb_txcsrl_w_host.bitc.incomptx = data;
  7156. *(volatile U8 *)REG_USB_TXCSRL_W_HOST = m_usb_txcsrl_w_host.all;
  7157. #if GH_USB_ENABLE_DEBUG_PRINT
  7158. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRL_W_HOST_IncompTx] <-- 0x%08x\n",
  7159. REG_USB_TXCSRL_W_HOST,m_usb_txcsrl_w_host.all,m_usb_txcsrl_w_host.all);
  7160. #endif
  7161. }
  7162. GH_INLINE U8 GH_USB_getm_TXCSRL_W_HOST_IncompTx(void)
  7163. {
  7164. #if GH_USB_ENABLE_DEBUG_PRINT
  7165. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRL_W_HOST_IncompTx] --> 0x%08x\n",
  7166. m_usb_txcsrl_w_host.bitc.incomptx);
  7167. #endif
  7168. return m_usb_txcsrl_w_host.bitc.incomptx;
  7169. }
  7170. #endif /* GH_INLINE_LEVEL < 2 */
  7171. /*----------------------------------------------------------------------------*/
  7172. /* register USB_TXCSRH_W_HOST (write) */
  7173. /*----------------------------------------------------------------------------*/
  7174. #if GH_INLINE_LEVEL < 2
  7175. /*! \brief Writes the register 'USB_TXCSRH_W_HOST'. */
  7176. void GH_USB_set_TXCSRH_W_HOST(U8 data);
  7177. /*! \brief Reads the mirror variable of the register 'USB_TXCSRH_W_HOST'. */
  7178. U8 GH_USB_getm_TXCSRH_W_HOST(void);
  7179. /*! \brief Writes the bit group 'DataToggle' of register 'USB_TXCSRH_W_HOST'. */
  7180. void GH_USB_set_TXCSRH_W_HOST_DataToggle(U8 data);
  7181. /*! \brief Reads the bit group 'DataToggle' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  7182. U8 GH_USB_getm_TXCSRH_W_HOST_DataToggle(void);
  7183. /*! \brief Writes the bit group 'DataToggleWriteEnable' of register 'USB_TXCSRH_W_HOST'. */
  7184. void GH_USB_set_TXCSRH_W_HOST_DataToggleWriteEnable(U8 data);
  7185. /*! \brief Reads the bit group 'DataToggleWriteEnable' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  7186. U8 GH_USB_getm_TXCSRH_W_HOST_DataToggleWriteEnable(void);
  7187. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_TXCSRH_W_HOST'. */
  7188. void GH_USB_set_TXCSRH_W_HOST_DMAReqMode(U8 data);
  7189. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  7190. U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqMode(void);
  7191. /*! \brief Writes the bit group 'FrcDataTog' of register 'USB_TXCSRH_W_HOST'. */
  7192. void GH_USB_set_TXCSRH_W_HOST_FrcDataTog(U8 data);
  7193. /*! \brief Reads the bit group 'FrcDataTog' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  7194. U8 GH_USB_getm_TXCSRH_W_HOST_FrcDataTog(void);
  7195. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_TXCSRH_W_HOST'. */
  7196. void GH_USB_set_TXCSRH_W_HOST_DMAReqEnab(U8 data);
  7197. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  7198. U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqEnab(void);
  7199. /*! \brief Writes the bit group 'Mode' of register 'USB_TXCSRH_W_HOST'. */
  7200. void GH_USB_set_TXCSRH_W_HOST_Mode(U8 data);
  7201. /*! \brief Reads the bit group 'Mode' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  7202. U8 GH_USB_getm_TXCSRH_W_HOST_Mode(void);
  7203. /*! \brief Writes the bit group 'AutoSet' of register 'USB_TXCSRH_W_HOST'. */
  7204. void GH_USB_set_TXCSRH_W_HOST_AutoSet(U8 data);
  7205. /*! \brief Reads the bit group 'AutoSet' from the mirror variable of register 'USB_TXCSRH_W_HOST'. */
  7206. U8 GH_USB_getm_TXCSRH_W_HOST_AutoSet(void);
  7207. #else /* GH_INLINE_LEVEL < 2 */
  7208. GH_INLINE void GH_USB_set_TXCSRH_W_HOST(U8 data)
  7209. {
  7210. m_usb_txcsrh_w_host.all = data;
  7211. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = data;
  7212. #if GH_USB_ENABLE_DEBUG_PRINT
  7213. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST] <-- 0x%08x\n",
  7214. REG_USB_TXCSRH_W_HOST,data,data);
  7215. #endif
  7216. }
  7217. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST(void)
  7218. {
  7219. #if GH_USB_ENABLE_DEBUG_PRINT
  7220. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST] --> 0x%08x\n",
  7221. m_usb_txcsrh_w_host.all);
  7222. #endif
  7223. return m_usb_txcsrh_w_host.all;
  7224. }
  7225. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DataToggle(U8 data)
  7226. {
  7227. m_usb_txcsrh_w_host.bitc.datatoggle = data;
  7228. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  7229. #if GH_USB_ENABLE_DEBUG_PRINT
  7230. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DataToggle] <-- 0x%08x\n",
  7231. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  7232. #endif
  7233. }
  7234. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DataToggle(void)
  7235. {
  7236. #if GH_USB_ENABLE_DEBUG_PRINT
  7237. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DataToggle] --> 0x%08x\n",
  7238. m_usb_txcsrh_w_host.bitc.datatoggle);
  7239. #endif
  7240. return m_usb_txcsrh_w_host.bitc.datatoggle;
  7241. }
  7242. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DataToggleWriteEnable(U8 data)
  7243. {
  7244. m_usb_txcsrh_w_host.bitc.datatogglewriteenable = data;
  7245. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  7246. #if GH_USB_ENABLE_DEBUG_PRINT
  7247. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DataToggleWriteEnable] <-- 0x%08x\n",
  7248. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  7249. #endif
  7250. }
  7251. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DataToggleWriteEnable(void)
  7252. {
  7253. #if GH_USB_ENABLE_DEBUG_PRINT
  7254. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DataToggleWriteEnable] --> 0x%08x\n",
  7255. m_usb_txcsrh_w_host.bitc.datatogglewriteenable);
  7256. #endif
  7257. return m_usb_txcsrh_w_host.bitc.datatogglewriteenable;
  7258. }
  7259. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DMAReqMode(U8 data)
  7260. {
  7261. m_usb_txcsrh_w_host.bitc.dmareqmode = data;
  7262. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  7263. #if GH_USB_ENABLE_DEBUG_PRINT
  7264. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DMAReqMode] <-- 0x%08x\n",
  7265. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  7266. #endif
  7267. }
  7268. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqMode(void)
  7269. {
  7270. #if GH_USB_ENABLE_DEBUG_PRINT
  7271. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DMAReqMode] --> 0x%08x\n",
  7272. m_usb_txcsrh_w_host.bitc.dmareqmode);
  7273. #endif
  7274. return m_usb_txcsrh_w_host.bitc.dmareqmode;
  7275. }
  7276. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_FrcDataTog(U8 data)
  7277. {
  7278. m_usb_txcsrh_w_host.bitc.frcdatatog = data;
  7279. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  7280. #if GH_USB_ENABLE_DEBUG_PRINT
  7281. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_FrcDataTog] <-- 0x%08x\n",
  7282. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  7283. #endif
  7284. }
  7285. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_FrcDataTog(void)
  7286. {
  7287. #if GH_USB_ENABLE_DEBUG_PRINT
  7288. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_FrcDataTog] --> 0x%08x\n",
  7289. m_usb_txcsrh_w_host.bitc.frcdatatog);
  7290. #endif
  7291. return m_usb_txcsrh_w_host.bitc.frcdatatog;
  7292. }
  7293. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_DMAReqEnab(U8 data)
  7294. {
  7295. m_usb_txcsrh_w_host.bitc.dmareqenab = data;
  7296. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  7297. #if GH_USB_ENABLE_DEBUG_PRINT
  7298. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_DMAReqEnab] <-- 0x%08x\n",
  7299. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  7300. #endif
  7301. }
  7302. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_DMAReqEnab(void)
  7303. {
  7304. #if GH_USB_ENABLE_DEBUG_PRINT
  7305. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_DMAReqEnab] --> 0x%08x\n",
  7306. m_usb_txcsrh_w_host.bitc.dmareqenab);
  7307. #endif
  7308. return m_usb_txcsrh_w_host.bitc.dmareqenab;
  7309. }
  7310. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_Mode(U8 data)
  7311. {
  7312. m_usb_txcsrh_w_host.bitc.mode = data;
  7313. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  7314. #if GH_USB_ENABLE_DEBUG_PRINT
  7315. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_Mode] <-- 0x%08x\n",
  7316. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  7317. #endif
  7318. }
  7319. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_Mode(void)
  7320. {
  7321. #if GH_USB_ENABLE_DEBUG_PRINT
  7322. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_Mode] --> 0x%08x\n",
  7323. m_usb_txcsrh_w_host.bitc.mode);
  7324. #endif
  7325. return m_usb_txcsrh_w_host.bitc.mode;
  7326. }
  7327. GH_INLINE void GH_USB_set_TXCSRH_W_HOST_AutoSet(U8 data)
  7328. {
  7329. m_usb_txcsrh_w_host.bitc.autoset = data;
  7330. *(volatile U8 *)REG_USB_TXCSRH_W_HOST = m_usb_txcsrh_w_host.all;
  7331. #if GH_USB_ENABLE_DEBUG_PRINT
  7332. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TXCSRH_W_HOST_AutoSet] <-- 0x%08x\n",
  7333. REG_USB_TXCSRH_W_HOST,m_usb_txcsrh_w_host.all,m_usb_txcsrh_w_host.all);
  7334. #endif
  7335. }
  7336. GH_INLINE U8 GH_USB_getm_TXCSRH_W_HOST_AutoSet(void)
  7337. {
  7338. #if GH_USB_ENABLE_DEBUG_PRINT
  7339. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_TXCSRH_W_HOST_AutoSet] --> 0x%08x\n",
  7340. m_usb_txcsrh_w_host.bitc.autoset);
  7341. #endif
  7342. return m_usb_txcsrh_w_host.bitc.autoset;
  7343. }
  7344. #endif /* GH_INLINE_LEVEL < 2 */
  7345. /*----------------------------------------------------------------------------*/
  7346. /* register USB_RxMaxP (read/write) */
  7347. /*----------------------------------------------------------------------------*/
  7348. #if GH_INLINE_LEVEL == 0
  7349. /*! \brief Writes the register 'USB_RxMaxP'. */
  7350. void GH_USB_set_RxMaxP(U16 data);
  7351. /*! \brief Reads the register 'USB_RxMaxP'. */
  7352. U16 GH_USB_get_RxMaxP(void);
  7353. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_RxMaxP'. */
  7354. void GH_USB_set_RxMaxP_TxMaxP(U16 data);
  7355. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_RxMaxP'. */
  7356. U16 GH_USB_get_RxMaxP_TxMaxP(void);
  7357. /*! \brief Writes the bit group 'multiplier' of register 'USB_RxMaxP'. */
  7358. void GH_USB_set_RxMaxP_multiplier(U8 data);
  7359. /*! \brief Reads the bit group 'multiplier' of register 'USB_RxMaxP'. */
  7360. U8 GH_USB_get_RxMaxP_multiplier(void);
  7361. #else /* GH_INLINE_LEVEL == 0 */
  7362. GH_INLINE void GH_USB_set_RxMaxP(U16 data)
  7363. {
  7364. *(volatile U16 *)REG_USB_RXMAXP = data;
  7365. #if GH_USB_ENABLE_DEBUG_PRINT
  7366. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxP] <-- 0x%08x\n",
  7367. REG_USB_RXMAXP,data,data);
  7368. #endif
  7369. }
  7370. GH_INLINE U16 GH_USB_get_RxMaxP(void)
  7371. {
  7372. U16 value = (*(volatile U16 *)REG_USB_RXMAXP);
  7373. #if GH_USB_ENABLE_DEBUG_PRINT
  7374. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxP] --> 0x%08x\n",
  7375. REG_USB_RXMAXP,value);
  7376. #endif
  7377. return value;
  7378. }
  7379. GH_INLINE void GH_USB_set_RxMaxP_TxMaxP(U16 data)
  7380. {
  7381. GH_USB_RXMAXP_S d;
  7382. d.all = *(volatile U16 *)REG_USB_RXMAXP;
  7383. d.bitc.txmaxp = data;
  7384. *(volatile U16 *)REG_USB_RXMAXP = d.all;
  7385. #if GH_USB_ENABLE_DEBUG_PRINT
  7386. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxP_TxMaxP] <-- 0x%08x\n",
  7387. REG_USB_RXMAXP,d.all,d.all);
  7388. #endif
  7389. }
  7390. GH_INLINE U16 GH_USB_get_RxMaxP_TxMaxP(void)
  7391. {
  7392. GH_USB_RXMAXP_S tmp_value;
  7393. U16 value = (*(volatile U16 *)REG_USB_RXMAXP);
  7394. tmp_value.all = value;
  7395. #if GH_USB_ENABLE_DEBUG_PRINT
  7396. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxP_TxMaxP] --> 0x%08x\n",
  7397. REG_USB_RXMAXP,value);
  7398. #endif
  7399. return tmp_value.bitc.txmaxp;
  7400. }
  7401. GH_INLINE void GH_USB_set_RxMaxP_multiplier(U8 data)
  7402. {
  7403. GH_USB_RXMAXP_S d;
  7404. d.all = *(volatile U16 *)REG_USB_RXMAXP;
  7405. d.bitc.multiplier = data;
  7406. *(volatile U16 *)REG_USB_RXMAXP = d.all;
  7407. #if GH_USB_ENABLE_DEBUG_PRINT
  7408. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxP_multiplier] <-- 0x%08x\n",
  7409. REG_USB_RXMAXP,d.all,d.all);
  7410. #endif
  7411. }
  7412. GH_INLINE U8 GH_USB_get_RxMaxP_multiplier(void)
  7413. {
  7414. GH_USB_RXMAXP_S tmp_value;
  7415. U16 value = (*(volatile U16 *)REG_USB_RXMAXP);
  7416. tmp_value.all = value;
  7417. #if GH_USB_ENABLE_DEBUG_PRINT
  7418. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxP_multiplier] --> 0x%08x\n",
  7419. REG_USB_RXMAXP,value);
  7420. #endif
  7421. return tmp_value.bitc.multiplier;
  7422. }
  7423. #endif /* GH_INLINE_LEVEL == 0 */
  7424. /*----------------------------------------------------------------------------*/
  7425. /* register USB_RxMaxPL (read/write) */
  7426. /*----------------------------------------------------------------------------*/
  7427. #if GH_INLINE_LEVEL == 0
  7428. /*! \brief Writes the register 'USB_RxMaxPL'. */
  7429. void GH_USB_set_RxMaxPL(U8 data);
  7430. /*! \brief Reads the register 'USB_RxMaxPL'. */
  7431. U8 GH_USB_get_RxMaxPL(void);
  7432. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_RxMaxPL'. */
  7433. void GH_USB_set_RxMaxPL_TxMaxP(U8 data);
  7434. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_RxMaxPL'. */
  7435. U8 GH_USB_get_RxMaxPL_TxMaxP(void);
  7436. #else /* GH_INLINE_LEVEL == 0 */
  7437. GH_INLINE void GH_USB_set_RxMaxPL(U8 data)
  7438. {
  7439. *(volatile U8 *)REG_USB_RXMAXPL = data;
  7440. #if GH_USB_ENABLE_DEBUG_PRINT
  7441. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxPL] <-- 0x%08x\n",
  7442. REG_USB_RXMAXPL,data,data);
  7443. #endif
  7444. }
  7445. GH_INLINE U8 GH_USB_get_RxMaxPL(void)
  7446. {
  7447. U8 value = (*(volatile U8 *)REG_USB_RXMAXPL);
  7448. #if GH_USB_ENABLE_DEBUG_PRINT
  7449. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxPL] --> 0x%08x\n",
  7450. REG_USB_RXMAXPL,value);
  7451. #endif
  7452. return value;
  7453. }
  7454. GH_INLINE void GH_USB_set_RxMaxPL_TxMaxP(U8 data)
  7455. {
  7456. GH_USB_RXMAXPL_S d;
  7457. d.all = *(volatile U8 *)REG_USB_RXMAXPL;
  7458. d.bitc.txmaxp = data;
  7459. *(volatile U8 *)REG_USB_RXMAXPL = d.all;
  7460. #if GH_USB_ENABLE_DEBUG_PRINT
  7461. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxPL_TxMaxP] <-- 0x%08x\n",
  7462. REG_USB_RXMAXPL,d.all,d.all);
  7463. #endif
  7464. }
  7465. GH_INLINE U8 GH_USB_get_RxMaxPL_TxMaxP(void)
  7466. {
  7467. GH_USB_RXMAXPL_S tmp_value;
  7468. U8 value = (*(volatile U8 *)REG_USB_RXMAXPL);
  7469. tmp_value.all = value;
  7470. #if GH_USB_ENABLE_DEBUG_PRINT
  7471. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxPL_TxMaxP] --> 0x%08x\n",
  7472. REG_USB_RXMAXPL,value);
  7473. #endif
  7474. return tmp_value.bitc.txmaxp;
  7475. }
  7476. #endif /* GH_INLINE_LEVEL == 0 */
  7477. /*----------------------------------------------------------------------------*/
  7478. /* register USB_RxMaxPH (read/write) */
  7479. /*----------------------------------------------------------------------------*/
  7480. #if GH_INLINE_LEVEL == 0
  7481. /*! \brief Writes the register 'USB_RxMaxPH'. */
  7482. void GH_USB_set_RxMaxPH(U8 data);
  7483. /*! \brief Reads the register 'USB_RxMaxPH'. */
  7484. U8 GH_USB_get_RxMaxPH(void);
  7485. /*! \brief Writes the bit group 'TxMaxP' of register 'USB_RxMaxPH'. */
  7486. void GH_USB_set_RxMaxPH_TxMaxP(U8 data);
  7487. /*! \brief Reads the bit group 'TxMaxP' of register 'USB_RxMaxPH'. */
  7488. U8 GH_USB_get_RxMaxPH_TxMaxP(void);
  7489. /*! \brief Writes the bit group 'multiplier' of register 'USB_RxMaxPH'. */
  7490. void GH_USB_set_RxMaxPH_multiplier(U8 data);
  7491. /*! \brief Reads the bit group 'multiplier' of register 'USB_RxMaxPH'. */
  7492. U8 GH_USB_get_RxMaxPH_multiplier(void);
  7493. #else /* GH_INLINE_LEVEL == 0 */
  7494. GH_INLINE void GH_USB_set_RxMaxPH(U8 data)
  7495. {
  7496. *(volatile U8 *)REG_USB_RXMAXPH = data;
  7497. #if GH_USB_ENABLE_DEBUG_PRINT
  7498. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxPH] <-- 0x%08x\n",
  7499. REG_USB_RXMAXPH,data,data);
  7500. #endif
  7501. }
  7502. GH_INLINE U8 GH_USB_get_RxMaxPH(void)
  7503. {
  7504. U8 value = (*(volatile U8 *)REG_USB_RXMAXPH);
  7505. #if GH_USB_ENABLE_DEBUG_PRINT
  7506. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxPH] --> 0x%08x\n",
  7507. REG_USB_RXMAXPH,value);
  7508. #endif
  7509. return value;
  7510. }
  7511. GH_INLINE void GH_USB_set_RxMaxPH_TxMaxP(U8 data)
  7512. {
  7513. GH_USB_RXMAXPH_S d;
  7514. d.all = *(volatile U8 *)REG_USB_RXMAXPH;
  7515. d.bitc.txmaxp = data;
  7516. *(volatile U8 *)REG_USB_RXMAXPH = d.all;
  7517. #if GH_USB_ENABLE_DEBUG_PRINT
  7518. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxPH_TxMaxP] <-- 0x%08x\n",
  7519. REG_USB_RXMAXPH,d.all,d.all);
  7520. #endif
  7521. }
  7522. GH_INLINE U8 GH_USB_get_RxMaxPH_TxMaxP(void)
  7523. {
  7524. GH_USB_RXMAXPH_S tmp_value;
  7525. U8 value = (*(volatile U8 *)REG_USB_RXMAXPH);
  7526. tmp_value.all = value;
  7527. #if GH_USB_ENABLE_DEBUG_PRINT
  7528. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxPH_TxMaxP] --> 0x%08x\n",
  7529. REG_USB_RXMAXPH,value);
  7530. #endif
  7531. return tmp_value.bitc.txmaxp;
  7532. }
  7533. GH_INLINE void GH_USB_set_RxMaxPH_multiplier(U8 data)
  7534. {
  7535. GH_USB_RXMAXPH_S d;
  7536. d.all = *(volatile U8 *)REG_USB_RXMAXPH;
  7537. d.bitc.multiplier = data;
  7538. *(volatile U8 *)REG_USB_RXMAXPH = d.all;
  7539. #if GH_USB_ENABLE_DEBUG_PRINT
  7540. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxMaxPH_multiplier] <-- 0x%08x\n",
  7541. REG_USB_RXMAXPH,d.all,d.all);
  7542. #endif
  7543. }
  7544. GH_INLINE U8 GH_USB_get_RxMaxPH_multiplier(void)
  7545. {
  7546. GH_USB_RXMAXPH_S tmp_value;
  7547. U8 value = (*(volatile U8 *)REG_USB_RXMAXPH);
  7548. tmp_value.all = value;
  7549. #if GH_USB_ENABLE_DEBUG_PRINT
  7550. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxMaxPH_multiplier] --> 0x%08x\n",
  7551. REG_USB_RXMAXPH,value);
  7552. #endif
  7553. return tmp_value.bitc.multiplier;
  7554. }
  7555. #endif /* GH_INLINE_LEVEL == 0 */
  7556. /*----------------------------------------------------------------------------*/
  7557. /* register USB_RXCSRL_R_PERI (read) */
  7558. /*----------------------------------------------------------------------------*/
  7559. #if GH_INLINE_LEVEL == 0
  7560. /*! \brief Reads the register 'USB_RXCSRL_R_PERI'. */
  7561. U8 GH_USB_get_RXCSRL_R_PERI(void);
  7562. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_RXCSRL_R_PERI'. */
  7563. U8 GH_USB_get_RXCSRL_R_PERI_RxPktRdy(void);
  7564. /*! \brief Reads the bit group 'FIFOFull' of register 'USB_RXCSRL_R_PERI'. */
  7565. U8 GH_USB_get_RXCSRL_R_PERI_FIFOFull(void);
  7566. /*! \brief Reads the bit group 'OverRun' of register 'USB_RXCSRL_R_PERI'. */
  7567. U8 GH_USB_get_RXCSRL_R_PERI_OverRun(void);
  7568. /*! \brief Reads the bit group 'DataError' of register 'USB_RXCSRL_R_PERI'. */
  7569. U8 GH_USB_get_RXCSRL_R_PERI_DataError(void);
  7570. /*! \brief Reads the bit group 'SendStall' of register 'USB_RXCSRL_R_PERI'. */
  7571. U8 GH_USB_get_RXCSRL_R_PERI_SendStall(void);
  7572. /*! \brief Reads the bit group 'SentStall' of register 'USB_RXCSRL_R_PERI'. */
  7573. U8 GH_USB_get_RXCSRL_R_PERI_SentStall(void);
  7574. #else /* GH_INLINE_LEVEL == 0 */
  7575. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI(void)
  7576. {
  7577. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  7578. #if GH_USB_ENABLE_DEBUG_PRINT
  7579. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI] --> 0x%08x\n",
  7580. REG_USB_RXCSRL_R_PERI,value);
  7581. #endif
  7582. return value;
  7583. }
  7584. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_RxPktRdy(void)
  7585. {
  7586. GH_USB_RXCSRL_R_PERI_S tmp_value;
  7587. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  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_RXCSRL_R_PERI_RxPktRdy] --> 0x%08x\n",
  7591. REG_USB_RXCSRL_R_PERI,value);
  7592. #endif
  7593. return tmp_value.bitc.rxpktrdy;
  7594. }
  7595. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_FIFOFull(void)
  7596. {
  7597. GH_USB_RXCSRL_R_PERI_S tmp_value;
  7598. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  7599. tmp_value.all = value;
  7600. #if GH_USB_ENABLE_DEBUG_PRINT
  7601. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_FIFOFull] --> 0x%08x\n",
  7602. REG_USB_RXCSRL_R_PERI,value);
  7603. #endif
  7604. return tmp_value.bitc.fifofull;
  7605. }
  7606. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_OverRun(void)
  7607. {
  7608. GH_USB_RXCSRL_R_PERI_S tmp_value;
  7609. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  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_RXCSRL_R_PERI_OverRun] --> 0x%08x\n",
  7613. REG_USB_RXCSRL_R_PERI,value);
  7614. #endif
  7615. return tmp_value.bitc.overrun;
  7616. }
  7617. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_DataError(void)
  7618. {
  7619. GH_USB_RXCSRL_R_PERI_S tmp_value;
  7620. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  7621. tmp_value.all = value;
  7622. #if GH_USB_ENABLE_DEBUG_PRINT
  7623. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_DataError] --> 0x%08x\n",
  7624. REG_USB_RXCSRL_R_PERI,value);
  7625. #endif
  7626. return tmp_value.bitc.dataerror;
  7627. }
  7628. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_SendStall(void)
  7629. {
  7630. GH_USB_RXCSRL_R_PERI_S tmp_value;
  7631. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  7632. tmp_value.all = value;
  7633. #if GH_USB_ENABLE_DEBUG_PRINT
  7634. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_SendStall] --> 0x%08x\n",
  7635. REG_USB_RXCSRL_R_PERI,value);
  7636. #endif
  7637. return tmp_value.bitc.sendstall;
  7638. }
  7639. GH_INLINE U8 GH_USB_get_RXCSRL_R_PERI_SentStall(void)
  7640. {
  7641. GH_USB_RXCSRL_R_PERI_S tmp_value;
  7642. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_PERI);
  7643. tmp_value.all = value;
  7644. #if GH_USB_ENABLE_DEBUG_PRINT
  7645. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_PERI_SentStall] --> 0x%08x\n",
  7646. REG_USB_RXCSRL_R_PERI,value);
  7647. #endif
  7648. return tmp_value.bitc.sentstall;
  7649. }
  7650. #endif /* GH_INLINE_LEVEL == 0 */
  7651. /*----------------------------------------------------------------------------*/
  7652. /* register USB_RXCSRH_R_PERI (read) */
  7653. /*----------------------------------------------------------------------------*/
  7654. #if GH_INLINE_LEVEL == 0
  7655. /*! \brief Reads the register 'USB_RXCSRH_R_PERI'. */
  7656. U8 GH_USB_get_RXCSRH_R_PERI(void);
  7657. /*! \brief Reads the bit group 'IncompRx' of register 'USB_RXCSRH_R_PERI'. */
  7658. U8 GH_USB_get_RXCSRH_R_PERI_IncompRx(void);
  7659. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_RXCSRH_R_PERI'. */
  7660. U8 GH_USB_get_RXCSRH_R_PERI_DMAReqMode(void);
  7661. /*! \brief Reads the bit group 'DisNyet_PIDError' of register 'USB_RXCSRH_R_PERI'. */
  7662. U8 GH_USB_get_RXCSRH_R_PERI_DisNyet_PIDError(void);
  7663. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_RXCSRH_R_PERI'. */
  7664. U8 GH_USB_get_RXCSRH_R_PERI_DMAReqEnab(void);
  7665. /*! \brief Reads the bit group 'ISO' of register 'USB_RXCSRH_R_PERI'. */
  7666. U8 GH_USB_get_RXCSRH_R_PERI_ISO(void);
  7667. /*! \brief Reads the bit group 'AutoClear' of register 'USB_RXCSRH_R_PERI'. */
  7668. U8 GH_USB_get_RXCSRH_R_PERI_AutoClear(void);
  7669. #else /* GH_INLINE_LEVEL == 0 */
  7670. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI(void)
  7671. {
  7672. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  7673. #if GH_USB_ENABLE_DEBUG_PRINT
  7674. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI] --> 0x%08x\n",
  7675. REG_USB_RXCSRH_R_PERI,value);
  7676. #endif
  7677. return value;
  7678. }
  7679. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_IncompRx(void)
  7680. {
  7681. GH_USB_RXCSRH_R_PERI_S tmp_value;
  7682. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  7683. tmp_value.all = value;
  7684. #if GH_USB_ENABLE_DEBUG_PRINT
  7685. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_IncompRx] --> 0x%08x\n",
  7686. REG_USB_RXCSRH_R_PERI,value);
  7687. #endif
  7688. return tmp_value.bitc.incomprx;
  7689. }
  7690. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_DMAReqMode(void)
  7691. {
  7692. GH_USB_RXCSRH_R_PERI_S tmp_value;
  7693. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  7694. tmp_value.all = value;
  7695. #if GH_USB_ENABLE_DEBUG_PRINT
  7696. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_DMAReqMode] --> 0x%08x\n",
  7697. REG_USB_RXCSRH_R_PERI,value);
  7698. #endif
  7699. return tmp_value.bitc.dmareqmode;
  7700. }
  7701. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_DisNyet_PIDError(void)
  7702. {
  7703. GH_USB_RXCSRH_R_PERI_S tmp_value;
  7704. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  7705. tmp_value.all = value;
  7706. #if GH_USB_ENABLE_DEBUG_PRINT
  7707. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_DisNyet_PIDError] --> 0x%08x\n",
  7708. REG_USB_RXCSRH_R_PERI,value);
  7709. #endif
  7710. return tmp_value.bitc.disnyet_piderror;
  7711. }
  7712. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_DMAReqEnab(void)
  7713. {
  7714. GH_USB_RXCSRH_R_PERI_S tmp_value;
  7715. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  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_RXCSRH_R_PERI_DMAReqEnab] --> 0x%08x\n",
  7719. REG_USB_RXCSRH_R_PERI,value);
  7720. #endif
  7721. return tmp_value.bitc.dmareqenab;
  7722. }
  7723. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_ISO(void)
  7724. {
  7725. GH_USB_RXCSRH_R_PERI_S tmp_value;
  7726. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  7727. tmp_value.all = value;
  7728. #if GH_USB_ENABLE_DEBUG_PRINT
  7729. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_ISO] --> 0x%08x\n",
  7730. REG_USB_RXCSRH_R_PERI,value);
  7731. #endif
  7732. return tmp_value.bitc.iso;
  7733. }
  7734. GH_INLINE U8 GH_USB_get_RXCSRH_R_PERI_AutoClear(void)
  7735. {
  7736. GH_USB_RXCSRH_R_PERI_S tmp_value;
  7737. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_PERI);
  7738. tmp_value.all = value;
  7739. #if GH_USB_ENABLE_DEBUG_PRINT
  7740. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_PERI_AutoClear] --> 0x%08x\n",
  7741. REG_USB_RXCSRH_R_PERI,value);
  7742. #endif
  7743. return tmp_value.bitc.autoclear;
  7744. }
  7745. #endif /* GH_INLINE_LEVEL == 0 */
  7746. /*----------------------------------------------------------------------------*/
  7747. /* register USB_RXCSRL_W_PERI (write) */
  7748. /*----------------------------------------------------------------------------*/
  7749. #if GH_INLINE_LEVEL < 2
  7750. /*! \brief Writes the register 'USB_RXCSRL_W_PERI'. */
  7751. void GH_USB_set_RXCSRL_W_PERI(U8 data);
  7752. /*! \brief Reads the mirror variable of the register 'USB_RXCSRL_W_PERI'. */
  7753. U8 GH_USB_getm_RXCSRL_W_PERI(void);
  7754. /*! \brief Writes the bit group 'RxPktRdy' of register 'USB_RXCSRL_W_PERI'. */
  7755. void GH_USB_set_RXCSRL_W_PERI_RxPktRdy(U8 data);
  7756. /*! \brief Reads the bit group 'RxPktRdy' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  7757. U8 GH_USB_getm_RXCSRL_W_PERI_RxPktRdy(void);
  7758. /*! \brief Writes the bit group 'OverRun' of register 'USB_RXCSRL_W_PERI'. */
  7759. void GH_USB_set_RXCSRL_W_PERI_OverRun(U8 data);
  7760. /*! \brief Reads the bit group 'OverRun' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  7761. U8 GH_USB_getm_RXCSRL_W_PERI_OverRun(void);
  7762. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_RXCSRL_W_PERI'. */
  7763. void GH_USB_set_RXCSRL_W_PERI_FlushFIFO(U8 data);
  7764. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  7765. U8 GH_USB_getm_RXCSRL_W_PERI_FlushFIFO(void);
  7766. /*! \brief Writes the bit group 'SendStall' of register 'USB_RXCSRL_W_PERI'. */
  7767. void GH_USB_set_RXCSRL_W_PERI_SendStall(U8 data);
  7768. /*! \brief Reads the bit group 'SendStall' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  7769. U8 GH_USB_getm_RXCSRL_W_PERI_SendStall(void);
  7770. /*! \brief Writes the bit group 'SentStall' of register 'USB_RXCSRL_W_PERI'. */
  7771. void GH_USB_set_RXCSRL_W_PERI_SentStall(U8 data);
  7772. /*! \brief Reads the bit group 'SentStall' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  7773. U8 GH_USB_getm_RXCSRL_W_PERI_SentStall(void);
  7774. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_RXCSRL_W_PERI'. */
  7775. void GH_USB_set_RXCSRL_W_PERI_ClrDataTog(U8 data);
  7776. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_RXCSRL_W_PERI'. */
  7777. U8 GH_USB_getm_RXCSRL_W_PERI_ClrDataTog(void);
  7778. #else /* GH_INLINE_LEVEL < 2 */
  7779. GH_INLINE void GH_USB_set_RXCSRL_W_PERI(U8 data)
  7780. {
  7781. m_usb_rxcsrl_w_peri.all = data;
  7782. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = data;
  7783. #if GH_USB_ENABLE_DEBUG_PRINT
  7784. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI] <-- 0x%08x\n",
  7785. REG_USB_RXCSRL_W_PERI,data,data);
  7786. #endif
  7787. }
  7788. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI(void)
  7789. {
  7790. #if GH_USB_ENABLE_DEBUG_PRINT
  7791. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI] --> 0x%08x\n",
  7792. m_usb_rxcsrl_w_peri.all);
  7793. #endif
  7794. return m_usb_rxcsrl_w_peri.all;
  7795. }
  7796. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_RxPktRdy(U8 data)
  7797. {
  7798. m_usb_rxcsrl_w_peri.bitc.rxpktrdy = data;
  7799. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  7800. #if GH_USB_ENABLE_DEBUG_PRINT
  7801. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_RxPktRdy] <-- 0x%08x\n",
  7802. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  7803. #endif
  7804. }
  7805. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_RxPktRdy(void)
  7806. {
  7807. #if GH_USB_ENABLE_DEBUG_PRINT
  7808. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_RxPktRdy] --> 0x%08x\n",
  7809. m_usb_rxcsrl_w_peri.bitc.rxpktrdy);
  7810. #endif
  7811. return m_usb_rxcsrl_w_peri.bitc.rxpktrdy;
  7812. }
  7813. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_OverRun(U8 data)
  7814. {
  7815. m_usb_rxcsrl_w_peri.bitc.overrun = data;
  7816. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  7817. #if GH_USB_ENABLE_DEBUG_PRINT
  7818. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_OverRun] <-- 0x%08x\n",
  7819. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  7820. #endif
  7821. }
  7822. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_OverRun(void)
  7823. {
  7824. #if GH_USB_ENABLE_DEBUG_PRINT
  7825. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_OverRun] --> 0x%08x\n",
  7826. m_usb_rxcsrl_w_peri.bitc.overrun);
  7827. #endif
  7828. return m_usb_rxcsrl_w_peri.bitc.overrun;
  7829. }
  7830. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_FlushFIFO(U8 data)
  7831. {
  7832. m_usb_rxcsrl_w_peri.bitc.flushfifo = data;
  7833. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  7834. #if GH_USB_ENABLE_DEBUG_PRINT
  7835. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_FlushFIFO] <-- 0x%08x\n",
  7836. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  7837. #endif
  7838. }
  7839. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_FlushFIFO(void)
  7840. {
  7841. #if GH_USB_ENABLE_DEBUG_PRINT
  7842. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_FlushFIFO] --> 0x%08x\n",
  7843. m_usb_rxcsrl_w_peri.bitc.flushfifo);
  7844. #endif
  7845. return m_usb_rxcsrl_w_peri.bitc.flushfifo;
  7846. }
  7847. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_SendStall(U8 data)
  7848. {
  7849. m_usb_rxcsrl_w_peri.bitc.sendstall = data;
  7850. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  7851. #if GH_USB_ENABLE_DEBUG_PRINT
  7852. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_SendStall] <-- 0x%08x\n",
  7853. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  7854. #endif
  7855. }
  7856. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_SendStall(void)
  7857. {
  7858. #if GH_USB_ENABLE_DEBUG_PRINT
  7859. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_SendStall] --> 0x%08x\n",
  7860. m_usb_rxcsrl_w_peri.bitc.sendstall);
  7861. #endif
  7862. return m_usb_rxcsrl_w_peri.bitc.sendstall;
  7863. }
  7864. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_SentStall(U8 data)
  7865. {
  7866. m_usb_rxcsrl_w_peri.bitc.sentstall = data;
  7867. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  7868. #if GH_USB_ENABLE_DEBUG_PRINT
  7869. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_SentStall] <-- 0x%08x\n",
  7870. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  7871. #endif
  7872. }
  7873. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_SentStall(void)
  7874. {
  7875. #if GH_USB_ENABLE_DEBUG_PRINT
  7876. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_SentStall] --> 0x%08x\n",
  7877. m_usb_rxcsrl_w_peri.bitc.sentstall);
  7878. #endif
  7879. return m_usb_rxcsrl_w_peri.bitc.sentstall;
  7880. }
  7881. GH_INLINE void GH_USB_set_RXCSRL_W_PERI_ClrDataTog(U8 data)
  7882. {
  7883. m_usb_rxcsrl_w_peri.bitc.clrdatatog = data;
  7884. *(volatile U8 *)REG_USB_RXCSRL_W_PERI = m_usb_rxcsrl_w_peri.all;
  7885. #if GH_USB_ENABLE_DEBUG_PRINT
  7886. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_PERI_ClrDataTog] <-- 0x%08x\n",
  7887. REG_USB_RXCSRL_W_PERI,m_usb_rxcsrl_w_peri.all,m_usb_rxcsrl_w_peri.all);
  7888. #endif
  7889. }
  7890. GH_INLINE U8 GH_USB_getm_RXCSRL_W_PERI_ClrDataTog(void)
  7891. {
  7892. #if GH_USB_ENABLE_DEBUG_PRINT
  7893. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_PERI_ClrDataTog] --> 0x%08x\n",
  7894. m_usb_rxcsrl_w_peri.bitc.clrdatatog);
  7895. #endif
  7896. return m_usb_rxcsrl_w_peri.bitc.clrdatatog;
  7897. }
  7898. #endif /* GH_INLINE_LEVEL < 2 */
  7899. /*----------------------------------------------------------------------------*/
  7900. /* register USB_RXCSRH_W_PERI (write) */
  7901. /*----------------------------------------------------------------------------*/
  7902. #if GH_INLINE_LEVEL < 2
  7903. /*! \brief Writes the register 'USB_RXCSRH_W_PERI'. */
  7904. void GH_USB_set_RXCSRH_W_PERI(U8 data);
  7905. /*! \brief Reads the mirror variable of the register 'USB_RXCSRH_W_PERI'. */
  7906. U8 GH_USB_getm_RXCSRH_W_PERI(void);
  7907. /*! \brief Writes the bit group 'IncompRx' of register 'USB_RXCSRH_W_PERI'. */
  7908. void GH_USB_set_RXCSRH_W_PERI_IncompRx(U8 data);
  7909. /*! \brief Reads the bit group 'IncompRx' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  7910. U8 GH_USB_getm_RXCSRH_W_PERI_IncompRx(void);
  7911. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_RXCSRH_W_PERI'. */
  7912. void GH_USB_set_RXCSRH_W_PERI_DMAReqMode(U8 data);
  7913. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  7914. U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqMode(void);
  7915. /*! \brief Writes the bit group 'DisNyet_PIDError' of register 'USB_RXCSRH_W_PERI'. */
  7916. void GH_USB_set_RXCSRH_W_PERI_DisNyet_PIDError(U8 data);
  7917. /*! \brief Reads the bit group 'DisNyet_PIDError' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  7918. U8 GH_USB_getm_RXCSRH_W_PERI_DisNyet_PIDError(void);
  7919. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_RXCSRH_W_PERI'. */
  7920. void GH_USB_set_RXCSRH_W_PERI_DMAReqEnab(U8 data);
  7921. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  7922. U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqEnab(void);
  7923. /*! \brief Writes the bit group 'ISO' of register 'USB_RXCSRH_W_PERI'. */
  7924. void GH_USB_set_RXCSRH_W_PERI_ISO(U8 data);
  7925. /*! \brief Reads the bit group 'ISO' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  7926. U8 GH_USB_getm_RXCSRH_W_PERI_ISO(void);
  7927. /*! \brief Writes the bit group 'AutoClear' of register 'USB_RXCSRH_W_PERI'. */
  7928. void GH_USB_set_RXCSRH_W_PERI_AutoClear(U8 data);
  7929. /*! \brief Reads the bit group 'AutoClear' from the mirror variable of register 'USB_RXCSRH_W_PERI'. */
  7930. U8 GH_USB_getm_RXCSRH_W_PERI_AutoClear(void);
  7931. #else /* GH_INLINE_LEVEL < 2 */
  7932. GH_INLINE void GH_USB_set_RXCSRH_W_PERI(U8 data)
  7933. {
  7934. m_usb_rxcsrh_w_peri.all = data;
  7935. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = data;
  7936. #if GH_USB_ENABLE_DEBUG_PRINT
  7937. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI] <-- 0x%08x\n",
  7938. REG_USB_RXCSRH_W_PERI,data,data);
  7939. #endif
  7940. }
  7941. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI(void)
  7942. {
  7943. #if GH_USB_ENABLE_DEBUG_PRINT
  7944. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI] --> 0x%08x\n",
  7945. m_usb_rxcsrh_w_peri.all);
  7946. #endif
  7947. return m_usb_rxcsrh_w_peri.all;
  7948. }
  7949. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_IncompRx(U8 data)
  7950. {
  7951. m_usb_rxcsrh_w_peri.bitc.incomprx = data;
  7952. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  7953. #if GH_USB_ENABLE_DEBUG_PRINT
  7954. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_IncompRx] <-- 0x%08x\n",
  7955. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  7956. #endif
  7957. }
  7958. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_IncompRx(void)
  7959. {
  7960. #if GH_USB_ENABLE_DEBUG_PRINT
  7961. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_IncompRx] --> 0x%08x\n",
  7962. m_usb_rxcsrh_w_peri.bitc.incomprx);
  7963. #endif
  7964. return m_usb_rxcsrh_w_peri.bitc.incomprx;
  7965. }
  7966. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_DMAReqMode(U8 data)
  7967. {
  7968. m_usb_rxcsrh_w_peri.bitc.dmareqmode = data;
  7969. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  7970. #if GH_USB_ENABLE_DEBUG_PRINT
  7971. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_DMAReqMode] <-- 0x%08x\n",
  7972. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  7973. #endif
  7974. }
  7975. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqMode(void)
  7976. {
  7977. #if GH_USB_ENABLE_DEBUG_PRINT
  7978. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_DMAReqMode] --> 0x%08x\n",
  7979. m_usb_rxcsrh_w_peri.bitc.dmareqmode);
  7980. #endif
  7981. return m_usb_rxcsrh_w_peri.bitc.dmareqmode;
  7982. }
  7983. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_DisNyet_PIDError(U8 data)
  7984. {
  7985. m_usb_rxcsrh_w_peri.bitc.disnyet_piderror = data;
  7986. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  7987. #if GH_USB_ENABLE_DEBUG_PRINT
  7988. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_DisNyet_PIDError] <-- 0x%08x\n",
  7989. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  7990. #endif
  7991. }
  7992. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_DisNyet_PIDError(void)
  7993. {
  7994. #if GH_USB_ENABLE_DEBUG_PRINT
  7995. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_DisNyet_PIDError] --> 0x%08x\n",
  7996. m_usb_rxcsrh_w_peri.bitc.disnyet_piderror);
  7997. #endif
  7998. return m_usb_rxcsrh_w_peri.bitc.disnyet_piderror;
  7999. }
  8000. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_DMAReqEnab(U8 data)
  8001. {
  8002. m_usb_rxcsrh_w_peri.bitc.dmareqenab = data;
  8003. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  8004. #if GH_USB_ENABLE_DEBUG_PRINT
  8005. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_DMAReqEnab] <-- 0x%08x\n",
  8006. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  8007. #endif
  8008. }
  8009. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_DMAReqEnab(void)
  8010. {
  8011. #if GH_USB_ENABLE_DEBUG_PRINT
  8012. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_DMAReqEnab] --> 0x%08x\n",
  8013. m_usb_rxcsrh_w_peri.bitc.dmareqenab);
  8014. #endif
  8015. return m_usb_rxcsrh_w_peri.bitc.dmareqenab;
  8016. }
  8017. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_ISO(U8 data)
  8018. {
  8019. m_usb_rxcsrh_w_peri.bitc.iso = data;
  8020. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  8021. #if GH_USB_ENABLE_DEBUG_PRINT
  8022. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_ISO] <-- 0x%08x\n",
  8023. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  8024. #endif
  8025. }
  8026. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_ISO(void)
  8027. {
  8028. #if GH_USB_ENABLE_DEBUG_PRINT
  8029. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_ISO] --> 0x%08x\n",
  8030. m_usb_rxcsrh_w_peri.bitc.iso);
  8031. #endif
  8032. return m_usb_rxcsrh_w_peri.bitc.iso;
  8033. }
  8034. GH_INLINE void GH_USB_set_RXCSRH_W_PERI_AutoClear(U8 data)
  8035. {
  8036. m_usb_rxcsrh_w_peri.bitc.autoclear = data;
  8037. *(volatile U8 *)REG_USB_RXCSRH_W_PERI = m_usb_rxcsrh_w_peri.all;
  8038. #if GH_USB_ENABLE_DEBUG_PRINT
  8039. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_PERI_AutoClear] <-- 0x%08x\n",
  8040. REG_USB_RXCSRH_W_PERI,m_usb_rxcsrh_w_peri.all,m_usb_rxcsrh_w_peri.all);
  8041. #endif
  8042. }
  8043. GH_INLINE U8 GH_USB_getm_RXCSRH_W_PERI_AutoClear(void)
  8044. {
  8045. #if GH_USB_ENABLE_DEBUG_PRINT
  8046. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_PERI_AutoClear] --> 0x%08x\n",
  8047. m_usb_rxcsrh_w_peri.bitc.autoclear);
  8048. #endif
  8049. return m_usb_rxcsrh_w_peri.bitc.autoclear;
  8050. }
  8051. #endif /* GH_INLINE_LEVEL < 2 */
  8052. /*----------------------------------------------------------------------------*/
  8053. /* register USB_RXCSRL_R_HOST (read) */
  8054. /*----------------------------------------------------------------------------*/
  8055. #if GH_INLINE_LEVEL == 0
  8056. /*! \brief Reads the register 'USB_RXCSRL_R_HOST'. */
  8057. U8 GH_USB_get_RXCSRL_R_HOST(void);
  8058. /*! \brief Reads the bit group 'RxPktRdy' of register 'USB_RXCSRL_R_HOST'. */
  8059. U8 GH_USB_get_RXCSRL_R_HOST_RxPktRdy(void);
  8060. /*! \brief Reads the bit group 'FIFOFull' of register 'USB_RXCSRL_R_HOST'. */
  8061. U8 GH_USB_get_RXCSRL_R_HOST_FIFOFull(void);
  8062. /*! \brief Reads the bit group 'Error' of register 'USB_RXCSRL_R_HOST'. */
  8063. U8 GH_USB_get_RXCSRL_R_HOST_Error(void);
  8064. /*! \brief Reads the bit group 'DataError_NAKTimeout' of register 'USB_RXCSRL_R_HOST'. */
  8065. U8 GH_USB_get_RXCSRL_R_HOST_DataError_NAKTimeout(void);
  8066. /*! \brief Reads the bit group 'ReqPkt' of register 'USB_RXCSRL_R_HOST'. */
  8067. U8 GH_USB_get_RXCSRL_R_HOST_ReqPkt(void);
  8068. /*! \brief Reads the bit group 'RxStall' of register 'USB_RXCSRL_R_HOST'. */
  8069. U8 GH_USB_get_RXCSRL_R_HOST_RxStall(void);
  8070. #else /* GH_INLINE_LEVEL == 0 */
  8071. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST(void)
  8072. {
  8073. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  8074. #if GH_USB_ENABLE_DEBUG_PRINT
  8075. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST] --> 0x%08x\n",
  8076. REG_USB_RXCSRL_R_HOST,value);
  8077. #endif
  8078. return value;
  8079. }
  8080. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_RxPktRdy(void)
  8081. {
  8082. GH_USB_RXCSRL_R_HOST_S tmp_value;
  8083. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  8084. tmp_value.all = value;
  8085. #if GH_USB_ENABLE_DEBUG_PRINT
  8086. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_RxPktRdy] --> 0x%08x\n",
  8087. REG_USB_RXCSRL_R_HOST,value);
  8088. #endif
  8089. return tmp_value.bitc.rxpktrdy;
  8090. }
  8091. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_FIFOFull(void)
  8092. {
  8093. GH_USB_RXCSRL_R_HOST_S tmp_value;
  8094. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  8095. tmp_value.all = value;
  8096. #if GH_USB_ENABLE_DEBUG_PRINT
  8097. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_FIFOFull] --> 0x%08x\n",
  8098. REG_USB_RXCSRL_R_HOST,value);
  8099. #endif
  8100. return tmp_value.bitc.fifofull;
  8101. }
  8102. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_Error(void)
  8103. {
  8104. GH_USB_RXCSRL_R_HOST_S tmp_value;
  8105. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  8106. tmp_value.all = value;
  8107. #if GH_USB_ENABLE_DEBUG_PRINT
  8108. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_Error] --> 0x%08x\n",
  8109. REG_USB_RXCSRL_R_HOST,value);
  8110. #endif
  8111. return tmp_value.bitc.error;
  8112. }
  8113. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_DataError_NAKTimeout(void)
  8114. {
  8115. GH_USB_RXCSRL_R_HOST_S tmp_value;
  8116. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  8117. tmp_value.all = value;
  8118. #if GH_USB_ENABLE_DEBUG_PRINT
  8119. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_DataError_NAKTimeout] --> 0x%08x\n",
  8120. REG_USB_RXCSRL_R_HOST,value);
  8121. #endif
  8122. return tmp_value.bitc.dataerror_naktimeout;
  8123. }
  8124. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_ReqPkt(void)
  8125. {
  8126. GH_USB_RXCSRL_R_HOST_S tmp_value;
  8127. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  8128. tmp_value.all = value;
  8129. #if GH_USB_ENABLE_DEBUG_PRINT
  8130. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_ReqPkt] --> 0x%08x\n",
  8131. REG_USB_RXCSRL_R_HOST,value);
  8132. #endif
  8133. return tmp_value.bitc.reqpkt;
  8134. }
  8135. GH_INLINE U8 GH_USB_get_RXCSRL_R_HOST_RxStall(void)
  8136. {
  8137. GH_USB_RXCSRL_R_HOST_S tmp_value;
  8138. U8 value = (*(volatile U8 *)REG_USB_RXCSRL_R_HOST);
  8139. tmp_value.all = value;
  8140. #if GH_USB_ENABLE_DEBUG_PRINT
  8141. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRL_R_HOST_RxStall] --> 0x%08x\n",
  8142. REG_USB_RXCSRL_R_HOST,value);
  8143. #endif
  8144. return tmp_value.bitc.rxstall;
  8145. }
  8146. #endif /* GH_INLINE_LEVEL == 0 */
  8147. /*----------------------------------------------------------------------------*/
  8148. /* register USB_RXCSRH_R_HOST (read) */
  8149. /*----------------------------------------------------------------------------*/
  8150. #if GH_INLINE_LEVEL == 0
  8151. /*! \brief Reads the register 'USB_RXCSRH_R_HOST'. */
  8152. U8 GH_USB_get_RXCSRH_R_HOST(void);
  8153. /*! \brief Reads the bit group 'IncompRx' of register 'USB_RXCSRH_R_HOST'. */
  8154. U8 GH_USB_get_RXCSRH_R_HOST_IncompRx(void);
  8155. /*! \brief Reads the bit group 'DataToggle' of register 'USB_RXCSRH_R_HOST'. */
  8156. U8 GH_USB_get_RXCSRH_R_HOST_DataToggle(void);
  8157. /*! \brief Reads the bit group 'DataToggleWriteEnable' of register 'USB_RXCSRH_R_HOST'. */
  8158. U8 GH_USB_get_RXCSRH_R_HOST_DataToggleWriteEnable(void);
  8159. /*! \brief Reads the bit group 'DMAReqMode' of register 'USB_RXCSRH_R_HOST'. */
  8160. U8 GH_USB_get_RXCSRH_R_HOST_DMAReqMode(void);
  8161. /*! \brief Reads the bit group 'PIDError' of register 'USB_RXCSRH_R_HOST'. */
  8162. U8 GH_USB_get_RXCSRH_R_HOST_PIDError(void);
  8163. /*! \brief Reads the bit group 'DMAReqEnab' of register 'USB_RXCSRH_R_HOST'. */
  8164. U8 GH_USB_get_RXCSRH_R_HOST_DMAReqEnab(void);
  8165. /*! \brief Reads the bit group 'AutoReq' of register 'USB_RXCSRH_R_HOST'. */
  8166. U8 GH_USB_get_RXCSRH_R_HOST_AutoReq(void);
  8167. /*! \brief Reads the bit group 'AutoClear' of register 'USB_RXCSRH_R_HOST'. */
  8168. U8 GH_USB_get_RXCSRH_R_HOST_AutoClear(void);
  8169. #else /* GH_INLINE_LEVEL == 0 */
  8170. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST(void)
  8171. {
  8172. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8173. #if GH_USB_ENABLE_DEBUG_PRINT
  8174. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST] --> 0x%08x\n",
  8175. REG_USB_RXCSRH_R_HOST,value);
  8176. #endif
  8177. return value;
  8178. }
  8179. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_IncompRx(void)
  8180. {
  8181. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8182. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8183. tmp_value.all = value;
  8184. #if GH_USB_ENABLE_DEBUG_PRINT
  8185. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_IncompRx] --> 0x%08x\n",
  8186. REG_USB_RXCSRH_R_HOST,value);
  8187. #endif
  8188. return tmp_value.bitc.incomprx;
  8189. }
  8190. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DataToggle(void)
  8191. {
  8192. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8193. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8194. tmp_value.all = value;
  8195. #if GH_USB_ENABLE_DEBUG_PRINT
  8196. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DataToggle] --> 0x%08x\n",
  8197. REG_USB_RXCSRH_R_HOST,value);
  8198. #endif
  8199. return tmp_value.bitc.datatoggle;
  8200. }
  8201. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DataToggleWriteEnable(void)
  8202. {
  8203. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8204. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8205. tmp_value.all = value;
  8206. #if GH_USB_ENABLE_DEBUG_PRINT
  8207. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DataToggleWriteEnable] --> 0x%08x\n",
  8208. REG_USB_RXCSRH_R_HOST,value);
  8209. #endif
  8210. return tmp_value.bitc.datatogglewriteenable;
  8211. }
  8212. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DMAReqMode(void)
  8213. {
  8214. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8215. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8216. tmp_value.all = value;
  8217. #if GH_USB_ENABLE_DEBUG_PRINT
  8218. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DMAReqMode] --> 0x%08x\n",
  8219. REG_USB_RXCSRH_R_HOST,value);
  8220. #endif
  8221. return tmp_value.bitc.dmareqmode;
  8222. }
  8223. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_PIDError(void)
  8224. {
  8225. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8226. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8227. tmp_value.all = value;
  8228. #if GH_USB_ENABLE_DEBUG_PRINT
  8229. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_PIDError] --> 0x%08x\n",
  8230. REG_USB_RXCSRH_R_HOST,value);
  8231. #endif
  8232. return tmp_value.bitc.piderror;
  8233. }
  8234. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_DMAReqEnab(void)
  8235. {
  8236. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8237. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8238. tmp_value.all = value;
  8239. #if GH_USB_ENABLE_DEBUG_PRINT
  8240. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_DMAReqEnab] --> 0x%08x\n",
  8241. REG_USB_RXCSRH_R_HOST,value);
  8242. #endif
  8243. return tmp_value.bitc.dmareqenab;
  8244. }
  8245. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_AutoReq(void)
  8246. {
  8247. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8248. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8249. tmp_value.all = value;
  8250. #if GH_USB_ENABLE_DEBUG_PRINT
  8251. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_AutoReq] --> 0x%08x\n",
  8252. REG_USB_RXCSRH_R_HOST,value);
  8253. #endif
  8254. return tmp_value.bitc.autoreq;
  8255. }
  8256. GH_INLINE U8 GH_USB_get_RXCSRH_R_HOST_AutoClear(void)
  8257. {
  8258. GH_USB_RXCSRH_R_HOST_S tmp_value;
  8259. U8 value = (*(volatile U8 *)REG_USB_RXCSRH_R_HOST);
  8260. tmp_value.all = value;
  8261. #if GH_USB_ENABLE_DEBUG_PRINT
  8262. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RXCSRH_R_HOST_AutoClear] --> 0x%08x\n",
  8263. REG_USB_RXCSRH_R_HOST,value);
  8264. #endif
  8265. return tmp_value.bitc.autoclear;
  8266. }
  8267. #endif /* GH_INLINE_LEVEL == 0 */
  8268. /*----------------------------------------------------------------------------*/
  8269. /* register USB_RXCSRL_W_HOST (write) */
  8270. /*----------------------------------------------------------------------------*/
  8271. #if GH_INLINE_LEVEL < 2
  8272. /*! \brief Writes the register 'USB_RXCSRL_W_HOST'. */
  8273. void GH_USB_set_RXCSRL_W_HOST(U8 data);
  8274. /*! \brief Reads the mirror variable of the register 'USB_RXCSRL_W_HOST'. */
  8275. U8 GH_USB_getm_RXCSRL_W_HOST(void);
  8276. /*! \brief Writes the bit group 'RxPktRdy' of register 'USB_RXCSRL_W_HOST'. */
  8277. void GH_USB_set_RXCSRL_W_HOST_RxPktRdy(U8 data);
  8278. /*! \brief Reads the bit group 'RxPktRdy' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  8279. U8 GH_USB_getm_RXCSRL_W_HOST_RxPktRdy(void);
  8280. /*! \brief Writes the bit group 'Error' of register 'USB_RXCSRL_W_HOST'. */
  8281. void GH_USB_set_RXCSRL_W_HOST_Error(U8 data);
  8282. /*! \brief Reads the bit group 'Error' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  8283. U8 GH_USB_getm_RXCSRL_W_HOST_Error(void);
  8284. /*! \brief Writes the bit group 'DataError_NAKTimeout' of register 'USB_RXCSRL_W_HOST'. */
  8285. void GH_USB_set_RXCSRL_W_HOST_DataError_NAKTimeout(U8 data);
  8286. /*! \brief Reads the bit group 'DataError_NAKTimeout' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  8287. U8 GH_USB_getm_RXCSRL_W_HOST_DataError_NAKTimeout(void);
  8288. /*! \brief Writes the bit group 'FlushFIFO' of register 'USB_RXCSRL_W_HOST'. */
  8289. void GH_USB_set_RXCSRL_W_HOST_FlushFIFO(U8 data);
  8290. /*! \brief Reads the bit group 'FlushFIFO' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  8291. U8 GH_USB_getm_RXCSRL_W_HOST_FlushFIFO(void);
  8292. /*! \brief Writes the bit group 'ReqPkt' of register 'USB_RXCSRL_W_HOST'. */
  8293. void GH_USB_set_RXCSRL_W_HOST_ReqPkt(U8 data);
  8294. /*! \brief Reads the bit group 'ReqPkt' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  8295. U8 GH_USB_getm_RXCSRL_W_HOST_ReqPkt(void);
  8296. /*! \brief Writes the bit group 'RxStall' of register 'USB_RXCSRL_W_HOST'. */
  8297. void GH_USB_set_RXCSRL_W_HOST_RxStall(U8 data);
  8298. /*! \brief Reads the bit group 'RxStall' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  8299. U8 GH_USB_getm_RXCSRL_W_HOST_RxStall(void);
  8300. /*! \brief Writes the bit group 'ClrDataTog' of register 'USB_RXCSRL_W_HOST'. */
  8301. void GH_USB_set_RXCSRL_W_HOST_ClrDataTog(U8 data);
  8302. /*! \brief Reads the bit group 'ClrDataTog' from the mirror variable of register 'USB_RXCSRL_W_HOST'. */
  8303. U8 GH_USB_getm_RXCSRL_W_HOST_ClrDataTog(void);
  8304. #else /* GH_INLINE_LEVEL < 2 */
  8305. GH_INLINE void GH_USB_set_RXCSRL_W_HOST(U8 data)
  8306. {
  8307. m_usb_rxcsrl_w_host.all = data;
  8308. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = data;
  8309. #if GH_USB_ENABLE_DEBUG_PRINT
  8310. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST] <-- 0x%08x\n",
  8311. REG_USB_RXCSRL_W_HOST,data,data);
  8312. #endif
  8313. }
  8314. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST(void)
  8315. {
  8316. #if GH_USB_ENABLE_DEBUG_PRINT
  8317. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST] --> 0x%08x\n",
  8318. m_usb_rxcsrl_w_host.all);
  8319. #endif
  8320. return m_usb_rxcsrl_w_host.all;
  8321. }
  8322. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_RxPktRdy(U8 data)
  8323. {
  8324. m_usb_rxcsrl_w_host.bitc.rxpktrdy = data;
  8325. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  8326. #if GH_USB_ENABLE_DEBUG_PRINT
  8327. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_RxPktRdy] <-- 0x%08x\n",
  8328. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  8329. #endif
  8330. }
  8331. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_RxPktRdy(void)
  8332. {
  8333. #if GH_USB_ENABLE_DEBUG_PRINT
  8334. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_RxPktRdy] --> 0x%08x\n",
  8335. m_usb_rxcsrl_w_host.bitc.rxpktrdy);
  8336. #endif
  8337. return m_usb_rxcsrl_w_host.bitc.rxpktrdy;
  8338. }
  8339. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_Error(U8 data)
  8340. {
  8341. m_usb_rxcsrl_w_host.bitc.error = data;
  8342. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  8343. #if GH_USB_ENABLE_DEBUG_PRINT
  8344. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_Error] <-- 0x%08x\n",
  8345. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  8346. #endif
  8347. }
  8348. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_Error(void)
  8349. {
  8350. #if GH_USB_ENABLE_DEBUG_PRINT
  8351. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_Error] --> 0x%08x\n",
  8352. m_usb_rxcsrl_w_host.bitc.error);
  8353. #endif
  8354. return m_usb_rxcsrl_w_host.bitc.error;
  8355. }
  8356. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_DataError_NAKTimeout(U8 data)
  8357. {
  8358. m_usb_rxcsrl_w_host.bitc.dataerror_naktimeout = data;
  8359. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  8360. #if GH_USB_ENABLE_DEBUG_PRINT
  8361. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_DataError_NAKTimeout] <-- 0x%08x\n",
  8362. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  8363. #endif
  8364. }
  8365. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_DataError_NAKTimeout(void)
  8366. {
  8367. #if GH_USB_ENABLE_DEBUG_PRINT
  8368. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_DataError_NAKTimeout] --> 0x%08x\n",
  8369. m_usb_rxcsrl_w_host.bitc.dataerror_naktimeout);
  8370. #endif
  8371. return m_usb_rxcsrl_w_host.bitc.dataerror_naktimeout;
  8372. }
  8373. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_FlushFIFO(U8 data)
  8374. {
  8375. m_usb_rxcsrl_w_host.bitc.flushfifo = data;
  8376. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  8377. #if GH_USB_ENABLE_DEBUG_PRINT
  8378. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_FlushFIFO] <-- 0x%08x\n",
  8379. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  8380. #endif
  8381. }
  8382. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_FlushFIFO(void)
  8383. {
  8384. #if GH_USB_ENABLE_DEBUG_PRINT
  8385. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_FlushFIFO] --> 0x%08x\n",
  8386. m_usb_rxcsrl_w_host.bitc.flushfifo);
  8387. #endif
  8388. return m_usb_rxcsrl_w_host.bitc.flushfifo;
  8389. }
  8390. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_ReqPkt(U8 data)
  8391. {
  8392. m_usb_rxcsrl_w_host.bitc.reqpkt = data;
  8393. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  8394. #if GH_USB_ENABLE_DEBUG_PRINT
  8395. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_ReqPkt] <-- 0x%08x\n",
  8396. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  8397. #endif
  8398. }
  8399. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_ReqPkt(void)
  8400. {
  8401. #if GH_USB_ENABLE_DEBUG_PRINT
  8402. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_ReqPkt] --> 0x%08x\n",
  8403. m_usb_rxcsrl_w_host.bitc.reqpkt);
  8404. #endif
  8405. return m_usb_rxcsrl_w_host.bitc.reqpkt;
  8406. }
  8407. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_RxStall(U8 data)
  8408. {
  8409. m_usb_rxcsrl_w_host.bitc.rxstall = data;
  8410. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  8411. #if GH_USB_ENABLE_DEBUG_PRINT
  8412. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_RxStall] <-- 0x%08x\n",
  8413. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  8414. #endif
  8415. }
  8416. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_RxStall(void)
  8417. {
  8418. #if GH_USB_ENABLE_DEBUG_PRINT
  8419. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_RxStall] --> 0x%08x\n",
  8420. m_usb_rxcsrl_w_host.bitc.rxstall);
  8421. #endif
  8422. return m_usb_rxcsrl_w_host.bitc.rxstall;
  8423. }
  8424. GH_INLINE void GH_USB_set_RXCSRL_W_HOST_ClrDataTog(U8 data)
  8425. {
  8426. m_usb_rxcsrl_w_host.bitc.clrdatatog = data;
  8427. *(volatile U8 *)REG_USB_RXCSRL_W_HOST = m_usb_rxcsrl_w_host.all;
  8428. #if GH_USB_ENABLE_DEBUG_PRINT
  8429. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRL_W_HOST_ClrDataTog] <-- 0x%08x\n",
  8430. REG_USB_RXCSRL_W_HOST,m_usb_rxcsrl_w_host.all,m_usb_rxcsrl_w_host.all);
  8431. #endif
  8432. }
  8433. GH_INLINE U8 GH_USB_getm_RXCSRL_W_HOST_ClrDataTog(void)
  8434. {
  8435. #if GH_USB_ENABLE_DEBUG_PRINT
  8436. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRL_W_HOST_ClrDataTog] --> 0x%08x\n",
  8437. m_usb_rxcsrl_w_host.bitc.clrdatatog);
  8438. #endif
  8439. return m_usb_rxcsrl_w_host.bitc.clrdatatog;
  8440. }
  8441. #endif /* GH_INLINE_LEVEL < 2 */
  8442. /*----------------------------------------------------------------------------*/
  8443. /* register USB_RXCSRH_W_HOST (write) */
  8444. /*----------------------------------------------------------------------------*/
  8445. #if GH_INLINE_LEVEL < 2
  8446. /*! \brief Writes the register 'USB_RXCSRH_W_HOST'. */
  8447. void GH_USB_set_RXCSRH_W_HOST(U8 data);
  8448. /*! \brief Reads the mirror variable of the register 'USB_RXCSRH_W_HOST'. */
  8449. U8 GH_USB_getm_RXCSRH_W_HOST(void);
  8450. /*! \brief Writes the bit group 'IncompRx' of register 'USB_RXCSRH_W_HOST'. */
  8451. void GH_USB_set_RXCSRH_W_HOST_IncompRx(U8 data);
  8452. /*! \brief Reads the bit group 'IncompRx' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  8453. U8 GH_USB_getm_RXCSRH_W_HOST_IncompRx(void);
  8454. /*! \brief Writes the bit group 'DMAReqMode' of register 'USB_RXCSRH_W_HOST'. */
  8455. void GH_USB_set_RXCSRH_W_HOST_DMAReqMode(U8 data);
  8456. /*! \brief Reads the bit group 'DMAReqMode' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  8457. U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqMode(void);
  8458. /*! \brief Writes the bit group 'DMAReqEnab' of register 'USB_RXCSRH_W_HOST'. */
  8459. void GH_USB_set_RXCSRH_W_HOST_DMAReqEnab(U8 data);
  8460. /*! \brief Reads the bit group 'DMAReqEnab' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  8461. U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqEnab(void);
  8462. /*! \brief Writes the bit group 'AutoReq' of register 'USB_RXCSRH_W_HOST'. */
  8463. void GH_USB_set_RXCSRH_W_HOST_AutoReq(U8 data);
  8464. /*! \brief Reads the bit group 'AutoReq' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  8465. U8 GH_USB_getm_RXCSRH_W_HOST_AutoReq(void);
  8466. /*! \brief Writes the bit group 'AutoClear' of register 'USB_RXCSRH_W_HOST'. */
  8467. void GH_USB_set_RXCSRH_W_HOST_AutoClear(U8 data);
  8468. /*! \brief Reads the bit group 'AutoClear' from the mirror variable of register 'USB_RXCSRH_W_HOST'. */
  8469. U8 GH_USB_getm_RXCSRH_W_HOST_AutoClear(void);
  8470. #else /* GH_INLINE_LEVEL < 2 */
  8471. GH_INLINE void GH_USB_set_RXCSRH_W_HOST(U8 data)
  8472. {
  8473. m_usb_rxcsrh_w_host.all = data;
  8474. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = data;
  8475. #if GH_USB_ENABLE_DEBUG_PRINT
  8476. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST] <-- 0x%08x\n",
  8477. REG_USB_RXCSRH_W_HOST,data,data);
  8478. #endif
  8479. }
  8480. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST(void)
  8481. {
  8482. #if GH_USB_ENABLE_DEBUG_PRINT
  8483. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST] --> 0x%08x\n",
  8484. m_usb_rxcsrh_w_host.all);
  8485. #endif
  8486. return m_usb_rxcsrh_w_host.all;
  8487. }
  8488. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_IncompRx(U8 data)
  8489. {
  8490. m_usb_rxcsrh_w_host.bitc.incomprx = data;
  8491. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  8492. #if GH_USB_ENABLE_DEBUG_PRINT
  8493. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_IncompRx] <-- 0x%08x\n",
  8494. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  8495. #endif
  8496. }
  8497. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_IncompRx(void)
  8498. {
  8499. #if GH_USB_ENABLE_DEBUG_PRINT
  8500. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_IncompRx] --> 0x%08x\n",
  8501. m_usb_rxcsrh_w_host.bitc.incomprx);
  8502. #endif
  8503. return m_usb_rxcsrh_w_host.bitc.incomprx;
  8504. }
  8505. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_DMAReqMode(U8 data)
  8506. {
  8507. m_usb_rxcsrh_w_host.bitc.dmareqmode = data;
  8508. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  8509. #if GH_USB_ENABLE_DEBUG_PRINT
  8510. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_DMAReqMode] <-- 0x%08x\n",
  8511. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  8512. #endif
  8513. }
  8514. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqMode(void)
  8515. {
  8516. #if GH_USB_ENABLE_DEBUG_PRINT
  8517. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_DMAReqMode] --> 0x%08x\n",
  8518. m_usb_rxcsrh_w_host.bitc.dmareqmode);
  8519. #endif
  8520. return m_usb_rxcsrh_w_host.bitc.dmareqmode;
  8521. }
  8522. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_DMAReqEnab(U8 data)
  8523. {
  8524. m_usb_rxcsrh_w_host.bitc.dmareqenab = data;
  8525. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  8526. #if GH_USB_ENABLE_DEBUG_PRINT
  8527. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_DMAReqEnab] <-- 0x%08x\n",
  8528. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  8529. #endif
  8530. }
  8531. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_DMAReqEnab(void)
  8532. {
  8533. #if GH_USB_ENABLE_DEBUG_PRINT
  8534. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_DMAReqEnab] --> 0x%08x\n",
  8535. m_usb_rxcsrh_w_host.bitc.dmareqenab);
  8536. #endif
  8537. return m_usb_rxcsrh_w_host.bitc.dmareqenab;
  8538. }
  8539. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_AutoReq(U8 data)
  8540. {
  8541. m_usb_rxcsrh_w_host.bitc.autoreq = data;
  8542. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  8543. #if GH_USB_ENABLE_DEBUG_PRINT
  8544. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_AutoReq] <-- 0x%08x\n",
  8545. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  8546. #endif
  8547. }
  8548. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_AutoReq(void)
  8549. {
  8550. #if GH_USB_ENABLE_DEBUG_PRINT
  8551. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_AutoReq] --> 0x%08x\n",
  8552. m_usb_rxcsrh_w_host.bitc.autoreq);
  8553. #endif
  8554. return m_usb_rxcsrh_w_host.bitc.autoreq;
  8555. }
  8556. GH_INLINE void GH_USB_set_RXCSRH_W_HOST_AutoClear(U8 data)
  8557. {
  8558. m_usb_rxcsrh_w_host.bitc.autoclear = data;
  8559. *(volatile U8 *)REG_USB_RXCSRH_W_HOST = m_usb_rxcsrh_w_host.all;
  8560. #if GH_USB_ENABLE_DEBUG_PRINT
  8561. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RXCSRH_W_HOST_AutoClear] <-- 0x%08x\n",
  8562. REG_USB_RXCSRH_W_HOST,m_usb_rxcsrh_w_host.all,m_usb_rxcsrh_w_host.all);
  8563. #endif
  8564. }
  8565. GH_INLINE U8 GH_USB_getm_RXCSRH_W_HOST_AutoClear(void)
  8566. {
  8567. #if GH_USB_ENABLE_DEBUG_PRINT
  8568. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_RXCSRH_W_HOST_AutoClear] --> 0x%08x\n",
  8569. m_usb_rxcsrh_w_host.bitc.autoclear);
  8570. #endif
  8571. return m_usb_rxcsrh_w_host.bitc.autoclear;
  8572. }
  8573. #endif /* GH_INLINE_LEVEL < 2 */
  8574. /*----------------------------------------------------------------------------*/
  8575. /* register USB_RxCount (read) */
  8576. /*----------------------------------------------------------------------------*/
  8577. #if GH_INLINE_LEVEL == 0
  8578. /*! \brief Reads the register 'USB_RxCount'. */
  8579. U16 GH_USB_get_RxCount(void);
  8580. /*! \brief Reads the bit group 'EndpointRxCount' of register 'USB_RxCount'. */
  8581. U16 GH_USB_get_RxCount_EndpointRxCount(void);
  8582. #else /* GH_INLINE_LEVEL == 0 */
  8583. GH_INLINE U16 GH_USB_get_RxCount(void)
  8584. {
  8585. U16 value = (*(volatile U16 *)REG_USB_RXCOUNT);
  8586. #if GH_USB_ENABLE_DEBUG_PRINT
  8587. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxCount] --> 0x%08x\n",
  8588. REG_USB_RXCOUNT,value);
  8589. #endif
  8590. return value;
  8591. }
  8592. GH_INLINE U16 GH_USB_get_RxCount_EndpointRxCount(void)
  8593. {
  8594. GH_USB_RXCOUNT_S tmp_value;
  8595. U16 value = (*(volatile U16 *)REG_USB_RXCOUNT);
  8596. tmp_value.all = value;
  8597. #if GH_USB_ENABLE_DEBUG_PRINT
  8598. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxCount_EndpointRxCount] --> 0x%08x\n",
  8599. REG_USB_RXCOUNT,value);
  8600. #endif
  8601. return tmp_value.bitc.endpointrxcount;
  8602. }
  8603. #endif /* GH_INLINE_LEVEL == 0 */
  8604. /*----------------------------------------------------------------------------*/
  8605. /* register USB_TxType_HOST (read/write) */
  8606. /*----------------------------------------------------------------------------*/
  8607. #if GH_INLINE_LEVEL == 0
  8608. /*! \brief Writes the register 'USB_TxType_HOST'. */
  8609. void GH_USB_set_TxType_HOST(U8 data);
  8610. /*! \brief Reads the register 'USB_TxType_HOST'. */
  8611. U8 GH_USB_get_TxType_HOST(void);
  8612. /*! \brief Writes the bit group 'TargetEndpointNumber' of register 'USB_TxType_HOST'. */
  8613. void GH_USB_set_TxType_HOST_TargetEndpointNumber(U8 data);
  8614. /*! \brief Reads the bit group 'TargetEndpointNumber' of register 'USB_TxType_HOST'. */
  8615. U8 GH_USB_get_TxType_HOST_TargetEndpointNumber(void);
  8616. /*! \brief Writes the bit group 'Protocol' of register 'USB_TxType_HOST'. */
  8617. void GH_USB_set_TxType_HOST_Protocol(U8 data);
  8618. /*! \brief Reads the bit group 'Protocol' of register 'USB_TxType_HOST'. */
  8619. U8 GH_USB_get_TxType_HOST_Protocol(void);
  8620. /*! \brief Writes the bit group 'Speed' of register 'USB_TxType_HOST'. */
  8621. void GH_USB_set_TxType_HOST_Speed(U8 data);
  8622. /*! \brief Reads the bit group 'Speed' of register 'USB_TxType_HOST'. */
  8623. U8 GH_USB_get_TxType_HOST_Speed(void);
  8624. #else /* GH_INLINE_LEVEL == 0 */
  8625. GH_INLINE void GH_USB_set_TxType_HOST(U8 data)
  8626. {
  8627. *(volatile U8 *)REG_USB_TXTYPE_HOST = data;
  8628. #if GH_USB_ENABLE_DEBUG_PRINT
  8629. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST] <-- 0x%08x\n",
  8630. REG_USB_TXTYPE_HOST,data,data);
  8631. #endif
  8632. }
  8633. GH_INLINE U8 GH_USB_get_TxType_HOST(void)
  8634. {
  8635. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  8636. #if GH_USB_ENABLE_DEBUG_PRINT
  8637. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST] --> 0x%08x\n",
  8638. REG_USB_TXTYPE_HOST,value);
  8639. #endif
  8640. return value;
  8641. }
  8642. GH_INLINE void GH_USB_set_TxType_HOST_TargetEndpointNumber(U8 data)
  8643. {
  8644. GH_USB_TXTYPE_HOST_S d;
  8645. d.all = *(volatile U8 *)REG_USB_TXTYPE_HOST;
  8646. d.bitc.targetendpointnumber = data;
  8647. *(volatile U8 *)REG_USB_TXTYPE_HOST = d.all;
  8648. #if GH_USB_ENABLE_DEBUG_PRINT
  8649. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST_TargetEndpointNumber] <-- 0x%08x\n",
  8650. REG_USB_TXTYPE_HOST,d.all,d.all);
  8651. #endif
  8652. }
  8653. GH_INLINE U8 GH_USB_get_TxType_HOST_TargetEndpointNumber(void)
  8654. {
  8655. GH_USB_TXTYPE_HOST_S tmp_value;
  8656. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  8657. tmp_value.all = value;
  8658. #if GH_USB_ENABLE_DEBUG_PRINT
  8659. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST_TargetEndpointNumber] --> 0x%08x\n",
  8660. REG_USB_TXTYPE_HOST,value);
  8661. #endif
  8662. return tmp_value.bitc.targetendpointnumber;
  8663. }
  8664. GH_INLINE void GH_USB_set_TxType_HOST_Protocol(U8 data)
  8665. {
  8666. GH_USB_TXTYPE_HOST_S d;
  8667. d.all = *(volatile U8 *)REG_USB_TXTYPE_HOST;
  8668. d.bitc.protocol = data;
  8669. *(volatile U8 *)REG_USB_TXTYPE_HOST = d.all;
  8670. #if GH_USB_ENABLE_DEBUG_PRINT
  8671. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST_Protocol] <-- 0x%08x\n",
  8672. REG_USB_TXTYPE_HOST,d.all,d.all);
  8673. #endif
  8674. }
  8675. GH_INLINE U8 GH_USB_get_TxType_HOST_Protocol(void)
  8676. {
  8677. GH_USB_TXTYPE_HOST_S tmp_value;
  8678. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  8679. tmp_value.all = value;
  8680. #if GH_USB_ENABLE_DEBUG_PRINT
  8681. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST_Protocol] --> 0x%08x\n",
  8682. REG_USB_TXTYPE_HOST,value);
  8683. #endif
  8684. return tmp_value.bitc.protocol;
  8685. }
  8686. GH_INLINE void GH_USB_set_TxType_HOST_Speed(U8 data)
  8687. {
  8688. GH_USB_TXTYPE_HOST_S d;
  8689. d.all = *(volatile U8 *)REG_USB_TXTYPE_HOST;
  8690. d.bitc.speed = data;
  8691. *(volatile U8 *)REG_USB_TXTYPE_HOST = d.all;
  8692. #if GH_USB_ENABLE_DEBUG_PRINT
  8693. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxType_HOST_Speed] <-- 0x%08x\n",
  8694. REG_USB_TXTYPE_HOST,d.all,d.all);
  8695. #endif
  8696. }
  8697. GH_INLINE U8 GH_USB_get_TxType_HOST_Speed(void)
  8698. {
  8699. GH_USB_TXTYPE_HOST_S tmp_value;
  8700. U8 value = (*(volatile U8 *)REG_USB_TXTYPE_HOST);
  8701. tmp_value.all = value;
  8702. #if GH_USB_ENABLE_DEBUG_PRINT
  8703. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxType_HOST_Speed] --> 0x%08x\n",
  8704. REG_USB_TXTYPE_HOST,value);
  8705. #endif
  8706. return tmp_value.bitc.speed;
  8707. }
  8708. #endif /* GH_INLINE_LEVEL == 0 */
  8709. /*----------------------------------------------------------------------------*/
  8710. /* register USB_TxInterval_HOST (read/write) */
  8711. /*----------------------------------------------------------------------------*/
  8712. #if GH_INLINE_LEVEL == 0
  8713. /*! \brief Writes the register 'USB_TxInterval_HOST'. */
  8714. void GH_USB_set_TxInterval_HOST(U8 data);
  8715. /*! \brief Reads the register 'USB_TxInterval_HOST'. */
  8716. U8 GH_USB_get_TxInterval_HOST(void);
  8717. /*! \brief Writes the bit group 'TxPollingInterval_NAKLimit' of register 'USB_TxInterval_HOST'. */
  8718. void GH_USB_set_TxInterval_HOST_TxPollingInterval_NAKLimit(U8 data);
  8719. /*! \brief Reads the bit group 'TxPollingInterval_NAKLimit' of register 'USB_TxInterval_HOST'. */
  8720. U8 GH_USB_get_TxInterval_HOST_TxPollingInterval_NAKLimit(void);
  8721. #else /* GH_INLINE_LEVEL == 0 */
  8722. GH_INLINE void GH_USB_set_TxInterval_HOST(U8 data)
  8723. {
  8724. *(volatile U8 *)REG_USB_TXINTERVAL_HOST = data;
  8725. #if GH_USB_ENABLE_DEBUG_PRINT
  8726. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxInterval_HOST] <-- 0x%08x\n",
  8727. REG_USB_TXINTERVAL_HOST,data,data);
  8728. #endif
  8729. }
  8730. GH_INLINE U8 GH_USB_get_TxInterval_HOST(void)
  8731. {
  8732. U8 value = (*(volatile U8 *)REG_USB_TXINTERVAL_HOST);
  8733. #if GH_USB_ENABLE_DEBUG_PRINT
  8734. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxInterval_HOST] --> 0x%08x\n",
  8735. REG_USB_TXINTERVAL_HOST,value);
  8736. #endif
  8737. return value;
  8738. }
  8739. GH_INLINE void GH_USB_set_TxInterval_HOST_TxPollingInterval_NAKLimit(U8 data)
  8740. {
  8741. GH_USB_TXINTERVAL_HOST_S d;
  8742. d.all = *(volatile U8 *)REG_USB_TXINTERVAL_HOST;
  8743. d.bitc.txpollinginterval_naklimit = data;
  8744. *(volatile U8 *)REG_USB_TXINTERVAL_HOST = d.all;
  8745. #if GH_USB_ENABLE_DEBUG_PRINT
  8746. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxInterval_HOST_TxPollingInterval_NAKLimit] <-- 0x%08x\n",
  8747. REG_USB_TXINTERVAL_HOST,d.all,d.all);
  8748. #endif
  8749. }
  8750. GH_INLINE U8 GH_USB_get_TxInterval_HOST_TxPollingInterval_NAKLimit(void)
  8751. {
  8752. GH_USB_TXINTERVAL_HOST_S tmp_value;
  8753. U8 value = (*(volatile U8 *)REG_USB_TXINTERVAL_HOST);
  8754. tmp_value.all = value;
  8755. #if GH_USB_ENABLE_DEBUG_PRINT
  8756. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxInterval_HOST_TxPollingInterval_NAKLimit] --> 0x%08x\n",
  8757. REG_USB_TXINTERVAL_HOST,value);
  8758. #endif
  8759. return tmp_value.bitc.txpollinginterval_naklimit;
  8760. }
  8761. #endif /* GH_INLINE_LEVEL == 0 */
  8762. /*----------------------------------------------------------------------------*/
  8763. /* register USB_RxType_HOST (read/write) */
  8764. /*----------------------------------------------------------------------------*/
  8765. #if GH_INLINE_LEVEL == 0
  8766. /*! \brief Writes the register 'USB_RxType_HOST'. */
  8767. void GH_USB_set_RxType_HOST(U8 data);
  8768. /*! \brief Reads the register 'USB_RxType_HOST'. */
  8769. U8 GH_USB_get_RxType_HOST(void);
  8770. /*! \brief Writes the bit group 'TargetEndpointNumber' of register 'USB_RxType_HOST'. */
  8771. void GH_USB_set_RxType_HOST_TargetEndpointNumber(U8 data);
  8772. /*! \brief Reads the bit group 'TargetEndpointNumber' of register 'USB_RxType_HOST'. */
  8773. U8 GH_USB_get_RxType_HOST_TargetEndpointNumber(void);
  8774. /*! \brief Writes the bit group 'Protocol' of register 'USB_RxType_HOST'. */
  8775. void GH_USB_set_RxType_HOST_Protocol(U8 data);
  8776. /*! \brief Reads the bit group 'Protocol' of register 'USB_RxType_HOST'. */
  8777. U8 GH_USB_get_RxType_HOST_Protocol(void);
  8778. /*! \brief Writes the bit group 'Speed' of register 'USB_RxType_HOST'. */
  8779. void GH_USB_set_RxType_HOST_Speed(U8 data);
  8780. /*! \brief Reads the bit group 'Speed' of register 'USB_RxType_HOST'. */
  8781. U8 GH_USB_get_RxType_HOST_Speed(void);
  8782. #else /* GH_INLINE_LEVEL == 0 */
  8783. GH_INLINE void GH_USB_set_RxType_HOST(U8 data)
  8784. {
  8785. *(volatile U8 *)REG_USB_RXTYPE_HOST = data;
  8786. #if GH_USB_ENABLE_DEBUG_PRINT
  8787. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST] <-- 0x%08x\n",
  8788. REG_USB_RXTYPE_HOST,data,data);
  8789. #endif
  8790. }
  8791. GH_INLINE U8 GH_USB_get_RxType_HOST(void)
  8792. {
  8793. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  8794. #if GH_USB_ENABLE_DEBUG_PRINT
  8795. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST] --> 0x%08x\n",
  8796. REG_USB_RXTYPE_HOST,value);
  8797. #endif
  8798. return value;
  8799. }
  8800. GH_INLINE void GH_USB_set_RxType_HOST_TargetEndpointNumber(U8 data)
  8801. {
  8802. GH_USB_RXTYPE_HOST_S d;
  8803. d.all = *(volatile U8 *)REG_USB_RXTYPE_HOST;
  8804. d.bitc.targetendpointnumber = data;
  8805. *(volatile U8 *)REG_USB_RXTYPE_HOST = d.all;
  8806. #if GH_USB_ENABLE_DEBUG_PRINT
  8807. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST_TargetEndpointNumber] <-- 0x%08x\n",
  8808. REG_USB_RXTYPE_HOST,d.all,d.all);
  8809. #endif
  8810. }
  8811. GH_INLINE U8 GH_USB_get_RxType_HOST_TargetEndpointNumber(void)
  8812. {
  8813. GH_USB_RXTYPE_HOST_S tmp_value;
  8814. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  8815. tmp_value.all = value;
  8816. #if GH_USB_ENABLE_DEBUG_PRINT
  8817. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST_TargetEndpointNumber] --> 0x%08x\n",
  8818. REG_USB_RXTYPE_HOST,value);
  8819. #endif
  8820. return tmp_value.bitc.targetendpointnumber;
  8821. }
  8822. GH_INLINE void GH_USB_set_RxType_HOST_Protocol(U8 data)
  8823. {
  8824. GH_USB_RXTYPE_HOST_S d;
  8825. d.all = *(volatile U8 *)REG_USB_RXTYPE_HOST;
  8826. d.bitc.protocol = data;
  8827. *(volatile U8 *)REG_USB_RXTYPE_HOST = d.all;
  8828. #if GH_USB_ENABLE_DEBUG_PRINT
  8829. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST_Protocol] <-- 0x%08x\n",
  8830. REG_USB_RXTYPE_HOST,d.all,d.all);
  8831. #endif
  8832. }
  8833. GH_INLINE U8 GH_USB_get_RxType_HOST_Protocol(void)
  8834. {
  8835. GH_USB_RXTYPE_HOST_S tmp_value;
  8836. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  8837. tmp_value.all = value;
  8838. #if GH_USB_ENABLE_DEBUG_PRINT
  8839. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST_Protocol] --> 0x%08x\n",
  8840. REG_USB_RXTYPE_HOST,value);
  8841. #endif
  8842. return tmp_value.bitc.protocol;
  8843. }
  8844. GH_INLINE void GH_USB_set_RxType_HOST_Speed(U8 data)
  8845. {
  8846. GH_USB_RXTYPE_HOST_S d;
  8847. d.all = *(volatile U8 *)REG_USB_RXTYPE_HOST;
  8848. d.bitc.speed = data;
  8849. *(volatile U8 *)REG_USB_RXTYPE_HOST = d.all;
  8850. #if GH_USB_ENABLE_DEBUG_PRINT
  8851. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxType_HOST_Speed] <-- 0x%08x\n",
  8852. REG_USB_RXTYPE_HOST,d.all,d.all);
  8853. #endif
  8854. }
  8855. GH_INLINE U8 GH_USB_get_RxType_HOST_Speed(void)
  8856. {
  8857. GH_USB_RXTYPE_HOST_S tmp_value;
  8858. U8 value = (*(volatile U8 *)REG_USB_RXTYPE_HOST);
  8859. tmp_value.all = value;
  8860. #if GH_USB_ENABLE_DEBUG_PRINT
  8861. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxType_HOST_Speed] --> 0x%08x\n",
  8862. REG_USB_RXTYPE_HOST,value);
  8863. #endif
  8864. return tmp_value.bitc.speed;
  8865. }
  8866. #endif /* GH_INLINE_LEVEL == 0 */
  8867. /*----------------------------------------------------------------------------*/
  8868. /* register USB_RxInterval_HOST (read/write) */
  8869. /*----------------------------------------------------------------------------*/
  8870. #if GH_INLINE_LEVEL == 0
  8871. /*! \brief Writes the register 'USB_RxInterval_HOST'. */
  8872. void GH_USB_set_RxInterval_HOST(U8 data);
  8873. /*! \brief Reads the register 'USB_RxInterval_HOST'. */
  8874. U8 GH_USB_get_RxInterval_HOST(void);
  8875. /*! \brief Writes the bit group 'RxPollingInterval_NAKLimit' of register 'USB_RxInterval_HOST'. */
  8876. void GH_USB_set_RxInterval_HOST_RxPollingInterval_NAKLimit(U8 data);
  8877. /*! \brief Reads the bit group 'RxPollingInterval_NAKLimit' of register 'USB_RxInterval_HOST'. */
  8878. U8 GH_USB_get_RxInterval_HOST_RxPollingInterval_NAKLimit(void);
  8879. #else /* GH_INLINE_LEVEL == 0 */
  8880. GH_INLINE void GH_USB_set_RxInterval_HOST(U8 data)
  8881. {
  8882. *(volatile U8 *)REG_USB_RXINTERVAL_HOST = data;
  8883. #if GH_USB_ENABLE_DEBUG_PRINT
  8884. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxInterval_HOST] <-- 0x%08x\n",
  8885. REG_USB_RXINTERVAL_HOST,data,data);
  8886. #endif
  8887. }
  8888. GH_INLINE U8 GH_USB_get_RxInterval_HOST(void)
  8889. {
  8890. U8 value = (*(volatile U8 *)REG_USB_RXINTERVAL_HOST);
  8891. #if GH_USB_ENABLE_DEBUG_PRINT
  8892. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxInterval_HOST] --> 0x%08x\n",
  8893. REG_USB_RXINTERVAL_HOST,value);
  8894. #endif
  8895. return value;
  8896. }
  8897. GH_INLINE void GH_USB_set_RxInterval_HOST_RxPollingInterval_NAKLimit(U8 data)
  8898. {
  8899. GH_USB_RXINTERVAL_HOST_S d;
  8900. d.all = *(volatile U8 *)REG_USB_RXINTERVAL_HOST;
  8901. d.bitc.rxpollinginterval_naklimit = data;
  8902. *(volatile U8 *)REG_USB_RXINTERVAL_HOST = d.all;
  8903. #if GH_USB_ENABLE_DEBUG_PRINT
  8904. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxInterval_HOST_RxPollingInterval_NAKLimit] <-- 0x%08x\n",
  8905. REG_USB_RXINTERVAL_HOST,d.all,d.all);
  8906. #endif
  8907. }
  8908. GH_INLINE U8 GH_USB_get_RxInterval_HOST_RxPollingInterval_NAKLimit(void)
  8909. {
  8910. GH_USB_RXINTERVAL_HOST_S tmp_value;
  8911. U8 value = (*(volatile U8 *)REG_USB_RXINTERVAL_HOST);
  8912. tmp_value.all = value;
  8913. #if GH_USB_ENABLE_DEBUG_PRINT
  8914. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxInterval_HOST_RxPollingInterval_NAKLimit] --> 0x%08x\n",
  8915. REG_USB_RXINTERVAL_HOST,value);
  8916. #endif
  8917. return tmp_value.bitc.rxpollinginterval_naklimit;
  8918. }
  8919. #endif /* GH_INLINE_LEVEL == 0 */
  8920. /*----------------------------------------------------------------------------*/
  8921. /* register USB_FIFOSize (read) */
  8922. /*----------------------------------------------------------------------------*/
  8923. #if GH_INLINE_LEVEL == 0
  8924. /*! \brief Reads the register 'USB_FIFOSize'. */
  8925. U8 GH_USB_get_FIFOSize(void);
  8926. /*! \brief Reads the bit group 'TxFIFOSize' of register 'USB_FIFOSize'. */
  8927. U8 GH_USB_get_FIFOSize_TxFIFOSize(void);
  8928. /*! \brief Reads the bit group 'RxFIFOSize' of register 'USB_FIFOSize'. */
  8929. U8 GH_USB_get_FIFOSize_RxFIFOSize(void);
  8930. #else /* GH_INLINE_LEVEL == 0 */
  8931. GH_INLINE U8 GH_USB_get_FIFOSize(void)
  8932. {
  8933. U8 value = (*(volatile U8 *)REG_USB_FIFOSIZE);
  8934. #if GH_USB_ENABLE_DEBUG_PRINT
  8935. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOSize] --> 0x%08x\n",
  8936. REG_USB_FIFOSIZE,value);
  8937. #endif
  8938. return value;
  8939. }
  8940. GH_INLINE U8 GH_USB_get_FIFOSize_TxFIFOSize(void)
  8941. {
  8942. GH_USB_FIFOSIZE_S tmp_value;
  8943. U8 value = (*(volatile U8 *)REG_USB_FIFOSIZE);
  8944. tmp_value.all = value;
  8945. #if GH_USB_ENABLE_DEBUG_PRINT
  8946. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOSize_TxFIFOSize] --> 0x%08x\n",
  8947. REG_USB_FIFOSIZE,value);
  8948. #endif
  8949. return tmp_value.bitc.txfifosize;
  8950. }
  8951. GH_INLINE U8 GH_USB_get_FIFOSize_RxFIFOSize(void)
  8952. {
  8953. GH_USB_FIFOSIZE_S tmp_value;
  8954. U8 value = (*(volatile U8 *)REG_USB_FIFOSIZE);
  8955. tmp_value.all = value;
  8956. #if GH_USB_ENABLE_DEBUG_PRINT
  8957. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOSize_RxFIFOSize] --> 0x%08x\n",
  8958. REG_USB_FIFOSIZE,value);
  8959. #endif
  8960. return tmp_value.bitc.rxfifosize;
  8961. }
  8962. #endif /* GH_INLINE_LEVEL == 0 */
  8963. /*----------------------------------------------------------------------------*/
  8964. /* register USB_FIFOs (read/write) */
  8965. /*----------------------------------------------------------------------------*/
  8966. #if GH_INLINE_LEVEL == 0
  8967. /*! \brief Writes the register 'USB_FIFOs'. */
  8968. void GH_USB_set_FIFOs(U8 index, U8 data);
  8969. /*! \brief Reads the register 'USB_FIFOs'. */
  8970. U8 GH_USB_get_FIFOs(U8 index);
  8971. #else /* GH_INLINE_LEVEL == 0 */
  8972. GH_INLINE void GH_USB_set_FIFOs(U8 index, U8 data)
  8973. {
  8974. *(volatile U8 *)(REG_USB_FIFOS + index * FIO_MOFFSET(USB,0x00000040)) = data;
  8975. #if GH_USB_ENABLE_DEBUG_PRINT
  8976. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FIFOs] <-- 0x%08x\n",
  8977. (REG_USB_FIFOS + index * FIO_MOFFSET(USB,0x00000040)),data,data);
  8978. #endif
  8979. }
  8980. GH_INLINE U8 GH_USB_get_FIFOs(U8 index)
  8981. {
  8982. U8 value = (*(volatile U8 *)(REG_USB_FIFOS + index * FIO_MOFFSET(USB,0x00000040)));
  8983. #if GH_USB_ENABLE_DEBUG_PRINT
  8984. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOs] --> 0x%08x\n",
  8985. (REG_USB_FIFOS + index * FIO_MOFFSET(USB,0x00000040)),value);
  8986. #endif
  8987. return value;
  8988. }
  8989. #endif /* GH_INLINE_LEVEL == 0 */
  8990. /*----------------------------------------------------------------------------*/
  8991. /* register USB_FIFOs_U32 (read/write) */
  8992. /*----------------------------------------------------------------------------*/
  8993. #if GH_INLINE_LEVEL == 0
  8994. /*! \brief Writes the register 'USB_FIFOs_U32'. */
  8995. void GH_USB_set_FIFOs_U32(U8 index, U32 data);
  8996. /*! \brief Reads the register 'USB_FIFOs_U32'. */
  8997. U32 GH_USB_get_FIFOs_U32(U8 index);
  8998. #else /* GH_INLINE_LEVEL == 0 */
  8999. GH_INLINE void GH_USB_set_FIFOs_U32(U8 index, U32 data)
  9000. {
  9001. *(volatile U32 *)(REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,0x00000040)) = data;
  9002. #if GH_USB_ENABLE_DEBUG_PRINT
  9003. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FIFOs_U32] <-- 0x%08x\n",
  9004. (REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,0x00000040)),data,data);
  9005. #endif
  9006. }
  9007. GH_INLINE U32 GH_USB_get_FIFOs_U32(U8 index)
  9008. {
  9009. U32 value = (*(volatile U32 *)(REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,0x00000040)));
  9010. #if GH_USB_ENABLE_DEBUG_PRINT
  9011. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FIFOs_U32] --> 0x%08x\n",
  9012. (REG_USB_FIFOS_U32 + index * FIO_MOFFSET(USB,0x00000040)),value);
  9013. #endif
  9014. return value;
  9015. }
  9016. #endif /* GH_INLINE_LEVEL == 0 */
  9017. /*----------------------------------------------------------------------------*/
  9018. /* register USB_DevCtl_R (read) */
  9019. /*----------------------------------------------------------------------------*/
  9020. #if GH_INLINE_LEVEL == 0
  9021. /*! \brief Reads the register 'USB_DevCtl_R'. */
  9022. U8 GH_USB_get_DevCtl_R(void);
  9023. /*! \brief Reads the bit group 'Session' of register 'USB_DevCtl_R'. */
  9024. U8 GH_USB_get_DevCtl_R_Session(void);
  9025. /*! \brief Reads the bit group 'Host_Req' of register 'USB_DevCtl_R'. */
  9026. U8 GH_USB_get_DevCtl_R_Host_Req(void);
  9027. /*! \brief Reads the bit group 'Host_Mode' of register 'USB_DevCtl_R'. */
  9028. U8 GH_USB_get_DevCtl_R_Host_Mode(void);
  9029. /*! \brief Reads the bit group 'VBus' of register 'USB_DevCtl_R'. */
  9030. U8 GH_USB_get_DevCtl_R_VBus(void);
  9031. /*! \brief Reads the bit group 'LSDev' of register 'USB_DevCtl_R'. */
  9032. U8 GH_USB_get_DevCtl_R_LSDev(void);
  9033. /*! \brief Reads the bit group 'FSDev' of register 'USB_DevCtl_R'. */
  9034. U8 GH_USB_get_DevCtl_R_FSDev(void);
  9035. /*! \brief Reads the bit group 'B_Device' of register 'USB_DevCtl_R'. */
  9036. U8 GH_USB_get_DevCtl_R_B_Device(void);
  9037. #else /* GH_INLINE_LEVEL == 0 */
  9038. GH_INLINE U8 GH_USB_get_DevCtl_R(void)
  9039. {
  9040. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9041. #if GH_USB_ENABLE_DEBUG_PRINT
  9042. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R] --> 0x%08x\n",
  9043. REG_USB_DEVCTL_R,value);
  9044. #endif
  9045. return value;
  9046. }
  9047. GH_INLINE U8 GH_USB_get_DevCtl_R_Session(void)
  9048. {
  9049. GH_USB_DEVCTL_R_S tmp_value;
  9050. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9051. tmp_value.all = value;
  9052. #if GH_USB_ENABLE_DEBUG_PRINT
  9053. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_Session] --> 0x%08x\n",
  9054. REG_USB_DEVCTL_R,value);
  9055. #endif
  9056. return tmp_value.bitc.session;
  9057. }
  9058. GH_INLINE U8 GH_USB_get_DevCtl_R_Host_Req(void)
  9059. {
  9060. GH_USB_DEVCTL_R_S tmp_value;
  9061. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9062. tmp_value.all = value;
  9063. #if GH_USB_ENABLE_DEBUG_PRINT
  9064. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_Host_Req] --> 0x%08x\n",
  9065. REG_USB_DEVCTL_R,value);
  9066. #endif
  9067. return tmp_value.bitc.host_req;
  9068. }
  9069. GH_INLINE U8 GH_USB_get_DevCtl_R_Host_Mode(void)
  9070. {
  9071. GH_USB_DEVCTL_R_S tmp_value;
  9072. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9073. tmp_value.all = value;
  9074. #if GH_USB_ENABLE_DEBUG_PRINT
  9075. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_Host_Mode] --> 0x%08x\n",
  9076. REG_USB_DEVCTL_R,value);
  9077. #endif
  9078. return tmp_value.bitc.host_mode;
  9079. }
  9080. GH_INLINE U8 GH_USB_get_DevCtl_R_VBus(void)
  9081. {
  9082. GH_USB_DEVCTL_R_S tmp_value;
  9083. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9084. tmp_value.all = value;
  9085. #if GH_USB_ENABLE_DEBUG_PRINT
  9086. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_VBus] --> 0x%08x\n",
  9087. REG_USB_DEVCTL_R,value);
  9088. #endif
  9089. return tmp_value.bitc.vbus;
  9090. }
  9091. GH_INLINE U8 GH_USB_get_DevCtl_R_LSDev(void)
  9092. {
  9093. GH_USB_DEVCTL_R_S tmp_value;
  9094. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9095. tmp_value.all = value;
  9096. #if GH_USB_ENABLE_DEBUG_PRINT
  9097. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_LSDev] --> 0x%08x\n",
  9098. REG_USB_DEVCTL_R,value);
  9099. #endif
  9100. return tmp_value.bitc.lsdev;
  9101. }
  9102. GH_INLINE U8 GH_USB_get_DevCtl_R_FSDev(void)
  9103. {
  9104. GH_USB_DEVCTL_R_S tmp_value;
  9105. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9106. tmp_value.all = value;
  9107. #if GH_USB_ENABLE_DEBUG_PRINT
  9108. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_FSDev] --> 0x%08x\n",
  9109. REG_USB_DEVCTL_R,value);
  9110. #endif
  9111. return tmp_value.bitc.fsdev;
  9112. }
  9113. GH_INLINE U8 GH_USB_get_DevCtl_R_B_Device(void)
  9114. {
  9115. GH_USB_DEVCTL_R_S tmp_value;
  9116. U8 value = (*(volatile U8 *)REG_USB_DEVCTL_R);
  9117. tmp_value.all = value;
  9118. #if GH_USB_ENABLE_DEBUG_PRINT
  9119. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DevCtl_R_B_Device] --> 0x%08x\n",
  9120. REG_USB_DEVCTL_R,value);
  9121. #endif
  9122. return tmp_value.bitc.b_device;
  9123. }
  9124. #endif /* GH_INLINE_LEVEL == 0 */
  9125. /*----------------------------------------------------------------------------*/
  9126. /* register USB_DevCtl_W (write) */
  9127. /*----------------------------------------------------------------------------*/
  9128. #if GH_INLINE_LEVEL < 2
  9129. /*! \brief Writes the register 'USB_DevCtl_W'. */
  9130. void GH_USB_set_DevCtl_W(U8 data);
  9131. /*! \brief Reads the mirror variable of the register 'USB_DevCtl_W'. */
  9132. U8 GH_USB_getm_DevCtl_W(void);
  9133. /*! \brief Writes the bit group 'Session' of register 'USB_DevCtl_W'. */
  9134. void GH_USB_set_DevCtl_W_Session(U8 data);
  9135. /*! \brief Reads the bit group 'Session' from the mirror variable of register 'USB_DevCtl_W'. */
  9136. U8 GH_USB_getm_DevCtl_W_Session(void);
  9137. /*! \brief Writes the bit group 'Host_Req' of register 'USB_DevCtl_W'. */
  9138. void GH_USB_set_DevCtl_W_Host_Req(U8 data);
  9139. /*! \brief Reads the bit group 'Host_Req' from the mirror variable of register 'USB_DevCtl_W'. */
  9140. U8 GH_USB_getm_DevCtl_W_Host_Req(void);
  9141. #else /* GH_INLINE_LEVEL < 2 */
  9142. GH_INLINE void GH_USB_set_DevCtl_W(U8 data)
  9143. {
  9144. m_usb_devctl_w.all = data;
  9145. *(volatile U8 *)REG_USB_DEVCTL_W = data;
  9146. #if GH_USB_ENABLE_DEBUG_PRINT
  9147. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DevCtl_W] <-- 0x%08x\n",
  9148. REG_USB_DEVCTL_W,data,data);
  9149. #endif
  9150. }
  9151. GH_INLINE U8 GH_USB_getm_DevCtl_W(void)
  9152. {
  9153. #if GH_USB_ENABLE_DEBUG_PRINT
  9154. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_DevCtl_W] --> 0x%08x\n",
  9155. m_usb_devctl_w.all);
  9156. #endif
  9157. return m_usb_devctl_w.all;
  9158. }
  9159. GH_INLINE void GH_USB_set_DevCtl_W_Session(U8 data)
  9160. {
  9161. m_usb_devctl_w.bitc.session = data;
  9162. *(volatile U8 *)REG_USB_DEVCTL_W = m_usb_devctl_w.all;
  9163. #if GH_USB_ENABLE_DEBUG_PRINT
  9164. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DevCtl_W_Session] <-- 0x%08x\n",
  9165. REG_USB_DEVCTL_W,m_usb_devctl_w.all,m_usb_devctl_w.all);
  9166. #endif
  9167. }
  9168. GH_INLINE U8 GH_USB_getm_DevCtl_W_Session(void)
  9169. {
  9170. #if GH_USB_ENABLE_DEBUG_PRINT
  9171. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_DevCtl_W_Session] --> 0x%08x\n",
  9172. m_usb_devctl_w.bitc.session);
  9173. #endif
  9174. return m_usb_devctl_w.bitc.session;
  9175. }
  9176. GH_INLINE void GH_USB_set_DevCtl_W_Host_Req(U8 data)
  9177. {
  9178. m_usb_devctl_w.bitc.host_req = data;
  9179. *(volatile U8 *)REG_USB_DEVCTL_W = m_usb_devctl_w.all;
  9180. #if GH_USB_ENABLE_DEBUG_PRINT
  9181. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DevCtl_W_Host_Req] <-- 0x%08x\n",
  9182. REG_USB_DEVCTL_W,m_usb_devctl_w.all,m_usb_devctl_w.all);
  9183. #endif
  9184. }
  9185. GH_INLINE U8 GH_USB_getm_DevCtl_W_Host_Req(void)
  9186. {
  9187. #if GH_USB_ENABLE_DEBUG_PRINT
  9188. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_DevCtl_W_Host_Req] --> 0x%08x\n",
  9189. m_usb_devctl_w.bitc.host_req);
  9190. #endif
  9191. return m_usb_devctl_w.bitc.host_req;
  9192. }
  9193. #endif /* GH_INLINE_LEVEL < 2 */
  9194. /*----------------------------------------------------------------------------*/
  9195. /* register USB_Misc (read/write) */
  9196. /*----------------------------------------------------------------------------*/
  9197. #if GH_INLINE_LEVEL == 0
  9198. /*! \brief Writes the register 'USB_Misc'. */
  9199. void GH_USB_set_Misc(U8 data);
  9200. /*! \brief Reads the register 'USB_Misc'. */
  9201. U8 GH_USB_get_Misc(void);
  9202. /*! \brief Writes the bit group 'rx_edma' of register 'USB_Misc'. */
  9203. void GH_USB_set_Misc_rx_edma(U8 data);
  9204. /*! \brief Reads the bit group 'rx_edma' of register 'USB_Misc'. */
  9205. U8 GH_USB_get_Misc_rx_edma(void);
  9206. /*! \brief Writes the bit group 'tx_edma' of register 'USB_Misc'. */
  9207. void GH_USB_set_Misc_tx_edma(U8 data);
  9208. /*! \brief Reads the bit group 'tx_edma' of register 'USB_Misc'. */
  9209. U8 GH_USB_get_Misc_tx_edma(void);
  9210. #else /* GH_INLINE_LEVEL == 0 */
  9211. GH_INLINE void GH_USB_set_Misc(U8 data)
  9212. {
  9213. *(volatile U8 *)REG_USB_MISC = data;
  9214. #if GH_USB_ENABLE_DEBUG_PRINT
  9215. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Misc] <-- 0x%08x\n",
  9216. REG_USB_MISC,data,data);
  9217. #endif
  9218. }
  9219. GH_INLINE U8 GH_USB_get_Misc(void)
  9220. {
  9221. U8 value = (*(volatile U8 *)REG_USB_MISC);
  9222. #if GH_USB_ENABLE_DEBUG_PRINT
  9223. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Misc] --> 0x%08x\n",
  9224. REG_USB_MISC,value);
  9225. #endif
  9226. return value;
  9227. }
  9228. GH_INLINE void GH_USB_set_Misc_rx_edma(U8 data)
  9229. {
  9230. GH_USB_MISC_S d;
  9231. d.all = *(volatile U8 *)REG_USB_MISC;
  9232. d.bitc.rx_edma = data;
  9233. *(volatile U8 *)REG_USB_MISC = d.all;
  9234. #if GH_USB_ENABLE_DEBUG_PRINT
  9235. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Misc_rx_edma] <-- 0x%08x\n",
  9236. REG_USB_MISC,d.all,d.all);
  9237. #endif
  9238. }
  9239. GH_INLINE U8 GH_USB_get_Misc_rx_edma(void)
  9240. {
  9241. GH_USB_MISC_S tmp_value;
  9242. U8 value = (*(volatile U8 *)REG_USB_MISC);
  9243. tmp_value.all = value;
  9244. #if GH_USB_ENABLE_DEBUG_PRINT
  9245. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Misc_rx_edma] --> 0x%08x\n",
  9246. REG_USB_MISC,value);
  9247. #endif
  9248. return tmp_value.bitc.rx_edma;
  9249. }
  9250. GH_INLINE void GH_USB_set_Misc_tx_edma(U8 data)
  9251. {
  9252. GH_USB_MISC_S d;
  9253. d.all = *(volatile U8 *)REG_USB_MISC;
  9254. d.bitc.tx_edma = data;
  9255. *(volatile U8 *)REG_USB_MISC = d.all;
  9256. #if GH_USB_ENABLE_DEBUG_PRINT
  9257. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_Misc_tx_edma] <-- 0x%08x\n",
  9258. REG_USB_MISC,d.all,d.all);
  9259. #endif
  9260. }
  9261. GH_INLINE U8 GH_USB_get_Misc_tx_edma(void)
  9262. {
  9263. GH_USB_MISC_S tmp_value;
  9264. U8 value = (*(volatile U8 *)REG_USB_MISC);
  9265. tmp_value.all = value;
  9266. #if GH_USB_ENABLE_DEBUG_PRINT
  9267. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_Misc_tx_edma] --> 0x%08x\n",
  9268. REG_USB_MISC,value);
  9269. #endif
  9270. return tmp_value.bitc.tx_edma;
  9271. }
  9272. #endif /* GH_INLINE_LEVEL == 0 */
  9273. /*----------------------------------------------------------------------------*/
  9274. /* register USB_TxFIFOsz (read/write) */
  9275. /*----------------------------------------------------------------------------*/
  9276. #if GH_INLINE_LEVEL == 0
  9277. /*! \brief Writes the register 'USB_TxFIFOsz'. */
  9278. void GH_USB_set_TxFIFOsz(U8 data);
  9279. /*! \brief Reads the register 'USB_TxFIFOsz'. */
  9280. U8 GH_USB_get_TxFIFOsz(void);
  9281. /*! \brief Writes the bit group 'SZ' of register 'USB_TxFIFOsz'. */
  9282. void GH_USB_set_TxFIFOsz_SZ(U8 data);
  9283. /*! \brief Reads the bit group 'SZ' of register 'USB_TxFIFOsz'. */
  9284. U8 GH_USB_get_TxFIFOsz_SZ(void);
  9285. /*! \brief Writes the bit group 'DPB' of register 'USB_TxFIFOsz'. */
  9286. void GH_USB_set_TxFIFOsz_DPB(U8 data);
  9287. /*! \brief Reads the bit group 'DPB' of register 'USB_TxFIFOsz'. */
  9288. U8 GH_USB_get_TxFIFOsz_DPB(void);
  9289. #else /* GH_INLINE_LEVEL == 0 */
  9290. GH_INLINE void GH_USB_set_TxFIFOsz(U8 data)
  9291. {
  9292. *(volatile U8 *)REG_USB_TXFIFOSZ = data;
  9293. #if GH_USB_ENABLE_DEBUG_PRINT
  9294. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOsz] <-- 0x%08x\n",
  9295. REG_USB_TXFIFOSZ,data,data);
  9296. #endif
  9297. }
  9298. GH_INLINE U8 GH_USB_get_TxFIFOsz(void)
  9299. {
  9300. U8 value = (*(volatile U8 *)REG_USB_TXFIFOSZ);
  9301. #if GH_USB_ENABLE_DEBUG_PRINT
  9302. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOsz] --> 0x%08x\n",
  9303. REG_USB_TXFIFOSZ,value);
  9304. #endif
  9305. return value;
  9306. }
  9307. GH_INLINE void GH_USB_set_TxFIFOsz_SZ(U8 data)
  9308. {
  9309. GH_USB_TXFIFOSZ_S d;
  9310. d.all = *(volatile U8 *)REG_USB_TXFIFOSZ;
  9311. d.bitc.sz = data;
  9312. *(volatile U8 *)REG_USB_TXFIFOSZ = d.all;
  9313. #if GH_USB_ENABLE_DEBUG_PRINT
  9314. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOsz_SZ] <-- 0x%08x\n",
  9315. REG_USB_TXFIFOSZ,d.all,d.all);
  9316. #endif
  9317. }
  9318. GH_INLINE U8 GH_USB_get_TxFIFOsz_SZ(void)
  9319. {
  9320. GH_USB_TXFIFOSZ_S tmp_value;
  9321. U8 value = (*(volatile U8 *)REG_USB_TXFIFOSZ);
  9322. tmp_value.all = value;
  9323. #if GH_USB_ENABLE_DEBUG_PRINT
  9324. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOsz_SZ] --> 0x%08x\n",
  9325. REG_USB_TXFIFOSZ,value);
  9326. #endif
  9327. return tmp_value.bitc.sz;
  9328. }
  9329. GH_INLINE void GH_USB_set_TxFIFOsz_DPB(U8 data)
  9330. {
  9331. GH_USB_TXFIFOSZ_S d;
  9332. d.all = *(volatile U8 *)REG_USB_TXFIFOSZ;
  9333. d.bitc.dpb = data;
  9334. *(volatile U8 *)REG_USB_TXFIFOSZ = d.all;
  9335. #if GH_USB_ENABLE_DEBUG_PRINT
  9336. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOsz_DPB] <-- 0x%08x\n",
  9337. REG_USB_TXFIFOSZ,d.all,d.all);
  9338. #endif
  9339. }
  9340. GH_INLINE U8 GH_USB_get_TxFIFOsz_DPB(void)
  9341. {
  9342. GH_USB_TXFIFOSZ_S tmp_value;
  9343. U8 value = (*(volatile U8 *)REG_USB_TXFIFOSZ);
  9344. tmp_value.all = value;
  9345. #if GH_USB_ENABLE_DEBUG_PRINT
  9346. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOsz_DPB] --> 0x%08x\n",
  9347. REG_USB_TXFIFOSZ,value);
  9348. #endif
  9349. return tmp_value.bitc.dpb;
  9350. }
  9351. #endif /* GH_INLINE_LEVEL == 0 */
  9352. /*----------------------------------------------------------------------------*/
  9353. /* register USB_RxFIFOsz (read/write) */
  9354. /*----------------------------------------------------------------------------*/
  9355. #if GH_INLINE_LEVEL == 0
  9356. /*! \brief Writes the register 'USB_RxFIFOsz'. */
  9357. void GH_USB_set_RxFIFOsz(U8 data);
  9358. /*! \brief Reads the register 'USB_RxFIFOsz'. */
  9359. U8 GH_USB_get_RxFIFOsz(void);
  9360. /*! \brief Writes the bit group 'SZ' of register 'USB_RxFIFOsz'. */
  9361. void GH_USB_set_RxFIFOsz_SZ(U8 data);
  9362. /*! \brief Reads the bit group 'SZ' of register 'USB_RxFIFOsz'. */
  9363. U8 GH_USB_get_RxFIFOsz_SZ(void);
  9364. /*! \brief Writes the bit group 'DPB' of register 'USB_RxFIFOsz'. */
  9365. void GH_USB_set_RxFIFOsz_DPB(U8 data);
  9366. /*! \brief Reads the bit group 'DPB' of register 'USB_RxFIFOsz'. */
  9367. U8 GH_USB_get_RxFIFOsz_DPB(void);
  9368. #else /* GH_INLINE_LEVEL == 0 */
  9369. GH_INLINE void GH_USB_set_RxFIFOsz(U8 data)
  9370. {
  9371. *(volatile U8 *)REG_USB_RXFIFOSZ = data;
  9372. #if GH_USB_ENABLE_DEBUG_PRINT
  9373. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOsz] <-- 0x%08x\n",
  9374. REG_USB_RXFIFOSZ,data,data);
  9375. #endif
  9376. }
  9377. GH_INLINE U8 GH_USB_get_RxFIFOsz(void)
  9378. {
  9379. U8 value = (*(volatile U8 *)REG_USB_RXFIFOSZ);
  9380. #if GH_USB_ENABLE_DEBUG_PRINT
  9381. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOsz] --> 0x%08x\n",
  9382. REG_USB_RXFIFOSZ,value);
  9383. #endif
  9384. return value;
  9385. }
  9386. GH_INLINE void GH_USB_set_RxFIFOsz_SZ(U8 data)
  9387. {
  9388. GH_USB_RXFIFOSZ_S d;
  9389. d.all = *(volatile U8 *)REG_USB_RXFIFOSZ;
  9390. d.bitc.sz = data;
  9391. *(volatile U8 *)REG_USB_RXFIFOSZ = d.all;
  9392. #if GH_USB_ENABLE_DEBUG_PRINT
  9393. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOsz_SZ] <-- 0x%08x\n",
  9394. REG_USB_RXFIFOSZ,d.all,d.all);
  9395. #endif
  9396. }
  9397. GH_INLINE U8 GH_USB_get_RxFIFOsz_SZ(void)
  9398. {
  9399. GH_USB_RXFIFOSZ_S tmp_value;
  9400. U8 value = (*(volatile U8 *)REG_USB_RXFIFOSZ);
  9401. tmp_value.all = value;
  9402. #if GH_USB_ENABLE_DEBUG_PRINT
  9403. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOsz_SZ] --> 0x%08x\n",
  9404. REG_USB_RXFIFOSZ,value);
  9405. #endif
  9406. return tmp_value.bitc.sz;
  9407. }
  9408. GH_INLINE void GH_USB_set_RxFIFOsz_DPB(U8 data)
  9409. {
  9410. GH_USB_RXFIFOSZ_S d;
  9411. d.all = *(volatile U8 *)REG_USB_RXFIFOSZ;
  9412. d.bitc.dpb = data;
  9413. *(volatile U8 *)REG_USB_RXFIFOSZ = d.all;
  9414. #if GH_USB_ENABLE_DEBUG_PRINT
  9415. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOsz_DPB] <-- 0x%08x\n",
  9416. REG_USB_RXFIFOSZ,d.all,d.all);
  9417. #endif
  9418. }
  9419. GH_INLINE U8 GH_USB_get_RxFIFOsz_DPB(void)
  9420. {
  9421. GH_USB_RXFIFOSZ_S tmp_value;
  9422. U8 value = (*(volatile U8 *)REG_USB_RXFIFOSZ);
  9423. tmp_value.all = value;
  9424. #if GH_USB_ENABLE_DEBUG_PRINT
  9425. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOsz_DPB] --> 0x%08x\n",
  9426. REG_USB_RXFIFOSZ,value);
  9427. #endif
  9428. return tmp_value.bitc.dpb;
  9429. }
  9430. #endif /* GH_INLINE_LEVEL == 0 */
  9431. /*----------------------------------------------------------------------------*/
  9432. /* register USB_TxFIFOadd (read/write) */
  9433. /*----------------------------------------------------------------------------*/
  9434. #if GH_INLINE_LEVEL == 0
  9435. /*! \brief Writes the register 'USB_TxFIFOadd'. */
  9436. void GH_USB_set_TxFIFOadd(U16 data);
  9437. /*! \brief Reads the register 'USB_TxFIFOadd'. */
  9438. U16 GH_USB_get_TxFIFOadd(void);
  9439. /*! \brief Writes the bit group 'Startaddress' of register 'USB_TxFIFOadd'. */
  9440. void GH_USB_set_TxFIFOadd_Startaddress(U16 data);
  9441. /*! \brief Reads the bit group 'Startaddress' of register 'USB_TxFIFOadd'. */
  9442. U16 GH_USB_get_TxFIFOadd_Startaddress(void);
  9443. #else /* GH_INLINE_LEVEL == 0 */
  9444. GH_INLINE void GH_USB_set_TxFIFOadd(U16 data)
  9445. {
  9446. *(volatile U16 *)REG_USB_TXFIFOADD = data;
  9447. #if GH_USB_ENABLE_DEBUG_PRINT
  9448. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOadd] <-- 0x%08x\n",
  9449. REG_USB_TXFIFOADD,data,data);
  9450. #endif
  9451. }
  9452. GH_INLINE U16 GH_USB_get_TxFIFOadd(void)
  9453. {
  9454. U16 value = (*(volatile U16 *)REG_USB_TXFIFOADD);
  9455. #if GH_USB_ENABLE_DEBUG_PRINT
  9456. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOadd] --> 0x%08x\n",
  9457. REG_USB_TXFIFOADD,value);
  9458. #endif
  9459. return value;
  9460. }
  9461. GH_INLINE void GH_USB_set_TxFIFOadd_Startaddress(U16 data)
  9462. {
  9463. GH_USB_TXFIFOADD_S d;
  9464. d.all = *(volatile U16 *)REG_USB_TXFIFOADD;
  9465. d.bitc.startaddress = data;
  9466. *(volatile U16 *)REG_USB_TXFIFOADD = d.all;
  9467. #if GH_USB_ENABLE_DEBUG_PRINT
  9468. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFIFOadd_Startaddress] <-- 0x%08x\n",
  9469. REG_USB_TXFIFOADD,d.all,d.all);
  9470. #endif
  9471. }
  9472. GH_INLINE U16 GH_USB_get_TxFIFOadd_Startaddress(void)
  9473. {
  9474. GH_USB_TXFIFOADD_S tmp_value;
  9475. U16 value = (*(volatile U16 *)REG_USB_TXFIFOADD);
  9476. tmp_value.all = value;
  9477. #if GH_USB_ENABLE_DEBUG_PRINT
  9478. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFIFOadd_Startaddress] --> 0x%08x\n",
  9479. REG_USB_TXFIFOADD,value);
  9480. #endif
  9481. return tmp_value.bitc.startaddress;
  9482. }
  9483. #endif /* GH_INLINE_LEVEL == 0 */
  9484. /*----------------------------------------------------------------------------*/
  9485. /* register USB_RxFIFOadd (read/write) */
  9486. /*----------------------------------------------------------------------------*/
  9487. #if GH_INLINE_LEVEL == 0
  9488. /*! \brief Writes the register 'USB_RxFIFOadd'. */
  9489. void GH_USB_set_RxFIFOadd(U16 data);
  9490. /*! \brief Reads the register 'USB_RxFIFOadd'. */
  9491. U16 GH_USB_get_RxFIFOadd(void);
  9492. /*! \brief Writes the bit group 'Startaddress' of register 'USB_RxFIFOadd'. */
  9493. void GH_USB_set_RxFIFOadd_Startaddress(U16 data);
  9494. /*! \brief Reads the bit group 'Startaddress' of register 'USB_RxFIFOadd'. */
  9495. U16 GH_USB_get_RxFIFOadd_Startaddress(void);
  9496. #else /* GH_INLINE_LEVEL == 0 */
  9497. GH_INLINE void GH_USB_set_RxFIFOadd(U16 data)
  9498. {
  9499. *(volatile U16 *)REG_USB_RXFIFOADD = data;
  9500. #if GH_USB_ENABLE_DEBUG_PRINT
  9501. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOadd] <-- 0x%08x\n",
  9502. REG_USB_RXFIFOADD,data,data);
  9503. #endif
  9504. }
  9505. GH_INLINE U16 GH_USB_get_RxFIFOadd(void)
  9506. {
  9507. U16 value = (*(volatile U16 *)REG_USB_RXFIFOADD);
  9508. #if GH_USB_ENABLE_DEBUG_PRINT
  9509. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOadd] --> 0x%08x\n",
  9510. REG_USB_RXFIFOADD,value);
  9511. #endif
  9512. return value;
  9513. }
  9514. GH_INLINE void GH_USB_set_RxFIFOadd_Startaddress(U16 data)
  9515. {
  9516. GH_USB_RXFIFOADD_S d;
  9517. d.all = *(volatile U16 *)REG_USB_RXFIFOADD;
  9518. d.bitc.startaddress = data;
  9519. *(volatile U16 *)REG_USB_RXFIFOADD = d.all;
  9520. #if GH_USB_ENABLE_DEBUG_PRINT
  9521. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFIFOadd_Startaddress] <-- 0x%08x\n",
  9522. REG_USB_RXFIFOADD,d.all,d.all);
  9523. #endif
  9524. }
  9525. GH_INLINE U16 GH_USB_get_RxFIFOadd_Startaddress(void)
  9526. {
  9527. GH_USB_RXFIFOADD_S tmp_value;
  9528. U16 value = (*(volatile U16 *)REG_USB_RXFIFOADD);
  9529. tmp_value.all = value;
  9530. #if GH_USB_ENABLE_DEBUG_PRINT
  9531. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFIFOadd_Startaddress] --> 0x%08x\n",
  9532. REG_USB_RXFIFOADD,value);
  9533. #endif
  9534. return tmp_value.bitc.startaddress;
  9535. }
  9536. #endif /* GH_INLINE_LEVEL == 0 */
  9537. /*----------------------------------------------------------------------------*/
  9538. /* register USB_VStatus (read) */
  9539. /*----------------------------------------------------------------------------*/
  9540. #if GH_INLINE_LEVEL == 0
  9541. /*! \brief Reads the register 'USB_VStatus'. */
  9542. U32 GH_USB_get_VStatus(void);
  9543. #else /* GH_INLINE_LEVEL == 0 */
  9544. GH_INLINE U32 GH_USB_get_VStatus(void)
  9545. {
  9546. U32 value = (*(volatile U32 *)REG_USB_VSTATUS);
  9547. #if GH_USB_ENABLE_DEBUG_PRINT
  9548. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_VStatus] --> 0x%08x\n",
  9549. REG_USB_VSTATUS,value);
  9550. #endif
  9551. return value;
  9552. }
  9553. #endif /* GH_INLINE_LEVEL == 0 */
  9554. /*----------------------------------------------------------------------------*/
  9555. /* register USB_VControl (write) */
  9556. /*----------------------------------------------------------------------------*/
  9557. #if GH_INLINE_LEVEL < 2
  9558. /*! \brief Writes the register 'USB_VControl'. */
  9559. void GH_USB_set_VControl(U32 data);
  9560. /*! \brief Reads the mirror variable of the register 'USB_VControl'. */
  9561. U32 GH_USB_getm_VControl(void);
  9562. #else /* GH_INLINE_LEVEL < 2 */
  9563. GH_INLINE void GH_USB_set_VControl(U32 data)
  9564. {
  9565. m_usb_vcontrol = data;
  9566. *(volatile U32 *)REG_USB_VCONTROL = data;
  9567. #if GH_USB_ENABLE_DEBUG_PRINT
  9568. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_VControl] <-- 0x%08x\n",
  9569. REG_USB_VCONTROL,data,data);
  9570. #endif
  9571. }
  9572. GH_INLINE U32 GH_USB_getm_VControl(void)
  9573. {
  9574. #if GH_USB_ENABLE_DEBUG_PRINT
  9575. GH_USB_DEBUG_PRINT_FUNCTION( "[GH_USB_getm_VControl] --> 0x%08x\n",
  9576. m_usb_vcontrol);
  9577. #endif
  9578. return m_usb_vcontrol;
  9579. }
  9580. #endif /* GH_INLINE_LEVEL < 2 */
  9581. /*----------------------------------------------------------------------------*/
  9582. /* register USB_HWVers (read) */
  9583. /*----------------------------------------------------------------------------*/
  9584. #if GH_INLINE_LEVEL == 0
  9585. /*! \brief Reads the register 'USB_HWVers'. */
  9586. U16 GH_USB_get_HWVers(void);
  9587. /*! \brief Reads the bit group 'MinorVersion' of register 'USB_HWVers'. */
  9588. U16 GH_USB_get_HWVers_MinorVersion(void);
  9589. /*! \brief Reads the bit group 'MajorVersion' of register 'USB_HWVers'. */
  9590. U8 GH_USB_get_HWVers_MajorVersion(void);
  9591. /*! \brief Reads the bit group 'RC' of register 'USB_HWVers'. */
  9592. U8 GH_USB_get_HWVers_RC(void);
  9593. #else /* GH_INLINE_LEVEL == 0 */
  9594. GH_INLINE U16 GH_USB_get_HWVers(void)
  9595. {
  9596. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  9597. #if GH_USB_ENABLE_DEBUG_PRINT
  9598. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers] --> 0x%08x\n",
  9599. REG_USB_HWVERS,value);
  9600. #endif
  9601. return value;
  9602. }
  9603. GH_INLINE U16 GH_USB_get_HWVers_MinorVersion(void)
  9604. {
  9605. GH_USB_HWVERS_S tmp_value;
  9606. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  9607. tmp_value.all = value;
  9608. #if GH_USB_ENABLE_DEBUG_PRINT
  9609. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers_MinorVersion] --> 0x%08x\n",
  9610. REG_USB_HWVERS,value);
  9611. #endif
  9612. return tmp_value.bitc.minorversion;
  9613. }
  9614. GH_INLINE U8 GH_USB_get_HWVers_MajorVersion(void)
  9615. {
  9616. GH_USB_HWVERS_S tmp_value;
  9617. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  9618. tmp_value.all = value;
  9619. #if GH_USB_ENABLE_DEBUG_PRINT
  9620. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers_MajorVersion] --> 0x%08x\n",
  9621. REG_USB_HWVERS,value);
  9622. #endif
  9623. return tmp_value.bitc.majorversion;
  9624. }
  9625. GH_INLINE U8 GH_USB_get_HWVers_RC(void)
  9626. {
  9627. GH_USB_HWVERS_S tmp_value;
  9628. U16 value = (*(volatile U16 *)REG_USB_HWVERS);
  9629. tmp_value.all = value;
  9630. #if GH_USB_ENABLE_DEBUG_PRINT
  9631. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HWVers_RC] --> 0x%08x\n",
  9632. REG_USB_HWVERS,value);
  9633. #endif
  9634. return tmp_value.bitc.rc;
  9635. }
  9636. #endif /* GH_INLINE_LEVEL == 0 */
  9637. /*----------------------------------------------------------------------------*/
  9638. /* register USB_EPInfo (read) */
  9639. /*----------------------------------------------------------------------------*/
  9640. #if GH_INLINE_LEVEL == 0
  9641. /*! \brief Reads the register 'USB_EPInfo'. */
  9642. U8 GH_USB_get_EPInfo(void);
  9643. /*! \brief Reads the bit group 'TxEndPoints' of register 'USB_EPInfo'. */
  9644. U8 GH_USB_get_EPInfo_TxEndPoints(void);
  9645. /*! \brief Reads the bit group 'RxEndPoints' of register 'USB_EPInfo'. */
  9646. U8 GH_USB_get_EPInfo_RxEndPoints(void);
  9647. #else /* GH_INLINE_LEVEL == 0 */
  9648. GH_INLINE U8 GH_USB_get_EPInfo(void)
  9649. {
  9650. U8 value = (*(volatile U8 *)REG_USB_EPINFO);
  9651. #if GH_USB_ENABLE_DEBUG_PRINT
  9652. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_EPInfo] --> 0x%08x\n",
  9653. REG_USB_EPINFO,value);
  9654. #endif
  9655. return value;
  9656. }
  9657. GH_INLINE U8 GH_USB_get_EPInfo_TxEndPoints(void)
  9658. {
  9659. GH_USB_EPINFO_S tmp_value;
  9660. U8 value = (*(volatile U8 *)REG_USB_EPINFO);
  9661. tmp_value.all = value;
  9662. #if GH_USB_ENABLE_DEBUG_PRINT
  9663. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_EPInfo_TxEndPoints] --> 0x%08x\n",
  9664. REG_USB_EPINFO,value);
  9665. #endif
  9666. return tmp_value.bitc.txendpoints;
  9667. }
  9668. GH_INLINE U8 GH_USB_get_EPInfo_RxEndPoints(void)
  9669. {
  9670. GH_USB_EPINFO_S tmp_value;
  9671. U8 value = (*(volatile U8 *)REG_USB_EPINFO);
  9672. tmp_value.all = value;
  9673. #if GH_USB_ENABLE_DEBUG_PRINT
  9674. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_EPInfo_RxEndPoints] --> 0x%08x\n",
  9675. REG_USB_EPINFO,value);
  9676. #endif
  9677. return tmp_value.bitc.rxendpoints;
  9678. }
  9679. #endif /* GH_INLINE_LEVEL == 0 */
  9680. /*----------------------------------------------------------------------------*/
  9681. /* register USB_RAMInfo (read) */
  9682. /*----------------------------------------------------------------------------*/
  9683. #if GH_INLINE_LEVEL == 0
  9684. /*! \brief Reads the register 'USB_RAMInfo'. */
  9685. U8 GH_USB_get_RAMInfo(void);
  9686. /*! \brief Reads the bit group 'RamBits' of register 'USB_RAMInfo'. */
  9687. U8 GH_USB_get_RAMInfo_RamBits(void);
  9688. /*! \brief Reads the bit group 'DMAChans' of register 'USB_RAMInfo'. */
  9689. U8 GH_USB_get_RAMInfo_DMAChans(void);
  9690. #else /* GH_INLINE_LEVEL == 0 */
  9691. GH_INLINE U8 GH_USB_get_RAMInfo(void)
  9692. {
  9693. U8 value = (*(volatile U8 *)REG_USB_RAMINFO);
  9694. #if GH_USB_ENABLE_DEBUG_PRINT
  9695. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RAMInfo] --> 0x%08x\n",
  9696. REG_USB_RAMINFO,value);
  9697. #endif
  9698. return value;
  9699. }
  9700. GH_INLINE U8 GH_USB_get_RAMInfo_RamBits(void)
  9701. {
  9702. GH_USB_RAMINFO_S tmp_value;
  9703. U8 value = (*(volatile U8 *)REG_USB_RAMINFO);
  9704. tmp_value.all = value;
  9705. #if GH_USB_ENABLE_DEBUG_PRINT
  9706. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RAMInfo_RamBits] --> 0x%08x\n",
  9707. REG_USB_RAMINFO,value);
  9708. #endif
  9709. return tmp_value.bitc.rambits;
  9710. }
  9711. GH_INLINE U8 GH_USB_get_RAMInfo_DMAChans(void)
  9712. {
  9713. GH_USB_RAMINFO_S tmp_value;
  9714. U8 value = (*(volatile U8 *)REG_USB_RAMINFO);
  9715. tmp_value.all = value;
  9716. #if GH_USB_ENABLE_DEBUG_PRINT
  9717. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RAMInfo_DMAChans] --> 0x%08x\n",
  9718. REG_USB_RAMINFO,value);
  9719. #endif
  9720. return tmp_value.bitc.dmachans;
  9721. }
  9722. #endif /* GH_INLINE_LEVEL == 0 */
  9723. /*----------------------------------------------------------------------------*/
  9724. /* register USB_LinkInfo (read/write) */
  9725. /*----------------------------------------------------------------------------*/
  9726. #if GH_INLINE_LEVEL == 0
  9727. /*! \brief Writes the register 'USB_LinkInfo'. */
  9728. void GH_USB_set_LinkInfo(U8 data);
  9729. /*! \brief Reads the register 'USB_LinkInfo'. */
  9730. U8 GH_USB_get_LinkInfo(void);
  9731. /*! \brief Writes the bit group 'WTID' of register 'USB_LinkInfo'. */
  9732. void GH_USB_set_LinkInfo_WTID(U8 data);
  9733. /*! \brief Reads the bit group 'WTID' of register 'USB_LinkInfo'. */
  9734. U8 GH_USB_get_LinkInfo_WTID(void);
  9735. /*! \brief Writes the bit group 'WTCON' of register 'USB_LinkInfo'. */
  9736. void GH_USB_set_LinkInfo_WTCON(U8 data);
  9737. /*! \brief Reads the bit group 'WTCON' of register 'USB_LinkInfo'. */
  9738. U8 GH_USB_get_LinkInfo_WTCON(void);
  9739. #else /* GH_INLINE_LEVEL == 0 */
  9740. GH_INLINE void GH_USB_set_LinkInfo(U8 data)
  9741. {
  9742. *(volatile U8 *)REG_USB_LINKINFO = data;
  9743. #if GH_USB_ENABLE_DEBUG_PRINT
  9744. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LinkInfo] <-- 0x%08x\n",
  9745. REG_USB_LINKINFO,data,data);
  9746. #endif
  9747. }
  9748. GH_INLINE U8 GH_USB_get_LinkInfo(void)
  9749. {
  9750. U8 value = (*(volatile U8 *)REG_USB_LINKINFO);
  9751. #if GH_USB_ENABLE_DEBUG_PRINT
  9752. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LinkInfo] --> 0x%08x\n",
  9753. REG_USB_LINKINFO,value);
  9754. #endif
  9755. return value;
  9756. }
  9757. GH_INLINE void GH_USB_set_LinkInfo_WTID(U8 data)
  9758. {
  9759. GH_USB_LINKINFO_S d;
  9760. d.all = *(volatile U8 *)REG_USB_LINKINFO;
  9761. d.bitc.wtid = data;
  9762. *(volatile U8 *)REG_USB_LINKINFO = d.all;
  9763. #if GH_USB_ENABLE_DEBUG_PRINT
  9764. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LinkInfo_WTID] <-- 0x%08x\n",
  9765. REG_USB_LINKINFO,d.all,d.all);
  9766. #endif
  9767. }
  9768. GH_INLINE U8 GH_USB_get_LinkInfo_WTID(void)
  9769. {
  9770. GH_USB_LINKINFO_S tmp_value;
  9771. U8 value = (*(volatile U8 *)REG_USB_LINKINFO);
  9772. tmp_value.all = value;
  9773. #if GH_USB_ENABLE_DEBUG_PRINT
  9774. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LinkInfo_WTID] --> 0x%08x\n",
  9775. REG_USB_LINKINFO,value);
  9776. #endif
  9777. return tmp_value.bitc.wtid;
  9778. }
  9779. GH_INLINE void GH_USB_set_LinkInfo_WTCON(U8 data)
  9780. {
  9781. GH_USB_LINKINFO_S d;
  9782. d.all = *(volatile U8 *)REG_USB_LINKINFO;
  9783. d.bitc.wtcon = data;
  9784. *(volatile U8 *)REG_USB_LINKINFO = d.all;
  9785. #if GH_USB_ENABLE_DEBUG_PRINT
  9786. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LinkInfo_WTCON] <-- 0x%08x\n",
  9787. REG_USB_LINKINFO,d.all,d.all);
  9788. #endif
  9789. }
  9790. GH_INLINE U8 GH_USB_get_LinkInfo_WTCON(void)
  9791. {
  9792. GH_USB_LINKINFO_S tmp_value;
  9793. U8 value = (*(volatile U8 *)REG_USB_LINKINFO);
  9794. tmp_value.all = value;
  9795. #if GH_USB_ENABLE_DEBUG_PRINT
  9796. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LinkInfo_WTCON] --> 0x%08x\n",
  9797. REG_USB_LINKINFO,value);
  9798. #endif
  9799. return tmp_value.bitc.wtcon;
  9800. }
  9801. #endif /* GH_INLINE_LEVEL == 0 */
  9802. /*----------------------------------------------------------------------------*/
  9803. /* register USB_VPLen (read/write) */
  9804. /*----------------------------------------------------------------------------*/
  9805. #if GH_INLINE_LEVEL == 0
  9806. /*! \brief Writes the register 'USB_VPLen'. */
  9807. void GH_USB_set_VPLen(U8 data);
  9808. /*! \brief Reads the register 'USB_VPLen'. */
  9809. U8 GH_USB_get_VPLen(void);
  9810. #else /* GH_INLINE_LEVEL == 0 */
  9811. GH_INLINE void GH_USB_set_VPLen(U8 data)
  9812. {
  9813. *(volatile U8 *)REG_USB_VPLEN = data;
  9814. #if GH_USB_ENABLE_DEBUG_PRINT
  9815. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_VPLen] <-- 0x%08x\n",
  9816. REG_USB_VPLEN,data,data);
  9817. #endif
  9818. }
  9819. GH_INLINE U8 GH_USB_get_VPLen(void)
  9820. {
  9821. U8 value = (*(volatile U8 *)REG_USB_VPLEN);
  9822. #if GH_USB_ENABLE_DEBUG_PRINT
  9823. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_VPLen] --> 0x%08x\n",
  9824. REG_USB_VPLEN,value);
  9825. #endif
  9826. return value;
  9827. }
  9828. #endif /* GH_INLINE_LEVEL == 0 */
  9829. /*----------------------------------------------------------------------------*/
  9830. /* register USB_HS_EOF1 (read/write) */
  9831. /*----------------------------------------------------------------------------*/
  9832. #if GH_INLINE_LEVEL == 0
  9833. /*! \brief Writes the register 'USB_HS_EOF1'. */
  9834. void GH_USB_set_HS_EOF1(U8 data);
  9835. /*! \brief Reads the register 'USB_HS_EOF1'. */
  9836. U8 GH_USB_get_HS_EOF1(void);
  9837. #else /* GH_INLINE_LEVEL == 0 */
  9838. GH_INLINE void GH_USB_set_HS_EOF1(U8 data)
  9839. {
  9840. *(volatile U8 *)REG_USB_HS_EOF1 = data;
  9841. #if GH_USB_ENABLE_DEBUG_PRINT
  9842. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_HS_EOF1] <-- 0x%08x\n",
  9843. REG_USB_HS_EOF1,data,data);
  9844. #endif
  9845. }
  9846. GH_INLINE U8 GH_USB_get_HS_EOF1(void)
  9847. {
  9848. U8 value = (*(volatile U8 *)REG_USB_HS_EOF1);
  9849. #if GH_USB_ENABLE_DEBUG_PRINT
  9850. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_HS_EOF1] --> 0x%08x\n",
  9851. REG_USB_HS_EOF1,value);
  9852. #endif
  9853. return value;
  9854. }
  9855. #endif /* GH_INLINE_LEVEL == 0 */
  9856. /*----------------------------------------------------------------------------*/
  9857. /* register USB_FS_EOF1 (read/write) */
  9858. /*----------------------------------------------------------------------------*/
  9859. #if GH_INLINE_LEVEL == 0
  9860. /*! \brief Writes the register 'USB_FS_EOF1'. */
  9861. void GH_USB_set_FS_EOF1(U8 data);
  9862. /*! \brief Reads the register 'USB_FS_EOF1'. */
  9863. U8 GH_USB_get_FS_EOF1(void);
  9864. #else /* GH_INLINE_LEVEL == 0 */
  9865. GH_INLINE void GH_USB_set_FS_EOF1(U8 data)
  9866. {
  9867. *(volatile U8 *)REG_USB_FS_EOF1 = data;
  9868. #if GH_USB_ENABLE_DEBUG_PRINT
  9869. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_FS_EOF1] <-- 0x%08x\n",
  9870. REG_USB_FS_EOF1,data,data);
  9871. #endif
  9872. }
  9873. GH_INLINE U8 GH_USB_get_FS_EOF1(void)
  9874. {
  9875. U8 value = (*(volatile U8 *)REG_USB_FS_EOF1);
  9876. #if GH_USB_ENABLE_DEBUG_PRINT
  9877. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_FS_EOF1] --> 0x%08x\n",
  9878. REG_USB_FS_EOF1,value);
  9879. #endif
  9880. return value;
  9881. }
  9882. #endif /* GH_INLINE_LEVEL == 0 */
  9883. /*----------------------------------------------------------------------------*/
  9884. /* register USB_LS_EOF1 (read/write) */
  9885. /*----------------------------------------------------------------------------*/
  9886. #if GH_INLINE_LEVEL == 0
  9887. /*! \brief Writes the register 'USB_LS_EOF1'. */
  9888. void GH_USB_set_LS_EOF1(U8 data);
  9889. /*! \brief Reads the register 'USB_LS_EOF1'. */
  9890. U8 GH_USB_get_LS_EOF1(void);
  9891. #else /* GH_INLINE_LEVEL == 0 */
  9892. GH_INLINE void GH_USB_set_LS_EOF1(U8 data)
  9893. {
  9894. *(volatile U8 *)REG_USB_LS_EOF1 = data;
  9895. #if GH_USB_ENABLE_DEBUG_PRINT
  9896. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LS_EOF1] <-- 0x%08x\n",
  9897. REG_USB_LS_EOF1,data,data);
  9898. #endif
  9899. }
  9900. GH_INLINE U8 GH_USB_get_LS_EOF1(void)
  9901. {
  9902. U8 value = (*(volatile U8 *)REG_USB_LS_EOF1);
  9903. #if GH_USB_ENABLE_DEBUG_PRINT
  9904. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LS_EOF1] --> 0x%08x\n",
  9905. REG_USB_LS_EOF1,value);
  9906. #endif
  9907. return value;
  9908. }
  9909. #endif /* GH_INLINE_LEVEL == 0 */
  9910. /*----------------------------------------------------------------------------*/
  9911. /* register USB_SOFT_RST (read/write) */
  9912. /*----------------------------------------------------------------------------*/
  9913. #if GH_INLINE_LEVEL == 0
  9914. /*! \brief Writes the register 'USB_SOFT_RST'. */
  9915. void GH_USB_set_SOFT_RST(U8 data);
  9916. /*! \brief Reads the register 'USB_SOFT_RST'. */
  9917. U8 GH_USB_get_SOFT_RST(void);
  9918. /*! \brief Writes the bit group 'NRST' of register 'USB_SOFT_RST'. */
  9919. void GH_USB_set_SOFT_RST_NRST(U8 data);
  9920. /*! \brief Reads the bit group 'NRST' of register 'USB_SOFT_RST'. */
  9921. U8 GH_USB_get_SOFT_RST_NRST(void);
  9922. /*! \brief Writes the bit group 'NRSTX' of register 'USB_SOFT_RST'. */
  9923. void GH_USB_set_SOFT_RST_NRSTX(U8 data);
  9924. /*! \brief Reads the bit group 'NRSTX' of register 'USB_SOFT_RST'. */
  9925. U8 GH_USB_get_SOFT_RST_NRSTX(void);
  9926. #else /* GH_INLINE_LEVEL == 0 */
  9927. GH_INLINE void GH_USB_set_SOFT_RST(U8 data)
  9928. {
  9929. *(volatile U8 *)REG_USB_SOFT_RST = data;
  9930. #if GH_USB_ENABLE_DEBUG_PRINT
  9931. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_SOFT_RST] <-- 0x%08x\n",
  9932. REG_USB_SOFT_RST,data,data);
  9933. #endif
  9934. }
  9935. GH_INLINE U8 GH_USB_get_SOFT_RST(void)
  9936. {
  9937. U8 value = (*(volatile U8 *)REG_USB_SOFT_RST);
  9938. #if GH_USB_ENABLE_DEBUG_PRINT
  9939. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_SOFT_RST] --> 0x%08x\n",
  9940. REG_USB_SOFT_RST,value);
  9941. #endif
  9942. return value;
  9943. }
  9944. GH_INLINE void GH_USB_set_SOFT_RST_NRST(U8 data)
  9945. {
  9946. GH_USB_SOFT_RST_S d;
  9947. d.all = *(volatile U8 *)REG_USB_SOFT_RST;
  9948. d.bitc.nrst = data;
  9949. *(volatile U8 *)REG_USB_SOFT_RST = d.all;
  9950. #if GH_USB_ENABLE_DEBUG_PRINT
  9951. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_SOFT_RST_NRST] <-- 0x%08x\n",
  9952. REG_USB_SOFT_RST,d.all,d.all);
  9953. #endif
  9954. }
  9955. GH_INLINE U8 GH_USB_get_SOFT_RST_NRST(void)
  9956. {
  9957. GH_USB_SOFT_RST_S tmp_value;
  9958. U8 value = (*(volatile U8 *)REG_USB_SOFT_RST);
  9959. tmp_value.all = value;
  9960. #if GH_USB_ENABLE_DEBUG_PRINT
  9961. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_SOFT_RST_NRST] --> 0x%08x\n",
  9962. REG_USB_SOFT_RST,value);
  9963. #endif
  9964. return tmp_value.bitc.nrst;
  9965. }
  9966. GH_INLINE void GH_USB_set_SOFT_RST_NRSTX(U8 data)
  9967. {
  9968. GH_USB_SOFT_RST_S d;
  9969. d.all = *(volatile U8 *)REG_USB_SOFT_RST;
  9970. d.bitc.nrstx = data;
  9971. *(volatile U8 *)REG_USB_SOFT_RST = d.all;
  9972. #if GH_USB_ENABLE_DEBUG_PRINT
  9973. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_SOFT_RST_NRSTX] <-- 0x%08x\n",
  9974. REG_USB_SOFT_RST,d.all,d.all);
  9975. #endif
  9976. }
  9977. GH_INLINE U8 GH_USB_get_SOFT_RST_NRSTX(void)
  9978. {
  9979. GH_USB_SOFT_RST_S tmp_value;
  9980. U8 value = (*(volatile U8 *)REG_USB_SOFT_RST);
  9981. tmp_value.all = value;
  9982. #if GH_USB_ENABLE_DEBUG_PRINT
  9983. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_SOFT_RST_NRSTX] --> 0x%08x\n",
  9984. REG_USB_SOFT_RST,value);
  9985. #endif
  9986. return tmp_value.bitc.nrstx;
  9987. }
  9988. #endif /* GH_INLINE_LEVEL == 0 */
  9989. /*----------------------------------------------------------------------------*/
  9990. /* register USB_TxFuncAddr (read/write) */
  9991. /*----------------------------------------------------------------------------*/
  9992. #if GH_INLINE_LEVEL == 0
  9993. /*! \brief Writes the register 'USB_TxFuncAddr'. */
  9994. void GH_USB_set_TxFuncAddr(U8 index, U8 data);
  9995. /*! \brief Reads the register 'USB_TxFuncAddr'. */
  9996. U8 GH_USB_get_TxFuncAddr(U8 index);
  9997. /*! \brief Writes the bit group 'AddressofTargetFunction' of register 'USB_TxFuncAddr'. */
  9998. void GH_USB_set_TxFuncAddr_AddressofTargetFunction(U8 index, U8 data);
  9999. /*! \brief Reads the bit group 'AddressofTargetFunction' of register 'USB_TxFuncAddr'. */
  10000. U8 GH_USB_get_TxFuncAddr_AddressofTargetFunction(U8 index);
  10001. #else /* GH_INLINE_LEVEL == 0 */
  10002. GH_INLINE void GH_USB_set_TxFuncAddr(U8 index, U8 data)
  10003. {
  10004. *(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  10005. #if GH_USB_ENABLE_DEBUG_PRINT
  10006. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFuncAddr] <-- 0x%08x\n",
  10007. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  10008. #endif
  10009. }
  10010. GH_INLINE U8 GH_USB_get_TxFuncAddr(U8 index)
  10011. {
  10012. U8 value = (*(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10013. #if GH_USB_ENABLE_DEBUG_PRINT
  10014. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFuncAddr] --> 0x%08x\n",
  10015. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10016. #endif
  10017. return value;
  10018. }
  10019. GH_INLINE void GH_USB_set_TxFuncAddr_AddressofTargetFunction(U8 index, U8 data)
  10020. {
  10021. GH_USB_TXFUNCADDR_S d;
  10022. d.all = *(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008));
  10023. d.bitc.addressoftargetfunction = data;
  10024. *(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10025. #if GH_USB_ENABLE_DEBUG_PRINT
  10026. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxFuncAddr_AddressofTargetFunction] <-- 0x%08x\n",
  10027. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10028. #endif
  10029. }
  10030. GH_INLINE U8 GH_USB_get_TxFuncAddr_AddressofTargetFunction(U8 index)
  10031. {
  10032. GH_USB_TXFUNCADDR_S tmp_value;
  10033. U8 value = (*(volatile U8 *)(REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10034. tmp_value.all = value;
  10035. #if GH_USB_ENABLE_DEBUG_PRINT
  10036. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxFuncAddr_AddressofTargetFunction] --> 0x%08x\n",
  10037. (REG_USB_TXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10038. #endif
  10039. return tmp_value.bitc.addressoftargetfunction;
  10040. }
  10041. #endif /* GH_INLINE_LEVEL == 0 */
  10042. /*----------------------------------------------------------------------------*/
  10043. /* register USB_TxHubAddr (read/write) */
  10044. /*----------------------------------------------------------------------------*/
  10045. #if GH_INLINE_LEVEL == 0
  10046. /*! \brief Writes the register 'USB_TxHubAddr'. */
  10047. void GH_USB_set_TxHubAddr(U8 index, U8 data);
  10048. /*! \brief Reads the register 'USB_TxHubAddr'. */
  10049. U8 GH_USB_get_TxHubAddr(U8 index);
  10050. /*! \brief Writes the bit group 'HubAddress' of register 'USB_TxHubAddr'. */
  10051. void GH_USB_set_TxHubAddr_HubAddress(U8 index, U8 data);
  10052. /*! \brief Reads the bit group 'HubAddress' of register 'USB_TxHubAddr'. */
  10053. U8 GH_USB_get_TxHubAddr_HubAddress(U8 index);
  10054. /*! \brief Writes the bit group 'MultipleTranslators' of register 'USB_TxHubAddr'. */
  10055. void GH_USB_set_TxHubAddr_MultipleTranslators(U8 index, U8 data);
  10056. /*! \brief Reads the bit group 'MultipleTranslators' of register 'USB_TxHubAddr'. */
  10057. U8 GH_USB_get_TxHubAddr_MultipleTranslators(U8 index);
  10058. #else /* GH_INLINE_LEVEL == 0 */
  10059. GH_INLINE void GH_USB_set_TxHubAddr(U8 index, U8 data)
  10060. {
  10061. *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  10062. #if GH_USB_ENABLE_DEBUG_PRINT
  10063. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubAddr] <-- 0x%08x\n",
  10064. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  10065. #endif
  10066. }
  10067. GH_INLINE U8 GH_USB_get_TxHubAddr(U8 index)
  10068. {
  10069. U8 value = (*(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10070. #if GH_USB_ENABLE_DEBUG_PRINT
  10071. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubAddr] --> 0x%08x\n",
  10072. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10073. #endif
  10074. return value;
  10075. }
  10076. GH_INLINE void GH_USB_set_TxHubAddr_HubAddress(U8 index, U8 data)
  10077. {
  10078. GH_USB_TXHUBADDR_S d;
  10079. d.all = *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  10080. d.bitc.hubaddress = data;
  10081. *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10082. #if GH_USB_ENABLE_DEBUG_PRINT
  10083. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubAddr_HubAddress] <-- 0x%08x\n",
  10084. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10085. #endif
  10086. }
  10087. GH_INLINE U8 GH_USB_get_TxHubAddr_HubAddress(U8 index)
  10088. {
  10089. GH_USB_TXHUBADDR_S tmp_value;
  10090. U8 value = (*(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10091. tmp_value.all = value;
  10092. #if GH_USB_ENABLE_DEBUG_PRINT
  10093. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubAddr_HubAddress] --> 0x%08x\n",
  10094. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10095. #endif
  10096. return tmp_value.bitc.hubaddress;
  10097. }
  10098. GH_INLINE void GH_USB_set_TxHubAddr_MultipleTranslators(U8 index, U8 data)
  10099. {
  10100. GH_USB_TXHUBADDR_S d;
  10101. d.all = *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  10102. d.bitc.multipletranslators = data;
  10103. *(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10104. #if GH_USB_ENABLE_DEBUG_PRINT
  10105. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubAddr_MultipleTranslators] <-- 0x%08x\n",
  10106. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10107. #endif
  10108. }
  10109. GH_INLINE U8 GH_USB_get_TxHubAddr_MultipleTranslators(U8 index)
  10110. {
  10111. GH_USB_TXHUBADDR_S tmp_value;
  10112. U8 value = (*(volatile U8 *)(REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10113. tmp_value.all = value;
  10114. #if GH_USB_ENABLE_DEBUG_PRINT
  10115. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubAddr_MultipleTranslators] --> 0x%08x\n",
  10116. (REG_USB_TXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10117. #endif
  10118. return tmp_value.bitc.multipletranslators;
  10119. }
  10120. #endif /* GH_INLINE_LEVEL == 0 */
  10121. /*----------------------------------------------------------------------------*/
  10122. /* register USB_TxHubPort (read/write) */
  10123. /*----------------------------------------------------------------------------*/
  10124. #if GH_INLINE_LEVEL == 0
  10125. /*! \brief Writes the register 'USB_TxHubPort'. */
  10126. void GH_USB_set_TxHubPort(U8 index, U8 data);
  10127. /*! \brief Reads the register 'USB_TxHubPort'. */
  10128. U8 GH_USB_get_TxHubPort(U8 index);
  10129. /*! \brief Writes the bit group 'HubPort' of register 'USB_TxHubPort'. */
  10130. void GH_USB_set_TxHubPort_HubPort(U8 index, U8 data);
  10131. /*! \brief Reads the bit group 'HubPort' of register 'USB_TxHubPort'. */
  10132. U8 GH_USB_get_TxHubPort_HubPort(U8 index);
  10133. #else /* GH_INLINE_LEVEL == 0 */
  10134. GH_INLINE void GH_USB_set_TxHubPort(U8 index, U8 data)
  10135. {
  10136. *(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = data;
  10137. #if GH_USB_ENABLE_DEBUG_PRINT
  10138. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubPort] <-- 0x%08x\n",
  10139. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  10140. #endif
  10141. }
  10142. GH_INLINE U8 GH_USB_get_TxHubPort(U8 index)
  10143. {
  10144. U8 value = (*(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  10145. #if GH_USB_ENABLE_DEBUG_PRINT
  10146. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubPort] --> 0x%08x\n",
  10147. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  10148. #endif
  10149. return value;
  10150. }
  10151. GH_INLINE void GH_USB_set_TxHubPort_HubPort(U8 index, U8 data)
  10152. {
  10153. GH_USB_TXHUBPORT_S d;
  10154. d.all = *(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008));
  10155. d.bitc.hubport = data;
  10156. *(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10157. #if GH_USB_ENABLE_DEBUG_PRINT
  10158. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxHubPort_HubPort] <-- 0x%08x\n",
  10159. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10160. #endif
  10161. }
  10162. GH_INLINE U8 GH_USB_get_TxHubPort_HubPort(U8 index)
  10163. {
  10164. GH_USB_TXHUBPORT_S tmp_value;
  10165. U8 value = (*(volatile U8 *)(REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  10166. tmp_value.all = value;
  10167. #if GH_USB_ENABLE_DEBUG_PRINT
  10168. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxHubPort_HubPort] --> 0x%08x\n",
  10169. (REG_USB_TXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  10170. #endif
  10171. return tmp_value.bitc.hubport;
  10172. }
  10173. #endif /* GH_INLINE_LEVEL == 0 */
  10174. /*----------------------------------------------------------------------------*/
  10175. /* register USB_RxFuncAddr (read/write) */
  10176. /*----------------------------------------------------------------------------*/
  10177. #if GH_INLINE_LEVEL == 0
  10178. /*! \brief Writes the register 'USB_RxFuncAddr'. */
  10179. void GH_USB_set_RxFuncAddr(U8 index, U8 data);
  10180. /*! \brief Reads the register 'USB_RxFuncAddr'. */
  10181. U8 GH_USB_get_RxFuncAddr(U8 index);
  10182. /*! \brief Writes the bit group 'AddressofTargetFunction' of register 'USB_RxFuncAddr'. */
  10183. void GH_USB_set_RxFuncAddr_AddressofTargetFunction(U8 index, U8 data);
  10184. /*! \brief Reads the bit group 'AddressofTargetFunction' of register 'USB_RxFuncAddr'. */
  10185. U8 GH_USB_get_RxFuncAddr_AddressofTargetFunction(U8 index);
  10186. #else /* GH_INLINE_LEVEL == 0 */
  10187. GH_INLINE void GH_USB_set_RxFuncAddr(U8 index, U8 data)
  10188. {
  10189. *(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  10190. #if GH_USB_ENABLE_DEBUG_PRINT
  10191. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFuncAddr] <-- 0x%08x\n",
  10192. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  10193. #endif
  10194. }
  10195. GH_INLINE U8 GH_USB_get_RxFuncAddr(U8 index)
  10196. {
  10197. U8 value = (*(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10198. #if GH_USB_ENABLE_DEBUG_PRINT
  10199. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFuncAddr] --> 0x%08x\n",
  10200. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10201. #endif
  10202. return value;
  10203. }
  10204. GH_INLINE void GH_USB_set_RxFuncAddr_AddressofTargetFunction(U8 index, U8 data)
  10205. {
  10206. GH_USB_RXFUNCADDR_S d;
  10207. d.all = *(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008));
  10208. d.bitc.addressoftargetfunction = data;
  10209. *(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10210. #if GH_USB_ENABLE_DEBUG_PRINT
  10211. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxFuncAddr_AddressofTargetFunction] <-- 0x%08x\n",
  10212. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10213. #endif
  10214. }
  10215. GH_INLINE U8 GH_USB_get_RxFuncAddr_AddressofTargetFunction(U8 index)
  10216. {
  10217. GH_USB_RXFUNCADDR_S tmp_value;
  10218. U8 value = (*(volatile U8 *)(REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10219. tmp_value.all = value;
  10220. #if GH_USB_ENABLE_DEBUG_PRINT
  10221. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxFuncAddr_AddressofTargetFunction] --> 0x%08x\n",
  10222. (REG_USB_RXFUNCADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10223. #endif
  10224. return tmp_value.bitc.addressoftargetfunction;
  10225. }
  10226. #endif /* GH_INLINE_LEVEL == 0 */
  10227. /*----------------------------------------------------------------------------*/
  10228. /* register USB_RxHubAddr (read/write) */
  10229. /*----------------------------------------------------------------------------*/
  10230. #if GH_INLINE_LEVEL == 0
  10231. /*! \brief Writes the register 'USB_RxHubAddr'. */
  10232. void GH_USB_set_RxHubAddr(U8 index, U8 data);
  10233. /*! \brief Reads the register 'USB_RxHubAddr'. */
  10234. U8 GH_USB_get_RxHubAddr(U8 index);
  10235. /*! \brief Writes the bit group 'HubAddress' of register 'USB_RxHubAddr'. */
  10236. void GH_USB_set_RxHubAddr_HubAddress(U8 index, U8 data);
  10237. /*! \brief Reads the bit group 'HubAddress' of register 'USB_RxHubAddr'. */
  10238. U8 GH_USB_get_RxHubAddr_HubAddress(U8 index);
  10239. /*! \brief Writes the bit group 'MultipleTranslators' of register 'USB_RxHubAddr'. */
  10240. void GH_USB_set_RxHubAddr_MultipleTranslators(U8 index, U8 data);
  10241. /*! \brief Reads the bit group 'MultipleTranslators' of register 'USB_RxHubAddr'. */
  10242. U8 GH_USB_get_RxHubAddr_MultipleTranslators(U8 index);
  10243. #else /* GH_INLINE_LEVEL == 0 */
  10244. GH_INLINE void GH_USB_set_RxHubAddr(U8 index, U8 data)
  10245. {
  10246. *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = data;
  10247. #if GH_USB_ENABLE_DEBUG_PRINT
  10248. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubAddr] <-- 0x%08x\n",
  10249. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  10250. #endif
  10251. }
  10252. GH_INLINE U8 GH_USB_get_RxHubAddr(U8 index)
  10253. {
  10254. U8 value = (*(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10255. #if GH_USB_ENABLE_DEBUG_PRINT
  10256. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubAddr] --> 0x%08x\n",
  10257. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10258. #endif
  10259. return value;
  10260. }
  10261. GH_INLINE void GH_USB_set_RxHubAddr_HubAddress(U8 index, U8 data)
  10262. {
  10263. GH_USB_RXHUBADDR_S d;
  10264. d.all = *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  10265. d.bitc.hubaddress = data;
  10266. *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10267. #if GH_USB_ENABLE_DEBUG_PRINT
  10268. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubAddr_HubAddress] <-- 0x%08x\n",
  10269. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10270. #endif
  10271. }
  10272. GH_INLINE U8 GH_USB_get_RxHubAddr_HubAddress(U8 index)
  10273. {
  10274. GH_USB_RXHUBADDR_S tmp_value;
  10275. U8 value = (*(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10276. tmp_value.all = value;
  10277. #if GH_USB_ENABLE_DEBUG_PRINT
  10278. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubAddr_HubAddress] --> 0x%08x\n",
  10279. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10280. #endif
  10281. return tmp_value.bitc.hubaddress;
  10282. }
  10283. GH_INLINE void GH_USB_set_RxHubAddr_MultipleTranslators(U8 index, U8 data)
  10284. {
  10285. GH_USB_RXHUBADDR_S d;
  10286. d.all = *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008));
  10287. d.bitc.multipletranslators = data;
  10288. *(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10289. #if GH_USB_ENABLE_DEBUG_PRINT
  10290. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubAddr_MultipleTranslators] <-- 0x%08x\n",
  10291. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10292. #endif
  10293. }
  10294. GH_INLINE U8 GH_USB_get_RxHubAddr_MultipleTranslators(U8 index)
  10295. {
  10296. GH_USB_RXHUBADDR_S tmp_value;
  10297. U8 value = (*(volatile U8 *)(REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)));
  10298. tmp_value.all = value;
  10299. #if GH_USB_ENABLE_DEBUG_PRINT
  10300. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubAddr_MultipleTranslators] --> 0x%08x\n",
  10301. (REG_USB_RXHUBADDR + index * FIO_MOFFSET(USB,0x00000008)),value);
  10302. #endif
  10303. return tmp_value.bitc.multipletranslators;
  10304. }
  10305. #endif /* GH_INLINE_LEVEL == 0 */
  10306. /*----------------------------------------------------------------------------*/
  10307. /* register USB_RxHubPort (read/write) */
  10308. /*----------------------------------------------------------------------------*/
  10309. #if GH_INLINE_LEVEL == 0
  10310. /*! \brief Writes the register 'USB_RxHubPort'. */
  10311. void GH_USB_set_RxHubPort(U8 index, U8 data);
  10312. /*! \brief Reads the register 'USB_RxHubPort'. */
  10313. U8 GH_USB_get_RxHubPort(U8 index);
  10314. /*! \brief Writes the bit group 'HubPort' of register 'USB_RxHubPort'. */
  10315. void GH_USB_set_RxHubPort_HubPort(U8 index, U8 data);
  10316. /*! \brief Reads the bit group 'HubPort' of register 'USB_RxHubPort'. */
  10317. U8 GH_USB_get_RxHubPort_HubPort(U8 index);
  10318. #else /* GH_INLINE_LEVEL == 0 */
  10319. GH_INLINE void GH_USB_set_RxHubPort(U8 index, U8 data)
  10320. {
  10321. *(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = data;
  10322. #if GH_USB_ENABLE_DEBUG_PRINT
  10323. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubPort] <-- 0x%08x\n",
  10324. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),data,data);
  10325. #endif
  10326. }
  10327. GH_INLINE U8 GH_USB_get_RxHubPort(U8 index)
  10328. {
  10329. U8 value = (*(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  10330. #if GH_USB_ENABLE_DEBUG_PRINT
  10331. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubPort] --> 0x%08x\n",
  10332. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  10333. #endif
  10334. return value;
  10335. }
  10336. GH_INLINE void GH_USB_set_RxHubPort_HubPort(U8 index, U8 data)
  10337. {
  10338. GH_USB_RXHUBPORT_S d;
  10339. d.all = *(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008));
  10340. d.bitc.hubport = data;
  10341. *(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)) = d.all;
  10342. #if GH_USB_ENABLE_DEBUG_PRINT
  10343. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxHubPort_HubPort] <-- 0x%08x\n",
  10344. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),d.all,d.all);
  10345. #endif
  10346. }
  10347. GH_INLINE U8 GH_USB_get_RxHubPort_HubPort(U8 index)
  10348. {
  10349. GH_USB_RXHUBPORT_S tmp_value;
  10350. U8 value = (*(volatile U8 *)(REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)));
  10351. tmp_value.all = value;
  10352. #if GH_USB_ENABLE_DEBUG_PRINT
  10353. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxHubPort_HubPort] --> 0x%08x\n",
  10354. (REG_USB_RXHUBPORT + index * FIO_MOFFSET(USB,0x00000008)),value);
  10355. #endif
  10356. return tmp_value.bitc.hubport;
  10357. }
  10358. #endif /* GH_INLINE_LEVEL == 0 */
  10359. /*----------------------------------------------------------------------------*/
  10360. /* register USB_DMA_INTR (read/write) */
  10361. /*----------------------------------------------------------------------------*/
  10362. #if GH_INLINE_LEVEL == 0
  10363. /*! \brief Writes the register 'USB_DMA_INTR'. */
  10364. void GH_USB_set_DMA_INTR(U8 data);
  10365. /*! \brief Reads the register 'USB_DMA_INTR'. */
  10366. U8 GH_USB_get_DMA_INTR(void);
  10367. /*! \brief Writes the bit group 'CH0' of register 'USB_DMA_INTR'. */
  10368. void GH_USB_set_DMA_INTR_CH0(U8 data);
  10369. /*! \brief Reads the bit group 'CH0' of register 'USB_DMA_INTR'. */
  10370. U8 GH_USB_get_DMA_INTR_CH0(void);
  10371. /*! \brief Writes the bit group 'CH1' of register 'USB_DMA_INTR'. */
  10372. void GH_USB_set_DMA_INTR_CH1(U8 data);
  10373. /*! \brief Reads the bit group 'CH1' of register 'USB_DMA_INTR'. */
  10374. U8 GH_USB_get_DMA_INTR_CH1(void);
  10375. /*! \brief Writes the bit group 'CH2' of register 'USB_DMA_INTR'. */
  10376. void GH_USB_set_DMA_INTR_CH2(U8 data);
  10377. /*! \brief Reads the bit group 'CH2' of register 'USB_DMA_INTR'. */
  10378. U8 GH_USB_get_DMA_INTR_CH2(void);
  10379. /*! \brief Writes the bit group 'CH3' of register 'USB_DMA_INTR'. */
  10380. void GH_USB_set_DMA_INTR_CH3(U8 data);
  10381. /*! \brief Reads the bit group 'CH3' of register 'USB_DMA_INTR'. */
  10382. U8 GH_USB_get_DMA_INTR_CH3(void);
  10383. /*! \brief Writes the bit group 'CH4' of register 'USB_DMA_INTR'. */
  10384. void GH_USB_set_DMA_INTR_CH4(U8 data);
  10385. /*! \brief Reads the bit group 'CH4' of register 'USB_DMA_INTR'. */
  10386. U8 GH_USB_get_DMA_INTR_CH4(void);
  10387. /*! \brief Writes the bit group 'CH5' of register 'USB_DMA_INTR'. */
  10388. void GH_USB_set_DMA_INTR_CH5(U8 data);
  10389. /*! \brief Reads the bit group 'CH5' of register 'USB_DMA_INTR'. */
  10390. U8 GH_USB_get_DMA_INTR_CH5(void);
  10391. /*! \brief Writes the bit group 'CH6' of register 'USB_DMA_INTR'. */
  10392. void GH_USB_set_DMA_INTR_CH6(U8 data);
  10393. /*! \brief Reads the bit group 'CH6' of register 'USB_DMA_INTR'. */
  10394. U8 GH_USB_get_DMA_INTR_CH6(void);
  10395. /*! \brief Writes the bit group 'CH7' of register 'USB_DMA_INTR'. */
  10396. void GH_USB_set_DMA_INTR_CH7(U8 data);
  10397. /*! \brief Reads the bit group 'CH7' of register 'USB_DMA_INTR'. */
  10398. U8 GH_USB_get_DMA_INTR_CH7(void);
  10399. #else /* GH_INLINE_LEVEL == 0 */
  10400. GH_INLINE void GH_USB_set_DMA_INTR(U8 data)
  10401. {
  10402. *(volatile U8 *)REG_USB_DMA_INTR = data;
  10403. #if GH_USB_ENABLE_DEBUG_PRINT
  10404. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR] <-- 0x%08x\n",
  10405. REG_USB_DMA_INTR,data,data);
  10406. #endif
  10407. }
  10408. GH_INLINE U8 GH_USB_get_DMA_INTR(void)
  10409. {
  10410. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10411. #if GH_USB_ENABLE_DEBUG_PRINT
  10412. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR] --> 0x%08x\n",
  10413. REG_USB_DMA_INTR,value);
  10414. #endif
  10415. return value;
  10416. }
  10417. GH_INLINE void GH_USB_set_DMA_INTR_CH0(U8 data)
  10418. {
  10419. GH_USB_DMA_INTR_S d;
  10420. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10421. d.bitc.ch0 = data;
  10422. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10423. #if GH_USB_ENABLE_DEBUG_PRINT
  10424. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH0] <-- 0x%08x\n",
  10425. REG_USB_DMA_INTR,d.all,d.all);
  10426. #endif
  10427. }
  10428. GH_INLINE U8 GH_USB_get_DMA_INTR_CH0(void)
  10429. {
  10430. GH_USB_DMA_INTR_S tmp_value;
  10431. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10432. tmp_value.all = value;
  10433. #if GH_USB_ENABLE_DEBUG_PRINT
  10434. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH0] --> 0x%08x\n",
  10435. REG_USB_DMA_INTR,value);
  10436. #endif
  10437. return tmp_value.bitc.ch0;
  10438. }
  10439. GH_INLINE void GH_USB_set_DMA_INTR_CH1(U8 data)
  10440. {
  10441. GH_USB_DMA_INTR_S d;
  10442. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10443. d.bitc.ch1 = data;
  10444. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10445. #if GH_USB_ENABLE_DEBUG_PRINT
  10446. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH1] <-- 0x%08x\n",
  10447. REG_USB_DMA_INTR,d.all,d.all);
  10448. #endif
  10449. }
  10450. GH_INLINE U8 GH_USB_get_DMA_INTR_CH1(void)
  10451. {
  10452. GH_USB_DMA_INTR_S tmp_value;
  10453. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10454. tmp_value.all = value;
  10455. #if GH_USB_ENABLE_DEBUG_PRINT
  10456. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH1] --> 0x%08x\n",
  10457. REG_USB_DMA_INTR,value);
  10458. #endif
  10459. return tmp_value.bitc.ch1;
  10460. }
  10461. GH_INLINE void GH_USB_set_DMA_INTR_CH2(U8 data)
  10462. {
  10463. GH_USB_DMA_INTR_S d;
  10464. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10465. d.bitc.ch2 = data;
  10466. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10467. #if GH_USB_ENABLE_DEBUG_PRINT
  10468. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH2] <-- 0x%08x\n",
  10469. REG_USB_DMA_INTR,d.all,d.all);
  10470. #endif
  10471. }
  10472. GH_INLINE U8 GH_USB_get_DMA_INTR_CH2(void)
  10473. {
  10474. GH_USB_DMA_INTR_S tmp_value;
  10475. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10476. tmp_value.all = value;
  10477. #if GH_USB_ENABLE_DEBUG_PRINT
  10478. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH2] --> 0x%08x\n",
  10479. REG_USB_DMA_INTR,value);
  10480. #endif
  10481. return tmp_value.bitc.ch2;
  10482. }
  10483. GH_INLINE void GH_USB_set_DMA_INTR_CH3(U8 data)
  10484. {
  10485. GH_USB_DMA_INTR_S d;
  10486. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10487. d.bitc.ch3 = data;
  10488. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10489. #if GH_USB_ENABLE_DEBUG_PRINT
  10490. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH3] <-- 0x%08x\n",
  10491. REG_USB_DMA_INTR,d.all,d.all);
  10492. #endif
  10493. }
  10494. GH_INLINE U8 GH_USB_get_DMA_INTR_CH3(void)
  10495. {
  10496. GH_USB_DMA_INTR_S tmp_value;
  10497. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10498. tmp_value.all = value;
  10499. #if GH_USB_ENABLE_DEBUG_PRINT
  10500. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH3] --> 0x%08x\n",
  10501. REG_USB_DMA_INTR,value);
  10502. #endif
  10503. return tmp_value.bitc.ch3;
  10504. }
  10505. GH_INLINE void GH_USB_set_DMA_INTR_CH4(U8 data)
  10506. {
  10507. GH_USB_DMA_INTR_S d;
  10508. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10509. d.bitc.ch4 = data;
  10510. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10511. #if GH_USB_ENABLE_DEBUG_PRINT
  10512. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH4] <-- 0x%08x\n",
  10513. REG_USB_DMA_INTR,d.all,d.all);
  10514. #endif
  10515. }
  10516. GH_INLINE U8 GH_USB_get_DMA_INTR_CH4(void)
  10517. {
  10518. GH_USB_DMA_INTR_S tmp_value;
  10519. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10520. tmp_value.all = value;
  10521. #if GH_USB_ENABLE_DEBUG_PRINT
  10522. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH4] --> 0x%08x\n",
  10523. REG_USB_DMA_INTR,value);
  10524. #endif
  10525. return tmp_value.bitc.ch4;
  10526. }
  10527. GH_INLINE void GH_USB_set_DMA_INTR_CH5(U8 data)
  10528. {
  10529. GH_USB_DMA_INTR_S d;
  10530. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10531. d.bitc.ch5 = data;
  10532. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10533. #if GH_USB_ENABLE_DEBUG_PRINT
  10534. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH5] <-- 0x%08x\n",
  10535. REG_USB_DMA_INTR,d.all,d.all);
  10536. #endif
  10537. }
  10538. GH_INLINE U8 GH_USB_get_DMA_INTR_CH5(void)
  10539. {
  10540. GH_USB_DMA_INTR_S tmp_value;
  10541. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10542. tmp_value.all = value;
  10543. #if GH_USB_ENABLE_DEBUG_PRINT
  10544. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH5] --> 0x%08x\n",
  10545. REG_USB_DMA_INTR,value);
  10546. #endif
  10547. return tmp_value.bitc.ch5;
  10548. }
  10549. GH_INLINE void GH_USB_set_DMA_INTR_CH6(U8 data)
  10550. {
  10551. GH_USB_DMA_INTR_S d;
  10552. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10553. d.bitc.ch6 = data;
  10554. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10555. #if GH_USB_ENABLE_DEBUG_PRINT
  10556. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH6] <-- 0x%08x\n",
  10557. REG_USB_DMA_INTR,d.all,d.all);
  10558. #endif
  10559. }
  10560. GH_INLINE U8 GH_USB_get_DMA_INTR_CH6(void)
  10561. {
  10562. GH_USB_DMA_INTR_S tmp_value;
  10563. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10564. tmp_value.all = value;
  10565. #if GH_USB_ENABLE_DEBUG_PRINT
  10566. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH6] --> 0x%08x\n",
  10567. REG_USB_DMA_INTR,value);
  10568. #endif
  10569. return tmp_value.bitc.ch6;
  10570. }
  10571. GH_INLINE void GH_USB_set_DMA_INTR_CH7(U8 data)
  10572. {
  10573. GH_USB_DMA_INTR_S d;
  10574. d.all = *(volatile U8 *)REG_USB_DMA_INTR;
  10575. d.bitc.ch7 = data;
  10576. *(volatile U8 *)REG_USB_DMA_INTR = d.all;
  10577. #if GH_USB_ENABLE_DEBUG_PRINT
  10578. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_INTR_CH7] <-- 0x%08x\n",
  10579. REG_USB_DMA_INTR,d.all,d.all);
  10580. #endif
  10581. }
  10582. GH_INLINE U8 GH_USB_get_DMA_INTR_CH7(void)
  10583. {
  10584. GH_USB_DMA_INTR_S tmp_value;
  10585. U8 value = (*(volatile U8 *)REG_USB_DMA_INTR);
  10586. tmp_value.all = value;
  10587. #if GH_USB_ENABLE_DEBUG_PRINT
  10588. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_INTR_CH7] --> 0x%08x\n",
  10589. REG_USB_DMA_INTR,value);
  10590. #endif
  10591. return tmp_value.bitc.ch7;
  10592. }
  10593. #endif /* GH_INLINE_LEVEL == 0 */
  10594. /*----------------------------------------------------------------------------*/
  10595. /* register USB_DMA_CNTL (read/write) */
  10596. /*----------------------------------------------------------------------------*/
  10597. #if GH_INLINE_LEVEL == 0
  10598. /*! \brief Writes the register 'USB_DMA_CNTL'. */
  10599. void GH_USB_set_DMA_CNTL(U8 index, U16 data);
  10600. /*! \brief Reads the register 'USB_DMA_CNTL'. */
  10601. U16 GH_USB_get_DMA_CNTL(U8 index);
  10602. /*! \brief Writes the bit group 'DMA_ENAB' of register 'USB_DMA_CNTL'. */
  10603. void GH_USB_set_DMA_CNTL_DMA_ENAB(U8 index, U8 data);
  10604. /*! \brief Reads the bit group 'DMA_ENAB' of register 'USB_DMA_CNTL'. */
  10605. U8 GH_USB_get_DMA_CNTL_DMA_ENAB(U8 index);
  10606. /*! \brief Writes the bit group 'DMA_DIR' of register 'USB_DMA_CNTL'. */
  10607. void GH_USB_set_DMA_CNTL_DMA_DIR(U8 index, U8 data);
  10608. /*! \brief Reads the bit group 'DMA_DIR' of register 'USB_DMA_CNTL'. */
  10609. U8 GH_USB_get_DMA_CNTL_DMA_DIR(U8 index);
  10610. /*! \brief Writes the bit group 'DMAMODE' of register 'USB_DMA_CNTL'. */
  10611. void GH_USB_set_DMA_CNTL_DMAMODE(U8 index, U8 data);
  10612. /*! \brief Reads the bit group 'DMAMODE' of register 'USB_DMA_CNTL'. */
  10613. U8 GH_USB_get_DMA_CNTL_DMAMODE(U8 index);
  10614. /*! \brief Writes the bit group 'DMAIE' of register 'USB_DMA_CNTL'. */
  10615. void GH_USB_set_DMA_CNTL_DMAIE(U8 index, U8 data);
  10616. /*! \brief Reads the bit group 'DMAIE' of register 'USB_DMA_CNTL'. */
  10617. U8 GH_USB_get_DMA_CNTL_DMAIE(U8 index);
  10618. /*! \brief Writes the bit group 'DMAEP' of register 'USB_DMA_CNTL'. */
  10619. void GH_USB_set_DMA_CNTL_DMAEP(U8 index, U8 data);
  10620. /*! \brief Reads the bit group 'DMAEP' of register 'USB_DMA_CNTL'. */
  10621. U8 GH_USB_get_DMA_CNTL_DMAEP(U8 index);
  10622. /*! \brief Writes the bit group 'DMA_ERR' of register 'USB_DMA_CNTL'. */
  10623. void GH_USB_set_DMA_CNTL_DMA_ERR(U8 index, U8 data);
  10624. /*! \brief Reads the bit group 'DMA_ERR' of register 'USB_DMA_CNTL'. */
  10625. U8 GH_USB_get_DMA_CNTL_DMA_ERR(U8 index);
  10626. /*! \brief Writes the bit group 'DMA_BRSTM' of register 'USB_DMA_CNTL'. */
  10627. void GH_USB_set_DMA_CNTL_DMA_BRSTM(U8 index, U8 data);
  10628. /*! \brief Reads the bit group 'DMA_BRSTM' of register 'USB_DMA_CNTL'. */
  10629. U8 GH_USB_get_DMA_CNTL_DMA_BRSTM(U8 index);
  10630. #else /* GH_INLINE_LEVEL == 0 */
  10631. GH_INLINE void GH_USB_set_DMA_CNTL(U8 index, U16 data)
  10632. {
  10633. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = data;
  10634. #if GH_USB_ENABLE_DEBUG_PRINT
  10635. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL] <-- 0x%08x\n",
  10636. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),data,data);
  10637. #endif
  10638. }
  10639. GH_INLINE U16 GH_USB_get_DMA_CNTL(U8 index)
  10640. {
  10641. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10642. #if GH_USB_ENABLE_DEBUG_PRINT
  10643. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL] --> 0x%08x\n",
  10644. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10645. #endif
  10646. return value;
  10647. }
  10648. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_ENAB(U8 index, U8 data)
  10649. {
  10650. GH_USB_DMA_CNTL_S d;
  10651. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  10652. d.bitc.dma_enab = data;
  10653. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  10654. #if GH_USB_ENABLE_DEBUG_PRINT
  10655. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_ENAB] <-- 0x%08x\n",
  10656. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  10657. #endif
  10658. }
  10659. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_ENAB(U8 index)
  10660. {
  10661. GH_USB_DMA_CNTL_S tmp_value;
  10662. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10663. tmp_value.all = value;
  10664. #if GH_USB_ENABLE_DEBUG_PRINT
  10665. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_ENAB] --> 0x%08x\n",
  10666. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10667. #endif
  10668. return tmp_value.bitc.dma_enab;
  10669. }
  10670. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_DIR(U8 index, U8 data)
  10671. {
  10672. GH_USB_DMA_CNTL_S d;
  10673. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  10674. d.bitc.dma_dir = data;
  10675. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  10676. #if GH_USB_ENABLE_DEBUG_PRINT
  10677. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_DIR] <-- 0x%08x\n",
  10678. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  10679. #endif
  10680. }
  10681. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_DIR(U8 index)
  10682. {
  10683. GH_USB_DMA_CNTL_S tmp_value;
  10684. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10685. tmp_value.all = value;
  10686. #if GH_USB_ENABLE_DEBUG_PRINT
  10687. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_DIR] --> 0x%08x\n",
  10688. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10689. #endif
  10690. return tmp_value.bitc.dma_dir;
  10691. }
  10692. GH_INLINE void GH_USB_set_DMA_CNTL_DMAMODE(U8 index, U8 data)
  10693. {
  10694. GH_USB_DMA_CNTL_S d;
  10695. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  10696. d.bitc.dmamode = data;
  10697. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  10698. #if GH_USB_ENABLE_DEBUG_PRINT
  10699. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMAMODE] <-- 0x%08x\n",
  10700. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  10701. #endif
  10702. }
  10703. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMAMODE(U8 index)
  10704. {
  10705. GH_USB_DMA_CNTL_S tmp_value;
  10706. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10707. tmp_value.all = value;
  10708. #if GH_USB_ENABLE_DEBUG_PRINT
  10709. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMAMODE] --> 0x%08x\n",
  10710. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10711. #endif
  10712. return tmp_value.bitc.dmamode;
  10713. }
  10714. GH_INLINE void GH_USB_set_DMA_CNTL_DMAIE(U8 index, U8 data)
  10715. {
  10716. GH_USB_DMA_CNTL_S d;
  10717. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  10718. d.bitc.dmaie = data;
  10719. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  10720. #if GH_USB_ENABLE_DEBUG_PRINT
  10721. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMAIE] <-- 0x%08x\n",
  10722. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  10723. #endif
  10724. }
  10725. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMAIE(U8 index)
  10726. {
  10727. GH_USB_DMA_CNTL_S tmp_value;
  10728. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10729. tmp_value.all = value;
  10730. #if GH_USB_ENABLE_DEBUG_PRINT
  10731. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMAIE] --> 0x%08x\n",
  10732. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10733. #endif
  10734. return tmp_value.bitc.dmaie;
  10735. }
  10736. GH_INLINE void GH_USB_set_DMA_CNTL_DMAEP(U8 index, U8 data)
  10737. {
  10738. GH_USB_DMA_CNTL_S d;
  10739. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  10740. d.bitc.dmaep = data;
  10741. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  10742. #if GH_USB_ENABLE_DEBUG_PRINT
  10743. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMAEP] <-- 0x%08x\n",
  10744. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  10745. #endif
  10746. }
  10747. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMAEP(U8 index)
  10748. {
  10749. GH_USB_DMA_CNTL_S tmp_value;
  10750. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10751. tmp_value.all = value;
  10752. #if GH_USB_ENABLE_DEBUG_PRINT
  10753. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMAEP] --> 0x%08x\n",
  10754. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10755. #endif
  10756. return tmp_value.bitc.dmaep;
  10757. }
  10758. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_ERR(U8 index, U8 data)
  10759. {
  10760. GH_USB_DMA_CNTL_S d;
  10761. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  10762. d.bitc.dma_err = data;
  10763. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  10764. #if GH_USB_ENABLE_DEBUG_PRINT
  10765. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_ERR] <-- 0x%08x\n",
  10766. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  10767. #endif
  10768. }
  10769. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_ERR(U8 index)
  10770. {
  10771. GH_USB_DMA_CNTL_S tmp_value;
  10772. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10773. tmp_value.all = value;
  10774. #if GH_USB_ENABLE_DEBUG_PRINT
  10775. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_ERR] --> 0x%08x\n",
  10776. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10777. #endif
  10778. return tmp_value.bitc.dma_err;
  10779. }
  10780. GH_INLINE void GH_USB_set_DMA_CNTL_DMA_BRSTM(U8 index, U8 data)
  10781. {
  10782. GH_USB_DMA_CNTL_S d;
  10783. d.all = *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010));
  10784. d.bitc.dma_brstm = data;
  10785. *(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)) = d.all;
  10786. #if GH_USB_ENABLE_DEBUG_PRINT
  10787. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_CNTL_DMA_BRSTM] <-- 0x%08x\n",
  10788. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),d.all,d.all);
  10789. #endif
  10790. }
  10791. GH_INLINE U8 GH_USB_get_DMA_CNTL_DMA_BRSTM(U8 index)
  10792. {
  10793. GH_USB_DMA_CNTL_S tmp_value;
  10794. U16 value = (*(volatile U16 *)(REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)));
  10795. tmp_value.all = value;
  10796. #if GH_USB_ENABLE_DEBUG_PRINT
  10797. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_CNTL_DMA_BRSTM] --> 0x%08x\n",
  10798. (REG_USB_DMA_CNTL + index * FIO_MOFFSET(USB,0x00000010)),value);
  10799. #endif
  10800. return tmp_value.bitc.dma_brstm;
  10801. }
  10802. #endif /* GH_INLINE_LEVEL == 0 */
  10803. /*----------------------------------------------------------------------------*/
  10804. /* register USB_DMA_ADDR (read/write) */
  10805. /*----------------------------------------------------------------------------*/
  10806. #if GH_INLINE_LEVEL == 0
  10807. /*! \brief Writes the register 'USB_DMA_ADDR'. */
  10808. void GH_USB_set_DMA_ADDR(U8 index, U32 data);
  10809. /*! \brief Reads the register 'USB_DMA_ADDR'. */
  10810. U32 GH_USB_get_DMA_ADDR(U8 index);
  10811. #else /* GH_INLINE_LEVEL == 0 */
  10812. GH_INLINE void GH_USB_set_DMA_ADDR(U8 index, U32 data)
  10813. {
  10814. *(volatile U32 *)(REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)) = data;
  10815. #if GH_USB_ENABLE_DEBUG_PRINT
  10816. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_ADDR] <-- 0x%08x\n",
  10817. (REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)),data,data);
  10818. #endif
  10819. }
  10820. GH_INLINE U32 GH_USB_get_DMA_ADDR(U8 index)
  10821. {
  10822. U32 value = (*(volatile U32 *)(REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)));
  10823. #if GH_USB_ENABLE_DEBUG_PRINT
  10824. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_ADDR] --> 0x%08x\n",
  10825. (REG_USB_DMA_ADDR + index * FIO_MOFFSET(USB,0x00000010)),value);
  10826. #endif
  10827. return value;
  10828. }
  10829. #endif /* GH_INLINE_LEVEL == 0 */
  10830. /*----------------------------------------------------------------------------*/
  10831. /* register USB_DMA_COUNT (read/write) */
  10832. /*----------------------------------------------------------------------------*/
  10833. #if GH_INLINE_LEVEL == 0
  10834. /*! \brief Writes the register 'USB_DMA_COUNT'. */
  10835. void GH_USB_set_DMA_COUNT(U8 index, U32 data);
  10836. /*! \brief Reads the register 'USB_DMA_COUNT'. */
  10837. U32 GH_USB_get_DMA_COUNT(U8 index);
  10838. #else /* GH_INLINE_LEVEL == 0 */
  10839. GH_INLINE void GH_USB_set_DMA_COUNT(U8 index, U32 data)
  10840. {
  10841. *(volatile U32 *)(REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)) = data;
  10842. #if GH_USB_ENABLE_DEBUG_PRINT
  10843. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_DMA_COUNT] <-- 0x%08x\n",
  10844. (REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)),data,data);
  10845. #endif
  10846. }
  10847. GH_INLINE U32 GH_USB_get_DMA_COUNT(U8 index)
  10848. {
  10849. U32 value = (*(volatile U32 *)(REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)));
  10850. #if GH_USB_ENABLE_DEBUG_PRINT
  10851. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_DMA_COUNT] --> 0x%08x\n",
  10852. (REG_USB_DMA_COUNT + index * FIO_MOFFSET(USB,0x00000010)),value);
  10853. #endif
  10854. return value;
  10855. }
  10856. #endif /* GH_INLINE_LEVEL == 0 */
  10857. /*----------------------------------------------------------------------------*/
  10858. /* register USB_RqPktCount_HOST (read/write) */
  10859. /*----------------------------------------------------------------------------*/
  10860. #if GH_INLINE_LEVEL == 0
  10861. /*! \brief Writes the register 'USB_RqPktCount_HOST'. */
  10862. void GH_USB_set_RqPktCount_HOST(U16 data);
  10863. /*! \brief Reads the register 'USB_RqPktCount_HOST'. */
  10864. U16 GH_USB_get_RqPktCount_HOST(void);
  10865. #else /* GH_INLINE_LEVEL == 0 */
  10866. GH_INLINE void GH_USB_set_RqPktCount_HOST(U16 data)
  10867. {
  10868. *(volatile U16 *)REG_USB_RQPKTCOUNT_HOST = data;
  10869. #if GH_USB_ENABLE_DEBUG_PRINT
  10870. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RqPktCount_HOST] <-- 0x%08x\n",
  10871. REG_USB_RQPKTCOUNT_HOST,data,data);
  10872. #endif
  10873. }
  10874. GH_INLINE U16 GH_USB_get_RqPktCount_HOST(void)
  10875. {
  10876. U16 value = (*(volatile U16 *)REG_USB_RQPKTCOUNT_HOST);
  10877. #if GH_USB_ENABLE_DEBUG_PRINT
  10878. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RqPktCount_HOST] --> 0x%08x\n",
  10879. REG_USB_RQPKTCOUNT_HOST,value);
  10880. #endif
  10881. return value;
  10882. }
  10883. #endif /* GH_INLINE_LEVEL == 0 */
  10884. /*----------------------------------------------------------------------------*/
  10885. /* register USB_RxDPktBufDis (read/write) */
  10886. /*----------------------------------------------------------------------------*/
  10887. #if GH_INLINE_LEVEL == 0
  10888. /*! \brief Writes the register 'USB_RxDPktBufDis'. */
  10889. void GH_USB_set_RxDPktBufDis(U16 data);
  10890. /*! \brief Reads the register 'USB_RxDPktBufDis'. */
  10891. U16 GH_USB_get_RxDPktBufDis(void);
  10892. /*! \brief Writes the bit group 'EP1' of register 'USB_RxDPktBufDis'. */
  10893. void GH_USB_set_RxDPktBufDis_EP1(U8 data);
  10894. /*! \brief Reads the bit group 'EP1' of register 'USB_RxDPktBufDis'. */
  10895. U8 GH_USB_get_RxDPktBufDis_EP1(void);
  10896. /*! \brief Writes the bit group 'EP2' of register 'USB_RxDPktBufDis'. */
  10897. void GH_USB_set_RxDPktBufDis_EP2(U8 data);
  10898. /*! \brief Reads the bit group 'EP2' of register 'USB_RxDPktBufDis'. */
  10899. U8 GH_USB_get_RxDPktBufDis_EP2(void);
  10900. /*! \brief Writes the bit group 'EP3' of register 'USB_RxDPktBufDis'. */
  10901. void GH_USB_set_RxDPktBufDis_EP3(U8 data);
  10902. /*! \brief Reads the bit group 'EP3' of register 'USB_RxDPktBufDis'. */
  10903. U8 GH_USB_get_RxDPktBufDis_EP3(void);
  10904. /*! \brief Writes the bit group 'EP4' of register 'USB_RxDPktBufDis'. */
  10905. void GH_USB_set_RxDPktBufDis_EP4(U8 data);
  10906. /*! \brief Reads the bit group 'EP4' of register 'USB_RxDPktBufDis'. */
  10907. U8 GH_USB_get_RxDPktBufDis_EP4(void);
  10908. /*! \brief Writes the bit group 'EP5' of register 'USB_RxDPktBufDis'. */
  10909. void GH_USB_set_RxDPktBufDis_EP5(U8 data);
  10910. /*! \brief Reads the bit group 'EP5' of register 'USB_RxDPktBufDis'. */
  10911. U8 GH_USB_get_RxDPktBufDis_EP5(void);
  10912. /*! \brief Writes the bit group 'EP6' of register 'USB_RxDPktBufDis'. */
  10913. void GH_USB_set_RxDPktBufDis_EP6(U8 data);
  10914. /*! \brief Reads the bit group 'EP6' of register 'USB_RxDPktBufDis'. */
  10915. U8 GH_USB_get_RxDPktBufDis_EP6(void);
  10916. /*! \brief Writes the bit group 'EP7' of register 'USB_RxDPktBufDis'. */
  10917. void GH_USB_set_RxDPktBufDis_EP7(U8 data);
  10918. /*! \brief Reads the bit group 'EP7' of register 'USB_RxDPktBufDis'. */
  10919. U8 GH_USB_get_RxDPktBufDis_EP7(void);
  10920. /*! \brief Writes the bit group 'EP8' of register 'USB_RxDPktBufDis'. */
  10921. void GH_USB_set_RxDPktBufDis_EP8(U8 data);
  10922. /*! \brief Reads the bit group 'EP8' of register 'USB_RxDPktBufDis'. */
  10923. U8 GH_USB_get_RxDPktBufDis_EP8(void);
  10924. /*! \brief Writes the bit group 'EP9' of register 'USB_RxDPktBufDis'. */
  10925. void GH_USB_set_RxDPktBufDis_EP9(U8 data);
  10926. /*! \brief Reads the bit group 'EP9' of register 'USB_RxDPktBufDis'. */
  10927. U8 GH_USB_get_RxDPktBufDis_EP9(void);
  10928. /*! \brief Writes the bit group 'EP10' of register 'USB_RxDPktBufDis'. */
  10929. void GH_USB_set_RxDPktBufDis_EP10(U8 data);
  10930. /*! \brief Reads the bit group 'EP10' of register 'USB_RxDPktBufDis'. */
  10931. U8 GH_USB_get_RxDPktBufDis_EP10(void);
  10932. /*! \brief Writes the bit group 'EP11' of register 'USB_RxDPktBufDis'. */
  10933. void GH_USB_set_RxDPktBufDis_EP11(U8 data);
  10934. /*! \brief Reads the bit group 'EP11' of register 'USB_RxDPktBufDis'. */
  10935. U8 GH_USB_get_RxDPktBufDis_EP11(void);
  10936. /*! \brief Writes the bit group 'EP12' of register 'USB_RxDPktBufDis'. */
  10937. void GH_USB_set_RxDPktBufDis_EP12(U8 data);
  10938. /*! \brief Reads the bit group 'EP12' of register 'USB_RxDPktBufDis'. */
  10939. U8 GH_USB_get_RxDPktBufDis_EP12(void);
  10940. /*! \brief Writes the bit group 'EP13' of register 'USB_RxDPktBufDis'. */
  10941. void GH_USB_set_RxDPktBufDis_EP13(U8 data);
  10942. /*! \brief Reads the bit group 'EP13' of register 'USB_RxDPktBufDis'. */
  10943. U8 GH_USB_get_RxDPktBufDis_EP13(void);
  10944. /*! \brief Writes the bit group 'EP14' of register 'USB_RxDPktBufDis'. */
  10945. void GH_USB_set_RxDPktBufDis_EP14(U8 data);
  10946. /*! \brief Reads the bit group 'EP14' of register 'USB_RxDPktBufDis'. */
  10947. U8 GH_USB_get_RxDPktBufDis_EP14(void);
  10948. /*! \brief Writes the bit group 'EP15' of register 'USB_RxDPktBufDis'. */
  10949. void GH_USB_set_RxDPktBufDis_EP15(U8 data);
  10950. /*! \brief Reads the bit group 'EP15' of register 'USB_RxDPktBufDis'. */
  10951. U8 GH_USB_get_RxDPktBufDis_EP15(void);
  10952. #else /* GH_INLINE_LEVEL == 0 */
  10953. GH_INLINE void GH_USB_set_RxDPktBufDis(U16 data)
  10954. {
  10955. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = data;
  10956. #if GH_USB_ENABLE_DEBUG_PRINT
  10957. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis] <-- 0x%08x\n",
  10958. REG_USB_RXDPKTBUFDIS,data,data);
  10959. #endif
  10960. }
  10961. GH_INLINE U16 GH_USB_get_RxDPktBufDis(void)
  10962. {
  10963. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  10964. #if GH_USB_ENABLE_DEBUG_PRINT
  10965. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis] --> 0x%08x\n",
  10966. REG_USB_RXDPKTBUFDIS,value);
  10967. #endif
  10968. return value;
  10969. }
  10970. GH_INLINE void GH_USB_set_RxDPktBufDis_EP1(U8 data)
  10971. {
  10972. GH_USB_RXDPKTBUFDIS_S d;
  10973. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  10974. d.bitc.ep1 = data;
  10975. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  10976. #if GH_USB_ENABLE_DEBUG_PRINT
  10977. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP1] <-- 0x%08x\n",
  10978. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  10979. #endif
  10980. }
  10981. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP1(void)
  10982. {
  10983. GH_USB_RXDPKTBUFDIS_S tmp_value;
  10984. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  10985. tmp_value.all = value;
  10986. #if GH_USB_ENABLE_DEBUG_PRINT
  10987. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP1] --> 0x%08x\n",
  10988. REG_USB_RXDPKTBUFDIS,value);
  10989. #endif
  10990. return tmp_value.bitc.ep1;
  10991. }
  10992. GH_INLINE void GH_USB_set_RxDPktBufDis_EP2(U8 data)
  10993. {
  10994. GH_USB_RXDPKTBUFDIS_S d;
  10995. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  10996. d.bitc.ep2 = data;
  10997. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  10998. #if GH_USB_ENABLE_DEBUG_PRINT
  10999. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP2] <-- 0x%08x\n",
  11000. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11001. #endif
  11002. }
  11003. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP2(void)
  11004. {
  11005. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11006. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11007. tmp_value.all = value;
  11008. #if GH_USB_ENABLE_DEBUG_PRINT
  11009. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP2] --> 0x%08x\n",
  11010. REG_USB_RXDPKTBUFDIS,value);
  11011. #endif
  11012. return tmp_value.bitc.ep2;
  11013. }
  11014. GH_INLINE void GH_USB_set_RxDPktBufDis_EP3(U8 data)
  11015. {
  11016. GH_USB_RXDPKTBUFDIS_S d;
  11017. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11018. d.bitc.ep3 = data;
  11019. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11020. #if GH_USB_ENABLE_DEBUG_PRINT
  11021. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP3] <-- 0x%08x\n",
  11022. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11023. #endif
  11024. }
  11025. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP3(void)
  11026. {
  11027. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11028. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11029. tmp_value.all = value;
  11030. #if GH_USB_ENABLE_DEBUG_PRINT
  11031. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP3] --> 0x%08x\n",
  11032. REG_USB_RXDPKTBUFDIS,value);
  11033. #endif
  11034. return tmp_value.bitc.ep3;
  11035. }
  11036. GH_INLINE void GH_USB_set_RxDPktBufDis_EP4(U8 data)
  11037. {
  11038. GH_USB_RXDPKTBUFDIS_S d;
  11039. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11040. d.bitc.ep4 = data;
  11041. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11042. #if GH_USB_ENABLE_DEBUG_PRINT
  11043. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP4] <-- 0x%08x\n",
  11044. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11045. #endif
  11046. }
  11047. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP4(void)
  11048. {
  11049. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11050. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11051. tmp_value.all = value;
  11052. #if GH_USB_ENABLE_DEBUG_PRINT
  11053. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP4] --> 0x%08x\n",
  11054. REG_USB_RXDPKTBUFDIS,value);
  11055. #endif
  11056. return tmp_value.bitc.ep4;
  11057. }
  11058. GH_INLINE void GH_USB_set_RxDPktBufDis_EP5(U8 data)
  11059. {
  11060. GH_USB_RXDPKTBUFDIS_S d;
  11061. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11062. d.bitc.ep5 = data;
  11063. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11064. #if GH_USB_ENABLE_DEBUG_PRINT
  11065. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP5] <-- 0x%08x\n",
  11066. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11067. #endif
  11068. }
  11069. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP5(void)
  11070. {
  11071. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11072. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11073. tmp_value.all = value;
  11074. #if GH_USB_ENABLE_DEBUG_PRINT
  11075. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP5] --> 0x%08x\n",
  11076. REG_USB_RXDPKTBUFDIS,value);
  11077. #endif
  11078. return tmp_value.bitc.ep5;
  11079. }
  11080. GH_INLINE void GH_USB_set_RxDPktBufDis_EP6(U8 data)
  11081. {
  11082. GH_USB_RXDPKTBUFDIS_S d;
  11083. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11084. d.bitc.ep6 = data;
  11085. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11086. #if GH_USB_ENABLE_DEBUG_PRINT
  11087. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP6] <-- 0x%08x\n",
  11088. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11089. #endif
  11090. }
  11091. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP6(void)
  11092. {
  11093. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11094. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11095. tmp_value.all = value;
  11096. #if GH_USB_ENABLE_DEBUG_PRINT
  11097. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP6] --> 0x%08x\n",
  11098. REG_USB_RXDPKTBUFDIS,value);
  11099. #endif
  11100. return tmp_value.bitc.ep6;
  11101. }
  11102. GH_INLINE void GH_USB_set_RxDPktBufDis_EP7(U8 data)
  11103. {
  11104. GH_USB_RXDPKTBUFDIS_S d;
  11105. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11106. d.bitc.ep7 = data;
  11107. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11108. #if GH_USB_ENABLE_DEBUG_PRINT
  11109. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP7] <-- 0x%08x\n",
  11110. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11111. #endif
  11112. }
  11113. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP7(void)
  11114. {
  11115. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11116. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11117. tmp_value.all = value;
  11118. #if GH_USB_ENABLE_DEBUG_PRINT
  11119. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP7] --> 0x%08x\n",
  11120. REG_USB_RXDPKTBUFDIS,value);
  11121. #endif
  11122. return tmp_value.bitc.ep7;
  11123. }
  11124. GH_INLINE void GH_USB_set_RxDPktBufDis_EP8(U8 data)
  11125. {
  11126. GH_USB_RXDPKTBUFDIS_S d;
  11127. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11128. d.bitc.ep8 = data;
  11129. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11130. #if GH_USB_ENABLE_DEBUG_PRINT
  11131. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP8] <-- 0x%08x\n",
  11132. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11133. #endif
  11134. }
  11135. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP8(void)
  11136. {
  11137. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11138. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11139. tmp_value.all = value;
  11140. #if GH_USB_ENABLE_DEBUG_PRINT
  11141. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP8] --> 0x%08x\n",
  11142. REG_USB_RXDPKTBUFDIS,value);
  11143. #endif
  11144. return tmp_value.bitc.ep8;
  11145. }
  11146. GH_INLINE void GH_USB_set_RxDPktBufDis_EP9(U8 data)
  11147. {
  11148. GH_USB_RXDPKTBUFDIS_S d;
  11149. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11150. d.bitc.ep9 = data;
  11151. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11152. #if GH_USB_ENABLE_DEBUG_PRINT
  11153. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP9] <-- 0x%08x\n",
  11154. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11155. #endif
  11156. }
  11157. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP9(void)
  11158. {
  11159. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11160. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11161. tmp_value.all = value;
  11162. #if GH_USB_ENABLE_DEBUG_PRINT
  11163. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP9] --> 0x%08x\n",
  11164. REG_USB_RXDPKTBUFDIS,value);
  11165. #endif
  11166. return tmp_value.bitc.ep9;
  11167. }
  11168. GH_INLINE void GH_USB_set_RxDPktBufDis_EP10(U8 data)
  11169. {
  11170. GH_USB_RXDPKTBUFDIS_S d;
  11171. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11172. d.bitc.ep10 = data;
  11173. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11174. #if GH_USB_ENABLE_DEBUG_PRINT
  11175. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP10] <-- 0x%08x\n",
  11176. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11177. #endif
  11178. }
  11179. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP10(void)
  11180. {
  11181. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11182. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11183. tmp_value.all = value;
  11184. #if GH_USB_ENABLE_DEBUG_PRINT
  11185. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP10] --> 0x%08x\n",
  11186. REG_USB_RXDPKTBUFDIS,value);
  11187. #endif
  11188. return tmp_value.bitc.ep10;
  11189. }
  11190. GH_INLINE void GH_USB_set_RxDPktBufDis_EP11(U8 data)
  11191. {
  11192. GH_USB_RXDPKTBUFDIS_S d;
  11193. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11194. d.bitc.ep11 = data;
  11195. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11196. #if GH_USB_ENABLE_DEBUG_PRINT
  11197. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP11] <-- 0x%08x\n",
  11198. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11199. #endif
  11200. }
  11201. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP11(void)
  11202. {
  11203. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11204. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11205. tmp_value.all = value;
  11206. #if GH_USB_ENABLE_DEBUG_PRINT
  11207. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP11] --> 0x%08x\n",
  11208. REG_USB_RXDPKTBUFDIS,value);
  11209. #endif
  11210. return tmp_value.bitc.ep11;
  11211. }
  11212. GH_INLINE void GH_USB_set_RxDPktBufDis_EP12(U8 data)
  11213. {
  11214. GH_USB_RXDPKTBUFDIS_S d;
  11215. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11216. d.bitc.ep12 = data;
  11217. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11218. #if GH_USB_ENABLE_DEBUG_PRINT
  11219. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP12] <-- 0x%08x\n",
  11220. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11221. #endif
  11222. }
  11223. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP12(void)
  11224. {
  11225. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11226. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11227. tmp_value.all = value;
  11228. #if GH_USB_ENABLE_DEBUG_PRINT
  11229. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP12] --> 0x%08x\n",
  11230. REG_USB_RXDPKTBUFDIS,value);
  11231. #endif
  11232. return tmp_value.bitc.ep12;
  11233. }
  11234. GH_INLINE void GH_USB_set_RxDPktBufDis_EP13(U8 data)
  11235. {
  11236. GH_USB_RXDPKTBUFDIS_S d;
  11237. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11238. d.bitc.ep13 = data;
  11239. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11240. #if GH_USB_ENABLE_DEBUG_PRINT
  11241. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP13] <-- 0x%08x\n",
  11242. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11243. #endif
  11244. }
  11245. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP13(void)
  11246. {
  11247. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11248. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11249. tmp_value.all = value;
  11250. #if GH_USB_ENABLE_DEBUG_PRINT
  11251. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP13] --> 0x%08x\n",
  11252. REG_USB_RXDPKTBUFDIS,value);
  11253. #endif
  11254. return tmp_value.bitc.ep13;
  11255. }
  11256. GH_INLINE void GH_USB_set_RxDPktBufDis_EP14(U8 data)
  11257. {
  11258. GH_USB_RXDPKTBUFDIS_S d;
  11259. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11260. d.bitc.ep14 = data;
  11261. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11262. #if GH_USB_ENABLE_DEBUG_PRINT
  11263. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP14] <-- 0x%08x\n",
  11264. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11265. #endif
  11266. }
  11267. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP14(void)
  11268. {
  11269. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11270. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11271. tmp_value.all = value;
  11272. #if GH_USB_ENABLE_DEBUG_PRINT
  11273. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP14] --> 0x%08x\n",
  11274. REG_USB_RXDPKTBUFDIS,value);
  11275. #endif
  11276. return tmp_value.bitc.ep14;
  11277. }
  11278. GH_INLINE void GH_USB_set_RxDPktBufDis_EP15(U8 data)
  11279. {
  11280. GH_USB_RXDPKTBUFDIS_S d;
  11281. d.all = *(volatile U16 *)REG_USB_RXDPKTBUFDIS;
  11282. d.bitc.ep15 = data;
  11283. *(volatile U16 *)REG_USB_RXDPKTBUFDIS = d.all;
  11284. #if GH_USB_ENABLE_DEBUG_PRINT
  11285. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_RxDPktBufDis_EP15] <-- 0x%08x\n",
  11286. REG_USB_RXDPKTBUFDIS,d.all,d.all);
  11287. #endif
  11288. }
  11289. GH_INLINE U8 GH_USB_get_RxDPktBufDis_EP15(void)
  11290. {
  11291. GH_USB_RXDPKTBUFDIS_S tmp_value;
  11292. U16 value = (*(volatile U16 *)REG_USB_RXDPKTBUFDIS);
  11293. tmp_value.all = value;
  11294. #if GH_USB_ENABLE_DEBUG_PRINT
  11295. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_RxDPktBufDis_EP15] --> 0x%08x\n",
  11296. REG_USB_RXDPKTBUFDIS,value);
  11297. #endif
  11298. return tmp_value.bitc.ep15;
  11299. }
  11300. #endif /* GH_INLINE_LEVEL == 0 */
  11301. /*----------------------------------------------------------------------------*/
  11302. /* register USB_TxDPktBufDis (read/write) */
  11303. /*----------------------------------------------------------------------------*/
  11304. #if GH_INLINE_LEVEL == 0
  11305. /*! \brief Writes the register 'USB_TxDPktBufDis'. */
  11306. void GH_USB_set_TxDPktBufDis(U16 data);
  11307. /*! \brief Reads the register 'USB_TxDPktBufDis'. */
  11308. U16 GH_USB_get_TxDPktBufDis(void);
  11309. /*! \brief Writes the bit group 'EP1' of register 'USB_TxDPktBufDis'. */
  11310. void GH_USB_set_TxDPktBufDis_EP1(U8 data);
  11311. /*! \brief Reads the bit group 'EP1' of register 'USB_TxDPktBufDis'. */
  11312. U8 GH_USB_get_TxDPktBufDis_EP1(void);
  11313. /*! \brief Writes the bit group 'EP2' of register 'USB_TxDPktBufDis'. */
  11314. void GH_USB_set_TxDPktBufDis_EP2(U8 data);
  11315. /*! \brief Reads the bit group 'EP2' of register 'USB_TxDPktBufDis'. */
  11316. U8 GH_USB_get_TxDPktBufDis_EP2(void);
  11317. /*! \brief Writes the bit group 'EP3' of register 'USB_TxDPktBufDis'. */
  11318. void GH_USB_set_TxDPktBufDis_EP3(U8 data);
  11319. /*! \brief Reads the bit group 'EP3' of register 'USB_TxDPktBufDis'. */
  11320. U8 GH_USB_get_TxDPktBufDis_EP3(void);
  11321. /*! \brief Writes the bit group 'EP4' of register 'USB_TxDPktBufDis'. */
  11322. void GH_USB_set_TxDPktBufDis_EP4(U8 data);
  11323. /*! \brief Reads the bit group 'EP4' of register 'USB_TxDPktBufDis'. */
  11324. U8 GH_USB_get_TxDPktBufDis_EP4(void);
  11325. /*! \brief Writes the bit group 'EP5' of register 'USB_TxDPktBufDis'. */
  11326. void GH_USB_set_TxDPktBufDis_EP5(U8 data);
  11327. /*! \brief Reads the bit group 'EP5' of register 'USB_TxDPktBufDis'. */
  11328. U8 GH_USB_get_TxDPktBufDis_EP5(void);
  11329. /*! \brief Writes the bit group 'EP6' of register 'USB_TxDPktBufDis'. */
  11330. void GH_USB_set_TxDPktBufDis_EP6(U8 data);
  11331. /*! \brief Reads the bit group 'EP6' of register 'USB_TxDPktBufDis'. */
  11332. U8 GH_USB_get_TxDPktBufDis_EP6(void);
  11333. /*! \brief Writes the bit group 'EP7' of register 'USB_TxDPktBufDis'. */
  11334. void GH_USB_set_TxDPktBufDis_EP7(U8 data);
  11335. /*! \brief Reads the bit group 'EP7' of register 'USB_TxDPktBufDis'. */
  11336. U8 GH_USB_get_TxDPktBufDis_EP7(void);
  11337. /*! \brief Writes the bit group 'EP8' of register 'USB_TxDPktBufDis'. */
  11338. void GH_USB_set_TxDPktBufDis_EP8(U8 data);
  11339. /*! \brief Reads the bit group 'EP8' of register 'USB_TxDPktBufDis'. */
  11340. U8 GH_USB_get_TxDPktBufDis_EP8(void);
  11341. /*! \brief Writes the bit group 'EP9' of register 'USB_TxDPktBufDis'. */
  11342. void GH_USB_set_TxDPktBufDis_EP9(U8 data);
  11343. /*! \brief Reads the bit group 'EP9' of register 'USB_TxDPktBufDis'. */
  11344. U8 GH_USB_get_TxDPktBufDis_EP9(void);
  11345. /*! \brief Writes the bit group 'EP10' of register 'USB_TxDPktBufDis'. */
  11346. void GH_USB_set_TxDPktBufDis_EP10(U8 data);
  11347. /*! \brief Reads the bit group 'EP10' of register 'USB_TxDPktBufDis'. */
  11348. U8 GH_USB_get_TxDPktBufDis_EP10(void);
  11349. /*! \brief Writes the bit group 'EP11' of register 'USB_TxDPktBufDis'. */
  11350. void GH_USB_set_TxDPktBufDis_EP11(U8 data);
  11351. /*! \brief Reads the bit group 'EP11' of register 'USB_TxDPktBufDis'. */
  11352. U8 GH_USB_get_TxDPktBufDis_EP11(void);
  11353. /*! \brief Writes the bit group 'EP12' of register 'USB_TxDPktBufDis'. */
  11354. void GH_USB_set_TxDPktBufDis_EP12(U8 data);
  11355. /*! \brief Reads the bit group 'EP12' of register 'USB_TxDPktBufDis'. */
  11356. U8 GH_USB_get_TxDPktBufDis_EP12(void);
  11357. /*! \brief Writes the bit group 'EP13' of register 'USB_TxDPktBufDis'. */
  11358. void GH_USB_set_TxDPktBufDis_EP13(U8 data);
  11359. /*! \brief Reads the bit group 'EP13' of register 'USB_TxDPktBufDis'. */
  11360. U8 GH_USB_get_TxDPktBufDis_EP13(void);
  11361. /*! \brief Writes the bit group 'EP14' of register 'USB_TxDPktBufDis'. */
  11362. void GH_USB_set_TxDPktBufDis_EP14(U8 data);
  11363. /*! \brief Reads the bit group 'EP14' of register 'USB_TxDPktBufDis'. */
  11364. U8 GH_USB_get_TxDPktBufDis_EP14(void);
  11365. /*! \brief Writes the bit group 'EP15' of register 'USB_TxDPktBufDis'. */
  11366. void GH_USB_set_TxDPktBufDis_EP15(U8 data);
  11367. /*! \brief Reads the bit group 'EP15' of register 'USB_TxDPktBufDis'. */
  11368. U8 GH_USB_get_TxDPktBufDis_EP15(void);
  11369. #else /* GH_INLINE_LEVEL == 0 */
  11370. GH_INLINE void GH_USB_set_TxDPktBufDis(U16 data)
  11371. {
  11372. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = data;
  11373. #if GH_USB_ENABLE_DEBUG_PRINT
  11374. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis] <-- 0x%08x\n",
  11375. REG_USB_TXDPKTBUFDIS,data,data);
  11376. #endif
  11377. }
  11378. GH_INLINE U16 GH_USB_get_TxDPktBufDis(void)
  11379. {
  11380. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11381. #if GH_USB_ENABLE_DEBUG_PRINT
  11382. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis] --> 0x%08x\n",
  11383. REG_USB_TXDPKTBUFDIS,value);
  11384. #endif
  11385. return value;
  11386. }
  11387. GH_INLINE void GH_USB_set_TxDPktBufDis_EP1(U8 data)
  11388. {
  11389. GH_USB_TXDPKTBUFDIS_S d;
  11390. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11391. d.bitc.ep1 = data;
  11392. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11393. #if GH_USB_ENABLE_DEBUG_PRINT
  11394. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP1] <-- 0x%08x\n",
  11395. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11396. #endif
  11397. }
  11398. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP1(void)
  11399. {
  11400. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11401. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11402. tmp_value.all = value;
  11403. #if GH_USB_ENABLE_DEBUG_PRINT
  11404. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP1] --> 0x%08x\n",
  11405. REG_USB_TXDPKTBUFDIS,value);
  11406. #endif
  11407. return tmp_value.bitc.ep1;
  11408. }
  11409. GH_INLINE void GH_USB_set_TxDPktBufDis_EP2(U8 data)
  11410. {
  11411. GH_USB_TXDPKTBUFDIS_S d;
  11412. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11413. d.bitc.ep2 = data;
  11414. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11415. #if GH_USB_ENABLE_DEBUG_PRINT
  11416. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP2] <-- 0x%08x\n",
  11417. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11418. #endif
  11419. }
  11420. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP2(void)
  11421. {
  11422. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11423. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11424. tmp_value.all = value;
  11425. #if GH_USB_ENABLE_DEBUG_PRINT
  11426. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP2] --> 0x%08x\n",
  11427. REG_USB_TXDPKTBUFDIS,value);
  11428. #endif
  11429. return tmp_value.bitc.ep2;
  11430. }
  11431. GH_INLINE void GH_USB_set_TxDPktBufDis_EP3(U8 data)
  11432. {
  11433. GH_USB_TXDPKTBUFDIS_S d;
  11434. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11435. d.bitc.ep3 = data;
  11436. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11437. #if GH_USB_ENABLE_DEBUG_PRINT
  11438. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP3] <-- 0x%08x\n",
  11439. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11440. #endif
  11441. }
  11442. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP3(void)
  11443. {
  11444. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11445. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11446. tmp_value.all = value;
  11447. #if GH_USB_ENABLE_DEBUG_PRINT
  11448. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP3] --> 0x%08x\n",
  11449. REG_USB_TXDPKTBUFDIS,value);
  11450. #endif
  11451. return tmp_value.bitc.ep3;
  11452. }
  11453. GH_INLINE void GH_USB_set_TxDPktBufDis_EP4(U8 data)
  11454. {
  11455. GH_USB_TXDPKTBUFDIS_S d;
  11456. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11457. d.bitc.ep4 = data;
  11458. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11459. #if GH_USB_ENABLE_DEBUG_PRINT
  11460. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP4] <-- 0x%08x\n",
  11461. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11462. #endif
  11463. }
  11464. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP4(void)
  11465. {
  11466. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11467. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11468. tmp_value.all = value;
  11469. #if GH_USB_ENABLE_DEBUG_PRINT
  11470. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP4] --> 0x%08x\n",
  11471. REG_USB_TXDPKTBUFDIS,value);
  11472. #endif
  11473. return tmp_value.bitc.ep4;
  11474. }
  11475. GH_INLINE void GH_USB_set_TxDPktBufDis_EP5(U8 data)
  11476. {
  11477. GH_USB_TXDPKTBUFDIS_S d;
  11478. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11479. d.bitc.ep5 = data;
  11480. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11481. #if GH_USB_ENABLE_DEBUG_PRINT
  11482. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP5] <-- 0x%08x\n",
  11483. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11484. #endif
  11485. }
  11486. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP5(void)
  11487. {
  11488. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11489. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11490. tmp_value.all = value;
  11491. #if GH_USB_ENABLE_DEBUG_PRINT
  11492. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP5] --> 0x%08x\n",
  11493. REG_USB_TXDPKTBUFDIS,value);
  11494. #endif
  11495. return tmp_value.bitc.ep5;
  11496. }
  11497. GH_INLINE void GH_USB_set_TxDPktBufDis_EP6(U8 data)
  11498. {
  11499. GH_USB_TXDPKTBUFDIS_S d;
  11500. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11501. d.bitc.ep6 = data;
  11502. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11503. #if GH_USB_ENABLE_DEBUG_PRINT
  11504. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP6] <-- 0x%08x\n",
  11505. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11506. #endif
  11507. }
  11508. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP6(void)
  11509. {
  11510. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11511. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11512. tmp_value.all = value;
  11513. #if GH_USB_ENABLE_DEBUG_PRINT
  11514. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP6] --> 0x%08x\n",
  11515. REG_USB_TXDPKTBUFDIS,value);
  11516. #endif
  11517. return tmp_value.bitc.ep6;
  11518. }
  11519. GH_INLINE void GH_USB_set_TxDPktBufDis_EP7(U8 data)
  11520. {
  11521. GH_USB_TXDPKTBUFDIS_S d;
  11522. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11523. d.bitc.ep7 = data;
  11524. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11525. #if GH_USB_ENABLE_DEBUG_PRINT
  11526. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP7] <-- 0x%08x\n",
  11527. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11528. #endif
  11529. }
  11530. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP7(void)
  11531. {
  11532. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11533. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11534. tmp_value.all = value;
  11535. #if GH_USB_ENABLE_DEBUG_PRINT
  11536. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP7] --> 0x%08x\n",
  11537. REG_USB_TXDPKTBUFDIS,value);
  11538. #endif
  11539. return tmp_value.bitc.ep7;
  11540. }
  11541. GH_INLINE void GH_USB_set_TxDPktBufDis_EP8(U8 data)
  11542. {
  11543. GH_USB_TXDPKTBUFDIS_S d;
  11544. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11545. d.bitc.ep8 = data;
  11546. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11547. #if GH_USB_ENABLE_DEBUG_PRINT
  11548. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP8] <-- 0x%08x\n",
  11549. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11550. #endif
  11551. }
  11552. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP8(void)
  11553. {
  11554. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11555. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11556. tmp_value.all = value;
  11557. #if GH_USB_ENABLE_DEBUG_PRINT
  11558. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP8] --> 0x%08x\n",
  11559. REG_USB_TXDPKTBUFDIS,value);
  11560. #endif
  11561. return tmp_value.bitc.ep8;
  11562. }
  11563. GH_INLINE void GH_USB_set_TxDPktBufDis_EP9(U8 data)
  11564. {
  11565. GH_USB_TXDPKTBUFDIS_S d;
  11566. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11567. d.bitc.ep9 = data;
  11568. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11569. #if GH_USB_ENABLE_DEBUG_PRINT
  11570. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP9] <-- 0x%08x\n",
  11571. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11572. #endif
  11573. }
  11574. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP9(void)
  11575. {
  11576. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11577. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11578. tmp_value.all = value;
  11579. #if GH_USB_ENABLE_DEBUG_PRINT
  11580. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP9] --> 0x%08x\n",
  11581. REG_USB_TXDPKTBUFDIS,value);
  11582. #endif
  11583. return tmp_value.bitc.ep9;
  11584. }
  11585. GH_INLINE void GH_USB_set_TxDPktBufDis_EP10(U8 data)
  11586. {
  11587. GH_USB_TXDPKTBUFDIS_S d;
  11588. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11589. d.bitc.ep10 = data;
  11590. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11591. #if GH_USB_ENABLE_DEBUG_PRINT
  11592. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP10] <-- 0x%08x\n",
  11593. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11594. #endif
  11595. }
  11596. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP10(void)
  11597. {
  11598. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11599. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11600. tmp_value.all = value;
  11601. #if GH_USB_ENABLE_DEBUG_PRINT
  11602. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP10] --> 0x%08x\n",
  11603. REG_USB_TXDPKTBUFDIS,value);
  11604. #endif
  11605. return tmp_value.bitc.ep10;
  11606. }
  11607. GH_INLINE void GH_USB_set_TxDPktBufDis_EP11(U8 data)
  11608. {
  11609. GH_USB_TXDPKTBUFDIS_S d;
  11610. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11611. d.bitc.ep11 = data;
  11612. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11613. #if GH_USB_ENABLE_DEBUG_PRINT
  11614. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP11] <-- 0x%08x\n",
  11615. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11616. #endif
  11617. }
  11618. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP11(void)
  11619. {
  11620. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11621. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11622. tmp_value.all = value;
  11623. #if GH_USB_ENABLE_DEBUG_PRINT
  11624. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP11] --> 0x%08x\n",
  11625. REG_USB_TXDPKTBUFDIS,value);
  11626. #endif
  11627. return tmp_value.bitc.ep11;
  11628. }
  11629. GH_INLINE void GH_USB_set_TxDPktBufDis_EP12(U8 data)
  11630. {
  11631. GH_USB_TXDPKTBUFDIS_S d;
  11632. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11633. d.bitc.ep12 = data;
  11634. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11635. #if GH_USB_ENABLE_DEBUG_PRINT
  11636. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP12] <-- 0x%08x\n",
  11637. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11638. #endif
  11639. }
  11640. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP12(void)
  11641. {
  11642. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11643. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11644. tmp_value.all = value;
  11645. #if GH_USB_ENABLE_DEBUG_PRINT
  11646. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP12] --> 0x%08x\n",
  11647. REG_USB_TXDPKTBUFDIS,value);
  11648. #endif
  11649. return tmp_value.bitc.ep12;
  11650. }
  11651. GH_INLINE void GH_USB_set_TxDPktBufDis_EP13(U8 data)
  11652. {
  11653. GH_USB_TXDPKTBUFDIS_S d;
  11654. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11655. d.bitc.ep13 = data;
  11656. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11657. #if GH_USB_ENABLE_DEBUG_PRINT
  11658. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP13] <-- 0x%08x\n",
  11659. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11660. #endif
  11661. }
  11662. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP13(void)
  11663. {
  11664. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11665. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11666. tmp_value.all = value;
  11667. #if GH_USB_ENABLE_DEBUG_PRINT
  11668. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP13] --> 0x%08x\n",
  11669. REG_USB_TXDPKTBUFDIS,value);
  11670. #endif
  11671. return tmp_value.bitc.ep13;
  11672. }
  11673. GH_INLINE void GH_USB_set_TxDPktBufDis_EP14(U8 data)
  11674. {
  11675. GH_USB_TXDPKTBUFDIS_S d;
  11676. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11677. d.bitc.ep14 = data;
  11678. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11679. #if GH_USB_ENABLE_DEBUG_PRINT
  11680. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP14] <-- 0x%08x\n",
  11681. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11682. #endif
  11683. }
  11684. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP14(void)
  11685. {
  11686. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11687. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11688. tmp_value.all = value;
  11689. #if GH_USB_ENABLE_DEBUG_PRINT
  11690. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP14] --> 0x%08x\n",
  11691. REG_USB_TXDPKTBUFDIS,value);
  11692. #endif
  11693. return tmp_value.bitc.ep14;
  11694. }
  11695. GH_INLINE void GH_USB_set_TxDPktBufDis_EP15(U8 data)
  11696. {
  11697. GH_USB_TXDPKTBUFDIS_S d;
  11698. d.all = *(volatile U16 *)REG_USB_TXDPKTBUFDIS;
  11699. d.bitc.ep15 = data;
  11700. *(volatile U16 *)REG_USB_TXDPKTBUFDIS = d.all;
  11701. #if GH_USB_ENABLE_DEBUG_PRINT
  11702. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_TxDPktBufDis_EP15] <-- 0x%08x\n",
  11703. REG_USB_TXDPKTBUFDIS,d.all,d.all);
  11704. #endif
  11705. }
  11706. GH_INLINE U8 GH_USB_get_TxDPktBufDis_EP15(void)
  11707. {
  11708. GH_USB_TXDPKTBUFDIS_S tmp_value;
  11709. U16 value = (*(volatile U16 *)REG_USB_TXDPKTBUFDIS);
  11710. tmp_value.all = value;
  11711. #if GH_USB_ENABLE_DEBUG_PRINT
  11712. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_TxDPktBufDis_EP15] --> 0x%08x\n",
  11713. REG_USB_TXDPKTBUFDIS,value);
  11714. #endif
  11715. return tmp_value.bitc.ep15;
  11716. }
  11717. #endif /* GH_INLINE_LEVEL == 0 */
  11718. /*----------------------------------------------------------------------------*/
  11719. /* register USB_C_T_UCH (read/write) */
  11720. /*----------------------------------------------------------------------------*/
  11721. #if GH_INLINE_LEVEL == 0
  11722. /*! \brief Writes the register 'USB_C_T_UCH'. */
  11723. void GH_USB_set_C_T_UCH(U16 data);
  11724. /*! \brief Reads the register 'USB_C_T_UCH'. */
  11725. U16 GH_USB_get_C_T_UCH(void);
  11726. #else /* GH_INLINE_LEVEL == 0 */
  11727. GH_INLINE void GH_USB_set_C_T_UCH(U16 data)
  11728. {
  11729. *(volatile U16 *)REG_USB_C_T_UCH = data;
  11730. #if GH_USB_ENABLE_DEBUG_PRINT
  11731. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_UCH] <-- 0x%08x\n",
  11732. REG_USB_C_T_UCH,data,data);
  11733. #endif
  11734. }
  11735. GH_INLINE U16 GH_USB_get_C_T_UCH(void)
  11736. {
  11737. U16 value = (*(volatile U16 *)REG_USB_C_T_UCH);
  11738. #if GH_USB_ENABLE_DEBUG_PRINT
  11739. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_UCH] --> 0x%08x\n",
  11740. REG_USB_C_T_UCH,value);
  11741. #endif
  11742. return value;
  11743. }
  11744. #endif /* GH_INLINE_LEVEL == 0 */
  11745. /*----------------------------------------------------------------------------*/
  11746. /* register USB_C_T_HSRTN (read/write) */
  11747. /*----------------------------------------------------------------------------*/
  11748. #if GH_INLINE_LEVEL == 0
  11749. /*! \brief Writes the register 'USB_C_T_HSRTN'. */
  11750. void GH_USB_set_C_T_HSRTN(U16 data);
  11751. /*! \brief Reads the register 'USB_C_T_HSRTN'. */
  11752. U16 GH_USB_get_C_T_HSRTN(void);
  11753. #else /* GH_INLINE_LEVEL == 0 */
  11754. GH_INLINE void GH_USB_set_C_T_HSRTN(U16 data)
  11755. {
  11756. *(volatile U16 *)REG_USB_C_T_HSRTN = data;
  11757. #if GH_USB_ENABLE_DEBUG_PRINT
  11758. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_HSRTN] <-- 0x%08x\n",
  11759. REG_USB_C_T_HSRTN,data,data);
  11760. #endif
  11761. }
  11762. GH_INLINE U16 GH_USB_get_C_T_HSRTN(void)
  11763. {
  11764. U16 value = (*(volatile U16 *)REG_USB_C_T_HSRTN);
  11765. #if GH_USB_ENABLE_DEBUG_PRINT
  11766. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_HSRTN] --> 0x%08x\n",
  11767. REG_USB_C_T_HSRTN,value);
  11768. #endif
  11769. return value;
  11770. }
  11771. #endif /* GH_INLINE_LEVEL == 0 */
  11772. /*----------------------------------------------------------------------------*/
  11773. /* register USB_C_T_HSBT (read/write) */
  11774. /*----------------------------------------------------------------------------*/
  11775. #if GH_INLINE_LEVEL == 0
  11776. /*! \brief Writes the register 'USB_C_T_HSBT'. */
  11777. void GH_USB_set_C_T_HSBT(U8 data);
  11778. /*! \brief Reads the register 'USB_C_T_HSBT'. */
  11779. U8 GH_USB_get_C_T_HSBT(void);
  11780. /*! \brief Writes the bit group 'HSTimeoutAdder' of register 'USB_C_T_HSBT'. */
  11781. void GH_USB_set_C_T_HSBT_HSTimeoutAdder(U8 data);
  11782. /*! \brief Reads the bit group 'HSTimeoutAdder' of register 'USB_C_T_HSBT'. */
  11783. U8 GH_USB_get_C_T_HSBT_HSTimeoutAdder(void);
  11784. #else /* GH_INLINE_LEVEL == 0 */
  11785. GH_INLINE void GH_USB_set_C_T_HSBT(U8 data)
  11786. {
  11787. *(volatile U8 *)REG_USB_C_T_HSBT = data;
  11788. #if GH_USB_ENABLE_DEBUG_PRINT
  11789. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_HSBT] <-- 0x%08x\n",
  11790. REG_USB_C_T_HSBT,data,data);
  11791. #endif
  11792. }
  11793. GH_INLINE U8 GH_USB_get_C_T_HSBT(void)
  11794. {
  11795. U8 value = (*(volatile U8 *)REG_USB_C_T_HSBT);
  11796. #if GH_USB_ENABLE_DEBUG_PRINT
  11797. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_HSBT] --> 0x%08x\n",
  11798. REG_USB_C_T_HSBT,value);
  11799. #endif
  11800. return value;
  11801. }
  11802. GH_INLINE void GH_USB_set_C_T_HSBT_HSTimeoutAdder(U8 data)
  11803. {
  11804. GH_USB_C_T_HSBT_S d;
  11805. d.all = *(volatile U8 *)REG_USB_C_T_HSBT;
  11806. d.bitc.hstimeoutadder = data;
  11807. *(volatile U8 *)REG_USB_C_T_HSBT = d.all;
  11808. #if GH_USB_ENABLE_DEBUG_PRINT
  11809. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_C_T_HSBT_HSTimeoutAdder] <-- 0x%08x\n",
  11810. REG_USB_C_T_HSBT,d.all,d.all);
  11811. #endif
  11812. }
  11813. GH_INLINE U8 GH_USB_get_C_T_HSBT_HSTimeoutAdder(void)
  11814. {
  11815. GH_USB_C_T_HSBT_S tmp_value;
  11816. U8 value = (*(volatile U8 *)REG_USB_C_T_HSBT);
  11817. tmp_value.all = value;
  11818. #if GH_USB_ENABLE_DEBUG_PRINT
  11819. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_C_T_HSBT_HSTimeoutAdder] --> 0x%08x\n",
  11820. REG_USB_C_T_HSBT,value);
  11821. #endif
  11822. return tmp_value.bitc.hstimeoutadder;
  11823. }
  11824. #endif /* GH_INLINE_LEVEL == 0 */
  11825. /*----------------------------------------------------------------------------*/
  11826. /* register USB_LPM_ATTR (read) */
  11827. /*----------------------------------------------------------------------------*/
  11828. #if GH_INLINE_LEVEL == 0
  11829. /*! \brief Reads the register 'USB_LPM_ATTR'. */
  11830. U16 GH_USB_get_LPM_ATTR(void);
  11831. /*! \brief Reads the bit group 'LinkState' of register 'USB_LPM_ATTR'. */
  11832. U8 GH_USB_get_LPM_ATTR_LinkState(void);
  11833. /*! \brief Reads the bit group 'HIRD' of register 'USB_LPM_ATTR'. */
  11834. U8 GH_USB_get_LPM_ATTR_HIRD(void);
  11835. /*! \brief Reads the bit group 'RmtWak' of register 'USB_LPM_ATTR'. */
  11836. U8 GH_USB_get_LPM_ATTR_RmtWak(void);
  11837. /*! \brief Reads the bit group 'EndPnt' of register 'USB_LPM_ATTR'. */
  11838. U8 GH_USB_get_LPM_ATTR_EndPnt(void);
  11839. #else /* GH_INLINE_LEVEL == 0 */
  11840. GH_INLINE U16 GH_USB_get_LPM_ATTR(void)
  11841. {
  11842. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  11843. #if GH_USB_ENABLE_DEBUG_PRINT
  11844. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR] --> 0x%08x\n",
  11845. REG_USB_LPM_ATTR,value);
  11846. #endif
  11847. return value;
  11848. }
  11849. GH_INLINE U8 GH_USB_get_LPM_ATTR_LinkState(void)
  11850. {
  11851. GH_USB_LPM_ATTR_S tmp_value;
  11852. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  11853. tmp_value.all = value;
  11854. #if GH_USB_ENABLE_DEBUG_PRINT
  11855. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_LinkState] --> 0x%08x\n",
  11856. REG_USB_LPM_ATTR,value);
  11857. #endif
  11858. return tmp_value.bitc.linkstate;
  11859. }
  11860. GH_INLINE U8 GH_USB_get_LPM_ATTR_HIRD(void)
  11861. {
  11862. GH_USB_LPM_ATTR_S tmp_value;
  11863. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  11864. tmp_value.all = value;
  11865. #if GH_USB_ENABLE_DEBUG_PRINT
  11866. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_HIRD] --> 0x%08x\n",
  11867. REG_USB_LPM_ATTR,value);
  11868. #endif
  11869. return tmp_value.bitc.hird;
  11870. }
  11871. GH_INLINE U8 GH_USB_get_LPM_ATTR_RmtWak(void)
  11872. {
  11873. GH_USB_LPM_ATTR_S tmp_value;
  11874. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  11875. tmp_value.all = value;
  11876. #if GH_USB_ENABLE_DEBUG_PRINT
  11877. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_RmtWak] --> 0x%08x\n",
  11878. REG_USB_LPM_ATTR,value);
  11879. #endif
  11880. return tmp_value.bitc.rmtwak;
  11881. }
  11882. GH_INLINE U8 GH_USB_get_LPM_ATTR_EndPnt(void)
  11883. {
  11884. GH_USB_LPM_ATTR_S tmp_value;
  11885. U16 value = (*(volatile U16 *)REG_USB_LPM_ATTR);
  11886. tmp_value.all = value;
  11887. #if GH_USB_ENABLE_DEBUG_PRINT
  11888. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_ATTR_EndPnt] --> 0x%08x\n",
  11889. REG_USB_LPM_ATTR,value);
  11890. #endif
  11891. return tmp_value.bitc.endpnt;
  11892. }
  11893. #endif /* GH_INLINE_LEVEL == 0 */
  11894. /*----------------------------------------------------------------------------*/
  11895. /* register USB_LPM_CNTRL_PERI (read/write) */
  11896. /*----------------------------------------------------------------------------*/
  11897. #if GH_INLINE_LEVEL == 0
  11898. /*! \brief Writes the register 'USB_LPM_CNTRL_PERI'. */
  11899. void GH_USB_set_LPM_CNTRL_PERI(U8 data);
  11900. /*! \brief Reads the register 'USB_LPM_CNTRL_PERI'. */
  11901. U8 GH_USB_get_LPM_CNTRL_PERI(void);
  11902. /*! \brief Writes the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_PERI'. */
  11903. void GH_USB_set_LPM_CNTRL_PERI_LPMXMT(U8 data);
  11904. /*! \brief Reads the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_PERI'. */
  11905. U8 GH_USB_get_LPM_CNTRL_PERI_LPMXMT(void);
  11906. /*! \brief Writes the bit group 'LPMRES' of register 'USB_LPM_CNTRL_PERI'. */
  11907. void GH_USB_set_LPM_CNTRL_PERI_LPMRES(U8 data);
  11908. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_CNTRL_PERI'. */
  11909. U8 GH_USB_get_LPM_CNTRL_PERI_LPMRES(void);
  11910. /*! \brief Writes the bit group 'LPMEN' of register 'USB_LPM_CNTRL_PERI'. */
  11911. void GH_USB_set_LPM_CNTRL_PERI_LPMEN(U8 data);
  11912. /*! \brief Reads the bit group 'LPMEN' of register 'USB_LPM_CNTRL_PERI'. */
  11913. U8 GH_USB_get_LPM_CNTRL_PERI_LPMEN(void);
  11914. /*! \brief Writes the bit group 'LPMNAK' of register 'USB_LPM_CNTRL_PERI'. */
  11915. void GH_USB_set_LPM_CNTRL_PERI_LPMNAK(U8 data);
  11916. /*! \brief Reads the bit group 'LPMNAK' of register 'USB_LPM_CNTRL_PERI'. */
  11917. U8 GH_USB_get_LPM_CNTRL_PERI_LPMNAK(void);
  11918. #else /* GH_INLINE_LEVEL == 0 */
  11919. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI(U8 data)
  11920. {
  11921. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = data;
  11922. #if GH_USB_ENABLE_DEBUG_PRINT
  11923. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI] <-- 0x%08x\n",
  11924. REG_USB_LPM_CNTRL_PERI,data,data);
  11925. #endif
  11926. }
  11927. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI(void)
  11928. {
  11929. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  11930. #if GH_USB_ENABLE_DEBUG_PRINT
  11931. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI] --> 0x%08x\n",
  11932. REG_USB_LPM_CNTRL_PERI,value);
  11933. #endif
  11934. return value;
  11935. }
  11936. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMXMT(U8 data)
  11937. {
  11938. GH_USB_LPM_CNTRL_PERI_S d;
  11939. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  11940. d.bitc.lpmxmt = data;
  11941. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  11942. #if GH_USB_ENABLE_DEBUG_PRINT
  11943. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMXMT] <-- 0x%08x\n",
  11944. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  11945. #endif
  11946. }
  11947. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMXMT(void)
  11948. {
  11949. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  11950. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  11951. tmp_value.all = value;
  11952. #if GH_USB_ENABLE_DEBUG_PRINT
  11953. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMXMT] --> 0x%08x\n",
  11954. REG_USB_LPM_CNTRL_PERI,value);
  11955. #endif
  11956. return tmp_value.bitc.lpmxmt;
  11957. }
  11958. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMRES(U8 data)
  11959. {
  11960. GH_USB_LPM_CNTRL_PERI_S d;
  11961. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  11962. d.bitc.lpmres = data;
  11963. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  11964. #if GH_USB_ENABLE_DEBUG_PRINT
  11965. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMRES] <-- 0x%08x\n",
  11966. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  11967. #endif
  11968. }
  11969. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMRES(void)
  11970. {
  11971. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  11972. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  11973. tmp_value.all = value;
  11974. #if GH_USB_ENABLE_DEBUG_PRINT
  11975. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMRES] --> 0x%08x\n",
  11976. REG_USB_LPM_CNTRL_PERI,value);
  11977. #endif
  11978. return tmp_value.bitc.lpmres;
  11979. }
  11980. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMEN(U8 data)
  11981. {
  11982. GH_USB_LPM_CNTRL_PERI_S d;
  11983. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  11984. d.bitc.lpmen = data;
  11985. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  11986. #if GH_USB_ENABLE_DEBUG_PRINT
  11987. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMEN] <-- 0x%08x\n",
  11988. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  11989. #endif
  11990. }
  11991. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMEN(void)
  11992. {
  11993. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  11994. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  11995. tmp_value.all = value;
  11996. #if GH_USB_ENABLE_DEBUG_PRINT
  11997. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMEN] --> 0x%08x\n",
  11998. REG_USB_LPM_CNTRL_PERI,value);
  11999. #endif
  12000. return tmp_value.bitc.lpmen;
  12001. }
  12002. GH_INLINE void GH_USB_set_LPM_CNTRL_PERI_LPMNAK(U8 data)
  12003. {
  12004. GH_USB_LPM_CNTRL_PERI_S d;
  12005. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_PERI;
  12006. d.bitc.lpmnak = data;
  12007. *(volatile U8 *)REG_USB_LPM_CNTRL_PERI = d.all;
  12008. #if GH_USB_ENABLE_DEBUG_PRINT
  12009. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_PERI_LPMNAK] <-- 0x%08x\n",
  12010. REG_USB_LPM_CNTRL_PERI,d.all,d.all);
  12011. #endif
  12012. }
  12013. GH_INLINE U8 GH_USB_get_LPM_CNTRL_PERI_LPMNAK(void)
  12014. {
  12015. GH_USB_LPM_CNTRL_PERI_S tmp_value;
  12016. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_PERI);
  12017. tmp_value.all = value;
  12018. #if GH_USB_ENABLE_DEBUG_PRINT
  12019. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_PERI_LPMNAK] --> 0x%08x\n",
  12020. REG_USB_LPM_CNTRL_PERI,value);
  12021. #endif
  12022. return tmp_value.bitc.lpmnak;
  12023. }
  12024. #endif /* GH_INLINE_LEVEL == 0 */
  12025. /*----------------------------------------------------------------------------*/
  12026. /* register USB_LPM_CNTRL_HOST (read/write) */
  12027. /*----------------------------------------------------------------------------*/
  12028. #if GH_INLINE_LEVEL == 0
  12029. /*! \brief Writes the register 'USB_LPM_CNTRL_HOST'. */
  12030. void GH_USB_set_LPM_CNTRL_HOST(U8 data);
  12031. /*! \brief Reads the register 'USB_LPM_CNTRL_HOST'. */
  12032. U8 GH_USB_get_LPM_CNTRL_HOST(void);
  12033. /*! \brief Writes the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_HOST'. */
  12034. void GH_USB_set_LPM_CNTRL_HOST_LPMXMT(U8 data);
  12035. /*! \brief Reads the bit group 'LPMXMT' of register 'USB_LPM_CNTRL_HOST'. */
  12036. U8 GH_USB_get_LPM_CNTRL_HOST_LPMXMT(void);
  12037. /*! \brief Writes the bit group 'LPMRES' of register 'USB_LPM_CNTRL_HOST'. */
  12038. void GH_USB_set_LPM_CNTRL_HOST_LPMRES(U8 data);
  12039. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_CNTRL_HOST'. */
  12040. U8 GH_USB_get_LPM_CNTRL_HOST_LPMRES(void);
  12041. #else /* GH_INLINE_LEVEL == 0 */
  12042. GH_INLINE void GH_USB_set_LPM_CNTRL_HOST(U8 data)
  12043. {
  12044. *(volatile U8 *)REG_USB_LPM_CNTRL_HOST = data;
  12045. #if GH_USB_ENABLE_DEBUG_PRINT
  12046. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_HOST] <-- 0x%08x\n",
  12047. REG_USB_LPM_CNTRL_HOST,data,data);
  12048. #endif
  12049. }
  12050. GH_INLINE U8 GH_USB_get_LPM_CNTRL_HOST(void)
  12051. {
  12052. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_HOST);
  12053. #if GH_USB_ENABLE_DEBUG_PRINT
  12054. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_HOST] --> 0x%08x\n",
  12055. REG_USB_LPM_CNTRL_HOST,value);
  12056. #endif
  12057. return value;
  12058. }
  12059. GH_INLINE void GH_USB_set_LPM_CNTRL_HOST_LPMXMT(U8 data)
  12060. {
  12061. GH_USB_LPM_CNTRL_HOST_S d;
  12062. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_HOST;
  12063. d.bitc.lpmxmt = data;
  12064. *(volatile U8 *)REG_USB_LPM_CNTRL_HOST = d.all;
  12065. #if GH_USB_ENABLE_DEBUG_PRINT
  12066. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_HOST_LPMXMT] <-- 0x%08x\n",
  12067. REG_USB_LPM_CNTRL_HOST,d.all,d.all);
  12068. #endif
  12069. }
  12070. GH_INLINE U8 GH_USB_get_LPM_CNTRL_HOST_LPMXMT(void)
  12071. {
  12072. GH_USB_LPM_CNTRL_HOST_S tmp_value;
  12073. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_HOST);
  12074. tmp_value.all = value;
  12075. #if GH_USB_ENABLE_DEBUG_PRINT
  12076. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_HOST_LPMXMT] --> 0x%08x\n",
  12077. REG_USB_LPM_CNTRL_HOST,value);
  12078. #endif
  12079. return tmp_value.bitc.lpmxmt;
  12080. }
  12081. GH_INLINE void GH_USB_set_LPM_CNTRL_HOST_LPMRES(U8 data)
  12082. {
  12083. GH_USB_LPM_CNTRL_HOST_S d;
  12084. d.all = *(volatile U8 *)REG_USB_LPM_CNTRL_HOST;
  12085. d.bitc.lpmres = data;
  12086. *(volatile U8 *)REG_USB_LPM_CNTRL_HOST = d.all;
  12087. #if GH_USB_ENABLE_DEBUG_PRINT
  12088. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_CNTRL_HOST_LPMRES] <-- 0x%08x\n",
  12089. REG_USB_LPM_CNTRL_HOST,d.all,d.all);
  12090. #endif
  12091. }
  12092. GH_INLINE U8 GH_USB_get_LPM_CNTRL_HOST_LPMRES(void)
  12093. {
  12094. GH_USB_LPM_CNTRL_HOST_S tmp_value;
  12095. U8 value = (*(volatile U8 *)REG_USB_LPM_CNTRL_HOST);
  12096. tmp_value.all = value;
  12097. #if GH_USB_ENABLE_DEBUG_PRINT
  12098. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_CNTRL_HOST_LPMRES] --> 0x%08x\n",
  12099. REG_USB_LPM_CNTRL_HOST,value);
  12100. #endif
  12101. return tmp_value.bitc.lpmres;
  12102. }
  12103. #endif /* GH_INLINE_LEVEL == 0 */
  12104. /*----------------------------------------------------------------------------*/
  12105. /* register USB_LPM_INTREN (read/write) */
  12106. /*----------------------------------------------------------------------------*/
  12107. #if GH_INLINE_LEVEL == 0
  12108. /*! \brief Writes the register 'USB_LPM_INTREN'. */
  12109. void GH_USB_set_LPM_INTREN(U8 data);
  12110. /*! \brief Reads the register 'USB_LPM_INTREN'. */
  12111. U8 GH_USB_get_LPM_INTREN(void);
  12112. /*! \brief Writes the bit group 'LPMSTEN' of register 'USB_LPM_INTREN'. */
  12113. void GH_USB_set_LPM_INTREN_LPMSTEN(U8 data);
  12114. /*! \brief Reads the bit group 'LPMSTEN' of register 'USB_LPM_INTREN'. */
  12115. U8 GH_USB_get_LPM_INTREN_LPMSTEN(void);
  12116. /*! \brief Writes the bit group 'LPMNYEN' of register 'USB_LPM_INTREN'. */
  12117. void GH_USB_set_LPM_INTREN_LPMNYEN(U8 data);
  12118. /*! \brief Reads the bit group 'LPMNYEN' of register 'USB_LPM_INTREN'. */
  12119. U8 GH_USB_get_LPM_INTREN_LPMNYEN(void);
  12120. /*! \brief Writes the bit group 'LPMACKEN' of register 'USB_LPM_INTREN'. */
  12121. void GH_USB_set_LPM_INTREN_LPMACKEN(U8 data);
  12122. /*! \brief Reads the bit group 'LPMACKEN' of register 'USB_LPM_INTREN'. */
  12123. U8 GH_USB_get_LPM_INTREN_LPMACKEN(void);
  12124. /*! \brief Writes the bit group 'LPMNCEN' of register 'USB_LPM_INTREN'. */
  12125. void GH_USB_set_LPM_INTREN_LPMNCEN(U8 data);
  12126. /*! \brief Reads the bit group 'LPMNCEN' of register 'USB_LPM_INTREN'. */
  12127. U8 GH_USB_get_LPM_INTREN_LPMNCEN(void);
  12128. /*! \brief Writes the bit group 'LPMRESEN' of register 'USB_LPM_INTREN'. */
  12129. void GH_USB_set_LPM_INTREN_LPMRESEN(U8 data);
  12130. /*! \brief Reads the bit group 'LPMRESEN' of register 'USB_LPM_INTREN'. */
  12131. U8 GH_USB_get_LPM_INTREN_LPMRESEN(void);
  12132. /*! \brief Writes the bit group 'LPMERREN' of register 'USB_LPM_INTREN'. */
  12133. void GH_USB_set_LPM_INTREN_LPMERREN(U8 data);
  12134. /*! \brief Reads the bit group 'LPMERREN' of register 'USB_LPM_INTREN'. */
  12135. U8 GH_USB_get_LPM_INTREN_LPMERREN(void);
  12136. #else /* GH_INLINE_LEVEL == 0 */
  12137. GH_INLINE void GH_USB_set_LPM_INTREN(U8 data)
  12138. {
  12139. *(volatile U8 *)REG_USB_LPM_INTREN = data;
  12140. #if GH_USB_ENABLE_DEBUG_PRINT
  12141. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN] <-- 0x%08x\n",
  12142. REG_USB_LPM_INTREN,data,data);
  12143. #endif
  12144. }
  12145. GH_INLINE U8 GH_USB_get_LPM_INTREN(void)
  12146. {
  12147. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  12148. #if GH_USB_ENABLE_DEBUG_PRINT
  12149. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN] --> 0x%08x\n",
  12150. REG_USB_LPM_INTREN,value);
  12151. #endif
  12152. return value;
  12153. }
  12154. GH_INLINE void GH_USB_set_LPM_INTREN_LPMSTEN(U8 data)
  12155. {
  12156. GH_USB_LPM_INTREN_S d;
  12157. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  12158. d.bitc.lpmsten = data;
  12159. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  12160. #if GH_USB_ENABLE_DEBUG_PRINT
  12161. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMSTEN] <-- 0x%08x\n",
  12162. REG_USB_LPM_INTREN,d.all,d.all);
  12163. #endif
  12164. }
  12165. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMSTEN(void)
  12166. {
  12167. GH_USB_LPM_INTREN_S tmp_value;
  12168. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  12169. tmp_value.all = value;
  12170. #if GH_USB_ENABLE_DEBUG_PRINT
  12171. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMSTEN] --> 0x%08x\n",
  12172. REG_USB_LPM_INTREN,value);
  12173. #endif
  12174. return tmp_value.bitc.lpmsten;
  12175. }
  12176. GH_INLINE void GH_USB_set_LPM_INTREN_LPMNYEN(U8 data)
  12177. {
  12178. GH_USB_LPM_INTREN_S d;
  12179. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  12180. d.bitc.lpmnyen = data;
  12181. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  12182. #if GH_USB_ENABLE_DEBUG_PRINT
  12183. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMNYEN] <-- 0x%08x\n",
  12184. REG_USB_LPM_INTREN,d.all,d.all);
  12185. #endif
  12186. }
  12187. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMNYEN(void)
  12188. {
  12189. GH_USB_LPM_INTREN_S tmp_value;
  12190. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  12191. tmp_value.all = value;
  12192. #if GH_USB_ENABLE_DEBUG_PRINT
  12193. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMNYEN] --> 0x%08x\n",
  12194. REG_USB_LPM_INTREN,value);
  12195. #endif
  12196. return tmp_value.bitc.lpmnyen;
  12197. }
  12198. GH_INLINE void GH_USB_set_LPM_INTREN_LPMACKEN(U8 data)
  12199. {
  12200. GH_USB_LPM_INTREN_S d;
  12201. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  12202. d.bitc.lpmacken = data;
  12203. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  12204. #if GH_USB_ENABLE_DEBUG_PRINT
  12205. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMACKEN] <-- 0x%08x\n",
  12206. REG_USB_LPM_INTREN,d.all,d.all);
  12207. #endif
  12208. }
  12209. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMACKEN(void)
  12210. {
  12211. GH_USB_LPM_INTREN_S tmp_value;
  12212. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  12213. tmp_value.all = value;
  12214. #if GH_USB_ENABLE_DEBUG_PRINT
  12215. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMACKEN] --> 0x%08x\n",
  12216. REG_USB_LPM_INTREN,value);
  12217. #endif
  12218. return tmp_value.bitc.lpmacken;
  12219. }
  12220. GH_INLINE void GH_USB_set_LPM_INTREN_LPMNCEN(U8 data)
  12221. {
  12222. GH_USB_LPM_INTREN_S d;
  12223. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  12224. d.bitc.lpmncen = data;
  12225. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  12226. #if GH_USB_ENABLE_DEBUG_PRINT
  12227. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMNCEN] <-- 0x%08x\n",
  12228. REG_USB_LPM_INTREN,d.all,d.all);
  12229. #endif
  12230. }
  12231. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMNCEN(void)
  12232. {
  12233. GH_USB_LPM_INTREN_S tmp_value;
  12234. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  12235. tmp_value.all = value;
  12236. #if GH_USB_ENABLE_DEBUG_PRINT
  12237. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMNCEN] --> 0x%08x\n",
  12238. REG_USB_LPM_INTREN,value);
  12239. #endif
  12240. return tmp_value.bitc.lpmncen;
  12241. }
  12242. GH_INLINE void GH_USB_set_LPM_INTREN_LPMRESEN(U8 data)
  12243. {
  12244. GH_USB_LPM_INTREN_S d;
  12245. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  12246. d.bitc.lpmresen = data;
  12247. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  12248. #if GH_USB_ENABLE_DEBUG_PRINT
  12249. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMRESEN] <-- 0x%08x\n",
  12250. REG_USB_LPM_INTREN,d.all,d.all);
  12251. #endif
  12252. }
  12253. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMRESEN(void)
  12254. {
  12255. GH_USB_LPM_INTREN_S tmp_value;
  12256. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  12257. tmp_value.all = value;
  12258. #if GH_USB_ENABLE_DEBUG_PRINT
  12259. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMRESEN] --> 0x%08x\n",
  12260. REG_USB_LPM_INTREN,value);
  12261. #endif
  12262. return tmp_value.bitc.lpmresen;
  12263. }
  12264. GH_INLINE void GH_USB_set_LPM_INTREN_LPMERREN(U8 data)
  12265. {
  12266. GH_USB_LPM_INTREN_S d;
  12267. d.all = *(volatile U8 *)REG_USB_LPM_INTREN;
  12268. d.bitc.lpmerren = data;
  12269. *(volatile U8 *)REG_USB_LPM_INTREN = d.all;
  12270. #if GH_USB_ENABLE_DEBUG_PRINT
  12271. GH_USB_DEBUG_PRINT_FUNCTION( "WRREG(0x%08x,0x%08x); \\\\ [GH_USB_set_LPM_INTREN_LPMERREN] <-- 0x%08x\n",
  12272. REG_USB_LPM_INTREN,d.all,d.all);
  12273. #endif
  12274. }
  12275. GH_INLINE U8 GH_USB_get_LPM_INTREN_LPMERREN(void)
  12276. {
  12277. GH_USB_LPM_INTREN_S tmp_value;
  12278. U8 value = (*(volatile U8 *)REG_USB_LPM_INTREN);
  12279. tmp_value.all = value;
  12280. #if GH_USB_ENABLE_DEBUG_PRINT
  12281. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTREN_LPMERREN] --> 0x%08x\n",
  12282. REG_USB_LPM_INTREN,value);
  12283. #endif
  12284. return tmp_value.bitc.lpmerren;
  12285. }
  12286. #endif /* GH_INLINE_LEVEL == 0 */
  12287. /*----------------------------------------------------------------------------*/
  12288. /* register USB_LPM_INTR_PERI (read) */
  12289. /*----------------------------------------------------------------------------*/
  12290. #if GH_INLINE_LEVEL == 0
  12291. /*! \brief Reads the register 'USB_LPM_INTR_PERI'. */
  12292. U8 GH_USB_get_LPM_INTR_PERI(void);
  12293. /*! \brief Reads the bit group 'LPMST' of register 'USB_LPM_INTR_PERI'. */
  12294. U8 GH_USB_get_LPM_INTR_PERI_LPMST(void);
  12295. /*! \brief Reads the bit group 'LPMNY' of register 'USB_LPM_INTR_PERI'. */
  12296. U8 GH_USB_get_LPM_INTR_PERI_LPMNY(void);
  12297. /*! \brief Reads the bit group 'LPMACK' of register 'USB_LPM_INTR_PERI'. */
  12298. U8 GH_USB_get_LPM_INTR_PERI_LPMACK(void);
  12299. /*! \brief Reads the bit group 'LPMNC' of register 'USB_LPM_INTR_PERI'. */
  12300. U8 GH_USB_get_LPM_INTR_PERI_LPMNC(void);
  12301. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_INTR_PERI'. */
  12302. U8 GH_USB_get_LPM_INTR_PERI_LPMRES(void);
  12303. /*! \brief Reads the bit group 'LPMERR' of register 'USB_LPM_INTR_PERI'. */
  12304. U8 GH_USB_get_LPM_INTR_PERI_LPMERR(void);
  12305. #else /* GH_INLINE_LEVEL == 0 */
  12306. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI(void)
  12307. {
  12308. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  12309. #if GH_USB_ENABLE_DEBUG_PRINT
  12310. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI] --> 0x%08x\n",
  12311. REG_USB_LPM_INTR_PERI,value);
  12312. #endif
  12313. return value;
  12314. }
  12315. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMST(void)
  12316. {
  12317. GH_USB_LPM_INTR_PERI_S tmp_value;
  12318. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  12319. tmp_value.all = value;
  12320. #if GH_USB_ENABLE_DEBUG_PRINT
  12321. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMST] --> 0x%08x\n",
  12322. REG_USB_LPM_INTR_PERI,value);
  12323. #endif
  12324. return tmp_value.bitc.lpmst;
  12325. }
  12326. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMNY(void)
  12327. {
  12328. GH_USB_LPM_INTR_PERI_S tmp_value;
  12329. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  12330. tmp_value.all = value;
  12331. #if GH_USB_ENABLE_DEBUG_PRINT
  12332. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMNY] --> 0x%08x\n",
  12333. REG_USB_LPM_INTR_PERI,value);
  12334. #endif
  12335. return tmp_value.bitc.lpmny;
  12336. }
  12337. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMACK(void)
  12338. {
  12339. GH_USB_LPM_INTR_PERI_S tmp_value;
  12340. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  12341. tmp_value.all = value;
  12342. #if GH_USB_ENABLE_DEBUG_PRINT
  12343. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMACK] --> 0x%08x\n",
  12344. REG_USB_LPM_INTR_PERI,value);
  12345. #endif
  12346. return tmp_value.bitc.lpmack;
  12347. }
  12348. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMNC(void)
  12349. {
  12350. GH_USB_LPM_INTR_PERI_S tmp_value;
  12351. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  12352. tmp_value.all = value;
  12353. #if GH_USB_ENABLE_DEBUG_PRINT
  12354. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMNC] --> 0x%08x\n",
  12355. REG_USB_LPM_INTR_PERI,value);
  12356. #endif
  12357. return tmp_value.bitc.lpmnc;
  12358. }
  12359. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMRES(void)
  12360. {
  12361. GH_USB_LPM_INTR_PERI_S tmp_value;
  12362. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  12363. tmp_value.all = value;
  12364. #if GH_USB_ENABLE_DEBUG_PRINT
  12365. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMRES] --> 0x%08x\n",
  12366. REG_USB_LPM_INTR_PERI,value);
  12367. #endif
  12368. return tmp_value.bitc.lpmres;
  12369. }
  12370. GH_INLINE U8 GH_USB_get_LPM_INTR_PERI_LPMERR(void)
  12371. {
  12372. GH_USB_LPM_INTR_PERI_S tmp_value;
  12373. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_PERI);
  12374. tmp_value.all = value;
  12375. #if GH_USB_ENABLE_DEBUG_PRINT
  12376. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_PERI_LPMERR] --> 0x%08x\n",
  12377. REG_USB_LPM_INTR_PERI,value);
  12378. #endif
  12379. return tmp_value.bitc.lpmerr;
  12380. }
  12381. #endif /* GH_INLINE_LEVEL == 0 */
  12382. /*----------------------------------------------------------------------------*/
  12383. /* register USB_LPM_INTR_HOST (read) */
  12384. /*----------------------------------------------------------------------------*/
  12385. #if GH_INLINE_LEVEL == 0
  12386. /*! \brief Reads the register 'USB_LPM_INTR_HOST'. */
  12387. U8 GH_USB_get_LPM_INTR_HOST(void);
  12388. /*! \brief Reads the bit group 'LPMST' of register 'USB_LPM_INTR_HOST'. */
  12389. U8 GH_USB_get_LPM_INTR_HOST_LPMST(void);
  12390. /*! \brief Reads the bit group 'LPMNY' of register 'USB_LPM_INTR_HOST'. */
  12391. U8 GH_USB_get_LPM_INTR_HOST_LPMNY(void);
  12392. /*! \brief Reads the bit group 'LPMACK' of register 'USB_LPM_INTR_HOST'. */
  12393. U8 GH_USB_get_LPM_INTR_HOST_LPMACK(void);
  12394. /*! \brief Reads the bit group 'LPMNC' of register 'USB_LPM_INTR_HOST'. */
  12395. U8 GH_USB_get_LPM_INTR_HOST_LPMNC(void);
  12396. /*! \brief Reads the bit group 'LPMRES' of register 'USB_LPM_INTR_HOST'. */
  12397. U8 GH_USB_get_LPM_INTR_HOST_LPMRES(void);
  12398. /*! \brief Reads the bit group 'LPMERR' of register 'USB_LPM_INTR_HOST'. */
  12399. U8 GH_USB_get_LPM_INTR_HOST_LPMERR(void);
  12400. #else /* GH_INLINE_LEVEL == 0 */
  12401. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST(void)
  12402. {
  12403. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  12404. #if GH_USB_ENABLE_DEBUG_PRINT
  12405. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST] --> 0x%08x\n",
  12406. REG_USB_LPM_INTR_HOST,value);
  12407. #endif
  12408. return value;
  12409. }
  12410. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMST(void)
  12411. {
  12412. GH_USB_LPM_INTR_HOST_S tmp_value;
  12413. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  12414. tmp_value.all = value;
  12415. #if GH_USB_ENABLE_DEBUG_PRINT
  12416. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMST] --> 0x%08x\n",
  12417. REG_USB_LPM_INTR_HOST,value);
  12418. #endif
  12419. return tmp_value.bitc.lpmst;
  12420. }
  12421. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMNY(void)
  12422. {
  12423. GH_USB_LPM_INTR_HOST_S tmp_value;
  12424. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  12425. tmp_value.all = value;
  12426. #if GH_USB_ENABLE_DEBUG_PRINT
  12427. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMNY] --> 0x%08x\n",
  12428. REG_USB_LPM_INTR_HOST,value);
  12429. #endif
  12430. return tmp_value.bitc.lpmny;
  12431. }
  12432. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMACK(void)
  12433. {
  12434. GH_USB_LPM_INTR_HOST_S tmp_value;
  12435. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  12436. tmp_value.all = value;
  12437. #if GH_USB_ENABLE_DEBUG_PRINT
  12438. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMACK] --> 0x%08x\n",
  12439. REG_USB_LPM_INTR_HOST,value);
  12440. #endif
  12441. return tmp_value.bitc.lpmack;
  12442. }
  12443. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMNC(void)
  12444. {
  12445. GH_USB_LPM_INTR_HOST_S tmp_value;
  12446. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  12447. tmp_value.all = value;
  12448. #if GH_USB_ENABLE_DEBUG_PRINT
  12449. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMNC] --> 0x%08x\n",
  12450. REG_USB_LPM_INTR_HOST,value);
  12451. #endif
  12452. return tmp_value.bitc.lpmnc;
  12453. }
  12454. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMRES(void)
  12455. {
  12456. GH_USB_LPM_INTR_HOST_S tmp_value;
  12457. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  12458. tmp_value.all = value;
  12459. #if GH_USB_ENABLE_DEBUG_PRINT
  12460. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMRES] --> 0x%08x\n",
  12461. REG_USB_LPM_INTR_HOST,value);
  12462. #endif
  12463. return tmp_value.bitc.lpmres;
  12464. }
  12465. GH_INLINE U8 GH_USB_get_LPM_INTR_HOST_LPMERR(void)
  12466. {
  12467. GH_USB_LPM_INTR_HOST_S tmp_value;
  12468. U8 value = (*(volatile U8 *)REG_USB_LPM_INTR_HOST);
  12469. tmp_value.all = value;
  12470. #if GH_USB_ENABLE_DEBUG_PRINT
  12471. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_INTR_HOST_LPMERR] --> 0x%08x\n",
  12472. REG_USB_LPM_INTR_HOST,value);
  12473. #endif
  12474. return tmp_value.bitc.lpmerr;
  12475. }
  12476. #endif /* GH_INLINE_LEVEL == 0 */
  12477. /*----------------------------------------------------------------------------*/
  12478. /* register USB_LPM_FADDR_HOST (read) */
  12479. /*----------------------------------------------------------------------------*/
  12480. #if GH_INLINE_LEVEL == 0
  12481. /*! \brief Reads the register 'USB_LPM_FADDR_HOST'. */
  12482. U8 GH_USB_get_LPM_FADDR_HOST(void);
  12483. /*! \brief Reads the bit group 'LPMFADDR' of register 'USB_LPM_FADDR_HOST'. */
  12484. U8 GH_USB_get_LPM_FADDR_HOST_LPMFADDR(void);
  12485. #else /* GH_INLINE_LEVEL == 0 */
  12486. GH_INLINE U8 GH_USB_get_LPM_FADDR_HOST(void)
  12487. {
  12488. U8 value = (*(volatile U8 *)REG_USB_LPM_FADDR_HOST);
  12489. #if GH_USB_ENABLE_DEBUG_PRINT
  12490. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_FADDR_HOST] --> 0x%08x\n",
  12491. REG_USB_LPM_FADDR_HOST,value);
  12492. #endif
  12493. return value;
  12494. }
  12495. GH_INLINE U8 GH_USB_get_LPM_FADDR_HOST_LPMFADDR(void)
  12496. {
  12497. GH_USB_LPM_FADDR_HOST_S tmp_value;
  12498. U8 value = (*(volatile U8 *)REG_USB_LPM_FADDR_HOST);
  12499. tmp_value.all = value;
  12500. #if GH_USB_ENABLE_DEBUG_PRINT
  12501. GH_USB_DEBUG_PRINT_FUNCTION( "value = RDREG(0x%08x); \\\\ [GH_USB_get_LPM_FADDR_HOST_LPMFADDR] --> 0x%08x\n",
  12502. REG_USB_LPM_FADDR_HOST,value);
  12503. #endif
  12504. return tmp_value.bitc.lpmfaddr;
  12505. }
  12506. #endif /* GH_INLINE_LEVEL == 0 */
  12507. /*----------------------------------------------------------------------------*/
  12508. /* init function */
  12509. /*----------------------------------------------------------------------------*/
  12510. /*! \brief Initialises the registers and mirror variables. */
  12511. void GH_USB_init(void);
  12512. #ifdef __cplusplus
  12513. }
  12514. #endif
  12515. #endif /* _GH_USB_H */
  12516. /*----------------------------------------------------------------------------*/
  12517. /* end of file */
  12518. /*----------------------------------------------------------------------------*/