csl_tsipAux.h 140 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096
  1. /**
  2. * @file csl_tsipAux.h
  3. *
  4. * @brief
  5. * This is the TSIP Auxilary Header File which exposes the various
  6. * CSL Functional Layer API's to configure the TSIP Module.
  7. *
  8. * \par
  9. * ============================================================================
  10. * @n (C) Copyright 2008, 2009, Texas Instruments, Inc.
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions
  14. * are met:
  15. *
  16. * Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. *
  19. * Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the
  22. * distribution.
  23. *
  24. * Neither the name of Texas Instruments Incorporated nor the names of
  25. * its contributors may be used to endorse or promote products derived
  26. * from this software without specific prior written permission.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  31. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  36. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  38. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. */
  41. #ifndef CSL_TSIPAUX_H_
  42. #define CSL_TSIPAUX_H_
  43. #include <ti/csl/csl_tsip.h>
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. /** @addtogroup CSL_TSIP_FUNCTION
  48. @{ */
  49. /** ============================================================================
  50. * @n@b CSL_tsipGetPid
  51. *
  52. * @b Description
  53. * @n This function returns the PID of TSIP module.
  54. *
  55. * @b Arguments
  56. * @verbatim
  57. hTsip Handle to TSIP instance
  58. @endverbatim
  59. *
  60. * <b> Return Value </b>
  61. * @n The Module ID Version Information.
  62. *
  63. * <b> Pre Condition </b>
  64. * @n @a CSL_tsipOpen() must be called successfully.
  65. *
  66. * <b> Post Condition </b>
  67. * @n None
  68. *
  69. * @b Reads
  70. * @n TSIP_MOD_VER_REVISION
  71. *
  72. * @b Example
  73. * @verbatim
  74. CSL_TsipHandle hTsip;
  75. Uint16 modId;
  76. Uint16 majorRev;
  77. Uint16 minorRev;
  78. // Open the TSIP Module 0
  79. hTsip = CSL_tsipOpen(0);
  80. ...
  81. // Get the TSIP Module PID Information.
  82. CSL_tsipGetPid(hTsip, &pidInfo);
  83. ...
  84. @endverbatim
  85. * =============================================================================
  86. */
  87. static inline Uint32 CSL_tsipGetPid (CSL_TsipHandle hTsip)
  88. {
  89. /* Read from the PID */
  90. return (Uint32)CSL_FEXT(hTsip->MOD_VER, TSIP_MOD_VER_REVISION);
  91. }
  92. /** ============================================================================
  93. * @n@b CSL_tsipEmutstSetTestMode
  94. *
  95. * @b Description
  96. * @n This function sets the test mode for the TSIP.
  97. *
  98. * @b Arguments
  99. * @verbatim
  100. hTsip Handle to TSIP instance
  101. testMode Flag which determines the test mode; set to TRUE for
  102. test mode else FALSE implies normal operating mode.
  103. @endverbatim
  104. *
  105. * <b> Return Value </b>
  106. * @n None
  107. *
  108. * <b> Pre Condition </b>
  109. * @n @a CSL_tsipOpen() must be called successfully.
  110. *
  111. * <b> Post Condition </b>
  112. * @n None
  113. *
  114. * @b Writes
  115. * @n TSIP_EMU_TST_SIUTST
  116. *
  117. * @b Example
  118. * @verbatim
  119. CSL_TsipHandle hTsip;
  120. // Open the TSIP Module 0
  121. hTsip = CSL_tsipOpen(0);
  122. // Enable the test mode for TSIP.
  123. CSL_tsipEmutstSetTestMode(hTsip, TRUE);
  124. ...
  125. @endverbatim
  126. * =============================================================================
  127. */
  128. static inline void CSL_tsipEmutstSetTestMode (CSL_TsipHandle hTsip, Bool testMode)
  129. {
  130. /* Set the clock redundancy mode. */
  131. if (testMode == TRUE)
  132. CSL_FINS(hTsip->EMU_TST, TSIP_EMU_TST_SIUTST, 1);
  133. else
  134. CSL_FINS(hTsip->EMU_TST, TSIP_EMU_TST_SIUTST, 0);
  135. return;
  136. }
  137. /** ============================================================================
  138. * @n@b CSL_tsipEmutstSelectTestMode
  139. *
  140. * @b Description
  141. * @n This function selects the test mode for the TSIP.
  142. *
  143. * @b Arguments
  144. * @verbatim
  145. hTsip Handle to TSIP instance
  146. testModeSelect Flag which selects the test mode; set to 1 for internal
  147. link loopback else 0 for external data loopback.
  148. @endverbatim
  149. *
  150. * <b> Return Value </b>
  151. * @n None
  152. *
  153. * <b> Pre Condition </b>
  154. * @n @a CSL_tsipOpen() must be called successfully.
  155. *
  156. * <b> Post Condition </b>
  157. * @n None
  158. *
  159. * @b Writes
  160. * @n TSIP_EMU_TST_LBS
  161. *
  162. * @b Example
  163. * @verbatim
  164. CSL_TsipHandle hTsip;
  165. // Open the TSIP Module 0
  166. hTsip = CSL_tsipOpen(0);
  167. // Enable the test mode for TSIP.
  168. CSL_tsipEmutstSelectTestMode(hTsip, 0);
  169. ...
  170. @endverbatim
  171. * =============================================================================
  172. */
  173. static inline void CSL_tsipEmutstSelectTestMode (CSL_TsipHandle hTsip, Bool testModeSelect)
  174. {
  175. /* Set the clock redundancy mode. */
  176. if (testModeSelect == CSL_TSIP_TESTMODE_LINK_LOOPBACK)
  177. CSL_FINS(hTsip->EMU_TST, TSIP_EMU_TST_LBS, CSL_TSIP_TESTMODE_LINK_LOOPBACK);
  178. else
  179. CSL_FINS(hTsip->EMU_TST, TSIP_EMU_TST_LBS, CSL_TSIP_TESTMODE_DATA_LOOPBACK);
  180. return;
  181. }
  182. /** ============================================================================
  183. * @n@b CSL_tsipResetSIU
  184. *
  185. * @b Description
  186. * @n This function resets the Serial Interface Unit of the TSIP Module.
  187. *
  188. * @b Arguments
  189. * @verbatim
  190. hTsip Handle to TSIP instance
  191. @endverbatim
  192. *
  193. * <b> Return Value </b>
  194. * @n None
  195. *
  196. * <b> Pre Condition </b>
  197. * @n @a CSL_tsipOpen() must be called successfully.
  198. *
  199. * <b> Post Condition </b>
  200. * @n None
  201. *
  202. * @b Writes
  203. * @n TSIP_RESET_SIURST
  204. *
  205. * @b Example
  206. * @verbatim
  207. CSL_TsipHandle hTsip;
  208. // Open the TSIP Module 0
  209. hTsip = CSL_tsipOpen(0);
  210. // Reset the Serial Interface Unit for TSIP Module 0.
  211. CSL_tsipResetSIU(hTsip);
  212. ...
  213. @endverbatim
  214. * =============================================================================
  215. */
  216. static inline void CSL_tsipResetSIU (CSL_TsipHandle hTsip)
  217. {
  218. /* Reset the SIU */
  219. CSL_FINS(hTsip->RESET, TSIP_RESET_SIURST, 1);
  220. /* Wait for the reset to complete. */
  221. while (CSL_FEXT(hTsip->RESET, TSIP_RESET_SIURST) == 1);
  222. return;
  223. }
  224. /** ============================================================================
  225. * @n@b CSL_tsipResetTDMU_DMATCU
  226. *
  227. * @b Description
  228. * @n This function resets the Timeslot Data Management Unit (TDMU)and the
  229. * Direct Memory Access Transfer Control Unit (DMATCU) of the TSIP Module.
  230. *
  231. * @b Arguments
  232. * @verbatim
  233. hTsip Handle to TSIP instance
  234. @endverbatim
  235. *
  236. * <b> Return Value </b>
  237. * @n None
  238. *
  239. * <b> Pre Condition </b>
  240. * @n @a CSL_tsipOpen() must be called successfully.
  241. *
  242. * <b> Post Condition </b>
  243. * @n None
  244. *
  245. * @b Writes
  246. * @n TSIP_RESET_DMARST=1
  247. *
  248. * @b Example
  249. * @verbatim
  250. CSL_TsipHandle hTsip;
  251. // Open the TSIP Module 0
  252. hTsip = CSL_tsipOpen(0);
  253. // Reset the TDMU and DMATCU for TSIP Module 0.
  254. CSL_tsipResetTDMU_DMATCU(hTsip);
  255. ...
  256. @endverbatim
  257. * =============================================================================
  258. */
  259. static inline void CSL_tsipResetTDMU_DMATCU (CSL_TsipHandle hTsip)
  260. {
  261. /* Reset the TDMU and DMATCU */
  262. CSL_FINS(hTsip->RESET, TSIP_RESET_DMARST, 1);
  263. /* Wait for the reset to complete. */
  264. while (CSL_FEXT(hTsip->RESET, TSIP_RESET_DMARST) == 1);
  265. return;
  266. }
  267. /** ============================================================================
  268. * @n@b CSL_tsipSIUSetClockRedundancy
  269. *
  270. * @b Description
  271. * @n This function sets the SIU Clock Redundancy Mode for the SIU.
  272. *
  273. * @b Arguments
  274. * @verbatim
  275. hTsip Handle to TSIP instance
  276. dualClockMode Flag which determines the clock mode; set to TRUE for DUAL Clock mode
  277. else FALSE implies Redundant clock mode.
  278. @endverbatim
  279. *
  280. * <b> Return Value </b>
  281. * @n None
  282. *
  283. * <b> Pre Condition </b>
  284. * @n @a CSL_tsipOpen() must be called successfully.
  285. *
  286. * <b> Post Condition </b>
  287. * @n None
  288. *
  289. * @b Writes
  290. * @n TSIP_SIU_GCTL_CLKD
  291. *
  292. * @b Example
  293. * @verbatim
  294. CSL_TsipHandle hTsip;
  295. // Open the TSIP Module 0
  296. hTsip = CSL_tsipOpen(0);
  297. // Set the SIU Clock Redundancy Mode to operate in Dual Clock mode.
  298. CSL_tsipSIUSetClockRedundancy(hTsip, TRUE);
  299. ...
  300. @endverbatim
  301. * =============================================================================
  302. */
  303. static inline void CSL_tsipSIUSetClockRedundancy (CSL_TsipHandle hTsip, Bool dualClockMode)
  304. {
  305. /* Set the clock redundancy mode. */
  306. if (dualClockMode == TRUE)
  307. CSL_FINS(hTsip->SIU_GCTL, TSIP_SIU_GCTL_CLKD, 1);
  308. else
  309. CSL_FINS(hTsip->SIU_GCTL, TSIP_SIU_GCTL_CLKD, 0);
  310. return;
  311. }
  312. /** ============================================================================
  313. * @n@b CSL_tsipSIUGetClockRedundancy
  314. *
  315. * @b Description
  316. * @n This function sets the SIU Clock Redundancy Mode for the SIU.
  317. *
  318. * @b Arguments
  319. * @verbatim
  320. hTsip Handle to TSIP instance
  321. @endverbatim
  322. *
  323. * <b> Return Value </b>
  324. * @n TRUE - Dual Clock Redundancy Mode
  325. * @n FALSE - Redundant Clock Mode.
  326. *
  327. * <b> Pre Condition </b>
  328. * @n @a CSL_tsipOpen() must be called successfully.
  329. *
  330. * <b> Post Condition </b>
  331. * @n None
  332. *
  333. * @b Reads
  334. * @n TSIP_SIU_GCTL_CLKD
  335. *
  336. * @b Example
  337. * @verbatim
  338. CSL_TsipHandle hTsip;
  339. Bool clockMode;
  340. // Open the TSIP Module 0
  341. hTsip = CSL_tsipOpen(0);
  342. // Get the SIU Clock Redundancy Mode.
  343. clockMode = CSL_tsipSIUGetClockRedundancy(hTsip);
  344. ...
  345. @endverbatim
  346. * =============================================================================
  347. */
  348. static inline Bool CSL_tsipSIUGetClockRedundancy (CSL_TsipHandle hTsip)
  349. {
  350. return (Bool)CSL_FEXT(hTsip->SIU_GCTL, TSIP_SIU_GCTL_CLKD);
  351. }
  352. /** ============================================================================
  353. * @n@b CSL_tsipSIUEnableReceive
  354. *
  355. * @b Description
  356. * @n This function enables the SIU receive
  357. *
  358. * @b Arguments
  359. * @verbatim
  360. hTsip Handle to TSIP instance
  361. @endverbatim
  362. *
  363. * <b> Return Value </b>
  364. * @n None
  365. *
  366. * <b> Pre Condition </b>
  367. * @n @a CSL_tsipOpen() must be called successfully.
  368. *
  369. * <b> Post Condition </b>
  370. * @n None
  371. *
  372. * @b Writes
  373. * @n TSIP_SIU_GCTL_RCVENB=1
  374. *
  375. * @b Example
  376. * @verbatim
  377. CSL_TsipHandle hTsip;
  378. // Open the TSIP Module 0
  379. hTsip = CSL_tsipOpen(0);
  380. // Enable the SIU Receive.
  381. CSL_tsipSIUEnableReceive(hTsip);
  382. ...
  383. @endverbatim
  384. * =============================================================================
  385. */
  386. static inline void CSL_tsipSIUEnableReceive (CSL_TsipHandle hTsip)
  387. {
  388. CSL_FINS(hTsip->SIU_GCTL, TSIP_SIU_GCTL_RCVENB, 1);
  389. return;
  390. }
  391. /** ============================================================================
  392. * @n@b CSL_tsipSIUDisableReceive
  393. *
  394. * @b Description
  395. * @n This function disables the SIU receive
  396. *
  397. * @b Arguments
  398. * @verbatim
  399. hTsip Handle to TSIP instance
  400. @endverbatim
  401. *
  402. * <b> Return Value </b>
  403. * @n None
  404. *
  405. * <b> Pre Condition </b>
  406. * @n @a CSL_tsipOpen() must be called successfully.
  407. *
  408. * <b> Post Condition </b>
  409. * @n None
  410. *
  411. * @b Writes
  412. * @n TSIP_SIU_GCTL_RCVENB=0
  413. *
  414. * @b Example
  415. * @verbatim
  416. CSL_TsipHandle hTsip;
  417. // Open the TSIP Module 0
  418. hTsip = CSL_tsipOpen(0);
  419. // Disable the SIU Receive.
  420. CSL_tsipSIUDisableReceive(hTsip);
  421. ...
  422. @endverbatim
  423. * =============================================================================
  424. */
  425. static inline void CSL_tsipSIUDisableReceive (CSL_TsipHandle hTsip)
  426. {
  427. CSL_FINS(hTsip->SIU_GCTL, TSIP_SIU_GCTL_RCVENB, 0);
  428. return;
  429. }
  430. /** ============================================================================
  431. * @n@b CSL_tsipSIUIsReceiveEnabled
  432. *
  433. * @b Description
  434. * @n This function checks if the SIU receive is enabled or not?
  435. *
  436. * @b Arguments
  437. * @verbatim
  438. hTsip Handle to TSIP instance
  439. @endverbatim
  440. *
  441. * <b> Return Value </b>
  442. * @n TRUE - SIU Receive is enabled.
  443. * @n FALSE - SIU Receive is disabled.
  444. *
  445. * <b> Pre Condition </b>
  446. * @n @a CSL_tsipOpen() must be called successfully.
  447. *
  448. * <b> Post Condition </b>
  449. * @n None
  450. *
  451. * @b Reads
  452. * @n TSIP_SIU_GCTL_RCVENB
  453. *
  454. * @b Example
  455. * @verbatim
  456. CSL_TsipHandle hTsip;
  457. // Open the TSIP Module 0
  458. hTsip = CSL_tsipOpen(0);
  459. // Check if SIU receive is enabled or not?
  460. if (CSL_tsipSIUIsReceiveEnabled(hTsip) == TRUE)
  461. {
  462. // Receive is enabled.
  463. }
  464. else
  465. {
  466. // Receive is disabled.
  467. }
  468. ...
  469. @endverbatim
  470. * =============================================================================
  471. */
  472. static inline Bool CSL_tsipSIUIsReceiveEnabled (CSL_TsipHandle hTsip)
  473. {
  474. return (Bool)CSL_FEXT(hTsip->SIU_GCTL, TSIP_SIU_GCTL_RCVENB);
  475. }
  476. /** ============================================================================
  477. * @n@b CSL_tsipSIUEnableTransmit
  478. *
  479. * @b Description
  480. * @n This function enables the SIU transmit
  481. *
  482. * @b Arguments
  483. * @verbatim
  484. hTsip Handle to TSIP instance
  485. @endverbatim
  486. *
  487. * <b> Return Value </b>
  488. * @n None
  489. *
  490. * <b> Pre Condition </b>
  491. * @n @a CSL_tsipOpen() must be called successfully.
  492. *
  493. * <b> Post Condition </b>
  494. * @n None
  495. *
  496. * @b Writes
  497. * @n TSIP_SIU_GCTL_XMTENB=1
  498. *
  499. * @b Example
  500. * @verbatim
  501. CSL_TsipHandle hTsip;
  502. // Open the TSIP Module 0
  503. hTsip = CSL_tsipOpen(0);
  504. // Enable the SIU Transmit.
  505. CSL_tsipSIUEnableTransmit(hTsip);
  506. ...
  507. @endverbatim
  508. * =============================================================================
  509. */
  510. static inline void CSL_tsipSIUEnableTransmit (CSL_TsipHandle hTsip)
  511. {
  512. CSL_FINS(hTsip->SIU_GCTL, TSIP_SIU_GCTL_XMTENB, 1);
  513. return;
  514. }
  515. /** ============================================================================
  516. * @n@b CSL_tsipSIUDisableTransmit
  517. *
  518. * @b Description
  519. * @n This function disables the SIU transmit
  520. *
  521. * @b Arguments
  522. * @verbatim
  523. hTsip Handle to TSIP instance
  524. @endverbatim
  525. *
  526. * <b> Return Value </b>
  527. * @n None
  528. *
  529. * <b> Pre Condition </b>
  530. * @n @a CSL_tsipOpen() must be called successfully.
  531. *
  532. * <b> Post Condition </b>
  533. * @n None
  534. *
  535. * @b Writes
  536. * @n TSIP_SIU_GCTL_XMTENB=0
  537. *
  538. * @b Example
  539. * @verbatim
  540. CSL_TsipHandle hTsip;
  541. // Open the TSIP Module 0
  542. hTsip = CSL_tsipOpen(0);
  543. // Disable the SIU Transmit.
  544. CSL_tsipSIUDisableTransmit(hTsip);
  545. ...
  546. @endverbatim
  547. * =============================================================================
  548. */
  549. static inline void CSL_tsipSIUDisableTransmit (CSL_TsipHandle hTsip)
  550. {
  551. CSL_FINS(hTsip->SIU_GCTL, TSIP_SIU_GCTL_XMTENB, 0);
  552. return;
  553. }
  554. /** ============================================================================
  555. * @n@b CSL_tsipSIUIsTransmitEnabled
  556. *
  557. * @b Description
  558. * @n This function checks if the SIU transmit is enabled or not?
  559. *
  560. * @b Arguments
  561. * @verbatim
  562. hTsip Handle to TSIP instance
  563. @endverbatim
  564. *
  565. * <b> Return Value </b>
  566. * @n TRUE - SIU Transmit is enabled.
  567. * @n FALSE - SIU Transmit is disabled.
  568. *
  569. * <b> Pre Condition </b>
  570. * @n @a CSL_tsipOpen() must be called successfully.
  571. *
  572. * <b> Post Condition </b>
  573. * @n None
  574. *
  575. * @b Reads
  576. * @n TSIP_SIU_GCTL_XMTENB
  577. *
  578. * @b Example
  579. * @verbatim
  580. CSL_TsipHandle hTsip;
  581. // Open the TSIP Module 0
  582. hTsip = CSL_tsipOpen(0);
  583. // Check if SIU transmit is enabled or not?
  584. if (CSL_tsipSIUIsTransmitEnabled(hTsip) == TRUE)
  585. {
  586. // Transmit is enabled.
  587. }
  588. else
  589. {
  590. // Transmit is disabled.
  591. }
  592. ...
  593. @endverbatim
  594. * =============================================================================
  595. */
  596. static inline Bool CSL_tsipSIUIsTransmitEnabled (CSL_TsipHandle hTsip)
  597. {
  598. return (Bool)CSL_FEXT(hTsip->SIU_GCTL, TSIP_SIU_GCTL_XMTENB);
  599. }
  600. /** ============================================================================
  601. * @n@b CSL_tsipSIUSetTxClockSource
  602. *
  603. * @b Description
  604. * @n This function sets the SIU Transmit Clock Source.
  605. *
  606. * @b Arguments
  607. * @verbatim
  608. hTsip Handle to TSIP instance
  609. clockSource Clock Source to be used for the SIU Transmit
  610. Value of 0 implies TCLK_A else TCLK_B
  611. @endverbatim
  612. *
  613. * <b> Return Value </b>
  614. * @n None
  615. *
  616. * <b> Pre Condition </b>
  617. * @n @a CSL_tsipOpen() must be called successfully.
  618. *
  619. * <b> Post Condition </b>
  620. * @n None
  621. *
  622. * @b Writes
  623. * @n TSIP_SIU_XMTSEL_XMTSRC
  624. *
  625. * @b Example
  626. * @verbatim
  627. CSL_TsipHandle hTsip;
  628. // Open the TSIP Module 0
  629. hTsip = CSL_tsipOpen(0);
  630. // Set the SIU Transmit Clock to use TCLK_B & TFS_B
  631. CSL_tsipSIUSetTxClockSource(hTsip, 1);
  632. ...
  633. @endverbatim
  634. * =============================================================================
  635. */
  636. static inline void CSL_tsipSIUSetTxClockSource (CSL_TsipHandle hTsip, Uint8 clockSource)
  637. {
  638. /* Use the clock source to configure the Transmit Clock Source register.*/
  639. if (clockSource == 0)
  640. CSL_FINS(hTsip->SIU_XMTSEL, TSIP_SIU_XMTSEL_XMTSRC, 0);
  641. else
  642. CSL_FINS(hTsip->SIU_XMTSEL, TSIP_SIU_XMTSEL_XMTSRC, 1);
  643. return;
  644. }
  645. /** ============================================================================
  646. * @n@b CSL_tsipSIUGetTxClockSource
  647. *
  648. * @b Description
  649. * @n This function gets the SIU Transmit Clock Source.
  650. *
  651. * @b Arguments
  652. * @verbatim
  653. hTsip Handle to TSIP instance
  654. @endverbatim
  655. *
  656. * <b> Return Value </b>
  657. * @n 0 - Implies Clock Source A
  658. * @n 1 - Implies Clock Source B
  659. *
  660. * <b> Pre Condition </b>
  661. * @n @a CSL_tsipOpen() must be called successfully.
  662. *
  663. * <b> Post Condition </b>
  664. * @n None
  665. *
  666. * @b Reads
  667. * @n TSIP_SIU_XMTSEL_XMTSRC
  668. *
  669. * @b Example
  670. * @verbatim
  671. CSL_TsipHandle hTsip;
  672. // Open the TSIP Module 0
  673. hTsip = CSL_tsipOpen(0);
  674. // Get the SIU Transmit Clock Source
  675. if (CSL_tsipSIUGetTxClockSource(hTsip) == 1)
  676. {
  677. // Using Clock Source A
  678. }
  679. else
  680. {
  681. // Using Clock Source B
  682. }
  683. ...
  684. @endverbatim
  685. * =============================================================================
  686. */
  687. static inline Uint8 CSL_tsipSIUGetTxClockSource (CSL_TsipHandle hTsip)
  688. {
  689. /* Get the clock source. */
  690. return (Uint8) CSL_FEXT(hTsip->SIU_XMTSEL, TSIP_SIU_XMTSEL_XMTSRC);
  691. }
  692. /** ============================================================================
  693. * @n@b CSL_tsipSIUSetTxDataDelay
  694. *
  695. * @b Description
  696. * @n This function sets the transmit data delay.
  697. *
  698. * @b Arguments
  699. * @verbatim
  700. hTsip Handle to TSIP instance
  701. txDataDelay Transmit Data Delay to be configured.
  702. @endverbatim
  703. *
  704. * <b> Return Value </b>
  705. * @n None.
  706. *
  707. * <b> Pre Condition </b>
  708. * @n @a CSL_tsipOpen() must be called successfully.
  709. *
  710. * <b> Post Condition </b>
  711. * @n None
  712. *
  713. * @b Writes
  714. * @n TSIP_SIU_XMTCTL_XMTDATD
  715. *
  716. * @b Example
  717. * @verbatim
  718. CSL_TsipHandle hTsip;
  719. // Open the TSIP Module 0
  720. hTsip = CSL_tsipOpen(0);
  721. // Set the Transmit Data Delay to be 1023 (Single Rate 8Mbps serial link with 128 time slots)
  722. CSL_tsipSIUSetTxDataDelay (hTsip, 1023);
  723. ...
  724. @endverbatim
  725. * =============================================================================
  726. */
  727. static inline void CSL_tsipSIUSetTxDataDelay (CSL_TsipHandle hTsip, Uint16 txDataDelay)
  728. {
  729. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDATD, txDataDelay);
  730. return;
  731. }
  732. /** ============================================================================
  733. * @n@b CSL_tsipSIUGetTxDataDelay
  734. *
  735. * @b Description
  736. * @n This function gets the transmit data delay.
  737. *
  738. * @b Arguments
  739. * @verbatim
  740. hTsip Handle to TSIP instance
  741. @endverbatim
  742. *
  743. * <b> Return Value </b>
  744. * @n Transmit Data Delay configured.
  745. *
  746. * <b> Pre Condition </b>
  747. * @n @a CSL_tsipOpen() must be called successfully.
  748. *
  749. * <b> Post Condition </b>
  750. * @n None
  751. *
  752. * @b Reads
  753. * @n TSIP_SIU_XMTCTL_XMTDATD
  754. *
  755. * @b Example
  756. * @verbatim
  757. CSL_TsipHandle hTsip;
  758. Uint16 txDataDelay;
  759. // Open the TSIP Module 0
  760. hTsip = CSL_tsipOpen(0);
  761. // Get the Transmit Data Delay
  762. txDataDelay = CSL_tsipSIUGetTxDataDelay (hTsip);
  763. ...
  764. @endverbatim
  765. * =============================================================================
  766. */
  767. static inline Uint16 CSL_tsipSIUGetTxDataDelay (CSL_TsipHandle hTsip)
  768. {
  769. return CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDATD);
  770. }
  771. /** ============================================================================
  772. * @n@b CSL_tsipSIUSetTxOutputDelay
  773. *
  774. * @b Description
  775. * @n This function sets the transmit output delay.
  776. *
  777. * @b Arguments
  778. * @verbatim
  779. hTsip Handle to TSIP instance
  780. txOutputDelay Transmit Output Delay to be configured.
  781. Value of 0 implies no added delay else the
  782. output enable is delayed by one-half serial clock
  783. period.
  784. @endverbatim
  785. *
  786. * <b> Return Value </b>
  787. * @n None.
  788. *
  789. * <b> Pre Condition </b>
  790. * @n @a CSL_tsipOpen() must be called successfully.
  791. *
  792. * <b> Post Condition </b>
  793. * @n None
  794. *
  795. * @b Writes
  796. * @n TSIP_SIU_XMTCTL_XMTDLY
  797. *
  798. * @b Example
  799. * @verbatim
  800. CSL_TsipHandle hTsip;
  801. // Open the TSIP Module 0
  802. hTsip = CSL_tsipOpen(0);
  803. // Set the Transmit Output delay for no added delay.
  804. CSL_tsipSIUSetTxOutputDelay (hTsip, 0);
  805. ...
  806. @endverbatim
  807. * =============================================================================
  808. */
  809. static inline void CSL_tsipSIUSetTxOutputDelay
  810. (
  811. CSL_TsipHandle hTsip,
  812. Uint8 txOutputDelay
  813. )
  814. {
  815. /* Use the Transmit Output Delay to configure the Transmit Control Register. */
  816. if (txOutputDelay == 0)
  817. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDLY, 0);
  818. else
  819. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDLY, 1);
  820. return;
  821. }
  822. /** ============================================================================
  823. * @n@b CSL_tsipSIUGetTxOutputDelay
  824. *
  825. * @b Description
  826. * @n This function gets the transmit output delay.
  827. *
  828. * @b Arguments
  829. * @verbatim
  830. hTsip Handle to TSIP instance
  831. @endverbatim
  832. *
  833. * <b> Return Value </b>
  834. * @n 0 - No added delay
  835. * @n 1 - Output enable is delayed by one half serial clock period.
  836. *
  837. * <b> Pre Condition </b>
  838. * @n @a CSL_tsipOpen() must be called successfully.
  839. *
  840. * <b> Post Condition </b>
  841. * @n None
  842. *
  843. * @b Reads
  844. * @n TSIP_SIU_XMTCTL_XMTDLY
  845. *
  846. * @b Example
  847. * @verbatim
  848. CSL_TsipHandle hTsip;
  849. Uint16 txOutputDelay;
  850. // Open the TSIP Module 0
  851. hTsip = CSL_tsipOpen(0);
  852. // Get the Transmit Output Delay
  853. txOutputDelay = CSL_tsipSIUGetTxOutputDelay (hTsip);
  854. ...
  855. @endverbatim
  856. * =============================================================================
  857. */
  858. static inline Uint8 CSL_tsipSIUGetTxOutputDelay (CSL_TsipHandle hTsip)
  859. {
  860. return CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDLY);
  861. }
  862. /** ============================================================================
  863. * @n@b CSL_tsipSIUSetTxDisabledState
  864. *
  865. * @b Description
  866. * @n This function sets the transmit disabled state
  867. *
  868. * @b Arguments
  869. * @verbatim
  870. hTsip Handle to TSIP instance
  871. txDisabledState Transmit Disabled State
  872. 0 - High Impedance
  873. 1 - Driven Low
  874. 2 - Driven High
  875. @endverbatim
  876. *
  877. * <b> Return Value </b>
  878. * @n None.
  879. *
  880. * <b> Pre Condition </b>
  881. * @n @a CSL_tsipOpen() must be called successfully.
  882. *
  883. * <b> Post Condition </b>
  884. * @n None
  885. *
  886. * @b Writes
  887. * @n TSIP_SIU_XMTCTL_XMTDIS
  888. *
  889. * @b Example
  890. * @verbatim
  891. CSL_TsipHandle hTsip;
  892. // Open the TSIP Module 0
  893. hTsip = CSL_tsipOpen(0);
  894. // Set the Transmit Disabled State for High Impedance
  895. CSL_tsipSIUSetTxDisabledState (hTsip, 0);
  896. ...
  897. @endverbatim
  898. * =============================================================================
  899. */
  900. static inline void CSL_tsipSIUSetTxDisabledState
  901. (
  902. CSL_TsipHandle hTsip,
  903. Uint8 txDisabledState
  904. )
  905. {
  906. /* Use the Transmit Disabled State to configure the Transmit Control Register. */
  907. if (txDisabledState == 0)
  908. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDIS, 0);
  909. else if (txDisabledState == 1)
  910. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDIS, 2);
  911. else if (txDisabledState == 2)
  912. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDIS, 3);
  913. return;
  914. }
  915. /** ============================================================================
  916. * @n@b CSL_tsipSIUGetTxDisabledState
  917. *
  918. * @b Description
  919. * @n This function gets the transmit disabled state
  920. *
  921. * @b Arguments
  922. * @verbatim
  923. hTsip Handle to TSIP instance
  924. @endverbatim
  925. *
  926. * <b> Return Value </b>
  927. * @n Transmit Disabled State
  928. * @n 0 - High Impedance
  929. * @n 1 - Driven Low
  930. * @n 2 - Driven High
  931. *
  932. * <b> Pre Condition </b>
  933. * @n @a CSL_tsipOpen() must be called successfully.
  934. *
  935. * <b> Post Condition </b>
  936. * @n None
  937. *
  938. * @b Reads
  939. * @n TSIP_SIU_XMTCTL_XMTDIS
  940. *
  941. * @b Example
  942. * @verbatim
  943. CSL_TsipHandle hTsip;
  944. Uint8 txDisabledState;
  945. // Open the TSIP Module 0
  946. hTsip = CSL_tsipOpen(0);
  947. // Get the Transmit Disabled State
  948. txDisabledState = CSL_tsipSIUGetTxDisabledState (hTsip);
  949. ...
  950. @endverbatim
  951. * =============================================================================
  952. */
  953. static inline Uint8 CSL_tsipSIUGetTxDisabledState (CSL_TsipHandle hTsip)
  954. {
  955. Uint8 txDisabledState;
  956. /* Get the Transmit Disabled State and return appropriately. */
  957. txDisabledState = CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDIS);
  958. if (txDisabledState == 0)
  959. return 0;
  960. else if (txDisabledState == 2)
  961. return 1;
  962. else
  963. return 2;
  964. }
  965. /** ============================================================================
  966. * @n@b CSL_tsipSIUSetTxFrameSyncPolarity
  967. *
  968. * @b Description
  969. * @n This function sets the transmit frame sync polarity.
  970. *
  971. * @b Arguments
  972. * @verbatim
  973. hTsip Handle to TSIP instance
  974. txFrameSyncPolarity Transmit Frame Sync Polarity to be configured.
  975. 0 - Active Low
  976. 1 - Active High
  977. @endverbatim
  978. *
  979. * <b> Return Value </b>
  980. * @n None.
  981. *
  982. * <b> Pre Condition </b>
  983. * @n @a CSL_tsipOpen() must be called successfully.
  984. *
  985. * <b> Post Condition </b>
  986. * @n None
  987. *
  988. * @b Writes
  989. * @n TSIP_SIU_XMTCTL_XMTFSYNCP
  990. *
  991. * @b Example
  992. * @verbatim
  993. CSL_TsipHandle hTsip;
  994. // Open the TSIP Module 0
  995. hTsip = CSL_tsipOpen(0);
  996. // Set the Transmit Frame Sync Priority to be ACTIVE HIGH
  997. CSL_tsipSIUSetTxFrameSyncPolarity (hTsip, 1);
  998. ...
  999. @endverbatim
  1000. * =============================================================================
  1001. */
  1002. static inline void CSL_tsipSIUSetTxFrameSyncPolarity
  1003. (
  1004. CSL_TsipHandle hTsip,
  1005. Uint8 txFrameSyncPolarity
  1006. )
  1007. {
  1008. /* Use the Transmit Frame Sync Polarity to configure the Transmit Control Register. */
  1009. if (txFrameSyncPolarity == 0)
  1010. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTFSYNCP, 0);
  1011. else
  1012. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTFSYNCP, 1);
  1013. return;
  1014. }
  1015. /** ============================================================================
  1016. * @n@b CSL_tsipSIUGetTxFrameSyncPolarity
  1017. *
  1018. * @b Description
  1019. * @n This function gets the transmit frame sync polarity.
  1020. *
  1021. * @b Arguments
  1022. * @verbatim
  1023. hTsip Handle to TSIP instance
  1024. @endverbatim
  1025. *
  1026. * <b> Return Value </b>
  1027. * @n Transmit Frame Sync Polarity
  1028. * @n 0 - Active Low
  1029. * @n 1 - Active High
  1030. *
  1031. * <b> Pre Condition </b>
  1032. * @n @a CSL_tsipOpen() must be called successfully.
  1033. *
  1034. * <b> Post Condition </b>
  1035. * @n None
  1036. *
  1037. * @b Reads
  1038. * @n TSIP_SIU_XMTCTL_XMTFSYNCP
  1039. *
  1040. * @b Example
  1041. * @verbatim
  1042. CSL_TsipHandle hTsip;
  1043. Uint8 txFrameSyncPolarity;
  1044. // Open the TSIP Module 0
  1045. hTsip = CSL_tsipOpen(0);
  1046. // Get the Transmit Frame Sync Priority.
  1047. txFrameSyncPolarity = CSL_tsipSIUGetTxFrameSyncPolarity (hTsip);
  1048. ...
  1049. @endverbatim
  1050. * =============================================================================
  1051. */
  1052. static inline Uint8 CSL_tsipSIUGetTxFrameSyncPolarity (CSL_TsipHandle hTsip)
  1053. {
  1054. return (Uint8)CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTFSYNCP);
  1055. }
  1056. /** ============================================================================
  1057. * @n@b CSL_tsipSIUSetTxFrameSyncClockPolarity
  1058. *
  1059. * @b Description
  1060. * @n This function sets the transmit frame sync clock polarity.
  1061. *
  1062. * @b Arguments
  1063. * @verbatim
  1064. hTsip Handle to TSIP instance
  1065. txFrameSyncClkPolarity Transmit Frame Sync Clock Polarity to be configured.
  1066. 0 - Frame Sync is sample on rising edge
  1067. 1 - Frame Sync is sample on falling edge
  1068. @endverbatim
  1069. *
  1070. * <b> Return Value </b>
  1071. * @n None.
  1072. *
  1073. * <b> Pre Condition </b>
  1074. * @n @a CSL_tsipOpen() must be called successfully.
  1075. *
  1076. * <b> Post Condition </b>
  1077. * @n None
  1078. *
  1079. * @b Writes
  1080. * @n TSIP_SIU_XMTCTL_XMTFCLKP
  1081. *
  1082. * @b Example
  1083. * @verbatim
  1084. CSL_TsipHandle hTsip;
  1085. // Open the TSIP Module 0
  1086. hTsip = CSL_tsipOpen(0);
  1087. // Set the Transmit Frame Sync Clock Priority to be sampled on the falling edge
  1088. CSL_tsipSIUSetTxFrameSyncClockPolarity (hTsip, 1);
  1089. ...
  1090. @endverbatim
  1091. * =============================================================================
  1092. */
  1093. static inline void CSL_tsipSIUSetTxFrameSyncClockPolarity
  1094. (
  1095. CSL_TsipHandle hTsip,
  1096. Uint8 txFrameSyncClockPolarity
  1097. )
  1098. {
  1099. /* Use the Transmit Frame Sync Clock Polarity to configure the Transmit Control Register. */
  1100. if (txFrameSyncClockPolarity == 0)
  1101. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTFCLKP, 0);
  1102. else
  1103. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTFCLKP, 1);
  1104. return;
  1105. }
  1106. /** ============================================================================
  1107. * @n@b CSL_tsipSIUGetTxFrameSyncClockPolarity
  1108. *
  1109. * @b Description
  1110. * @n This function gets the transmit frame sync clock polarity.
  1111. *
  1112. * @b Arguments
  1113. * @verbatim
  1114. hTsip Handle to TSIP instance
  1115. @endverbatim
  1116. *
  1117. * <b> Return Value </b>
  1118. * @n Transmit Frame Sync Clock Polarity
  1119. * @n 0 - Frame Sync is sample on rising edge
  1120. * @n 1 - Frame Sync is sample on falling edge
  1121. *
  1122. * <b> Pre Condition </b>
  1123. * @n @a CSL_tsipOpen() must be called successfully.
  1124. *
  1125. * <b> Post Condition </b>
  1126. * @n None
  1127. *
  1128. * @b Reads
  1129. * @n TSIP_SIU_XMTCTL_XMTFCLKP
  1130. *
  1131. * @b Example
  1132. * @verbatim
  1133. CSL_TsipHandle hTsip;
  1134. Uint8 txFrameSyncClockPolarity;
  1135. // Open the TSIP Module 0
  1136. hTsip = CSL_tsipOpen(0);
  1137. // Get the Transmit Frame Sync Clock Priority.
  1138. txFrameSyncClockPolarity = CSL_tsipSIUGetTxFrameSyncClockPolarity (hTsip);
  1139. ...
  1140. @endverbatim
  1141. * =============================================================================
  1142. */
  1143. static inline Uint8 CSL_tsipSIUGetTxFrameSyncClockPolarity (CSL_TsipHandle hTsip)
  1144. {
  1145. return (Uint8)CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTFCLKP);
  1146. }
  1147. /** ============================================================================
  1148. * @n@b CSL_tsipSIUSetTxDataClockPolarity
  1149. *
  1150. * @b Description
  1151. * @n This function sets the transmit data clock polarity.
  1152. *
  1153. * @b Arguments
  1154. * @verbatim
  1155. hTsip Handle to TSIP instance
  1156. txDataClkPolarity Transmit Frame Data Clock Polarity to be configured.
  1157. 0 - Transmit data is driven on the rising edge
  1158. 1 - Transmit data is driven on the falling edge
  1159. @endverbatim
  1160. *
  1161. * <b> Return Value </b>
  1162. * @n None.
  1163. *
  1164. * <b> Pre Condition </b>
  1165. * @n @a CSL_tsipOpen() must be called successfully.
  1166. *
  1167. * <b> Post Condition </b>
  1168. * @n None
  1169. *
  1170. * @b Writes
  1171. * @n TSIP_SIU_XMTCTL_XMTDCLKP
  1172. *
  1173. * @b Example
  1174. * @verbatim
  1175. CSL_TsipHandle hTsip;
  1176. // Open the TSIP Module 0
  1177. hTsip = CSL_tsipOpen(0);
  1178. // Set the Transmit Data Clock Priority to be done on the rising edge of TCLK
  1179. CSL_tsipSIUSetTxDataClockPolarity (hTsip, 0);
  1180. ...
  1181. @endverbatim
  1182. * =============================================================================
  1183. */
  1184. static inline void CSL_tsipSIUSetTxDataClockPolarity
  1185. (
  1186. CSL_TsipHandle hTsip,
  1187. Uint8 txDataClkPolarity
  1188. )
  1189. {
  1190. /* Use the Transmit Data Clock Polarity to configure the Transmit Control Register. */
  1191. if (txDataClkPolarity == 0)
  1192. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDCLKP, 0);
  1193. else
  1194. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDCLKP, 1);
  1195. return;
  1196. }
  1197. /** ============================================================================
  1198. * @n@b CSL_tsipSIUGetTxDataClockPolarity
  1199. *
  1200. * @b Description
  1201. * @n This function gets the transmit data clock polarity.
  1202. *
  1203. * @b Arguments
  1204. * @verbatim
  1205. hTsip Handle to TSIP instance
  1206. @endverbatim
  1207. *
  1208. * <b> Return Value </b>
  1209. * @n Transmit Data Clock Polarity
  1210. * @n 0 - Transmit data is driven on the rising edge
  1211. * @n 1 - Transmit data is driven on the falling edge
  1212. *
  1213. * <b> Pre Condition </b>
  1214. * @n @a CSL_tsipOpen() must be called successfully.
  1215. *
  1216. * <b> Post Condition </b>
  1217. * @n None
  1218. *
  1219. * @b Reads
  1220. * @n TSIP_SIU_XMTCTL_XMTDCLKP
  1221. *
  1222. * @b Example
  1223. * @verbatim
  1224. CSL_TsipHandle hTsip;
  1225. Uint8 txDataClockPolarity;
  1226. // Open the TSIP Module 0
  1227. hTsip = CSL_tsipOpen(0);
  1228. // Get the Transmit Data Clock Priority.
  1229. txDataClockPolarity = CSL_tsipSIUGetTxDataClockPolarity (hTsip);
  1230. ...
  1231. @endverbatim
  1232. * =============================================================================
  1233. */
  1234. static inline Uint8 CSL_tsipSIUGetTxDataClockPolarity (CSL_TsipHandle hTsip)
  1235. {
  1236. return (Uint8)CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDCLKP);
  1237. }
  1238. /** ============================================================================
  1239. * @n@b CSL_tsipSIUSetTxDataRate
  1240. *
  1241. * @b Description
  1242. * @n This function sets the transmit data rate
  1243. *
  1244. * @b Arguments
  1245. * @verbatim
  1246. hTsip Handle to TSIP instance
  1247. txDataRate Transmit Data Rate
  1248. 0 - Data Rate is 8.192 Mbps
  1249. 1 - Data Rate is 16.384 Mbps
  1250. 2 - Data Rate is 32.768 Mbps
  1251. @endverbatim
  1252. *
  1253. * <b> Return Value </b>
  1254. * @n None.
  1255. *
  1256. * <b> Pre Condition </b>
  1257. * @n @a CSL_tsipOpen() must be called successfully.
  1258. *
  1259. * <b> Post Condition </b>
  1260. * @n None
  1261. *
  1262. * @b Writes
  1263. * @n TSIP_SIU_XMTCTL_XMTDATR
  1264. *
  1265. * @b Example
  1266. * @verbatim
  1267. CSL_TsipHandle hTsip;
  1268. // Open the TSIP Module 0
  1269. hTsip = CSL_tsipOpen(0);
  1270. // Set the Transmit Data Rate to be 8.192 Mbps.
  1271. CSL_tsipSIUSetTxDataRate (hTsip, 0);
  1272. ...
  1273. @endverbatim
  1274. * =============================================================================
  1275. */
  1276. static inline void CSL_tsipSIUSetTxDataRate
  1277. (
  1278. CSL_TsipHandle hTsip,
  1279. Uint8 txDataRate
  1280. )
  1281. {
  1282. /* Configure the transmit data rate. */
  1283. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDATR, txDataRate);
  1284. return;
  1285. }
  1286. /** ============================================================================
  1287. * @n@b CSL_tsipSIUGetTxDataRate
  1288. *
  1289. * @b Description
  1290. * @n This function gets the transmit data rate.
  1291. *
  1292. * @b Arguments
  1293. * @verbatim
  1294. hTsip Handle to TSIP instance
  1295. @endverbatim
  1296. *
  1297. * <b> Return Value </b>
  1298. * @n Transmit Data Rate
  1299. * @n 0 - Data Rate is 8.192 Mbps
  1300. * @n 1 - Data Rate is 16.384 Mbps
  1301. * @n 2 - Data Rate is 32.768 Mbps
  1302. *
  1303. * <b> Pre Condition </b>
  1304. * @n @a CSL_tsipOpen() must be called successfully.
  1305. *
  1306. * <b> Post Condition </b>
  1307. * @n None
  1308. *
  1309. * @b Reads
  1310. * @n TSIP_SIU_XMTCTL_XMTDATR
  1311. *
  1312. * @b Example
  1313. * @verbatim
  1314. CSL_TsipHandle hTsip;
  1315. Uint8 txDataRate;
  1316. // Open the TSIP Module 0
  1317. hTsip = CSL_tsipOpen(0);
  1318. // Get the Transmit Data Rate
  1319. txDataRate = CSL_tsipSIUGetTxDataRate (hTsip);
  1320. ...
  1321. @endverbatim
  1322. * =============================================================================
  1323. */
  1324. static inline Uint8 CSL_tsipSIUGetTxDataRate (CSL_TsipHandle hTsip)
  1325. {
  1326. return (Uint8)CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTDATR);
  1327. }
  1328. /** ============================================================================
  1329. * @n@b CSL_tsipSIUSetTxClockMode
  1330. *
  1331. * @b Description
  1332. * @n This function sets the transmit clock mode
  1333. *
  1334. * @b Arguments
  1335. * @verbatim
  1336. hTsip Handle to TSIP instance
  1337. txClockMode Transmit Clock Mode
  1338. 0 - Double Rate Clock
  1339. 1 - Single Rate Clock
  1340. @endverbatim
  1341. *
  1342. * <b> Return Value </b>
  1343. * @n None.
  1344. *
  1345. * <b> Pre Condition </b>
  1346. * @n @a CSL_tsipOpen() must be called successfully.
  1347. *
  1348. * <b> Post Condition </b>
  1349. * @n None
  1350. *
  1351. * @b Writes
  1352. * @n TSIP_SIU_XMTCTL_XMTCLKM
  1353. *
  1354. * @b Example
  1355. * @verbatim
  1356. CSL_TsipHandle hTsip;
  1357. // Open the TSIP Module 0
  1358. hTsip = CSL_tsipOpen(0);
  1359. // Set the Transmit Clock Mode to be Single Rate
  1360. CSL_tsipSIUSetTxClockMode (hTsip, 0);
  1361. ...
  1362. @endverbatim
  1363. * =============================================================================
  1364. */
  1365. static inline void CSL_tsipSIUSetTxClockMode
  1366. (
  1367. CSL_TsipHandle hTsip,
  1368. Uint8 txClockMode
  1369. )
  1370. {
  1371. /* Configure the transmit clock mode. */
  1372. CSL_FINS(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTCLKM, txClockMode);
  1373. return;
  1374. }
  1375. /** ============================================================================
  1376. * @n@b CSL_tsipSIUGetTxClockMode
  1377. *
  1378. * @b Description
  1379. * @n This function gets the transmit clock mode.
  1380. *
  1381. * @b Arguments
  1382. * @verbatim
  1383. hTsip Handle to TSIP instance
  1384. @endverbatim
  1385. *
  1386. * <b> Return Value </b>
  1387. * @n Transmit Clock Mode
  1388. * @n 0 - Double Rate Clock
  1389. * @n 1 - Single Rate Clock
  1390. *
  1391. * <b> Pre Condition </b>
  1392. * @n @a CSL_tsipOpen() must be called successfully.
  1393. *
  1394. * <b> Post Condition </b>
  1395. * @n None
  1396. *
  1397. * @b Reads
  1398. * @n TSIP_SIU_XMTCTL_XMTCLKM
  1399. *
  1400. * @b Example
  1401. * @verbatim
  1402. CSL_TsipHandle hTsip;
  1403. Uint8 txClockMode;
  1404. // Open the TSIP Module 0
  1405. hTsip = CSL_tsipOpen(0);
  1406. // Get the Transmit Clock Mode
  1407. txClockMode = CSL_tsipSIUGetTxClockMode (hTsip);
  1408. ...
  1409. @endverbatim
  1410. * =============================================================================
  1411. */
  1412. static inline Uint8 CSL_tsipSIUGetTxClockMode (CSL_TsipHandle hTsip)
  1413. {
  1414. return (Uint8)CSL_FEXT(hTsip->SIU_XMTCTL, TSIP_SIU_XMTCTL_XMTCLKM);
  1415. }
  1416. /** ============================================================================
  1417. * @n@b CSL_tsipSIUSetTxFrameCount
  1418. *
  1419. * @b Description
  1420. * @n This function sets the transmit frame count.
  1421. *
  1422. * @b Arguments
  1423. * @verbatim
  1424. hTsip Handle to TSIP instance
  1425. txFrameCount Transmit Frame Count
  1426. @endverbatim
  1427. *
  1428. * <b> Return Value </b>
  1429. * @n None.
  1430. *
  1431. * <b> Pre Condition </b>
  1432. * @n @a CSL_tsipOpen() must be called successfully.
  1433. *
  1434. * <b> Post Condition </b>
  1435. * @n None
  1436. *
  1437. * @b Writes
  1438. * @n TSIP_SIU_XMTSIZ_XMTFCNT
  1439. *
  1440. * @b Example
  1441. * @verbatim
  1442. CSL_TsipHandle hTsip;
  1443. // Open the TSIP Module 0
  1444. hTsip = CSL_tsipOpen(0);
  1445. // Set the Transmit Frame Count to 8
  1446. CSL_tsipSIUSetTxFrameCount (hTsip, 8);
  1447. ...
  1448. @endverbatim
  1449. * =============================================================================
  1450. */
  1451. static inline void CSL_tsipSIUSetTxFrameCount
  1452. (
  1453. CSL_TsipHandle hTsip,
  1454. Uint8 txFrameCount
  1455. )
  1456. {
  1457. /* Configure the transmit frame count mode. */
  1458. CSL_FINS(hTsip->SIU_XMTSIZ, TSIP_SIU_XMTSIZ_XMTFCNT, txFrameCount);
  1459. return;
  1460. }
  1461. /** ============================================================================
  1462. * @n@b CSL_tsipSIUGetTxFrameCount
  1463. *
  1464. * @b Description
  1465. * @n This function gets the transmit frame count.
  1466. *
  1467. * @b Arguments
  1468. * @verbatim
  1469. hTsip Handle to TSIP instance
  1470. @endverbatim
  1471. *
  1472. * <b> Return Value </b>
  1473. * @n Transmit Frame Count.
  1474. *
  1475. * <b> Pre Condition </b>
  1476. * @n @a CSL_tsipOpen() must be called successfully.
  1477. *
  1478. * <b> Post Condition </b>
  1479. * @n None
  1480. *
  1481. * @b Writes
  1482. * @n TSIP_SIU_XMTSIZ_XMTFCNT
  1483. *
  1484. * @b Example
  1485. * @verbatim
  1486. CSL_TsipHandle hTsip;
  1487. Uint8 txFrameCount;
  1488. // Open the TSIP Module 0
  1489. hTsip = CSL_tsipOpen(0);
  1490. // Get the Transmit Frame Count
  1491. txFrameCount = CSL_tsipSIUGetTxFrameCount (hTsip);
  1492. ...
  1493. @endverbatim
  1494. * =============================================================================
  1495. */
  1496. static inline Uint8 CSL_tsipSIUGetTxFrameCount (CSL_TsipHandle hTsip)
  1497. {
  1498. return CSL_FEXT(hTsip->SIU_XMTSIZ, TSIP_SIU_XMTSIZ_XMTFCNT);
  1499. }
  1500. /** ============================================================================
  1501. * @n@b CSL_tsipSIUSetTxFrameSize
  1502. *
  1503. * @b Description
  1504. * @n This function sets the transmit frame size
  1505. *
  1506. * @b Arguments
  1507. * @verbatim
  1508. hTsip Handle to TSIP instance
  1509. txFrameSize Transmit Frame Size
  1510. @endverbatim
  1511. *
  1512. * <b> Return Value </b>
  1513. * @n None.
  1514. *
  1515. * <b> Pre Condition </b>
  1516. * @n @a CSL_tsipOpen() must be called successfully.
  1517. *
  1518. * <b> Post Condition </b>
  1519. * @n None
  1520. *
  1521. * @b Writes
  1522. * @n TSIP_SIU_XMTSIZ_XMTFSIZ
  1523. *
  1524. * @b Example
  1525. * @verbatim
  1526. CSL_TsipHandle hTsip;
  1527. // Open the TSIP Module 0
  1528. hTsip = CSL_tsipOpen(0);
  1529. // Set the Transmit Frame Size to 8
  1530. CSL_tsipSIUSetTxFrameSize (hTsip, 8);
  1531. ...
  1532. @endverbatim
  1533. * =============================================================================
  1534. */
  1535. static inline void CSL_tsipSIUSetTxFrameSize
  1536. (
  1537. CSL_TsipHandle hTsip,
  1538. Uint8 txFrameSize
  1539. )
  1540. {
  1541. /* Configure the transmit frame size */
  1542. CSL_FINS(hTsip->SIU_XMTSIZ, TSIP_SIU_XMTSIZ_XMTFSIZ, txFrameSize);
  1543. return;
  1544. }
  1545. /** ============================================================================
  1546. * @n@b CSL_tsipSIUGetTxFrameSize
  1547. *
  1548. * @b Description
  1549. * @n This function gets the transmit frame size.
  1550. *
  1551. * @b Arguments
  1552. * @verbatim
  1553. hTsip Handle to TSIP instance
  1554. @endverbatim
  1555. *
  1556. * <b> Return Value </b>
  1557. * @n Transmit Frame Size.
  1558. *
  1559. * <b> Pre Condition </b>
  1560. * @n @a CSL_tsipOpen() must be called successfully.
  1561. *
  1562. * <b> Post Condition </b>
  1563. * @n None
  1564. *
  1565. * @b Writes
  1566. * @n TSIP_SIU_XMTSIZ_XMTFSIZ
  1567. *
  1568. * @b Example
  1569. * @verbatim
  1570. CSL_TsipHandle hTsip;
  1571. Uint8 txFrameSize;
  1572. // Open the TSIP Module 0
  1573. hTsip = CSL_tsipOpen(0);
  1574. // Get the Transmit Frame Size
  1575. txFrameSize = CSL_tsipSIUGetTxFrameSize (hTsip);
  1576. ...
  1577. @endverbatim
  1578. * =============================================================================
  1579. */
  1580. static inline Uint8 CSL_tsipSIUGetTxFrameSize (CSL_TsipHandle hTsip)
  1581. {
  1582. return CSL_FEXT(hTsip->SIU_XMTSIZ, TSIP_SIU_XMTSIZ_XMTFSIZ);
  1583. }
  1584. /** ============================================================================
  1585. * @n@b CSL_tsipSIUSetRxClockSource
  1586. *
  1587. * @b Description
  1588. * @n This function sets the SIU Receive Clock Source.
  1589. *
  1590. * @b Arguments
  1591. * @verbatim
  1592. hTsip Handle to TSIP instance
  1593. clockSource Clock Source to be used for the SIU Receive
  1594. Value of 0 implies TCLK_A else TCLK_B
  1595. @endverbatim
  1596. *
  1597. * <b> Return Value </b>
  1598. * @n None
  1599. *
  1600. * <b> Pre Condition </b>
  1601. * @n @a CSL_tsipOpen() must be called successfully.
  1602. *
  1603. * <b> Post Condition </b>
  1604. * @n None
  1605. *
  1606. * @b Writes
  1607. * @n TSIP_SIU_RCVSEL_RCVSRC
  1608. *
  1609. * @b Example
  1610. * @verbatim
  1611. CSL_TsipHandle hTsip;
  1612. // Open the TSIP Module 0
  1613. hTsip = CSL_tsipOpen(0);
  1614. // Set the SIU Receive Clock to use TCLK_B & TFS_B
  1615. CSL_tsipSIUSetRxClockSource(hTsip, 1);
  1616. ...
  1617. @endverbatim
  1618. * =============================================================================
  1619. */
  1620. static inline void CSL_tsipSIUSetRxClockSource (CSL_TsipHandle hTsip, Uint8 clockSource)
  1621. {
  1622. /* Use the clock source to configure the Receive Clock Source register.*/
  1623. if (clockSource == 0)
  1624. CSL_FINS(hTsip->SIU_RCVSEL, TSIP_SIU_RCVSEL_RCVSRC, 0);
  1625. else
  1626. CSL_FINS(hTsip->SIU_RCVSEL, TSIP_SIU_RCVSEL_RCVSRC, 1);
  1627. return;
  1628. }
  1629. /** ============================================================================
  1630. * @n@b CSL_tsipSIUGetRxClockSource
  1631. *
  1632. * @b Description
  1633. * @n This function gets the SIU Receive Clock Source.
  1634. *
  1635. * @b Arguments
  1636. * @verbatim
  1637. hTsip Handle to TSIP instance
  1638. @endverbatim
  1639. *
  1640. * <b> Return Value </b>
  1641. * @n 0 - Implies Clock Source A
  1642. * @n 1 - Implies Clock Source B
  1643. *
  1644. * <b> Pre Condition </b>
  1645. * @n @a CSL_tsipOpen() must be called successfully.
  1646. *
  1647. * <b> Post Condition </b>
  1648. * @n None
  1649. *
  1650. * @b Reads
  1651. * @n TSIP_SIU_RCVSEL_RCVSRC
  1652. *
  1653. * @b Example
  1654. * @verbatim
  1655. CSL_TsipHandle hTsip;
  1656. // Open the TSIP Module 0
  1657. hTsip = CSL_tsipOpen(0);
  1658. // Get the SIU Receive Clock Source
  1659. if (CSL_tsipSIUGetRxClockSource(hTsip) == 1)
  1660. {
  1661. // Using Clock Source A
  1662. }
  1663. else
  1664. {
  1665. // Using Clock Source B
  1666. }
  1667. ...
  1668. @endverbatim
  1669. * =============================================================================
  1670. */
  1671. static inline Uint8 CSL_tsipSIUGetRxClockSource (CSL_TsipHandle hTsip)
  1672. {
  1673. /* Get the clock source. */
  1674. return (Uint8) CSL_FEXT(hTsip->SIU_RCVSEL, TSIP_SIU_RCVSEL_RCVSRC);
  1675. }
  1676. /** ============================================================================
  1677. * @n@b CSL_tsipSIUSetRxDataDelay
  1678. *
  1679. * @b Description
  1680. * @n This function sets the receive data delay.
  1681. *
  1682. * @b Arguments
  1683. * @verbatim
  1684. hTsip Handle to TSIP instance
  1685. rxDataDelay Receive Data Delay to be configured.
  1686. @endverbatim
  1687. *
  1688. * <b> Return Value </b>
  1689. * @n None.
  1690. *
  1691. * <b> Pre Condition </b>
  1692. * @n @a CSL_tsipOpen() must be called successfully.
  1693. *
  1694. * <b> Post Condition </b>
  1695. * @n None
  1696. *
  1697. * @b Writes
  1698. * @n TSIP_SIU_RCVCTL_RCVDATD
  1699. *
  1700. * @b Example
  1701. * @verbatim
  1702. CSL_TsipHandle hTsip;
  1703. // Open the TSIP Module 0
  1704. hTsip = CSL_tsipOpen(0);
  1705. // Set the Receive Data Delay to be 1023 (Single Rate 8Mbps serial link with 128 time slots)
  1706. CSL_tsipSIUSetRxDataDelay (hTsip, 1023);
  1707. ...
  1708. @endverbatim
  1709. * =============================================================================
  1710. */
  1711. static inline void CSL_tsipSIUSetRxDataDelay (CSL_TsipHandle hTsip, Uint16 rxDataDelay)
  1712. {
  1713. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVDATD, rxDataDelay);
  1714. return;
  1715. }
  1716. /** ============================================================================
  1717. * @n@b CSL_tsipSIUGetRxDataDelay
  1718. *
  1719. * @b Description
  1720. * @n This function gets the transmit data delay.
  1721. *
  1722. * @b Arguments
  1723. * @verbatim
  1724. hTsip Handle to TSIP instance
  1725. @endverbatim
  1726. *
  1727. * <b> Return Value </b>
  1728. * @n Transmit Data Delay configured.
  1729. *
  1730. * <b> Pre Condition </b>
  1731. * @n @a CSL_tsipOpen() must be called successfully.
  1732. *
  1733. * <b> Post Condition </b>
  1734. * @n None
  1735. *
  1736. * @b Reads
  1737. * @n TSIP_SIU_RCVCTL_RCVDATD
  1738. *
  1739. * @b Example
  1740. * @verbatim
  1741. CSL_TsipHandle hTsip;
  1742. Uint16 rxDataDelay;
  1743. // Open the TSIP Module 0
  1744. hTsip = CSL_tsipOpen(0);
  1745. // Get the Receive Data Delay
  1746. rxDataDelay = CSL_tsipSIUGetRxDataDelay (hTsip);
  1747. ...
  1748. @endverbatim
  1749. * =============================================================================
  1750. */
  1751. static inline Uint16 CSL_tsipSIUGetRxDataDelay (CSL_TsipHandle hTsip)
  1752. {
  1753. return CSL_FEXT(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVDATD);
  1754. }
  1755. /** ============================================================================
  1756. * @n@b CSL_tsipSIUSetRxFrameSyncPolarity
  1757. *
  1758. * @b Description
  1759. * @n This function sets the receive frame sync polarity.
  1760. *
  1761. * @b Arguments
  1762. * @verbatim
  1763. hTsip Handle to TSIP instance
  1764. rxFrameSyncPolarity Receive Frame Sync Polarity to be configured.
  1765. 0 - Active Low
  1766. 1 - Active High
  1767. @endverbatim
  1768. *
  1769. * <b> Return Value </b>
  1770. * @n None.
  1771. *
  1772. * <b> Pre Condition </b>
  1773. * @n @a CSL_tsipOpen() must be called successfully.
  1774. *
  1775. * <b> Post Condition </b>
  1776. * @n None
  1777. *
  1778. * @b Writes
  1779. * @n TSIP_SIU_RCVCTL_RCVFSYNCP
  1780. *
  1781. * @b Example
  1782. * @verbatim
  1783. CSL_TsipHandle hTsip;
  1784. // Open the TSIP Module 0
  1785. hTsip = CSL_tsipOpen(0);
  1786. // Set the Receive frame sync polarity to be active low
  1787. CSL_tsipSIUSetRxFrameSyncPolarity (hTsip, 0);
  1788. ...
  1789. @endverbatim
  1790. * =============================================================================
  1791. */
  1792. static inline void CSL_tsipSIUSetRxFrameSyncPolarity
  1793. (
  1794. CSL_TsipHandle hTsip,
  1795. Uint8 rxFrameSyncPolarity
  1796. )
  1797. {
  1798. /* Use the Receive Frame Sync Polarity to configure the Receive Control Register. */
  1799. if (rxFrameSyncPolarity == 0)
  1800. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVFSYNCP, 0);
  1801. else
  1802. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVFSYNCP, 1);
  1803. return;
  1804. }
  1805. /** ============================================================================
  1806. * @n@b CSL_tsipSIUGetRxFrameSyncPolarity
  1807. *
  1808. * @b Description
  1809. * @n This function gets the receive frame sync polarity.
  1810. *
  1811. * @b Arguments
  1812. * @verbatim
  1813. hTsip Handle to TSIP instance
  1814. @endverbatim
  1815. *
  1816. * <b> Return Value </b>
  1817. * @n Receive Frame Sync Polarity
  1818. * @n 0 - Active Low
  1819. * @n 1 - Active High
  1820. *
  1821. * <b> Pre Condition </b>
  1822. * @n @a CSL_tsipOpen() must be called successfully.
  1823. *
  1824. * <b> Post Condition </b>
  1825. * @n None
  1826. *
  1827. * @b Writes
  1828. * @n TSIP_SIU_RCVCTL_RCVFSYNCP
  1829. *
  1830. * @b Example
  1831. * @verbatim
  1832. CSL_TsipHandle hTsip;
  1833. Uint8 rxFrameSyncPolarity;
  1834. // Open the TSIP Module 0
  1835. hTsip = CSL_tsipOpen(0);
  1836. // Get the Receive frame sync polarity
  1837. rxFrameSyncPolarity = CSL_tsipSIUGetRxFrameSyncPolarity (hTsip);
  1838. ...
  1839. @endverbatim
  1840. * =============================================================================
  1841. */
  1842. static inline Uint8 CSL_tsipSIUGetRxFrameSyncPolarity(CSL_TsipHandle hTsip)
  1843. {
  1844. return (Uint8)CSL_FEXT(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVFSYNCP);
  1845. }
  1846. /** ============================================================================
  1847. * @n@b CSL_tsipSIUSetRxFrameSyncClockPolarity
  1848. *
  1849. * @b Description
  1850. * @n This function sets the receive frame sync clock polarity.
  1851. *
  1852. * @b Arguments
  1853. * @verbatim
  1854. hTsip Handle to TSIP instance
  1855. rxFrameSyncClockPolarity Receive Frame Sync Polarity to be configured.
  1856. 0 - Clock is sample on the rising edge
  1857. 1 - Clock is sample on the falling edge
  1858. @endverbatim
  1859. *
  1860. * <b> Return Value </b>
  1861. * @n None.
  1862. *
  1863. * <b> Pre Condition </b>
  1864. * @n @a CSL_tsipOpen() must be called successfully.
  1865. *
  1866. * <b> Post Condition </b>
  1867. * @n None
  1868. *
  1869. * @b Writes
  1870. * @n TSIP_SIU_RCVCTL_RCVFCLKP
  1871. *
  1872. * @b Example
  1873. * @verbatim
  1874. CSL_TsipHandle hTsip;
  1875. // Open the TSIP Module 0
  1876. hTsip = CSL_tsipOpen(0);
  1877. // Set the Receive frame sync clock polarity to be on the falling edge
  1878. CSL_tsipSIUSetRxFrameSyncClockPolarity (hTsip, 1);
  1879. ...
  1880. @endverbatim
  1881. * =============================================================================
  1882. */
  1883. static inline void CSL_tsipSIUSetRxFrameSyncClockPolarity
  1884. (
  1885. CSL_TsipHandle hTsip,
  1886. Uint8 rxFrameSyncClockPolarity
  1887. )
  1888. {
  1889. /* Use the Receive Frame Sync Polarity to configure the Receive Control Register. */
  1890. if (rxFrameSyncClockPolarity == 0)
  1891. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVFCLKP, 0);
  1892. else
  1893. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVFCLKP, 1);
  1894. return;
  1895. }
  1896. /** ============================================================================
  1897. * @n@b CSL_tsipSIUGetRxFrameSyncClockPolarity
  1898. *
  1899. * @b Description
  1900. * @n This function gets the receive frame sync clock polarity.
  1901. *
  1902. * @b Arguments
  1903. * @verbatim
  1904. hTsip Handle to TSIP instance
  1905. @endverbatim
  1906. *
  1907. * <b> Return Value </b>
  1908. * @n Receive Frame Sync Polarity
  1909. * @n 0 - Clock is sampled on the rising edge
  1910. * @n 1 - Clock is sampled on the falling edge
  1911. *
  1912. * <b> Pre Condition </b>
  1913. * @n @a CSL_tsipOpen() must be called successfully.
  1914. *
  1915. * <b> Post Condition </b>
  1916. * @n None
  1917. *
  1918. * @b Writes
  1919. * @n TSIP_SIU_RCVCTL_RCVFCLKP
  1920. *
  1921. * @b Example
  1922. * @verbatim
  1923. CSL_TsipHandle hTsip;
  1924. Uint8 rxFrameSyncClockPolarity;
  1925. // Open the TSIP Module 0
  1926. hTsip = CSL_tsipOpen(0);
  1927. // Get the Receive frame sync clock polarity
  1928. rxFrameSyncClockPolarity = CSL_tsipSIUGetRxFrameSyncClockPolarity (hTsip);
  1929. ...
  1930. @endverbatim
  1931. * =============================================================================
  1932. */
  1933. static inline Uint8 CSL_tsipSIUGetRxFrameSyncClockPolarity(CSL_TsipHandle hTsip)
  1934. {
  1935. return (Uint8)CSL_FEXT(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVFCLKP);
  1936. }
  1937. /** ============================================================================
  1938. * @n@b CSL_tsipSIUSetRxDataClockPolarity
  1939. *
  1940. * @b Description
  1941. * @n This function sets the receive frame data clock polarity.
  1942. *
  1943. * @b Arguments
  1944. * @verbatim
  1945. hTsip Handle to TSIP instance
  1946. rxDataClockPolarity Receive Data Clock Polarity to be configured.
  1947. 0 - Clock is sampled on the rising edge
  1948. 1 - Clock is sampled on the falling edge
  1949. @endverbatim
  1950. *
  1951. * <b> Return Value </b>
  1952. * @n None.
  1953. *
  1954. * <b> Pre Condition </b>
  1955. * @n @a CSL_tsipOpen() must be called successfully.
  1956. *
  1957. * <b> Post Condition </b>
  1958. * @n None
  1959. *
  1960. * @b Writes
  1961. * @n TSIP_SIU_RCVCTL_RCVDCLKP
  1962. *
  1963. * @b Example
  1964. * @verbatim
  1965. CSL_TsipHandle hTsip;
  1966. // Open the TSIP Module 0
  1967. hTsip = CSL_tsipOpen(0);
  1968. // Set the Receive data clock polarity to be on the falling edge
  1969. CSL_tsipSIUSetRxDataClockPolarity (hTsip, 1);
  1970. ...
  1971. @endverbatim
  1972. * =============================================================================
  1973. */
  1974. static inline void CSL_tsipSIUSetRxDataClockPolarity
  1975. (
  1976. CSL_TsipHandle hTsip,
  1977. Uint8 rxDataClockPolarity
  1978. )
  1979. {
  1980. /* Use the Receive Data Clock Polarity to configure the Receive Control Register. */
  1981. if (rxDataClockPolarity == 0)
  1982. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVDCLKP, 0);
  1983. else
  1984. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVDCLKP, 1);
  1985. return;
  1986. }
  1987. /** ============================================================================
  1988. * @n@b CSL_tsipSIUGetRxDataClockPolarity
  1989. *
  1990. * @b Description
  1991. * @n This function gets the receive frame data clock polarity.
  1992. *
  1993. * @b Arguments
  1994. * @verbatim
  1995. hTsip Handle to TSIP instance
  1996. @endverbatim
  1997. *
  1998. * <b> Return Value </b>
  1999. * @n Receive Data Clock Polarity.
  2000. * @n 0 - Clock is sampled on the rising edge
  2001. * @n 1 - Clock is sampled on the falling edge
  2002. *
  2003. * <b> Pre Condition </b>
  2004. * @n @a CSL_tsipOpen() must be called successfully.
  2005. *
  2006. * <b> Post Condition </b>
  2007. * @n None
  2008. *
  2009. * @b Reads
  2010. * @n TSIP_SIU_RCVCTL_RCVDCLKP
  2011. *
  2012. * @b Example
  2013. * @verbatim
  2014. CSL_TsipHandle hTsip;
  2015. Uint8 rxDataClockPolarity;
  2016. // Open the TSIP Module 0
  2017. hTsip = CSL_tsipOpen(0);
  2018. // Get the Receive data clock polarity...
  2019. rxDataClockPolarity = CSL_tsipSIUGetRxDataClockPolarity (hTsip);
  2020. ...
  2021. @endverbatim
  2022. * =============================================================================
  2023. */
  2024. static inline Uint8 CSL_tsipSIUGetRxDataClockPolarity(CSL_TsipHandle hTsip)
  2025. {
  2026. return (Uint8)CSL_FEXT(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVDCLKP);
  2027. }
  2028. /** ============================================================================
  2029. * @n@b CSL_tsipSIUSetRxDataRate
  2030. *
  2031. * @b Description
  2032. * @n This function sets the receive frame data rate
  2033. *
  2034. * @b Arguments
  2035. * @verbatim
  2036. hTsip Handle to TSIP instance
  2037. rxDataRate Receive Data Rate
  2038. 0 - Data Rate is 8.192 Mbps
  2039. 1 - Data Rate is 16.384 Mbps
  2040. 2 - Data Rate is 32.768 Mbps
  2041. @endverbatim
  2042. *
  2043. * <b> Return Value </b>
  2044. * @n None.
  2045. *
  2046. * <b> Pre Condition </b>
  2047. * @n @a CSL_tsipOpen() must be called successfully.
  2048. *
  2049. * <b> Post Condition </b>
  2050. * @n None
  2051. *
  2052. * @b Writes
  2053. * @n TSIP_SIU_RCVCTL_RCVDATR
  2054. *
  2055. * @b Example
  2056. * @verbatim
  2057. CSL_TsipHandle hTsip;
  2058. // Open the TSIP Module 0
  2059. hTsip = CSL_tsipOpen(0);
  2060. // Set the Receive data rate to be 8Mbps
  2061. CSL_tsipSIUSetRxDataRate (hTsip, 0);
  2062. ...
  2063. @endverbatim
  2064. * =============================================================================
  2065. */
  2066. static inline void CSL_tsipSIUSetRxDataRate
  2067. (
  2068. CSL_TsipHandle hTsip,
  2069. Uint8 rxDataRate
  2070. )
  2071. {
  2072. /* Configure the receive data rate. */
  2073. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVDATR, rxDataRate);
  2074. return;
  2075. }
  2076. /** ============================================================================
  2077. * @n@b CSL_tsipSIUGetRxDataRate
  2078. *
  2079. * @b Description
  2080. * @n This function gets the receive frame data rate
  2081. *
  2082. * @b Arguments
  2083. * @verbatim
  2084. hTsip Handle to TSIP instance
  2085. @endverbatim
  2086. *
  2087. * <b> Return Value </b>
  2088. * @n Receive Data Rate
  2089. * @n 0 - Data Rate is 8.192 Mbps
  2090. * @n 1 - Data Rate is 16.384 Mbps
  2091. * @n 2 - Data Rate is 32.768 Mbps
  2092. *
  2093. * <b> Pre Condition </b>
  2094. * @n @a CSL_tsipOpen() must be called successfully.
  2095. *
  2096. * <b> Post Condition </b>
  2097. * @n None
  2098. *
  2099. * @b Reads
  2100. * @n TSIP_SIU_RCVCTL_RCVDATR
  2101. *
  2102. * @b Example
  2103. * @verbatim
  2104. CSL_TsipHandle hTsip;
  2105. Uint8 rxDataRate;
  2106. // Open the TSIP Module 0
  2107. hTsip = CSL_tsipOpen(0);
  2108. // Get the Receive data rate to be 8Mbps
  2109. rxDataRate = CSL_tsipSIUGetRxDataRate (hTsip);
  2110. ...
  2111. @endverbatim
  2112. * =============================================================================
  2113. */
  2114. static inline Uint8 CSL_tsipSIUGetRxDataRate(CSL_TsipHandle hTsip)
  2115. {
  2116. /* Configure the receive data rate. */
  2117. return (Uint8)CSL_FEXT(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVDATR);
  2118. }
  2119. /** ============================================================================
  2120. * @n@b CSL_tsipSIUSetRxClockMode
  2121. *
  2122. * @b Description
  2123. * @n This function sets the receive clock mode.
  2124. *
  2125. * @b Arguments
  2126. * @verbatim
  2127. hTsip Handle to TSIP instance
  2128. rxClockMode Receive Clock Mode
  2129. 0 - Double Rate Clock
  2130. 1 - Single Rate Clock
  2131. @endverbatim
  2132. *
  2133. * <b> Return Value </b>
  2134. * @n None.
  2135. *
  2136. * <b> Pre Condition </b>
  2137. * @n @a CSL_tsipOpen() must be called successfully.
  2138. *
  2139. * <b> Post Condition </b>
  2140. * @n None
  2141. *
  2142. * @b Writes
  2143. * @n TSIP_SIU_RCVCTL_RCVCLKM
  2144. *
  2145. * @b Example
  2146. * @verbatim
  2147. CSL_TsipHandle hTsip;
  2148. // Open the TSIP Module 0
  2149. hTsip = CSL_tsipOpen(0);
  2150. // Set the Receive clock mode to be a single rate clock
  2151. CSL_tsipSIUSetRxClockMode (hTsip, 1);
  2152. ...
  2153. @endverbatim
  2154. * =============================================================================
  2155. */
  2156. static inline void CSL_tsipSIUSetRxClockMode
  2157. (
  2158. CSL_TsipHandle hTsip,
  2159. Uint8 rxClockMode
  2160. )
  2161. {
  2162. /* Configure the receive clock mode. */
  2163. if (rxClockMode == 0)
  2164. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVCLKM, 0);
  2165. else
  2166. CSL_FINS(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVCLKM, 1);
  2167. return;
  2168. }
  2169. /** ============================================================================
  2170. * @n@b CSL_tsipSIUGetRxClockMode
  2171. *
  2172. * @b Description
  2173. * @n This function gets the receive clock mode.
  2174. *
  2175. * @b Arguments
  2176. * @verbatim
  2177. hTsip Handle to TSIP instance
  2178. @endverbatim
  2179. *
  2180. * <b> Return Value </b>
  2181. * @n Receive Clock Mode.
  2182. * @n 0 - Double Rate Clock
  2183. * @n 1 - Single Rate Clock
  2184. *
  2185. * <b> Pre Condition </b>
  2186. * @n @a CSL_tsipOpen() must be called successfully.
  2187. *
  2188. * <b> Post Condition </b>
  2189. * @n None
  2190. *
  2191. * @b Reads
  2192. * @n TSIP_SIU_RCVCTL_RCVCLKM
  2193. *
  2194. * @b Example
  2195. * @verbatim
  2196. CSL_TsipHandle hTsip;
  2197. Uint8 rxClockMode;
  2198. // Open the TSIP Module 0
  2199. hTsip = CSL_tsipOpen(0);
  2200. // Get the Receive clock mode
  2201. rxClockMode = CSL_tsipSIUGetRxClockMode (hTsip, 1);
  2202. ...
  2203. @endverbatim
  2204. * =============================================================================
  2205. */
  2206. static inline Uint8 CSL_tsipSIUGetRxClockMode(CSL_TsipHandle hTsip)
  2207. {
  2208. return (Uint8)CSL_FEXT(hTsip->SIU_RCVCTL, TSIP_SIU_RCVCTL_RCVCLKM);
  2209. }
  2210. /** ============================================================================
  2211. * @n@b CSL_tsipSIUSetRxFrameSize
  2212. *
  2213. * @b Description
  2214. * @n This function sets the receive frame size
  2215. *
  2216. * @b Arguments
  2217. * @verbatim
  2218. hTsip Handle to TSIP instance
  2219. rxFrameSize Receive Frame Size
  2220. @endverbatim
  2221. *
  2222. * <b> Return Value </b>
  2223. * @n None.
  2224. *
  2225. * <b> Pre Condition </b>
  2226. * @n @a CSL_tsipOpen() must be called successfully.
  2227. *
  2228. * <b> Post Condition </b>
  2229. * @n None
  2230. *
  2231. * @b Writes
  2232. * @n TSIP_SIU_RCVSIZ_RCVFSIZ
  2233. *
  2234. * @b Example
  2235. * @verbatim
  2236. CSL_TsipHandle hTsip;
  2237. // Open the TSIP Module 0
  2238. hTsip = CSL_tsipOpen(0);
  2239. // Set the Receive frame size to be 8
  2240. CSL_tsipSIUSetRxFrameSize (hTsip, 8);
  2241. ...
  2242. @endverbatim
  2243. * =============================================================================
  2244. */
  2245. static inline void CSL_tsipSIUSetRxFrameSize
  2246. (
  2247. CSL_TsipHandle hTsip,
  2248. Uint8 rxFrameSize
  2249. )
  2250. {
  2251. /* Configure the receive frame size */
  2252. CSL_FINS(hTsip->SIU_RCVSIZ, TSIP_SIU_RCVSIZ_RCVFSIZ, rxFrameSize);
  2253. return;
  2254. }
  2255. /** ============================================================================
  2256. * @n@b CSL_tsipSIUGetRxFrameSize
  2257. *
  2258. * @b Description
  2259. * @n This function gets the receive frame size
  2260. *
  2261. * @b Arguments
  2262. * @verbatim
  2263. hTsip Handle to TSIP instance
  2264. @endverbatim
  2265. *
  2266. * <b> Return Value </b>
  2267. * @n Receive Frame Size.
  2268. *
  2269. * <b> Pre Condition </b>
  2270. * @n @a CSL_tsipOpen() must be called successfully.
  2271. *
  2272. * <b> Post Condition </b>
  2273. * @n None
  2274. *
  2275. * @b Reads
  2276. * @n TSIP_SIU_RCVSIZ_RCVFSIZ
  2277. *
  2278. * @b Example
  2279. * @verbatim
  2280. CSL_TsipHandle hTsip;
  2281. Uint8 rxFrameSize;
  2282. // Open the TSIP Module 0
  2283. hTsip = CSL_tsipOpen(0);
  2284. // Get the Receive frame size
  2285. rxFrameSize = CSL_tsipSIUGetRxFrameSize (hTsip);
  2286. ...
  2287. @endverbatim
  2288. * =============================================================================
  2289. */
  2290. static inline Uint8 CSL_tsipSIUGetRxFrameSize(CSL_TsipHandle hTsip)
  2291. {
  2292. /* Configure the receive frame size */
  2293. return (Uint8)CSL_FEXT(hTsip->SIU_RCVSIZ, TSIP_SIU_RCVSIZ_RCVFSIZ);
  2294. }
  2295. /** ============================================================================
  2296. * @n@b CSL_tsipSIUSetRxFrameCount
  2297. *
  2298. * @b Description
  2299. * @n This function sets the receive frame count
  2300. *
  2301. * @b Arguments
  2302. * @verbatim
  2303. hTsip Handle to TSIP instance
  2304. rxFrameCount Receive Frame Count
  2305. @endverbatim
  2306. *
  2307. * <b> Return Value </b>
  2308. * @n None.
  2309. *
  2310. * <b> Pre Condition </b>
  2311. * @n @a CSL_tsipOpen() must be called successfully.
  2312. *
  2313. * <b> Post Condition </b>
  2314. * @n None
  2315. *
  2316. * @b Writes
  2317. * @n TSIP_SIU_RCVSIZ_RCVFCNT
  2318. *
  2319. * @b Example
  2320. * @verbatim
  2321. CSL_TsipHandle hTsip;
  2322. // Open the TSIP Module 0
  2323. hTsip = CSL_tsipOpen(0);
  2324. // Set the Receive frame count to be 8
  2325. CSL_tsipSIUSetRxFrameCount (hTsip, 8);
  2326. ...
  2327. @endverbatim
  2328. * =============================================================================
  2329. */
  2330. static inline void CSL_tsipSIUSetRxFrameCount
  2331. (
  2332. CSL_TsipHandle hTsip,
  2333. Uint8 rxFrameCount
  2334. )
  2335. {
  2336. /* Configure the receive frame count */
  2337. CSL_FINS(hTsip->SIU_RCVSIZ, TSIP_SIU_RCVSIZ_RCVFCNT, rxFrameCount);
  2338. return;
  2339. }
  2340. /** ============================================================================
  2341. * @n@b CSL_tsipSIUGetRxFrameCount
  2342. *
  2343. * @b Description
  2344. * @n This function sets the receive frame count
  2345. *
  2346. * @b Arguments
  2347. * @verbatim
  2348. hTsip Handle to TSIP instance
  2349. @endverbatim
  2350. *
  2351. * <b> Return Value </b>
  2352. * @n Receive Frame Count.
  2353. *
  2354. * <b> Pre Condition </b>
  2355. * @n @a CSL_tsipOpen() must be called successfully.
  2356. *
  2357. * <b> Post Condition </b>
  2358. * @n None
  2359. *
  2360. * @b Writes
  2361. * @n TSIP_SIU_RCVSIZ_RCVFCNT
  2362. *
  2363. * @b Example
  2364. * @verbatim
  2365. CSL_TsipHandle hTsip;
  2366. Uint8 rxFrameCount;
  2367. // Open the TSIP Module 0
  2368. hTsip = CSL_tsipOpen(0);
  2369. // Get the Receive frame count
  2370. rxFrameCount = CSL_tsipSIUGetRxFrameCount (hTsip);
  2371. ...
  2372. @endverbatim
  2373. * =============================================================================
  2374. */
  2375. static inline Uint8 CSL_tsipSIUGetRxFrameCount(CSL_TsipHandle hTsip)
  2376. {
  2377. /* Get the receive frame count */
  2378. return (Uint8)CSL_FEXT(hTsip->SIU_RCVSIZ, TSIP_SIU_RCVSIZ_RCVFCNT);
  2379. }
  2380. /** ============================================================================
  2381. * @n@b CSL_tsipTDMUDisable
  2382. *
  2383. * @b Description
  2384. * @n This function is used to disable the TDMU and DMATCU
  2385. *
  2386. * @b Arguments
  2387. * @verbatim
  2388. hTsip Handle to TSIP instance
  2389. @endverbatim
  2390. *
  2391. * <b> Return Value </b>
  2392. * @n None
  2393. *
  2394. * <b> Pre Condition </b>
  2395. * @n @a CSL_tsipOpen() must be called successfully.
  2396. *
  2397. * <b> Post Condition </b>
  2398. * @n None
  2399. *
  2400. * @b Writes
  2401. * @n TSIP_TDMU_GCTL_DMAENB=0
  2402. *
  2403. * @b Example
  2404. * @verbatim
  2405. CSL_TsipHandle hTsip;
  2406. // Open the TSIP Module 0
  2407. hTsip = CSL_tsipOpen(0);
  2408. // Disable the TDMU and DMATCU
  2409. CSL_tsipTDMUDisable(hTsip);
  2410. ...
  2411. @endverbatim
  2412. * =============================================================================
  2413. */
  2414. static inline void CSL_tsipTDMUDisable(CSL_TsipHandle hTsip)
  2415. {
  2416. CSL_FINS (hTsip->TDMU_GCTL, TSIP_TDMU_GCTL_DMAENB, 0);
  2417. return;
  2418. }
  2419. /** ============================================================================
  2420. * @n@b CSL_tsipTDMUEnable
  2421. *
  2422. * @b Description
  2423. * @n This function is used to enable the TDMU and DMATCU
  2424. *
  2425. * @b Arguments
  2426. * @verbatim
  2427. hTsip Handle to TSIP instance
  2428. @endverbatim
  2429. *
  2430. * <b> Return Value </b>
  2431. * @n None
  2432. *
  2433. * <b> Pre Condition </b>
  2434. * @n @a CSL_tsipOpen() must be called successfully.
  2435. *
  2436. * <b> Post Condition </b>
  2437. * @n None
  2438. *
  2439. * @b Writes
  2440. * @n TSIP_TDMU_GCTL_DMAENB=1
  2441. *
  2442. * @b Example
  2443. * @verbatim
  2444. CSL_TsipHandle hTsip;
  2445. // Open the TSIP Module 0
  2446. hTsip = CSL_tsipOpen(0);
  2447. // Enable the TDMU and DMATCU
  2448. CSL_tsipTDMUEnable(hTsip);
  2449. ...
  2450. @endverbatim
  2451. * =============================================================================
  2452. */
  2453. static inline void CSL_tsipTDMUEnable(CSL_TsipHandle hTsip)
  2454. {
  2455. CSL_FINS (hTsip->TDMU_GCTL, TSIP_TDMU_GCTL_DMAENB, 1);
  2456. return;
  2457. }
  2458. /** ============================================================================
  2459. * @n@b CSL_tsipTDMUIsEnabled
  2460. *
  2461. * @b Description
  2462. * @n This function is used to check if the TDMU and DMATCU is enabled or not?
  2463. *
  2464. * @b Arguments
  2465. * @verbatim
  2466. hTsip Handle to TSIP instance
  2467. @endverbatim
  2468. *
  2469. * <b> Return Value </b>
  2470. * @n Status of the TDMU and DMATCU
  2471. * @n TRUE - TDMU/DMATCU are enabled and running
  2472. * @n FALSE - TDMU/DMATCU are disabled and stopped
  2473. *
  2474. * <b> Pre Condition </b>
  2475. * @n @a CSL_tsipOpen() must be called successfully.
  2476. *
  2477. * <b> Post Condition </b>
  2478. * @n None
  2479. *
  2480. * @b Reads
  2481. * @n TSIP_TDMU_GCTL_DMAENB
  2482. *
  2483. * @b Example
  2484. * @verbatim
  2485. CSL_TsipHandle hTsip;
  2486. // Open the TSIP Module 0
  2487. hTsip = CSL_tsipOpen(0);
  2488. // Is the TDMU and DMATCU enabled?
  2489. if (CSL_tsipTDMUIsEnabled(hTsip) == TRUE)
  2490. {
  2491. // TDMU and DMATCU is enabled and running.
  2492. }
  2493. ...
  2494. @endverbatim
  2495. * =============================================================================
  2496. */
  2497. static inline Bool CSL_tsipTDMUIsEnabled(CSL_TsipHandle hTsip)
  2498. {
  2499. if (CSL_FEXT (hTsip->TDMU_GCTL, TSIP_TDMU_GCTL_DMAENB) == 1)
  2500. return TRUE;
  2501. return FALSE;
  2502. }
  2503. /** ============================================================================
  2504. * @n@b CSL_tsipTDMUGetTxFreeRunningCounter
  2505. *
  2506. * @b Description
  2507. * @n This function gets the transmit free running frame counter
  2508. *
  2509. * @b Arguments
  2510. * @verbatim
  2511. hTsip Handle to TSIP instance
  2512. @endverbatim
  2513. *
  2514. * <b> Return Value </b>
  2515. * @n Transmit Free Running Frame Counter.
  2516. *
  2517. * <b> Pre Condition </b>
  2518. * @n @a CSL_tsipOpen() must be called successfully.
  2519. *
  2520. * <b> Post Condition </b>
  2521. * @n None
  2522. *
  2523. * @b Reads
  2524. * @n TSIP_XMTFRFC_TXFRFC
  2525. *
  2526. * @b Example
  2527. * @verbatim
  2528. CSL_TsipHandle hTsip;
  2529. Uint32 txCounter;
  2530. // Open the TSIP Module 0
  2531. hTsip = CSL_tsipOpen(0);
  2532. ...
  2533. // Get the transmit free running frame counter.
  2534. txCounter = CSL_tsipTDMUGetTxFreeRunningCounter(hTsip);
  2535. ...
  2536. @endverbatim
  2537. * =============================================================================
  2538. */
  2539. static inline Uint32 CSL_tsipTDMUGetTxFreeRunningCounter(CSL_TsipHandle hTsip)
  2540. {
  2541. return (Uint32)CSL_FEXT(hTsip->XMTFRFC, TSIP_XMTFRFC_TXFRFC);
  2542. }
  2543. /** ============================================================================
  2544. * @n@b CSL_tsipTDMUGetRxFreeRunningCounter
  2545. *
  2546. * @b Description
  2547. * @n This function gets the receive free running frame counter
  2548. *
  2549. * @b Arguments
  2550. * @verbatim
  2551. hTsip Handle to TSIP instance
  2552. @endverbatim
  2553. *
  2554. * <b> Return Value </b>
  2555. * @n Receive Free Running Frame Counter.
  2556. *
  2557. * <b> Pre Condition </b>
  2558. * @n @a CSL_tsipOpen() must be called successfully.
  2559. *
  2560. * <b> Post Condition </b>
  2561. * @n None
  2562. *
  2563. * @b Reads
  2564. * @n TSIP_RCVFRFC_RXFRFC
  2565. *
  2566. * @b Example
  2567. * @verbatim
  2568. CSL_TsipHandle hTsip;
  2569. Uint32 rxCounter;
  2570. // Open the TSIP Module 0
  2571. hTsip = CSL_tsipOpen(0);
  2572. ...
  2573. // Get the receive free running frame counter.
  2574. rxCounter = CSL_tsipTDMUGetRxFreeRunningCounter(hTsip);
  2575. ...
  2576. @endverbatim
  2577. * =============================================================================
  2578. */
  2579. static inline Uint32 CSL_tsipTDMUGetRxFreeRunningCounter(CSL_TsipHandle hTsip)
  2580. {
  2581. return (Uint32)CSL_FEXT(hTsip->RCVFRFC, TSIP_RCVFRFC_RXFRFC);
  2582. }
  2583. /** ============================================================================
  2584. * @n@b CSL_tsipTDMUSetEndianess
  2585. *
  2586. * @b Description
  2587. * @n This function sets the endian mode in which the TDMU operates.
  2588. *
  2589. * @b Arguments
  2590. * @verbatim
  2591. hTsip Handle to TSIP instance
  2592. endian Endianess for the TDMU
  2593. 0 - Little Endian
  2594. 1 - Big Endian
  2595. @endverbatim
  2596. *
  2597. * <b> Return Value </b>
  2598. * @n Receive Free Running Frame Counter.
  2599. *
  2600. * <b> Pre Condition </b>
  2601. * @n @a CSL_tsipOpen() must be called successfully.
  2602. *
  2603. * <b> Post Condition </b>
  2604. * @n None
  2605. *
  2606. * @b Writes
  2607. * @n TSIP_TDMU_GECTL_BEND
  2608. *
  2609. * @b Example
  2610. * @verbatim
  2611. CSL_TsipHandle hTsip;
  2612. // Open the TSIP Module 0
  2613. hTsip = CSL_tsipOpen(0);
  2614. ...
  2615. // Set the endianess to operate in Little Endian
  2616. CSL_tsipTDMUSetEndianess(hTsip, 0);
  2617. ...
  2618. @endverbatim
  2619. * =============================================================================
  2620. */
  2621. static inline void CSL_tsipTDMUSetEndianess
  2622. (
  2623. CSL_TsipHandle hTsip,
  2624. Uint8 endian
  2625. )
  2626. {
  2627. /* Configure the endianess */
  2628. if (endian == 0)
  2629. CSL_FINS (hTsip->TDMU_GECTL, TSIP_TDMU_GECTL_BEND, 0);
  2630. else
  2631. CSL_FINS (hTsip->TDMU_GECTL, TSIP_TDMU_GECTL_BEND, 1);
  2632. return;
  2633. }
  2634. /** ============================================================================
  2635. * @n@b CSL_tsipTDMUGetEndianess
  2636. *
  2637. * @b Description
  2638. * @n This function gets the endian mode in which the TDMU operates.
  2639. *
  2640. * @b Arguments
  2641. * @verbatim
  2642. hTsip Handle to TSIP instance
  2643. @endverbatim
  2644. *
  2645. * <b> Return Value </b>
  2646. * @n Endianess
  2647. * @n 0 - Little Endian
  2648. * @n 1 - Big Endian
  2649. *
  2650. * <b> Pre Condition </b>
  2651. * @n @a CSL_tsipOpen() must be called successfully.
  2652. *
  2653. * <b> Post Condition </b>
  2654. * @n None
  2655. *
  2656. * @b Reads
  2657. * @n TSIP_TDMU_GECTL_BEND
  2658. *
  2659. * @b Example
  2660. * @verbatim
  2661. CSL_TsipHandle hTsip;
  2662. Uint8 endian;
  2663. // Open the TSIP Module 0
  2664. hTsip = CSL_tsipOpen(0);
  2665. ...
  2666. // Get the endianess
  2667. endian = CSL_tsipTDMUGetEndianess(hTsip);
  2668. ...
  2669. @endverbatim
  2670. * =============================================================================
  2671. */
  2672. static inline Uint8 CSL_tsipTDMUGetEndianess(CSL_TsipHandle hTsip)
  2673. {
  2674. return (Uint8)CSL_FEXT (hTsip->TDMU_GECTL, TSIP_TDMU_GECTL_BEND);
  2675. }
  2676. /** ============================================================================
  2677. * @n@b CSL_tsipTDMUGetTxChannelBitmapStatus
  2678. *
  2679. * @b Description
  2680. * @n This function gets the transmit channel bitmap status.
  2681. *
  2682. * @b Arguments
  2683. * @verbatim
  2684. hTsip Handle to TSIP instance
  2685. channelNumber Tx Channel Number whose status is to be enquired.
  2686. @endverbatim
  2687. *
  2688. * <b> Return Value </b>
  2689. * @n Channel Status
  2690. * @n 0x0 - Both Bitmap A and B are inactive.
  2691. * @n 0x1 - Bitmap A is active and Bitmap B is inactive
  2692. * @n 0x2 - Bitmap A is inactive and Bitmap B is active
  2693. *
  2694. * <b> Pre Condition </b>
  2695. * @n @a CSL_tsipOpen() must be called successfully.
  2696. *
  2697. * <b> Post Condition </b>
  2698. * @n None
  2699. *
  2700. * @b Reads
  2701. * @n XMTCBAS
  2702. *
  2703. * @b Example
  2704. * @verbatim
  2705. CSL_TsipHandle hTsip;
  2706. Uint8 txChannelStatus;
  2707. // Open the TSIP Module 0
  2708. hTsip = CSL_tsipOpen(0);
  2709. ...
  2710. // Get the Transmit Channel Status of Channel 0
  2711. txChannelStatus = CSL_tsipTDMUGetTxChannelBitmapStatus(hTsip, 0);
  2712. ...
  2713. @endverbatim
  2714. * =============================================================================
  2715. */
  2716. static inline Uint8 CSL_tsipTDMUGetTxChannelBitmapStatus
  2717. (
  2718. CSL_TsipHandle hTsip,
  2719. Uint8 channelNumber
  2720. )
  2721. {
  2722. Uint8 lsb = (channelNumber << 1);
  2723. return (Uint8)CSL_FEXTR (hTsip->XMTCBAS, (lsb + 1), lsb);
  2724. }
  2725. /** ============================================================================
  2726. * @n@b CSL_tsipTDMUGetRxChannelBitmapStatus
  2727. *
  2728. * @b Description
  2729. * @n This function gets the receive channel bitmap status.
  2730. *
  2731. * @b Arguments
  2732. * @verbatim
  2733. hTsip Handle to TSIP instance
  2734. channelNumber Rx Channel Number whose status is to be enquired.
  2735. @endverbatim
  2736. *
  2737. * <b> Return Value </b>
  2738. * @n Channel Status
  2739. * @n 0x0 - Both Bitmap A and B are inactive.
  2740. * @n 0x1 - Bitmap A is active and Bitmap B is inactive
  2741. * @n 0x2 - Bitmap A is inactive and Bitmap B is active
  2742. *
  2743. * <b> Pre Condition </b>
  2744. * @n @a CSL_tsipOpen() must be called successfully.
  2745. *
  2746. * <b> Post Condition </b>
  2747. * @n None
  2748. *
  2749. * @b Reads
  2750. * @n RCVCBAS
  2751. *
  2752. * @b Example
  2753. * @verbatim
  2754. CSL_TsipHandle hTsip;
  2755. Uint8 rxChannelStatus;
  2756. // Open the TSIP Module 0
  2757. hTsip = CSL_tsipOpen(0);
  2758. ...
  2759. // Get the Receive Channel Status of Channel 0
  2760. rxChannelStatus = CSL_tsipTDMUGetRxChannelBitmapStatus(hTsip, 0);
  2761. ...
  2762. @endverbatim
  2763. * =============================================================================
  2764. */
  2765. static inline Uint8 CSL_tsipTDMUGetRxChannelBitmapStatus
  2766. (
  2767. CSL_TsipHandle hTsip,
  2768. Uint8 channelNumber
  2769. )
  2770. {
  2771. Uint8 lsb = (channelNumber << 1);
  2772. return (Uint8)CSL_FEXTR (hTsip->RCVCBAS, (lsb + 1), lsb);
  2773. }
  2774. /** ============================================================================
  2775. * @n@b CSL_tsipDMATCUSetMaxTransferPriority
  2776. *
  2777. * @b Description
  2778. * @n This function sets the MAX transfer priority of the DMATCU
  2779. *
  2780. * @b Arguments
  2781. * @verbatim
  2782. hTsip Handle to TSIP instance
  2783. maxPriority Max Transfer Priority of the DMATCU
  2784. @endverbatim
  2785. *
  2786. * <b> Return Value </b>
  2787. * @n None
  2788. *
  2789. * <b> Pre Condition </b>
  2790. * @n @a CSL_tsipOpen() must be called successfully.
  2791. *
  2792. * <b> Post Condition </b>
  2793. * @n None
  2794. *
  2795. * @b Writes
  2796. * @n TSIP_DMATCU_GCTL_MAXPRI
  2797. *
  2798. * @b Example
  2799. * @verbatim
  2800. CSL_TsipHandle hTsip;
  2801. // Open the TSIP Module 0
  2802. hTsip = CSL_tsipOpen(0);
  2803. ...
  2804. // Set the Max Transfer Priority to be 1
  2805. CSL_tsipDMATCUSetMaxTransferPriority (hTsip, 1);
  2806. ...
  2807. @endverbatim
  2808. * =============================================================================
  2809. */
  2810. static inline void CSL_tsipDMATCUSetMaxTransferPriority
  2811. (
  2812. CSL_TsipHandle hTsip,
  2813. Uint8 maxPriority
  2814. )
  2815. {
  2816. CSL_FINS(hTsip->DMATCU_GCTL, TSIP_DMATCU_GCTL_MAXPRI, maxPriority);
  2817. return;
  2818. }
  2819. /** ============================================================================
  2820. * @n@b CSL_tsipDMATCUGetMaxTransferPriority
  2821. *
  2822. * @b Description
  2823. * @n This function gets the MAX transfer priority of the DMATCU
  2824. *
  2825. * @b Arguments
  2826. * @verbatim
  2827. hTsip Handle to TSIP instance
  2828. @endverbatim
  2829. *
  2830. * <b> Return Value </b>
  2831. * @n Max Transfer Priority of the DMATCU
  2832. *
  2833. * <b> Pre Condition </b>
  2834. * @n @a CSL_tsipOpen() must be called successfully.
  2835. *
  2836. * <b> Post Condition </b>
  2837. * @n None
  2838. *
  2839. * @b Reads
  2840. * @n TSIP_DMATCU_GCTL_MAXPRI
  2841. *
  2842. * @b Example
  2843. * @verbatim
  2844. CSL_TsipHandle hTsip;
  2845. Uint8 maxPriority;
  2846. // Open the TSIP Module 0
  2847. hTsip = CSL_tsipOpen(0);
  2848. ...
  2849. // Get the Max Transfer Priority to be 1
  2850. maxPriority = CSL_tsipDMATCUGetMaxTransferPriority (hTsip);
  2851. ...
  2852. @endverbatim
  2853. * =============================================================================
  2854. */
  2855. static inline Uint8 CSL_tsipDMATCUGetMaxTransferPriority(CSL_TsipHandle hTsip)
  2856. {
  2857. return (Uint8)CSL_FEXT(hTsip->DMATCU_GCTL, TSIP_DMATCU_GCTL_MAXPRI);
  2858. }
  2859. /** ============================================================================
  2860. * @n@b CSL_tsipDMATCUSetTransferPriority
  2861. *
  2862. * @b Description
  2863. * @n This function sets the transfer priority of the DMATCU
  2864. *
  2865. * @b Arguments
  2866. * @verbatim
  2867. hTsip Handle to TSIP instance
  2868. priority Transfer Priority of the DMATCU
  2869. @endverbatim
  2870. *
  2871. * <b> Return Value </b>
  2872. * @n None
  2873. *
  2874. * <b> Pre Condition </b>
  2875. * @n @a CSL_tsipOpen() must be called successfully.
  2876. *
  2877. * <b> Post Condition </b>
  2878. * @n None
  2879. *
  2880. * @b Writes
  2881. * @n TSIP_DMATCU_GCTL_BASEPRI
  2882. *
  2883. * @b Example
  2884. * @verbatim
  2885. CSL_TsipHandle hTsip;
  2886. // Open the TSIP Module 0
  2887. hTsip = CSL_tsipOpen(0);
  2888. ...
  2889. // Set the Transfer Priority to be 2
  2890. CSL_tsipDMATCUSetTransferPriority (hTsip, 2);
  2891. ...
  2892. @endverbatim
  2893. * =============================================================================
  2894. */
  2895. static inline void CSL_tsipDMATCUSetTransferPriority
  2896. (
  2897. CSL_TsipHandle hTsip,
  2898. Uint8 priority
  2899. )
  2900. {
  2901. CSL_FINS(hTsip->DMATCU_GCTL, TSIP_DMATCU_GCTL_BASEPRI, priority);
  2902. return;
  2903. }
  2904. /** ============================================================================
  2905. * @n@b CSL_tsipDMATCUGetTransferPriority
  2906. *
  2907. * @b Description
  2908. * @n This function gets the transfer priority of the DMATCU
  2909. *
  2910. * @b Arguments
  2911. * @verbatim
  2912. hTsip Handle to TSIP instance
  2913. @endverbatim
  2914. *
  2915. * <b> Return Value </b>
  2916. * @n Transfer Priority of the DMATCU
  2917. *
  2918. * <b> Pre Condition </b>
  2919. * @n @a CSL_tsipOpen() must be called successfully.
  2920. *
  2921. * <b> Post Condition </b>
  2922. * @n None
  2923. *
  2924. * @b Reads
  2925. * @n TSIP_DMATCU_GCTL_BASEPRI
  2926. *
  2927. * @b Example
  2928. * @verbatim
  2929. CSL_TsipHandle hTsip;
  2930. Uint8 priority;
  2931. // Open the TSIP Module 0
  2932. hTsip = CSL_tsipOpen(0);
  2933. ...
  2934. // Get the Transfer Priority
  2935. priority = CSL_tsipDMATCUGetTransferPriority (hTsip);
  2936. ...
  2937. @endverbatim
  2938. * =============================================================================
  2939. */
  2940. static inline Uint8 CSL_tsipDMATCUGetTransferPriority(CSL_TsipHandle hTsip)
  2941. {
  2942. return (Uint8) CSL_FEXT(hTsip->DMATCU_GCTL, TSIP_DMATCU_GCTL_BASEPRI);
  2943. }
  2944. /** ============================================================================
  2945. * @n@b CSL_tsipDMATCUSetTxSuperFrameIntSelection
  2946. *
  2947. * @b Description
  2948. * @n This function sets the Tx Super frame interrupt selection.
  2949. *
  2950. * @b Arguments
  2951. * @verbatim
  2952. hTsip Handle to TSIP instance
  2953. txSFIntSelection Tx Superframe Interrupt Selection.
  2954. 0 - Interrupt on Transfer ACK
  2955. 1 - Interrupt on delay count
  2956. 2 - Interrupt on either Transfer ACK or delay count
  2957. 3 - Interrupt on both Transfer ACK or delay count
  2958. @endverbatim
  2959. *
  2960. * <b> Return Value </b>
  2961. * @n None.
  2962. *
  2963. * <b> Pre Condition </b>
  2964. * @n @a CSL_tsipOpen() must be called successfully.
  2965. *
  2966. * <b> Post Condition </b>
  2967. * @n None
  2968. *
  2969. * @b Writes
  2970. * @n TSIP_XMTTDR_XMTFSINT
  2971. *
  2972. * @b Example
  2973. * @verbatim
  2974. CSL_TsipHandle hTsip;
  2975. // Open the TSIP Module 0
  2976. hTsip = CSL_tsipOpen(0);
  2977. ...
  2978. // Set the Transmit Transfer to interrupt only on TRANSFER ACK.
  2979. CSL_tsipDMATCUSetTxSuperFrameIntSelection (hTsip, 0);
  2980. ...
  2981. @endverbatim
  2982. * =============================================================================
  2983. */
  2984. static inline void CSL_tsipDMATCUSetTxSuperFrameIntSelection
  2985. (
  2986. CSL_TsipHandle hTsip,
  2987. Uint8 txSFIntSelection
  2988. )
  2989. {
  2990. CSL_FINS(hTsip->XMTTDR, TSIP_XMTTDR_XMTFSINT, txSFIntSelection);
  2991. return;
  2992. }
  2993. /** ============================================================================
  2994. * @n@b CSL_tsipDMATCUGetTxSuperFrameIntSelection
  2995. *
  2996. * @b Description
  2997. * @n This function gets the Tx Super frame interrupt selection.
  2998. *
  2999. * @b Arguments
  3000. * @verbatim
  3001. hTsip Handle to TSIP instance
  3002. @endverbatim
  3003. *
  3004. * <b> Return Value </b>
  3005. * @n Tx Superframe Interrupt Selection.
  3006. * @n 0 - Interrupt on Transfer ACK
  3007. * @n 1 - Interrupt on delay count
  3008. * @n 2 - Interrupt on either Transfer ACK or delay count
  3009. * @n 3 - Interrupt on both Transfer ACK or delay count
  3010. *
  3011. * <b> Pre Condition </b>
  3012. * @n @a CSL_tsipOpen() must be called successfully.
  3013. *
  3014. * <b> Post Condition </b>
  3015. * @n None
  3016. *
  3017. * @b Reads
  3018. * @n TSIP_XMTTDR_XMTFSINT
  3019. *
  3020. * @b Example
  3021. * @verbatim
  3022. CSL_TsipHandle hTsip;
  3023. Uint8 txSFIntSelection;
  3024. // Open the TSIP Module 0
  3025. hTsip = CSL_tsipOpen(0);
  3026. ...
  3027. // Get the Transmit Superframe interrupt Selection.
  3028. txSFIntSelection = CSL_tsipDMATCUGetTxSuperFrameIntSelection (hTsip);
  3029. ...
  3030. @endverbatim
  3031. * =============================================================================
  3032. */
  3033. static inline Uint8 CSL_tsipDMATCUGetTxSuperFrameIntSelection(CSL_TsipHandle hTsip)
  3034. {
  3035. return (Uint8) CSL_FEXT(hTsip->XMTTDR, TSIP_XMTTDR_XMTFSINT);
  3036. }
  3037. /** ============================================================================
  3038. * @n@b CSL_tsipDMATCUSetTxFrameIntSelection
  3039. *
  3040. * @b Description
  3041. * @n This function sets the Tx frame interrupt selection.
  3042. *
  3043. * @b Arguments
  3044. * @verbatim
  3045. hTsip Handle to TSIP instance
  3046. txIntSelection Tx Frame Interrupt Selection.
  3047. 0 - Interrupt on Transfer ACK
  3048. 1 - Interrupt on delay count
  3049. 2 - Interrupt on either Transfer ACK or delay count
  3050. 3 - Interrupt on both Transfer ACK or delay count
  3051. @endverbatim
  3052. *
  3053. * <b> Return Value </b>
  3054. * @n None.
  3055. *
  3056. * <b> Pre Condition </b>
  3057. * @n @a CSL_tsipOpen() must be called successfully.
  3058. *
  3059. * <b> Post Condition </b>
  3060. * @n None
  3061. *
  3062. * @b Writes
  3063. * @n TSIP_XMTTDR_XMTFRINT
  3064. *
  3065. * @b Example
  3066. * @verbatim
  3067. CSL_TsipHandle hTsip;
  3068. // Open the TSIP Module 0
  3069. hTsip = CSL_tsipOpen(0);
  3070. ...
  3071. // Set the Transmit Transfer to interrupt only on TRANSFER ACK.
  3072. CSL_tsipDMATCUSetTxFrameIntSelection (hTsip, 0);
  3073. ...
  3074. @endverbatim
  3075. * =============================================================================
  3076. */
  3077. static inline void CSL_tsipDMATCUSetTxFrameIntSelection
  3078. (
  3079. CSL_TsipHandle hTsip,
  3080. Uint8 txIntSelection
  3081. )
  3082. {
  3083. CSL_FINS(hTsip->XMTTDR, TSIP_XMTTDR_XMTFRINT, txIntSelection);
  3084. return;
  3085. }
  3086. /** ============================================================================
  3087. * @n@b CSL_tsipDMATCUGetTxFrameIntSelection
  3088. *
  3089. * @b Description
  3090. * @n This function gets the Tx frame interrupt selection.
  3091. *
  3092. * @b Arguments
  3093. * @verbatim
  3094. hTsip Handle to TSIP instance
  3095. @endverbatim
  3096. *
  3097. * <b> Return Value </b>
  3098. * @n Tx Frame Interrupt Selection.
  3099. * @n 0 - Interrupt on Transfer ACK
  3100. * @n 1 - Interrupt on delay count
  3101. * @n 2 - Interrupt on either Transfer ACK or delay count
  3102. * @n 3 - Interrupt on both Transfer ACK or delay count
  3103. *
  3104. * <b> Pre Condition </b>
  3105. * @n @a CSL_tsipOpen() must be called successfully.
  3106. *
  3107. * <b> Post Condition </b>
  3108. * @n None
  3109. *
  3110. * @b Reads
  3111. * @n TSIP_XMTTDR_XMTFRINT
  3112. *
  3113. * @b Example
  3114. * @verbatim
  3115. CSL_TsipHandle hTsip;
  3116. Uint8 txIntSelection;
  3117. // Open the TSIP Module 0
  3118. hTsip = CSL_tsipOpen(0);
  3119. ...
  3120. // Get the Transmit Frame interrupt selection
  3121. txIntSelection = CSL_tsipDMATCUGetTxFrameIntSelection (hTsip);
  3122. ...
  3123. @endverbatim
  3124. * =============================================================================
  3125. */
  3126. static inline Uint8 CSL_tsipDMATCUGetTxFrameIntSelection(CSL_TsipHandle hTsip)
  3127. {
  3128. return (Uint8) CSL_FEXT(hTsip->XMTTDR, TSIP_XMTTDR_XMTFRINT);
  3129. }
  3130. /** ============================================================================
  3131. * @n@b CSL_tsipDMATCUSetTxFrameIntDelay
  3132. *
  3133. * @b Description
  3134. * @n This function sets the Tx frame interrupt delay.
  3135. *
  3136. * @b Arguments
  3137. * @verbatim
  3138. hTsip Handle to TSIP instance
  3139. txIntDelay Tx Frame Interrupt Delay
  3140. @endverbatim
  3141. *
  3142. * <b> Return Value </b>
  3143. * @n None.
  3144. *
  3145. * <b> Pre Condition </b>
  3146. * @n @a CSL_tsipOpen() must be called successfully.
  3147. *
  3148. * <b> Post Condition </b>
  3149. * @n None
  3150. *
  3151. * @b Writes
  3152. * @n TSIP_XMTTDR_XMTFDLY
  3153. *
  3154. * @b Example
  3155. * @verbatim
  3156. CSL_TsipHandle hTsip;
  3157. // Open the TSIP Module 0
  3158. hTsip = CSL_tsipOpen(0);
  3159. ...
  3160. // Set the Transmit Transfer Interrupt delay to be 0
  3161. CSL_tsipDMATCUSetTxFrameIntDelay (hTsip, 0);
  3162. ...
  3163. @endverbatim
  3164. * =============================================================================
  3165. */
  3166. static inline void CSL_tsipDMATCUSetTxFrameIntDelay
  3167. (
  3168. CSL_TsipHandle hTsip,
  3169. Uint8 txIntDelay
  3170. )
  3171. {
  3172. CSL_FINS(hTsip->XMTTDR, TSIP_XMTTDR_XMTFDLY, txIntDelay);
  3173. return;
  3174. }
  3175. /** ============================================================================
  3176. * @n@b CSL_tsipDMATCUGetTxFrameIntDelay
  3177. *
  3178. * @b Description
  3179. * @n This function gets the Tx frame interrupt delay.
  3180. *
  3181. * @b Arguments
  3182. * @verbatim
  3183. hTsip Handle to TSIP instance
  3184. @endverbatim
  3185. *
  3186. * <b> Return Value </b>
  3187. * @n Tx Frame Interrupt Delay
  3188. *
  3189. * <b> Pre Condition </b>
  3190. * @n @a CSL_tsipOpen() must be called successfully.
  3191. *
  3192. * <b> Post Condition </b>
  3193. * @n None
  3194. *
  3195. * @b Reads
  3196. * @n TSIP_XMTTDR_XMTFDLY
  3197. *
  3198. * @b Example
  3199. * @verbatim
  3200. CSL_TsipHandle hTsip;
  3201. Uint8 txIntDelay;
  3202. // Open the TSIP Module 0
  3203. hTsip = CSL_tsipOpen(0);
  3204. ...
  3205. // Get the Transmit Transfer Interrupt delay
  3206. txIntDelay = CSL_tsipDMATCUSetTxFrameIntDelay (hTsip, 0);
  3207. ...
  3208. @endverbatim
  3209. * =============================================================================
  3210. */
  3211. static inline Uint8 CSL_tsipDMATCUGetTxFrameIntDelay (CSL_TsipHandle hTsip)
  3212. {
  3213. return (Uint8) CSL_FEXT(hTsip->XMTTDR, TSIP_XMTTDR_XMTFDLY);
  3214. }
  3215. /** ============================================================================
  3216. * @n@b CSL_tsipDMATCUSetRxSuperFrameIntSelection
  3217. *
  3218. * @b Description
  3219. * @n This function sets the Rx Super frame interrupt selection.
  3220. *
  3221. * @b Arguments
  3222. * @verbatim
  3223. hTsip Handle to TSIP instance
  3224. rxSFIntSelection Rx Superframe Interrupt Selection.
  3225. 0 - Interrupt on Transfer ACK
  3226. 1 - Interrupt on delay count
  3227. 2 - Interrupt on either Transfer ACK or delay count
  3228. 3 - Interrupt on both Transfer ACK or delay count
  3229. @endverbatim
  3230. *
  3231. * <b> Return Value </b>
  3232. * @n None.
  3233. *
  3234. * <b> Pre Condition </b>
  3235. * @n @a CSL_tsipOpen() must be called successfully.
  3236. *
  3237. * <b> Post Condition </b>
  3238. * @n None
  3239. *
  3240. * @b Writes
  3241. * @n TSIP_RCVTDR_RCVFSINT
  3242. *
  3243. * @b Example
  3244. * @verbatim
  3245. CSL_TsipHandle hTsip;
  3246. // Open the TSIP Module 0
  3247. hTsip = CSL_tsipOpen(0);
  3248. ...
  3249. // Set the Receive Transfer to interrupt only on TRANSFER ACK.
  3250. CSL_tsipDMATCUSetRxSuperFrameIntSelection (hTsip, 0);
  3251. ...
  3252. @endverbatim
  3253. * =============================================================================
  3254. */
  3255. static inline void CSL_tsipDMATCUSetRxSuperFrameIntSelection
  3256. (
  3257. CSL_TsipHandle hTsip,
  3258. Uint8 rxSFIntSelection
  3259. )
  3260. {
  3261. CSL_FINS(hTsip->RCVTDR, TSIP_RCVTDR_RCVFSINT, rxSFIntSelection);
  3262. return;
  3263. }
  3264. /** ============================================================================
  3265. * @n@b CSL_tsipDMATCUGetRxSuperFrameIntSelection
  3266. *
  3267. * @b Description
  3268. * @n This function gets the Rx Super frame interrupt selection.
  3269. *
  3270. * @b Arguments
  3271. * @verbatim
  3272. hTsip Handle to TSIP instance
  3273. @endverbatim
  3274. *
  3275. * <b> Return Value </b>
  3276. * @n Rx Superframe Interrupt Selection.
  3277. * @n 0 - Interrupt on Transfer ACK
  3278. * @n 1 - Interrupt on delay count
  3279. * @n 2 - Interrupt on either Transfer ACK or delay count
  3280. * @n 3 - Interrupt on both Transfer ACK or delay count
  3281. *
  3282. * <b> Pre Condition </b>
  3283. * @n @a CSL_tsipOpen() must be called successfully.
  3284. *
  3285. * <b> Post Condition </b>
  3286. * @n None
  3287. *
  3288. * @b Reads
  3289. * @n TSIP_RCVTDR_RCVFSINT
  3290. *
  3291. * @b Example
  3292. * @verbatim
  3293. CSL_TsipHandle hTsip;
  3294. Uint8 rxSFIntSelection;
  3295. // Open the TSIP Module 0
  3296. hTsip = CSL_tsipOpen(0);
  3297. ...
  3298. // Get the Receive Superframe interrupt Selection.
  3299. rxSFIntSelection = CSL_tsipDMATCUGetRxSuperFrameIntSelection (hTsip);
  3300. ...
  3301. @endverbatim
  3302. * =============================================================================
  3303. */
  3304. static inline Uint8 CSL_tsipDMATCUGetRxSuperFrameIntSelection(CSL_TsipHandle hTsip)
  3305. {
  3306. return (Uint8) CSL_FEXT(hTsip->RCVTDR, TSIP_RCVTDR_RCVFSINT);
  3307. }
  3308. /** ============================================================================
  3309. * @n@b CSL_tsipDMATCUSetRxFrameIntSelection
  3310. *
  3311. * @b Description
  3312. * @n This function sets the Rx frame interrupt selection.
  3313. *
  3314. * @b Arguments
  3315. * @verbatim
  3316. hTsip Handle to TSIP instance
  3317. rxIntSelection Rx Frame Interrupt Selection.
  3318. 0 - Interrupt on Transfer ACK
  3319. 1 - Interrupt on delay count
  3320. 2 - Interrupt on either Transfer ACK or delay count
  3321. 3 - Interrupt on both Transfer ACK or delay count
  3322. @endverbatim
  3323. *
  3324. * <b> Return Value </b>
  3325. * @n None.
  3326. *
  3327. * <b> Pre Condition </b>
  3328. * @n @a CSL_tsipOpen() must be called successfully.
  3329. *
  3330. * <b> Post Condition </b>
  3331. * @n None
  3332. *
  3333. * @b Writes
  3334. * @n TSIP_RCVTDR_RCVFRINT
  3335. *
  3336. * @b Example
  3337. * @verbatim
  3338. CSL_TsipHandle hTsip;
  3339. // Open the TSIP Module 0
  3340. hTsip = CSL_tsipOpen(0);
  3341. ...
  3342. // Set the Receive Transfer to interrupt only on TRANSFER ACK.
  3343. CSL_tsipDMATCUSetRxFrameIntSelection (hTsip, 0);
  3344. ...
  3345. @endverbatim
  3346. * =============================================================================
  3347. */
  3348. static inline void CSL_tsipDMATCUSetRxFrameIntSelection
  3349. (
  3350. CSL_TsipHandle hTsip,
  3351. Uint8 rxIntSelection
  3352. )
  3353. {
  3354. CSL_FINS(hTsip->RCVTDR, TSIP_RCVTDR_RCVFRINT, rxIntSelection);
  3355. return;
  3356. }
  3357. /** ============================================================================
  3358. * @n@b CSL_tsipDMATCUGetRxFrameIntSelection
  3359. *
  3360. * @b Description
  3361. * @n This function gets the Rx frame interrupt selection.
  3362. *
  3363. * @b Arguments
  3364. * @verbatim
  3365. hTsip Handle to TSIP instance
  3366. @endverbatim
  3367. *
  3368. * <b> Return Value </b>
  3369. * @n Rx Frame Interrupt Selection.
  3370. * @n 0 - Interrupt on Transfer ACK
  3371. * @n 1 - Interrupt on delay count
  3372. * @n 2 - Interrupt on either Transfer ACK or delay count
  3373. * @n 3 - Interrupt on both Transfer ACK or delay count
  3374. *
  3375. * <b> Pre Condition </b>
  3376. * @n @a CSL_tsipOpen() must be called successfully.
  3377. *
  3378. * <b> Post Condition </b>
  3379. * @n None
  3380. *
  3381. * @b Reads
  3382. * @n TSIP_RCVTDR_RCVFRINT
  3383. *
  3384. * @b Example
  3385. * @verbatim
  3386. CSL_TsipHandle hTsip;
  3387. Uint8 rxIntSelection;
  3388. // Open the TSIP Module 0
  3389. hTsip = CSL_tsipOpen(0);
  3390. ...
  3391. // Get the Receive Frame interrupt selection
  3392. rxIntSelection = CSL_tsipDMATCUGetRxFrameIntSelection (hTsip);
  3393. ...
  3394. @endverbatim
  3395. * =============================================================================
  3396. */
  3397. static inline Uint8 CSL_tsipDMATCUGetRxFrameIntSelection(CSL_TsipHandle hTsip)
  3398. {
  3399. return (Uint8) CSL_FEXT(hTsip->RCVTDR, TSIP_RCVTDR_RCVFRINT);
  3400. }
  3401. /** ============================================================================
  3402. * @n@b CSL_tsipDMATCUSetRxFrameIntDelay
  3403. *
  3404. * @b Description
  3405. * @n This function sets the Rx frame interrupt delay.
  3406. *
  3407. * @b Arguments
  3408. * @verbatim
  3409. hTsip Handle to TSIP instance
  3410. rxIntDelay Rx Frame Interrupt Delay
  3411. @endverbatim
  3412. *
  3413. * <b> Return Value </b>
  3414. * @n None.
  3415. *
  3416. * <b> Pre Condition </b>
  3417. * @n @a CSL_tsipOpen() must be called successfully.
  3418. *
  3419. * <b> Post Condition </b>
  3420. * @n None
  3421. *
  3422. * @b Writes
  3423. * @n TSIP_RCVTDR_RCVFDLY
  3424. *
  3425. * @b Example
  3426. * @verbatim
  3427. CSL_TsipHandle hTsip;
  3428. // Open the TSIP Module 0
  3429. hTsip = CSL_tsipOpen(0);
  3430. ...
  3431. // Set the Receive Transfer Interrupt delay to be 0
  3432. CSL_tsipDMATCUSetRxFrameIntDelay (hTsip, 0);
  3433. ...
  3434. @endverbatim
  3435. * =============================================================================
  3436. */
  3437. static inline void CSL_tsipDMATCUSetRxFrameIntDelay
  3438. (
  3439. CSL_TsipHandle hTsip,
  3440. Uint8 rxIntDelay
  3441. )
  3442. {
  3443. CSL_FINS(hTsip->RCVTDR, TSIP_RCVTDR_RCVFDLY, rxIntDelay);
  3444. return;
  3445. }
  3446. /** ============================================================================
  3447. * @n@b CSL_tsipDMATCUGetRxFrameIntDelay
  3448. *
  3449. * @b Description
  3450. * @n This function gets the Rx frame interrupt delay.
  3451. *
  3452. * @b Arguments
  3453. * @verbatim
  3454. hTsip Handle to TSIP instance
  3455. @endverbatim
  3456. *
  3457. * <b> Return Value </b>
  3458. * @n Rx Frame Interrupt Delay
  3459. *
  3460. * <b> Pre Condition </b>
  3461. * @n @a CSL_tsipOpen() must be called successfully.
  3462. *
  3463. * <b> Post Condition </b>
  3464. * @n None
  3465. *
  3466. * @b Reads
  3467. * @n TSIP_RCVTDR_RCVFDLY
  3468. *
  3469. * @b Example
  3470. * @verbatim
  3471. CSL_TsipHandle hTsip;
  3472. Uint8 rxIntDelay;
  3473. // Open the TSIP Module 0
  3474. hTsip = CSL_tsipOpen(0);
  3475. ...
  3476. // Get the Receive Transfer Interrupt delay
  3477. rxIntDelay = CSL_tsipDMATCUGetRxFrameIntDelay (hTsip, 0);
  3478. ...
  3479. @endverbatim
  3480. * =============================================================================
  3481. */
  3482. static inline Uint8 CSL_tsipDMATCUGetRxFrameIntDelay (CSL_TsipHandle hTsip)
  3483. {
  3484. return (Uint8) CSL_FEXT(hTsip->RCVTDR, TSIP_RCVTDR_RCVFDLY);
  3485. }
  3486. /** ============================================================================
  3487. * @n@b CSL_tsipTDMUGetTxChannelStatus
  3488. *
  3489. * @b Description
  3490. * @n This function gets the transmit channel status.
  3491. *
  3492. * @b Arguments
  3493. * @verbatim
  3494. hTsip Handle to TSIP instance
  3495. channelNumber Tx Channel Number whose status is to be enquired.
  3496. @endverbatim
  3497. *
  3498. * <b> Return Value </b>
  3499. * @n Channel Status
  3500. * @n 0x0 - Both Configurations A and B are inactive.
  3501. * @n 0x1 - Configuration A is active and Configuration B is inactive
  3502. * @n 0x2 - Configuration A is inactive and Configuration B is active
  3503. *
  3504. * <b> Pre Condition </b>
  3505. * @n @a CSL_tsipOpen() must be called successfully.
  3506. *
  3507. * <b> Post Condition </b>
  3508. * @n None
  3509. *
  3510. * @b Reads
  3511. * @n XMTCCAS
  3512. *
  3513. * @b Example
  3514. * @verbatim
  3515. CSL_TsipHandle hTsip;
  3516. Uint8 txChannelStatus;
  3517. // Open the TSIP Module 0
  3518. hTsip = CSL_tsipOpen(0);
  3519. ...
  3520. // Get the Transmit Channel Status of Channel 0
  3521. txChannelStatus = CSL_tsipTDMUGetTxChannelStatus(hTsip, 0);
  3522. ...
  3523. @endverbatim
  3524. * =============================================================================
  3525. */
  3526. static inline Uint8 CSL_tsipTDMUGetTxChannelStatus
  3527. (
  3528. CSL_TsipHandle hTsip,
  3529. Uint8 channelNumber
  3530. )
  3531. {
  3532. Uint8 lsb = (channelNumber << 1);
  3533. return (Uint8)CSL_FEXTR (hTsip->XMTCCAS, (lsb + 1), lsb);
  3534. }
  3535. /** ============================================================================
  3536. * @n@b CSL_tsipTDMUGetRxChannelStatus
  3537. *
  3538. * @b Description
  3539. * @n This function gets the receive channel status.
  3540. *
  3541. * @b Arguments
  3542. * @verbatim
  3543. hTsip Handle to TSIP instance
  3544. channelNumber Rx Channel Number whose status is to be enquired.
  3545. @endverbatim
  3546. *
  3547. * <b> Return Value </b>
  3548. * @n Channel Status
  3549. * @n 0x0 - Both Configurations A and B are inactive.
  3550. * @n 0x1 - Configuration A is active and Configuration B is inactive
  3551. * @n 0x2 - Configuration A is inactive and Configuration B is active
  3552. *
  3553. * <b> Pre Condition </b>
  3554. * @n @a CSL_tsipOpen() must be called successfully.
  3555. *
  3556. * <b> Post Condition </b>
  3557. * @n None
  3558. *
  3559. * @b Reads
  3560. * @n RCVCCAS
  3561. *
  3562. * @b Example
  3563. * @verbatim
  3564. CSL_TsipHandle hTsip;
  3565. Uint8 rxChannelStatus;
  3566. // Open the TSIP Module 0
  3567. hTsip = CSL_tsipOpen(0);
  3568. ...
  3569. // Get the Receive Channel Status of Channel 0
  3570. rxChannelStatus = CSL_tsipTDMUGetRxChannelStatus(hTsip, 0);
  3571. ...
  3572. @endverbatim
  3573. * =============================================================================
  3574. */
  3575. static inline Uint8 CSL_tsipTDMUGetRxChannelStatus
  3576. (
  3577. CSL_TsipHandle hTsip,
  3578. Uint8 channelNumber
  3579. )
  3580. {
  3581. Uint8 lsb = (channelNumber << 1);
  3582. return (Uint8)CSL_FEXTR (hTsip->RCVCCAS, (lsb + 1), lsb);
  3583. }
  3584. /** ============================================================================
  3585. * @n@b CSL_tsipTDMUChannelClearOverflowError
  3586. *
  3587. * @b Description
  3588. * @n This function clears the error queue overflow.
  3589. *
  3590. * @b Arguments
  3591. * @verbatim
  3592. hTsip Handle to TSIP instance
  3593. channelNumber Channel Number for which the error is to be cleared.
  3594. @endverbatim
  3595. *
  3596. * <b> Return Value </b>
  3597. * @n None.
  3598. *
  3599. * <b> Pre Condition </b>
  3600. * @n @a CSL_tsipOpen() must be called successfully.
  3601. *
  3602. * <b> Post Condition </b>
  3603. * @n None
  3604. *
  3605. * @b Writes
  3606. * @n TSIP_CH0ECR_CH0CEQOV=1
  3607. *
  3608. * @b Example
  3609. * @verbatim
  3610. CSL_TsipHandle hTsip;
  3611. // Open the TSIP Module 0
  3612. hTsip = CSL_tsipOpen(0);
  3613. ...
  3614. // Clear the overflow error on Channel 1
  3615. CSL_tsipTDMUChannelClearOverflowError (hTsip, 1);
  3616. ...
  3617. @endverbatim
  3618. * =============================================================================
  3619. */
  3620. static inline void CSL_tsipTDMUChannelClearOverflowError
  3621. (
  3622. CSL_TsipHandle hTsip,
  3623. Uint8 channelNumber
  3624. )
  3625. {
  3626. CSL_FINS(hTsip->ERR[channelNumber].ERRCTL, TSIP_CH0ECR_CH0CEQOV, 1);
  3627. return;
  3628. }
  3629. /** ============================================================================
  3630. * @n@b CSL_tsipTDMUChannelClearErrorQueue
  3631. *
  3632. * @b Description
  3633. * @n This function clears the error queue.
  3634. *
  3635. * @b Arguments
  3636. * @verbatim
  3637. hTsip Handle to TSIP instance
  3638. channelNumber Channel Number for which the error is to be cleared.
  3639. @endverbatim
  3640. *
  3641. * <b> Return Value </b>
  3642. * @n None.
  3643. *
  3644. * <b> Pre Condition </b>
  3645. * @n @a CSL_tsipOpen() must be called successfully.
  3646. *
  3647. * <b> Post Condition </b>
  3648. * @n None
  3649. *
  3650. * @b Writes
  3651. * @n TSIP_CH0ECR_CH0CLRQ=1
  3652. *
  3653. * @b Example
  3654. * @verbatim
  3655. CSL_TsipHandle hTsip;
  3656. // Open the TSIP Module 0
  3657. hTsip = CSL_tsipOpen(0);
  3658. ...
  3659. // Clear the error queue on Channel 2
  3660. CSL_tsipTDMUChannelClearErrorQueue (hTsip, 2);
  3661. ...
  3662. @endverbatim
  3663. * =============================================================================
  3664. */
  3665. static inline void CSL_tsipTDMUChannelClearErrorQueue
  3666. (
  3667. CSL_TsipHandle hTsip,
  3668. Uint8 channelNumber
  3669. )
  3670. {
  3671. CSL_FINS(hTsip->ERR[channelNumber].ERRCTL, TSIP_CH0ECR_CH0CLRQ, 1);
  3672. return;
  3673. }
  3674. /** ============================================================================
  3675. * @n@b CSL_tsipTDMUChannelPopErrorEntry
  3676. *
  3677. * @b Description
  3678. * @n This function pops the top error entry off the error queue.
  3679. *
  3680. * @b Arguments
  3681. * @verbatim
  3682. hTsip Handle to TSIP instance
  3683. channelNumber Channel Number for which the error is to be popped off.
  3684. @endverbatim
  3685. *
  3686. * <b> Return Value </b>
  3687. * @n None.
  3688. *
  3689. * <b> Pre Condition </b>
  3690. * @n @a CSL_tsipOpen() must be called successfully.
  3691. *
  3692. * <b> Post Condition </b>
  3693. * @n None
  3694. *
  3695. * @b Writes
  3696. * @n TSIP_CH0ECR_CH0POPQ=1
  3697. *
  3698. * @b Example
  3699. * @verbatim
  3700. CSL_TsipHandle hTsip;
  3701. // Open the TSIP Module 0
  3702. hTsip = CSL_tsipOpen(0);
  3703. ...
  3704. // Pop the error off channel 3.
  3705. CSL_tsipTDMUChannelPopErrorEntry (hTsip, 3);
  3706. ...
  3707. @endverbatim
  3708. * =============================================================================
  3709. */
  3710. static inline void CSL_tsipTDMUChannelPopErrorEntry
  3711. (
  3712. CSL_TsipHandle hTsip,
  3713. Uint8 channelNumber
  3714. )
  3715. {
  3716. CSL_FINS(hTsip->ERR[channelNumber].ERRCTL, TSIP_CH0ECR_CH0POPQ, 1);
  3717. return;
  3718. }
  3719. /** ============================================================================
  3720. * @n@b CSL_tsipTDMUChannelGetErrorCount
  3721. *
  3722. * @b Description
  3723. * @n This function gets the number of entries in the error queue.
  3724. *
  3725. * @b Arguments
  3726. * @verbatim
  3727. hTsip Handle to TSIP instance
  3728. channelNumber Channel Number for which the error queue is to read
  3729. @endverbatim
  3730. *
  3731. * <b> Return Value </b>
  3732. * @n Number of entries in the error queue.
  3733. *
  3734. * <b> Pre Condition </b>
  3735. * @n @a CSL_tsipOpen() must be called successfully.
  3736. *
  3737. * <b> Post Condition </b>
  3738. * @n None
  3739. *
  3740. * @b Reads
  3741. * @n TSIP_CH0ERRS_CH0ECNT
  3742. *
  3743. * @b Example
  3744. * @verbatim
  3745. CSL_TsipHandle hTsip;
  3746. Uint8 errCount;
  3747. // Open the TSIP Module 0
  3748. hTsip = CSL_tsipOpen(0);
  3749. ...
  3750. // Get the number of error entries for channel 3
  3751. errCount = CSL_tsipTDMUChannelGetErrorCount (hTsip, 3);
  3752. ...
  3753. @endverbatim
  3754. * =============================================================================
  3755. */
  3756. static inline Uint8 CSL_tsipTDMUChannelGetErrorCount
  3757. (
  3758. CSL_TsipHandle hTsip,
  3759. Uint8 channelNumber
  3760. )
  3761. {
  3762. return (Uint8)CSL_FEXT(hTsip->ERR[channelNumber].ERRCNT, TSIP_CH0ERRS_CH0ECNT);
  3763. }
  3764. /** ============================================================================
  3765. * @n@b CSL_tsipTDMUChannelIsErrorQueueOverflow
  3766. *
  3767. * @b Description
  3768. * @n This function checks if the error queue for a specific channel has
  3769. * overflown or not?
  3770. *
  3771. * @b Arguments
  3772. * @verbatim
  3773. hTsip Handle to TSIP instance
  3774. channelNumber Channel Number for which the overflow is to be checked
  3775. @endverbatim
  3776. *
  3777. * <b> Return Value </b>
  3778. * @n Error Queue Overflow status
  3779. * @n TRUE - Error Queue Overflown
  3780. * @n FALSE - Error Queue has *not* Overflown
  3781. *
  3782. * <b> Pre Condition </b>
  3783. * @n @a CSL_tsipOpen() must be called successfully.
  3784. *
  3785. * <b> Post Condition </b>
  3786. * @n None
  3787. *
  3788. * @b Reads
  3789. * @n TSIP_CH0ERRS_CH0EQOV
  3790. *
  3791. * @b Example
  3792. * @verbatim
  3793. CSL_TsipHandle hTsip;
  3794. // Open the TSIP Module 0
  3795. hTsip = CSL_tsipOpen(0);
  3796. ...
  3797. // Check if there is an overflow error on Channel 4
  3798. if(CSL_tsipTDMUChannelIsErrorQueueOverflow (hTsip, 4) == TRUE)
  3799. {
  3800. // Error Queue has overflow on channel 4.
  3801. }
  3802. ...
  3803. @endverbatim
  3804. * =============================================================================
  3805. */
  3806. static inline Bool CSL_tsipTDMUChannelIsErrorQueueOverflow
  3807. (
  3808. CSL_TsipHandle hTsip,
  3809. Uint8 channelNumber
  3810. )
  3811. {
  3812. if (CSL_FEXT(hTsip->ERR[channelNumber].ERRCNT, TSIP_CH0ERRS_CH0EQOV) == 1)
  3813. return TRUE;
  3814. return FALSE;
  3815. }
  3816. /** ============================================================================
  3817. * @n@b CSL_tsipTDMUChannelGetErrorCodeInfo
  3818. *
  3819. * @b Description
  3820. * @n This function gets the error code and information for a specific channel.
  3821. *
  3822. * @b Arguments
  3823. * @verbatim
  3824. hTsip Handle to TSIP instance
  3825. channelNumber Channel Number for which the error info is required
  3826. errCode Error Code populated by this API
  3827. errInfo Error Information populated by this API
  3828. @endverbatim
  3829. *
  3830. * <b> Return Value </b>
  3831. * @n Error Code and Information is populated.
  3832. *
  3833. * <b> Pre Condition </b>
  3834. * @n @a CSL_tsipOpen() must be called successfully.
  3835. *
  3836. * <b> Post Condition </b>
  3837. * @n None
  3838. *
  3839. * @b Reads
  3840. * @n TSIP_CH0EQR_CH0ERRC, TSIP_CH0EQR_CH0INFO
  3841. *
  3842. * @b Example
  3843. * @verbatim
  3844. CSL_TsipHandle hTsip;
  3845. Uint8 errCode;
  3846. Uint32 errInfo;
  3847. // Open the TSIP Module 0
  3848. hTsip = CSL_tsipOpen(0);
  3849. ...
  3850. // Get the Error Code and Information for Channel 1
  3851. CSL_tsipTDMUChannelGetErrorCodeInfo (hTsip, 1, &errCode, &errInfo);
  3852. ...
  3853. @endverbatim
  3854. * =============================================================================
  3855. */
  3856. static inline void CSL_tsipTDMUChannelGetErrorCodeInfo
  3857. (
  3858. CSL_TsipHandle hTsip,
  3859. Uint8 channelNumber,
  3860. Uint8* errCode,
  3861. Uint32* errInfo
  3862. )
  3863. {
  3864. *errCode = (Uint8) CSL_FEXT (hTsip->ERR[channelNumber].ERRQ, TSIP_CH0EQR_CH0ERRC);
  3865. *errInfo = (Uint32)CSL_FEXT (hTsip->ERR[channelNumber].ERRQ, TSIP_CH0EQR_CH0INFO);
  3866. return;
  3867. }
  3868. /** ============================================================================
  3869. * @n@b CSL_tsipTDMUTxChannelEnable
  3870. *
  3871. * @b Description
  3872. * @n This function enables the specific transmit channel.
  3873. *
  3874. * @b Arguments
  3875. * @verbatim
  3876. hTsip Handle to TSIP instance
  3877. channelNumber Tx Channel Number which is to be enabled.
  3878. @endverbatim
  3879. *
  3880. * <b> Return Value </b>
  3881. * @n None
  3882. *
  3883. * <b> Pre Condition </b>
  3884. * @n @a CSL_tsipOpen() must be called successfully.
  3885. *
  3886. * <b> Post Condition </b>
  3887. * @n None
  3888. *
  3889. * @b Writes
  3890. * @n TSIP_XMTCHNEN_0_TXCH0ENB=1
  3891. *
  3892. * @b Example
  3893. * @verbatim
  3894. CSL_TsipHandle hTsip;
  3895. // Open the TSIP Module 0
  3896. hTsip = CSL_tsipOpen(0);
  3897. ...
  3898. // Enable Tx Channel 1.
  3899. CSL_tsipTDMUTxChannelEnable (hTsip, 1);
  3900. ...
  3901. @endverbatim
  3902. * =============================================================================
  3903. */
  3904. static inline void CSL_tsipTDMUTxChannelEnable
  3905. (
  3906. CSL_TsipHandle hTsip,
  3907. Uint8 channelNumber
  3908. )
  3909. {
  3910. CSL_FINS (hTsip->XCHEN[channelNumber].XCHEN, TSIP_XMTCHNEN_0_TXCH0ENB, 1);
  3911. return;
  3912. }
  3913. /** ============================================================================
  3914. * @n@b CSL_tsipTDMUTxChannelDisable
  3915. *
  3916. * @b Description
  3917. * @n This function disables the specific transmit channel.
  3918. *
  3919. * @b Arguments
  3920. * @verbatim
  3921. hTsip Handle to TSIP instance
  3922. channelNumber Tx Channel Number which is to be disabled.
  3923. @endverbatim
  3924. *
  3925. * <b> Return Value </b>
  3926. * @n None
  3927. *
  3928. * <b> Pre Condition </b>
  3929. * @n @a CSL_tsipOpen() must be called successfully.
  3930. *
  3931. * <b> Post Condition </b>
  3932. * @n None
  3933. *
  3934. * @b Writes
  3935. * @n TSIP_XMTCHNEN_0_TXCH0ENB=0
  3936. *
  3937. * @b Example
  3938. * @verbatim
  3939. CSL_TsipHandle hTsip;
  3940. // Open the TSIP Module 0
  3941. hTsip = CSL_tsipOpen(0);
  3942. ...
  3943. // Disable Tx Channel 1.
  3944. CSL_tsipTDMUTxChannelDisable (hTsip, 1);
  3945. ...
  3946. @endverbatim
  3947. * =============================================================================
  3948. */
  3949. static inline void CSL_tsipTDMUTxChannelDisable
  3950. (
  3951. CSL_TsipHandle hTsip,
  3952. Uint8 channelNumber
  3953. )
  3954. {
  3955. CSL_FINS (hTsip->XCHEN[channelNumber].XCHEN, TSIP_XMTCHNEN_0_TXCH0ENB, 0);
  3956. return;
  3957. }
  3958. /** ============================================================================
  3959. * @n@b CSL_tsipTDMUIsTxChannelEnabled
  3960. *
  3961. * @b Description
  3962. * @n This function checks if the specific transmit channel is enabled or not?
  3963. *
  3964. * @b Arguments
  3965. * @verbatim
  3966. hTsip Handle to TSIP instance
  3967. channelNumber Tx Channel Number whose status is being enquired.
  3968. @endverbatim
  3969. *
  3970. * <b> Return Value </b>
  3971. * @n Status of the Transmit Channel.
  3972. * @n TRUE - Channel is enabled.
  3973. * @n FALSE - Channel is disabled.
  3974. *
  3975. * <b> Pre Condition </b>
  3976. * @n @a CSL_tsipOpen() must be called successfully.
  3977. *
  3978. * <b> Post Condition </b>
  3979. * @n None
  3980. *
  3981. * @b Reads
  3982. * @n TSIP_XMTCHNEN_0_TXCH0ENB
  3983. *
  3984. * @b Example
  3985. * @verbatim
  3986. CSL_TsipHandle hTsip;
  3987. // Open the TSIP Module 0
  3988. hTsip = CSL_tsipOpen(0);
  3989. ...
  3990. // Check the status of channel 1
  3991. if (CSL_tsipTDMUIsTxChannelEnabled (hTsip, 1) == FALSE)
  3992. {
  3993. // Channel 1 is disabled...
  3994. }
  3995. ...
  3996. @endverbatim
  3997. * =============================================================================
  3998. */
  3999. static inline Bool CSL_tsipTDMUIsTxChannelEnabled
  4000. (
  4001. CSL_TsipHandle hTsip,
  4002. Uint8 channelNumber
  4003. )
  4004. {
  4005. if (CSL_FEXT (hTsip->XCHEN[channelNumber].XCHEN, TSIP_XMTCHNEN_0_TXCH0ENB) == 1)
  4006. return TRUE;
  4007. return FALSE;
  4008. }
  4009. /** ============================================================================
  4010. * @n@b CSL_tsipTDMUTxChannelSetConfiguration
  4011. *
  4012. * @b Description
  4013. * @n This function sets the transmit channel configuration identification.
  4014. *
  4015. * @b Arguments
  4016. * @verbatim
  4017. hTsip Handle to TSIP instance
  4018. channelNumber Tx Channel Number for which the CFG Id is to be set.
  4019. cfgInfo Configuration Information to be configured.
  4020. @endverbatim
  4021. *
  4022. * <b> Return Value </b>
  4023. * @n None
  4024. *
  4025. * <b> Pre Condition </b>
  4026. * @n @a CSL_tsipOpen() must be called successfully.
  4027. *
  4028. * <b> Post Condition </b>
  4029. * @n None
  4030. *
  4031. * @b Writes
  4032. * @n TSIP_XMTCHNEN_0_TXC0ID
  4033. *
  4034. * @b Example
  4035. * @verbatim
  4036. CSL_TsipHandle hTsip;
  4037. // Open the TSIP Module 0
  4038. hTsip = CSL_tsipOpen(0);
  4039. ...
  4040. // Set the Configuration Information for Tx Channel 1 to use B
  4041. CSL_tsipTDMUTxChannelSetConfiguration (hTsip, 1, 0x1);
  4042. ...
  4043. @endverbatim
  4044. * =============================================================================
  4045. */
  4046. static inline void CSL_tsipTDMUTxChannelSetConfiguration
  4047. (
  4048. CSL_TsipHandle hTsip,
  4049. Uint8 channelNumber,
  4050. Uint8 cfgInfo
  4051. )
  4052. {
  4053. CSL_FINS (hTsip->XCHEN[channelNumber].XCHEN, TSIP_XMTCHNEN_0_TXC0ID, cfgInfo);
  4054. return;
  4055. }
  4056. /** ============================================================================
  4057. * @n@b CSL_tsipTDMUTxChannelGetConfiguration
  4058. *
  4059. * @b Description
  4060. * @n This function gets the transmit channel configuration identification.
  4061. *
  4062. * @b Arguments
  4063. * @verbatim
  4064. hTsip Handle to TSIP instance
  4065. channelNumber Tx Channel Number for which the CFG Id is to be set.
  4066. @endverbatim
  4067. *
  4068. * <b> Return Value </b>
  4069. * @n Configuration Information associated with the channel.
  4070. *
  4071. * <b> Pre Condition </b>
  4072. * @n @a CSL_tsipOpen() must be called successfully.
  4073. *
  4074. * <b> Post Condition </b>
  4075. * @n None
  4076. *
  4077. * @b Reads
  4078. * @n TSIP_XMTCHNEN_0_TXC0ID
  4079. *
  4080. * @b Example
  4081. * @verbatim
  4082. CSL_TsipHandle hTsip;
  4083. Uint8 cfgInfo;
  4084. // Open the TSIP Module 0
  4085. hTsip = CSL_tsipOpen(0);
  4086. ...
  4087. // Get the Configuration Information for Tx Channel 1
  4088. cfgInfo = CSL_tsipTDMUTxChannelGetConfiguration (hTsip, 1);
  4089. ...
  4090. @endverbatim
  4091. * =============================================================================
  4092. */
  4093. static inline Uint8 CSL_tsipTDMUTxChannelGetConfiguration
  4094. (
  4095. CSL_TsipHandle hTsip,
  4096. Uint8 channelNumber
  4097. )
  4098. {
  4099. return (Uint8)CSL_FEXT (hTsip->XCHEN[channelNumber].XCHEN, TSIP_XMTCHNEN_0_TXC0ID);
  4100. }
  4101. /** ============================================================================
  4102. * @n@b CSL_tsipTDMURxChannelEnable
  4103. *
  4104. * @b Description
  4105. * @n This function enables the specific receive channel.
  4106. *
  4107. * @b Arguments
  4108. * @verbatim
  4109. hTsip Handle to TSIP instance
  4110. channelNumber Rx Channel Number which is to be enabled.
  4111. @endverbatim
  4112. *
  4113. * <b> Return Value </b>
  4114. * @n None
  4115. *
  4116. * <b> Pre Condition </b>
  4117. * @n @a CSL_tsipOpen() must be called successfully.
  4118. *
  4119. * <b> Post Condition </b>
  4120. * @n None
  4121. *
  4122. * @b Writes
  4123. * @n TSIP_RCVCHNEN_0_RXCH0ENB=1
  4124. *
  4125. * @b Example
  4126. * @verbatim
  4127. CSL_TsipHandle hTsip;
  4128. // Open the TSIP Module 0
  4129. hTsip = CSL_tsipOpen(0);
  4130. ...
  4131. // Enable Rx Channel 1.
  4132. CSL_tsipTDMURxChannelEnable (hTsip, 1);
  4133. ...
  4134. @endverbatim
  4135. * =============================================================================
  4136. */
  4137. static inline void CSL_tsipTDMURxChannelEnable
  4138. (
  4139. CSL_TsipHandle hTsip,
  4140. Uint8 channelNumber
  4141. )
  4142. {
  4143. CSL_FINS (hTsip->RCHEN[channelNumber].RCHEN, TSIP_RCVCHNEN_0_RXCH0ENB, 1);
  4144. return;
  4145. }
  4146. /** ============================================================================
  4147. * @n@b CSL_tsipTDMURxChannelDisable
  4148. *
  4149. * @b Description
  4150. * @n This function disables the specific receive channel.
  4151. *
  4152. * @b Arguments
  4153. * @verbatim
  4154. hTsip Handle to TSIP instance
  4155. channelNumber Rx Channel Number which is to be disabled.
  4156. @endverbatim
  4157. *
  4158. * <b> Return Value </b>
  4159. * @n None
  4160. *
  4161. * <b> Pre Condition </b>
  4162. * @n @a CSL_tsipOpen() must be called successfully.
  4163. *
  4164. * <b> Post Condition </b>
  4165. * @n None
  4166. *
  4167. * @b Writes
  4168. * @n TSIP_RCVCHNEN_0_RXCH0ENB=0
  4169. *
  4170. * @b Example
  4171. * @verbatim
  4172. CSL_TsipHandle hTsip;
  4173. // Open the TSIP Module 0
  4174. hTsip = CSL_tsipOpen(0);
  4175. ...
  4176. // Disable Rx Channel 1.
  4177. CSL_tsipTDMURxChannelDisable (hTsip, 1);
  4178. ...
  4179. @endverbatim
  4180. * =============================================================================
  4181. */
  4182. static inline void CSL_tsipTDMURxChannelDisable
  4183. (
  4184. CSL_TsipHandle hTsip,
  4185. Uint8 channelNumber
  4186. )
  4187. {
  4188. CSL_FINS (hTsip->RCHEN[channelNumber].RCHEN, TSIP_RCVCHNEN_0_RXCH0ENB, 0);
  4189. return;
  4190. }
  4191. /** ============================================================================
  4192. * @n@b CSL_tsipTDMUIsRxChannelEnabled
  4193. *
  4194. * @b Description
  4195. * @n This function checks if the specific receive channel is enabled or not?
  4196. *
  4197. * @b Arguments
  4198. * @verbatim
  4199. hTsip Handle to TSIP instance
  4200. channelNumber Rx Channel Number whose status is being enquired.
  4201. @endverbatim
  4202. *
  4203. * <b> Return Value </b>
  4204. * @n Status of the Receive Channel.
  4205. * @n TRUE - Channel is enabled.
  4206. * @n FALSE - Channel is disabled.
  4207. *
  4208. * <b> Pre Condition </b>
  4209. * @n @a CSL_tsipOpen() must be called successfully.
  4210. *
  4211. * <b> Post Condition </b>
  4212. * @n None
  4213. *
  4214. * @b Reads
  4215. * @n TSIP_RCVCHNEN_0_RXCH0ENB
  4216. *
  4217. * @b Example
  4218. * @verbatim
  4219. CSL_TsipHandle hTsip;
  4220. // Open the TSIP Module 0
  4221. hTsip = CSL_tsipOpen(0);
  4222. ...
  4223. // Check the status of channel 1
  4224. if (CSL_tsipTDMUIsRxChannelEnabled (hTsip, 1) == FALSE)
  4225. {
  4226. // Channel 1 is disabled...
  4227. }
  4228. ...
  4229. @endverbatim
  4230. * =============================================================================
  4231. */
  4232. static inline Bool CSL_tsipTDMUIsRxChannelEnabled
  4233. (
  4234. CSL_TsipHandle hTsip,
  4235. Uint8 channelNumber
  4236. )
  4237. {
  4238. if (CSL_FEXT (hTsip->RCHEN[channelNumber].RCHEN, TSIP_RCVCHNEN_0_RXCH0ENB) == 1)
  4239. return TRUE;
  4240. return FALSE;
  4241. }
  4242. /** ============================================================================
  4243. * @n@b CSL_tsipTDMURxChannelSetConfiguration
  4244. *
  4245. * @b Description
  4246. * @n This function sets the receive channel configuration identification.
  4247. *
  4248. * @b Arguments
  4249. * @verbatim
  4250. hTsip Handle to TSIP instance
  4251. channelNumber Rx Channel Number for which the CFG Id is to be set.
  4252. cfgInfo Configuration Information to be configured.
  4253. @endverbatim
  4254. *
  4255. * <b> Return Value </b>
  4256. * @n None
  4257. *
  4258. * <b> Pre Condition </b>
  4259. * @n @a CSL_tsipOpen() must be called successfully.
  4260. *
  4261. * <b> Post Condition </b>
  4262. * @n None
  4263. *
  4264. * @b Writes
  4265. * @n TSIP_RCVCHNEN_0_RXC0ID
  4266. *
  4267. * @b Example
  4268. * @verbatim
  4269. CSL_TsipHandle hTsip;
  4270. // Open the TSIP Module 0
  4271. hTsip = CSL_tsipOpen(0);
  4272. ...
  4273. // Set the Configuration Information for Rx Channel 1 to use B
  4274. CSL_tsipTDMURxChannelSetConfiguration (hTsip, 1, 0x1);
  4275. ...
  4276. @endverbatim
  4277. * =============================================================================
  4278. */
  4279. static inline void CSL_tsipTDMURxChannelSetConfiguration
  4280. (
  4281. CSL_TsipHandle hTsip,
  4282. Uint8 channelNumber,
  4283. Uint8 cfgInfo
  4284. )
  4285. {
  4286. CSL_FINS (hTsip->RCHEN[channelNumber].RCHEN, TSIP_RCVCHNEN_0_RXC0ID, cfgInfo);
  4287. return;
  4288. }
  4289. /** ============================================================================
  4290. * @n@b CSL_tsipTDMURxChannelGetConfiguration
  4291. *
  4292. * @b Description
  4293. * @n This function gets the receive channel configuration identification.
  4294. *
  4295. * @b Arguments
  4296. * @verbatim
  4297. hTsip Handle to TSIP instance
  4298. channelNumber Rx Channel Number for which the CFG Id is to be retrieved.
  4299. @endverbatim
  4300. *
  4301. * <b> Return Value </b>
  4302. * @n Configuration Information associated with the channel.
  4303. *
  4304. * <b> Pre Condition </b>
  4305. * @n @a CSL_tsipOpen() must be called successfully.
  4306. *
  4307. * <b> Post Condition </b>
  4308. * @n None
  4309. *
  4310. * @b Reads
  4311. * @n TSIP_RCVCHNEN_0_RXC0ID
  4312. *
  4313. * @b Example
  4314. * @verbatim
  4315. CSL_TsipHandle hTsip;
  4316. Uint8 cfgInfo;
  4317. // Open the TSIP Module 0
  4318. hTsip = CSL_tsipOpen(0);
  4319. ...
  4320. // Get the Configuration Information for Rx Channel 1
  4321. cfgInfo = CSL_tsipTDMURxChannelGetConfiguration (hTsip, 1);
  4322. ...
  4323. @endverbatim
  4324. * =============================================================================
  4325. */
  4326. static inline Uint8 CSL_tsipTDMURxChannelGetConfiguration
  4327. (
  4328. CSL_TsipHandle hTsip,
  4329. Uint8 channelNumber
  4330. )
  4331. {
  4332. return (Uint8)CSL_FEXT (hTsip->RCHEN[channelNumber].RCHEN, TSIP_RCVCHNEN_0_RXC0ID);
  4333. }
  4334. /** ============================================================================
  4335. * @n@b CSL_tsipTDMUSetTxChannelAConfig
  4336. *
  4337. * @b Description
  4338. * @n This function sets the transmit channel A configuration
  4339. *
  4340. * @b Arguments
  4341. * @verbatim
  4342. hTsip Handle to TSIP instance
  4343. channelNumber Tx Channel Number
  4344. memoryBaseAddress Memory Base Address
  4345. frameAllocation Frame Allocation
  4346. frameSize Number of bytes to transfer for each frame
  4347. frameCount Number of frames in a buffer.
  4348. @endverbatim
  4349. *
  4350. * <b> Return Value </b>
  4351. * @n None
  4352. *
  4353. * <b> Pre Condition </b>
  4354. * @n @a CSL_tsipOpen() must be called successfully.
  4355. *
  4356. * <b> Post Condition </b>
  4357. * @n None
  4358. *
  4359. * @b Writes
  4360. * @n TSIP_XMTCHNCON_ABA_0_TXC0AMEMBASEADR;TSIP_XMTCHNCON_AFA_0_TXC0AFRAMEALLOC;
  4361. * TSIP_XMTCHNCON_AFS_0_TXC0AFSIZE;TSIP_XMTCHNCON_AFC_0_TXC0AFCOUNT
  4362. *
  4363. * @b Example
  4364. * @verbatim
  4365. CSL_TsipHandle hTsip;
  4366. // Open the TSIP Module 0
  4367. hTsip = CSL_tsipOpen(0);
  4368. ...
  4369. // Set the Configuration for Tx Channel(A) 1
  4370. CSL_tsipTDMUSetTxChannelAConfig (hTsip, 1, 0x8000000, 0x1000, 0x128, 10);
  4371. ...
  4372. @endverbatim
  4373. * =============================================================================
  4374. */
  4375. static inline void CSL_tsipTDMUSetTxChannelAConfig
  4376. (
  4377. CSL_TsipHandle hTsip,
  4378. Uint8 channelNumber,
  4379. Uint32 memoryBaseAddress,
  4380. Uint16 frameAllocation,
  4381. Uint16 frameSize,
  4382. Uint8 frameCount
  4383. )
  4384. {
  4385. /* Set the Transmit Channel A Configuration */
  4386. CSL_FINS (hTsip->DXCH[channelNumber].ABASE, TSIP_XMTCHNCON_ABA_0_TXC0AMEMBASEADR, memoryBaseAddress);
  4387. CSL_FINS (hTsip->DXCH[channelNumber].AFALLOC, TSIP_XMTCHNCON_AFA_0_TXC0AFRAMEALLOC, frameAllocation);
  4388. CSL_FINS (hTsip->DXCH[channelNumber].AFSIZE, TSIP_XMTCHNCON_AFS_0_TXC0AFSIZE, frameSize);
  4389. CSL_FINS (hTsip->DXCH[channelNumber].AFCNT, TSIP_XMTCHNCON_AFC_0_TXC0AFCOUNT, frameCount);
  4390. return;
  4391. }
  4392. /** ============================================================================
  4393. * @n@b CSL_tsipTDMUGetTxChannelAConfig
  4394. *
  4395. * @b Description
  4396. * @n This function gets the transmit channel A configuration
  4397. *
  4398. * @b Arguments
  4399. * @verbatim
  4400. hTsip Handle to TSIP instance
  4401. channelNumber Tx Channel Number
  4402. memoryBaseAddress Memory Base Address populated by this API
  4403. frameAllocation Frame Allocation populated by this API
  4404. frameSize Number of bytes to transfer for each frame populated by this API
  4405. frameCount Number of frames in a buffer populated by this API
  4406. @endverbatim
  4407. *
  4408. * <b> Return Value </b>
  4409. * @n None
  4410. *
  4411. * <b> Pre Condition </b>
  4412. * @n @a CSL_tsipOpen() must be called successfully.
  4413. *
  4414. * <b> Post Condition </b>
  4415. * @n None
  4416. *
  4417. * @b Writes
  4418. * @n TSIP_XMTCHNCON_ABA_0_TXC0AMEMBASEADR;TSIP_XMTCHNCON_AFA_0_TXC0AFRAMEALLOC;
  4419. * TSIP_XMTCHNCON_AFS_0_TXC0AFSIZE;TSIP_XMTCHNCON_AFC_0_TXC0AFCOUNT
  4420. *
  4421. * @b Example
  4422. * @verbatim
  4423. CSL_TsipHandle hTsip;
  4424. Uint32 memoryBaseAddress;
  4425. Uint16 frameAllocation;
  4426. Uint16 frameSize;
  4427. Uint8 frameCount;
  4428. // Open the TSIP Module 0
  4429. hTsip = CSL_tsipOpen(0);
  4430. ...
  4431. // Get the Configuration for Tx Channel(A) 1
  4432. CSL_tsipTDMUGetTxChannelAConfig (hTsip, 1, &memoryBaseAddress,
  4433. &frameAllocation, &frameSize, &frameCount);
  4434. ...
  4435. @endverbatim
  4436. * =============================================================================
  4437. */
  4438. static inline void CSL_tsipTDMUGetTxChannelAConfig
  4439. (
  4440. CSL_TsipHandle hTsip,
  4441. Uint8 channelNumber,
  4442. Uint32* memoryBaseAddress,
  4443. Uint16* frameAllocation,
  4444. Uint16* frameSize,
  4445. Uint8* frameCount
  4446. )
  4447. {
  4448. /* Get the Transmit Channel A Configuration */
  4449. *memoryBaseAddress = (Uint32)CSL_FEXT (hTsip->DXCH[channelNumber].ABASE, TSIP_XMTCHNCON_ABA_0_TXC0AMEMBASEADR);
  4450. *frameAllocation = (Uint16)CSL_FEXT (hTsip->DXCH[channelNumber].AFALLOC, TSIP_XMTCHNCON_AFA_0_TXC0AFRAMEALLOC);
  4451. *frameSize = (Uint16)CSL_FEXT (hTsip->DXCH[channelNumber].AFSIZE, TSIP_XMTCHNCON_AFS_0_TXC0AFSIZE);
  4452. *frameCount = (Uint8)CSL_FEXT (hTsip->DXCH[channelNumber].AFCNT, TSIP_XMTCHNCON_AFC_0_TXC0AFCOUNT);
  4453. return;
  4454. }
  4455. /** ============================================================================
  4456. * @n@b CSL_tsipTDMUSetTxChannelBConfig
  4457. *
  4458. * @b Description
  4459. * @n This function sets the transmit channel B configuration
  4460. *
  4461. * @b Arguments
  4462. * @verbatim
  4463. hTsip Handle to TSIP instance
  4464. channelNumber Tx Channel Number
  4465. memoryBaseAddress Memory Base Address
  4466. frameAllocation Frame Allocation
  4467. frameSize Number of bytes to transfer for each frame
  4468. frameCount Number of frames in a buffer.
  4469. @endverbatim
  4470. *
  4471. * <b> Return Value </b>
  4472. * @n None
  4473. *
  4474. * <b> Pre Condition </b>
  4475. * @n @a CSL_tsipOpen() must be called successfully.
  4476. *
  4477. * <b> Post Condition </b>
  4478. * @n None
  4479. *
  4480. * @b Writes
  4481. * @n TSIP_XMTCHNCON_BBA_0_TXC0BMEMBASEADR;TSIP_XMTCHNCON_BFA_0_TXC0BFRAMEALLOC;
  4482. * TSIP_XMTCHNCON_BFS_0_TXC0BFSIZE;TSIP_XMTCHNCON_BFC_0_TXC0BFCOUNT
  4483. *
  4484. * @b Example
  4485. * @verbatim
  4486. CSL_TsipHandle hTsip;
  4487. // Open the TSIP Module 0
  4488. hTsip = CSL_tsipOpen(0);
  4489. ...
  4490. // Set the Configuration for Tx Channel(B) 1
  4491. CSL_tsipTDMUSetTxChannelAConfig (hTsip, 1, 0x8000000, 0x1000, 0x128, 10);
  4492. ...
  4493. @endverbatim
  4494. * =============================================================================
  4495. */
  4496. static inline void CSL_tsipTDMUSetTxChannelBConfig
  4497. (
  4498. CSL_TsipHandle hTsip,
  4499. Uint8 channelNumber,
  4500. Uint32 memoryBaseAddress,
  4501. Uint16 frameAllocation,
  4502. Uint16 frameSize,
  4503. Uint8 frameCount
  4504. )
  4505. {
  4506. /* Set the Transmit Channel B Configuration */
  4507. CSL_FINS (hTsip->DXCH[channelNumber].BBASE, TSIP_XMTCHNCON_BBA_0_TXC0BMEMBASEADR, memoryBaseAddress);
  4508. CSL_FINS (hTsip->DXCH[channelNumber].BFALLOC, TSIP_XMTCHNCON_BFA_0_TXC0BFRAMEALLOC, frameAllocation);
  4509. CSL_FINS (hTsip->DXCH[channelNumber].BFSIZE, TSIP_XMTCHNCON_BFS_0_TXC0BFSIZE, frameSize);
  4510. CSL_FINS (hTsip->DXCH[channelNumber].BFCNT, TSIP_XMTCHNCON_BFC_0_TXC0BFCOUNT, frameCount);
  4511. return;
  4512. }
  4513. /** ============================================================================
  4514. * @n@b CSL_tsipTDMUGetTxChannelBConfig
  4515. *
  4516. * @b Description
  4517. * @n This function gets the transmit channel B configuration
  4518. *
  4519. * @b Arguments
  4520. * @verbatim
  4521. hTsip Handle to TSIP instance
  4522. channelNumber Tx Channel Number
  4523. memoryBaseAddress Memory Base Address populated by this API
  4524. frameAllocation Frame Allocation populated by this API
  4525. frameSize Number of bytes to transfer for each frame populated by this API
  4526. frameCount Number of frames in a buffer populated by this API
  4527. @endverbatim
  4528. *
  4529. * <b> Return Value </b>
  4530. * @n None
  4531. *
  4532. * <b> Pre Condition </b>
  4533. * @n @a CSL_tsipOpen() must be called successfully.
  4534. *
  4535. * <b> Post Condition </b>
  4536. * @n None
  4537. *
  4538. * @b Reads
  4539. * @n TSIP_XMTCHNCON_BBA_0_TXC0BMEMBASEADR;TSIP_XMTCHNCON_BFA_0_TXC0BFRAMEALLOC;
  4540. * TSIP_XMTCHNCON_BFS_0_TXC0BFSIZE;TSIP_XMTCHNCON_BFC_0_TXC0BFCOUNT
  4541. *
  4542. * @b Example
  4543. * @verbatim
  4544. CSL_TsipHandle hTsip;
  4545. Uint32 memoryBaseAddress;
  4546. Uint16 frameAllocation;
  4547. Uint16 frameSize;
  4548. Uint8 frameCount;
  4549. // Open the TSIP Module 0
  4550. hTsip = CSL_tsipOpen(0);
  4551. ...
  4552. // Get the Configuration for Tx Channel(B) 1
  4553. CSL_tsipTDMUGetTxChannelBConfig (hTsip, 1, &memoryBaseAddress,
  4554. &frameAllocation, &frameSize, &frameCount);
  4555. ...
  4556. @endverbatim
  4557. * =============================================================================
  4558. */
  4559. static inline void CSL_tsipTDMUGetTxChannelBConfig
  4560. (
  4561. CSL_TsipHandle hTsip,
  4562. Uint8 channelNumber,
  4563. Uint32* memoryBaseAddress,
  4564. Uint16* frameAllocation,
  4565. Uint16* frameSize,
  4566. Uint8* frameCount
  4567. )
  4568. {
  4569. /* Get the Transmit Channel B Configuration */
  4570. *memoryBaseAddress = (Uint32)CSL_FEXT (hTsip->DXCH[channelNumber].BBASE, TSIP_XMTCHNCON_BBA_0_TXC0BMEMBASEADR);
  4571. *frameAllocation = (Uint16)CSL_FEXT (hTsip->DXCH[channelNumber].BFALLOC, TSIP_XMTCHNCON_BFA_0_TXC0BFRAMEALLOC);
  4572. *frameSize = (Uint16)CSL_FEXT (hTsip->DXCH[channelNumber].BFSIZE, TSIP_XMTCHNCON_BFS_0_TXC0BFSIZE);
  4573. *frameCount = (Uint8)CSL_FEXT (hTsip->DXCH[channelNumber].BFCNT, TSIP_XMTCHNCON_BFC_0_TXC0BFCOUNT);
  4574. return;
  4575. }
  4576. /** ============================================================================
  4577. * @n@b CSL_tsipTDMUSetRxChannelAConfig
  4578. *
  4579. * @b Description
  4580. * @n This function sets the receive channel A configuration
  4581. *
  4582. * @b Arguments
  4583. * @verbatim
  4584. hTsip Handle to TSIP instance
  4585. channelNumber Rx Channel Number
  4586. memoryBaseAddress Memory Base Address
  4587. frameAllocation Frame Allocation
  4588. frameSize Number of bytes to transfer for each frame
  4589. frameCount Number of frames in a buffer.
  4590. @endverbatim
  4591. *
  4592. * <b> Return Value </b>
  4593. * @n None
  4594. *
  4595. * <b> Pre Condition </b>
  4596. * @n @a CSL_tsipOpen() must be called successfully.
  4597. *
  4598. * <b> Post Condition </b>
  4599. * @n None
  4600. *
  4601. * @b Writes
  4602. * @n TSIP_RCVCHNCON_ABA_0_RXC0AMEMBASEADR;TSIP_RCVCHNCON_AFA_0_RXC0AFRAMEALLOC;
  4603. * TSIP_RCVCHNCON_AFS_0_RXC0AFSIZE;TSIP_RCVCHNCON_AFC_0_RXC0AFCOUNT
  4604. *
  4605. * @b Example
  4606. * @verbatim
  4607. CSL_TsipHandle hTsip;
  4608. // Open the TSIP Module 0
  4609. hTsip = CSL_tsipOpen(0);
  4610. ...
  4611. // Set the Configuration for Rx Channel(A) 1
  4612. CSL_tsipTDMUSetRxChannelAConfig (hTsip, 1, 0x8000000, 0x1000, 0x128, 10);
  4613. ...
  4614. @endverbatim
  4615. * =============================================================================
  4616. */
  4617. static inline void CSL_tsipTDMUSetRxChannelAConfig
  4618. (
  4619. CSL_TsipHandle hTsip,
  4620. Uint8 channelNumber,
  4621. Uint32 memoryBaseAddress,
  4622. Uint16 frameAllocation,
  4623. Uint16 frameSize,
  4624. Uint8 frameCount
  4625. )
  4626. {
  4627. /* Set the Transmit Channel A Configuration */
  4628. CSL_FINS (hTsip->DRCH[channelNumber].ABASE, TSIP_RCVCHNCON_ABA_0_RXC0AMEMBASEADR, memoryBaseAddress);
  4629. CSL_FINS (hTsip->DRCH[channelNumber].AFALLOC, TSIP_RCVCHNCON_AFA_0_RXC0AFRAMEALLOC, frameAllocation);
  4630. CSL_FINS (hTsip->DRCH[channelNumber].AFSIZE, TSIP_RCVCHNCON_AFS_0_RXC0AFSIZE, frameSize);
  4631. CSL_FINS (hTsip->DRCH[channelNumber].AFCNT, TSIP_RCVCHNCON_AFC_0_RXC0AFCOUNT, frameCount);
  4632. return;
  4633. }
  4634. /** ============================================================================
  4635. * @n@b CSL_tsipTDMUGetRxChannelAConfig
  4636. *
  4637. * @b Description
  4638. * @n This function gets the receive channel A configuration
  4639. *
  4640. * @b Arguments
  4641. * @verbatim
  4642. hTsip Handle to TSIP instance
  4643. channelNumber Rx Channel Number
  4644. memoryBaseAddress Memory Base Address populated by this API
  4645. frameAllocation Frame Allocation populated by this API
  4646. frameSize Number of bytes to transfer for each frame populated by this API
  4647. frameCount Number of frames in a buffer populated by this API
  4648. @endverbatim
  4649. *
  4650. * <b> Return Value </b>
  4651. * @n None
  4652. *
  4653. * <b> Pre Condition </b>
  4654. * @n @a CSL_tsipOpen() must be called successfully.
  4655. *
  4656. * <b> Post Condition </b>
  4657. * @n None
  4658. *
  4659. * @b Reads
  4660. * @n TSIP_RCVCHNCON_ABA_0_RXC0AMEMBASEADR;TSIP_RCVCHNCON_AFA_0_RXC0AFRAMEALLOC;
  4661. * TSIP_RCVCHNCON_AFS_0_RXC0AFSIZE;TSIP_RCVCHNCON_AFC_0_RXC0AFCOUNT
  4662. *
  4663. * @b Example
  4664. * @verbatim
  4665. CSL_TsipHandle hTsip;
  4666. Uint32 memoryBaseAddress;
  4667. Uint16 frameAllocation;
  4668. Uint16 frameSize;
  4669. Uint8 frameCount;
  4670. // Open the TSIP Module 0
  4671. hTsip = CSL_tsipOpen(0);
  4672. ...
  4673. // Get the Configuration for Rx Channel(A) 1
  4674. CSL_tsipTDMUGetRxChannelAConfig (hTsip, 1, &memoryBaseAddress,
  4675. &frameAllocation, &frameSize, &frameCount);
  4676. ...
  4677. @endverbatim
  4678. * =============================================================================
  4679. */
  4680. static inline void CSL_tsipTDMUGetRxChannelAConfig
  4681. (
  4682. CSL_TsipHandle hTsip,
  4683. Uint8 channelNumber,
  4684. Uint32* memoryBaseAddress,
  4685. Uint16* frameAllocation,
  4686. Uint16* frameSize,
  4687. Uint8* frameCount
  4688. )
  4689. {
  4690. /* Get the Transmit Channel A Configuration */
  4691. *memoryBaseAddress = (Uint32)CSL_FEXT (hTsip->DRCH[channelNumber].ABASE, TSIP_RCVCHNCON_ABA_0_RXC0AMEMBASEADR);
  4692. *frameAllocation = (Uint16)CSL_FEXT (hTsip->DRCH[channelNumber].AFALLOC, TSIP_RCVCHNCON_AFA_0_RXC0AFRAMEALLOC);
  4693. *frameSize = (Uint16)CSL_FEXT (hTsip->DRCH[channelNumber].AFSIZE, TSIP_RCVCHNCON_AFS_0_RXC0AFSIZE);
  4694. *frameCount = (Uint8)CSL_FEXT (hTsip->DRCH[channelNumber].AFCNT, TSIP_RCVCHNCON_AFC_0_RXC0AFCOUNT);
  4695. return;
  4696. }
  4697. /** ============================================================================
  4698. * @n@b CSL_tsipTDMUSetRxChannelBConfig
  4699. *
  4700. * @b Description
  4701. * @n This function sets the receive channel B configuration
  4702. *
  4703. * @b Arguments
  4704. * @verbatim
  4705. hTsip Handle to TSIP instance
  4706. channelNumber Rx Channel Number
  4707. memoryBaseAddress Memory Base Address
  4708. frameAllocation Frame Allocation
  4709. frameSize Number of bytes to transfer for each frame
  4710. frameCount Number of frames in a buffer.
  4711. @endverbatim
  4712. *
  4713. * <b> Return Value </b>
  4714. * @n None
  4715. *
  4716. * <b> Pre Condition </b>
  4717. * @n @a CSL_tsipOpen() must be called successfully.
  4718. *
  4719. * <b> Post Condition </b>
  4720. * @n None
  4721. *
  4722. * @b Writes
  4723. * @n TSIP_RCVCHNCON_BBA_0_RXC0BMEMBASEADR;TSIP_RCVCHNCON_BFA_0_RXC0BFRAMEALLOC;
  4724. * TSIP_RCVCHNCON_BFS_0_RXC0BFSIZE;TSIP_RCVCHNCON_BFC_0_RXC0BFCOUNT
  4725. *
  4726. * @b Example
  4727. * @verbatim
  4728. CSL_TsipHandle hTsip;
  4729. // Open the TSIP Module 0
  4730. hTsip = CSL_tsipOpen(0);
  4731. ...
  4732. // Set the Configuration for Rx Channel(B) 1
  4733. CSL_tsipTDMUSetRxChannelBConfig (hTsip, 1, 0x8000000, 0x1000, 0x128, 10);
  4734. ...
  4735. @endverbatim
  4736. * =============================================================================
  4737. */
  4738. static inline void CSL_tsipTDMUSetRxChannelBConfig
  4739. (
  4740. CSL_TsipHandle hTsip,
  4741. Uint8 channelNumber,
  4742. Uint32 memoryBaseAddress,
  4743. Uint16 frameAllocation,
  4744. Uint16 frameSize,
  4745. Uint8 frameCount
  4746. )
  4747. {
  4748. /* Set the Receive Channel B Configuration */
  4749. CSL_FINS (hTsip->DRCH[channelNumber].BBASE, TSIP_RCVCHNCON_BBA_0_RXC0BMEMBASEADR, memoryBaseAddress);
  4750. CSL_FINS (hTsip->DRCH[channelNumber].BFALLOC, TSIP_RCVCHNCON_BFA_0_RXC0BFRAMEALLOC, frameAllocation);
  4751. CSL_FINS (hTsip->DRCH[channelNumber].BFSIZE, TSIP_RCVCHNCON_BFS_0_RXC0BFSIZE, frameSize);
  4752. CSL_FINS (hTsip->DRCH[channelNumber].BFCNT, TSIP_RCVCHNCON_BFC_0_RXC0BFCOUNT, frameCount);
  4753. return;
  4754. }
  4755. /** ============================================================================
  4756. * @n@b CSL_tsipTDMUGetRxChannelBConfig
  4757. *
  4758. * @b Description
  4759. * @n This function gets the receive channel B configuration
  4760. *
  4761. * @b Arguments
  4762. * @verbatim
  4763. hTsip Handle to TSIP instance
  4764. channelNumber Rx Channel Number
  4765. memoryBaseAddress Memory Base Address populated by this API
  4766. frameAllocation Frame Allocation populated by this API
  4767. frameSize Number of bytes to transfer for each frame populated by this API
  4768. frameCount Number of frames in a buffer populated by this API
  4769. @endverbatim
  4770. *
  4771. * <b> Return Value </b>
  4772. * @n None
  4773. *
  4774. * <b> Pre Condition </b>
  4775. * @n @a CSL_tsipOpen() must be called successfully.
  4776. *
  4777. * <b> Post Condition </b>
  4778. * @n None
  4779. *
  4780. * @b Reads
  4781. * @n TSIP_RCVCHNCON_BBA_0_RXC0BMEMBASEADR;TSIP_RCVCHNCON_BFA_0_RXC0BFRAMEALLOC;
  4782. * TSIP_RCVCHNCON_BFS_0_RXC0BFSIZE;TSIP_RCVCHNCON_BFC_0_RXC0BFCOUNT
  4783. *
  4784. * @b Example
  4785. * @verbatim
  4786. CSL_TsipHandle hTsip;
  4787. Uint32 memoryBaseAddress;
  4788. Uint16 frameAllocation;
  4789. Uint16 frameSize;
  4790. Uint8 frameCount;
  4791. // Open the TSIP Module 0
  4792. hTsip = CSL_tsipOpen(0);
  4793. ...
  4794. // Get the Configuration for Rx Channel(B) 1
  4795. CSL_tsipTDMUGetRxChannelBConfig (hTsip, 1, &memoryBaseAddress,
  4796. &frameAllocation, &frameSize, &frameCount);
  4797. ...
  4798. @endverbatim
  4799. * =============================================================================
  4800. */
  4801. static inline void CSL_tsipTDMUGetRxChannelBConfig
  4802. (
  4803. CSL_TsipHandle hTsip,
  4804. Uint8 channelNumber,
  4805. Uint32* memoryBaseAddress,
  4806. Uint16* frameAllocation,
  4807. Uint16* frameSize,
  4808. Uint8* frameCount
  4809. )
  4810. {
  4811. /* Get the Receive Channel B Configuration */
  4812. *memoryBaseAddress = (Uint32)CSL_FEXT (hTsip->DRCH[channelNumber].BBASE, TSIP_RCVCHNCON_BBA_0_RXC0BMEMBASEADR);
  4813. *frameAllocation = (Uint16)CSL_FEXT (hTsip->DRCH[channelNumber].BFALLOC, TSIP_RCVCHNCON_BFA_0_RXC0BFRAMEALLOC);
  4814. *frameSize = (Uint16)CSL_FEXT (hTsip->DRCH[channelNumber].BFSIZE, TSIP_RCVCHNCON_BFS_0_RXC0BFSIZE);
  4815. *frameCount = (Uint8)CSL_FEXT (hTsip->DRCH[channelNumber].BFCNT, TSIP_RCVCHNCON_BFC_0_RXC0BFCOUNT);
  4816. return;
  4817. }
  4818. /**
  4819. @}
  4820. */
  4821. #endif /* CSL_TSIPAUX_H_ */