usb_musb_reg.h 211 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887
  1. /*
  2. * Copyright (c) 2022, sakumisu
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef __USB_MUSB_REG_H__
  7. #define __USB_MUSB_REG_H__
  8. #define __I volatile const /* defines 'read only' permissions */
  9. #define __O volatile /* defines 'write only' permissions */
  10. #define __IO volatile /* defines 'read / write' permissions */
  11. /**
  12. * @brief Register map for USB0 peripheral (USB0)
  13. */
  14. #ifdef CONFIG_USB_MUSB_SUNXI
  15. #if 0
  16. typedef __PACKED_STRUCT { /*!< USB0 Structure */
  17. union {
  18. __IO uint8_t FIFO0_BYTE; /*!< USB FIFO Endpoint 0 */
  19. __IO uint16_t FIFO0_HALF; /*!< USB FIFO Endpoint 0 */
  20. __IO uint32_t FIFO0_WORD; /*!< USB FIFO Endpoint 0 */
  21. } FIFO0;
  22. union {
  23. __IO uint8_t FIFO1_BYTE; /*!< USB FIFO Endpoint 1 */
  24. __IO uint16_t FIFO1_HALF; /*!< USB FIFO Endpoint 1 */
  25. __IO uint32_t FIFO1_WORD; /*!< USB FIFO Endpoint 1 */
  26. } FIFO1;
  27. union {
  28. __IO uint8_t FIFO2_BYTE; /*!< USB FIFO Endpoint 2 */
  29. __IO uint16_t FIFO2_HALF; /*!< USB FIFO Endpoint 2 */
  30. __IO uint32_t FIFO2_WORD; /*!< USB FIFO Endpoint 2 */
  31. } FIFO2;
  32. union {
  33. __IO uint8_t FIFO3_BYTE; /*!< USB FIFO Endpoint 3 */
  34. __IO uint16_t FIFO3_HALF; /*!< USB FIFO Endpoint 3 */
  35. __IO uint32_t FIFO3_WORD; /*!< USB FIFO Endpoint 3 */
  36. } FIFO3;
  37. union {
  38. __IO uint8_t FIFO4_BYTE; /*!< USB FIFO Endpoint 4 */
  39. __IO uint16_t FIFO4_HALF; /*!< USB FIFO Endpoint 4 */
  40. __IO uint32_t FIFO4_WORD; /*!< USB FIFO Endpoint 4 */
  41. } FIFO4;
  42. union {
  43. __IO uint8_t FIFO5_BYTE; /*!< USB FIFO Endpoint 5 */
  44. __IO uint16_t FIFO5_HALF; /*!< USB FIFO Endpoint 5 */
  45. __IO uint32_t FIFO5_WORD; /*!< USB FIFO Endpoint 5 */
  46. } FIFO5;
  47. union {
  48. __IO uint8_t FIFO6_BYTE; /*!< USB FIFO Endpoint 6 */
  49. __IO uint16_t FIFO6_HALF; /*!< USB FIFO Endpoint 6 */
  50. __IO uint32_t FIFO6_WORD; /*!< USB FIFO Endpoint 6 */
  51. } FIFO6;
  52. union {
  53. __IO uint8_t FIFO7_BYTE; /*!< USB FIFO Endpoint 7 */
  54. __IO uint16_t FIFO7_HALF; /*!< USB FIFO Endpoint 7 */
  55. __IO uint32_t FIFO7_WORD; /*!< USB FIFO Endpoint 7 */
  56. } FIFO7;
  57. union {
  58. __IO uint8_t FIFO_BYTE; /*!< USB FIFO Endpoint 7 */
  59. __IO uint16_t FIFO_HALF; /*!< USB FIFO Endpoint 7 */
  60. __IO uint32_t FIFO_WORD; /*!< USB FIFO Endpoint 7 */
  61. } FIFO_RESERVED[8];
  62. // 0x40
  63. __IO uint8_t POWER; /*!< USB Power */
  64. __IO uint8_t DEVCTL; /*!< USB Device Control */
  65. __IO uint8_t EPIDX; /*!< USB Endpoint Index */
  66. __IO uint8_t VEND0;
  67. // 0x44
  68. __IO uint16_t TXIS; /*!< USB Transmit Interrupt Status */
  69. __IO uint16_t RXIS; /*!< USB Receive Interrupt Status */
  70. // 0x48
  71. __IO uint16_t TXIE; /*!< USB Transmit Interrupt Enable */
  72. __IO uint16_t RXIE; /*!< USB Receive Interrupt Enable */
  73. // 0x4c
  74. __IO uint8_t IS; /*!< USB General Interrupt Status */
  75. __I uint8_t IS_RESERVED[3];
  76. __IO uint8_t IE; /*!< USB Interrupt Enable */
  77. __I uint8_t IE_RESERVED[3];
  78. __IO uint16_t FRAME; /*!< USB Frame Value */
  79. __I uint8_t FRAME_RESERVED[34];
  80. __IO uint8_t EPINFO; /*!< USB Endpoint Information */
  81. __IO uint8_t RAMINFO; /*!< USB RAM Information */
  82. __IO uint8_t LINKINFO;
  83. __IO uint8_t VPLEN; /*!< USB OTG VBUS Pulse Timing */
  84. // 0x7c
  85. __IO uint8_t HSEOF; /*!< USB High-Speed Last Transaction to End of Frame Timing */
  86. __IO uint8_t FSEOF; /*!< USB Full-Speed Last Transaction to End of Frame Timing */
  87. __IO uint8_t LSEOF; /*!< USB Low-Speed Last Transaction to End of Frame Timing */
  88. __I uint8_t RESERVED7F;
  89. // 0x80
  90. __IO uint16_t TXMAXP1; /*!< USB Maximum Transmit Data Endpoint 1 */
  91. __PACKED_UNION
  92. {
  93. __IO uint8_t CSRL0;
  94. __IO uint8_t TXCSRL1; /*!< USB Transmit Control and Status Endpoint 1 Low */
  95. } ;
  96. __PACKED_UNION
  97. {
  98. __O uint8_t CSRH0; /*!< USB Control and Status Endpoint 0 High */
  99. __IO uint8_t TXCSRH1; /*!< USB Transmit Control and Status Endpoint 1 High */
  100. } ;
  101. // 0x84
  102. __IO uint16_t RXMAXP1; /*!< USB Maximum Receive Data Endpoint 1 */
  103. __IO uint8_t RXCSRL1; /*!< USB Receive Control and Status Endpoint 1 Low */
  104. __IO uint8_t RXCSRH1; /*!< USB Receive Control and Status Endpoint 1 High */
  105. __PACKED_UNION
  106. {
  107. __IO uint16_t COUNT0;
  108. __IO uint16_t RXCOUNT1; /*!< USB Receive Byte Count Endpoint 1 */
  109. } ;
  110. // 0x8A
  111. __IO uint8_t TYPE0; /*!< USB Type Endpoint 0 */
  112. __IO uint8_t NAKLMT; /*!< USB NAK Limit */
  113. // 0x8C
  114. __IO uint8_t TXTYPE1; /*!< USB Host Transmit Configure Type Endpoint 1 */
  115. __IO uint8_t TXINTERVAL1; /*!< USB Host Transmit Interval Endpoint 1 */
  116. __IO uint8_t RXTYPE1; /*!< USB Host Configure Receive Type Endpoint 1 */
  117. __IO uint8_t RXINTERVAL1; /*!< USB Host Receive Polling Interval Endpoint 1 */
  118. // 0x90
  119. __IO uint8_t TXFIFOSZ; /*!< USB Transmit Dynamic FIFO Sizing */
  120. __I uint8_t RESERVED91;
  121. __IO uint16_t TXFIFOADD; /*!< USB Transmit FIFO Start Address */
  122. // 0x94
  123. __IO uint8_t RXFIFOSZ; /*!< USB Receive Dynamic FIFO Sizing */
  124. __I uint8_t RESERVED95;
  125. __IO uint16_t RXFIFOADD; /*!< USB Receive FIFO Start Address */
  126. /* "bus control"/target registers, for host side multipoint (external hubs) */
  127. // 0x98
  128. __PACKED_UNION
  129. {
  130. __IO uint8_t FADDR;
  131. __IO uint8_t TXFUNCADDR0;
  132. };
  133. __I uint8_t RESERVERD99;
  134. // 0x9A
  135. __IO uint8_t TXHUBADDR0;
  136. __IO uint8_t TXHUBPORT0;
  137. // 0x9c
  138. __IO uint8_t RXFUNCADDR0;
  139. __I uint8_t RESERVED9d;
  140. __IO uint8_t RXHUBADDR0;
  141. __IO uint8_t RXHUBPORT0;
  142. } USB0_Type;
  143. #endif
  144. #else
  145. #if 0
  146. typedef struct { /*!< USB0 Structure */
  147. __IO uint8_t FADDR; /*!< USB Device Functional Address */
  148. __IO uint8_t POWER; /*!< USB Power */
  149. __IO uint16_t TXIS; /*!< USB Transmit Interrupt Status */
  150. __IO uint16_t RXIS; /*!< USB Receive Interrupt Status */
  151. __IO uint16_t TXIE; /*!< USB Transmit Interrupt Enable */
  152. __IO uint16_t RXIE; /*!< USB Receive Interrupt Enable */
  153. __IO uint8_t IS; /*!< USB General Interrupt Status */
  154. __IO uint8_t IE; /*!< USB Interrupt Enable */
  155. __IO uint16_t FRAME; /*!< USB Frame Value */
  156. __IO uint8_t EPIDX; /*!< USB Endpoint Index */
  157. __IO uint8_t TEST; /*!< USB Test Mode */
  158. __I uint32_t RESERVED0[4];
  159. union {
  160. __IO uint8_t FIFO0_BYTE; /*!< USB FIFO Endpoint 0 */
  161. __IO uint16_t FIFO0_HALF; /*!< USB FIFO Endpoint 0 */
  162. __IO uint32_t FIFO0_WORD; /*!< USB FIFO Endpoint 0 */
  163. } FIFO0;
  164. union {
  165. __IO uint8_t FIFO1_BYTE; /*!< USB FIFO Endpoint 1 */
  166. __IO uint16_t FIFO1_HALF; /*!< USB FIFO Endpoint 1 */
  167. __IO uint32_t FIFO1_WORD; /*!< USB FIFO Endpoint 1 */
  168. } FIFO1;
  169. union {
  170. __IO uint8_t FIFO2_BYTE; /*!< USB FIFO Endpoint 2 */
  171. __IO uint16_t FIFO2_HALF; /*!< USB FIFO Endpoint 2 */
  172. __IO uint32_t FIFO2_WORD; /*!< USB FIFO Endpoint 2 */
  173. } FIFO2;
  174. union {
  175. __IO uint8_t FIFO3_BYTE; /*!< USB FIFO Endpoint 3 */
  176. __IO uint16_t FIFO3_HALF; /*!< USB FIFO Endpoint 3 */
  177. __IO uint32_t FIFO3_WORD; /*!< USB FIFO Endpoint 3 */
  178. } FIFO3;
  179. union {
  180. __IO uint8_t FIFO4_BYTE; /*!< USB FIFO Endpoint 4 */
  181. __IO uint16_t FIFO4_HALF; /*!< USB FIFO Endpoint 4 */
  182. __IO uint32_t FIFO4_WORD; /*!< USB FIFO Endpoint 4 */
  183. } FIFO4;
  184. union {
  185. __IO uint8_t FIFO5_BYTE; /*!< USB FIFO Endpoint 5 */
  186. __IO uint16_t FIFO5_HALF; /*!< USB FIFO Endpoint 5 */
  187. __IO uint32_t FIFO5_WORD; /*!< USB FIFO Endpoint 5 */
  188. } FIFO5;
  189. union {
  190. __IO uint8_t FIFO6_BYTE; /*!< USB FIFO Endpoint 6 */
  191. __IO uint16_t FIFO6_HALF; /*!< USB FIFO Endpoint 6 */
  192. __IO uint32_t FIFO6_WORD; /*!< USB FIFO Endpoint 6 */
  193. } FIFO6;
  194. union {
  195. __IO uint8_t FIFO7_BYTE; /*!< USB FIFO Endpoint 7 */
  196. __IO uint16_t FIFO7_HALF; /*!< USB FIFO Endpoint 7 */
  197. __IO uint32_t FIFO7_WORD; /*!< USB FIFO Endpoint 7 */
  198. } FIFO7;
  199. __I uint32_t RESERVED1[8];
  200. __IO uint8_t DEVCTL; /*!< USB Device Control */
  201. __IO uint8_t CCONF; /*!< USB Common Configuration */
  202. __IO uint8_t TXFIFOSZ; /*!< USB Transmit Dynamic FIFO Sizing */
  203. __IO uint8_t RXFIFOSZ; /*!< USB Receive Dynamic FIFO Sizing */
  204. __IO uint16_t TXFIFOADD; /*!< USB Transmit FIFO Start Address */
  205. __IO uint16_t RXFIFOADD; /*!< USB Receive FIFO Start Address */
  206. __I uint32_t RESERVED2[2];
  207. __IO uint8_t ULPIVBUSCTL; /*!< USB ULPI VBUS Control */
  208. __I uint8_t RESERVED3[3];
  209. __IO uint8_t ULPIREGDATA; /*!< USB ULPI Register Data */
  210. __IO uint8_t ULPIREGADDR; /*!< USB ULPI Register Address */
  211. __IO uint8_t ULPIREGCTL; /*!< USB ULPI Register Control */
  212. __I uint8_t RESERVED4;
  213. __IO uint8_t EPINFO; /*!< USB Endpoint Information */
  214. __IO uint8_t RAMINFO; /*!< USB RAM Information */
  215. __IO uint8_t CONTIM; /*!< USB Connect Timing */
  216. __IO uint8_t VPLEN; /*!< USB OTG VBUS Pulse Timing */
  217. __IO uint8_t HSEOF; /*!< USB High-Speed Last Transaction to End of Frame Timing */
  218. __IO uint8_t FSEOF; /*!< USB Full-Speed Last Transaction to End of Frame Timing */
  219. __IO uint8_t LSEOF; /*!< USB Low-Speed Last Transaction to End of Frame Timing */
  220. __I uint8_t RESERVED5;
  221. __IO uint8_t TXFUNCADDR0; /*!< USB Transmit Functional Address Endpoint 0 */
  222. __I uint8_t RESERVED6;
  223. __IO uint8_t TXHUBADDR0; /*!< USB Transmit Hub Address Endpoint 0 */
  224. __IO uint8_t TXHUBPORT0; /*!< USB Transmit Hub Port Endpoint 0 */
  225. __I uint32_t RESERVED7;
  226. __IO uint8_t TXFUNCADDR1; /*!< USB Transmit Functional Address Endpoint 1 */
  227. __I uint8_t RESERVED8;
  228. __IO uint8_t TXHUBADDR1; /*!< USB Transmit Hub Address Endpoint 1 */
  229. __IO uint8_t TXHUBPORT1; /*!< USB Transmit Hub Port Endpoint 1 */
  230. __IO uint8_t RXFUNCADDR1; /*!< USB Receive Functional Address Endpoint 1 */
  231. __I uint8_t RESERVED9;
  232. __IO uint8_t RXHUBADDR1; /*!< USB Receive Hub Address Endpoint 1 */
  233. __IO uint8_t RXHUBPORT1; /*!< USB Receive Hub Port Endpoint 1 */
  234. __IO uint8_t TXFUNCADDR2; /*!< USB Transmit Functional Address Endpoint 2 */
  235. __I uint8_t RESERVED10;
  236. __IO uint8_t TXHUBADDR2; /*!< USB Transmit Hub Address Endpoint 2 */
  237. __IO uint8_t TXHUBPORT2; /*!< USB Transmit Hub Port Endpoint 2 */
  238. __IO uint8_t RXFUNCADDR2; /*!< USB Receive Functional Address Endpoint 2 */
  239. __I uint8_t RESERVED11;
  240. __IO uint8_t RXHUBADDR2; /*!< USB Receive Hub Address Endpoint 2 */
  241. __IO uint8_t RXHUBPORT2; /*!< USB Receive Hub Port Endpoint 2 */
  242. __IO uint8_t TXFUNCADDR3; /*!< USB Transmit Functional Address Endpoint 3 */
  243. __I uint8_t RESERVED12;
  244. __IO uint8_t TXHUBADDR3; /*!< USB Transmit Hub Address Endpoint 3 */
  245. __IO uint8_t TXHUBPORT3; /*!< USB Transmit Hub Port Endpoint 3 */
  246. __IO uint8_t RXFUNCADDR3; /*!< USB Receive Functional Address Endpoint 3 */
  247. __I uint8_t RESERVED13;
  248. __IO uint8_t RXHUBADDR3; /*!< USB Receive Hub Address Endpoint 3 */
  249. __IO uint8_t RXHUBPORT3; /*!< USB Receive Hub Port Endpoint 3 */
  250. __IO uint8_t TXFUNCADDR4; /*!< USB Transmit Functional Address Endpoint 4 */
  251. __I uint8_t RESERVED14;
  252. __IO uint8_t TXHUBADDR4; /*!< USB Transmit Hub Address Endpoint 4 */
  253. __IO uint8_t TXHUBPORT4; /*!< USB Transmit Hub Port Endpoint 4 */
  254. __IO uint8_t RXFUNCADDR4; /*!< USB Receive Functional Address Endpoint 4 */
  255. __I uint8_t RESERVED15;
  256. __IO uint8_t RXHUBADDR4; /*!< USB Receive Hub Address Endpoint 4 */
  257. __IO uint8_t RXHUBPORT4; /*!< USB Receive Hub Port Endpoint 4 */
  258. __IO uint8_t TXFUNCADDR5; /*!< USB Transmit Functional Address Endpoint 5 */
  259. __I uint8_t RESERVED16;
  260. __IO uint8_t TXHUBADDR5; /*!< USB Transmit Hub Address Endpoint 5 */
  261. __IO uint8_t TXHUBPORT5; /*!< USB Transmit Hub Port Endpoint 5 */
  262. __IO uint8_t RXFUNCADDR5; /*!< USB Receive Functional Address Endpoint 5 */
  263. __I uint8_t RESERVED17;
  264. __IO uint8_t RXHUBADDR5; /*!< USB Receive Hub Address Endpoint 5 */
  265. __IO uint8_t RXHUBPORT5; /*!< USB Receive Hub Port Endpoint 5 */
  266. __IO uint8_t TXFUNCADDR6; /*!< USB Transmit Functional Address Endpoint 6 */
  267. __I uint8_t RESERVED18;
  268. __IO uint8_t TXHUBADDR6; /*!< USB Transmit Hub Address Endpoint 6 */
  269. __IO uint8_t TXHUBPORT6; /*!< USB Transmit Hub Port Endpoint 6 */
  270. __IO uint8_t RXFUNCADDR6; /*!< USB Receive Functional Address Endpoint 6 */
  271. __I uint8_t RESERVED19;
  272. __IO uint8_t RXHUBADDR6; /*!< USB Receive Hub Address Endpoint 6 */
  273. __IO uint8_t RXHUBPORT6; /*!< USB Receive Hub Port Endpoint 6 */
  274. __IO uint8_t TXFUNCADDR7; /*!< USB Transmit Functional Address Endpoint 7 */
  275. __I uint8_t RESERVED20;
  276. __IO uint8_t TXHUBADDR7; /*!< USB Transmit Hub Address Endpoint 7 */
  277. __IO uint8_t TXHUBPORT7; /*!< USB Transmit Hub Port Endpoint 7 */
  278. __IO uint8_t RXFUNCADDR7; /*!< USB Receive Functional Address Endpoint 7 */
  279. __I uint8_t RESERVED21;
  280. __IO uint8_t RXHUBADDR7; /*!< USB Receive Hub Address Endpoint 7 */
  281. __IO uint8_t RXHUBPORT7; /*!< USB Receive Hub Port Endpoint 7 */
  282. __I uint32_t RESERVED22[16];
  283. __I uint16_t RESERVED23;
  284. __O uint8_t CSRL0; /*!< USB Control and Status Endpoint 0 Low */
  285. __O uint8_t CSRH0; /*!< USB Control and Status Endpoint 0 High */
  286. __I uint16_t RESERVED24[2];
  287. __IO uint8_t COUNT0; /*!< USB Receive Byte Count Endpoint 0 */
  288. __I uint8_t RESERVED25;
  289. __IO uint8_t TYPE0; /*!< USB Type Endpoint 0 */
  290. __IO uint8_t NAKLMT; /*!< USB NAK Limit */
  291. __I uint32_t RESERVED26;
  292. __IO uint16_t TXMAXP1; /*!< USB Maximum Transmit Data Endpoint 1 */
  293. __IO uint8_t TXCSRL1; /*!< USB Transmit Control and Status Endpoint 1 Low */
  294. __IO uint8_t TXCSRH1; /*!< USB Transmit Control and Status Endpoint 1 High */
  295. __IO uint16_t RXMAXP1; /*!< USB Maximum Receive Data Endpoint 1 */
  296. __IO uint8_t RXCSRL1; /*!< USB Receive Control and Status Endpoint 1 Low */
  297. __IO uint8_t RXCSRH1; /*!< USB Receive Control and Status Endpoint 1 High */
  298. __IO uint16_t RXCOUNT1; /*!< USB Receive Byte Count Endpoint 1 */
  299. __IO uint8_t TXTYPE1; /*!< USB Host Transmit Configure Type Endpoint 1 */
  300. __IO uint8_t TXINTERVAL1; /*!< USB Host Transmit Interval Endpoint 1 */
  301. __IO uint8_t RXTYPE1; /*!< USB Host Configure Receive Type Endpoint 1 */
  302. __IO uint8_t RXINTERVAL1; /*!< USB Host Receive Polling Interval Endpoint 1 */
  303. __I uint16_t RESERVED27;
  304. __IO uint16_t TXMAXP2; /*!< USB Maximum Transmit Data Endpoint 2 */
  305. __IO uint8_t TXCSRL2; /*!< USB Transmit Control and Status Endpoint 2 Low */
  306. __IO uint8_t TXCSRH2; /*!< USB Transmit Control and Status Endpoint 2 High */
  307. __IO uint16_t RXMAXP2; /*!< USB Maximum Receive Data Endpoint 2 */
  308. __IO uint8_t RXCSRL2; /*!< USB Receive Control and Status Endpoint 2 Low */
  309. __IO uint8_t RXCSRH2; /*!< USB Receive Control and Status Endpoint 2 High */
  310. __IO uint16_t RXCOUNT2; /*!< USB Receive Byte Count Endpoint 2 */
  311. __IO uint8_t TXTYPE2; /*!< USB Host Transmit Configure Type Endpoint 2 */
  312. __IO uint8_t TXINTERVAL2; /*!< USB Host Transmit Interval Endpoint 2 */
  313. __IO uint8_t RXTYPE2; /*!< USB Host Configure Receive Type Endpoint 2 */
  314. __IO uint8_t RXINTERVAL2; /*!< USB Host Receive Polling Interval Endpoint 2 */
  315. __I uint16_t RESERVED28;
  316. __IO uint16_t TXMAXP3; /*!< USB Maximum Transmit Data Endpoint 3 */
  317. __IO uint8_t TXCSRL3; /*!< USB Transmit Control and Status Endpoint 3 Low */
  318. __IO uint8_t TXCSRH3; /*!< USB Transmit Control and Status Endpoint 3 High */
  319. __IO uint16_t RXMAXP3; /*!< USB Maximum Receive Data Endpoint 3 */
  320. __IO uint8_t RXCSRL3; /*!< USB Receive Control and Status Endpoint 3 Low */
  321. __IO uint8_t RXCSRH3; /*!< USB Receive Control and Status Endpoint 3 High */
  322. __IO uint16_t RXCOUNT3; /*!< USB Receive Byte Count Endpoint 3 */
  323. __IO uint8_t TXTYPE3; /*!< USB Host Transmit Configure Type Endpoint 3 */
  324. __IO uint8_t TXINTERVAL3; /*!< USB Host Transmit Interval Endpoint 3 */
  325. __IO uint8_t RXTYPE3; /*!< USB Host Configure Receive Type Endpoint 3 */
  326. __IO uint8_t RXINTERVAL3; /*!< USB Host Receive Polling Interval Endpoint 3 */
  327. __I uint16_t RESERVED29;
  328. __IO uint16_t TXMAXP4; /*!< USB Maximum Transmit Data Endpoint 4 */
  329. __IO uint8_t TXCSRL4; /*!< USB Transmit Control and Status Endpoint 4 Low */
  330. __IO uint8_t TXCSRH4; /*!< USB Transmit Control and Status Endpoint 4 High */
  331. __IO uint16_t RXMAXP4; /*!< USB Maximum Receive Data Endpoint 4 */
  332. __IO uint8_t RXCSRL4; /*!< USB Receive Control and Status Endpoint 4 Low */
  333. __IO uint8_t RXCSRH4; /*!< USB Receive Control and Status Endpoint 4 High */
  334. __IO uint16_t RXCOUNT4; /*!< USB Receive Byte Count Endpoint 4 */
  335. __IO uint8_t TXTYPE4; /*!< USB Host Transmit Configure Type Endpoint 4 */
  336. __IO uint8_t TXINTERVAL4; /*!< USB Host Transmit Interval Endpoint 4 */
  337. __IO uint8_t RXTYPE4; /*!< USB Host Configure Receive Type Endpoint 4 */
  338. __IO uint8_t RXINTERVAL4; /*!< USB Host Receive Polling Interval Endpoint 4 */
  339. __I uint16_t RESERVED30;
  340. __IO uint16_t TXMAXP5; /*!< USB Maximum Transmit Data Endpoint 5 */
  341. __IO uint8_t TXCSRL5; /*!< USB Transmit Control and Status Endpoint 5 Low */
  342. __IO uint8_t TXCSRH5; /*!< USB Transmit Control and Status Endpoint 5 High */
  343. __IO uint16_t RXMAXP5; /*!< USB Maximum Receive Data Endpoint 5 */
  344. __IO uint8_t RXCSRL5; /*!< USB Receive Control and Status Endpoint 5 Low */
  345. __IO uint8_t RXCSRH5; /*!< USB Receive Control and Status Endpoint 5 High */
  346. __IO uint16_t RXCOUNT5; /*!< USB Receive Byte Count Endpoint 5 */
  347. __IO uint8_t TXTYPE5; /*!< USB Host Transmit Configure Type Endpoint 5 */
  348. __IO uint8_t TXINTERVAL5; /*!< USB Host Transmit Interval Endpoint 5 */
  349. __IO uint8_t RXTYPE5; /*!< USB Host Configure Receive Type Endpoint 5 */
  350. __IO uint8_t RXINTERVAL5; /*!< USB Host Receive Polling Interval Endpoint 5 */
  351. __I uint16_t RESERVED31;
  352. __IO uint16_t TXMAXP6; /*!< USB Maximum Transmit Data Endpoint 6 */
  353. __IO uint8_t TXCSRL6; /*!< USB Transmit Control and Status Endpoint 6 Low */
  354. __IO uint8_t TXCSRH6; /*!< USB Transmit Control and Status Endpoint 6 High */
  355. __IO uint16_t RXMAXP6; /*!< USB Maximum Receive Data Endpoint 6 */
  356. __IO uint8_t RXCSRL6; /*!< USB Receive Control and Status Endpoint 6 Low */
  357. __IO uint8_t RXCSRH6; /*!< USB Receive Control and Status Endpoint 6 High */
  358. __IO uint16_t RXCOUNT6; /*!< USB Receive Byte Count Endpoint 6 */
  359. __IO uint8_t TXTYPE6; /*!< USB Host Transmit Configure Type Endpoint 6 */
  360. __IO uint8_t TXINTERVAL6; /*!< USB Host Transmit Interval Endpoint 6 */
  361. __IO uint8_t RXTYPE6; /*!< USB Host Configure Receive Type Endpoint 6 */
  362. __IO uint8_t RXINTERVAL6; /*!< USB Host Receive Polling Interval Endpoint 6 */
  363. __I uint16_t RESERVED32;
  364. __IO uint16_t TXMAXP7; /*!< USB Maximum Transmit Data Endpoint 7 */
  365. __IO uint8_t TXCSRL7; /*!< USB Transmit Control and Status Endpoint 7 Low */
  366. __IO uint8_t TXCSRH7; /*!< USB Transmit Control and Status Endpoint 7 High */
  367. __IO uint16_t RXMAXP7; /*!< USB Maximum Receive Data Endpoint 7 */
  368. __IO uint8_t RXCSRL7; /*!< USB Receive Control and Status Endpoint 7 Low */
  369. __IO uint8_t RXCSRH7; /*!< USB Receive Control and Status Endpoint 7 High */
  370. __IO uint16_t RXCOUNT7; /*!< USB Receive Byte Count Endpoint 7 */
  371. __IO uint8_t TXTYPE7; /*!< USB Host Transmit Configure Type Endpoint 7 */
  372. __IO uint8_t TXINTERVAL7; /*!< USB Host Transmit Interval Endpoint 7 */
  373. __IO uint8_t RXTYPE7; /*!< USB Host Configure Receive Type Endpoint 7 */
  374. __IO uint8_t RXINTERVAL7; /*!< USB Host Receive Polling Interval Endpoint 7 */
  375. __I uint16_t RESERVED33[65];
  376. __IO uint8_t DMAINTR; /*!< USB DMA Interrupt */
  377. __I uint8_t RESERVED34[3];
  378. __IO uint16_t DMACTL0; /*!< USB DMA Control 0 */
  379. __I uint16_t RESERVED35;
  380. __IO uint32_t DMAADDR0; /*!< USB DMA Address 0 */
  381. __IO uint32_t DMACOUNT0; /*!< USB DMA Count 0 */
  382. __I uint32_t RESERVED36;
  383. __IO uint16_t DMACTL1; /*!< USB DMA Control 1 */
  384. __I uint16_t RESERVED37;
  385. __IO uint32_t DMAADDR1; /*!< USB DMA Address 1 */
  386. __IO uint32_t DMACOUNT1; /*!< USB DMA Count 1 */
  387. __I uint32_t RESERVED38;
  388. __IO uint16_t DMACTL2; /*!< USB DMA Control 2 */
  389. __I uint16_t RESERVED39;
  390. __IO uint32_t DMAADDR2; /*!< USB DMA Address 2 */
  391. __IO uint32_t DMACOUNT2; /*!< USB DMA Count 2 */
  392. __I uint32_t RESERVED40;
  393. __IO uint16_t DMACTL3; /*!< USB DMA Control 3 */
  394. __I uint16_t RESERVED41;
  395. __IO uint32_t DMAADDR3; /*!< USB DMA Address 3 */
  396. __IO uint32_t DMACOUNT3; /*!< USB DMA Count 3 */
  397. __I uint32_t RESERVED42;
  398. __IO uint16_t DMACTL4; /*!< USB DMA Control 4 */
  399. __I uint16_t RESERVED43;
  400. __IO uint32_t DMAADDR4; /*!< USB DMA Address 4 */
  401. __IO uint32_t DMACOUNT4; /*!< USB DMA Count 4 */
  402. __I uint32_t RESERVED44;
  403. __IO uint16_t DMACTL5; /*!< USB DMA Control 5 */
  404. __I uint16_t RESERVED45;
  405. __IO uint32_t DMAADDR5; /*!< USB DMA Address 5 */
  406. __IO uint32_t DMACOUNT5; /*!< USB DMA Count 5 */
  407. __I uint32_t RESERVED46;
  408. __IO uint16_t DMACTL6; /*!< USB DMA Control 6 */
  409. __I uint16_t RESERVED47;
  410. __IO uint32_t DMAADDR6; /*!< USB DMA Address 6 */
  411. __IO uint32_t DMACOUNT6; /*!< USB DMA Count 6 */
  412. __I uint32_t RESERVED48;
  413. __IO uint16_t DMACTL7; /*!< USB DMA Control 7 */
  414. __I uint16_t RESERVED49;
  415. __IO uint32_t DMAADDR7; /*!< USB DMA Address 7 */
  416. __IO uint32_t DMACOUNT7; /*!< USB DMA Count 7 */
  417. __I uint32_t RESERVED50[33];
  418. __IO uint16_t RQPKTCOUNT1; /*!< USB Request Packet Count in Block Transfer Endpoint 1 */
  419. __I uint16_t RESERVED51;
  420. __IO uint16_t RQPKTCOUNT2; /*!< USB Request Packet Count in Block Transfer Endpoint 2 */
  421. __I uint16_t RESERVED52;
  422. __IO uint16_t RQPKTCOUNT3; /*!< USB Request Packet Count in Block Transfer Endpoint 3 */
  423. __I uint16_t RESERVED53;
  424. __IO uint16_t RQPKTCOUNT4; /*!< USB Request Packet Count in Block Transfer Endpoint 4 */
  425. __I uint16_t RESERVED54;
  426. __IO uint16_t RQPKTCOUNT5; /*!< USB Request Packet Count in Block Transfer Endpoint 5 */
  427. __I uint16_t RESERVED55;
  428. __IO uint16_t RQPKTCOUNT6; /*!< USB Request Packet Count in Block Transfer Endpoint 6 */
  429. __I uint16_t RESERVED56;
  430. __IO uint16_t RQPKTCOUNT7; /*!< USB Request Packet Count in Block Transfer Endpoint 7 */
  431. __I uint16_t RESERVED57[17];
  432. __IO uint16_t RXDPKTBUFDIS; /*!< USB Receive Double Packet Buffer Disable */
  433. __IO uint16_t TXDPKTBUFDIS; /*!< USB Transmit Double Packet Buffer Disable */
  434. __IO uint16_t CTO; /*!< USB Chirp Timeout */
  435. __IO uint16_t HHSRTN; /*!< USB High Speed to UTM Operating Delay */
  436. __IO uint16_t HSBT; /*!< USB High Speed Time-out Adder */
  437. __I uint16_t RESERVED58[11];
  438. __IO uint16_t LPMATTR; /*!< USB LPM Attributes */
  439. __IO uint8_t LPMCNTRL; /*!< USB LPM Control */
  440. __IO uint8_t LPMIM; /*!< USB LPM Interrupt Mask */
  441. __IO uint8_t LPMRIS; /*!< USB LPM Raw Interrupt Status */
  442. __IO uint8_t LPMFADDR; /*!< USB LPM Function Address */
  443. __I uint16_t RESERVED59[77];
  444. __IO uint32_t EPC; /*!< USB External Power Control */
  445. __IO uint32_t EPCRIS; /*!< USB External Power Control Raw Interrupt Status */
  446. __IO uint32_t EPCIM; /*!< USB External Power Control Interrupt Mask */
  447. __IO uint32_t EPCISC; /*!< USB External Power Control Interrupt Status and Clear */
  448. __IO uint32_t DRRIS; /*!< USB Device RESUME Raw Interrupt Status */
  449. __IO uint32_t DRIM; /*!< USB Device RESUME Interrupt Mask */
  450. __O uint32_t DRISC; /*!< USB Device RESUME Interrupt Status and Clear */
  451. __IO uint32_t GPCS; /*!< USB General-Purpose Control and Status */
  452. __I uint32_t RESERVED60[4];
  453. __IO uint32_t VDC; /*!< USB VBUS Droop Control */
  454. __IO uint32_t VDCRIS; /*!< USB VBUS Droop Control Raw Interrupt Status */
  455. __IO uint32_t VDCIM; /*!< USB VBUS Droop Control Interrupt Mask */
  456. __IO uint32_t VDCISC; /*!< USB VBUS Droop Control Interrupt Status and Clear */
  457. __I uint32_t RESERVED61[736];
  458. __IO uint32_t PP; /*!< USB Peripheral Properties */
  459. __IO uint32_t PC; /*!< USB Peripheral Configuration */
  460. __IO uint32_t CC; /*!< USB Clock Configuration */
  461. } USB0_Type;
  462. #endif
  463. #endif // CONFIG_USB_MUSB_SUNXI
  464. //*****************************************************************************
  465. //
  466. // The following are defines for the Univeral Serial Bus register offsets.
  467. //
  468. //*****************************************************************************
  469. #define USB_O_FADDR 0x00000000 // USB Device Functional Address
  470. #define USB_O_POWER 0x00000001 // USB Power
  471. #define USB_O_TXIS 0x00000002 // USB Transmit Interrupt Status
  472. #define USB_O_RXIS 0x00000004 // USB Receive Interrupt Status
  473. #define USB_O_TXIE 0x00000006 // USB Transmit Interrupt Enable
  474. #define USB_O_RXIE 0x00000008 // USB Receive Interrupt Enable
  475. #define USB_O_IS 0x0000000A // USB General Interrupt Status
  476. #define USB_O_IE 0x0000000B // USB Interrupt Enable
  477. #define USB_O_FRAME 0x0000000C // USB Frame Value
  478. #define USB_O_EPIDX 0x0000000E // USB Endpoint Index
  479. #define USB_O_TEST 0x0000000F // USB Test Mode
  480. #define USB_O_FIFO0 0x00000020 // USB FIFO Endpoint 0
  481. #define USB_O_FIFO1 0x00000024 // USB FIFO Endpoint 1
  482. #define USB_O_FIFO2 0x00000028 // USB FIFO Endpoint 2
  483. #define USB_O_FIFO3 0x0000002C // USB FIFO Endpoint 3
  484. #define USB_O_FIFO4 0x00000030 // USB FIFO Endpoint 4
  485. #define USB_O_FIFO5 0x00000034 // USB FIFO Endpoint 5
  486. #define USB_O_FIFO6 0x00000038 // USB FIFO Endpoint 6
  487. #define USB_O_FIFO7 0x0000003C // USB FIFO Endpoint 7
  488. #define USB_O_DEVCTL 0x00000060 // USB Device Control
  489. #define USB_O_CCONF 0x00000061 // USB Common Configuration
  490. #define USB_O_TXFIFOSZ 0x00000062 // USB Transmit Dynamic FIFO Sizing
  491. #define USB_O_RXFIFOSZ 0x00000063 // USB Receive Dynamic FIFO Sizing
  492. #define USB_O_TXFIFOADD 0x00000064 // USB Transmit FIFO Start Address
  493. #define USB_O_RXFIFOADD 0x00000066 // USB Receive FIFO Start Address
  494. #define USB_O_ULPIVBUSCTL 0x00000070 // USB ULPI VBUS Control
  495. #define USB_O_ULPIREGDATA 0x00000074 // USB ULPI Register Data
  496. #define USB_O_ULPIREGADDR 0x00000075 // USB ULPI Register Address
  497. #define USB_O_ULPIREGCTL 0x00000076 // USB ULPI Register Control
  498. #define USB_O_EPINFO 0x00000078 // USB Endpoint Information
  499. #define USB_O_RAMINFO 0x00000079 // USB RAM Information
  500. #define USB_O_CONTIM 0x0000007A // USB Connect Timing
  501. #define USB_O_VPLEN 0x0000007B // USB OTG VBUS Pulse Timing
  502. #define USB_O_HSEOF 0x0000007C // USB High-Speed Last Transaction
  503. // to End of Frame Timing
  504. #define USB_O_FSEOF 0x0000007D // USB Full-Speed Last Transaction
  505. // to End of Frame Timing
  506. #define USB_O_LSEOF 0x0000007E // USB Low-Speed Last Transaction
  507. // to End of Frame Timing
  508. #define USB_O_TXFUNCADDR0 0x00000080 // USB Transmit Functional Address
  509. // Endpoint 0
  510. #define USB_O_TXHUBADDR0 0x00000082 // USB Transmit Hub Address
  511. // Endpoint 0
  512. #define USB_O_TXHUBPORT0 0x00000083 // USB Transmit Hub Port Endpoint 0
  513. #define USB_O_TXFUNCADDR1 0x00000088 // USB Transmit Functional Address
  514. // Endpoint 1
  515. #define USB_O_TXHUBADDR1 0x0000008A // USB Transmit Hub Address
  516. // Endpoint 1
  517. #define USB_O_TXHUBPORT1 0x0000008B // USB Transmit Hub Port Endpoint 1
  518. #define USB_O_RXFUNCADDR1 0x0000008C // USB Receive Functional Address
  519. // Endpoint 1
  520. #define USB_O_RXHUBADDR1 0x0000008E // USB Receive Hub Address Endpoint
  521. // 1
  522. #define USB_O_RXHUBPORT1 0x0000008F // USB Receive Hub Port Endpoint 1
  523. #define USB_O_TXFUNCADDR2 0x00000090 // USB Transmit Functional Address
  524. // Endpoint 2
  525. #define USB_O_TXHUBADDR2 0x00000092 // USB Transmit Hub Address
  526. // Endpoint 2
  527. #define USB_O_TXHUBPORT2 0x00000093 // USB Transmit Hub Port Endpoint 2
  528. #define USB_O_RXFUNCADDR2 0x00000094 // USB Receive Functional Address
  529. // Endpoint 2
  530. #define USB_O_RXHUBADDR2 0x00000096 // USB Receive Hub Address Endpoint
  531. // 2
  532. #define USB_O_RXHUBPORT2 0x00000097 // USB Receive Hub Port Endpoint 2
  533. #define USB_O_TXFUNCADDR3 0x00000098 // USB Transmit Functional Address
  534. // Endpoint 3
  535. #define USB_O_TXHUBADDR3 0x0000009A // USB Transmit Hub Address
  536. // Endpoint 3
  537. #define USB_O_TXHUBPORT3 0x0000009B // USB Transmit Hub Port Endpoint 3
  538. #define USB_O_RXFUNCADDR3 0x0000009C // USB Receive Functional Address
  539. // Endpoint 3
  540. #define USB_O_RXHUBADDR3 0x0000009E // USB Receive Hub Address Endpoint
  541. // 3
  542. #define USB_O_RXHUBPORT3 0x0000009F // USB Receive Hub Port Endpoint 3
  543. #define USB_O_TXFUNCADDR4 0x000000A0 // USB Transmit Functional Address
  544. // Endpoint 4
  545. #define USB_O_TXHUBADDR4 0x000000A2 // USB Transmit Hub Address
  546. // Endpoint 4
  547. #define USB_O_TXHUBPORT4 0x000000A3 // USB Transmit Hub Port Endpoint 4
  548. #define USB_O_RXFUNCADDR4 0x000000A4 // USB Receive Functional Address
  549. // Endpoint 4
  550. #define USB_O_RXHUBADDR4 0x000000A6 // USB Receive Hub Address Endpoint
  551. // 4
  552. #define USB_O_RXHUBPORT4 0x000000A7 // USB Receive Hub Port Endpoint 4
  553. #define USB_O_TXFUNCADDR5 0x000000A8 // USB Transmit Functional Address
  554. // Endpoint 5
  555. #define USB_O_TXHUBADDR5 0x000000AA // USB Transmit Hub Address
  556. // Endpoint 5
  557. #define USB_O_TXHUBPORT5 0x000000AB // USB Transmit Hub Port Endpoint 5
  558. #define USB_O_RXFUNCADDR5 0x000000AC // USB Receive Functional Address
  559. // Endpoint 5
  560. #define USB_O_RXHUBADDR5 0x000000AE // USB Receive Hub Address Endpoint
  561. // 5
  562. #define USB_O_RXHUBPORT5 0x000000AF // USB Receive Hub Port Endpoint 5
  563. #define USB_O_TXFUNCADDR6 0x000000B0 // USB Transmit Functional Address
  564. // Endpoint 6
  565. #define USB_O_TXHUBADDR6 0x000000B2 // USB Transmit Hub Address
  566. // Endpoint 6
  567. #define USB_O_TXHUBPORT6 0x000000B3 // USB Transmit Hub Port Endpoint 6
  568. #define USB_O_RXFUNCADDR6 0x000000B4 // USB Receive Functional Address
  569. // Endpoint 6
  570. #define USB_O_RXHUBADDR6 0x000000B6 // USB Receive Hub Address Endpoint
  571. // 6
  572. #define USB_O_RXHUBPORT6 0x000000B7 // USB Receive Hub Port Endpoint 6
  573. #define USB_O_TXFUNCADDR7 0x000000B8 // USB Transmit Functional Address
  574. // Endpoint 7
  575. #define USB_O_TXHUBADDR7 0x000000BA // USB Transmit Hub Address
  576. // Endpoint 7
  577. #define USB_O_TXHUBPORT7 0x000000BB // USB Transmit Hub Port Endpoint 7
  578. #define USB_O_RXFUNCADDR7 0x000000BC // USB Receive Functional Address
  579. // Endpoint 7
  580. #define USB_O_RXHUBADDR7 0x000000BE // USB Receive Hub Address Endpoint
  581. // 7
  582. #define USB_O_RXHUBPORT7 0x000000BF // USB Receive Hub Port Endpoint 7
  583. #define USB_O_CSRL0 0x00000102 // USB Control and Status Endpoint
  584. // 0 Low
  585. #define USB_O_CSRH0 0x00000103 // USB Control and Status Endpoint
  586. // 0 High
  587. #define USB_O_COUNT0 0x00000108 // USB Receive Byte Count Endpoint
  588. // 0
  589. #define USB_O_TYPE0 0x0000010A // USB Type Endpoint 0
  590. #define USB_O_NAKLMT 0x0000010B // USB NAK Limit
  591. #define USB_O_TXMAXP1 0x00000110 // USB Maximum Transmit Data
  592. // Endpoint 1
  593. #define USB_O_TXCSRL1 0x00000112 // USB Transmit Control and Status
  594. // Endpoint 1 Low
  595. #define USB_O_TXCSRH1 0x00000113 // USB Transmit Control and Status
  596. // Endpoint 1 High
  597. #define USB_O_RXMAXP1 0x00000114 // USB Maximum Receive Data
  598. // Endpoint 1
  599. #define USB_O_RXCSRL1 0x00000116 // USB Receive Control and Status
  600. // Endpoint 1 Low
  601. #define USB_O_RXCSRH1 0x00000117 // USB Receive Control and Status
  602. // Endpoint 1 High
  603. #define USB_O_RXCOUNT1 0x00000118 // USB Receive Byte Count Endpoint
  604. // 1
  605. #define USB_O_TXTYPE1 0x0000011A // USB Host Transmit Configure Type
  606. // Endpoint 1
  607. #define USB_O_TXINTERVAL1 0x0000011B // USB Host Transmit Interval
  608. // Endpoint 1
  609. #define USB_O_RXTYPE1 0x0000011C // USB Host Configure Receive Type
  610. // Endpoint 1
  611. #define USB_O_RXINTERVAL1 0x0000011D // USB Host Receive Polling
  612. // Interval Endpoint 1
  613. #define USB_O_TXMAXP2 0x00000120 // USB Maximum Transmit Data
  614. // Endpoint 2
  615. #define USB_O_TXCSRL2 0x00000122 // USB Transmit Control and Status
  616. // Endpoint 2 Low
  617. #define USB_O_TXCSRH2 0x00000123 // USB Transmit Control and Status
  618. // Endpoint 2 High
  619. #define USB_O_RXMAXP2 0x00000124 // USB Maximum Receive Data
  620. // Endpoint 2
  621. #define USB_O_RXCSRL2 0x00000126 // USB Receive Control and Status
  622. // Endpoint 2 Low
  623. #define USB_O_RXCSRH2 0x00000127 // USB Receive Control and Status
  624. // Endpoint 2 High
  625. #define USB_O_RXCOUNT2 0x00000128 // USB Receive Byte Count Endpoint
  626. // 2
  627. #define USB_O_TXTYPE2 0x0000012A // USB Host Transmit Configure Type
  628. // Endpoint 2
  629. #define USB_O_TXINTERVAL2 0x0000012B // USB Host Transmit Interval
  630. // Endpoint 2
  631. #define USB_O_RXTYPE2 0x0000012C // USB Host Configure Receive Type
  632. // Endpoint 2
  633. #define USB_O_RXINTERVAL2 0x0000012D // USB Host Receive Polling
  634. // Interval Endpoint 2
  635. #define USB_O_TXMAXP3 0x00000130 // USB Maximum Transmit Data
  636. // Endpoint 3
  637. #define USB_O_TXCSRL3 0x00000132 // USB Transmit Control and Status
  638. // Endpoint 3 Low
  639. #define USB_O_TXCSRH3 0x00000133 // USB Transmit Control and Status
  640. // Endpoint 3 High
  641. #define USB_O_RXMAXP3 0x00000134 // USB Maximum Receive Data
  642. // Endpoint 3
  643. #define USB_O_RXCSRL3 0x00000136 // USB Receive Control and Status
  644. // Endpoint 3 Low
  645. #define USB_O_RXCSRH3 0x00000137 // USB Receive Control and Status
  646. // Endpoint 3 High
  647. #define USB_O_RXCOUNT3 0x00000138 // USB Receive Byte Count Endpoint
  648. // 3
  649. #define USB_O_TXTYPE3 0x0000013A // USB Host Transmit Configure Type
  650. // Endpoint 3
  651. #define USB_O_TXINTERVAL3 0x0000013B // USB Host Transmit Interval
  652. // Endpoint 3
  653. #define USB_O_RXTYPE3 0x0000013C // USB Host Configure Receive Type
  654. // Endpoint 3
  655. #define USB_O_RXINTERVAL3 0x0000013D // USB Host Receive Polling
  656. // Interval Endpoint 3
  657. #define USB_O_TXMAXP4 0x00000140 // USB Maximum Transmit Data
  658. // Endpoint 4
  659. #define USB_O_TXCSRL4 0x00000142 // USB Transmit Control and Status
  660. // Endpoint 4 Low
  661. #define USB_O_TXCSRH4 0x00000143 // USB Transmit Control and Status
  662. // Endpoint 4 High
  663. #define USB_O_RXMAXP4 0x00000144 // USB Maximum Receive Data
  664. // Endpoint 4
  665. #define USB_O_RXCSRL4 0x00000146 // USB Receive Control and Status
  666. // Endpoint 4 Low
  667. #define USB_O_RXCSRH4 0x00000147 // USB Receive Control and Status
  668. // Endpoint 4 High
  669. #define USB_O_RXCOUNT4 0x00000148 // USB Receive Byte Count Endpoint
  670. // 4
  671. #define USB_O_TXTYPE4 0x0000014A // USB Host Transmit Configure Type
  672. // Endpoint 4
  673. #define USB_O_TXINTERVAL4 0x0000014B // USB Host Transmit Interval
  674. // Endpoint 4
  675. #define USB_O_RXTYPE4 0x0000014C // USB Host Configure Receive Type
  676. // Endpoint 4
  677. #define USB_O_RXINTERVAL4 0x0000014D // USB Host Receive Polling
  678. // Interval Endpoint 4
  679. #define USB_O_TXMAXP5 0x00000150 // USB Maximum Transmit Data
  680. // Endpoint 5
  681. #define USB_O_TXCSRL5 0x00000152 // USB Transmit Control and Status
  682. // Endpoint 5 Low
  683. #define USB_O_TXCSRH5 0x00000153 // USB Transmit Control and Status
  684. // Endpoint 5 High
  685. #define USB_O_RXMAXP5 0x00000154 // USB Maximum Receive Data
  686. // Endpoint 5
  687. #define USB_O_RXCSRL5 0x00000156 // USB Receive Control and Status
  688. // Endpoint 5 Low
  689. #define USB_O_RXCSRH5 0x00000157 // USB Receive Control and Status
  690. // Endpoint 5 High
  691. #define USB_O_RXCOUNT5 0x00000158 // USB Receive Byte Count Endpoint
  692. // 5
  693. #define USB_O_TXTYPE5 0x0000015A // USB Host Transmit Configure Type
  694. // Endpoint 5
  695. #define USB_O_TXINTERVAL5 0x0000015B // USB Host Transmit Interval
  696. // Endpoint 5
  697. #define USB_O_RXTYPE5 0x0000015C // USB Host Configure Receive Type
  698. // Endpoint 5
  699. #define USB_O_RXINTERVAL5 0x0000015D // USB Host Receive Polling
  700. // Interval Endpoint 5
  701. #define USB_O_TXMAXP6 0x00000160 // USB Maximum Transmit Data
  702. // Endpoint 6
  703. #define USB_O_TXCSRL6 0x00000162 // USB Transmit Control and Status
  704. // Endpoint 6 Low
  705. #define USB_O_TXCSRH6 0x00000163 // USB Transmit Control and Status
  706. // Endpoint 6 High
  707. #define USB_O_RXMAXP6 0x00000164 // USB Maximum Receive Data
  708. // Endpoint 6
  709. #define USB_O_RXCSRL6 0x00000166 // USB Receive Control and Status
  710. // Endpoint 6 Low
  711. #define USB_O_RXCSRH6 0x00000167 // USB Receive Control and Status
  712. // Endpoint 6 High
  713. #define USB_O_RXCOUNT6 0x00000168 // USB Receive Byte Count Endpoint
  714. // 6
  715. #define USB_O_TXTYPE6 0x0000016A // USB Host Transmit Configure Type
  716. // Endpoint 6
  717. #define USB_O_TXINTERVAL6 0x0000016B // USB Host Transmit Interval
  718. // Endpoint 6
  719. #define USB_O_RXTYPE6 0x0000016C // USB Host Configure Receive Type
  720. // Endpoint 6
  721. #define USB_O_RXINTERVAL6 0x0000016D // USB Host Receive Polling
  722. // Interval Endpoint 6
  723. #define USB_O_TXMAXP7 0x00000170 // USB Maximum Transmit Data
  724. // Endpoint 7
  725. #define USB_O_TXCSRL7 0x00000172 // USB Transmit Control and Status
  726. // Endpoint 7 Low
  727. #define USB_O_TXCSRH7 0x00000173 // USB Transmit Control and Status
  728. // Endpoint 7 High
  729. #define USB_O_RXMAXP7 0x00000174 // USB Maximum Receive Data
  730. // Endpoint 7
  731. #define USB_O_RXCSRL7 0x00000176 // USB Receive Control and Status
  732. // Endpoint 7 Low
  733. #define USB_O_RXCSRH7 0x00000177 // USB Receive Control and Status
  734. // Endpoint 7 High
  735. #define USB_O_RXCOUNT7 0x00000178 // USB Receive Byte Count Endpoint
  736. // 7
  737. #define USB_O_TXTYPE7 0x0000017A // USB Host Transmit Configure Type
  738. // Endpoint 7
  739. #define USB_O_TXINTERVAL7 0x0000017B // USB Host Transmit Interval
  740. // Endpoint 7
  741. #define USB_O_RXTYPE7 0x0000017C // USB Host Configure Receive Type
  742. // Endpoint 7
  743. #define USB_O_RXINTERVAL7 0x0000017D // USB Host Receive Polling
  744. // Interval Endpoint 7
  745. #define USB_O_DMAINTR 0x00000200 // USB DMA Interrupt
  746. #define USB_O_DMACTL0 0x00000204 // USB DMA Control 0
  747. #define USB_O_DMAADDR0 0x00000208 // USB DMA Address 0
  748. #define USB_O_DMACOUNT0 0x0000020C // USB DMA Count 0
  749. #define USB_O_DMACTL1 0x00000214 // USB DMA Control 1
  750. #define USB_O_DMAADDR1 0x00000218 // USB DMA Address 1
  751. #define USB_O_DMACOUNT1 0x0000021C // USB DMA Count 1
  752. #define USB_O_DMACTL2 0x00000224 // USB DMA Control 2
  753. #define USB_O_DMAADDR2 0x00000228 // USB DMA Address 2
  754. #define USB_O_DMACOUNT2 0x0000022C // USB DMA Count 2
  755. #define USB_O_DMACTL3 0x00000234 // USB DMA Control 3
  756. #define USB_O_DMAADDR3 0x00000238 // USB DMA Address 3
  757. #define USB_O_DMACOUNT3 0x0000023C // USB DMA Count 3
  758. #define USB_O_DMACTL4 0x00000244 // USB DMA Control 4
  759. #define USB_O_DMAADDR4 0x00000248 // USB DMA Address 4
  760. #define USB_O_DMACOUNT4 0x0000024C // USB DMA Count 4
  761. #define USB_O_DMACTL5 0x00000254 // USB DMA Control 5
  762. #define USB_O_DMAADDR5 0x00000258 // USB DMA Address 5
  763. #define USB_O_DMACOUNT5 0x0000025C // USB DMA Count 5
  764. #define USB_O_DMACTL6 0x00000264 // USB DMA Control 6
  765. #define USB_O_DMAADDR6 0x00000268 // USB DMA Address 6
  766. #define USB_O_DMACOUNT6 0x0000026C // USB DMA Count 6
  767. #define USB_O_DMACTL7 0x00000274 // USB DMA Control 7
  768. #define USB_O_DMAADDR7 0x00000278 // USB DMA Address 7
  769. #define USB_O_DMACOUNT7 0x0000027C // USB DMA Count 7
  770. #define USB_O_RQPKTCOUNT1 0x00000304 // USB Request Packet Count in
  771. // Block Transfer Endpoint 1
  772. #define USB_O_RQPKTCOUNT2 0x00000308 // USB Request Packet Count in
  773. // Block Transfer Endpoint 2
  774. #define USB_O_RQPKTCOUNT3 0x0000030C // USB Request Packet Count in
  775. // Block Transfer Endpoint 3
  776. #define USB_O_RQPKTCOUNT4 0x00000310 // USB Request Packet Count in
  777. // Block Transfer Endpoint 4
  778. #define USB_O_RQPKTCOUNT5 0x00000314 // USB Request Packet Count in
  779. // Block Transfer Endpoint 5
  780. #define USB_O_RQPKTCOUNT6 0x00000318 // USB Request Packet Count in
  781. // Block Transfer Endpoint 6
  782. #define USB_O_RQPKTCOUNT7 0x0000031C // USB Request Packet Count in
  783. // Block Transfer Endpoint 7
  784. #define USB_O_RXDPKTBUFDIS 0x00000340 // USB Receive Double Packet Buffer
  785. // Disable
  786. #define USB_O_TXDPKTBUFDIS 0x00000342 // USB Transmit Double Packet
  787. // Buffer Disable
  788. #define USB_O_CTO 0x00000344 // USB Chirp Timeout
  789. #define USB_O_HHSRTN 0x00000346 // USB High Speed to UTM Operating
  790. // Delay
  791. #define USB_O_HSBT 0x00000348 // USB High Speed Time-out Adder
  792. #define USB_O_LPMATTR 0x00000360 // USB LPM Attributes
  793. #define USB_O_LPMCNTRL 0x00000362 // USB LPM Control
  794. #define USB_O_LPMIM 0x00000363 // USB LPM Interrupt Mask
  795. #define USB_O_LPMRIS 0x00000364 // USB LPM Raw Interrupt Status
  796. #define USB_O_LPMFADDR 0x00000365 // USB LPM Function Address
  797. #define USB_O_EPC 0x00000400 // USB External Power Control
  798. #define USB_O_EPCRIS 0x00000404 // USB External Power Control Raw
  799. // Interrupt Status
  800. #define USB_O_EPCIM 0x00000408 // USB External Power Control
  801. // Interrupt Mask
  802. #define USB_O_EPCISC 0x0000040C // USB External Power Control
  803. // Interrupt Status and Clear
  804. #define USB_O_DRRIS 0x00000410 // USB Device RESUME Raw Interrupt
  805. // Status
  806. #define USB_O_DRIM 0x00000414 // USB Device RESUME Interrupt Mask
  807. #define USB_O_DRISC 0x00000418 // USB Device RESUME Interrupt
  808. // Status and Clear
  809. #define USB_O_GPCS 0x0000041C // USB General-Purpose Control and
  810. // Status
  811. #define USB_O_VDC 0x00000430 // USB VBUS Droop Control
  812. #define USB_O_VDCRIS 0x00000434 // USB VBUS Droop Control Raw
  813. // Interrupt Status
  814. #define USB_O_VDCIM 0x00000438 // USB VBUS Droop Control Interrupt
  815. // Mask
  816. #define USB_O_VDCISC 0x0000043C // USB VBUS Droop Control Interrupt
  817. // Status and Clear
  818. #define USB_O_IDVRIS 0x00000444 // USB ID Valid Detect Raw
  819. // Interrupt Status
  820. #define USB_O_IDVIM 0x00000448 // USB ID Valid Detect Interrupt
  821. // Mask
  822. #define USB_O_IDVISC 0x0000044C // USB ID Valid Detect Interrupt
  823. // Status and Clear
  824. #define USB_O_PP 0x00000FC0 // USB Peripheral Properties
  825. #define USB_O_PC 0x00000FC4 // USB Peripheral Configuration
  826. #define USB_O_CC 0x00000FC8 // USB Clock Configuration
  827. //*****************************************************************************
  828. //
  829. // The following are defines for the bit fields in the USB_O_FADDR register.
  830. //
  831. //*****************************************************************************
  832. #define USB_FADDR_M 0x0000007F // Function Address
  833. #define USB_FADDR_S 0
  834. //*****************************************************************************
  835. //
  836. // The following are defines for the bit fields in the USB_O_POWER register.
  837. //
  838. //*****************************************************************************
  839. #define USB_POWER_ISOUP 0x00000080 // Isochronous Update
  840. #define USB_POWER_SOFTCONN 0x00000040 // Soft Connect/Disconnect
  841. #define USB_POWER_HSENAB 0x00000020 // High Speed Enable
  842. #define USB_POWER_HSMODE 0x00000010 // High Speed Enable
  843. #define USB_POWER_RESET 0x00000008 // RESET Signaling
  844. #define USB_POWER_RESUME 0x00000004 // RESUME Signaling
  845. #define USB_POWER_SUSPEND 0x00000002 // SUSPEND Mode
  846. #define USB_POWER_PWRDNPHY 0x00000001 // Power Down PHY
  847. //*****************************************************************************
  848. //
  849. // The following are defines for the bit fields in the USB_O_TXIS register.
  850. //
  851. //*****************************************************************************
  852. #define USB_TXIS_EP7 0x00000080 // TX Endpoint 7 Interrupt
  853. #define USB_TXIS_EP6 0x00000040 // TX Endpoint 6 Interrupt
  854. #define USB_TXIS_EP5 0x00000020 // TX Endpoint 5 Interrupt
  855. #define USB_TXIS_EP4 0x00000010 // TX Endpoint 4 Interrupt
  856. #define USB_TXIS_EP3 0x00000008 // TX Endpoint 3 Interrupt
  857. #define USB_TXIS_EP2 0x00000004 // TX Endpoint 2 Interrupt
  858. #define USB_TXIS_EP1 0x00000002 // TX Endpoint 1 Interrupt
  859. #define USB_TXIS_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt
  860. //*****************************************************************************
  861. //
  862. // The following are defines for the bit fields in the USB_O_RXIS register.
  863. //
  864. //*****************************************************************************
  865. #define USB_RXIS_EP7 0x00000080 // RX Endpoint 7 Interrupt
  866. #define USB_RXIS_EP6 0x00000040 // RX Endpoint 6 Interrupt
  867. #define USB_RXIS_EP5 0x00000020 // RX Endpoint 5 Interrupt
  868. #define USB_RXIS_EP4 0x00000010 // RX Endpoint 4 Interrupt
  869. #define USB_RXIS_EP3 0x00000008 // RX Endpoint 3 Interrupt
  870. #define USB_RXIS_EP2 0x00000004 // RX Endpoint 2 Interrupt
  871. #define USB_RXIS_EP1 0x00000002 // RX Endpoint 1 Interrupt
  872. //*****************************************************************************
  873. //
  874. // The following are defines for the bit fields in the USB_O_TXIE register.
  875. //
  876. //*****************************************************************************
  877. #define USB_TXIE_EP7 0x00000080 // TX Endpoint 7 Interrupt Enable
  878. #define USB_TXIE_EP6 0x00000040 // TX Endpoint 6 Interrupt Enable
  879. #define USB_TXIE_EP5 0x00000020 // TX Endpoint 5 Interrupt Enable
  880. #define USB_TXIE_EP4 0x00000010 // TX Endpoint 4 Interrupt Enable
  881. #define USB_TXIE_EP3 0x00000008 // TX Endpoint 3 Interrupt Enable
  882. #define USB_TXIE_EP2 0x00000004 // TX Endpoint 2 Interrupt Enable
  883. #define USB_TXIE_EP1 0x00000002 // TX Endpoint 1 Interrupt Enable
  884. #define USB_TXIE_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt
  885. // Enable
  886. //*****************************************************************************
  887. //
  888. // The following are defines for the bit fields in the USB_O_RXIE register.
  889. //
  890. //*****************************************************************************
  891. #define USB_RXIE_EP7 0x00000080 // RX Endpoint 7 Interrupt Enable
  892. #define USB_RXIE_EP6 0x00000040 // RX Endpoint 6 Interrupt Enable
  893. #define USB_RXIE_EP5 0x00000020 // RX Endpoint 5 Interrupt Enable
  894. #define USB_RXIE_EP4 0x00000010 // RX Endpoint 4 Interrupt Enable
  895. #define USB_RXIE_EP3 0x00000008 // RX Endpoint 3 Interrupt Enable
  896. #define USB_RXIE_EP2 0x00000004 // RX Endpoint 2 Interrupt Enable
  897. #define USB_RXIE_EP1 0x00000002 // RX Endpoint 1 Interrupt Enable
  898. //*****************************************************************************
  899. //
  900. // The following are defines for the bit fields in the USB_O_IS register.
  901. //
  902. //*****************************************************************************
  903. #define USB_IS_VBUSERR 0x00000080 // VBUS Error (OTG only)
  904. #define USB_IS_SESREQ 0x00000040 // SESSION REQUEST (OTG only)
  905. #define USB_IS_DISCON 0x00000020 // Session Disconnect (OTG only)
  906. #define USB_IS_CONN 0x00000010 // Session Connect
  907. #define USB_IS_SOF 0x00000008 // Start of Frame
  908. #define USB_IS_BABBLE 0x00000004 // Babble Detected
  909. #define USB_IS_RESET 0x00000004 // RESET Signaling Detected
  910. #define USB_IS_RESUME 0x00000002 // RESUME Signaling Detected
  911. #define USB_IS_SUSPEND 0x00000001 // SUSPEND Signaling Detected
  912. //*****************************************************************************
  913. //
  914. // The following are defines for the bit fields in the USB_O_IE register.
  915. //
  916. //*****************************************************************************
  917. #define USB_IE_VBUSERR 0x00000080 // Enable VBUS Error Interrupt (OTG
  918. // only)
  919. #define USB_IE_SESREQ 0x00000040 // Enable Session Request (OTG
  920. // only)
  921. #define USB_IE_DISCON 0x00000020 // Enable Disconnect Interrupt
  922. #define USB_IE_CONN 0x00000010 // Enable Connect Interrupt
  923. #define USB_IE_SOF 0x00000008 // Enable Start-of-Frame Interrupt
  924. #define USB_IE_BABBLE 0x00000004 // Enable Babble Interrupt
  925. #define USB_IE_RESET 0x00000004 // Enable RESET Interrupt
  926. #define USB_IE_RESUME 0x00000002 // Enable RESUME Interrupt
  927. #define USB_IE_SUSPND 0x00000001 // Enable SUSPEND Interrupt
  928. //*****************************************************************************
  929. //
  930. // The following are defines for the bit fields in the USB_O_FRAME register.
  931. //
  932. //*****************************************************************************
  933. #define USB_FRAME_M 0x000007FF // Frame Number
  934. #define USB_FRAME_S 0
  935. //*****************************************************************************
  936. //
  937. // The following are defines for the bit fields in the USB_O_EPIDX register.
  938. //
  939. //*****************************************************************************
  940. #define USB_EPIDX_EPIDX_M 0x0000000F // Endpoint Index
  941. #define USB_EPIDX_EPIDX_S 0
  942. //*****************************************************************************
  943. //
  944. // The following are defines for the bit fields in the USB_O_TEST register.
  945. //
  946. //*****************************************************************************
  947. #define USB_TEST_FORCEH 0x00000080 // Force Host Mode
  948. #define USB_TEST_FIFOACC 0x00000040 // FIFO Access
  949. #define USB_TEST_FORCEFS 0x00000020 // Force Full-Speed Mode
  950. #define USB_TEST_FORCEHS 0x00000010 // Force High-Speed Mode
  951. #define USB_TEST_TESTPKT 0x00000008 // Test Packet Mode Enable
  952. #define USB_TEST_TESTK 0x00000004 // Test_K Mode Enable
  953. #define USB_TEST_TESTJ 0x00000002 // Test_J Mode Enable
  954. #define USB_TEST_TESTSE0NAK 0x00000001 // Test_SE0_NAK Test Mode Enable
  955. //*****************************************************************************
  956. //
  957. // The following are defines for the bit fields in the USB_O_FIFO0 register.
  958. //
  959. //*****************************************************************************
  960. #define USB_FIFO0_EPDATA_M 0xFFFFFFFF // Endpoint Data
  961. #define USB_FIFO0_EPDATA_S 0
  962. //*****************************************************************************
  963. //
  964. // The following are defines for the bit fields in the USB_O_FIFO1 register.
  965. //
  966. //*****************************************************************************
  967. #define USB_FIFO1_EPDATA_M 0xFFFFFFFF // Endpoint Data
  968. #define USB_FIFO1_EPDATA_S 0
  969. //*****************************************************************************
  970. //
  971. // The following are defines for the bit fields in the USB_O_FIFO2 register.
  972. //
  973. //*****************************************************************************
  974. #define USB_FIFO2_EPDATA_M 0xFFFFFFFF // Endpoint Data
  975. #define USB_FIFO2_EPDATA_S 0
  976. //*****************************************************************************
  977. //
  978. // The following are defines for the bit fields in the USB_O_FIFO3 register.
  979. //
  980. //*****************************************************************************
  981. #define USB_FIFO3_EPDATA_M 0xFFFFFFFF // Endpoint Data
  982. #define USB_FIFO3_EPDATA_S 0
  983. //*****************************************************************************
  984. //
  985. // The following are defines for the bit fields in the USB_O_FIFO4 register.
  986. //
  987. //*****************************************************************************
  988. #define USB_FIFO4_EPDATA_M 0xFFFFFFFF // Endpoint Data
  989. #define USB_FIFO4_EPDATA_S 0
  990. //*****************************************************************************
  991. //
  992. // The following are defines for the bit fields in the USB_O_FIFO5 register.
  993. //
  994. //*****************************************************************************
  995. #define USB_FIFO5_EPDATA_M 0xFFFFFFFF // Endpoint Data
  996. #define USB_FIFO5_EPDATA_S 0
  997. //*****************************************************************************
  998. //
  999. // The following are defines for the bit fields in the USB_O_FIFO6 register.
  1000. //
  1001. //*****************************************************************************
  1002. #define USB_FIFO6_EPDATA_M 0xFFFFFFFF // Endpoint Data
  1003. #define USB_FIFO6_EPDATA_S 0
  1004. //*****************************************************************************
  1005. //
  1006. // The following are defines for the bit fields in the USB_O_FIFO7 register.
  1007. //
  1008. //*****************************************************************************
  1009. #define USB_FIFO7_EPDATA_M 0xFFFFFFFF // Endpoint Data
  1010. #define USB_FIFO7_EPDATA_S 0
  1011. //*****************************************************************************
  1012. //
  1013. // The following are defines for the bit fields in the USB_O_DEVCTL register.
  1014. //
  1015. //*****************************************************************************
  1016. #define USB_DEVCTL_DEV 0x00000080 // Device Mode (OTG only)
  1017. #define USB_DEVCTL_FSDEV 0x00000040 // Full-Speed Device Detected
  1018. #define USB_DEVCTL_LSDEV 0x00000020 // Low-Speed Device Detected
  1019. #define USB_DEVCTL_VBUS_M 0x00000018 // VBUS Level (OTG only)
  1020. #define USB_DEVCTL_VBUS_NONE 0x00000000 // Below SessionEnd
  1021. #define USB_DEVCTL_VBUS_SEND 0x00000008 // Above SessionEnd, below AValid
  1022. #define USB_DEVCTL_VBUS_AVALID 0x00000010 // Above AValid, below VBUSValid
  1023. #define USB_DEVCTL_VBUS_VALID 0x00000018 // Above VBUSValid
  1024. #define USB_DEVCTL_HOST 0x00000004 // Host Mode
  1025. #define USB_DEVCTL_HOSTREQ 0x00000002 // Host Request (OTG only)
  1026. #define USB_DEVCTL_SESSION 0x00000001 // Session Start/End (OTG only)
  1027. //*****************************************************************************
  1028. //
  1029. // The following are defines for the bit fields in the USB_O_CCONF register.
  1030. //
  1031. //*****************************************************************************
  1032. #define USB_CCONF_TXEDMA 0x00000002 // TX Early DMA Enable
  1033. #define USB_CCONF_RXEDMA 0x00000001 // TX Early DMA Enable
  1034. //*****************************************************************************
  1035. //
  1036. // The following are defines for the bit fields in the USB_O_TXFIFOSZ register.
  1037. //
  1038. //*****************************************************************************
  1039. #define USB_TXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support
  1040. #define USB_TXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size
  1041. #define USB_TXFIFOSZ_SIZE_8 0x00000000 // 8
  1042. #define USB_TXFIFOSZ_SIZE_16 0x00000001 // 16
  1043. #define USB_TXFIFOSZ_SIZE_32 0x00000002 // 32
  1044. #define USB_TXFIFOSZ_SIZE_64 0x00000003 // 64
  1045. #define USB_TXFIFOSZ_SIZE_128 0x00000004 // 128
  1046. #define USB_TXFIFOSZ_SIZE_256 0x00000005 // 256
  1047. #define USB_TXFIFOSZ_SIZE_512 0x00000006 // 512
  1048. #define USB_TXFIFOSZ_SIZE_1024 0x00000007 // 1024
  1049. #define USB_TXFIFOSZ_SIZE_2048 0x00000008 // 2048
  1050. //*****************************************************************************
  1051. //
  1052. // The following are defines for the bit fields in the USB_O_RXFIFOSZ register.
  1053. //
  1054. //*****************************************************************************
  1055. #define USB_RXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support
  1056. #define USB_RXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size
  1057. #define USB_RXFIFOSZ_SIZE_8 0x00000000 // 8
  1058. #define USB_RXFIFOSZ_SIZE_16 0x00000001 // 16
  1059. #define USB_RXFIFOSZ_SIZE_32 0x00000002 // 32
  1060. #define USB_RXFIFOSZ_SIZE_64 0x00000003 // 64
  1061. #define USB_RXFIFOSZ_SIZE_128 0x00000004 // 128
  1062. #define USB_RXFIFOSZ_SIZE_256 0x00000005 // 256
  1063. #define USB_RXFIFOSZ_SIZE_512 0x00000006 // 512
  1064. #define USB_RXFIFOSZ_SIZE_1024 0x00000007 // 1024
  1065. #define USB_RXFIFOSZ_SIZE_2048 0x00000008 // 2048
  1066. //*****************************************************************************
  1067. //
  1068. // The following are defines for the bit fields in the USB_O_TXFIFOADD
  1069. // register.
  1070. //
  1071. //*****************************************************************************
  1072. #define USB_TXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address
  1073. #define USB_TXFIFOADD_ADDR_S 0
  1074. //*****************************************************************************
  1075. //
  1076. // The following are defines for the bit fields in the USB_O_RXFIFOADD
  1077. // register.
  1078. //
  1079. //*****************************************************************************
  1080. #define USB_RXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address
  1081. #define USB_RXFIFOADD_ADDR_S 0
  1082. //*****************************************************************************
  1083. //
  1084. // The following are defines for the bit fields in the USB_O_ULPIVBUSCTL
  1085. // register.
  1086. //
  1087. //*****************************************************************************
  1088. #define USB_ULPIVBUSCTL_USEEXTVBUSIND \
  1089. 0x00000002 // Use External VBUS Indicator
  1090. #define USB_ULPIVBUSCTL_USEEXTVBUS \
  1091. 0x00000001 // Use External VBUS
  1092. //*****************************************************************************
  1093. //
  1094. // The following are defines for the bit fields in the USB_O_ULPIREGDATA
  1095. // register.
  1096. //
  1097. //*****************************************************************************
  1098. #define USB_ULPIREGDATA_REGDATA_M \
  1099. 0x000000FF // Register Data
  1100. #define USB_ULPIREGDATA_REGDATA_S \
  1101. 0
  1102. //*****************************************************************************
  1103. //
  1104. // The following are defines for the bit fields in the USB_O_ULPIREGADDR
  1105. // register.
  1106. //
  1107. //*****************************************************************************
  1108. #define USB_ULPIREGADDR_ADDR_M 0x000000FF // Register Address
  1109. #define USB_ULPIREGADDR_ADDR_S 0
  1110. //*****************************************************************************
  1111. //
  1112. // The following are defines for the bit fields in the USB_O_ULPIREGCTL
  1113. // register.
  1114. //
  1115. //*****************************************************************************
  1116. #define USB_ULPIREGCTL_RDWR 0x00000004 // Read/Write Control
  1117. #define USB_ULPIREGCTL_REGCMPLT 0x00000002 // Register Access Complete
  1118. #define USB_ULPIREGCTL_REGACC 0x00000001 // Initiate Register Access
  1119. //*****************************************************************************
  1120. //
  1121. // The following are defines for the bit fields in the USB_O_EPINFO register.
  1122. //
  1123. //*****************************************************************************
  1124. #define USB_EPINFO_RXEP_M 0x000000F0 // RX Endpoints
  1125. #define USB_EPINFO_TXEP_M 0x0000000F // TX Endpoints
  1126. #define USB_EPINFO_RXEP_S 4
  1127. #define USB_EPINFO_TXEP_S 0
  1128. //*****************************************************************************
  1129. //
  1130. // The following are defines for the bit fields in the USB_O_RAMINFO register.
  1131. //
  1132. //*****************************************************************************
  1133. #define USB_RAMINFO_DMACHAN_M 0x000000F0 // DMA Channels
  1134. #define USB_RAMINFO_RAMBITS_M 0x0000000F // RAM Address Bus Width
  1135. #define USB_RAMINFO_DMACHAN_S 4
  1136. #define USB_RAMINFO_RAMBITS_S 0
  1137. //*****************************************************************************
  1138. //
  1139. // The following are defines for the bit fields in the USB_O_CONTIM register.
  1140. //
  1141. //*****************************************************************************
  1142. #define USB_CONTIM_WTCON_M 0x000000F0 // Connect Wait
  1143. #define USB_CONTIM_WTID_M 0x0000000F // Wait ID
  1144. #define USB_CONTIM_WTCON_S 4
  1145. #define USB_CONTIM_WTID_S 0
  1146. //*****************************************************************************
  1147. //
  1148. // The following are defines for the bit fields in the USB_O_VPLEN register.
  1149. //
  1150. //*****************************************************************************
  1151. #define USB_VPLEN_VPLEN_M 0x000000FF // VBUS Pulse Length
  1152. #define USB_VPLEN_VPLEN_S 0
  1153. //*****************************************************************************
  1154. //
  1155. // The following are defines for the bit fields in the USB_O_HSEOF register.
  1156. //
  1157. //*****************************************************************************
  1158. #define USB_HSEOF_HSEOFG_M 0x000000FF // HIgh-Speed End-of-Frame Gap
  1159. #define USB_HSEOF_HSEOFG_S 0
  1160. //*****************************************************************************
  1161. //
  1162. // The following are defines for the bit fields in the USB_O_FSEOF register.
  1163. //
  1164. //*****************************************************************************
  1165. #define USB_FSEOF_FSEOFG_M 0x000000FF // Full-Speed End-of-Frame Gap
  1166. #define USB_FSEOF_FSEOFG_S 0
  1167. //*****************************************************************************
  1168. //
  1169. // The following are defines for the bit fields in the USB_O_LSEOF register.
  1170. //
  1171. //*****************************************************************************
  1172. #define USB_LSEOF_LSEOFG_M 0x000000FF // Low-Speed End-of-Frame Gap
  1173. #define USB_LSEOF_LSEOFG_S 0
  1174. //*****************************************************************************
  1175. //
  1176. // The following are defines for the bit fields in the USB_O_TXFUNCADDR0
  1177. // register.
  1178. //
  1179. //*****************************************************************************
  1180. #define USB_TXFUNCADDR0_ADDR_M 0x0000007F // Device Address
  1181. #define USB_TXFUNCADDR0_ADDR_S 0
  1182. //*****************************************************************************
  1183. //
  1184. // The following are defines for the bit fields in the USB_O_TXHUBADDR0
  1185. // register.
  1186. //
  1187. //*****************************************************************************
  1188. #define USB_TXHUBADDR0_ADDR_M 0x0000007F // Hub Address
  1189. #define USB_TXHUBADDR0_ADDR_S 0
  1190. //*****************************************************************************
  1191. //
  1192. // The following are defines for the bit fields in the USB_O_TXHUBPORT0
  1193. // register.
  1194. //
  1195. //*****************************************************************************
  1196. #define USB_TXHUBPORT0_PORT_M 0x0000007F // Hub Port
  1197. #define USB_TXHUBPORT0_PORT_S 0
  1198. //*****************************************************************************
  1199. //
  1200. // The following are defines for the bit fields in the USB_O_TXFUNCADDR1
  1201. // register.
  1202. //
  1203. //*****************************************************************************
  1204. #define USB_TXFUNCADDR1_ADDR_M 0x0000007F // Device Address
  1205. #define USB_TXFUNCADDR1_ADDR_S 0
  1206. //*****************************************************************************
  1207. //
  1208. // The following are defines for the bit fields in the USB_O_TXHUBADDR1
  1209. // register.
  1210. //
  1211. //*****************************************************************************
  1212. #define USB_TXHUBADDR1_ADDR_M 0x0000007F // Hub Address
  1213. #define USB_TXHUBADDR1_ADDR_S 0
  1214. //*****************************************************************************
  1215. //
  1216. // The following are defines for the bit fields in the USB_O_TXHUBPORT1
  1217. // register.
  1218. //
  1219. //*****************************************************************************
  1220. #define USB_TXHUBPORT1_PORT_M 0x0000007F // Hub Port
  1221. #define USB_TXHUBPORT1_PORT_S 0
  1222. //*****************************************************************************
  1223. //
  1224. // The following are defines for the bit fields in the USB_O_RXFUNCADDR1
  1225. // register.
  1226. //
  1227. //*****************************************************************************
  1228. #define USB_RXFUNCADDR1_ADDR_M 0x0000007F // Device Address
  1229. #define USB_RXFUNCADDR1_ADDR_S 0
  1230. //*****************************************************************************
  1231. //
  1232. // The following are defines for the bit fields in the USB_O_RXHUBADDR1
  1233. // register.
  1234. //
  1235. //*****************************************************************************
  1236. #define USB_RXHUBADDR1_ADDR_M 0x0000007F // Hub Address
  1237. #define USB_RXHUBADDR1_ADDR_S 0
  1238. //*****************************************************************************
  1239. //
  1240. // The following are defines for the bit fields in the USB_O_RXHUBPORT1
  1241. // register.
  1242. //
  1243. //*****************************************************************************
  1244. #define USB_RXHUBPORT1_PORT_M 0x0000007F // Hub Port
  1245. #define USB_RXHUBPORT1_PORT_S 0
  1246. //*****************************************************************************
  1247. //
  1248. // The following are defines for the bit fields in the USB_O_TXFUNCADDR2
  1249. // register.
  1250. //
  1251. //*****************************************************************************
  1252. #define USB_TXFUNCADDR2_ADDR_M 0x0000007F // Device Address
  1253. #define USB_TXFUNCADDR2_ADDR_S 0
  1254. //*****************************************************************************
  1255. //
  1256. // The following are defines for the bit fields in the USB_O_TXHUBADDR2
  1257. // register.
  1258. //
  1259. //*****************************************************************************
  1260. #define USB_TXHUBADDR2_ADDR_M 0x0000007F // Hub Address
  1261. #define USB_TXHUBADDR2_ADDR_S 0
  1262. //*****************************************************************************
  1263. //
  1264. // The following are defines for the bit fields in the USB_O_TXHUBPORT2
  1265. // register.
  1266. //
  1267. //*****************************************************************************
  1268. #define USB_TXHUBPORT2_PORT_M 0x0000007F // Hub Port
  1269. #define USB_TXHUBPORT2_PORT_S 0
  1270. //*****************************************************************************
  1271. //
  1272. // The following are defines for the bit fields in the USB_O_RXFUNCADDR2
  1273. // register.
  1274. //
  1275. //*****************************************************************************
  1276. #define USB_RXFUNCADDR2_ADDR_M 0x0000007F // Device Address
  1277. #define USB_RXFUNCADDR2_ADDR_S 0
  1278. //*****************************************************************************
  1279. //
  1280. // The following are defines for the bit fields in the USB_O_RXHUBADDR2
  1281. // register.
  1282. //
  1283. //*****************************************************************************
  1284. #define USB_RXHUBADDR2_ADDR_M 0x0000007F // Hub Address
  1285. #define USB_RXHUBADDR2_ADDR_S 0
  1286. //*****************************************************************************
  1287. //
  1288. // The following are defines for the bit fields in the USB_O_RXHUBPORT2
  1289. // register.
  1290. //
  1291. //*****************************************************************************
  1292. #define USB_RXHUBPORT2_PORT_M 0x0000007F // Hub Port
  1293. #define USB_RXHUBPORT2_PORT_S 0
  1294. //*****************************************************************************
  1295. //
  1296. // The following are defines for the bit fields in the USB_O_TXFUNCADDR3
  1297. // register.
  1298. //
  1299. //*****************************************************************************
  1300. #define USB_TXFUNCADDR3_ADDR_M 0x0000007F // Device Address
  1301. #define USB_TXFUNCADDR3_ADDR_S 0
  1302. //*****************************************************************************
  1303. //
  1304. // The following are defines for the bit fields in the USB_O_TXHUBADDR3
  1305. // register.
  1306. //
  1307. //*****************************************************************************
  1308. #define USB_TXHUBADDR3_ADDR_M 0x0000007F // Hub Address
  1309. #define USB_TXHUBADDR3_ADDR_S 0
  1310. //*****************************************************************************
  1311. //
  1312. // The following are defines for the bit fields in the USB_O_TXHUBPORT3
  1313. // register.
  1314. //
  1315. //*****************************************************************************
  1316. #define USB_TXHUBPORT3_PORT_M 0x0000007F // Hub Port
  1317. #define USB_TXHUBPORT3_PORT_S 0
  1318. //*****************************************************************************
  1319. //
  1320. // The following are defines for the bit fields in the USB_O_RXFUNCADDR3
  1321. // register.
  1322. //
  1323. //*****************************************************************************
  1324. #define USB_RXFUNCADDR3_ADDR_M 0x0000007F // Device Address
  1325. #define USB_RXFUNCADDR3_ADDR_S 0
  1326. //*****************************************************************************
  1327. //
  1328. // The following are defines for the bit fields in the USB_O_RXHUBADDR3
  1329. // register.
  1330. //
  1331. //*****************************************************************************
  1332. #define USB_RXHUBADDR3_ADDR_M 0x0000007F // Hub Address
  1333. #define USB_RXHUBADDR3_ADDR_S 0
  1334. //*****************************************************************************
  1335. //
  1336. // The following are defines for the bit fields in the USB_O_RXHUBPORT3
  1337. // register.
  1338. //
  1339. //*****************************************************************************
  1340. #define USB_RXHUBPORT3_PORT_M 0x0000007F // Hub Port
  1341. #define USB_RXHUBPORT3_PORT_S 0
  1342. //*****************************************************************************
  1343. //
  1344. // The following are defines for the bit fields in the USB_O_TXFUNCADDR4
  1345. // register.
  1346. //
  1347. //*****************************************************************************
  1348. #define USB_TXFUNCADDR4_ADDR_M 0x0000007F // Device Address
  1349. #define USB_TXFUNCADDR4_ADDR_S 0
  1350. //*****************************************************************************
  1351. //
  1352. // The following are defines for the bit fields in the USB_O_TXHUBADDR4
  1353. // register.
  1354. //
  1355. //*****************************************************************************
  1356. #define USB_TXHUBADDR4_ADDR_M 0x0000007F // Hub Address
  1357. #define USB_TXHUBADDR4_ADDR_S 0
  1358. //*****************************************************************************
  1359. //
  1360. // The following are defines for the bit fields in the USB_O_TXHUBPORT4
  1361. // register.
  1362. //
  1363. //*****************************************************************************
  1364. #define USB_TXHUBPORT4_PORT_M 0x0000007F // Hub Port
  1365. #define USB_TXHUBPORT4_PORT_S 0
  1366. //*****************************************************************************
  1367. //
  1368. // The following are defines for the bit fields in the USB_O_RXFUNCADDR4
  1369. // register.
  1370. //
  1371. //*****************************************************************************
  1372. #define USB_RXFUNCADDR4_ADDR_M 0x0000007F // Device Address
  1373. #define USB_RXFUNCADDR4_ADDR_S 0
  1374. //*****************************************************************************
  1375. //
  1376. // The following are defines for the bit fields in the USB_O_RXHUBADDR4
  1377. // register.
  1378. //
  1379. //*****************************************************************************
  1380. #define USB_RXHUBADDR4_ADDR_M 0x0000007F // Hub Address
  1381. #define USB_RXHUBADDR4_ADDR_S 0
  1382. //*****************************************************************************
  1383. //
  1384. // The following are defines for the bit fields in the USB_O_RXHUBPORT4
  1385. // register.
  1386. //
  1387. //*****************************************************************************
  1388. #define USB_RXHUBPORT4_PORT_M 0x0000007F // Hub Port
  1389. #define USB_RXHUBPORT4_PORT_S 0
  1390. //*****************************************************************************
  1391. //
  1392. // The following are defines for the bit fields in the USB_O_TXFUNCADDR5
  1393. // register.
  1394. //
  1395. //*****************************************************************************
  1396. #define USB_TXFUNCADDR5_ADDR_M 0x0000007F // Device Address
  1397. #define USB_TXFUNCADDR5_ADDR_S 0
  1398. //*****************************************************************************
  1399. //
  1400. // The following are defines for the bit fields in the USB_O_TXHUBADDR5
  1401. // register.
  1402. //
  1403. //*****************************************************************************
  1404. #define USB_TXHUBADDR5_ADDR_M 0x0000007F // Hub Address
  1405. #define USB_TXHUBADDR5_ADDR_S 0
  1406. //*****************************************************************************
  1407. //
  1408. // The following are defines for the bit fields in the USB_O_TXHUBPORT5
  1409. // register.
  1410. //
  1411. //*****************************************************************************
  1412. #define USB_TXHUBPORT5_PORT_M 0x0000007F // Hub Port
  1413. #define USB_TXHUBPORT5_PORT_S 0
  1414. //*****************************************************************************
  1415. //
  1416. // The following are defines for the bit fields in the USB_O_RXFUNCADDR5
  1417. // register.
  1418. //
  1419. //*****************************************************************************
  1420. #define USB_RXFUNCADDR5_ADDR_M 0x0000007F // Device Address
  1421. #define USB_RXFUNCADDR5_ADDR_S 0
  1422. //*****************************************************************************
  1423. //
  1424. // The following are defines for the bit fields in the USB_O_RXHUBADDR5
  1425. // register.
  1426. //
  1427. //*****************************************************************************
  1428. #define USB_RXHUBADDR5_ADDR_M 0x0000007F // Hub Address
  1429. #define USB_RXHUBADDR5_ADDR_S 0
  1430. //*****************************************************************************
  1431. //
  1432. // The following are defines for the bit fields in the USB_O_RXHUBPORT5
  1433. // register.
  1434. //
  1435. //*****************************************************************************
  1436. #define USB_RXHUBPORT5_PORT_M 0x0000007F // Hub Port
  1437. #define USB_RXHUBPORT5_PORT_S 0
  1438. //*****************************************************************************
  1439. //
  1440. // The following are defines for the bit fields in the USB_O_TXFUNCADDR6
  1441. // register.
  1442. //
  1443. //*****************************************************************************
  1444. #define USB_TXFUNCADDR6_ADDR_M 0x0000007F // Device Address
  1445. #define USB_TXFUNCADDR6_ADDR_S 0
  1446. //*****************************************************************************
  1447. //
  1448. // The following are defines for the bit fields in the USB_O_TXHUBADDR6
  1449. // register.
  1450. //
  1451. //*****************************************************************************
  1452. #define USB_TXHUBADDR6_ADDR_M 0x0000007F // Hub Address
  1453. #define USB_TXHUBADDR6_ADDR_S 0
  1454. //*****************************************************************************
  1455. //
  1456. // The following are defines for the bit fields in the USB_O_TXHUBPORT6
  1457. // register.
  1458. //
  1459. //*****************************************************************************
  1460. #define USB_TXHUBPORT6_PORT_M 0x0000007F // Hub Port
  1461. #define USB_TXHUBPORT6_PORT_S 0
  1462. //*****************************************************************************
  1463. //
  1464. // The following are defines for the bit fields in the USB_O_RXFUNCADDR6
  1465. // register.
  1466. //
  1467. //*****************************************************************************
  1468. #define USB_RXFUNCADDR6_ADDR_M 0x0000007F // Device Address
  1469. #define USB_RXFUNCADDR6_ADDR_S 0
  1470. //*****************************************************************************
  1471. //
  1472. // The following are defines for the bit fields in the USB_O_RXHUBADDR6
  1473. // register.
  1474. //
  1475. //*****************************************************************************
  1476. #define USB_RXHUBADDR6_ADDR_M 0x0000007F // Hub Address
  1477. #define USB_RXHUBADDR6_ADDR_S 0
  1478. //*****************************************************************************
  1479. //
  1480. // The following are defines for the bit fields in the USB_O_RXHUBPORT6
  1481. // register.
  1482. //
  1483. //*****************************************************************************
  1484. #define USB_RXHUBPORT6_PORT_M 0x0000007F // Hub Port
  1485. #define USB_RXHUBPORT6_PORT_S 0
  1486. //*****************************************************************************
  1487. //
  1488. // The following are defines for the bit fields in the USB_O_TXFUNCADDR7
  1489. // register.
  1490. //
  1491. //*****************************************************************************
  1492. #define USB_TXFUNCADDR7_ADDR_M 0x0000007F // Device Address
  1493. #define USB_TXFUNCADDR7_ADDR_S 0
  1494. //*****************************************************************************
  1495. //
  1496. // The following are defines for the bit fields in the USB_O_TXHUBADDR7
  1497. // register.
  1498. //
  1499. //*****************************************************************************
  1500. #define USB_TXHUBADDR7_ADDR_M 0x0000007F // Hub Address
  1501. #define USB_TXHUBADDR7_ADDR_S 0
  1502. //*****************************************************************************
  1503. //
  1504. // The following are defines for the bit fields in the USB_O_TXHUBPORT7
  1505. // register.
  1506. //
  1507. //*****************************************************************************
  1508. #define USB_TXHUBPORT7_PORT_M 0x0000007F // Hub Port
  1509. #define USB_TXHUBPORT7_PORT_S 0
  1510. //*****************************************************************************
  1511. //
  1512. // The following are defines for the bit fields in the USB_O_RXFUNCADDR7
  1513. // register.
  1514. //
  1515. //*****************************************************************************
  1516. #define USB_RXFUNCADDR7_ADDR_M 0x0000007F // Device Address
  1517. #define USB_RXFUNCADDR7_ADDR_S 0
  1518. //*****************************************************************************
  1519. //
  1520. // The following are defines for the bit fields in the USB_O_RXHUBADDR7
  1521. // register.
  1522. //
  1523. //*****************************************************************************
  1524. #define USB_RXHUBADDR7_ADDR_M 0x0000007F // Hub Address
  1525. #define USB_RXHUBADDR7_ADDR_S 0
  1526. //*****************************************************************************
  1527. //
  1528. // The following are defines for the bit fields in the USB_O_RXHUBPORT7
  1529. // register.
  1530. //
  1531. //*****************************************************************************
  1532. #define USB_RXHUBPORT7_PORT_M 0x0000007F // Hub Port
  1533. #define USB_RXHUBPORT7_PORT_S 0
  1534. //*****************************************************************************
  1535. //
  1536. // The following are defines for the bit fields in the USB_O_CSRL0 register.
  1537. //
  1538. //*****************************************************************************
  1539. #define USB_CSRL0_NAKTO 0x00000080 // NAK Timeout
  1540. #define USB_CSRL0_SETENDC 0x00000080 // Setup End Clear
  1541. #define USB_CSRL0_STATUS 0x00000040 // STATUS Packet
  1542. #define USB_CSRL0_RXRDYC 0x00000040 // RXRDY Clear
  1543. #define USB_CSRL0_REQPKT 0x00000020 // Request Packet
  1544. #define USB_CSRL0_STALL 0x00000020 // Send Stall
  1545. #define USB_CSRL0_SETEND 0x00000010 // Setup End
  1546. #define USB_CSRL0_ERROR 0x00000010 // Error
  1547. #define USB_CSRL0_DATAEND 0x00000008 // Data End
  1548. #define USB_CSRL0_SETUP 0x00000008 // Setup Packet
  1549. #define USB_CSRL0_STALLED 0x00000004 // Endpoint Stalled
  1550. #define USB_CSRL0_TXRDY 0x00000002 // Transmit Packet Ready
  1551. #define USB_CSRL0_RXRDY 0x00000001 // Receive Packet Ready
  1552. //*****************************************************************************
  1553. //
  1554. // The following are defines for the bit fields in the USB_O_CSRH0 register.
  1555. //
  1556. //*****************************************************************************
  1557. #define USB_CSRH0_DISPING 0x00000008 // PING Disable
  1558. #define USB_CSRH0_DTWE 0x00000004 // Data Toggle Write Enable
  1559. #define USB_CSRH0_DT 0x00000002 // Data Toggle
  1560. #define USB_CSRH0_FLUSH 0x00000001 // Flush FIFO
  1561. //*****************************************************************************
  1562. //
  1563. // The following are defines for the bit fields in the USB_O_COUNT0 register.
  1564. //
  1565. //*****************************************************************************
  1566. #define USB_COUNT0_COUNT_M 0x0000007F // FIFO Count
  1567. #define USB_COUNT0_COUNT_S 0
  1568. //*****************************************************************************
  1569. //
  1570. // The following are defines for the bit fields in the USB_O_TYPE0 register.
  1571. //
  1572. //*****************************************************************************
  1573. #define USB_TYPE0_SPEED_M 0x000000C0 // Operating Speed
  1574. #define USB_TYPE0_SPEED_HIGH 0x00000040 // High
  1575. #define USB_TYPE0_SPEED_FULL 0x00000080 // Full
  1576. #define USB_TYPE0_SPEED_LOW 0x000000C0 // Low
  1577. //*****************************************************************************
  1578. //
  1579. // The following are defines for the bit fields in the USB_O_NAKLMT register.
  1580. //
  1581. //*****************************************************************************
  1582. #define USB_NAKLMT_NAKLMT_M 0x0000001F // EP0 NAK Limit
  1583. #define USB_NAKLMT_NAKLMT_S 0
  1584. //*****************************************************************************
  1585. //
  1586. // The following are defines for the bit fields in the USB_O_TXMAXP1 register.
  1587. //
  1588. //*****************************************************************************
  1589. #define USB_TXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload
  1590. #define USB_TXMAXP1_MAXLOAD_S 0
  1591. //*****************************************************************************
  1592. //
  1593. // The following are defines for the bit fields in the USB_O_TXCSRL1 register.
  1594. //
  1595. //*****************************************************************************
  1596. #define USB_TXCSRL1_NAKTO 0x00000080 // NAK Timeout
  1597. #define USB_TXCSRL1_CLRDT 0x00000040 // Clear Data Toggle
  1598. #define USB_TXCSRL1_STALLED 0x00000020 // Endpoint Stalled
  1599. #define USB_TXCSRL1_STALL 0x00000010 // Send STALL
  1600. #define USB_TXCSRL1_SETUP 0x00000010 // Setup Packet
  1601. #define USB_TXCSRL1_FLUSH 0x00000008 // Flush FIFO
  1602. #define USB_TXCSRL1_ERROR 0x00000004 // Error
  1603. #define USB_TXCSRL1_UNDRN 0x00000004 // Underrun
  1604. #define USB_TXCSRL1_FIFONE 0x00000002 // FIFO Not Empty
  1605. #define USB_TXCSRL1_TXRDY 0x00000001 // Transmit Packet Ready
  1606. //*****************************************************************************
  1607. //
  1608. // The following are defines for the bit fields in the USB_O_TXCSRH1 register.
  1609. //
  1610. //*****************************************************************************
  1611. #define USB_TXCSRH1_AUTOSET 0x00000080 // Auto Set
  1612. #define USB_TXCSRH1_ISO 0x00000040 // Isochronous Transfers
  1613. #define USB_TXCSRH1_MODE 0x00000020 // Mode
  1614. #define USB_TXCSRH1_DMAEN 0x00000010 // DMA Request Enable
  1615. #define USB_TXCSRH1_FDT 0x00000008 // Force Data Toggle
  1616. #define USB_TXCSRH1_DMAMOD 0x00000004 // DMA Request Mode
  1617. #define USB_TXCSRH1_DTWE 0x00000002 // Data Toggle Write Enable
  1618. #define USB_TXCSRH1_DT 0x00000001 // Data Toggle
  1619. //*****************************************************************************
  1620. //
  1621. // The following are defines for the bit fields in the USB_O_RXMAXP1 register.
  1622. //
  1623. //*****************************************************************************
  1624. #define USB_RXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload
  1625. #define USB_RXMAXP1_MAXLOAD_S 0
  1626. //*****************************************************************************
  1627. //
  1628. // The following are defines for the bit fields in the USB_O_RXCSRL1 register.
  1629. //
  1630. //*****************************************************************************
  1631. #define USB_RXCSRL1_CLRDT 0x00000080 // Clear Data Toggle
  1632. #define USB_RXCSRL1_STALLED 0x00000040 // Endpoint Stalled
  1633. #define USB_RXCSRL1_STALL 0x00000020 // Send STALL
  1634. #define USB_RXCSRL1_REQPKT 0x00000020 // Request Packet
  1635. #define USB_RXCSRL1_FLUSH 0x00000010 // Flush FIFO
  1636. #define USB_RXCSRL1_DATAERR 0x00000008 // Data Error
  1637. #define USB_RXCSRL1_NAKTO 0x00000008 // NAK Timeout
  1638. #define USB_RXCSRL1_OVER 0x00000004 // Overrun
  1639. #define USB_RXCSRL1_ERROR 0x00000004 // Error
  1640. #define USB_RXCSRL1_FULL 0x00000002 // FIFO Full
  1641. #define USB_RXCSRL1_RXRDY 0x00000001 // Receive Packet Ready
  1642. //*****************************************************************************
  1643. //
  1644. // The following are defines for the bit fields in the USB_O_RXCSRH1 register.
  1645. //
  1646. //*****************************************************************************
  1647. #define USB_RXCSRH1_AUTOCL 0x00000080 // Auto Clear
  1648. #define USB_RXCSRH1_AUTORQ 0x00000040 // Auto Request
  1649. #define USB_RXCSRH1_ISO 0x00000040 // Isochronous Transfers
  1650. #define USB_RXCSRH1_DMAEN 0x00000020 // DMA Request Enable
  1651. #define USB_RXCSRH1_DISNYET 0x00000010 // Disable NYET
  1652. #define USB_RXCSRH1_PIDERR 0x00000010 // PID Error
  1653. #define USB_RXCSRH1_DMAMOD 0x00000008 // DMA Request Mode
  1654. #define USB_RXCSRH1_DTWE 0x00000004 // Data Toggle Write Enable
  1655. #define USB_RXCSRH1_DT 0x00000002 // Data Toggle
  1656. #define USB_RXCSRH1_INCOMPRX 0x00000001 // Incomplete RX Transmission
  1657. // Status
  1658. //*****************************************************************************
  1659. //
  1660. // The following are defines for the bit fields in the USB_O_RXCOUNT1 register.
  1661. //
  1662. //*****************************************************************************
  1663. #define USB_RXCOUNT1_COUNT_M 0x00001FFF // Receive Packet Count
  1664. #define USB_RXCOUNT1_COUNT_S 0
  1665. //*****************************************************************************
  1666. //
  1667. // The following are defines for the bit fields in the USB_O_TXTYPE1 register.
  1668. //
  1669. //*****************************************************************************
  1670. #define USB_TXTYPE1_SPEED_M 0x000000C0 // Operating Speed
  1671. #define USB_TXTYPE1_SPEED_DFLT 0x00000000 // Default
  1672. #define USB_TXTYPE1_SPEED_HIGH 0x00000040 // High
  1673. #define USB_TXTYPE1_SPEED_FULL 0x00000080 // Full
  1674. #define USB_TXTYPE1_SPEED_LOW 0x000000C0 // Low
  1675. #define USB_TXTYPE1_PROTO_M 0x00000030 // Protocol
  1676. #define USB_TXTYPE1_PROTO_CTRL 0x00000000 // Control
  1677. #define USB_TXTYPE1_PROTO_ISOC 0x00000010 // Isochronous
  1678. #define USB_TXTYPE1_PROTO_BULK 0x00000020 // Bulk
  1679. #define USB_TXTYPE1_PROTO_INT 0x00000030 // Interrupt
  1680. #define USB_TXTYPE1_TEP_M 0x0000000F // Target Endpoint Number
  1681. #define USB_TXTYPE1_TEP_S 0
  1682. //*****************************************************************************
  1683. //
  1684. // The following are defines for the bit fields in the USB_O_TXINTERVAL1
  1685. // register.
  1686. //
  1687. //*****************************************************************************
  1688. #define USB_TXINTERVAL1_NAKLMT_M \
  1689. 0x000000FF // NAK Limit
  1690. #define USB_TXINTERVAL1_TXPOLL_M \
  1691. 0x000000FF // TX Polling
  1692. #define USB_TXINTERVAL1_TXPOLL_S \
  1693. 0
  1694. #define USB_TXINTERVAL1_NAKLMT_S \
  1695. 0
  1696. //*****************************************************************************
  1697. //
  1698. // The following are defines for the bit fields in the USB_O_RXTYPE1 register.
  1699. //
  1700. //*****************************************************************************
  1701. #define USB_RXTYPE1_SPEED_M 0x000000C0 // Operating Speed
  1702. #define USB_RXTYPE1_SPEED_DFLT 0x00000000 // Default
  1703. #define USB_RXTYPE1_SPEED_HIGH 0x00000040 // High
  1704. #define USB_RXTYPE1_SPEED_FULL 0x00000080 // Full
  1705. #define USB_RXTYPE1_SPEED_LOW 0x000000C0 // Low
  1706. #define USB_RXTYPE1_PROTO_M 0x00000030 // Protocol
  1707. #define USB_RXTYPE1_PROTO_CTRL 0x00000000 // Control
  1708. #define USB_RXTYPE1_PROTO_ISOC 0x00000010 // Isochronous
  1709. #define USB_RXTYPE1_PROTO_BULK 0x00000020 // Bulk
  1710. #define USB_RXTYPE1_PROTO_INT 0x00000030 // Interrupt
  1711. #define USB_RXTYPE1_TEP_M 0x0000000F // Target Endpoint Number
  1712. #define USB_RXTYPE1_TEP_S 0
  1713. //*****************************************************************************
  1714. //
  1715. // The following are defines for the bit fields in the USB_O_RXINTERVAL1
  1716. // register.
  1717. //
  1718. //*****************************************************************************
  1719. #define USB_RXINTERVAL1_TXPOLL_M \
  1720. 0x000000FF // RX Polling
  1721. #define USB_RXINTERVAL1_NAKLMT_M \
  1722. 0x000000FF // NAK Limit
  1723. #define USB_RXINTERVAL1_TXPOLL_S \
  1724. 0
  1725. #define USB_RXINTERVAL1_NAKLMT_S \
  1726. 0
  1727. //*****************************************************************************
  1728. //
  1729. // The following are defines for the bit fields in the USB_O_TXMAXP2 register.
  1730. //
  1731. //*****************************************************************************
  1732. #define USB_TXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload
  1733. #define USB_TXMAXP2_MAXLOAD_S 0
  1734. //*****************************************************************************
  1735. //
  1736. // The following are defines for the bit fields in the USB_O_TXCSRL2 register.
  1737. //
  1738. //*****************************************************************************
  1739. #define USB_TXCSRL2_NAKTO 0x00000080 // NAK Timeout
  1740. #define USB_TXCSRL2_CLRDT 0x00000040 // Clear Data Toggle
  1741. #define USB_TXCSRL2_STALLED 0x00000020 // Endpoint Stalled
  1742. #define USB_TXCSRL2_SETUP 0x00000010 // Setup Packet
  1743. #define USB_TXCSRL2_STALL 0x00000010 // Send STALL
  1744. #define USB_TXCSRL2_FLUSH 0x00000008 // Flush FIFO
  1745. #define USB_TXCSRL2_ERROR 0x00000004 // Error
  1746. #define USB_TXCSRL2_UNDRN 0x00000004 // Underrun
  1747. #define USB_TXCSRL2_FIFONE 0x00000002 // FIFO Not Empty
  1748. #define USB_TXCSRL2_TXRDY 0x00000001 // Transmit Packet Ready
  1749. //*****************************************************************************
  1750. //
  1751. // The following are defines for the bit fields in the USB_O_TXCSRH2 register.
  1752. //
  1753. //*****************************************************************************
  1754. #define USB_TXCSRH2_AUTOSET 0x00000080 // Auto Set
  1755. #define USB_TXCSRH2_ISO 0x00000040 // Isochronous Transfers
  1756. #define USB_TXCSRH2_MODE 0x00000020 // Mode
  1757. #define USB_TXCSRH2_DMAEN 0x00000010 // DMA Request Enable
  1758. #define USB_TXCSRH2_FDT 0x00000008 // Force Data Toggle
  1759. #define USB_TXCSRH2_DMAMOD 0x00000004 // DMA Request Mode
  1760. #define USB_TXCSRH2_DTWE 0x00000002 // Data Toggle Write Enable
  1761. #define USB_TXCSRH2_DT 0x00000001 // Data Toggle
  1762. //*****************************************************************************
  1763. //
  1764. // The following are defines for the bit fields in the USB_O_RXMAXP2 register.
  1765. //
  1766. //*****************************************************************************
  1767. #define USB_RXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload
  1768. #define USB_RXMAXP2_MAXLOAD_S 0
  1769. //*****************************************************************************
  1770. //
  1771. // The following are defines for the bit fields in the USB_O_RXCSRL2 register.
  1772. //
  1773. //*****************************************************************************
  1774. #define USB_RXCSRL2_CLRDT 0x00000080 // Clear Data Toggle
  1775. #define USB_RXCSRL2_STALLED 0x00000040 // Endpoint Stalled
  1776. #define USB_RXCSRL2_REQPKT 0x00000020 // Request Packet
  1777. #define USB_RXCSRL2_STALL 0x00000020 // Send STALL
  1778. #define USB_RXCSRL2_FLUSH 0x00000010 // Flush FIFO
  1779. #define USB_RXCSRL2_DATAERR 0x00000008 // Data Error
  1780. #define USB_RXCSRL2_NAKTO 0x00000008 // NAK Timeout
  1781. #define USB_RXCSRL2_ERROR 0x00000004 // Error
  1782. #define USB_RXCSRL2_OVER 0x00000004 // Overrun
  1783. #define USB_RXCSRL2_FULL 0x00000002 // FIFO Full
  1784. #define USB_RXCSRL2_RXRDY 0x00000001 // Receive Packet Ready
  1785. //*****************************************************************************
  1786. //
  1787. // The following are defines for the bit fields in the USB_O_RXCSRH2 register.
  1788. //
  1789. //*****************************************************************************
  1790. #define USB_RXCSRH2_AUTOCL 0x00000080 // Auto Clear
  1791. #define USB_RXCSRH2_AUTORQ 0x00000040 // Auto Request
  1792. #define USB_RXCSRH2_ISO 0x00000040 // Isochronous Transfers
  1793. #define USB_RXCSRH2_DMAEN 0x00000020 // DMA Request Enable
  1794. #define USB_RXCSRH2_DISNYET 0x00000010 // Disable NYET
  1795. #define USB_RXCSRH2_PIDERR 0x00000010 // PID Error
  1796. #define USB_RXCSRH2_DMAMOD 0x00000008 // DMA Request Mode
  1797. #define USB_RXCSRH2_DTWE 0x00000004 // Data Toggle Write Enable
  1798. #define USB_RXCSRH2_DT 0x00000002 // Data Toggle
  1799. #define USB_RXCSRH2_INCOMPRX 0x00000001 // Incomplete RX Transmission
  1800. // Status
  1801. //*****************************************************************************
  1802. //
  1803. // The following are defines for the bit fields in the USB_O_RXCOUNT2 register.
  1804. //
  1805. //*****************************************************************************
  1806. #define USB_RXCOUNT2_COUNT_M 0x00001FFF // Receive Packet Count
  1807. #define USB_RXCOUNT2_COUNT_S 0
  1808. //*****************************************************************************
  1809. //
  1810. // The following are defines for the bit fields in the USB_O_TXTYPE2 register.
  1811. //
  1812. //*****************************************************************************
  1813. #define USB_TXTYPE2_SPEED_M 0x000000C0 // Operating Speed
  1814. #define USB_TXTYPE2_SPEED_DFLT 0x00000000 // Default
  1815. #define USB_TXTYPE2_SPEED_HIGH 0x00000040 // High
  1816. #define USB_TXTYPE2_SPEED_FULL 0x00000080 // Full
  1817. #define USB_TXTYPE2_SPEED_LOW 0x000000C0 // Low
  1818. #define USB_TXTYPE2_PROTO_M 0x00000030 // Protocol
  1819. #define USB_TXTYPE2_PROTO_CTRL 0x00000000 // Control
  1820. #define USB_TXTYPE2_PROTO_ISOC 0x00000010 // Isochronous
  1821. #define USB_TXTYPE2_PROTO_BULK 0x00000020 // Bulk
  1822. #define USB_TXTYPE2_PROTO_INT 0x00000030 // Interrupt
  1823. #define USB_TXTYPE2_TEP_M 0x0000000F // Target Endpoint Number
  1824. #define USB_TXTYPE2_TEP_S 0
  1825. //*****************************************************************************
  1826. //
  1827. // The following are defines for the bit fields in the USB_O_TXINTERVAL2
  1828. // register.
  1829. //
  1830. //*****************************************************************************
  1831. #define USB_TXINTERVAL2_TXPOLL_M \
  1832. 0x000000FF // TX Polling
  1833. #define USB_TXINTERVAL2_NAKLMT_M \
  1834. 0x000000FF // NAK Limit
  1835. #define USB_TXINTERVAL2_NAKLMT_S \
  1836. 0
  1837. #define USB_TXINTERVAL2_TXPOLL_S \
  1838. 0
  1839. //*****************************************************************************
  1840. //
  1841. // The following are defines for the bit fields in the USB_O_RXTYPE2 register.
  1842. //
  1843. //*****************************************************************************
  1844. #define USB_RXTYPE2_SPEED_M 0x000000C0 // Operating Speed
  1845. #define USB_RXTYPE2_SPEED_DFLT 0x00000000 // Default
  1846. #define USB_RXTYPE2_SPEED_HIGH 0x00000040 // High
  1847. #define USB_RXTYPE2_SPEED_FULL 0x00000080 // Full
  1848. #define USB_RXTYPE2_SPEED_LOW 0x000000C0 // Low
  1849. #define USB_RXTYPE2_PROTO_M 0x00000030 // Protocol
  1850. #define USB_RXTYPE2_PROTO_CTRL 0x00000000 // Control
  1851. #define USB_RXTYPE2_PROTO_ISOC 0x00000010 // Isochronous
  1852. #define USB_RXTYPE2_PROTO_BULK 0x00000020 // Bulk
  1853. #define USB_RXTYPE2_PROTO_INT 0x00000030 // Interrupt
  1854. #define USB_RXTYPE2_TEP_M 0x0000000F // Target Endpoint Number
  1855. #define USB_RXTYPE2_TEP_S 0
  1856. //*****************************************************************************
  1857. //
  1858. // The following are defines for the bit fields in the USB_O_RXINTERVAL2
  1859. // register.
  1860. //
  1861. //*****************************************************************************
  1862. #define USB_RXINTERVAL2_TXPOLL_M \
  1863. 0x000000FF // RX Polling
  1864. #define USB_RXINTERVAL2_NAKLMT_M \
  1865. 0x000000FF // NAK Limit
  1866. #define USB_RXINTERVAL2_TXPOLL_S \
  1867. 0
  1868. #define USB_RXINTERVAL2_NAKLMT_S \
  1869. 0
  1870. //*****************************************************************************
  1871. //
  1872. // The following are defines for the bit fields in the USB_O_TXMAXP3 register.
  1873. //
  1874. //*****************************************************************************
  1875. #define USB_TXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload
  1876. #define USB_TXMAXP3_MAXLOAD_S 0
  1877. //*****************************************************************************
  1878. //
  1879. // The following are defines for the bit fields in the USB_O_TXCSRL3 register.
  1880. //
  1881. //*****************************************************************************
  1882. #define USB_TXCSRL3_NAKTO 0x00000080 // NAK Timeout
  1883. #define USB_TXCSRL3_CLRDT 0x00000040 // Clear Data Toggle
  1884. #define USB_TXCSRL3_STALLED 0x00000020 // Endpoint Stalled
  1885. #define USB_TXCSRL3_SETUP 0x00000010 // Setup Packet
  1886. #define USB_TXCSRL3_STALL 0x00000010 // Send STALL
  1887. #define USB_TXCSRL3_FLUSH 0x00000008 // Flush FIFO
  1888. #define USB_TXCSRL3_ERROR 0x00000004 // Error
  1889. #define USB_TXCSRL3_UNDRN 0x00000004 // Underrun
  1890. #define USB_TXCSRL3_FIFONE 0x00000002 // FIFO Not Empty
  1891. #define USB_TXCSRL3_TXRDY 0x00000001 // Transmit Packet Ready
  1892. //*****************************************************************************
  1893. //
  1894. // The following are defines for the bit fields in the USB_O_TXCSRH3 register.
  1895. //
  1896. //*****************************************************************************
  1897. #define USB_TXCSRH3_AUTOSET 0x00000080 // Auto Set
  1898. #define USB_TXCSRH3_ISO 0x00000040 // Isochronous Transfers
  1899. #define USB_TXCSRH3_MODE 0x00000020 // Mode
  1900. #define USB_TXCSRH3_DMAEN 0x00000010 // DMA Request Enable
  1901. #define USB_TXCSRH3_FDT 0x00000008 // Force Data Toggle
  1902. #define USB_TXCSRH3_DMAMOD 0x00000004 // DMA Request Mode
  1903. #define USB_TXCSRH3_DTWE 0x00000002 // Data Toggle Write Enable
  1904. #define USB_TXCSRH3_DT 0x00000001 // Data Toggle
  1905. //*****************************************************************************
  1906. //
  1907. // The following are defines for the bit fields in the USB_O_RXMAXP3 register.
  1908. //
  1909. //*****************************************************************************
  1910. #define USB_RXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload
  1911. #define USB_RXMAXP3_MAXLOAD_S 0
  1912. //*****************************************************************************
  1913. //
  1914. // The following are defines for the bit fields in the USB_O_RXCSRL3 register.
  1915. //
  1916. //*****************************************************************************
  1917. #define USB_RXCSRL3_CLRDT 0x00000080 // Clear Data Toggle
  1918. #define USB_RXCSRL3_STALLED 0x00000040 // Endpoint Stalled
  1919. #define USB_RXCSRL3_STALL 0x00000020 // Send STALL
  1920. #define USB_RXCSRL3_REQPKT 0x00000020 // Request Packet
  1921. #define USB_RXCSRL3_FLUSH 0x00000010 // Flush FIFO
  1922. #define USB_RXCSRL3_DATAERR 0x00000008 // Data Error
  1923. #define USB_RXCSRL3_NAKTO 0x00000008 // NAK Timeout
  1924. #define USB_RXCSRL3_ERROR 0x00000004 // Error
  1925. #define USB_RXCSRL3_OVER 0x00000004 // Overrun
  1926. #define USB_RXCSRL3_FULL 0x00000002 // FIFO Full
  1927. #define USB_RXCSRL3_RXRDY 0x00000001 // Receive Packet Ready
  1928. //*****************************************************************************
  1929. //
  1930. // The following are defines for the bit fields in the USB_O_RXCSRH3 register.
  1931. //
  1932. //*****************************************************************************
  1933. #define USB_RXCSRH3_AUTOCL 0x00000080 // Auto Clear
  1934. #define USB_RXCSRH3_AUTORQ 0x00000040 // Auto Request
  1935. #define USB_RXCSRH3_ISO 0x00000040 // Isochronous Transfers
  1936. #define USB_RXCSRH3_DMAEN 0x00000020 // DMA Request Enable
  1937. #define USB_RXCSRH3_DISNYET 0x00000010 // Disable NYET
  1938. #define USB_RXCSRH3_PIDERR 0x00000010 // PID Error
  1939. #define USB_RXCSRH3_DMAMOD 0x00000008 // DMA Request Mode
  1940. #define USB_RXCSRH3_DTWE 0x00000004 // Data Toggle Write Enable
  1941. #define USB_RXCSRH3_DT 0x00000002 // Data Toggle
  1942. #define USB_RXCSRH3_INCOMPRX 0x00000001 // Incomplete RX Transmission
  1943. // Status
  1944. //*****************************************************************************
  1945. //
  1946. // The following are defines for the bit fields in the USB_O_RXCOUNT3 register.
  1947. //
  1948. //*****************************************************************************
  1949. #define USB_RXCOUNT3_COUNT_M 0x00001FFF // Receive Packet Count
  1950. #define USB_RXCOUNT3_COUNT_S 0
  1951. //*****************************************************************************
  1952. //
  1953. // The following are defines for the bit fields in the USB_O_TXTYPE3 register.
  1954. //
  1955. //*****************************************************************************
  1956. #define USB_TXTYPE3_SPEED_M 0x000000C0 // Operating Speed
  1957. #define USB_TXTYPE3_SPEED_DFLT 0x00000000 // Default
  1958. #define USB_TXTYPE3_SPEED_HIGH 0x00000040 // High
  1959. #define USB_TXTYPE3_SPEED_FULL 0x00000080 // Full
  1960. #define USB_TXTYPE3_SPEED_LOW 0x000000C0 // Low
  1961. #define USB_TXTYPE3_PROTO_M 0x00000030 // Protocol
  1962. #define USB_TXTYPE3_PROTO_CTRL 0x00000000 // Control
  1963. #define USB_TXTYPE3_PROTO_ISOC 0x00000010 // Isochronous
  1964. #define USB_TXTYPE3_PROTO_BULK 0x00000020 // Bulk
  1965. #define USB_TXTYPE3_PROTO_INT 0x00000030 // Interrupt
  1966. #define USB_TXTYPE3_TEP_M 0x0000000F // Target Endpoint Number
  1967. #define USB_TXTYPE3_TEP_S 0
  1968. //*****************************************************************************
  1969. //
  1970. // The following are defines for the bit fields in the USB_O_TXINTERVAL3
  1971. // register.
  1972. //
  1973. //*****************************************************************************
  1974. #define USB_TXINTERVAL3_TXPOLL_M \
  1975. 0x000000FF // TX Polling
  1976. #define USB_TXINTERVAL3_NAKLMT_M \
  1977. 0x000000FF // NAK Limit
  1978. #define USB_TXINTERVAL3_TXPOLL_S \
  1979. 0
  1980. #define USB_TXINTERVAL3_NAKLMT_S \
  1981. 0
  1982. //*****************************************************************************
  1983. //
  1984. // The following are defines for the bit fields in the USB_O_RXTYPE3 register.
  1985. //
  1986. //*****************************************************************************
  1987. #define USB_RXTYPE3_SPEED_M 0x000000C0 // Operating Speed
  1988. #define USB_RXTYPE3_SPEED_DFLT 0x00000000 // Default
  1989. #define USB_RXTYPE3_SPEED_HIGH 0x00000040 // High
  1990. #define USB_RXTYPE3_SPEED_FULL 0x00000080 // Full
  1991. #define USB_RXTYPE3_SPEED_LOW 0x000000C0 // Low
  1992. #define USB_RXTYPE3_PROTO_M 0x00000030 // Protocol
  1993. #define USB_RXTYPE3_PROTO_CTRL 0x00000000 // Control
  1994. #define USB_RXTYPE3_PROTO_ISOC 0x00000010 // Isochronous
  1995. #define USB_RXTYPE3_PROTO_BULK 0x00000020 // Bulk
  1996. #define USB_RXTYPE3_PROTO_INT 0x00000030 // Interrupt
  1997. #define USB_RXTYPE3_TEP_M 0x0000000F // Target Endpoint Number
  1998. #define USB_RXTYPE3_TEP_S 0
  1999. //*****************************************************************************
  2000. //
  2001. // The following are defines for the bit fields in the USB_O_RXINTERVAL3
  2002. // register.
  2003. //
  2004. //*****************************************************************************
  2005. #define USB_RXINTERVAL3_TXPOLL_M \
  2006. 0x000000FF // RX Polling
  2007. #define USB_RXINTERVAL3_NAKLMT_M \
  2008. 0x000000FF // NAK Limit
  2009. #define USB_RXINTERVAL3_TXPOLL_S \
  2010. 0
  2011. #define USB_RXINTERVAL3_NAKLMT_S \
  2012. 0
  2013. //*****************************************************************************
  2014. //
  2015. // The following are defines for the bit fields in the USB_O_TXMAXP4 register.
  2016. //
  2017. //*****************************************************************************
  2018. #define USB_TXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload
  2019. #define USB_TXMAXP4_MAXLOAD_S 0
  2020. //*****************************************************************************
  2021. //
  2022. // The following are defines for the bit fields in the USB_O_TXCSRL4 register.
  2023. //
  2024. //*****************************************************************************
  2025. #define USB_TXCSRL4_NAKTO 0x00000080 // NAK Timeout
  2026. #define USB_TXCSRL4_CLRDT 0x00000040 // Clear Data Toggle
  2027. #define USB_TXCSRL4_STALLED 0x00000020 // Endpoint Stalled
  2028. #define USB_TXCSRL4_SETUP 0x00000010 // Setup Packet
  2029. #define USB_TXCSRL4_STALL 0x00000010 // Send STALL
  2030. #define USB_TXCSRL4_FLUSH 0x00000008 // Flush FIFO
  2031. #define USB_TXCSRL4_ERROR 0x00000004 // Error
  2032. #define USB_TXCSRL4_UNDRN 0x00000004 // Underrun
  2033. #define USB_TXCSRL4_FIFONE 0x00000002 // FIFO Not Empty
  2034. #define USB_TXCSRL4_TXRDY 0x00000001 // Transmit Packet Ready
  2035. //*****************************************************************************
  2036. //
  2037. // The following are defines for the bit fields in the USB_O_TXCSRH4 register.
  2038. //
  2039. //*****************************************************************************
  2040. #define USB_TXCSRH4_AUTOSET 0x00000080 // Auto Set
  2041. #define USB_TXCSRH4_ISO 0x00000040 // Isochronous Transfers
  2042. #define USB_TXCSRH4_MODE 0x00000020 // Mode
  2043. #define USB_TXCSRH4_DMAEN 0x00000010 // DMA Request Enable
  2044. #define USB_TXCSRH4_FDT 0x00000008 // Force Data Toggle
  2045. #define USB_TXCSRH4_DMAMOD 0x00000004 // DMA Request Mode
  2046. #define USB_TXCSRH4_DTWE 0x00000002 // Data Toggle Write Enable
  2047. #define USB_TXCSRH4_DT 0x00000001 // Data Toggle
  2048. //*****************************************************************************
  2049. //
  2050. // The following are defines for the bit fields in the USB_O_RXMAXP4 register.
  2051. //
  2052. //*****************************************************************************
  2053. #define USB_RXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload
  2054. #define USB_RXMAXP4_MAXLOAD_S 0
  2055. //*****************************************************************************
  2056. //
  2057. // The following are defines for the bit fields in the USB_O_RXCSRL4 register.
  2058. //
  2059. //*****************************************************************************
  2060. #define USB_RXCSRL4_CLRDT 0x00000080 // Clear Data Toggle
  2061. #define USB_RXCSRL4_STALLED 0x00000040 // Endpoint Stalled
  2062. #define USB_RXCSRL4_STALL 0x00000020 // Send STALL
  2063. #define USB_RXCSRL4_REQPKT 0x00000020 // Request Packet
  2064. #define USB_RXCSRL4_FLUSH 0x00000010 // Flush FIFO
  2065. #define USB_RXCSRL4_NAKTO 0x00000008 // NAK Timeout
  2066. #define USB_RXCSRL4_DATAERR 0x00000008 // Data Error
  2067. #define USB_RXCSRL4_OVER 0x00000004 // Overrun
  2068. #define USB_RXCSRL4_ERROR 0x00000004 // Error
  2069. #define USB_RXCSRL4_FULL 0x00000002 // FIFO Full
  2070. #define USB_RXCSRL4_RXRDY 0x00000001 // Receive Packet Ready
  2071. //*****************************************************************************
  2072. //
  2073. // The following are defines for the bit fields in the USB_O_RXCSRH4 register.
  2074. //
  2075. //*****************************************************************************
  2076. #define USB_RXCSRH4_AUTOCL 0x00000080 // Auto Clear
  2077. #define USB_RXCSRH4_AUTORQ 0x00000040 // Auto Request
  2078. #define USB_RXCSRH4_ISO 0x00000040 // Isochronous Transfers
  2079. #define USB_RXCSRH4_DMAEN 0x00000020 // DMA Request Enable
  2080. #define USB_RXCSRH4_DISNYET 0x00000010 // Disable NYET
  2081. #define USB_RXCSRH4_PIDERR 0x00000010 // PID Error
  2082. #define USB_RXCSRH4_DMAMOD 0x00000008 // DMA Request Mode
  2083. #define USB_RXCSRH4_DTWE 0x00000004 // Data Toggle Write Enable
  2084. #define USB_RXCSRH4_DT 0x00000002 // Data Toggle
  2085. #define USB_RXCSRH4_INCOMPRX 0x00000001 // Incomplete RX Transmission
  2086. // Status
  2087. //*****************************************************************************
  2088. //
  2089. // The following are defines for the bit fields in the USB_O_RXCOUNT4 register.
  2090. //
  2091. //*****************************************************************************
  2092. #define USB_RXCOUNT4_COUNT_M 0x00001FFF // Receive Packet Count
  2093. #define USB_RXCOUNT4_COUNT_S 0
  2094. //*****************************************************************************
  2095. //
  2096. // The following are defines for the bit fields in the USB_O_TXTYPE4 register.
  2097. //
  2098. //*****************************************************************************
  2099. #define USB_TXTYPE4_SPEED_M 0x000000C0 // Operating Speed
  2100. #define USB_TXTYPE4_SPEED_DFLT 0x00000000 // Default
  2101. #define USB_TXTYPE4_SPEED_HIGH 0x00000040 // High
  2102. #define USB_TXTYPE4_SPEED_FULL 0x00000080 // Full
  2103. #define USB_TXTYPE4_SPEED_LOW 0x000000C0 // Low
  2104. #define USB_TXTYPE4_PROTO_M 0x00000030 // Protocol
  2105. #define USB_TXTYPE4_PROTO_CTRL 0x00000000 // Control
  2106. #define USB_TXTYPE4_PROTO_ISOC 0x00000010 // Isochronous
  2107. #define USB_TXTYPE4_PROTO_BULK 0x00000020 // Bulk
  2108. #define USB_TXTYPE4_PROTO_INT 0x00000030 // Interrupt
  2109. #define USB_TXTYPE4_TEP_M 0x0000000F // Target Endpoint Number
  2110. #define USB_TXTYPE4_TEP_S 0
  2111. //*****************************************************************************
  2112. //
  2113. // The following are defines for the bit fields in the USB_O_TXINTERVAL4
  2114. // register.
  2115. //
  2116. //*****************************************************************************
  2117. #define USB_TXINTERVAL4_TXPOLL_M \
  2118. 0x000000FF // TX Polling
  2119. #define USB_TXINTERVAL4_NAKLMT_M \
  2120. 0x000000FF // NAK Limit
  2121. #define USB_TXINTERVAL4_NAKLMT_S \
  2122. 0
  2123. #define USB_TXINTERVAL4_TXPOLL_S \
  2124. 0
  2125. //*****************************************************************************
  2126. //
  2127. // The following are defines for the bit fields in the USB_O_RXTYPE4 register.
  2128. //
  2129. //*****************************************************************************
  2130. #define USB_RXTYPE4_SPEED_M 0x000000C0 // Operating Speed
  2131. #define USB_RXTYPE4_SPEED_DFLT 0x00000000 // Default
  2132. #define USB_RXTYPE4_SPEED_HIGH 0x00000040 // High
  2133. #define USB_RXTYPE4_SPEED_FULL 0x00000080 // Full
  2134. #define USB_RXTYPE4_SPEED_LOW 0x000000C0 // Low
  2135. #define USB_RXTYPE4_PROTO_M 0x00000030 // Protocol
  2136. #define USB_RXTYPE4_PROTO_CTRL 0x00000000 // Control
  2137. #define USB_RXTYPE4_PROTO_ISOC 0x00000010 // Isochronous
  2138. #define USB_RXTYPE4_PROTO_BULK 0x00000020 // Bulk
  2139. #define USB_RXTYPE4_PROTO_INT 0x00000030 // Interrupt
  2140. #define USB_RXTYPE4_TEP_M 0x0000000F // Target Endpoint Number
  2141. #define USB_RXTYPE4_TEP_S 0
  2142. //*****************************************************************************
  2143. //
  2144. // The following are defines for the bit fields in the USB_O_RXINTERVAL4
  2145. // register.
  2146. //
  2147. //*****************************************************************************
  2148. #define USB_RXINTERVAL4_TXPOLL_M \
  2149. 0x000000FF // RX Polling
  2150. #define USB_RXINTERVAL4_NAKLMT_M \
  2151. 0x000000FF // NAK Limit
  2152. #define USB_RXINTERVAL4_NAKLMT_S \
  2153. 0
  2154. #define USB_RXINTERVAL4_TXPOLL_S \
  2155. 0
  2156. //*****************************************************************************
  2157. //
  2158. // The following are defines for the bit fields in the USB_O_TXMAXP5 register.
  2159. //
  2160. //*****************************************************************************
  2161. #define USB_TXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload
  2162. #define USB_TXMAXP5_MAXLOAD_S 0
  2163. //*****************************************************************************
  2164. //
  2165. // The following are defines for the bit fields in the USB_O_TXCSRL5 register.
  2166. //
  2167. //*****************************************************************************
  2168. #define USB_TXCSRL5_NAKTO 0x00000080 // NAK Timeout
  2169. #define USB_TXCSRL5_CLRDT 0x00000040 // Clear Data Toggle
  2170. #define USB_TXCSRL5_STALLED 0x00000020 // Endpoint Stalled
  2171. #define USB_TXCSRL5_SETUP 0x00000010 // Setup Packet
  2172. #define USB_TXCSRL5_STALL 0x00000010 // Send STALL
  2173. #define USB_TXCSRL5_FLUSH 0x00000008 // Flush FIFO
  2174. #define USB_TXCSRL5_ERROR 0x00000004 // Error
  2175. #define USB_TXCSRL5_UNDRN 0x00000004 // Underrun
  2176. #define USB_TXCSRL5_FIFONE 0x00000002 // FIFO Not Empty
  2177. #define USB_TXCSRL5_TXRDY 0x00000001 // Transmit Packet Ready
  2178. //*****************************************************************************
  2179. //
  2180. // The following are defines for the bit fields in the USB_O_TXCSRH5 register.
  2181. //
  2182. //*****************************************************************************
  2183. #define USB_TXCSRH5_AUTOSET 0x00000080 // Auto Set
  2184. #define USB_TXCSRH5_ISO 0x00000040 // Isochronous Transfers
  2185. #define USB_TXCSRH5_MODE 0x00000020 // Mode
  2186. #define USB_TXCSRH5_DMAEN 0x00000010 // DMA Request Enable
  2187. #define USB_TXCSRH5_FDT 0x00000008 // Force Data Toggle
  2188. #define USB_TXCSRH5_DMAMOD 0x00000004 // DMA Request Mode
  2189. #define USB_TXCSRH5_DTWE 0x00000002 // Data Toggle Write Enable
  2190. #define USB_TXCSRH5_DT 0x00000001 // Data Toggle
  2191. //*****************************************************************************
  2192. //
  2193. // The following are defines for the bit fields in the USB_O_RXMAXP5 register.
  2194. //
  2195. //*****************************************************************************
  2196. #define USB_RXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload
  2197. #define USB_RXMAXP5_MAXLOAD_S 0
  2198. //*****************************************************************************
  2199. //
  2200. // The following are defines for the bit fields in the USB_O_RXCSRL5 register.
  2201. //
  2202. //*****************************************************************************
  2203. #define USB_RXCSRL5_CLRDT 0x00000080 // Clear Data Toggle
  2204. #define USB_RXCSRL5_STALLED 0x00000040 // Endpoint Stalled
  2205. #define USB_RXCSRL5_STALL 0x00000020 // Send STALL
  2206. #define USB_RXCSRL5_REQPKT 0x00000020 // Request Packet
  2207. #define USB_RXCSRL5_FLUSH 0x00000010 // Flush FIFO
  2208. #define USB_RXCSRL5_NAKTO 0x00000008 // NAK Timeout
  2209. #define USB_RXCSRL5_DATAERR 0x00000008 // Data Error
  2210. #define USB_RXCSRL5_ERROR 0x00000004 // Error
  2211. #define USB_RXCSRL5_OVER 0x00000004 // Overrun
  2212. #define USB_RXCSRL5_FULL 0x00000002 // FIFO Full
  2213. #define USB_RXCSRL5_RXRDY 0x00000001 // Receive Packet Ready
  2214. //*****************************************************************************
  2215. //
  2216. // The following are defines for the bit fields in the USB_O_RXCSRH5 register.
  2217. //
  2218. //*****************************************************************************
  2219. #define USB_RXCSRH5_AUTOCL 0x00000080 // Auto Clear
  2220. #define USB_RXCSRH5_AUTORQ 0x00000040 // Auto Request
  2221. #define USB_RXCSRH5_ISO 0x00000040 // Isochronous Transfers
  2222. #define USB_RXCSRH5_DMAEN 0x00000020 // DMA Request Enable
  2223. #define USB_RXCSRH5_DISNYET 0x00000010 // Disable NYET
  2224. #define USB_RXCSRH5_PIDERR 0x00000010 // PID Error
  2225. #define USB_RXCSRH5_DMAMOD 0x00000008 // DMA Request Mode
  2226. #define USB_RXCSRH5_DTWE 0x00000004 // Data Toggle Write Enable
  2227. #define USB_RXCSRH5_DT 0x00000002 // Data Toggle
  2228. #define USB_RXCSRH5_INCOMPRX 0x00000001 // Incomplete RX Transmission
  2229. // Status
  2230. //*****************************************************************************
  2231. //
  2232. // The following are defines for the bit fields in the USB_O_RXCOUNT5 register.
  2233. //
  2234. //*****************************************************************************
  2235. #define USB_RXCOUNT5_COUNT_M 0x00001FFF // Receive Packet Count
  2236. #define USB_RXCOUNT5_COUNT_S 0
  2237. //*****************************************************************************
  2238. //
  2239. // The following are defines for the bit fields in the USB_O_TXTYPE5 register.
  2240. //
  2241. //*****************************************************************************
  2242. #define USB_TXTYPE5_SPEED_M 0x000000C0 // Operating Speed
  2243. #define USB_TXTYPE5_SPEED_DFLT 0x00000000 // Default
  2244. #define USB_TXTYPE5_SPEED_HIGH 0x00000040 // High
  2245. #define USB_TXTYPE5_SPEED_FULL 0x00000080 // Full
  2246. #define USB_TXTYPE5_SPEED_LOW 0x000000C0 // Low
  2247. #define USB_TXTYPE5_PROTO_M 0x00000030 // Protocol
  2248. #define USB_TXTYPE5_PROTO_CTRL 0x00000000 // Control
  2249. #define USB_TXTYPE5_PROTO_ISOC 0x00000010 // Isochronous
  2250. #define USB_TXTYPE5_PROTO_BULK 0x00000020 // Bulk
  2251. #define USB_TXTYPE5_PROTO_INT 0x00000030 // Interrupt
  2252. #define USB_TXTYPE5_TEP_M 0x0000000F // Target Endpoint Number
  2253. #define USB_TXTYPE5_TEP_S 0
  2254. //*****************************************************************************
  2255. //
  2256. // The following are defines for the bit fields in the USB_O_TXINTERVAL5
  2257. // register.
  2258. //
  2259. //*****************************************************************************
  2260. #define USB_TXINTERVAL5_TXPOLL_M \
  2261. 0x000000FF // TX Polling
  2262. #define USB_TXINTERVAL5_NAKLMT_M \
  2263. 0x000000FF // NAK Limit
  2264. #define USB_TXINTERVAL5_NAKLMT_S \
  2265. 0
  2266. #define USB_TXINTERVAL5_TXPOLL_S \
  2267. 0
  2268. //*****************************************************************************
  2269. //
  2270. // The following are defines for the bit fields in the USB_O_RXTYPE5 register.
  2271. //
  2272. //*****************************************************************************
  2273. #define USB_RXTYPE5_SPEED_M 0x000000C0 // Operating Speed
  2274. #define USB_RXTYPE5_SPEED_DFLT 0x00000000 // Default
  2275. #define USB_RXTYPE5_SPEED_HIGH 0x00000040 // High
  2276. #define USB_RXTYPE5_SPEED_FULL 0x00000080 // Full
  2277. #define USB_RXTYPE5_SPEED_LOW 0x000000C0 // Low
  2278. #define USB_RXTYPE5_PROTO_M 0x00000030 // Protocol
  2279. #define USB_RXTYPE5_PROTO_CTRL 0x00000000 // Control
  2280. #define USB_RXTYPE5_PROTO_ISOC 0x00000010 // Isochronous
  2281. #define USB_RXTYPE5_PROTO_BULK 0x00000020 // Bulk
  2282. #define USB_RXTYPE5_PROTO_INT 0x00000030 // Interrupt
  2283. #define USB_RXTYPE5_TEP_M 0x0000000F // Target Endpoint Number
  2284. #define USB_RXTYPE5_TEP_S 0
  2285. //*****************************************************************************
  2286. //
  2287. // The following are defines for the bit fields in the USB_O_RXINTERVAL5
  2288. // register.
  2289. //
  2290. //*****************************************************************************
  2291. #define USB_RXINTERVAL5_TXPOLL_M \
  2292. 0x000000FF // RX Polling
  2293. #define USB_RXINTERVAL5_NAKLMT_M \
  2294. 0x000000FF // NAK Limit
  2295. #define USB_RXINTERVAL5_TXPOLL_S \
  2296. 0
  2297. #define USB_RXINTERVAL5_NAKLMT_S \
  2298. 0
  2299. //*****************************************************************************
  2300. //
  2301. // The following are defines for the bit fields in the USB_O_TXMAXP6 register.
  2302. //
  2303. //*****************************************************************************
  2304. #define USB_TXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload
  2305. #define USB_TXMAXP6_MAXLOAD_S 0
  2306. //*****************************************************************************
  2307. //
  2308. // The following are defines for the bit fields in the USB_O_TXCSRL6 register.
  2309. //
  2310. //*****************************************************************************
  2311. #define USB_TXCSRL6_NAKTO 0x00000080 // NAK Timeout
  2312. #define USB_TXCSRL6_CLRDT 0x00000040 // Clear Data Toggle
  2313. #define USB_TXCSRL6_STALLED 0x00000020 // Endpoint Stalled
  2314. #define USB_TXCSRL6_STALL 0x00000010 // Send STALL
  2315. #define USB_TXCSRL6_SETUP 0x00000010 // Setup Packet
  2316. #define USB_TXCSRL6_FLUSH 0x00000008 // Flush FIFO
  2317. #define USB_TXCSRL6_ERROR 0x00000004 // Error
  2318. #define USB_TXCSRL6_UNDRN 0x00000004 // Underrun
  2319. #define USB_TXCSRL6_FIFONE 0x00000002 // FIFO Not Empty
  2320. #define USB_TXCSRL6_TXRDY 0x00000001 // Transmit Packet Ready
  2321. //*****************************************************************************
  2322. //
  2323. // The following are defines for the bit fields in the USB_O_TXCSRH6 register.
  2324. //
  2325. //*****************************************************************************
  2326. #define USB_TXCSRH6_AUTOSET 0x00000080 // Auto Set
  2327. #define USB_TXCSRH6_ISO 0x00000040 // Isochronous Transfers
  2328. #define USB_TXCSRH6_MODE 0x00000020 // Mode
  2329. #define USB_TXCSRH6_DMAEN 0x00000010 // DMA Request Enable
  2330. #define USB_TXCSRH6_FDT 0x00000008 // Force Data Toggle
  2331. #define USB_TXCSRH6_DMAMOD 0x00000004 // DMA Request Mode
  2332. #define USB_TXCSRH6_DTWE 0x00000002 // Data Toggle Write Enable
  2333. #define USB_TXCSRH6_DT 0x00000001 // Data Toggle
  2334. //*****************************************************************************
  2335. //
  2336. // The following are defines for the bit fields in the USB_O_RXMAXP6 register.
  2337. //
  2338. //*****************************************************************************
  2339. #define USB_RXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload
  2340. #define USB_RXMAXP6_MAXLOAD_S 0
  2341. //*****************************************************************************
  2342. //
  2343. // The following are defines for the bit fields in the USB_O_RXCSRL6 register.
  2344. //
  2345. //*****************************************************************************
  2346. #define USB_RXCSRL6_CLRDT 0x00000080 // Clear Data Toggle
  2347. #define USB_RXCSRL6_STALLED 0x00000040 // Endpoint Stalled
  2348. #define USB_RXCSRL6_REQPKT 0x00000020 // Request Packet
  2349. #define USB_RXCSRL6_STALL 0x00000020 // Send STALL
  2350. #define USB_RXCSRL6_FLUSH 0x00000010 // Flush FIFO
  2351. #define USB_RXCSRL6_NAKTO 0x00000008 // NAK Timeout
  2352. #define USB_RXCSRL6_DATAERR 0x00000008 // Data Error
  2353. #define USB_RXCSRL6_ERROR 0x00000004 // Error
  2354. #define USB_RXCSRL6_OVER 0x00000004 // Overrun
  2355. #define USB_RXCSRL6_FULL 0x00000002 // FIFO Full
  2356. #define USB_RXCSRL6_RXRDY 0x00000001 // Receive Packet Ready
  2357. //*****************************************************************************
  2358. //
  2359. // The following are defines for the bit fields in the USB_O_RXCSRH6 register.
  2360. //
  2361. //*****************************************************************************
  2362. #define USB_RXCSRH6_AUTOCL 0x00000080 // Auto Clear
  2363. #define USB_RXCSRH6_AUTORQ 0x00000040 // Auto Request
  2364. #define USB_RXCSRH6_ISO 0x00000040 // Isochronous Transfers
  2365. #define USB_RXCSRH6_DMAEN 0x00000020 // DMA Request Enable
  2366. #define USB_RXCSRH6_DISNYET 0x00000010 // Disable NYET
  2367. #define USB_RXCSRH6_PIDERR 0x00000010 // PID Error
  2368. #define USB_RXCSRH6_DMAMOD 0x00000008 // DMA Request Mode
  2369. #define USB_RXCSRH6_DTWE 0x00000004 // Data Toggle Write Enable
  2370. #define USB_RXCSRH6_DT 0x00000002 // Data Toggle
  2371. #define USB_RXCSRH6_INCOMPRX 0x00000001 // Incomplete RX Transmission
  2372. // Status
  2373. //*****************************************************************************
  2374. //
  2375. // The following are defines for the bit fields in the USB_O_RXCOUNT6 register.
  2376. //
  2377. //*****************************************************************************
  2378. #define USB_RXCOUNT6_COUNT_M 0x00001FFF // Receive Packet Count
  2379. #define USB_RXCOUNT6_COUNT_S 0
  2380. //*****************************************************************************
  2381. //
  2382. // The following are defines for the bit fields in the USB_O_TXTYPE6 register.
  2383. //
  2384. //*****************************************************************************
  2385. #define USB_TXTYPE6_SPEED_M 0x000000C0 // Operating Speed
  2386. #define USB_TXTYPE6_SPEED_DFLT 0x00000000 // Default
  2387. #define USB_TXTYPE6_SPEED_HIGH 0x00000040 // High
  2388. #define USB_TXTYPE6_SPEED_FULL 0x00000080 // Full
  2389. #define USB_TXTYPE6_SPEED_LOW 0x000000C0 // Low
  2390. #define USB_TXTYPE6_PROTO_M 0x00000030 // Protocol
  2391. #define USB_TXTYPE6_PROTO_CTRL 0x00000000 // Control
  2392. #define USB_TXTYPE6_PROTO_ISOC 0x00000010 // Isochronous
  2393. #define USB_TXTYPE6_PROTO_BULK 0x00000020 // Bulk
  2394. #define USB_TXTYPE6_PROTO_INT 0x00000030 // Interrupt
  2395. #define USB_TXTYPE6_TEP_M 0x0000000F // Target Endpoint Number
  2396. #define USB_TXTYPE6_TEP_S 0
  2397. //*****************************************************************************
  2398. //
  2399. // The following are defines for the bit fields in the USB_O_TXINTERVAL6
  2400. // register.
  2401. //
  2402. //*****************************************************************************
  2403. #define USB_TXINTERVAL6_TXPOLL_M \
  2404. 0x000000FF // TX Polling
  2405. #define USB_TXINTERVAL6_NAKLMT_M \
  2406. 0x000000FF // NAK Limit
  2407. #define USB_TXINTERVAL6_TXPOLL_S \
  2408. 0
  2409. #define USB_TXINTERVAL6_NAKLMT_S \
  2410. 0
  2411. //*****************************************************************************
  2412. //
  2413. // The following are defines for the bit fields in the USB_O_RXTYPE6 register.
  2414. //
  2415. //*****************************************************************************
  2416. #define USB_RXTYPE6_SPEED_M 0x000000C0 // Operating Speed
  2417. #define USB_RXTYPE6_SPEED_DFLT 0x00000000 // Default
  2418. #define USB_RXTYPE6_SPEED_HIGH 0x00000040 // High
  2419. #define USB_RXTYPE6_SPEED_FULL 0x00000080 // Full
  2420. #define USB_RXTYPE6_SPEED_LOW 0x000000C0 // Low
  2421. #define USB_RXTYPE6_PROTO_M 0x00000030 // Protocol
  2422. #define USB_RXTYPE6_PROTO_CTRL 0x00000000 // Control
  2423. #define USB_RXTYPE6_PROTO_ISOC 0x00000010 // Isochronous
  2424. #define USB_RXTYPE6_PROTO_BULK 0x00000020 // Bulk
  2425. #define USB_RXTYPE6_PROTO_INT 0x00000030 // Interrupt
  2426. #define USB_RXTYPE6_TEP_M 0x0000000F // Target Endpoint Number
  2427. #define USB_RXTYPE6_TEP_S 0
  2428. //*****************************************************************************
  2429. //
  2430. // The following are defines for the bit fields in the USB_O_RXINTERVAL6
  2431. // register.
  2432. //
  2433. //*****************************************************************************
  2434. #define USB_RXINTERVAL6_TXPOLL_M \
  2435. 0x000000FF // RX Polling
  2436. #define USB_RXINTERVAL6_NAKLMT_M \
  2437. 0x000000FF // NAK Limit
  2438. #define USB_RXINTERVAL6_NAKLMT_S \
  2439. 0
  2440. #define USB_RXINTERVAL6_TXPOLL_S \
  2441. 0
  2442. //*****************************************************************************
  2443. //
  2444. // The following are defines for the bit fields in the USB_O_TXMAXP7 register.
  2445. //
  2446. //*****************************************************************************
  2447. #define USB_TXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload
  2448. #define USB_TXMAXP7_MAXLOAD_S 0
  2449. //*****************************************************************************
  2450. //
  2451. // The following are defines for the bit fields in the USB_O_TXCSRL7 register.
  2452. //
  2453. //*****************************************************************************
  2454. #define USB_TXCSRL7_NAKTO 0x00000080 // NAK Timeout
  2455. #define USB_TXCSRL7_CLRDT 0x00000040 // Clear Data Toggle
  2456. #define USB_TXCSRL7_STALLED 0x00000020 // Endpoint Stalled
  2457. #define USB_TXCSRL7_STALL 0x00000010 // Send STALL
  2458. #define USB_TXCSRL7_SETUP 0x00000010 // Setup Packet
  2459. #define USB_TXCSRL7_FLUSH 0x00000008 // Flush FIFO
  2460. #define USB_TXCSRL7_ERROR 0x00000004 // Error
  2461. #define USB_TXCSRL7_UNDRN 0x00000004 // Underrun
  2462. #define USB_TXCSRL7_FIFONE 0x00000002 // FIFO Not Empty
  2463. #define USB_TXCSRL7_TXRDY 0x00000001 // Transmit Packet Ready
  2464. //*****************************************************************************
  2465. //
  2466. // The following are defines for the bit fields in the USB_O_TXCSRH7 register.
  2467. //
  2468. //*****************************************************************************
  2469. #define USB_TXCSRH7_AUTOSET 0x00000080 // Auto Set
  2470. #define USB_TXCSRH7_ISO 0x00000040 // Isochronous Transfers
  2471. #define USB_TXCSRH7_MODE 0x00000020 // Mode
  2472. #define USB_TXCSRH7_DMAEN 0x00000010 // DMA Request Enable
  2473. #define USB_TXCSRH7_FDT 0x00000008 // Force Data Toggle
  2474. #define USB_TXCSRH7_DMAMOD 0x00000004 // DMA Request Mode
  2475. #define USB_TXCSRH7_DTWE 0x00000002 // Data Toggle Write Enable
  2476. #define USB_TXCSRH7_DT 0x00000001 // Data Toggle
  2477. //*****************************************************************************
  2478. //
  2479. // The following are defines for the bit fields in the USB_O_RXMAXP7 register.
  2480. //
  2481. //*****************************************************************************
  2482. #define USB_RXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload
  2483. #define USB_RXMAXP7_MAXLOAD_S 0
  2484. //*****************************************************************************
  2485. //
  2486. // The following are defines for the bit fields in the USB_O_RXCSRL7 register.
  2487. //
  2488. //*****************************************************************************
  2489. #define USB_RXCSRL7_CLRDT 0x00000080 // Clear Data Toggle
  2490. #define USB_RXCSRL7_STALLED 0x00000040 // Endpoint Stalled
  2491. #define USB_RXCSRL7_REQPKT 0x00000020 // Request Packet
  2492. #define USB_RXCSRL7_STALL 0x00000020 // Send STALL
  2493. #define USB_RXCSRL7_FLUSH 0x00000010 // Flush FIFO
  2494. #define USB_RXCSRL7_DATAERR 0x00000008 // Data Error
  2495. #define USB_RXCSRL7_NAKTO 0x00000008 // NAK Timeout
  2496. #define USB_RXCSRL7_ERROR 0x00000004 // Error
  2497. #define USB_RXCSRL7_OVER 0x00000004 // Overrun
  2498. #define USB_RXCSRL7_FULL 0x00000002 // FIFO Full
  2499. #define USB_RXCSRL7_RXRDY 0x00000001 // Receive Packet Ready
  2500. //*****************************************************************************
  2501. //
  2502. // The following are defines for the bit fields in the USB_O_RXCSRH7 register.
  2503. //
  2504. //*****************************************************************************
  2505. #define USB_RXCSRH7_AUTOCL 0x00000080 // Auto Clear
  2506. #define USB_RXCSRH7_ISO 0x00000040 // Isochronous Transfers
  2507. #define USB_RXCSRH7_AUTORQ 0x00000040 // Auto Request
  2508. #define USB_RXCSRH7_DMAEN 0x00000020 // DMA Request Enable
  2509. #define USB_RXCSRH7_PIDERR 0x00000010 // PID Error
  2510. #define USB_RXCSRH7_DISNYET 0x00000010 // Disable NYET
  2511. #define USB_RXCSRH7_DMAMOD 0x00000008 // DMA Request Mode
  2512. #define USB_RXCSRH7_DTWE 0x00000004 // Data Toggle Write Enable
  2513. #define USB_RXCSRH7_DT 0x00000002 // Data Toggle
  2514. #define USB_RXCSRH7_INCOMPRX 0x00000001 // Incomplete RX Transmission
  2515. // Status
  2516. //*****************************************************************************
  2517. //
  2518. // The following are defines for the bit fields in the USB_O_RXCOUNT7 register.
  2519. //
  2520. //*****************************************************************************
  2521. #define USB_RXCOUNT7_COUNT_M 0x00001FFF // Receive Packet Count
  2522. #define USB_RXCOUNT7_COUNT_S 0
  2523. //*****************************************************************************
  2524. //
  2525. // The following are defines for the bit fields in the USB_O_TXTYPE7 register.
  2526. //
  2527. //*****************************************************************************
  2528. #define USB_TXTYPE7_SPEED_M 0x000000C0 // Operating Speed
  2529. #define USB_TXTYPE7_SPEED_DFLT 0x00000000 // Default
  2530. #define USB_TXTYPE7_SPEED_HIGH 0x00000040 // High
  2531. #define USB_TXTYPE7_SPEED_FULL 0x00000080 // Full
  2532. #define USB_TXTYPE7_SPEED_LOW 0x000000C0 // Low
  2533. #define USB_TXTYPE7_PROTO_M 0x00000030 // Protocol
  2534. #define USB_TXTYPE7_PROTO_CTRL 0x00000000 // Control
  2535. #define USB_TXTYPE7_PROTO_ISOC 0x00000010 // Isochronous
  2536. #define USB_TXTYPE7_PROTO_BULK 0x00000020 // Bulk
  2537. #define USB_TXTYPE7_PROTO_INT 0x00000030 // Interrupt
  2538. #define USB_TXTYPE7_TEP_M 0x0000000F // Target Endpoint Number
  2539. #define USB_TXTYPE7_TEP_S 0
  2540. //*****************************************************************************
  2541. //
  2542. // The following are defines for the bit fields in the USB_O_TXINTERVAL7
  2543. // register.
  2544. //
  2545. //*****************************************************************************
  2546. #define USB_TXINTERVAL7_TXPOLL_M \
  2547. 0x000000FF // TX Polling
  2548. #define USB_TXINTERVAL7_NAKLMT_M \
  2549. 0x000000FF // NAK Limit
  2550. #define USB_TXINTERVAL7_NAKLMT_S \
  2551. 0
  2552. #define USB_TXINTERVAL7_TXPOLL_S \
  2553. 0
  2554. //*****************************************************************************
  2555. //
  2556. // The following are defines for the bit fields in the USB_O_RXTYPE7 register.
  2557. //
  2558. //*****************************************************************************
  2559. #define USB_RXTYPE7_SPEED_M 0x000000C0 // Operating Speed
  2560. #define USB_RXTYPE7_SPEED_DFLT 0x00000000 // Default
  2561. #define USB_RXTYPE7_SPEED_HIGH 0x00000040 // High
  2562. #define USB_RXTYPE7_SPEED_FULL 0x00000080 // Full
  2563. #define USB_RXTYPE7_SPEED_LOW 0x000000C0 // Low
  2564. #define USB_RXTYPE7_PROTO_M 0x00000030 // Protocol
  2565. #define USB_RXTYPE7_PROTO_CTRL 0x00000000 // Control
  2566. #define USB_RXTYPE7_PROTO_ISOC 0x00000010 // Isochronous
  2567. #define USB_RXTYPE7_PROTO_BULK 0x00000020 // Bulk
  2568. #define USB_RXTYPE7_PROTO_INT 0x00000030 // Interrupt
  2569. #define USB_RXTYPE7_TEP_M 0x0000000F // Target Endpoint Number
  2570. #define USB_RXTYPE7_TEP_S 0
  2571. //*****************************************************************************
  2572. //
  2573. // The following are defines for the bit fields in the USB_O_RXINTERVAL7
  2574. // register.
  2575. //
  2576. //*****************************************************************************
  2577. #define USB_RXINTERVAL7_TXPOLL_M \
  2578. 0x000000FF // RX Polling
  2579. #define USB_RXINTERVAL7_NAKLMT_M \
  2580. 0x000000FF // NAK Limit
  2581. #define USB_RXINTERVAL7_NAKLMT_S \
  2582. 0
  2583. #define USB_RXINTERVAL7_TXPOLL_S \
  2584. 0
  2585. //*****************************************************************************
  2586. //
  2587. // The following are defines for the bit fields in the USB_O_DMAINTR register.
  2588. //
  2589. //*****************************************************************************
  2590. #define USB_DMAINTR_CH7 0x00000080 // Channel 7 DMA Interrupt
  2591. #define USB_DMAINTR_CH6 0x00000040 // Channel 6 DMA Interrupt
  2592. #define USB_DMAINTR_CH5 0x00000020 // Channel 5 DMA Interrupt
  2593. #define USB_DMAINTR_CH4 0x00000010 // Channel 4 DMA Interrupt
  2594. #define USB_DMAINTR_CH3 0x00000008 // Channel 3 DMA Interrupt
  2595. #define USB_DMAINTR_CH2 0x00000004 // Channel 2 DMA Interrupt
  2596. #define USB_DMAINTR_CH1 0x00000002 // Channel 1 DMA Interrupt
  2597. #define USB_DMAINTR_CH0 0x00000001 // Channel 0 DMA Interrupt
  2598. //*****************************************************************************
  2599. //
  2600. // The following are defines for the bit fields in the USB_O_DMACTL0 register.
  2601. //
  2602. //*****************************************************************************
  2603. #define USB_DMACTL0_BRSTM_M 0x00000600 // Burst Mode
  2604. #define USB_DMACTL0_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2605. #define USB_DMACTL0_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2606. #define USB_DMACTL0_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2607. // length
  2608. #define USB_DMACTL0_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2609. // unspecified length
  2610. #define USB_DMACTL0_ERR 0x00000100 // Bus Error Bit
  2611. #define USB_DMACTL0_EP_M 0x000000F0 // Endpoint number
  2612. #define USB_DMACTL0_IE 0x00000008 // DMA Interrupt Enable
  2613. #define USB_DMACTL0_MODE 0x00000004 // DMA Transfer Mode
  2614. #define USB_DMACTL0_DIR 0x00000002 // DMA Direction
  2615. #define USB_DMACTL0_ENABLE 0x00000001 // DMA Transfer Enable
  2616. #define USB_DMACTL0_EP_S 4
  2617. //*****************************************************************************
  2618. //
  2619. // The following are defines for the bit fields in the USB_O_DMAADDR0 register.
  2620. //
  2621. //*****************************************************************************
  2622. #define USB_DMAADDR0_ADDR_M 0xFFFFFFFC // DMA Address
  2623. #define USB_DMAADDR0_ADDR_S 2
  2624. //*****************************************************************************
  2625. //
  2626. // The following are defines for the bit fields in the USB_O_DMACOUNT0
  2627. // register.
  2628. //
  2629. //*****************************************************************************
  2630. #define USB_DMACOUNT0_COUNT_M 0xFFFFFFFC // DMA Count
  2631. #define USB_DMACOUNT0_COUNT_S 2
  2632. //*****************************************************************************
  2633. //
  2634. // The following are defines for the bit fields in the USB_O_DMACTL1 register.
  2635. //
  2636. //*****************************************************************************
  2637. #define USB_DMACTL1_BRSTM_M 0x00000600 // Burst Mode
  2638. #define USB_DMACTL1_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2639. #define USB_DMACTL1_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2640. #define USB_DMACTL1_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2641. // length
  2642. #define USB_DMACTL1_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2643. // unspecified length
  2644. #define USB_DMACTL1_ERR 0x00000100 // Bus Error Bit
  2645. #define USB_DMACTL1_EP_M 0x000000F0 // Endpoint number
  2646. #define USB_DMACTL1_IE 0x00000008 // DMA Interrupt Enable
  2647. #define USB_DMACTL1_MODE 0x00000004 // DMA Transfer Mode
  2648. #define USB_DMACTL1_DIR 0x00000002 // DMA Direction
  2649. #define USB_DMACTL1_ENABLE 0x00000001 // DMA Transfer Enable
  2650. #define USB_DMACTL1_EP_S 4
  2651. //*****************************************************************************
  2652. //
  2653. // The following are defines for the bit fields in the USB_O_DMAADDR1 register.
  2654. //
  2655. //*****************************************************************************
  2656. #define USB_DMAADDR1_ADDR_M 0xFFFFFFFC // DMA Address
  2657. #define USB_DMAADDR1_ADDR_S 2
  2658. //*****************************************************************************
  2659. //
  2660. // The following are defines for the bit fields in the USB_O_DMACOUNT1
  2661. // register.
  2662. //
  2663. //*****************************************************************************
  2664. #define USB_DMACOUNT1_COUNT_M 0xFFFFFFFC // DMA Count
  2665. #define USB_DMACOUNT1_COUNT_S 2
  2666. //*****************************************************************************
  2667. //
  2668. // The following are defines for the bit fields in the USB_O_DMACTL2 register.
  2669. //
  2670. //*****************************************************************************
  2671. #define USB_DMACTL2_BRSTM_M 0x00000600 // Burst Mode
  2672. #define USB_DMACTL2_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2673. #define USB_DMACTL2_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2674. #define USB_DMACTL2_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2675. // length
  2676. #define USB_DMACTL2_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2677. // unspecified length
  2678. #define USB_DMACTL2_ERR 0x00000100 // Bus Error Bit
  2679. #define USB_DMACTL2_EP_M 0x000000F0 // Endpoint number
  2680. #define USB_DMACTL2_IE 0x00000008 // DMA Interrupt Enable
  2681. #define USB_DMACTL2_MODE 0x00000004 // DMA Transfer Mode
  2682. #define USB_DMACTL2_DIR 0x00000002 // DMA Direction
  2683. #define USB_DMACTL2_ENABLE 0x00000001 // DMA Transfer Enable
  2684. #define USB_DMACTL2_EP_S 4
  2685. //*****************************************************************************
  2686. //
  2687. // The following are defines for the bit fields in the USB_O_DMAADDR2 register.
  2688. //
  2689. //*****************************************************************************
  2690. #define USB_DMAADDR2_ADDR_M 0xFFFFFFFC // DMA Address
  2691. #define USB_DMAADDR2_ADDR_S 2
  2692. //*****************************************************************************
  2693. //
  2694. // The following are defines for the bit fields in the USB_O_DMACOUNT2
  2695. // register.
  2696. //
  2697. //*****************************************************************************
  2698. #define USB_DMACOUNT2_COUNT_M 0xFFFFFFFC // DMA Count
  2699. #define USB_DMACOUNT2_COUNT_S 2
  2700. //*****************************************************************************
  2701. //
  2702. // The following are defines for the bit fields in the USB_O_DMACTL3 register.
  2703. //
  2704. //*****************************************************************************
  2705. #define USB_DMACTL3_BRSTM_M 0x00000600 // Burst Mode
  2706. #define USB_DMACTL3_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2707. #define USB_DMACTL3_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2708. #define USB_DMACTL3_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2709. // length
  2710. #define USB_DMACTL3_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2711. // unspecified length
  2712. #define USB_DMACTL3_ERR 0x00000100 // Bus Error Bit
  2713. #define USB_DMACTL3_EP_M 0x000000F0 // Endpoint number
  2714. #define USB_DMACTL3_IE 0x00000008 // DMA Interrupt Enable
  2715. #define USB_DMACTL3_MODE 0x00000004 // DMA Transfer Mode
  2716. #define USB_DMACTL3_DIR 0x00000002 // DMA Direction
  2717. #define USB_DMACTL3_ENABLE 0x00000001 // DMA Transfer Enable
  2718. #define USB_DMACTL3_EP_S 4
  2719. //*****************************************************************************
  2720. //
  2721. // The following are defines for the bit fields in the USB_O_DMAADDR3 register.
  2722. //
  2723. //*****************************************************************************
  2724. #define USB_DMAADDR3_ADDR_M 0xFFFFFFFC // DMA Address
  2725. #define USB_DMAADDR3_ADDR_S 2
  2726. //*****************************************************************************
  2727. //
  2728. // The following are defines for the bit fields in the USB_O_DMACOUNT3
  2729. // register.
  2730. //
  2731. //*****************************************************************************
  2732. #define USB_DMACOUNT3_COUNT_M 0xFFFFFFFC // DMA Count
  2733. #define USB_DMACOUNT3_COUNT_S 2
  2734. //*****************************************************************************
  2735. //
  2736. // The following are defines for the bit fields in the USB_O_DMACTL4 register.
  2737. //
  2738. //*****************************************************************************
  2739. #define USB_DMACTL4_BRSTM_M 0x00000600 // Burst Mode
  2740. #define USB_DMACTL4_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2741. #define USB_DMACTL4_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2742. #define USB_DMACTL4_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2743. // length
  2744. #define USB_DMACTL4_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2745. // unspecified length
  2746. #define USB_DMACTL4_ERR 0x00000100 // Bus Error Bit
  2747. #define USB_DMACTL4_EP_M 0x000000F0 // Endpoint number
  2748. #define USB_DMACTL4_IE 0x00000008 // DMA Interrupt Enable
  2749. #define USB_DMACTL4_MODE 0x00000004 // DMA Transfer Mode
  2750. #define USB_DMACTL4_DIR 0x00000002 // DMA Direction
  2751. #define USB_DMACTL4_ENABLE 0x00000001 // DMA Transfer Enable
  2752. #define USB_DMACTL4_EP_S 4
  2753. //*****************************************************************************
  2754. //
  2755. // The following are defines for the bit fields in the USB_O_DMAADDR4 register.
  2756. //
  2757. //*****************************************************************************
  2758. #define USB_DMAADDR4_ADDR_M 0xFFFFFFFC // DMA Address
  2759. #define USB_DMAADDR4_ADDR_S 2
  2760. //*****************************************************************************
  2761. //
  2762. // The following are defines for the bit fields in the USB_O_DMACOUNT4
  2763. // register.
  2764. //
  2765. //*****************************************************************************
  2766. #define USB_DMACOUNT4_COUNT_M 0xFFFFFFFC // DMA Count
  2767. #define USB_DMACOUNT4_COUNT_S 2
  2768. //*****************************************************************************
  2769. //
  2770. // The following are defines for the bit fields in the USB_O_DMACTL5 register.
  2771. //
  2772. //*****************************************************************************
  2773. #define USB_DMACTL5_BRSTM_M 0x00000600 // Burst Mode
  2774. #define USB_DMACTL5_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2775. #define USB_DMACTL5_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2776. #define USB_DMACTL5_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2777. // length
  2778. #define USB_DMACTL5_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2779. // unspecified length
  2780. #define USB_DMACTL5_ERR 0x00000100 // Bus Error Bit
  2781. #define USB_DMACTL5_EP_M 0x000000F0 // Endpoint number
  2782. #define USB_DMACTL5_IE 0x00000008 // DMA Interrupt Enable
  2783. #define USB_DMACTL5_MODE 0x00000004 // DMA Transfer Mode
  2784. #define USB_DMACTL5_DIR 0x00000002 // DMA Direction
  2785. #define USB_DMACTL5_ENABLE 0x00000001 // DMA Transfer Enable
  2786. #define USB_DMACTL5_EP_S 4
  2787. //*****************************************************************************
  2788. //
  2789. // The following are defines for the bit fields in the USB_O_DMAADDR5 register.
  2790. //
  2791. //*****************************************************************************
  2792. #define USB_DMAADDR5_ADDR_M 0xFFFFFFFC // DMA Address
  2793. #define USB_DMAADDR5_ADDR_S 2
  2794. //*****************************************************************************
  2795. //
  2796. // The following are defines for the bit fields in the USB_O_DMACOUNT5
  2797. // register.
  2798. //
  2799. //*****************************************************************************
  2800. #define USB_DMACOUNT5_COUNT_M 0xFFFFFFFC // DMA Count
  2801. #define USB_DMACOUNT5_COUNT_S 2
  2802. //*****************************************************************************
  2803. //
  2804. // The following are defines for the bit fields in the USB_O_DMACTL6 register.
  2805. //
  2806. //*****************************************************************************
  2807. #define USB_DMACTL6_BRSTM_M 0x00000600 // Burst Mode
  2808. #define USB_DMACTL6_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2809. #define USB_DMACTL6_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2810. #define USB_DMACTL6_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2811. // length
  2812. #define USB_DMACTL6_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2813. // unspecified length
  2814. #define USB_DMACTL6_ERR 0x00000100 // Bus Error Bit
  2815. #define USB_DMACTL6_EP_M 0x000000F0 // Endpoint number
  2816. #define USB_DMACTL6_IE 0x00000008 // DMA Interrupt Enable
  2817. #define USB_DMACTL6_MODE 0x00000004 // DMA Transfer Mode
  2818. #define USB_DMACTL6_DIR 0x00000002 // DMA Direction
  2819. #define USB_DMACTL6_ENABLE 0x00000001 // DMA Transfer Enable
  2820. #define USB_DMACTL6_EP_S 4
  2821. //*****************************************************************************
  2822. //
  2823. // The following are defines for the bit fields in the USB_O_DMAADDR6 register.
  2824. //
  2825. //*****************************************************************************
  2826. #define USB_DMAADDR6_ADDR_M 0xFFFFFFFC // DMA Address
  2827. #define USB_DMAADDR6_ADDR_S 2
  2828. //*****************************************************************************
  2829. //
  2830. // The following are defines for the bit fields in the USB_O_DMACOUNT6
  2831. // register.
  2832. //
  2833. //*****************************************************************************
  2834. #define USB_DMACOUNT6_COUNT_M 0xFFFFFFFC // DMA Count
  2835. #define USB_DMACOUNT6_COUNT_S 2
  2836. //*****************************************************************************
  2837. //
  2838. // The following are defines for the bit fields in the USB_O_DMACTL7 register.
  2839. //
  2840. //*****************************************************************************
  2841. #define USB_DMACTL7_BRSTM_M 0x00000600 // Burst Mode
  2842. #define USB_DMACTL7_BRSTM_ANY 0x00000000 // Bursts of unspecified length
  2843. #define USB_DMACTL7_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
  2844. #define USB_DMACTL7_BRSTM_INC8 0x00000400 // INCR8, INCR4 or unspecified
  2845. // length
  2846. #define USB_DMACTL7_BRSTM_INC16 0x00000600 // INCR16, INCR8, INCR4 or
  2847. // unspecified length
  2848. #define USB_DMACTL7_ERR 0x00000100 // Bus Error Bit
  2849. #define USB_DMACTL7_EP_M 0x000000F0 // Endpoint number
  2850. #define USB_DMACTL7_IE 0x00000008 // DMA Interrupt Enable
  2851. #define USB_DMACTL7_MODE 0x00000004 // DMA Transfer Mode
  2852. #define USB_DMACTL7_DIR 0x00000002 // DMA Direction
  2853. #define USB_DMACTL7_ENABLE 0x00000001 // DMA Transfer Enable
  2854. #define USB_DMACTL7_EP_S 4
  2855. //*****************************************************************************
  2856. //
  2857. // The following are defines for the bit fields in the USB_O_DMAADDR7 register.
  2858. //
  2859. //*****************************************************************************
  2860. #define USB_DMAADDR7_ADDR_M 0xFFFFFFFC // DMA Address
  2861. #define USB_DMAADDR7_ADDR_S 2
  2862. //*****************************************************************************
  2863. //
  2864. // The following are defines for the bit fields in the USB_O_DMACOUNT7
  2865. // register.
  2866. //
  2867. //*****************************************************************************
  2868. #define USB_DMACOUNT7_COUNT_M 0xFFFFFFFC // DMA Count
  2869. #define USB_DMACOUNT7_COUNT_S 2
  2870. //*****************************************************************************
  2871. //
  2872. // The following are defines for the bit fields in the USB_O_RQPKTCOUNT1
  2873. // register.
  2874. //
  2875. //*****************************************************************************
  2876. #define USB_RQPKTCOUNT1_M 0x0000FFFF // Block Transfer Packet Count
  2877. #define USB_RQPKTCOUNT1_S 0
  2878. //*****************************************************************************
  2879. //
  2880. // The following are defines for the bit fields in the USB_O_RQPKTCOUNT2
  2881. // register.
  2882. //
  2883. //*****************************************************************************
  2884. #define USB_RQPKTCOUNT2_M 0x0000FFFF // Block Transfer Packet Count
  2885. #define USB_RQPKTCOUNT2_S 0
  2886. //*****************************************************************************
  2887. //
  2888. // The following are defines for the bit fields in the USB_O_RQPKTCOUNT3
  2889. // register.
  2890. //
  2891. //*****************************************************************************
  2892. #define USB_RQPKTCOUNT3_M 0x0000FFFF // Block Transfer Packet Count
  2893. #define USB_RQPKTCOUNT3_S 0
  2894. //*****************************************************************************
  2895. //
  2896. // The following are defines for the bit fields in the USB_O_RQPKTCOUNT4
  2897. // register.
  2898. //
  2899. //*****************************************************************************
  2900. #define USB_RQPKTCOUNT4_COUNT_M 0x0000FFFF // Block Transfer Packet Count
  2901. #define USB_RQPKTCOUNT4_COUNT_S 0
  2902. //*****************************************************************************
  2903. //
  2904. // The following are defines for the bit fields in the USB_O_RQPKTCOUNT5
  2905. // register.
  2906. //
  2907. //*****************************************************************************
  2908. #define USB_RQPKTCOUNT5_COUNT_M 0x0000FFFF // Block Transfer Packet Count
  2909. #define USB_RQPKTCOUNT5_COUNT_S 0
  2910. //*****************************************************************************
  2911. //
  2912. // The following are defines for the bit fields in the USB_O_RQPKTCOUNT6
  2913. // register.
  2914. //
  2915. //*****************************************************************************
  2916. #define USB_RQPKTCOUNT6_COUNT_M 0x0000FFFF // Block Transfer Packet Count
  2917. #define USB_RQPKTCOUNT6_COUNT_S 0
  2918. //*****************************************************************************
  2919. //
  2920. // The following are defines for the bit fields in the USB_O_RQPKTCOUNT7
  2921. // register.
  2922. //
  2923. //*****************************************************************************
  2924. #define USB_RQPKTCOUNT7_COUNT_M 0x0000FFFF // Block Transfer Packet Count
  2925. #define USB_RQPKTCOUNT7_COUNT_S 0
  2926. //*****************************************************************************
  2927. //
  2928. // The following are defines for the bit fields in the USB_O_RXDPKTBUFDIS
  2929. // register.
  2930. //
  2931. //*****************************************************************************
  2932. #define USB_RXDPKTBUFDIS_EP7 0x00000080 // EP7 RX Double-Packet Buffer
  2933. // Disable
  2934. #define USB_RXDPKTBUFDIS_EP6 0x00000040 // EP6 RX Double-Packet Buffer
  2935. // Disable
  2936. #define USB_RXDPKTBUFDIS_EP5 0x00000020 // EP5 RX Double-Packet Buffer
  2937. // Disable
  2938. #define USB_RXDPKTBUFDIS_EP4 0x00000010 // EP4 RX Double-Packet Buffer
  2939. // Disable
  2940. #define USB_RXDPKTBUFDIS_EP3 0x00000008 // EP3 RX Double-Packet Buffer
  2941. // Disable
  2942. #define USB_RXDPKTBUFDIS_EP2 0x00000004 // EP2 RX Double-Packet Buffer
  2943. // Disable
  2944. #define USB_RXDPKTBUFDIS_EP1 0x00000002 // EP1 RX Double-Packet Buffer
  2945. // Disable
  2946. //*****************************************************************************
  2947. //
  2948. // The following are defines for the bit fields in the USB_O_TXDPKTBUFDIS
  2949. // register.
  2950. //
  2951. //*****************************************************************************
  2952. #define USB_TXDPKTBUFDIS_EP7 0x00000080 // EP7 TX Double-Packet Buffer
  2953. // Disable
  2954. #define USB_TXDPKTBUFDIS_EP6 0x00000040 // EP6 TX Double-Packet Buffer
  2955. // Disable
  2956. #define USB_TXDPKTBUFDIS_EP5 0x00000020 // EP5 TX Double-Packet Buffer
  2957. // Disable
  2958. #define USB_TXDPKTBUFDIS_EP4 0x00000010 // EP4 TX Double-Packet Buffer
  2959. // Disable
  2960. #define USB_TXDPKTBUFDIS_EP3 0x00000008 // EP3 TX Double-Packet Buffer
  2961. // Disable
  2962. #define USB_TXDPKTBUFDIS_EP2 0x00000004 // EP2 TX Double-Packet Buffer
  2963. // Disable
  2964. #define USB_TXDPKTBUFDIS_EP1 0x00000002 // EP1 TX Double-Packet Buffer
  2965. // Disable
  2966. //*****************************************************************************
  2967. //
  2968. // The following are defines for the bit fields in the USB_O_CTO register.
  2969. //
  2970. //*****************************************************************************
  2971. #define USB_CTO_CCTV_M 0x0000FFFF // Configurable Chirp Timeout Value
  2972. #define USB_CTO_CCTV_S 0
  2973. //*****************************************************************************
  2974. //
  2975. // The following are defines for the bit fields in the USB_O_HHSRTN register.
  2976. //
  2977. //*****************************************************************************
  2978. #define USB_HHSRTN_HHSRTN_M 0x0000FFFF // HIgh Speed to UTM Operating
  2979. // Delay
  2980. #define USB_HHSRTN_HHSRTN_S 0
  2981. //*****************************************************************************
  2982. //
  2983. // The following are defines for the bit fields in the USB_O_HSBT register.
  2984. //
  2985. //*****************************************************************************
  2986. #define USB_HSBT_HSBT_M 0x0000000F // High Speed Timeout Adder
  2987. #define USB_HSBT_HSBT_S 0
  2988. //*****************************************************************************
  2989. //
  2990. // The following are defines for the bit fields in the USB_O_LPMATTR register.
  2991. //
  2992. //*****************************************************************************
  2993. #define USB_LPMATTR_ENDPT_M 0x0000F000 // Endpoint
  2994. #define USB_LPMATTR_RMTWAK 0x00000100 // Remote Wake
  2995. #define USB_LPMATTR_HIRD_M 0x000000F0 // Host Initiated Resume Duration
  2996. #define USB_LPMATTR_LS_M 0x0000000F // Link State
  2997. #define USB_LPMATTR_LS_L1 0x00000001 // Sleep State (L1)
  2998. #define USB_LPMATTR_ENDPT_S 12
  2999. #define USB_LPMATTR_HIRD_S 4
  3000. //*****************************************************************************
  3001. //
  3002. // The following are defines for the bit fields in the USB_O_LPMCNTRL register.
  3003. //
  3004. //*****************************************************************************
  3005. #define USB_LPMCNTRL_NAK 0x00000010 // LPM NAK
  3006. #define USB_LPMCNTRL_EN_M 0x0000000C // LPM Enable
  3007. #define USB_LPMCNTRL_EN_NONE 0x00000000 // LPM and Extended transactions
  3008. // are not supported. In this case,
  3009. // the USB does not respond to LPM
  3010. // transactions and LPM
  3011. // transactions cause a timeout
  3012. #define USB_LPMCNTRL_EN_EXT 0x00000004 // LPM is not supported but
  3013. // extended transactions are
  3014. // supported. In this case, the USB
  3015. // does respond to an LPM
  3016. // transaction with a STALL
  3017. #define USB_LPMCNTRL_EN_LPMEXT 0x0000000C // The USB supports LPM extended
  3018. // transactions. In this case, the
  3019. // USB responds with a NYET or an
  3020. // ACK as determined by the value
  3021. // of TXLPM and other conditions
  3022. #define USB_LPMCNTRL_RES 0x00000002 // LPM Resume
  3023. #define USB_LPMCNTRL_TXLPM 0x00000001 // Transmit LPM Transaction Enable
  3024. //*****************************************************************************
  3025. //
  3026. // The following are defines for the bit fields in the USB_O_LPMIM register.
  3027. //
  3028. //*****************************************************************************
  3029. #define USB_LPMIM_ERR 0x00000020 // LPM Error Interrupt Mask
  3030. #define USB_LPMIM_RES 0x00000010 // LPM Resume Interrupt Mask
  3031. #define USB_LPMIM_NC 0x00000008 // LPM NC Interrupt Mask
  3032. #define USB_LPMIM_ACK 0x00000004 // LPM ACK Interrupt Mask
  3033. #define USB_LPMIM_NY 0x00000002 // LPM NY Interrupt Mask
  3034. #define USB_LPMIM_STALL 0x00000001 // LPM STALL Interrupt Mask
  3035. //*****************************************************************************
  3036. //
  3037. // The following are defines for the bit fields in the USB_O_LPMRIS register.
  3038. //
  3039. //*****************************************************************************
  3040. #define USB_LPMRIS_ERR 0x00000020 // LPM Interrupt Status
  3041. #define USB_LPMRIS_RES 0x00000010 // LPM Resume Interrupt Status
  3042. #define USB_LPMRIS_NC 0x00000008 // LPM NC Interrupt Status
  3043. #define USB_LPMRIS_ACK 0x00000004 // LPM ACK Interrupt Status
  3044. #define USB_LPMRIS_NY 0x00000002 // LPM NY Interrupt Status
  3045. #define USB_LPMRIS_LPMST 0x00000001 // LPM STALL Interrupt Status
  3046. //*****************************************************************************
  3047. //
  3048. // The following are defines for the bit fields in the USB_O_LPMFADDR register.
  3049. //
  3050. //*****************************************************************************
  3051. #define USB_LPMFADDR_ADDR_M 0x0000007F // LPM Function Address
  3052. #define USB_LPMFADDR_ADDR_S 0
  3053. //*****************************************************************************
  3054. //
  3055. // The following are defines for the bit fields in the USB_O_EPC register.
  3056. //
  3057. //*****************************************************************************
  3058. #define USB_EPC_PFLTACT_M 0x00000300 // Power Fault Action
  3059. #define USB_EPC_PFLTACT_UNCHG 0x00000000 // Unchanged
  3060. #define USB_EPC_PFLTACT_TRIS 0x00000100 // Tristate
  3061. #define USB_EPC_PFLTACT_LOW 0x00000200 // Low
  3062. #define USB_EPC_PFLTACT_HIGH 0x00000300 // High
  3063. #define USB_EPC_PFLTAEN 0x00000040 // Power Fault Action Enable
  3064. #define USB_EPC_PFLTSEN_HIGH 0x00000020 // Power Fault Sense
  3065. #define USB_EPC_PFLTEN 0x00000010 // Power Fault Input Enable
  3066. #define USB_EPC_EPENDE 0x00000004 // EPEN Drive Enable
  3067. #define USB_EPC_EPEN_M 0x00000003 // External Power Supply Enable
  3068. // Configuration
  3069. #define USB_EPC_EPEN_LOW 0x00000000 // Power Enable Active Low
  3070. #define USB_EPC_EPEN_HIGH 0x00000001 // Power Enable Active High
  3071. #define USB_EPC_EPEN_VBLOW 0x00000002 // Power Enable High if VBUS Low
  3072. // (OTG only)
  3073. #define USB_EPC_EPEN_VBHIGH 0x00000003 // Power Enable High if VBUS High
  3074. // (OTG only)
  3075. //*****************************************************************************
  3076. //
  3077. // The following are defines for the bit fields in the USB_O_EPCRIS register.
  3078. //
  3079. //*****************************************************************************
  3080. #define USB_EPCRIS_PF 0x00000001 // USB Power Fault Interrupt Status
  3081. //*****************************************************************************
  3082. //
  3083. // The following are defines for the bit fields in the USB_O_EPCIM register.
  3084. //
  3085. //*****************************************************************************
  3086. #define USB_EPCIM_PF 0x00000001 // USB Power Fault Interrupt Mask
  3087. //*****************************************************************************
  3088. //
  3089. // The following are defines for the bit fields in the USB_O_EPCISC register.
  3090. //
  3091. //*****************************************************************************
  3092. #define USB_EPCISC_PF 0x00000001 // USB Power Fault Interrupt Status
  3093. // and Clear
  3094. //*****************************************************************************
  3095. //
  3096. // The following are defines for the bit fields in the USB_O_DRRIS register.
  3097. //
  3098. //*****************************************************************************
  3099. #define USB_DRRIS_RESUME 0x00000001 // RESUME Interrupt Status
  3100. //*****************************************************************************
  3101. //
  3102. // The following are defines for the bit fields in the USB_O_DRIM register.
  3103. //
  3104. //*****************************************************************************
  3105. #define USB_DRIM_RESUME 0x00000001 // RESUME Interrupt Mask
  3106. //*****************************************************************************
  3107. //
  3108. // The following are defines for the bit fields in the USB_O_DRISC register.
  3109. //
  3110. //*****************************************************************************
  3111. #define USB_DRISC_RESUME 0x00000001 // RESUME Interrupt Status and
  3112. // Clear
  3113. //*****************************************************************************
  3114. //
  3115. // The following are defines for the bit fields in the USB_O_GPCS register.
  3116. //
  3117. //*****************************************************************************
  3118. #define USB_GPCS_DEVMOD_M 0x00000007 // Device Mode
  3119. #define USB_GPCS_DEVMOD_OTG 0x00000000 // Use USB0VBUS and USB0ID pin
  3120. #define USB_GPCS_DEVMOD_HOST 0x00000002 // Force USB0VBUS and USB0ID low
  3121. #define USB_GPCS_DEVMOD_DEV 0x00000003 // Force USB0VBUS and USB0ID high
  3122. #define USB_GPCS_DEVMOD_HOSTVBUS \
  3123. 0x00000004 // Use USB0VBUS and force USB0ID
  3124. // low
  3125. #define USB_GPCS_DEVMOD_DEVVBUS 0x00000005 // Use USB0VBUS and force USB0ID
  3126. // high
  3127. #define USB_GPCS_DEVMODOTG 0x00000002 // Enable Device Mode
  3128. #define USB_GPCS_DEVMOD 0x00000001 // Device Mode
  3129. //*****************************************************************************
  3130. //
  3131. // The following are defines for the bit fields in the USB_O_VDC register.
  3132. //
  3133. //*****************************************************************************
  3134. #define USB_VDC_VBDEN 0x00000001 // VBUS Droop Enable
  3135. //*****************************************************************************
  3136. //
  3137. // The following are defines for the bit fields in the USB_O_VDCRIS register.
  3138. //
  3139. //*****************************************************************************
  3140. #define USB_VDCRIS_VD 0x00000001 // VBUS Droop Raw Interrupt Status
  3141. //*****************************************************************************
  3142. //
  3143. // The following are defines for the bit fields in the USB_O_VDCIM register.
  3144. //
  3145. //*****************************************************************************
  3146. #define USB_VDCIM_VD 0x00000001 // VBUS Droop Interrupt Mask
  3147. //*****************************************************************************
  3148. //
  3149. // The following are defines for the bit fields in the USB_O_VDCISC register.
  3150. //
  3151. //*****************************************************************************
  3152. #define USB_VDCISC_VD 0x00000001 // VBUS Droop Interrupt Status and
  3153. // Clear
  3154. //*****************************************************************************
  3155. //
  3156. // The following are defines for the bit fields in the USB_O_IDVRIS register.
  3157. //
  3158. //*****************************************************************************
  3159. #define USB_IDVRIS_ID 0x00000001 // ID Valid Detect Raw Interrupt
  3160. // Status
  3161. //*****************************************************************************
  3162. //
  3163. // The following are defines for the bit fields in the USB_O_IDVIM register.
  3164. //
  3165. //*****************************************************************************
  3166. #define USB_IDVIM_ID 0x00000001 // ID Valid Detect Interrupt Mask
  3167. //*****************************************************************************
  3168. //
  3169. // The following are defines for the bit fields in the USB_O_IDVISC register.
  3170. //
  3171. //*****************************************************************************
  3172. #define USB_IDVISC_ID 0x00000001 // ID Valid Detect Interrupt Status
  3173. // and Clear
  3174. //*****************************************************************************
  3175. //
  3176. // The following are defines for the bit fields in the USB_O_PP register.
  3177. //
  3178. //*****************************************************************************
  3179. #define USB_PP_ECNT_M 0x0000FF00 // Endpoint Count
  3180. #define USB_PP_USB_M 0x000000C0 // USB Capability
  3181. #define USB_PP_USB_DEVICE 0x00000040 // DEVICE
  3182. #define USB_PP_USB_HOSTDEVICE 0x00000080 // HOST
  3183. #define USB_PP_USB_OTG 0x000000C0 // OTG
  3184. #define USB_PP_ULPI 0x00000020 // ULPI Present
  3185. #define USB_PP_PHY 0x00000010 // PHY Present
  3186. #define USB_PP_ECNT_S 8
  3187. //*****************************************************************************
  3188. //
  3189. // The following are defines for the bit fields in the USB_O_PC register.
  3190. //
  3191. //*****************************************************************************
  3192. #define USB_PC_ULPIEN 0x00010000 // ULPI Enable
  3193. //*****************************************************************************
  3194. //
  3195. // The following are defines for the bit fields in the USB_O_CC register.
  3196. //
  3197. //*****************************************************************************
  3198. #define USB_CC_CLKEN 0x00000200 // USB Clock Enable
  3199. #define USB_CC_CSD 0x00000100 // Clock Source/Direction
  3200. #define USB_CC_CLKDIV_M 0x0000000F // PLL Clock Divisor
  3201. #define USB_CC_CLKDIV_S 0
  3202. //*****************************************************************************
  3203. //
  3204. // The following are values that can be passed to USBIntEnableControl() and
  3205. // USBIntDisableControl() as the ui32Flags parameter, and are returned from
  3206. // USBIntStatusControl().
  3207. //
  3208. //*****************************************************************************
  3209. #define USB_INTCTRL_ALL 0x000003FF // All control interrupt sources
  3210. #define USB_INTCTRL_STATUS 0x000000FF // Status Interrupts
  3211. #define USB_INTCTRL_VBUS_ERR 0x00000080 // VBUS Error
  3212. #define USB_INTCTRL_SESSION 0x00000040 // Session Start Detected
  3213. #define USB_INTCTRL_SESSION_END 0x00000040 // Session End Detected
  3214. #define USB_INTCTRL_DISCONNECT 0x00000020 // Disconnect Detected
  3215. #define USB_INTCTRL_CONNECT 0x00000010 // Device Connect Detected
  3216. #define USB_INTCTRL_SOF 0x00000008 // Start of Frame Detected
  3217. #define USB_INTCTRL_BABBLE 0x00000004 // Babble signaled
  3218. #define USB_INTCTRL_RESET 0x00000004 // Reset signaled
  3219. #define USB_INTCTRL_RESUME 0x00000002 // Resume detected
  3220. #define USB_INTCTRL_SUSPEND 0x00000001 // Suspend detected
  3221. #define USB_INTCTRL_MODE_DETECT 0x00000200 // Mode value valid
  3222. #define USB_INTCTRL_POWER_FAULT 0x00000100 // Power Fault detected
  3223. //*****************************************************************************
  3224. //
  3225. // The following are values that can be passed to USBIntEnableEndpoint() and
  3226. // USBIntDisableEndpoint() as the ui32Flags parameter, and are returned from
  3227. // USBIntStatusEndpoint().
  3228. //
  3229. //*****************************************************************************
  3230. #define USB_INTEP_ALL 0xFFFFFFFF // Host IN Interrupts
  3231. #define USB_INTEP_HOST_IN 0xFFFE0000 // Host IN Interrupts
  3232. #define USB_INTEP_HOST_IN_15 0x80000000 // Endpoint 15 Host IN Interrupt
  3233. #define USB_INTEP_HOST_IN_14 0x40000000 // Endpoint 14 Host IN Interrupt
  3234. #define USB_INTEP_HOST_IN_13 0x20000000 // Endpoint 13 Host IN Interrupt
  3235. #define USB_INTEP_HOST_IN_12 0x10000000 // Endpoint 12 Host IN Interrupt
  3236. #define USB_INTEP_HOST_IN_11 0x08000000 // Endpoint 11 Host IN Interrupt
  3237. #define USB_INTEP_HOST_IN_10 0x04000000 // Endpoint 10 Host IN Interrupt
  3238. #define USB_INTEP_HOST_IN_9 0x02000000 // Endpoint 9 Host IN Interrupt
  3239. #define USB_INTEP_HOST_IN_8 0x01000000 // Endpoint 8 Host IN Interrupt
  3240. #define USB_INTEP_HOST_IN_7 0x00800000 // Endpoint 7 Host IN Interrupt
  3241. #define USB_INTEP_HOST_IN_6 0x00400000 // Endpoint 6 Host IN Interrupt
  3242. #define USB_INTEP_HOST_IN_5 0x00200000 // Endpoint 5 Host IN Interrupt
  3243. #define USB_INTEP_HOST_IN_4 0x00100000 // Endpoint 4 Host IN Interrupt
  3244. #define USB_INTEP_HOST_IN_3 0x00080000 // Endpoint 3 Host IN Interrupt
  3245. #define USB_INTEP_HOST_IN_2 0x00040000 // Endpoint 2 Host IN Interrupt
  3246. #define USB_INTEP_HOST_IN_1 0x00020000 // Endpoint 1 Host IN Interrupt
  3247. #define USB_INTEP_DEV_OUT 0xFFFE0000 // Device OUT Interrupts
  3248. #define USB_INTEP_DEV_OUT_15 0x80000000 // Endpoint 15 Device OUT Interrupt
  3249. #define USB_INTEP_DEV_OUT_14 0x40000000 // Endpoint 14 Device OUT Interrupt
  3250. #define USB_INTEP_DEV_OUT_13 0x20000000 // Endpoint 13 Device OUT Interrupt
  3251. #define USB_INTEP_DEV_OUT_12 0x10000000 // Endpoint 12 Device OUT Interrupt
  3252. #define USB_INTEP_DEV_OUT_11 0x08000000 // Endpoint 11 Device OUT Interrupt
  3253. #define USB_INTEP_DEV_OUT_10 0x04000000 // Endpoint 10 Device OUT Interrupt
  3254. #define USB_INTEP_DEV_OUT_9 0x02000000 // Endpoint 9 Device OUT Interrupt
  3255. #define USB_INTEP_DEV_OUT_8 0x01000000 // Endpoint 8 Device OUT Interrupt
  3256. #define USB_INTEP_DEV_OUT_7 0x00800000 // Endpoint 7 Device OUT Interrupt
  3257. #define USB_INTEP_DEV_OUT_6 0x00400000 // Endpoint 6 Device OUT Interrupt
  3258. #define USB_INTEP_DEV_OUT_5 0x00200000 // Endpoint 5 Device OUT Interrupt
  3259. #define USB_INTEP_DEV_OUT_4 0x00100000 // Endpoint 4 Device OUT Interrupt
  3260. #define USB_INTEP_DEV_OUT_3 0x00080000 // Endpoint 3 Device OUT Interrupt
  3261. #define USB_INTEP_DEV_OUT_2 0x00040000 // Endpoint 2 Device OUT Interrupt
  3262. #define USB_INTEP_DEV_OUT_1 0x00020000 // Endpoint 1 Device OUT Interrupt
  3263. #define USB_INTEP_HOST_OUT 0x0000FFFE // Host OUT Interrupts
  3264. #define USB_INTEP_HOST_OUT_15 0x00008000 // Endpoint 15 Host OUT Interrupt
  3265. #define USB_INTEP_HOST_OUT_14 0x00004000 // Endpoint 14 Host OUT Interrupt
  3266. #define USB_INTEP_HOST_OUT_13 0x00002000 // Endpoint 13 Host OUT Interrupt
  3267. #define USB_INTEP_HOST_OUT_12 0x00001000 // Endpoint 12 Host OUT Interrupt
  3268. #define USB_INTEP_HOST_OUT_11 0x00000800 // Endpoint 11 Host OUT Interrupt
  3269. #define USB_INTEP_HOST_OUT_10 0x00000400 // Endpoint 10 Host OUT Interrupt
  3270. #define USB_INTEP_HOST_OUT_9 0x00000200 // Endpoint 9 Host OUT Interrupt
  3271. #define USB_INTEP_HOST_OUT_8 0x00000100 // Endpoint 8 Host OUT Interrupt
  3272. #define USB_INTEP_HOST_OUT_7 0x00000080 // Endpoint 7 Host OUT Interrupt
  3273. #define USB_INTEP_HOST_OUT_6 0x00000040 // Endpoint 6 Host OUT Interrupt
  3274. #define USB_INTEP_HOST_OUT_5 0x00000020 // Endpoint 5 Host OUT Interrupt
  3275. #define USB_INTEP_HOST_OUT_4 0x00000010 // Endpoint 4 Host OUT Interrupt
  3276. #define USB_INTEP_HOST_OUT_3 0x00000008 // Endpoint 3 Host OUT Interrupt
  3277. #define USB_INTEP_HOST_OUT_2 0x00000004 // Endpoint 2 Host OUT Interrupt
  3278. #define USB_INTEP_HOST_OUT_1 0x00000002 // Endpoint 1 Host OUT Interrupt
  3279. #define USB_INTEP_DEV_IN 0x0000FFFE // Device IN Interrupts
  3280. #define USB_INTEP_DEV_IN_15 0x00008000 // Endpoint 15 Device IN Interrupt
  3281. #define USB_INTEP_DEV_IN_14 0x00004000 // Endpoint 14 Device IN Interrupt
  3282. #define USB_INTEP_DEV_IN_13 0x00002000 // Endpoint 13 Device IN Interrupt
  3283. #define USB_INTEP_DEV_IN_12 0x00001000 // Endpoint 12 Device IN Interrupt
  3284. #define USB_INTEP_DEV_IN_11 0x00000800 // Endpoint 11 Device IN Interrupt
  3285. #define USB_INTEP_DEV_IN_10 0x00000400 // Endpoint 10 Device IN Interrupt
  3286. #define USB_INTEP_DEV_IN_9 0x00000200 // Endpoint 9 Device IN Interrupt
  3287. #define USB_INTEP_DEV_IN_8 0x00000100 // Endpoint 8 Device IN Interrupt
  3288. #define USB_INTEP_DEV_IN_7 0x00000080 // Endpoint 7 Device IN Interrupt
  3289. #define USB_INTEP_DEV_IN_6 0x00000040 // Endpoint 6 Device IN Interrupt
  3290. #define USB_INTEP_DEV_IN_5 0x00000020 // Endpoint 5 Device IN Interrupt
  3291. #define USB_INTEP_DEV_IN_4 0x00000010 // Endpoint 4 Device IN Interrupt
  3292. #define USB_INTEP_DEV_IN_3 0x00000008 // Endpoint 3 Device IN Interrupt
  3293. #define USB_INTEP_DEV_IN_2 0x00000004 // Endpoint 2 Device IN Interrupt
  3294. #define USB_INTEP_DEV_IN_1 0x00000002 // Endpoint 1 Device IN Interrupt
  3295. #define USB_INTEP_0 0x00000001 // Endpoint 0 Interrupt
  3296. //*****************************************************************************
  3297. //
  3298. // The following are values that are returned from USBSpeedGet().
  3299. //
  3300. //*****************************************************************************
  3301. #define USB_UNDEF_SPEED 0x80000000 // Current speed is undefined
  3302. #define USB_HIGH_SPEED 0x00000002 // Current speed is High Speed
  3303. #define USB_FULL_SPEED 0x00000001 // Current speed is Full Speed
  3304. #define USB_LOW_SPEED 0x00000000 // Current speed is Low Speed
  3305. //*****************************************************************************
  3306. //
  3307. // The following are values that are returned from USBEndpointStatus(). The
  3308. // USB_HOST_* values are used when the USB controller is in host mode and the
  3309. // USB_DEV_* values are used when the USB controller is in device mode.
  3310. //
  3311. //*****************************************************************************
  3312. #define USB_HOST_IN_STATUS 0x114F0000 // Mask of all host IN interrupts
  3313. #define USB_HOST_IN_PID_ERROR 0x10000000 // Stall on this endpoint received
  3314. #define USB_HOST_IN_NOT_COMP 0x01000000 // Device failed to respond
  3315. #define USB_HOST_IN_STALL 0x00400000 // Stall on this endpoint received
  3316. #define USB_HOST_IN_DATA_ERROR 0x00080000 // CRC or bit-stuff error
  3317. // (ISOC Mode)
  3318. #define USB_HOST_IN_NAK_TO 0x00080000 // NAK received for more than the
  3319. // specified timeout period
  3320. #define USB_HOST_IN_ERROR 0x00040000 // Failed to communicate with a
  3321. // device
  3322. #define USB_HOST_IN_FIFO_FULL 0x00020000 // RX FIFO full
  3323. #define USB_HOST_IN_PKTRDY 0x00010000 // Data packet ready
  3324. #define USB_HOST_OUT_STATUS 0x000000A7 // Mask of all host OUT interrupts
  3325. #define USB_HOST_OUT_NAK_TO 0x00000080 // NAK received for more than the
  3326. // specified timeout period
  3327. #define USB_HOST_OUT_NOT_COMP 0x00000080 // No response from device
  3328. // (ISOC mode)
  3329. #define USB_HOST_OUT_STALL 0x00000020 // Stall on this endpoint received
  3330. #define USB_HOST_OUT_ERROR 0x00000004 // Failed to communicate with a
  3331. // device
  3332. #define USB_HOST_OUT_FIFO_NE 0x00000002 // TX FIFO is not empty
  3333. #define USB_HOST_OUT_PKTPEND 0x00000001 // Transmit still being transmitted
  3334. #define USB_HOST_EP0_NAK_TO 0x00000080 // NAK received for more than the
  3335. // specified timeout period
  3336. #define USB_HOST_EP0_STATUS 0x00000040 // This was a status packet
  3337. #define USB_HOST_EP0_ERROR 0x00000010 // Failed to communicate with a
  3338. // device
  3339. #define USB_HOST_EP0_RX_STALL 0x00000004 // Stall on this endpoint received
  3340. #define USB_HOST_EP0_RXPKTRDY 0x00000001 // Receive data packet ready
  3341. #define USB_DEV_RX_PID_ERROR 0x01000000 // PID error in isochronous
  3342. // transfer
  3343. #define USB_DEV_RX_SENT_STALL 0x00400000 // Stall was sent on this endpoint
  3344. #define USB_DEV_RX_DATA_ERROR 0x00080000 // CRC error on the data
  3345. #define USB_DEV_RX_OVERRUN 0x00040000 // OUT packet was not loaded due to
  3346. // a full FIFO
  3347. #define USB_DEV_RX_FIFO_FULL 0x00020000 // RX FIFO full
  3348. #define USB_DEV_RX_PKT_RDY 0x00010000 // Data packet ready
  3349. #define USB_DEV_TX_NOT_COMP 0x00000080 // Large packet split up, more data
  3350. // to come
  3351. #define USB_DEV_TX_SENT_STALL 0x00000020 // Stall was sent on this endpoint
  3352. #define USB_DEV_TX_UNDERRUN 0x00000004 // IN received with no data ready
  3353. #define USB_DEV_TX_FIFO_NE 0x00000002 // The TX FIFO is not empty
  3354. #define USB_DEV_TX_TXPKTRDY 0x00000001 // Transmit still being transmitted
  3355. #define USB_DEV_EP0_SETUP_END 0x00000010 // Control transaction ended before
  3356. // Data End seen
  3357. #define USB_DEV_EP0_SENT_STALL 0x00000004 // Stall was sent on this endpoint
  3358. #define USB_DEV_EP0_IN_PKTPEND 0x00000002 // Transmit data packet pending
  3359. #define USB_DEV_EP0_OUT_PKTRDY 0x00000001 // Receive data packet ready
  3360. //*****************************************************************************
  3361. //
  3362. // The following are values that can be passed to USBHostEndpointConfig() and
  3363. // USBDevEndpointConfigSet() as the ui32Flags parameter.
  3364. //
  3365. //*****************************************************************************
  3366. #define USB_EP_AUTO_SET 0x00000001 // Auto set feature enabled
  3367. #define USB_EP_AUTO_REQUEST 0x00000002 // Auto request feature enabled
  3368. #define USB_EP_AUTO_CLEAR 0x00000004 // Auto clear feature enabled
  3369. #define USB_EP_DMA_MODE_0 0x00000008 // Enable DMA access using mode 0
  3370. #define USB_EP_DMA_MODE_1 0x00000010 // Enable DMA access using mode 1
  3371. #define USB_EP_DIS_NYET 0x00000020 // Disable NYET response for
  3372. // high-speed Bulk and Interrupt
  3373. // endpoints in device mode.
  3374. #define USB_EP_MODE_ISOC 0x00000000 // Isochronous endpoint
  3375. #define USB_EP_MODE_BULK 0x00000100 // Bulk endpoint
  3376. #define USB_EP_MODE_INT 0x00000200 // Interrupt endpoint
  3377. #define USB_EP_MODE_CTRL 0x00000300 // Control endpoint
  3378. #define USB_EP_MODE_MASK 0x00000300 // Mode Mask
  3379. #define USB_EP_SPEED_LOW 0x00000000 // Low Speed
  3380. #define USB_EP_SPEED_FULL 0x00001000 // Full Speed
  3381. #define USB_EP_SPEED_HIGH 0x00004000 // High Speed
  3382. #define USB_EP_HOST_IN 0x00000000 // Host IN endpoint
  3383. #define USB_EP_HOST_OUT 0x00002000 // Host OUT endpoint
  3384. #define USB_EP_DEV_IN 0x00002000 // Device IN endpoint
  3385. #define USB_EP_DEV_OUT 0x00000000 // Device OUT endpoint
  3386. //*****************************************************************************
  3387. //
  3388. // The following are values that can be passed to USBHostPwrConfig() as the
  3389. // ui32Flags parameter.
  3390. //
  3391. //*****************************************************************************
  3392. #define USB_HOST_PWRFLT_LOW 0x00000010
  3393. #define USB_HOST_PWRFLT_HIGH 0x00000030
  3394. #define USB_HOST_PWRFLT_EP_NONE 0x00000000
  3395. #define USB_HOST_PWRFLT_EP_TRI 0x00000140
  3396. #define USB_HOST_PWRFLT_EP_LOW 0x00000240
  3397. #define USB_HOST_PWRFLT_EP_HIGH 0x00000340
  3398. #define USB_HOST_PWREN_MAN_LOW 0x00000000
  3399. #define USB_HOST_PWREN_MAN_HIGH 0x00000001
  3400. #define USB_HOST_PWREN_AUTOLOW 0x00000002
  3401. #define USB_HOST_PWREN_AUTOHIGH 0x00000003
  3402. #define USB_HOST_PWREN_FILTER 0x00010000
  3403. //*****************************************************************************
  3404. //
  3405. // The following are the valid values that can be passed to the
  3406. // USBHostLPMConfig() function in the ui32Config parameter.
  3407. //
  3408. //*****************************************************************************
  3409. #define USB_HOST_LPM_RMTWAKE 0x00000100
  3410. #define USB_HOST_LPM_L1 0x00000001
  3411. //*****************************************************************************
  3412. //
  3413. // The following are the valid values that can be passed to the
  3414. // USBDevLPMConfig() function in the ui32Config parameter.
  3415. //
  3416. //*****************************************************************************
  3417. #define USB_DEV_LPM_NAK 0x00000010
  3418. #define USB_DEV_LPM_NONE 0x00000000
  3419. #define USB_DEV_LPM_EN 0x0000000c
  3420. #define USB_DEV_LPM_EXTONLY 0x00000004
  3421. //*****************************************************************************
  3422. //
  3423. // The following are the valid values that are returned from the
  3424. // USBLPMLinkStateGet() function.
  3425. //
  3426. //*****************************************************************************
  3427. #define USB_DEV_LPM_LS_RMTWAKE 0x00000100
  3428. #define USB_DEV_LPM_LS_L1 0x00000001
  3429. //*****************************************************************************
  3430. //
  3431. // The following are the valid values that are passed to the USBLPMIntEnable()
  3432. // or USBLPMIntDisable() functions or are returned from the USBLPMIntStatus()
  3433. // function.
  3434. //
  3435. //*****************************************************************************
  3436. #define USB_INTLPM_ERROR 0x00000020
  3437. #define USB_INTLPM_RESUME 0x00000010
  3438. #define USB_INTLPM_INCOMPLETE 0x00000008
  3439. #define USB_INTLPM_ACK 0x00000004
  3440. #define USB_INTLPM_NYET 0x00000002
  3441. #define USB_INTLPM_STALL 0x00000001
  3442. //*****************************************************************************
  3443. //
  3444. // The following are the valid values that are passed to the USBClockEnable()
  3445. // functions.
  3446. //
  3447. //*****************************************************************************
  3448. #define USB_CLOCK_INTERNAL 0x00000200
  3449. #define USB_CLOCK_EXTERNAL 0x00000300
  3450. //*****************************************************************************
  3451. //
  3452. // The configuration options used with the USBULPIConfig() API.
  3453. //
  3454. //*****************************************************************************
  3455. #define USB_ULPI_EXTVBUS 0x00000001
  3456. #define USB_ULPI_EXTVBUS_IND 0x00000002
  3457. //*****************************************************************************
  3458. //
  3459. // The following are special values that can be passed to
  3460. // USBHostEndpointConfig() as the ui32NAKPollInterval parameter.
  3461. //
  3462. //*****************************************************************************
  3463. #define MAX_NAK_LIMIT 31 // Maximum NAK interval
  3464. #define DISABLE_NAK_LIMIT 0 // No NAK timeouts
  3465. //*****************************************************************************
  3466. //
  3467. // This value specifies the maximum size of transfers on endpoint 0 as 64
  3468. // bytes. This value is fixed in hardware as the FIFO size for endpoint 0.
  3469. //
  3470. //*****************************************************************************
  3471. #define MAX_PACKET_SIZE_EP0 64
  3472. //*****************************************************************************
  3473. //
  3474. // These values are used to indicate which endpoint to access.
  3475. //
  3476. //*****************************************************************************
  3477. #define USB_EP_0 0x00000000 // Endpoint 0
  3478. #define USB_EP_1 0x00000010 // Endpoint 1
  3479. #define USB_EP_2 0x00000020 // Endpoint 2
  3480. #define USB_EP_3 0x00000030 // Endpoint 3
  3481. #define USB_EP_4 0x00000040 // Endpoint 4
  3482. #define USB_EP_5 0x00000050 // Endpoint 5
  3483. #define USB_EP_6 0x00000060 // Endpoint 6
  3484. #define USB_EP_7 0x00000070 // Endpoint 7
  3485. #define NUM_USB_EP 8 // Number of supported endpoints
  3486. //*****************************************************************************
  3487. //
  3488. // These macros allow conversion between 0-based endpoint indices and the
  3489. // USB_EP_x values required when calling various USB APIs.
  3490. //
  3491. //*****************************************************************************
  3492. #define IndexToUSBEP(x) ((x) << 4)
  3493. #define USBEPToIndex(x) ((x) >> 4)
  3494. //*****************************************************************************
  3495. //
  3496. // The following are values that can be passed to USBFIFOConfigSet() as the
  3497. // ui32FIFOSize parameter.
  3498. //
  3499. //*****************************************************************************
  3500. #define USB_FIFO_SZ_8 0x00000000 // 8 byte FIFO
  3501. #define USB_FIFO_SZ_16 0x00000001 // 16 byte FIFO
  3502. #define USB_FIFO_SZ_32 0x00000002 // 32 byte FIFO
  3503. #define USB_FIFO_SZ_64 0x00000003 // 64 byte FIFO
  3504. #define USB_FIFO_SZ_128 0x00000004 // 128 byte FIFO
  3505. #define USB_FIFO_SZ_256 0x00000005 // 256 byte FIFO
  3506. #define USB_FIFO_SZ_512 0x00000006 // 512 byte FIFO
  3507. #define USB_FIFO_SZ_1024 0x00000007 // 1024 byte FIFO
  3508. #define USB_FIFO_SZ_2048 0x00000008 // 2048 byte FIFO
  3509. //*****************************************************************************
  3510. //
  3511. // This macro allow conversion from a FIFO size label as defined above to
  3512. // a number of bytes
  3513. //
  3514. //*****************************************************************************
  3515. #define USBFIFOSizeToBytes(x) (8 << (x))
  3516. //*****************************************************************************
  3517. //
  3518. // The following are values that can be passed to USBEndpointDataSend() as the
  3519. // ui32TransType parameter.
  3520. //
  3521. //*****************************************************************************
  3522. #define USB_TRANS_OUT 0x00000102 // Normal OUT transaction
  3523. #define USB_TRANS_IN 0x00000102 // Normal IN transaction
  3524. #define USB_TRANS_IN_LAST 0x0000010a // Final IN transaction (for
  3525. // endpoint 0 in device mode)
  3526. #define USB_TRANS_SETUP 0x0000110a // Setup transaction (for endpoint
  3527. // 0)
  3528. #define USB_TRANS_STATUS 0x00000142 // Status transaction (for endpoint
  3529. // 0)
  3530. //*****************************************************************************
  3531. //
  3532. // The following are values are returned by the USBModeGet function.
  3533. //
  3534. //*****************************************************************************
  3535. #define USB_DUAL_MODE_HOST 0x00000001 // Dual mode controller is in Host
  3536. // mode.
  3537. #define USB_DUAL_MODE_DEVICE 0x00000081 // Dual mode controller is in
  3538. // Device mode.
  3539. #define USB_DUAL_MODE_NONE 0x00000080 // Dual mode controller mode is not
  3540. // set.
  3541. #define USB_OTG_MODE_ASIDE_HOST 0x0000001d // OTG controller on the A side of
  3542. // the cable.
  3543. #define USB_OTG_MODE_ASIDE_NPWR 0x00000001 // OTG controller on the A side of
  3544. // the cable.
  3545. #define USB_OTG_MODE_ASIDE_SESS 0x00000009 // OTG controller on the A side of
  3546. // the cable Session Valid.
  3547. #define USB_OTG_MODE_ASIDE_AVAL 0x00000011 // OTG controller on the A side of
  3548. // the cable A valid.
  3549. #define USB_OTG_MODE_ASIDE_DEV 0x00000019 // OTG controller on the A side of
  3550. // the cable.
  3551. #define USB_OTG_MODE_BSIDE_HOST 0x0000009d // OTG controller on the B side of
  3552. // the cable.
  3553. #define USB_OTG_MODE_BSIDE_DEV 0x00000099 // OTG controller on the B side of
  3554. // the cable.
  3555. #define USB_OTG_MODE_BSIDE_NPWR 0x00000081 // OTG controller on the B side of
  3556. // the cable.
  3557. #define USB_OTG_MODE_NONE 0x00000080 // OTG controller mode is not set.
  3558. //*****************************************************************************
  3559. //
  3560. // The values for the USBDMAChannelIntEnable() and USBDMAChannelIntStatus()
  3561. // APIs.
  3562. //
  3563. //*****************************************************************************
  3564. #define USB_DMA_INT_CH8 0x00000080
  3565. #define USB_DMA_INT_CH7 0x00000040
  3566. #define USB_DMA_INT_CH6 0x00000020
  3567. #define USB_DMA_INT_CH5 0x00000010
  3568. #define USB_DMA_INT_CH4 0x00000008
  3569. #define USB_DMA_INT_CH3 0x00000004
  3570. #define USB_DMA_INT_CH2 0x00000002
  3571. #define USB_DMA_INT_CH1 0x00000001
  3572. //*****************************************************************************
  3573. //
  3574. // The values for the USBDMAChannelStatus() API.
  3575. //
  3576. //*****************************************************************************
  3577. #define USB_DMA_STATUS_ERROR 0x00000100
  3578. //*****************************************************************************
  3579. //
  3580. // The valid return values for the USBDMAModeSet() and USBDMAModeGet() APIs or
  3581. // USBDMAChannelConfig().
  3582. //
  3583. //*****************************************************************************
  3584. #define USB_DMA_CFG_BURST_NONE 0x00000000
  3585. #define USB_DMA_CFG_BURST_4 0x00000200
  3586. #define USB_DMA_CFG_BURST_8 0x00000400
  3587. #define USB_DMA_CFG_BURST_16 0x00000600
  3588. #define USB_DMA_CFG_INT_EN 0x00000008
  3589. #define USB_DMA_CFG_MODE_0 0x00000000
  3590. #define USB_DMA_CFG_MODE_1 0x00000004
  3591. #define USB_DMA_CFG_DIR_RX 0x00000000
  3592. #define USB_DMA_CFG_DIR_TX 0x00000002
  3593. #define USB_DMA_CFG_EN 0x00000001
  3594. //*****************************************************************************
  3595. //
  3596. // The following are values that can be passed to USBModeConfig() as the
  3597. // ui3Mode parameter.
  3598. //
  3599. //*****************************************************************************
  3600. #define USB_MODE_HOST_VBUS 0x00000004
  3601. #define USB_MODE_HOST 0x00000002
  3602. #define USB_MODE_DEV_VBUS 0x00000005
  3603. #define USB_MODE_DEV 0x00000003
  3604. #define USB_MODE_OTG 0x00000000
  3605. #define FIFO_TX 0
  3606. #define FIFO_RX 1
  3607. #define FIFO_TXRX 2
  3608. struct musb_fifo_cfg {
  3609. uint8_t ep_num;
  3610. uint8_t style;
  3611. uint8_t mode;
  3612. uint32_t maxpacket;
  3613. };
  3614. uint8_t usbd_get_musb_fifo_cfg(struct musb_fifo_cfg **cfg);
  3615. uint8_t usbh_get_musb_fifo_cfg(struct musb_fifo_cfg **cfg);
  3616. uint32_t usb_get_musb_ram_size(void);
  3617. void usbd_musb_delay_ms(uint8_t ms);
  3618. #endif