1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463 |
- /*
- * Copyright (c) 2014, Freescale Semiconductor, Inc.
- * All rights reserved.
- *
- * THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- */
- /*
- * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
- *
- * This file was generated automatically and any changes may be lost.
- */
- #ifndef __HW_I2S_REGISTERS_H__
- #define __HW_I2S_REGISTERS_H__
- #include "regs.h"
- /*
- * MK64F12 I2S
- *
- * Inter-IC Sound / Synchronous Audio Interface
- *
- * Registers defined in this header file:
- * - HW_I2S_TCSR - SAI Transmit Control Register
- * - HW_I2S_TCR1 - SAI Transmit Configuration 1 Register
- * - HW_I2S_TCR2 - SAI Transmit Configuration 2 Register
- * - HW_I2S_TCR3 - SAI Transmit Configuration 3 Register
- * - HW_I2S_TCR4 - SAI Transmit Configuration 4 Register
- * - HW_I2S_TCR5 - SAI Transmit Configuration 5 Register
- * - HW_I2S_TDRn - SAI Transmit Data Register
- * - HW_I2S_TFRn - SAI Transmit FIFO Register
- * - HW_I2S_TMR - SAI Transmit Mask Register
- * - HW_I2S_RCSR - SAI Receive Control Register
- * - HW_I2S_RCR1 - SAI Receive Configuration 1 Register
- * - HW_I2S_RCR2 - SAI Receive Configuration 2 Register
- * - HW_I2S_RCR3 - SAI Receive Configuration 3 Register
- * - HW_I2S_RCR4 - SAI Receive Configuration 4 Register
- * - HW_I2S_RCR5 - SAI Receive Configuration 5 Register
- * - HW_I2S_RDRn - SAI Receive Data Register
- * - HW_I2S_RFRn - SAI Receive FIFO Register
- * - HW_I2S_RMR - SAI Receive Mask Register
- * - HW_I2S_MCR - SAI MCLK Control Register
- * - HW_I2S_MDR - SAI MCLK Divide Register
- *
- * - hw_i2s_t - Struct containing all module registers.
- */
- //! @name Module base addresses
- //@{
- #ifndef REGS_I2S_BASE
- #define HW_I2S_INSTANCE_COUNT (1U) //!< Number of instances of the I2S module.
- #define HW_I2S0 (0U) //!< Instance number for I2S0.
- #define REGS_I2S0_BASE (0x4002F000U) //!< Base address for I2S0.
- //! @brief Table of base addresses for I2S instances.
- static const uint32_t __g_regs_I2S_base_addresses[] = {
- REGS_I2S0_BASE,
- };
- //! @brief Get the base address of I2S by instance number.
- //! @param x I2S instance number, from 0 through 0.
- #define REGS_I2S_BASE(x) (__g_regs_I2S_base_addresses[(x)])
- //! @brief Get the instance number given a base address.
- //! @param b Base address for an instance of I2S.
- #define REGS_I2S_INSTANCE(b) ((b) == REGS_I2S0_BASE ? HW_I2S0 : 0)
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TCSR - SAI Transmit Control Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TCSR - SAI Transmit Control Register (RW)
- *
- * Reset value: 0x00000000U
- */
- typedef union _hw_i2s_tcsr
- {
- uint32_t U;
- struct _hw_i2s_tcsr_bitfields
- {
- uint32_t FRDE : 1; //!< [0] FIFO Request DMA Enable
- uint32_t FWDE : 1; //!< [1] FIFO Warning DMA Enable
- uint32_t RESERVED0 : 6; //!< [7:2]
- uint32_t FRIE : 1; //!< [8] FIFO Request Interrupt Enable
- uint32_t FWIE : 1; //!< [9] FIFO Warning Interrupt Enable
- uint32_t FEIE : 1; //!< [10] FIFO Error Interrupt Enable
- uint32_t SEIE : 1; //!< [11] Sync Error Interrupt Enable
- uint32_t WSIE : 1; //!< [12] Word Start Interrupt Enable
- uint32_t RESERVED1 : 3; //!< [15:13]
- uint32_t FRF : 1; //!< [16] FIFO Request Flag
- uint32_t FWF : 1; //!< [17] FIFO Warning Flag
- uint32_t FEF : 1; //!< [18] FIFO Error Flag
- uint32_t SEF : 1; //!< [19] Sync Error Flag
- uint32_t WSF : 1; //!< [20] Word Start Flag
- uint32_t RESERVED2 : 3; //!< [23:21]
- uint32_t SR : 1; //!< [24] Software Reset
- uint32_t FR : 1; //!< [25] FIFO Reset
- uint32_t RESERVED3 : 2; //!< [27:26]
- uint32_t BCE : 1; //!< [28] Bit Clock Enable
- uint32_t DBGE : 1; //!< [29] Debug Enable
- uint32_t STOPE : 1; //!< [30] Stop Enable
- uint32_t TE : 1; //!< [31] Transmitter Enable
- } B;
- } hw_i2s_tcsr_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TCSR register
- */
- //@{
- #define HW_I2S_TCSR_ADDR(x) (REGS_I2S_BASE(x) + 0x0U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TCSR(x) (*(__IO hw_i2s_tcsr_t *) HW_I2S_TCSR_ADDR(x))
- #define HW_I2S_TCSR_RD(x) (HW_I2S_TCSR(x).U)
- #define HW_I2S_TCSR_WR(x, v) (HW_I2S_TCSR(x).U = (v))
- #define HW_I2S_TCSR_SET(x, v) (HW_I2S_TCSR_WR(x, HW_I2S_TCSR_RD(x) | (v)))
- #define HW_I2S_TCSR_CLR(x, v) (HW_I2S_TCSR_WR(x, HW_I2S_TCSR_RD(x) & ~(v)))
- #define HW_I2S_TCSR_TOG(x, v) (HW_I2S_TCSR_WR(x, HW_I2S_TCSR_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TCSR bitfields
- */
- /*!
- * @name Register I2S_TCSR, field FRDE[0] (RW)
- *
- * Enables/disables DMA requests.
- *
- * Values:
- * - 0 - Disables the DMA request.
- * - 1 - Enables the DMA request.
- */
- //@{
- #define BP_I2S_TCSR_FRDE (0U) //!< Bit position for I2S_TCSR_FRDE.
- #define BM_I2S_TCSR_FRDE (0x00000001U) //!< Bit mask for I2S_TCSR_FRDE.
- #define BS_I2S_TCSR_FRDE (1U) //!< Bit field size in bits for I2S_TCSR_FRDE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FRDE field.
- #define BR_I2S_TCSR_FRDE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRDE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_FRDE.
- #define BF_I2S_TCSR_FRDE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_FRDE), uint32_t) & BM_I2S_TCSR_FRDE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FRDE field to a new value.
- #define BW_I2S_TCSR_FRDE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRDE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FWDE[1] (RW)
- *
- * Enables/disables DMA requests.
- *
- * Values:
- * - 0 - Disables the DMA request.
- * - 1 - Enables the DMA request.
- */
- //@{
- #define BP_I2S_TCSR_FWDE (1U) //!< Bit position for I2S_TCSR_FWDE.
- #define BM_I2S_TCSR_FWDE (0x00000002U) //!< Bit mask for I2S_TCSR_FWDE.
- #define BS_I2S_TCSR_FWDE (1U) //!< Bit field size in bits for I2S_TCSR_FWDE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FWDE field.
- #define BR_I2S_TCSR_FWDE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWDE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_FWDE.
- #define BF_I2S_TCSR_FWDE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_FWDE), uint32_t) & BM_I2S_TCSR_FWDE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FWDE field to a new value.
- #define BW_I2S_TCSR_FWDE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWDE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FRIE[8] (RW)
- *
- * Enables/disables FIFO request interrupts.
- *
- * Values:
- * - 0 - Disables the interrupt.
- * - 1 - Enables the interrupt.
- */
- //@{
- #define BP_I2S_TCSR_FRIE (8U) //!< Bit position for I2S_TCSR_FRIE.
- #define BM_I2S_TCSR_FRIE (0x00000100U) //!< Bit mask for I2S_TCSR_FRIE.
- #define BS_I2S_TCSR_FRIE (1U) //!< Bit field size in bits for I2S_TCSR_FRIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FRIE field.
- #define BR_I2S_TCSR_FRIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRIE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_FRIE.
- #define BF_I2S_TCSR_FRIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_FRIE), uint32_t) & BM_I2S_TCSR_FRIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FRIE field to a new value.
- #define BW_I2S_TCSR_FRIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FWIE[9] (RW)
- *
- * Enables/disables FIFO warning interrupts.
- *
- * Values:
- * - 0 - Disables the interrupt.
- * - 1 - Enables the interrupt.
- */
- //@{
- #define BP_I2S_TCSR_FWIE (9U) //!< Bit position for I2S_TCSR_FWIE.
- #define BM_I2S_TCSR_FWIE (0x00000200U) //!< Bit mask for I2S_TCSR_FWIE.
- #define BS_I2S_TCSR_FWIE (1U) //!< Bit field size in bits for I2S_TCSR_FWIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FWIE field.
- #define BR_I2S_TCSR_FWIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWIE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_FWIE.
- #define BF_I2S_TCSR_FWIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_FWIE), uint32_t) & BM_I2S_TCSR_FWIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FWIE field to a new value.
- #define BW_I2S_TCSR_FWIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FEIE[10] (RW)
- *
- * Enables/disables FIFO error interrupts.
- *
- * Values:
- * - 0 - Disables the interrupt.
- * - 1 - Enables the interrupt.
- */
- //@{
- #define BP_I2S_TCSR_FEIE (10U) //!< Bit position for I2S_TCSR_FEIE.
- #define BM_I2S_TCSR_FEIE (0x00000400U) //!< Bit mask for I2S_TCSR_FEIE.
- #define BS_I2S_TCSR_FEIE (1U) //!< Bit field size in bits for I2S_TCSR_FEIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FEIE field.
- #define BR_I2S_TCSR_FEIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEIE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_FEIE.
- #define BF_I2S_TCSR_FEIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_FEIE), uint32_t) & BM_I2S_TCSR_FEIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FEIE field to a new value.
- #define BW_I2S_TCSR_FEIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field SEIE[11] (RW)
- *
- * Enables/disables sync error interrupts.
- *
- * Values:
- * - 0 - Disables interrupt.
- * - 1 - Enables interrupt.
- */
- //@{
- #define BP_I2S_TCSR_SEIE (11U) //!< Bit position for I2S_TCSR_SEIE.
- #define BM_I2S_TCSR_SEIE (0x00000800U) //!< Bit mask for I2S_TCSR_SEIE.
- #define BS_I2S_TCSR_SEIE (1U) //!< Bit field size in bits for I2S_TCSR_SEIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_SEIE field.
- #define BR_I2S_TCSR_SEIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEIE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_SEIE.
- #define BF_I2S_TCSR_SEIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_SEIE), uint32_t) & BM_I2S_TCSR_SEIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SEIE field to a new value.
- #define BW_I2S_TCSR_SEIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field WSIE[12] (RW)
- *
- * Enables/disables word start interrupts.
- *
- * Values:
- * - 0 - Disables interrupt.
- * - 1 - Enables interrupt.
- */
- //@{
- #define BP_I2S_TCSR_WSIE (12U) //!< Bit position for I2S_TCSR_WSIE.
- #define BM_I2S_TCSR_WSIE (0x00001000U) //!< Bit mask for I2S_TCSR_WSIE.
- #define BS_I2S_TCSR_WSIE (1U) //!< Bit field size in bits for I2S_TCSR_WSIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_WSIE field.
- #define BR_I2S_TCSR_WSIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSIE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_WSIE.
- #define BF_I2S_TCSR_WSIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_WSIE), uint32_t) & BM_I2S_TCSR_WSIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WSIE field to a new value.
- #define BW_I2S_TCSR_WSIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FRF[16] (RO)
- *
- * Indicates that the number of words in an enabled transmit channel FIFO is
- * less than or equal to the transmit FIFO watermark.
- *
- * Values:
- * - 0 - Transmit FIFO watermark has not been reached.
- * - 1 - Transmit FIFO watermark has been reached.
- */
- //@{
- #define BP_I2S_TCSR_FRF (16U) //!< Bit position for I2S_TCSR_FRF.
- #define BM_I2S_TCSR_FRF (0x00010000U) //!< Bit mask for I2S_TCSR_FRF.
- #define BS_I2S_TCSR_FRF (1U) //!< Bit field size in bits for I2S_TCSR_FRF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FRF field.
- #define BR_I2S_TCSR_FRF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRF))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FWF[17] (RO)
- *
- * Indicates that an enabled transmit FIFO is empty.
- *
- * Values:
- * - 0 - No enabled transmit FIFO is empty.
- * - 1 - Enabled transmit FIFO is empty.
- */
- //@{
- #define BP_I2S_TCSR_FWF (17U) //!< Bit position for I2S_TCSR_FWF.
- #define BM_I2S_TCSR_FWF (0x00020000U) //!< Bit mask for I2S_TCSR_FWF.
- #define BS_I2S_TCSR_FWF (1U) //!< Bit field size in bits for I2S_TCSR_FWF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FWF field.
- #define BR_I2S_TCSR_FWF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWF))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FEF[18] (W1C)
- *
- * Indicates that an enabled transmit FIFO has underrun. Write a logic 1 to this
- * field to clear this flag.
- *
- * Values:
- * - 0 - Transmit underrun not detected.
- * - 1 - Transmit underrun detected.
- */
- //@{
- #define BP_I2S_TCSR_FEF (18U) //!< Bit position for I2S_TCSR_FEF.
- #define BM_I2S_TCSR_FEF (0x00040000U) //!< Bit mask for I2S_TCSR_FEF.
- #define BS_I2S_TCSR_FEF (1U) //!< Bit field size in bits for I2S_TCSR_FEF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_FEF field.
- #define BR_I2S_TCSR_FEF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEF))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_FEF.
- #define BF_I2S_TCSR_FEF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_FEF), uint32_t) & BM_I2S_TCSR_FEF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FEF field to a new value.
- #define BW_I2S_TCSR_FEF(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field SEF[19] (W1C)
- *
- * Indicates that an error in the externally-generated frame sync has been
- * detected. Write a logic 1 to this field to clear this flag.
- *
- * Values:
- * - 0 - Sync error not detected.
- * - 1 - Frame sync error detected.
- */
- //@{
- #define BP_I2S_TCSR_SEF (19U) //!< Bit position for I2S_TCSR_SEF.
- #define BM_I2S_TCSR_SEF (0x00080000U) //!< Bit mask for I2S_TCSR_SEF.
- #define BS_I2S_TCSR_SEF (1U) //!< Bit field size in bits for I2S_TCSR_SEF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_SEF field.
- #define BR_I2S_TCSR_SEF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEF))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_SEF.
- #define BF_I2S_TCSR_SEF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_SEF), uint32_t) & BM_I2S_TCSR_SEF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SEF field to a new value.
- #define BW_I2S_TCSR_SEF(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field WSF[20] (W1C)
- *
- * Indicates that the start of the configured word has been detected. Write a
- * logic 1 to this field to clear this flag.
- *
- * Values:
- * - 0 - Start of word not detected.
- * - 1 - Start of word detected.
- */
- //@{
- #define BP_I2S_TCSR_WSF (20U) //!< Bit position for I2S_TCSR_WSF.
- #define BM_I2S_TCSR_WSF (0x00100000U) //!< Bit mask for I2S_TCSR_WSF.
- #define BS_I2S_TCSR_WSF (1U) //!< Bit field size in bits for I2S_TCSR_WSF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_WSF field.
- #define BR_I2S_TCSR_WSF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSF))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_WSF.
- #define BF_I2S_TCSR_WSF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_WSF), uint32_t) & BM_I2S_TCSR_WSF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WSF field to a new value.
- #define BW_I2S_TCSR_WSF(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field SR[24] (RW)
- *
- * When set, resets the internal transmitter logic including the FIFO pointers.
- * Software-visible registers are not affected, except for the status registers.
- *
- * Values:
- * - 0 - No effect.
- * - 1 - Software reset.
- */
- //@{
- #define BP_I2S_TCSR_SR (24U) //!< Bit position for I2S_TCSR_SR.
- #define BM_I2S_TCSR_SR (0x01000000U) //!< Bit mask for I2S_TCSR_SR.
- #define BS_I2S_TCSR_SR (1U) //!< Bit field size in bits for I2S_TCSR_SR.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_SR field.
- #define BR_I2S_TCSR_SR(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SR))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_SR.
- #define BF_I2S_TCSR_SR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_SR), uint32_t) & BM_I2S_TCSR_SR)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SR field to a new value.
- #define BW_I2S_TCSR_SR(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SR) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field FR[25] (WORZ)
- *
- * Resets the FIFO pointers. Reading this field will always return zero. FIFO
- * pointers should only be reset when the transmitter is disabled or the FIFO error
- * flag is set.
- *
- * Values:
- * - 0 - No effect.
- * - 1 - FIFO reset.
- */
- //@{
- #define BP_I2S_TCSR_FR (25U) //!< Bit position for I2S_TCSR_FR.
- #define BM_I2S_TCSR_FR (0x02000000U) //!< Bit mask for I2S_TCSR_FR.
- #define BS_I2S_TCSR_FR (1U) //!< Bit field size in bits for I2S_TCSR_FR.
- //! @brief Format value for bitfield I2S_TCSR_FR.
- #define BF_I2S_TCSR_FR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_FR), uint32_t) & BM_I2S_TCSR_FR)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FR field to a new value.
- #define BW_I2S_TCSR_FR(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FR) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field BCE[28] (RW)
- *
- * Enables the transmit bit clock, separately from the TE. This field is
- * automatically set whenever TE is set. When software clears this field, the transmit
- * bit clock remains enabled, and this bit remains set, until the end of the
- * current frame.
- *
- * Values:
- * - 0 - Transmit bit clock is disabled.
- * - 1 - Transmit bit clock is enabled.
- */
- //@{
- #define BP_I2S_TCSR_BCE (28U) //!< Bit position for I2S_TCSR_BCE.
- #define BM_I2S_TCSR_BCE (0x10000000U) //!< Bit mask for I2S_TCSR_BCE.
- #define BS_I2S_TCSR_BCE (1U) //!< Bit field size in bits for I2S_TCSR_BCE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_BCE field.
- #define BR_I2S_TCSR_BCE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_BCE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_BCE.
- #define BF_I2S_TCSR_BCE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_BCE), uint32_t) & BM_I2S_TCSR_BCE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCE field to a new value.
- #define BW_I2S_TCSR_BCE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_BCE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field DBGE[29] (RW)
- *
- * Enables/disables transmitter operation in Debug mode. The transmit bit clock
- * is not affected by debug mode.
- *
- * Values:
- * - 0 - Transmitter is disabled in Debug mode, after completing the current
- * frame.
- * - 1 - Transmitter is enabled in Debug mode.
- */
- //@{
- #define BP_I2S_TCSR_DBGE (29U) //!< Bit position for I2S_TCSR_DBGE.
- #define BM_I2S_TCSR_DBGE (0x20000000U) //!< Bit mask for I2S_TCSR_DBGE.
- #define BS_I2S_TCSR_DBGE (1U) //!< Bit field size in bits for I2S_TCSR_DBGE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_DBGE field.
- #define BR_I2S_TCSR_DBGE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_DBGE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_DBGE.
- #define BF_I2S_TCSR_DBGE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_DBGE), uint32_t) & BM_I2S_TCSR_DBGE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the DBGE field to a new value.
- #define BW_I2S_TCSR_DBGE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_DBGE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field STOPE[30] (RW)
- *
- * Configures transmitter operation in Stop mode. This field is ignored and the
- * transmitter is disabled in all low-leakage stop modes.
- *
- * Values:
- * - 0 - Transmitter disabled in Stop mode.
- * - 1 - Transmitter enabled in Stop mode.
- */
- //@{
- #define BP_I2S_TCSR_STOPE (30U) //!< Bit position for I2S_TCSR_STOPE.
- #define BM_I2S_TCSR_STOPE (0x40000000U) //!< Bit mask for I2S_TCSR_STOPE.
- #define BS_I2S_TCSR_STOPE (1U) //!< Bit field size in bits for I2S_TCSR_STOPE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_STOPE field.
- #define BR_I2S_TCSR_STOPE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_STOPE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_STOPE.
- #define BF_I2S_TCSR_STOPE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_STOPE), uint32_t) & BM_I2S_TCSR_STOPE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the STOPE field to a new value.
- #define BW_I2S_TCSR_STOPE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_STOPE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCSR, field TE[31] (RW)
- *
- * Enables/disables the transmitter. When software clears this field, the
- * transmitter remains enabled, and this bit remains set, until the end of the current
- * frame.
- *
- * Values:
- * - 0 - Transmitter is disabled.
- * - 1 - Transmitter is enabled, or transmitter has been disabled and has not
- * yet reached end of frame.
- */
- //@{
- #define BP_I2S_TCSR_TE (31U) //!< Bit position for I2S_TCSR_TE.
- #define BM_I2S_TCSR_TE (0x80000000U) //!< Bit mask for I2S_TCSR_TE.
- #define BS_I2S_TCSR_TE (1U) //!< Bit field size in bits for I2S_TCSR_TE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCSR_TE field.
- #define BR_I2S_TCSR_TE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_TE))
- #endif
- //! @brief Format value for bitfield I2S_TCSR_TE.
- #define BF_I2S_TCSR_TE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCSR_TE), uint32_t) & BM_I2S_TCSR_TE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the TE field to a new value.
- #define BW_I2S_TCSR_TE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_TE) = (v))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TCR1 - SAI Transmit Configuration 1 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TCR1 - SAI Transmit Configuration 1 Register (RW)
- *
- * Reset value: 0x00000000U
- */
- typedef union _hw_i2s_tcr1
- {
- uint32_t U;
- struct _hw_i2s_tcr1_bitfields
- {
- uint32_t TFW : 3; //!< [2:0] Transmit FIFO Watermark
- uint32_t RESERVED0 : 29; //!< [31:3]
- } B;
- } hw_i2s_tcr1_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TCR1 register
- */
- //@{
- #define HW_I2S_TCR1_ADDR(x) (REGS_I2S_BASE(x) + 0x4U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TCR1(x) (*(__IO hw_i2s_tcr1_t *) HW_I2S_TCR1_ADDR(x))
- #define HW_I2S_TCR1_RD(x) (HW_I2S_TCR1(x).U)
- #define HW_I2S_TCR1_WR(x, v) (HW_I2S_TCR1(x).U = (v))
- #define HW_I2S_TCR1_SET(x, v) (HW_I2S_TCR1_WR(x, HW_I2S_TCR1_RD(x) | (v)))
- #define HW_I2S_TCR1_CLR(x, v) (HW_I2S_TCR1_WR(x, HW_I2S_TCR1_RD(x) & ~(v)))
- #define HW_I2S_TCR1_TOG(x, v) (HW_I2S_TCR1_WR(x, HW_I2S_TCR1_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TCR1 bitfields
- */
- /*!
- * @name Register I2S_TCR1, field TFW[2:0] (RW)
- *
- * Configures the watermark level for all enabled transmit channels.
- */
- //@{
- #define BP_I2S_TCR1_TFW (0U) //!< Bit position for I2S_TCR1_TFW.
- #define BM_I2S_TCR1_TFW (0x00000007U) //!< Bit mask for I2S_TCR1_TFW.
- #define BS_I2S_TCR1_TFW (3U) //!< Bit field size in bits for I2S_TCR1_TFW.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR1_TFW field.
- #define BR_I2S_TCR1_TFW(x) (HW_I2S_TCR1(x).B.TFW)
- #endif
- //! @brief Format value for bitfield I2S_TCR1_TFW.
- #define BF_I2S_TCR1_TFW(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR1_TFW), uint32_t) & BM_I2S_TCR1_TFW)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the TFW field to a new value.
- #define BW_I2S_TCR1_TFW(x, v) (HW_I2S_TCR1_WR(x, (HW_I2S_TCR1_RD(x) & ~BM_I2S_TCR1_TFW) | BF_I2S_TCR1_TFW(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TCR2 - SAI Transmit Configuration 2 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TCR2 - SAI Transmit Configuration 2 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when TCSR[TE] is set.
- */
- typedef union _hw_i2s_tcr2
- {
- uint32_t U;
- struct _hw_i2s_tcr2_bitfields
- {
- uint32_t DIV : 8; //!< [7:0] Bit Clock Divide
- uint32_t RESERVED0 : 16; //!< [23:8]
- uint32_t BCD : 1; //!< [24] Bit Clock Direction
- uint32_t BCP : 1; //!< [25] Bit Clock Polarity
- uint32_t MSEL : 2; //!< [27:26] MCLK Select
- uint32_t BCI : 1; //!< [28] Bit Clock Input
- uint32_t BCS : 1; //!< [29] Bit Clock Swap
- uint32_t SYNC : 2; //!< [31:30] Synchronous Mode
- } B;
- } hw_i2s_tcr2_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TCR2 register
- */
- //@{
- #define HW_I2S_TCR2_ADDR(x) (REGS_I2S_BASE(x) + 0x8U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TCR2(x) (*(__IO hw_i2s_tcr2_t *) HW_I2S_TCR2_ADDR(x))
- #define HW_I2S_TCR2_RD(x) (HW_I2S_TCR2(x).U)
- #define HW_I2S_TCR2_WR(x, v) (HW_I2S_TCR2(x).U = (v))
- #define HW_I2S_TCR2_SET(x, v) (HW_I2S_TCR2_WR(x, HW_I2S_TCR2_RD(x) | (v)))
- #define HW_I2S_TCR2_CLR(x, v) (HW_I2S_TCR2_WR(x, HW_I2S_TCR2_RD(x) & ~(v)))
- #define HW_I2S_TCR2_TOG(x, v) (HW_I2S_TCR2_WR(x, HW_I2S_TCR2_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TCR2 bitfields
- */
- /*!
- * @name Register I2S_TCR2, field DIV[7:0] (RW)
- *
- * Divides down the audio master clock to generate the bit clock when configured
- * for an internal bit clock. The division value is (DIV + 1) * 2.
- */
- //@{
- #define BP_I2S_TCR2_DIV (0U) //!< Bit position for I2S_TCR2_DIV.
- #define BM_I2S_TCR2_DIV (0x000000FFU) //!< Bit mask for I2S_TCR2_DIV.
- #define BS_I2S_TCR2_DIV (8U) //!< Bit field size in bits for I2S_TCR2_DIV.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR2_DIV field.
- #define BR_I2S_TCR2_DIV(x) (HW_I2S_TCR2(x).B.DIV)
- #endif
- //! @brief Format value for bitfield I2S_TCR2_DIV.
- #define BF_I2S_TCR2_DIV(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR2_DIV), uint32_t) & BM_I2S_TCR2_DIV)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the DIV field to a new value.
- #define BW_I2S_TCR2_DIV(x, v) (HW_I2S_TCR2_WR(x, (HW_I2S_TCR2_RD(x) & ~BM_I2S_TCR2_DIV) | BF_I2S_TCR2_DIV(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR2, field BCD[24] (RW)
- *
- * Configures the direction of the bit clock.
- *
- * Values:
- * - 0 - Bit clock is generated externally in Slave mode.
- * - 1 - Bit clock is generated internally in Master mode.
- */
- //@{
- #define BP_I2S_TCR2_BCD (24U) //!< Bit position for I2S_TCR2_BCD.
- #define BM_I2S_TCR2_BCD (0x01000000U) //!< Bit mask for I2S_TCR2_BCD.
- #define BS_I2S_TCR2_BCD (1U) //!< Bit field size in bits for I2S_TCR2_BCD.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR2_BCD field.
- #define BR_I2S_TCR2_BCD(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCD))
- #endif
- //! @brief Format value for bitfield I2S_TCR2_BCD.
- #define BF_I2S_TCR2_BCD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR2_BCD), uint32_t) & BM_I2S_TCR2_BCD)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCD field to a new value.
- #define BW_I2S_TCR2_BCD(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCD) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR2, field BCP[25] (RW)
- *
- * Configures the polarity of the bit clock.
- *
- * Values:
- * - 0 - Bit clock is active high with drive outputs on rising edge and sample
- * inputs on falling edge.
- * - 1 - Bit clock is active low with drive outputs on falling edge and sample
- * inputs on rising edge.
- */
- //@{
- #define BP_I2S_TCR2_BCP (25U) //!< Bit position for I2S_TCR2_BCP.
- #define BM_I2S_TCR2_BCP (0x02000000U) //!< Bit mask for I2S_TCR2_BCP.
- #define BS_I2S_TCR2_BCP (1U) //!< Bit field size in bits for I2S_TCR2_BCP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR2_BCP field.
- #define BR_I2S_TCR2_BCP(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCP))
- #endif
- //! @brief Format value for bitfield I2S_TCR2_BCP.
- #define BF_I2S_TCR2_BCP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR2_BCP), uint32_t) & BM_I2S_TCR2_BCP)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCP field to a new value.
- #define BW_I2S_TCR2_BCP(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCP) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR2, field MSEL[27:26] (RW)
- *
- * Selects the audio Master Clock option used to generate an internally
- * generated bit clock. This field has no effect when configured for an externally
- * generated bit clock. Depending on the device, some Master Clock options might not be
- * available. See the chip configuration details for the availability and
- * chip-specific meaning of each option.
- *
- * Values:
- * - 00 - Bus Clock selected.
- * - 01 - Master Clock (MCLK) 1 option selected.
- * - 10 - Master Clock (MCLK) 2 option selected.
- * - 11 - Master Clock (MCLK) 3 option selected.
- */
- //@{
- #define BP_I2S_TCR2_MSEL (26U) //!< Bit position for I2S_TCR2_MSEL.
- #define BM_I2S_TCR2_MSEL (0x0C000000U) //!< Bit mask for I2S_TCR2_MSEL.
- #define BS_I2S_TCR2_MSEL (2U) //!< Bit field size in bits for I2S_TCR2_MSEL.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR2_MSEL field.
- #define BR_I2S_TCR2_MSEL(x) (HW_I2S_TCR2(x).B.MSEL)
- #endif
- //! @brief Format value for bitfield I2S_TCR2_MSEL.
- #define BF_I2S_TCR2_MSEL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR2_MSEL), uint32_t) & BM_I2S_TCR2_MSEL)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the MSEL field to a new value.
- #define BW_I2S_TCR2_MSEL(x, v) (HW_I2S_TCR2_WR(x, (HW_I2S_TCR2_RD(x) & ~BM_I2S_TCR2_MSEL) | BF_I2S_TCR2_MSEL(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR2, field BCI[28] (RW)
- *
- * When this field is set and using an internally generated bit clock in either
- * synchronous or asynchronous mode, the bit clock actually used by the
- * transmitter is delayed by the pad output delay (the transmitter is clocked by the pad
- * input as if the clock was externally generated). This has the effect of
- * decreasing the data input setup time, but increasing the data output valid time. The
- * slave mode timing from the datasheet should be used for the transmitter when
- * this bit is set. In synchronous mode, this bit allows the transmitter to use
- * the slave mode timing from the datasheet, while the receiver uses the master
- * mode timing. This field has no effect when configured for an externally generated
- * bit clock or when synchronous to another SAI peripheral .
- *
- * Values:
- * - 0 - No effect.
- * - 1 - Internal logic is clocked as if bit clock was externally generated.
- */
- //@{
- #define BP_I2S_TCR2_BCI (28U) //!< Bit position for I2S_TCR2_BCI.
- #define BM_I2S_TCR2_BCI (0x10000000U) //!< Bit mask for I2S_TCR2_BCI.
- #define BS_I2S_TCR2_BCI (1U) //!< Bit field size in bits for I2S_TCR2_BCI.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR2_BCI field.
- #define BR_I2S_TCR2_BCI(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCI))
- #endif
- //! @brief Format value for bitfield I2S_TCR2_BCI.
- #define BF_I2S_TCR2_BCI(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR2_BCI), uint32_t) & BM_I2S_TCR2_BCI)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCI field to a new value.
- #define BW_I2S_TCR2_BCI(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCI) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR2, field BCS[29] (RW)
- *
- * This field swaps the bit clock used by the transmitter. When the transmitter
- * is configured in asynchronous mode and this bit is set, the transmitter is
- * clocked by the receiver bit clock (SAI_RX_BCLK). This allows the transmitter and
- * receiver to share the same bit clock, but the transmitter continues to use the
- * transmit frame sync (SAI_TX_SYNC). When the transmitter is configured in
- * synchronous mode, the transmitter BCS field and receiver BCS field must be set to
- * the same value. When both are set, the transmitter and receiver are both
- * clocked by the transmitter bit clock (SAI_TX_BCLK) but use the receiver frame sync
- * (SAI_RX_SYNC). This field has no effect when synchronous to another SAI
- * peripheral.
- *
- * Values:
- * - 0 - Use the normal bit clock source.
- * - 1 - Swap the bit clock source.
- */
- //@{
- #define BP_I2S_TCR2_BCS (29U) //!< Bit position for I2S_TCR2_BCS.
- #define BM_I2S_TCR2_BCS (0x20000000U) //!< Bit mask for I2S_TCR2_BCS.
- #define BS_I2S_TCR2_BCS (1U) //!< Bit field size in bits for I2S_TCR2_BCS.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR2_BCS field.
- #define BR_I2S_TCR2_BCS(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCS))
- #endif
- //! @brief Format value for bitfield I2S_TCR2_BCS.
- #define BF_I2S_TCR2_BCS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR2_BCS), uint32_t) & BM_I2S_TCR2_BCS)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCS field to a new value.
- #define BW_I2S_TCR2_BCS(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCS) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR2, field SYNC[31:30] (RW)
- *
- * Configures between asynchronous and synchronous modes of operation. When
- * configured for a synchronous mode of operation, the receiver or other SAI
- * peripheral must be configured for asynchronous operation.
- *
- * Values:
- * - 00 - Asynchronous mode.
- * - 01 - Synchronous with receiver.
- * - 10 - Synchronous with another SAI transmitter.
- * - 11 - Synchronous with another SAI receiver.
- */
- //@{
- #define BP_I2S_TCR2_SYNC (30U) //!< Bit position for I2S_TCR2_SYNC.
- #define BM_I2S_TCR2_SYNC (0xC0000000U) //!< Bit mask for I2S_TCR2_SYNC.
- #define BS_I2S_TCR2_SYNC (2U) //!< Bit field size in bits for I2S_TCR2_SYNC.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR2_SYNC field.
- #define BR_I2S_TCR2_SYNC(x) (HW_I2S_TCR2(x).B.SYNC)
- #endif
- //! @brief Format value for bitfield I2S_TCR2_SYNC.
- #define BF_I2S_TCR2_SYNC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR2_SYNC), uint32_t) & BM_I2S_TCR2_SYNC)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SYNC field to a new value.
- #define BW_I2S_TCR2_SYNC(x, v) (HW_I2S_TCR2_WR(x, (HW_I2S_TCR2_RD(x) & ~BM_I2S_TCR2_SYNC) | BF_I2S_TCR2_SYNC(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TCR3 - SAI Transmit Configuration 3 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TCR3 - SAI Transmit Configuration 3 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when TCSR[TE] is set.
- */
- typedef union _hw_i2s_tcr3
- {
- uint32_t U;
- struct _hw_i2s_tcr3_bitfields
- {
- uint32_t WDFL : 5; //!< [4:0] Word Flag Configuration
- uint32_t RESERVED0 : 11; //!< [15:5]
- uint32_t TCE : 2; //!< [17:16] Transmit Channel Enable
- uint32_t RESERVED1 : 14; //!< [31:18]
- } B;
- } hw_i2s_tcr3_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TCR3 register
- */
- //@{
- #define HW_I2S_TCR3_ADDR(x) (REGS_I2S_BASE(x) + 0xCU)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TCR3(x) (*(__IO hw_i2s_tcr3_t *) HW_I2S_TCR3_ADDR(x))
- #define HW_I2S_TCR3_RD(x) (HW_I2S_TCR3(x).U)
- #define HW_I2S_TCR3_WR(x, v) (HW_I2S_TCR3(x).U = (v))
- #define HW_I2S_TCR3_SET(x, v) (HW_I2S_TCR3_WR(x, HW_I2S_TCR3_RD(x) | (v)))
- #define HW_I2S_TCR3_CLR(x, v) (HW_I2S_TCR3_WR(x, HW_I2S_TCR3_RD(x) & ~(v)))
- #define HW_I2S_TCR3_TOG(x, v) (HW_I2S_TCR3_WR(x, HW_I2S_TCR3_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TCR3 bitfields
- */
- /*!
- * @name Register I2S_TCR3, field WDFL[4:0] (RW)
- *
- * Configures which word sets the start of word flag. The value written must be
- * one less than the word number. For example, writing 0 configures the first
- * word in the frame. When configured to a value greater than TCR4[FRSZ], then the
- * start of word flag is never set.
- */
- //@{
- #define BP_I2S_TCR3_WDFL (0U) //!< Bit position for I2S_TCR3_WDFL.
- #define BM_I2S_TCR3_WDFL (0x0000001FU) //!< Bit mask for I2S_TCR3_WDFL.
- #define BS_I2S_TCR3_WDFL (5U) //!< Bit field size in bits for I2S_TCR3_WDFL.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR3_WDFL field.
- #define BR_I2S_TCR3_WDFL(x) (HW_I2S_TCR3(x).B.WDFL)
- #endif
- //! @brief Format value for bitfield I2S_TCR3_WDFL.
- #define BF_I2S_TCR3_WDFL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR3_WDFL), uint32_t) & BM_I2S_TCR3_WDFL)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WDFL field to a new value.
- #define BW_I2S_TCR3_WDFL(x, v) (HW_I2S_TCR3_WR(x, (HW_I2S_TCR3_RD(x) & ~BM_I2S_TCR3_WDFL) | BF_I2S_TCR3_WDFL(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR3, field TCE[17:16] (RW)
- *
- * Enables the corresponding data channel for transmit operation. A channel must
- * be enabled before its FIFO is accessed.
- *
- * Values:
- * - 0 - Transmit data channel N is disabled.
- * - 1 - Transmit data channel N is enabled.
- */
- //@{
- #define BP_I2S_TCR3_TCE (16U) //!< Bit position for I2S_TCR3_TCE.
- #define BM_I2S_TCR3_TCE (0x00030000U) //!< Bit mask for I2S_TCR3_TCE.
- #define BS_I2S_TCR3_TCE (2U) //!< Bit field size in bits for I2S_TCR3_TCE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR3_TCE field.
- #define BR_I2S_TCR3_TCE(x) (HW_I2S_TCR3(x).B.TCE)
- #endif
- //! @brief Format value for bitfield I2S_TCR3_TCE.
- #define BF_I2S_TCR3_TCE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR3_TCE), uint32_t) & BM_I2S_TCR3_TCE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the TCE field to a new value.
- #define BW_I2S_TCR3_TCE(x, v) (HW_I2S_TCR3_WR(x, (HW_I2S_TCR3_RD(x) & ~BM_I2S_TCR3_TCE) | BF_I2S_TCR3_TCE(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TCR4 - SAI Transmit Configuration 4 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TCR4 - SAI Transmit Configuration 4 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when TCSR[TE] is set.
- */
- typedef union _hw_i2s_tcr4
- {
- uint32_t U;
- struct _hw_i2s_tcr4_bitfields
- {
- uint32_t FSD : 1; //!< [0] Frame Sync Direction
- uint32_t FSP : 1; //!< [1] Frame Sync Polarity
- uint32_t RESERVED0 : 1; //!< [2]
- uint32_t FSE : 1; //!< [3] Frame Sync Early
- uint32_t MF : 1; //!< [4] MSB First
- uint32_t RESERVED1 : 3; //!< [7:5]
- uint32_t SYWD : 5; //!< [12:8] Sync Width
- uint32_t RESERVED2 : 3; //!< [15:13]
- uint32_t FRSZ : 5; //!< [20:16] Frame size
- uint32_t RESERVED3 : 11; //!< [31:21]
- } B;
- } hw_i2s_tcr4_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TCR4 register
- */
- //@{
- #define HW_I2S_TCR4_ADDR(x) (REGS_I2S_BASE(x) + 0x10U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TCR4(x) (*(__IO hw_i2s_tcr4_t *) HW_I2S_TCR4_ADDR(x))
- #define HW_I2S_TCR4_RD(x) (HW_I2S_TCR4(x).U)
- #define HW_I2S_TCR4_WR(x, v) (HW_I2S_TCR4(x).U = (v))
- #define HW_I2S_TCR4_SET(x, v) (HW_I2S_TCR4_WR(x, HW_I2S_TCR4_RD(x) | (v)))
- #define HW_I2S_TCR4_CLR(x, v) (HW_I2S_TCR4_WR(x, HW_I2S_TCR4_RD(x) & ~(v)))
- #define HW_I2S_TCR4_TOG(x, v) (HW_I2S_TCR4_WR(x, HW_I2S_TCR4_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TCR4 bitfields
- */
- /*!
- * @name Register I2S_TCR4, field FSD[0] (RW)
- *
- * Configures the direction of the frame sync.
- *
- * Values:
- * - 0 - Frame sync is generated externally in Slave mode.
- * - 1 - Frame sync is generated internally in Master mode.
- */
- //@{
- #define BP_I2S_TCR4_FSD (0U) //!< Bit position for I2S_TCR4_FSD.
- #define BM_I2S_TCR4_FSD (0x00000001U) //!< Bit mask for I2S_TCR4_FSD.
- #define BS_I2S_TCR4_FSD (1U) //!< Bit field size in bits for I2S_TCR4_FSD.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR4_FSD field.
- #define BR_I2S_TCR4_FSD(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSD))
- #endif
- //! @brief Format value for bitfield I2S_TCR4_FSD.
- #define BF_I2S_TCR4_FSD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR4_FSD), uint32_t) & BM_I2S_TCR4_FSD)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FSD field to a new value.
- #define BW_I2S_TCR4_FSD(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSD) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR4, field FSP[1] (RW)
- *
- * Configures the polarity of the frame sync.
- *
- * Values:
- * - 0 - Frame sync is active high.
- * - 1 - Frame sync is active low.
- */
- //@{
- #define BP_I2S_TCR4_FSP (1U) //!< Bit position for I2S_TCR4_FSP.
- #define BM_I2S_TCR4_FSP (0x00000002U) //!< Bit mask for I2S_TCR4_FSP.
- #define BS_I2S_TCR4_FSP (1U) //!< Bit field size in bits for I2S_TCR4_FSP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR4_FSP field.
- #define BR_I2S_TCR4_FSP(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSP))
- #endif
- //! @brief Format value for bitfield I2S_TCR4_FSP.
- #define BF_I2S_TCR4_FSP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR4_FSP), uint32_t) & BM_I2S_TCR4_FSP)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FSP field to a new value.
- #define BW_I2S_TCR4_FSP(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSP) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR4, field FSE[3] (RW)
- *
- * Values:
- * - 0 - Frame sync asserts with the first bit of the frame.
- * - 1 - Frame sync asserts one bit before the first bit of the frame.
- */
- //@{
- #define BP_I2S_TCR4_FSE (3U) //!< Bit position for I2S_TCR4_FSE.
- #define BM_I2S_TCR4_FSE (0x00000008U) //!< Bit mask for I2S_TCR4_FSE.
- #define BS_I2S_TCR4_FSE (1U) //!< Bit field size in bits for I2S_TCR4_FSE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR4_FSE field.
- #define BR_I2S_TCR4_FSE(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSE))
- #endif
- //! @brief Format value for bitfield I2S_TCR4_FSE.
- #define BF_I2S_TCR4_FSE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR4_FSE), uint32_t) & BM_I2S_TCR4_FSE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FSE field to a new value.
- #define BW_I2S_TCR4_FSE(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR4, field MF[4] (RW)
- *
- * Configures whether the LSB or the MSB is transmitted first.
- *
- * Values:
- * - 0 - LSB is transmitted first.
- * - 1 - MSB is transmitted first.
- */
- //@{
- #define BP_I2S_TCR4_MF (4U) //!< Bit position for I2S_TCR4_MF.
- #define BM_I2S_TCR4_MF (0x00000010U) //!< Bit mask for I2S_TCR4_MF.
- #define BS_I2S_TCR4_MF (1U) //!< Bit field size in bits for I2S_TCR4_MF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR4_MF field.
- #define BR_I2S_TCR4_MF(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_MF))
- #endif
- //! @brief Format value for bitfield I2S_TCR4_MF.
- #define BF_I2S_TCR4_MF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR4_MF), uint32_t) & BM_I2S_TCR4_MF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the MF field to a new value.
- #define BW_I2S_TCR4_MF(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_MF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR4, field SYWD[12:8] (RW)
- *
- * Configures the length of the frame sync in number of bit clocks. The value
- * written must be one less than the number of bit clocks. For example, write 0 for
- * the frame sync to assert for one bit clock only. The sync width cannot be
- * configured longer than the first word of the frame.
- */
- //@{
- #define BP_I2S_TCR4_SYWD (8U) //!< Bit position for I2S_TCR4_SYWD.
- #define BM_I2S_TCR4_SYWD (0x00001F00U) //!< Bit mask for I2S_TCR4_SYWD.
- #define BS_I2S_TCR4_SYWD (5U) //!< Bit field size in bits for I2S_TCR4_SYWD.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR4_SYWD field.
- #define BR_I2S_TCR4_SYWD(x) (HW_I2S_TCR4(x).B.SYWD)
- #endif
- //! @brief Format value for bitfield I2S_TCR4_SYWD.
- #define BF_I2S_TCR4_SYWD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR4_SYWD), uint32_t) & BM_I2S_TCR4_SYWD)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SYWD field to a new value.
- #define BW_I2S_TCR4_SYWD(x, v) (HW_I2S_TCR4_WR(x, (HW_I2S_TCR4_RD(x) & ~BM_I2S_TCR4_SYWD) | BF_I2S_TCR4_SYWD(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR4, field FRSZ[20:16] (RW)
- *
- * Configures the number of words in each frame. The value written must be one
- * less than the number of words in the frame. For example, write 0 for one word
- * per frame. The maximum supported frame size is 32 words.
- */
- //@{
- #define BP_I2S_TCR4_FRSZ (16U) //!< Bit position for I2S_TCR4_FRSZ.
- #define BM_I2S_TCR4_FRSZ (0x001F0000U) //!< Bit mask for I2S_TCR4_FRSZ.
- #define BS_I2S_TCR4_FRSZ (5U) //!< Bit field size in bits for I2S_TCR4_FRSZ.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR4_FRSZ field.
- #define BR_I2S_TCR4_FRSZ(x) (HW_I2S_TCR4(x).B.FRSZ)
- #endif
- //! @brief Format value for bitfield I2S_TCR4_FRSZ.
- #define BF_I2S_TCR4_FRSZ(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR4_FRSZ), uint32_t) & BM_I2S_TCR4_FRSZ)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FRSZ field to a new value.
- #define BW_I2S_TCR4_FRSZ(x, v) (HW_I2S_TCR4_WR(x, (HW_I2S_TCR4_RD(x) & ~BM_I2S_TCR4_FRSZ) | BF_I2S_TCR4_FRSZ(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TCR5 - SAI Transmit Configuration 5 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TCR5 - SAI Transmit Configuration 5 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when TCSR[TE] is set.
- */
- typedef union _hw_i2s_tcr5
- {
- uint32_t U;
- struct _hw_i2s_tcr5_bitfields
- {
- uint32_t RESERVED0 : 8; //!< [7:0]
- uint32_t FBT : 5; //!< [12:8] First Bit Shifted
- uint32_t RESERVED1 : 3; //!< [15:13]
- uint32_t W0W : 5; //!< [20:16] Word 0 Width
- uint32_t RESERVED2 : 3; //!< [23:21]
- uint32_t WNW : 5; //!< [28:24] Word N Width
- uint32_t RESERVED3 : 3; //!< [31:29]
- } B;
- } hw_i2s_tcr5_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TCR5 register
- */
- //@{
- #define HW_I2S_TCR5_ADDR(x) (REGS_I2S_BASE(x) + 0x14U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TCR5(x) (*(__IO hw_i2s_tcr5_t *) HW_I2S_TCR5_ADDR(x))
- #define HW_I2S_TCR5_RD(x) (HW_I2S_TCR5(x).U)
- #define HW_I2S_TCR5_WR(x, v) (HW_I2S_TCR5(x).U = (v))
- #define HW_I2S_TCR5_SET(x, v) (HW_I2S_TCR5_WR(x, HW_I2S_TCR5_RD(x) | (v)))
- #define HW_I2S_TCR5_CLR(x, v) (HW_I2S_TCR5_WR(x, HW_I2S_TCR5_RD(x) & ~(v)))
- #define HW_I2S_TCR5_TOG(x, v) (HW_I2S_TCR5_WR(x, HW_I2S_TCR5_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TCR5 bitfields
- */
- /*!
- * @name Register I2S_TCR5, field FBT[12:8] (RW)
- *
- * Configures the bit index for the first bit transmitted for each word in the
- * frame. If configured for MSB First, the index of the next bit transmitted is
- * one less than the current bit transmitted. If configured for LSB First, the
- * index of the next bit transmitted is one more than the current bit transmitted.
- * The value written must be greater than or equal to the word width when
- * configured for MSB First. The value written must be less than or equal to 31-word width
- * when configured for LSB First.
- */
- //@{
- #define BP_I2S_TCR5_FBT (8U) //!< Bit position for I2S_TCR5_FBT.
- #define BM_I2S_TCR5_FBT (0x00001F00U) //!< Bit mask for I2S_TCR5_FBT.
- #define BS_I2S_TCR5_FBT (5U) //!< Bit field size in bits for I2S_TCR5_FBT.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR5_FBT field.
- #define BR_I2S_TCR5_FBT(x) (HW_I2S_TCR5(x).B.FBT)
- #endif
- //! @brief Format value for bitfield I2S_TCR5_FBT.
- #define BF_I2S_TCR5_FBT(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR5_FBT), uint32_t) & BM_I2S_TCR5_FBT)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FBT field to a new value.
- #define BW_I2S_TCR5_FBT(x, v) (HW_I2S_TCR5_WR(x, (HW_I2S_TCR5_RD(x) & ~BM_I2S_TCR5_FBT) | BF_I2S_TCR5_FBT(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR5, field W0W[20:16] (RW)
- *
- * Configures the number of bits in the first word in each frame. The value
- * written must be one less than the number of bits in the first word. Word width of
- * less than 8 bits is not supported if there is only one word per frame.
- */
- //@{
- #define BP_I2S_TCR5_W0W (16U) //!< Bit position for I2S_TCR5_W0W.
- #define BM_I2S_TCR5_W0W (0x001F0000U) //!< Bit mask for I2S_TCR5_W0W.
- #define BS_I2S_TCR5_W0W (5U) //!< Bit field size in bits for I2S_TCR5_W0W.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR5_W0W field.
- #define BR_I2S_TCR5_W0W(x) (HW_I2S_TCR5(x).B.W0W)
- #endif
- //! @brief Format value for bitfield I2S_TCR5_W0W.
- #define BF_I2S_TCR5_W0W(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR5_W0W), uint32_t) & BM_I2S_TCR5_W0W)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the W0W field to a new value.
- #define BW_I2S_TCR5_W0W(x, v) (HW_I2S_TCR5_WR(x, (HW_I2S_TCR5_RD(x) & ~BM_I2S_TCR5_W0W) | BF_I2S_TCR5_W0W(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_TCR5, field WNW[28:24] (RW)
- *
- * Configures the number of bits in each word, for each word except the first in
- * the frame. The value written must be one less than the number of bits per
- * word. Word width of less than 8 bits is not supported.
- */
- //@{
- #define BP_I2S_TCR5_WNW (24U) //!< Bit position for I2S_TCR5_WNW.
- #define BM_I2S_TCR5_WNW (0x1F000000U) //!< Bit mask for I2S_TCR5_WNW.
- #define BS_I2S_TCR5_WNW (5U) //!< Bit field size in bits for I2S_TCR5_WNW.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TCR5_WNW field.
- #define BR_I2S_TCR5_WNW(x) (HW_I2S_TCR5(x).B.WNW)
- #endif
- //! @brief Format value for bitfield I2S_TCR5_WNW.
- #define BF_I2S_TCR5_WNW(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TCR5_WNW), uint32_t) & BM_I2S_TCR5_WNW)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WNW field to a new value.
- #define BW_I2S_TCR5_WNW(x, v) (HW_I2S_TCR5_WR(x, (HW_I2S_TCR5_RD(x) & ~BM_I2S_TCR5_WNW) | BF_I2S_TCR5_WNW(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TDRn - SAI Transmit Data Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TDRn - SAI Transmit Data Register (WORZ)
- *
- * Reset value: 0x00000000U
- */
- typedef union _hw_i2s_tdrn
- {
- uint32_t U;
- struct _hw_i2s_tdrn_bitfields
- {
- uint32_t TDR : 32; //!< [31:0] Transmit Data Register
- } B;
- } hw_i2s_tdrn_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TDRn register
- */
- //@{
- #define HW_I2S_TDRn_COUNT (2U)
- #define HW_I2S_TDRn_ADDR(x, n) (REGS_I2S_BASE(x) + 0x20U + (0x4U * n))
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TDRn(x, n) (*(__O hw_i2s_tdrn_t *) HW_I2S_TDRn_ADDR(x, n))
- #define HW_I2S_TDRn_RD(x, n) (HW_I2S_TDRn(x, n).U)
- #define HW_I2S_TDRn_WR(x, n, v) (HW_I2S_TDRn(x, n).U = (v))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TDRn bitfields
- */
- /*!
- * @name Register I2S_TDRn, field TDR[31:0] (WORZ)
- *
- * The corresponding TCR3[TCE] bit must be set before accessing the channel's
- * transmit data register. Writes to this register when the transmit FIFO is not
- * full will push the data written into the transmit data FIFO. Writes to this
- * register when the transmit FIFO is full are ignored.
- */
- //@{
- #define BP_I2S_TDRn_TDR (0U) //!< Bit position for I2S_TDRn_TDR.
- #define BM_I2S_TDRn_TDR (0xFFFFFFFFU) //!< Bit mask for I2S_TDRn_TDR.
- #define BS_I2S_TDRn_TDR (32U) //!< Bit field size in bits for I2S_TDRn_TDR.
- //! @brief Format value for bitfield I2S_TDRn_TDR.
- #define BF_I2S_TDRn_TDR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TDRn_TDR), uint32_t) & BM_I2S_TDRn_TDR)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the TDR field to a new value.
- #define BW_I2S_TDRn_TDR(x, n, v) (HW_I2S_TDRn_WR(x, n, v))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TFRn - SAI Transmit FIFO Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TFRn - SAI Transmit FIFO Register (RO)
- *
- * Reset value: 0x00000000U
- *
- * The MSB of the read and write pointers is used to distinguish between FIFO
- * full and empty conditions. If the read and write pointers are identical, then
- * the FIFO is empty. If the read and write pointers are identical except for the
- * MSB, then the FIFO is full.
- */
- typedef union _hw_i2s_tfrn
- {
- uint32_t U;
- struct _hw_i2s_tfrn_bitfields
- {
- uint32_t RFP : 4; //!< [3:0] Read FIFO Pointer
- uint32_t RESERVED0 : 12; //!< [15:4]
- uint32_t WFP : 4; //!< [19:16] Write FIFO Pointer
- uint32_t RESERVED1 : 12; //!< [31:20]
- } B;
- } hw_i2s_tfrn_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TFRn register
- */
- //@{
- #define HW_I2S_TFRn_COUNT (2U)
- #define HW_I2S_TFRn_ADDR(x, n) (REGS_I2S_BASE(x) + 0x40U + (0x4U * n))
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TFRn(x, n) (*(__I hw_i2s_tfrn_t *) HW_I2S_TFRn_ADDR(x, n))
- #define HW_I2S_TFRn_RD(x, n) (HW_I2S_TFRn(x, n).U)
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TFRn bitfields
- */
- /*!
- * @name Register I2S_TFRn, field RFP[3:0] (RO)
- *
- * FIFO read pointer for transmit data channel.
- */
- //@{
- #define BP_I2S_TFRn_RFP (0U) //!< Bit position for I2S_TFRn_RFP.
- #define BM_I2S_TFRn_RFP (0x0000000FU) //!< Bit mask for I2S_TFRn_RFP.
- #define BS_I2S_TFRn_RFP (4U) //!< Bit field size in bits for I2S_TFRn_RFP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TFRn_RFP field.
- #define BR_I2S_TFRn_RFP(x, n) (HW_I2S_TFRn(x, n).B.RFP)
- #endif
- //@}
- /*!
- * @name Register I2S_TFRn, field WFP[19:16] (RO)
- *
- * FIFO write pointer for transmit data channel.
- */
- //@{
- #define BP_I2S_TFRn_WFP (16U) //!< Bit position for I2S_TFRn_WFP.
- #define BM_I2S_TFRn_WFP (0x000F0000U) //!< Bit mask for I2S_TFRn_WFP.
- #define BS_I2S_TFRn_WFP (4U) //!< Bit field size in bits for I2S_TFRn_WFP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TFRn_WFP field.
- #define BR_I2S_TFRn_WFP(x, n) (HW_I2S_TFRn(x, n).B.WFP)
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_TMR - SAI Transmit Mask Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_TMR - SAI Transmit Mask Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register is double-buffered and updates: When TCSR[TE] is first set At
- * the end of each frame. This allows the masked words in each frame to change
- * from frame to frame.
- */
- typedef union _hw_i2s_tmr
- {
- uint32_t U;
- struct _hw_i2s_tmr_bitfields
- {
- uint32_t TWM : 32; //!< [31:0] Transmit Word Mask
- } B;
- } hw_i2s_tmr_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_TMR register
- */
- //@{
- #define HW_I2S_TMR_ADDR(x) (REGS_I2S_BASE(x) + 0x60U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_TMR(x) (*(__IO hw_i2s_tmr_t *) HW_I2S_TMR_ADDR(x))
- #define HW_I2S_TMR_RD(x) (HW_I2S_TMR(x).U)
- #define HW_I2S_TMR_WR(x, v) (HW_I2S_TMR(x).U = (v))
- #define HW_I2S_TMR_SET(x, v) (HW_I2S_TMR_WR(x, HW_I2S_TMR_RD(x) | (v)))
- #define HW_I2S_TMR_CLR(x, v) (HW_I2S_TMR_WR(x, HW_I2S_TMR_RD(x) & ~(v)))
- #define HW_I2S_TMR_TOG(x, v) (HW_I2S_TMR_WR(x, HW_I2S_TMR_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_TMR bitfields
- */
- /*!
- * @name Register I2S_TMR, field TWM[31:0] (RW)
- *
- * Configures whether the transmit word is masked (transmit data pin tristated
- * and transmit data not read from FIFO) for the corresponding word in the frame.
- *
- * Values:
- * - 0 - Word N is enabled.
- * - 1 - Word N is masked. The transmit data pins are tri-stated when masked.
- */
- //@{
- #define BP_I2S_TMR_TWM (0U) //!< Bit position for I2S_TMR_TWM.
- #define BM_I2S_TMR_TWM (0xFFFFFFFFU) //!< Bit mask for I2S_TMR_TWM.
- #define BS_I2S_TMR_TWM (32U) //!< Bit field size in bits for I2S_TMR_TWM.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_TMR_TWM field.
- #define BR_I2S_TMR_TWM(x) (HW_I2S_TMR(x).U)
- #endif
- //! @brief Format value for bitfield I2S_TMR_TWM.
- #define BF_I2S_TMR_TWM(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_TMR_TWM), uint32_t) & BM_I2S_TMR_TWM)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the TWM field to a new value.
- #define BW_I2S_TMR_TWM(x, v) (HW_I2S_TMR_WR(x, v))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RCSR - SAI Receive Control Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RCSR - SAI Receive Control Register (RW)
- *
- * Reset value: 0x00000000U
- */
- typedef union _hw_i2s_rcsr
- {
- uint32_t U;
- struct _hw_i2s_rcsr_bitfields
- {
- uint32_t FRDE : 1; //!< [0] FIFO Request DMA Enable
- uint32_t FWDE : 1; //!< [1] FIFO Warning DMA Enable
- uint32_t RESERVED0 : 6; //!< [7:2]
- uint32_t FRIE : 1; //!< [8] FIFO Request Interrupt Enable
- uint32_t FWIE : 1; //!< [9] FIFO Warning Interrupt Enable
- uint32_t FEIE : 1; //!< [10] FIFO Error Interrupt Enable
- uint32_t SEIE : 1; //!< [11] Sync Error Interrupt Enable
- uint32_t WSIE : 1; //!< [12] Word Start Interrupt Enable
- uint32_t RESERVED1 : 3; //!< [15:13]
- uint32_t FRF : 1; //!< [16] FIFO Request Flag
- uint32_t FWF : 1; //!< [17] FIFO Warning Flag
- uint32_t FEF : 1; //!< [18] FIFO Error Flag
- uint32_t SEF : 1; //!< [19] Sync Error Flag
- uint32_t WSF : 1; //!< [20] Word Start Flag
- uint32_t RESERVED2 : 3; //!< [23:21]
- uint32_t SR : 1; //!< [24] Software Reset
- uint32_t FR : 1; //!< [25] FIFO Reset
- uint32_t RESERVED3 : 2; //!< [27:26]
- uint32_t BCE : 1; //!< [28] Bit Clock Enable
- uint32_t DBGE : 1; //!< [29] Debug Enable
- uint32_t STOPE : 1; //!< [30] Stop Enable
- uint32_t RE : 1; //!< [31] Receiver Enable
- } B;
- } hw_i2s_rcsr_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RCSR register
- */
- //@{
- #define HW_I2S_RCSR_ADDR(x) (REGS_I2S_BASE(x) + 0x80U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RCSR(x) (*(__IO hw_i2s_rcsr_t *) HW_I2S_RCSR_ADDR(x))
- #define HW_I2S_RCSR_RD(x) (HW_I2S_RCSR(x).U)
- #define HW_I2S_RCSR_WR(x, v) (HW_I2S_RCSR(x).U = (v))
- #define HW_I2S_RCSR_SET(x, v) (HW_I2S_RCSR_WR(x, HW_I2S_RCSR_RD(x) | (v)))
- #define HW_I2S_RCSR_CLR(x, v) (HW_I2S_RCSR_WR(x, HW_I2S_RCSR_RD(x) & ~(v)))
- #define HW_I2S_RCSR_TOG(x, v) (HW_I2S_RCSR_WR(x, HW_I2S_RCSR_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RCSR bitfields
- */
- /*!
- * @name Register I2S_RCSR, field FRDE[0] (RW)
- *
- * Enables/disables DMA requests.
- *
- * Values:
- * - 0 - Disables the DMA request.
- * - 1 - Enables the DMA request.
- */
- //@{
- #define BP_I2S_RCSR_FRDE (0U) //!< Bit position for I2S_RCSR_FRDE.
- #define BM_I2S_RCSR_FRDE (0x00000001U) //!< Bit mask for I2S_RCSR_FRDE.
- #define BS_I2S_RCSR_FRDE (1U) //!< Bit field size in bits for I2S_RCSR_FRDE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FRDE field.
- #define BR_I2S_RCSR_FRDE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRDE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_FRDE.
- #define BF_I2S_RCSR_FRDE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_FRDE), uint32_t) & BM_I2S_RCSR_FRDE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FRDE field to a new value.
- #define BW_I2S_RCSR_FRDE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRDE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FWDE[1] (RW)
- *
- * Enables/disables DMA requests.
- *
- * Values:
- * - 0 - Disables the DMA request.
- * - 1 - Enables the DMA request.
- */
- //@{
- #define BP_I2S_RCSR_FWDE (1U) //!< Bit position for I2S_RCSR_FWDE.
- #define BM_I2S_RCSR_FWDE (0x00000002U) //!< Bit mask for I2S_RCSR_FWDE.
- #define BS_I2S_RCSR_FWDE (1U) //!< Bit field size in bits for I2S_RCSR_FWDE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FWDE field.
- #define BR_I2S_RCSR_FWDE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWDE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_FWDE.
- #define BF_I2S_RCSR_FWDE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_FWDE), uint32_t) & BM_I2S_RCSR_FWDE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FWDE field to a new value.
- #define BW_I2S_RCSR_FWDE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWDE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FRIE[8] (RW)
- *
- * Enables/disables FIFO request interrupts.
- *
- * Values:
- * - 0 - Disables the interrupt.
- * - 1 - Enables the interrupt.
- */
- //@{
- #define BP_I2S_RCSR_FRIE (8U) //!< Bit position for I2S_RCSR_FRIE.
- #define BM_I2S_RCSR_FRIE (0x00000100U) //!< Bit mask for I2S_RCSR_FRIE.
- #define BS_I2S_RCSR_FRIE (1U) //!< Bit field size in bits for I2S_RCSR_FRIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FRIE field.
- #define BR_I2S_RCSR_FRIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRIE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_FRIE.
- #define BF_I2S_RCSR_FRIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_FRIE), uint32_t) & BM_I2S_RCSR_FRIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FRIE field to a new value.
- #define BW_I2S_RCSR_FRIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FWIE[9] (RW)
- *
- * Enables/disables FIFO warning interrupts.
- *
- * Values:
- * - 0 - Disables the interrupt.
- * - 1 - Enables the interrupt.
- */
- //@{
- #define BP_I2S_RCSR_FWIE (9U) //!< Bit position for I2S_RCSR_FWIE.
- #define BM_I2S_RCSR_FWIE (0x00000200U) //!< Bit mask for I2S_RCSR_FWIE.
- #define BS_I2S_RCSR_FWIE (1U) //!< Bit field size in bits for I2S_RCSR_FWIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FWIE field.
- #define BR_I2S_RCSR_FWIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWIE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_FWIE.
- #define BF_I2S_RCSR_FWIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_FWIE), uint32_t) & BM_I2S_RCSR_FWIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FWIE field to a new value.
- #define BW_I2S_RCSR_FWIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FEIE[10] (RW)
- *
- * Enables/disables FIFO error interrupts.
- *
- * Values:
- * - 0 - Disables the interrupt.
- * - 1 - Enables the interrupt.
- */
- //@{
- #define BP_I2S_RCSR_FEIE (10U) //!< Bit position for I2S_RCSR_FEIE.
- #define BM_I2S_RCSR_FEIE (0x00000400U) //!< Bit mask for I2S_RCSR_FEIE.
- #define BS_I2S_RCSR_FEIE (1U) //!< Bit field size in bits for I2S_RCSR_FEIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FEIE field.
- #define BR_I2S_RCSR_FEIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEIE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_FEIE.
- #define BF_I2S_RCSR_FEIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_FEIE), uint32_t) & BM_I2S_RCSR_FEIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FEIE field to a new value.
- #define BW_I2S_RCSR_FEIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field SEIE[11] (RW)
- *
- * Enables/disables sync error interrupts.
- *
- * Values:
- * - 0 - Disables interrupt.
- * - 1 - Enables interrupt.
- */
- //@{
- #define BP_I2S_RCSR_SEIE (11U) //!< Bit position for I2S_RCSR_SEIE.
- #define BM_I2S_RCSR_SEIE (0x00000800U) //!< Bit mask for I2S_RCSR_SEIE.
- #define BS_I2S_RCSR_SEIE (1U) //!< Bit field size in bits for I2S_RCSR_SEIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_SEIE field.
- #define BR_I2S_RCSR_SEIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEIE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_SEIE.
- #define BF_I2S_RCSR_SEIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_SEIE), uint32_t) & BM_I2S_RCSR_SEIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SEIE field to a new value.
- #define BW_I2S_RCSR_SEIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field WSIE[12] (RW)
- *
- * Enables/disables word start interrupts.
- *
- * Values:
- * - 0 - Disables interrupt.
- * - 1 - Enables interrupt.
- */
- //@{
- #define BP_I2S_RCSR_WSIE (12U) //!< Bit position for I2S_RCSR_WSIE.
- #define BM_I2S_RCSR_WSIE (0x00001000U) //!< Bit mask for I2S_RCSR_WSIE.
- #define BS_I2S_RCSR_WSIE (1U) //!< Bit field size in bits for I2S_RCSR_WSIE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_WSIE field.
- #define BR_I2S_RCSR_WSIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSIE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_WSIE.
- #define BF_I2S_RCSR_WSIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_WSIE), uint32_t) & BM_I2S_RCSR_WSIE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WSIE field to a new value.
- #define BW_I2S_RCSR_WSIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSIE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FRF[16] (RO)
- *
- * Indicates that the number of words in an enabled receive channel FIFO is
- * greater than the receive FIFO watermark.
- *
- * Values:
- * - 0 - Receive FIFO watermark not reached.
- * - 1 - Receive FIFO watermark has been reached.
- */
- //@{
- #define BP_I2S_RCSR_FRF (16U) //!< Bit position for I2S_RCSR_FRF.
- #define BM_I2S_RCSR_FRF (0x00010000U) //!< Bit mask for I2S_RCSR_FRF.
- #define BS_I2S_RCSR_FRF (1U) //!< Bit field size in bits for I2S_RCSR_FRF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FRF field.
- #define BR_I2S_RCSR_FRF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRF))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FWF[17] (RO)
- *
- * Indicates that an enabled receive FIFO is full.
- *
- * Values:
- * - 0 - No enabled receive FIFO is full.
- * - 1 - Enabled receive FIFO is full.
- */
- //@{
- #define BP_I2S_RCSR_FWF (17U) //!< Bit position for I2S_RCSR_FWF.
- #define BM_I2S_RCSR_FWF (0x00020000U) //!< Bit mask for I2S_RCSR_FWF.
- #define BS_I2S_RCSR_FWF (1U) //!< Bit field size in bits for I2S_RCSR_FWF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FWF field.
- #define BR_I2S_RCSR_FWF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWF))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FEF[18] (W1C)
- *
- * Indicates that an enabled receive FIFO has overflowed. Write a logic 1 to
- * this field to clear this flag.
- *
- * Values:
- * - 0 - Receive overflow not detected.
- * - 1 - Receive overflow detected.
- */
- //@{
- #define BP_I2S_RCSR_FEF (18U) //!< Bit position for I2S_RCSR_FEF.
- #define BM_I2S_RCSR_FEF (0x00040000U) //!< Bit mask for I2S_RCSR_FEF.
- #define BS_I2S_RCSR_FEF (1U) //!< Bit field size in bits for I2S_RCSR_FEF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_FEF field.
- #define BR_I2S_RCSR_FEF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEF))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_FEF.
- #define BF_I2S_RCSR_FEF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_FEF), uint32_t) & BM_I2S_RCSR_FEF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FEF field to a new value.
- #define BW_I2S_RCSR_FEF(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field SEF[19] (W1C)
- *
- * Indicates that an error in the externally-generated frame sync has been
- * detected. Write a logic 1 to this field to clear this flag.
- *
- * Values:
- * - 0 - Sync error not detected.
- * - 1 - Frame sync error detected.
- */
- //@{
- #define BP_I2S_RCSR_SEF (19U) //!< Bit position for I2S_RCSR_SEF.
- #define BM_I2S_RCSR_SEF (0x00080000U) //!< Bit mask for I2S_RCSR_SEF.
- #define BS_I2S_RCSR_SEF (1U) //!< Bit field size in bits for I2S_RCSR_SEF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_SEF field.
- #define BR_I2S_RCSR_SEF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEF))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_SEF.
- #define BF_I2S_RCSR_SEF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_SEF), uint32_t) & BM_I2S_RCSR_SEF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SEF field to a new value.
- #define BW_I2S_RCSR_SEF(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field WSF[20] (W1C)
- *
- * Indicates that the start of the configured word has been detected. Write a
- * logic 1 to this field to clear this flag.
- *
- * Values:
- * - 0 - Start of word not detected.
- * - 1 - Start of word detected.
- */
- //@{
- #define BP_I2S_RCSR_WSF (20U) //!< Bit position for I2S_RCSR_WSF.
- #define BM_I2S_RCSR_WSF (0x00100000U) //!< Bit mask for I2S_RCSR_WSF.
- #define BS_I2S_RCSR_WSF (1U) //!< Bit field size in bits for I2S_RCSR_WSF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_WSF field.
- #define BR_I2S_RCSR_WSF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSF))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_WSF.
- #define BF_I2S_RCSR_WSF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_WSF), uint32_t) & BM_I2S_RCSR_WSF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WSF field to a new value.
- #define BW_I2S_RCSR_WSF(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field SR[24] (RW)
- *
- * Resets the internal receiver logic including the FIFO pointers.
- * Software-visible registers are not affected, except for the status registers.
- *
- * Values:
- * - 0 - No effect.
- * - 1 - Software reset.
- */
- //@{
- #define BP_I2S_RCSR_SR (24U) //!< Bit position for I2S_RCSR_SR.
- #define BM_I2S_RCSR_SR (0x01000000U) //!< Bit mask for I2S_RCSR_SR.
- #define BS_I2S_RCSR_SR (1U) //!< Bit field size in bits for I2S_RCSR_SR.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_SR field.
- #define BR_I2S_RCSR_SR(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SR))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_SR.
- #define BF_I2S_RCSR_SR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_SR), uint32_t) & BM_I2S_RCSR_SR)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SR field to a new value.
- #define BW_I2S_RCSR_SR(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SR) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field FR[25] (WORZ)
- *
- * Resets the FIFO pointers. Reading this field will always return zero. FIFO
- * pointers should only be reset when the receiver is disabled or the FIFO error
- * flag is set.
- *
- * Values:
- * - 0 - No effect.
- * - 1 - FIFO reset.
- */
- //@{
- #define BP_I2S_RCSR_FR (25U) //!< Bit position for I2S_RCSR_FR.
- #define BM_I2S_RCSR_FR (0x02000000U) //!< Bit mask for I2S_RCSR_FR.
- #define BS_I2S_RCSR_FR (1U) //!< Bit field size in bits for I2S_RCSR_FR.
- //! @brief Format value for bitfield I2S_RCSR_FR.
- #define BF_I2S_RCSR_FR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_FR), uint32_t) & BM_I2S_RCSR_FR)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FR field to a new value.
- #define BW_I2S_RCSR_FR(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FR) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field BCE[28] (RW)
- *
- * Enables the receive bit clock, separately from RE. This field is
- * automatically set whenever RE is set. When software clears this field, the receive bit
- * clock remains enabled, and this field remains set, until the end of the current
- * frame.
- *
- * Values:
- * - 0 - Receive bit clock is disabled.
- * - 1 - Receive bit clock is enabled.
- */
- //@{
- #define BP_I2S_RCSR_BCE (28U) //!< Bit position for I2S_RCSR_BCE.
- #define BM_I2S_RCSR_BCE (0x10000000U) //!< Bit mask for I2S_RCSR_BCE.
- #define BS_I2S_RCSR_BCE (1U) //!< Bit field size in bits for I2S_RCSR_BCE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_BCE field.
- #define BR_I2S_RCSR_BCE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_BCE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_BCE.
- #define BF_I2S_RCSR_BCE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_BCE), uint32_t) & BM_I2S_RCSR_BCE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCE field to a new value.
- #define BW_I2S_RCSR_BCE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_BCE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field DBGE[29] (RW)
- *
- * Enables/disables receiver operation in Debug mode. The receive bit clock is
- * not affected by Debug mode.
- *
- * Values:
- * - 0 - Receiver is disabled in Debug mode, after completing the current frame.
- * - 1 - Receiver is enabled in Debug mode.
- */
- //@{
- #define BP_I2S_RCSR_DBGE (29U) //!< Bit position for I2S_RCSR_DBGE.
- #define BM_I2S_RCSR_DBGE (0x20000000U) //!< Bit mask for I2S_RCSR_DBGE.
- #define BS_I2S_RCSR_DBGE (1U) //!< Bit field size in bits for I2S_RCSR_DBGE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_DBGE field.
- #define BR_I2S_RCSR_DBGE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_DBGE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_DBGE.
- #define BF_I2S_RCSR_DBGE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_DBGE), uint32_t) & BM_I2S_RCSR_DBGE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the DBGE field to a new value.
- #define BW_I2S_RCSR_DBGE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_DBGE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field STOPE[30] (RW)
- *
- * Configures receiver operation in Stop mode. This bit is ignored and the
- * receiver is disabled in all low-leakage stop modes.
- *
- * Values:
- * - 0 - Receiver disabled in Stop mode.
- * - 1 - Receiver enabled in Stop mode.
- */
- //@{
- #define BP_I2S_RCSR_STOPE (30U) //!< Bit position for I2S_RCSR_STOPE.
- #define BM_I2S_RCSR_STOPE (0x40000000U) //!< Bit mask for I2S_RCSR_STOPE.
- #define BS_I2S_RCSR_STOPE (1U) //!< Bit field size in bits for I2S_RCSR_STOPE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_STOPE field.
- #define BR_I2S_RCSR_STOPE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_STOPE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_STOPE.
- #define BF_I2S_RCSR_STOPE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_STOPE), uint32_t) & BM_I2S_RCSR_STOPE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the STOPE field to a new value.
- #define BW_I2S_RCSR_STOPE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_STOPE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCSR, field RE[31] (RW)
- *
- * Enables/disables the receiver. When software clears this field, the receiver
- * remains enabled, and this bit remains set, until the end of the current frame.
- *
- * Values:
- * - 0 - Receiver is disabled.
- * - 1 - Receiver is enabled, or receiver has been disabled and has not yet
- * reached end of frame.
- */
- //@{
- #define BP_I2S_RCSR_RE (31U) //!< Bit position for I2S_RCSR_RE.
- #define BM_I2S_RCSR_RE (0x80000000U) //!< Bit mask for I2S_RCSR_RE.
- #define BS_I2S_RCSR_RE (1U) //!< Bit field size in bits for I2S_RCSR_RE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCSR_RE field.
- #define BR_I2S_RCSR_RE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_RE))
- #endif
- //! @brief Format value for bitfield I2S_RCSR_RE.
- #define BF_I2S_RCSR_RE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCSR_RE), uint32_t) & BM_I2S_RCSR_RE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the RE field to a new value.
- #define BW_I2S_RCSR_RE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_RE) = (v))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RCR1 - SAI Receive Configuration 1 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RCR1 - SAI Receive Configuration 1 Register (RW)
- *
- * Reset value: 0x00000000U
- */
- typedef union _hw_i2s_rcr1
- {
- uint32_t U;
- struct _hw_i2s_rcr1_bitfields
- {
- uint32_t RFW : 3; //!< [2:0] Receive FIFO Watermark
- uint32_t RESERVED0 : 29; //!< [31:3]
- } B;
- } hw_i2s_rcr1_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RCR1 register
- */
- //@{
- #define HW_I2S_RCR1_ADDR(x) (REGS_I2S_BASE(x) + 0x84U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RCR1(x) (*(__IO hw_i2s_rcr1_t *) HW_I2S_RCR1_ADDR(x))
- #define HW_I2S_RCR1_RD(x) (HW_I2S_RCR1(x).U)
- #define HW_I2S_RCR1_WR(x, v) (HW_I2S_RCR1(x).U = (v))
- #define HW_I2S_RCR1_SET(x, v) (HW_I2S_RCR1_WR(x, HW_I2S_RCR1_RD(x) | (v)))
- #define HW_I2S_RCR1_CLR(x, v) (HW_I2S_RCR1_WR(x, HW_I2S_RCR1_RD(x) & ~(v)))
- #define HW_I2S_RCR1_TOG(x, v) (HW_I2S_RCR1_WR(x, HW_I2S_RCR1_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RCR1 bitfields
- */
- /*!
- * @name Register I2S_RCR1, field RFW[2:0] (RW)
- *
- * Configures the watermark level for all enabled receiver channels.
- */
- //@{
- #define BP_I2S_RCR1_RFW (0U) //!< Bit position for I2S_RCR1_RFW.
- #define BM_I2S_RCR1_RFW (0x00000007U) //!< Bit mask for I2S_RCR1_RFW.
- #define BS_I2S_RCR1_RFW (3U) //!< Bit field size in bits for I2S_RCR1_RFW.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR1_RFW field.
- #define BR_I2S_RCR1_RFW(x) (HW_I2S_RCR1(x).B.RFW)
- #endif
- //! @brief Format value for bitfield I2S_RCR1_RFW.
- #define BF_I2S_RCR1_RFW(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR1_RFW), uint32_t) & BM_I2S_RCR1_RFW)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the RFW field to a new value.
- #define BW_I2S_RCR1_RFW(x, v) (HW_I2S_RCR1_WR(x, (HW_I2S_RCR1_RD(x) & ~BM_I2S_RCR1_RFW) | BF_I2S_RCR1_RFW(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RCR2 - SAI Receive Configuration 2 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RCR2 - SAI Receive Configuration 2 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when RCSR[RE] is set.
- */
- typedef union _hw_i2s_rcr2
- {
- uint32_t U;
- struct _hw_i2s_rcr2_bitfields
- {
- uint32_t DIV : 8; //!< [7:0] Bit Clock Divide
- uint32_t RESERVED0 : 16; //!< [23:8]
- uint32_t BCD : 1; //!< [24] Bit Clock Direction
- uint32_t BCP : 1; //!< [25] Bit Clock Polarity
- uint32_t MSEL : 2; //!< [27:26] MCLK Select
- uint32_t BCI : 1; //!< [28] Bit Clock Input
- uint32_t BCS : 1; //!< [29] Bit Clock Swap
- uint32_t SYNC : 2; //!< [31:30] Synchronous Mode
- } B;
- } hw_i2s_rcr2_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RCR2 register
- */
- //@{
- #define HW_I2S_RCR2_ADDR(x) (REGS_I2S_BASE(x) + 0x88U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RCR2(x) (*(__IO hw_i2s_rcr2_t *) HW_I2S_RCR2_ADDR(x))
- #define HW_I2S_RCR2_RD(x) (HW_I2S_RCR2(x).U)
- #define HW_I2S_RCR2_WR(x, v) (HW_I2S_RCR2(x).U = (v))
- #define HW_I2S_RCR2_SET(x, v) (HW_I2S_RCR2_WR(x, HW_I2S_RCR2_RD(x) | (v)))
- #define HW_I2S_RCR2_CLR(x, v) (HW_I2S_RCR2_WR(x, HW_I2S_RCR2_RD(x) & ~(v)))
- #define HW_I2S_RCR2_TOG(x, v) (HW_I2S_RCR2_WR(x, HW_I2S_RCR2_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RCR2 bitfields
- */
- /*!
- * @name Register I2S_RCR2, field DIV[7:0] (RW)
- *
- * Divides down the audio master clock to generate the bit clock when configured
- * for an internal bit clock. The division value is (DIV + 1) * 2.
- */
- //@{
- #define BP_I2S_RCR2_DIV (0U) //!< Bit position for I2S_RCR2_DIV.
- #define BM_I2S_RCR2_DIV (0x000000FFU) //!< Bit mask for I2S_RCR2_DIV.
- #define BS_I2S_RCR2_DIV (8U) //!< Bit field size in bits for I2S_RCR2_DIV.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR2_DIV field.
- #define BR_I2S_RCR2_DIV(x) (HW_I2S_RCR2(x).B.DIV)
- #endif
- //! @brief Format value for bitfield I2S_RCR2_DIV.
- #define BF_I2S_RCR2_DIV(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR2_DIV), uint32_t) & BM_I2S_RCR2_DIV)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the DIV field to a new value.
- #define BW_I2S_RCR2_DIV(x, v) (HW_I2S_RCR2_WR(x, (HW_I2S_RCR2_RD(x) & ~BM_I2S_RCR2_DIV) | BF_I2S_RCR2_DIV(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR2, field BCD[24] (RW)
- *
- * Configures the direction of the bit clock.
- *
- * Values:
- * - 0 - Bit clock is generated externally in Slave mode.
- * - 1 - Bit clock is generated internally in Master mode.
- */
- //@{
- #define BP_I2S_RCR2_BCD (24U) //!< Bit position for I2S_RCR2_BCD.
- #define BM_I2S_RCR2_BCD (0x01000000U) //!< Bit mask for I2S_RCR2_BCD.
- #define BS_I2S_RCR2_BCD (1U) //!< Bit field size in bits for I2S_RCR2_BCD.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR2_BCD field.
- #define BR_I2S_RCR2_BCD(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCD))
- #endif
- //! @brief Format value for bitfield I2S_RCR2_BCD.
- #define BF_I2S_RCR2_BCD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR2_BCD), uint32_t) & BM_I2S_RCR2_BCD)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCD field to a new value.
- #define BW_I2S_RCR2_BCD(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCD) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR2, field BCP[25] (RW)
- *
- * Configures the polarity of the bit clock.
- *
- * Values:
- * - 0 - Bit Clock is active high with drive outputs on rising edge and sample
- * inputs on falling edge.
- * - 1 - Bit Clock is active low with drive outputs on falling edge and sample
- * inputs on rising edge.
- */
- //@{
- #define BP_I2S_RCR2_BCP (25U) //!< Bit position for I2S_RCR2_BCP.
- #define BM_I2S_RCR2_BCP (0x02000000U) //!< Bit mask for I2S_RCR2_BCP.
- #define BS_I2S_RCR2_BCP (1U) //!< Bit field size in bits for I2S_RCR2_BCP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR2_BCP field.
- #define BR_I2S_RCR2_BCP(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCP))
- #endif
- //! @brief Format value for bitfield I2S_RCR2_BCP.
- #define BF_I2S_RCR2_BCP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR2_BCP), uint32_t) & BM_I2S_RCR2_BCP)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCP field to a new value.
- #define BW_I2S_RCR2_BCP(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCP) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR2, field MSEL[27:26] (RW)
- *
- * Selects the audio Master Clock option used to generate an internally
- * generated bit clock. This field has no effect when configured for an externally
- * generated bit clock. Depending on the device, some Master Clock options might not be
- * available. See the chip configuration details for the availability and
- * chip-specific meaning of each option.
- *
- * Values:
- * - 00 - Bus Clock selected.
- * - 01 - Master Clock (MCLK) 1 option selected.
- * - 10 - Master Clock (MCLK) 2 option selected.
- * - 11 - Master Clock (MCLK) 3 option selected.
- */
- //@{
- #define BP_I2S_RCR2_MSEL (26U) //!< Bit position for I2S_RCR2_MSEL.
- #define BM_I2S_RCR2_MSEL (0x0C000000U) //!< Bit mask for I2S_RCR2_MSEL.
- #define BS_I2S_RCR2_MSEL (2U) //!< Bit field size in bits for I2S_RCR2_MSEL.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR2_MSEL field.
- #define BR_I2S_RCR2_MSEL(x) (HW_I2S_RCR2(x).B.MSEL)
- #endif
- //! @brief Format value for bitfield I2S_RCR2_MSEL.
- #define BF_I2S_RCR2_MSEL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR2_MSEL), uint32_t) & BM_I2S_RCR2_MSEL)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the MSEL field to a new value.
- #define BW_I2S_RCR2_MSEL(x, v) (HW_I2S_RCR2_WR(x, (HW_I2S_RCR2_RD(x) & ~BM_I2S_RCR2_MSEL) | BF_I2S_RCR2_MSEL(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR2, field BCI[28] (RW)
- *
- * When this field is set and using an internally generated bit clock in either
- * synchronous or asynchronous mode, the bit clock actually used by the receiver
- * is delayed by the pad output delay (the receiver is clocked by the pad input
- * as if the clock was externally generated). This has the effect of decreasing
- * the data input setup time, but increasing the data output valid time. The slave
- * mode timing from the datasheet should be used for the receiver when this bit
- * is set. In synchronous mode, this bit allows the receiver to use the slave mode
- * timing from the datasheet, while the transmitter uses the master mode timing.
- * This field has no effect when configured for an externally generated bit
- * clock or when synchronous to another SAI peripheral .
- *
- * Values:
- * - 0 - No effect.
- * - 1 - Internal logic is clocked as if bit clock was externally generated.
- */
- //@{
- #define BP_I2S_RCR2_BCI (28U) //!< Bit position for I2S_RCR2_BCI.
- #define BM_I2S_RCR2_BCI (0x10000000U) //!< Bit mask for I2S_RCR2_BCI.
- #define BS_I2S_RCR2_BCI (1U) //!< Bit field size in bits for I2S_RCR2_BCI.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR2_BCI field.
- #define BR_I2S_RCR2_BCI(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCI))
- #endif
- //! @brief Format value for bitfield I2S_RCR2_BCI.
- #define BF_I2S_RCR2_BCI(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR2_BCI), uint32_t) & BM_I2S_RCR2_BCI)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCI field to a new value.
- #define BW_I2S_RCR2_BCI(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCI) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR2, field BCS[29] (RW)
- *
- * This field swaps the bit clock used by the receiver. When the receiver is
- * configured in asynchronous mode and this bit is set, the receiver is clocked by
- * the transmitter bit clock (SAI_TX_BCLK). This allows the transmitter and
- * receiver to share the same bit clock, but the receiver continues to use the receiver
- * frame sync (SAI_RX_SYNC). When the receiver is configured in synchronous
- * mode, the transmitter BCS field and receiver BCS field must be set to the same
- * value. When both are set, the transmitter and receiver are both clocked by the
- * receiver bit clock (SAI_RX_BCLK) but use the transmitter frame sync
- * (SAI_TX_SYNC). This field has no effect when synchronous to another SAI peripheral.
- *
- * Values:
- * - 0 - Use the normal bit clock source.
- * - 1 - Swap the bit clock source.
- */
- //@{
- #define BP_I2S_RCR2_BCS (29U) //!< Bit position for I2S_RCR2_BCS.
- #define BM_I2S_RCR2_BCS (0x20000000U) //!< Bit mask for I2S_RCR2_BCS.
- #define BS_I2S_RCR2_BCS (1U) //!< Bit field size in bits for I2S_RCR2_BCS.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR2_BCS field.
- #define BR_I2S_RCR2_BCS(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCS))
- #endif
- //! @brief Format value for bitfield I2S_RCR2_BCS.
- #define BF_I2S_RCR2_BCS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR2_BCS), uint32_t) & BM_I2S_RCR2_BCS)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the BCS field to a new value.
- #define BW_I2S_RCR2_BCS(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCS) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR2, field SYNC[31:30] (RW)
- *
- * Configures between asynchronous and synchronous modes of operation. When
- * configured for a synchronous mode of operation, the transmitter or other SAI
- * peripheral must be configured for asynchronous operation.
- *
- * Values:
- * - 00 - Asynchronous mode.
- * - 01 - Synchronous with transmitter.
- * - 10 - Synchronous with another SAI receiver.
- * - 11 - Synchronous with another SAI transmitter.
- */
- //@{
- #define BP_I2S_RCR2_SYNC (30U) //!< Bit position for I2S_RCR2_SYNC.
- #define BM_I2S_RCR2_SYNC (0xC0000000U) //!< Bit mask for I2S_RCR2_SYNC.
- #define BS_I2S_RCR2_SYNC (2U) //!< Bit field size in bits for I2S_RCR2_SYNC.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR2_SYNC field.
- #define BR_I2S_RCR2_SYNC(x) (HW_I2S_RCR2(x).B.SYNC)
- #endif
- //! @brief Format value for bitfield I2S_RCR2_SYNC.
- #define BF_I2S_RCR2_SYNC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR2_SYNC), uint32_t) & BM_I2S_RCR2_SYNC)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SYNC field to a new value.
- #define BW_I2S_RCR2_SYNC(x, v) (HW_I2S_RCR2_WR(x, (HW_I2S_RCR2_RD(x) & ~BM_I2S_RCR2_SYNC) | BF_I2S_RCR2_SYNC(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RCR3 - SAI Receive Configuration 3 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RCR3 - SAI Receive Configuration 3 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when RCSR[RE] is set.
- */
- typedef union _hw_i2s_rcr3
- {
- uint32_t U;
- struct _hw_i2s_rcr3_bitfields
- {
- uint32_t WDFL : 5; //!< [4:0] Word Flag Configuration
- uint32_t RESERVED0 : 11; //!< [15:5]
- uint32_t RCE : 2; //!< [17:16] Receive Channel Enable
- uint32_t RESERVED1 : 14; //!< [31:18]
- } B;
- } hw_i2s_rcr3_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RCR3 register
- */
- //@{
- #define HW_I2S_RCR3_ADDR(x) (REGS_I2S_BASE(x) + 0x8CU)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RCR3(x) (*(__IO hw_i2s_rcr3_t *) HW_I2S_RCR3_ADDR(x))
- #define HW_I2S_RCR3_RD(x) (HW_I2S_RCR3(x).U)
- #define HW_I2S_RCR3_WR(x, v) (HW_I2S_RCR3(x).U = (v))
- #define HW_I2S_RCR3_SET(x, v) (HW_I2S_RCR3_WR(x, HW_I2S_RCR3_RD(x) | (v)))
- #define HW_I2S_RCR3_CLR(x, v) (HW_I2S_RCR3_WR(x, HW_I2S_RCR3_RD(x) & ~(v)))
- #define HW_I2S_RCR3_TOG(x, v) (HW_I2S_RCR3_WR(x, HW_I2S_RCR3_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RCR3 bitfields
- */
- /*!
- * @name Register I2S_RCR3, field WDFL[4:0] (RW)
- *
- * Configures which word the start of word flag is set. The value written should
- * be one less than the word number (for example, write zero to configure for
- * the first word in the frame). When configured to a value greater than the Frame
- * Size field, then the start of word flag is never set.
- */
- //@{
- #define BP_I2S_RCR3_WDFL (0U) //!< Bit position for I2S_RCR3_WDFL.
- #define BM_I2S_RCR3_WDFL (0x0000001FU) //!< Bit mask for I2S_RCR3_WDFL.
- #define BS_I2S_RCR3_WDFL (5U) //!< Bit field size in bits for I2S_RCR3_WDFL.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR3_WDFL field.
- #define BR_I2S_RCR3_WDFL(x) (HW_I2S_RCR3(x).B.WDFL)
- #endif
- //! @brief Format value for bitfield I2S_RCR3_WDFL.
- #define BF_I2S_RCR3_WDFL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR3_WDFL), uint32_t) & BM_I2S_RCR3_WDFL)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WDFL field to a new value.
- #define BW_I2S_RCR3_WDFL(x, v) (HW_I2S_RCR3_WR(x, (HW_I2S_RCR3_RD(x) & ~BM_I2S_RCR3_WDFL) | BF_I2S_RCR3_WDFL(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR3, field RCE[17:16] (RW)
- *
- * Enables the corresponding data channel for receive operation. A channel must
- * be enabled before its FIFO is accessed.
- *
- * Values:
- * - 0 - Receive data channel N is disabled.
- * - 1 - Receive data channel N is enabled.
- */
- //@{
- #define BP_I2S_RCR3_RCE (16U) //!< Bit position for I2S_RCR3_RCE.
- #define BM_I2S_RCR3_RCE (0x00030000U) //!< Bit mask for I2S_RCR3_RCE.
- #define BS_I2S_RCR3_RCE (2U) //!< Bit field size in bits for I2S_RCR3_RCE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR3_RCE field.
- #define BR_I2S_RCR3_RCE(x) (HW_I2S_RCR3(x).B.RCE)
- #endif
- //! @brief Format value for bitfield I2S_RCR3_RCE.
- #define BF_I2S_RCR3_RCE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR3_RCE), uint32_t) & BM_I2S_RCR3_RCE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the RCE field to a new value.
- #define BW_I2S_RCR3_RCE(x, v) (HW_I2S_RCR3_WR(x, (HW_I2S_RCR3_RD(x) & ~BM_I2S_RCR3_RCE) | BF_I2S_RCR3_RCE(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RCR4 - SAI Receive Configuration 4 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RCR4 - SAI Receive Configuration 4 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when RCSR[RE] is set.
- */
- typedef union _hw_i2s_rcr4
- {
- uint32_t U;
- struct _hw_i2s_rcr4_bitfields
- {
- uint32_t FSD : 1; //!< [0] Frame Sync Direction
- uint32_t FSP : 1; //!< [1] Frame Sync Polarity
- uint32_t RESERVED0 : 1; //!< [2]
- uint32_t FSE : 1; //!< [3] Frame Sync Early
- uint32_t MF : 1; //!< [4] MSB First
- uint32_t RESERVED1 : 3; //!< [7:5]
- uint32_t SYWD : 5; //!< [12:8] Sync Width
- uint32_t RESERVED2 : 3; //!< [15:13]
- uint32_t FRSZ : 5; //!< [20:16] Frame Size
- uint32_t RESERVED3 : 11; //!< [31:21]
- } B;
- } hw_i2s_rcr4_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RCR4 register
- */
- //@{
- #define HW_I2S_RCR4_ADDR(x) (REGS_I2S_BASE(x) + 0x90U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RCR4(x) (*(__IO hw_i2s_rcr4_t *) HW_I2S_RCR4_ADDR(x))
- #define HW_I2S_RCR4_RD(x) (HW_I2S_RCR4(x).U)
- #define HW_I2S_RCR4_WR(x, v) (HW_I2S_RCR4(x).U = (v))
- #define HW_I2S_RCR4_SET(x, v) (HW_I2S_RCR4_WR(x, HW_I2S_RCR4_RD(x) | (v)))
- #define HW_I2S_RCR4_CLR(x, v) (HW_I2S_RCR4_WR(x, HW_I2S_RCR4_RD(x) & ~(v)))
- #define HW_I2S_RCR4_TOG(x, v) (HW_I2S_RCR4_WR(x, HW_I2S_RCR4_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RCR4 bitfields
- */
- /*!
- * @name Register I2S_RCR4, field FSD[0] (RW)
- *
- * Configures the direction of the frame sync.
- *
- * Values:
- * - 0 - Frame Sync is generated externally in Slave mode.
- * - 1 - Frame Sync is generated internally in Master mode.
- */
- //@{
- #define BP_I2S_RCR4_FSD (0U) //!< Bit position for I2S_RCR4_FSD.
- #define BM_I2S_RCR4_FSD (0x00000001U) //!< Bit mask for I2S_RCR4_FSD.
- #define BS_I2S_RCR4_FSD (1U) //!< Bit field size in bits for I2S_RCR4_FSD.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR4_FSD field.
- #define BR_I2S_RCR4_FSD(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSD))
- #endif
- //! @brief Format value for bitfield I2S_RCR4_FSD.
- #define BF_I2S_RCR4_FSD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR4_FSD), uint32_t) & BM_I2S_RCR4_FSD)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FSD field to a new value.
- #define BW_I2S_RCR4_FSD(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSD) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR4, field FSP[1] (RW)
- *
- * Configures the polarity of the frame sync.
- *
- * Values:
- * - 0 - Frame sync is active high.
- * - 1 - Frame sync is active low.
- */
- //@{
- #define BP_I2S_RCR4_FSP (1U) //!< Bit position for I2S_RCR4_FSP.
- #define BM_I2S_RCR4_FSP (0x00000002U) //!< Bit mask for I2S_RCR4_FSP.
- #define BS_I2S_RCR4_FSP (1U) //!< Bit field size in bits for I2S_RCR4_FSP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR4_FSP field.
- #define BR_I2S_RCR4_FSP(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSP))
- #endif
- //! @brief Format value for bitfield I2S_RCR4_FSP.
- #define BF_I2S_RCR4_FSP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR4_FSP), uint32_t) & BM_I2S_RCR4_FSP)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FSP field to a new value.
- #define BW_I2S_RCR4_FSP(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSP) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR4, field FSE[3] (RW)
- *
- * Values:
- * - 0 - Frame sync asserts with the first bit of the frame.
- * - 1 - Frame sync asserts one bit before the first bit of the frame.
- */
- //@{
- #define BP_I2S_RCR4_FSE (3U) //!< Bit position for I2S_RCR4_FSE.
- #define BM_I2S_RCR4_FSE (0x00000008U) //!< Bit mask for I2S_RCR4_FSE.
- #define BS_I2S_RCR4_FSE (1U) //!< Bit field size in bits for I2S_RCR4_FSE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR4_FSE field.
- #define BR_I2S_RCR4_FSE(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSE))
- #endif
- //! @brief Format value for bitfield I2S_RCR4_FSE.
- #define BF_I2S_RCR4_FSE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR4_FSE), uint32_t) & BM_I2S_RCR4_FSE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FSE field to a new value.
- #define BW_I2S_RCR4_FSE(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR4, field MF[4] (RW)
- *
- * Configures whether the LSB or the MSB is received first.
- *
- * Values:
- * - 0 - LSB is received first.
- * - 1 - MSB is received first.
- */
- //@{
- #define BP_I2S_RCR4_MF (4U) //!< Bit position for I2S_RCR4_MF.
- #define BM_I2S_RCR4_MF (0x00000010U) //!< Bit mask for I2S_RCR4_MF.
- #define BS_I2S_RCR4_MF (1U) //!< Bit field size in bits for I2S_RCR4_MF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR4_MF field.
- #define BR_I2S_RCR4_MF(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_MF))
- #endif
- //! @brief Format value for bitfield I2S_RCR4_MF.
- #define BF_I2S_RCR4_MF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR4_MF), uint32_t) & BM_I2S_RCR4_MF)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the MF field to a new value.
- #define BW_I2S_RCR4_MF(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_MF) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR4, field SYWD[12:8] (RW)
- *
- * Configures the length of the frame sync in number of bit clocks. The value
- * written must be one less than the number of bit clocks. For example, write 0 for
- * the frame sync to assert for one bit clock only. The sync width cannot be
- * configured longer than the first word of the frame.
- */
- //@{
- #define BP_I2S_RCR4_SYWD (8U) //!< Bit position for I2S_RCR4_SYWD.
- #define BM_I2S_RCR4_SYWD (0x00001F00U) //!< Bit mask for I2S_RCR4_SYWD.
- #define BS_I2S_RCR4_SYWD (5U) //!< Bit field size in bits for I2S_RCR4_SYWD.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR4_SYWD field.
- #define BR_I2S_RCR4_SYWD(x) (HW_I2S_RCR4(x).B.SYWD)
- #endif
- //! @brief Format value for bitfield I2S_RCR4_SYWD.
- #define BF_I2S_RCR4_SYWD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR4_SYWD), uint32_t) & BM_I2S_RCR4_SYWD)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the SYWD field to a new value.
- #define BW_I2S_RCR4_SYWD(x, v) (HW_I2S_RCR4_WR(x, (HW_I2S_RCR4_RD(x) & ~BM_I2S_RCR4_SYWD) | BF_I2S_RCR4_SYWD(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR4, field FRSZ[20:16] (RW)
- *
- * Configures the number of words in each frame. The value written must be one
- * less than the number of words in the frame. For example, write 0 for one word
- * per frame. The maximum supported frame size is 32 words.
- */
- //@{
- #define BP_I2S_RCR4_FRSZ (16U) //!< Bit position for I2S_RCR4_FRSZ.
- #define BM_I2S_RCR4_FRSZ (0x001F0000U) //!< Bit mask for I2S_RCR4_FRSZ.
- #define BS_I2S_RCR4_FRSZ (5U) //!< Bit field size in bits for I2S_RCR4_FRSZ.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR4_FRSZ field.
- #define BR_I2S_RCR4_FRSZ(x) (HW_I2S_RCR4(x).B.FRSZ)
- #endif
- //! @brief Format value for bitfield I2S_RCR4_FRSZ.
- #define BF_I2S_RCR4_FRSZ(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR4_FRSZ), uint32_t) & BM_I2S_RCR4_FRSZ)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FRSZ field to a new value.
- #define BW_I2S_RCR4_FRSZ(x, v) (HW_I2S_RCR4_WR(x, (HW_I2S_RCR4_RD(x) & ~BM_I2S_RCR4_FRSZ) | BF_I2S_RCR4_FRSZ(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RCR5 - SAI Receive Configuration 5 Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RCR5 - SAI Receive Configuration 5 Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register must not be altered when RCSR[RE] is set.
- */
- typedef union _hw_i2s_rcr5
- {
- uint32_t U;
- struct _hw_i2s_rcr5_bitfields
- {
- uint32_t RESERVED0 : 8; //!< [7:0]
- uint32_t FBT : 5; //!< [12:8] First Bit Shifted
- uint32_t RESERVED1 : 3; //!< [15:13]
- uint32_t W0W : 5; //!< [20:16] Word 0 Width
- uint32_t RESERVED2 : 3; //!< [23:21]
- uint32_t WNW : 5; //!< [28:24] Word N Width
- uint32_t RESERVED3 : 3; //!< [31:29]
- } B;
- } hw_i2s_rcr5_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RCR5 register
- */
- //@{
- #define HW_I2S_RCR5_ADDR(x) (REGS_I2S_BASE(x) + 0x94U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RCR5(x) (*(__IO hw_i2s_rcr5_t *) HW_I2S_RCR5_ADDR(x))
- #define HW_I2S_RCR5_RD(x) (HW_I2S_RCR5(x).U)
- #define HW_I2S_RCR5_WR(x, v) (HW_I2S_RCR5(x).U = (v))
- #define HW_I2S_RCR5_SET(x, v) (HW_I2S_RCR5_WR(x, HW_I2S_RCR5_RD(x) | (v)))
- #define HW_I2S_RCR5_CLR(x, v) (HW_I2S_RCR5_WR(x, HW_I2S_RCR5_RD(x) & ~(v)))
- #define HW_I2S_RCR5_TOG(x, v) (HW_I2S_RCR5_WR(x, HW_I2S_RCR5_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RCR5 bitfields
- */
- /*!
- * @name Register I2S_RCR5, field FBT[12:8] (RW)
- *
- * Configures the bit index for the first bit received for each word in the
- * frame. If configured for MSB First, the index of the next bit received is one less
- * than the current bit received. If configured for LSB First, the index of the
- * next bit received is one more than the current bit received. The value written
- * must be greater than or equal to the word width when configured for MSB
- * First. The value written must be less than or equal to 31-word width when
- * configured for LSB First.
- */
- //@{
- #define BP_I2S_RCR5_FBT (8U) //!< Bit position for I2S_RCR5_FBT.
- #define BM_I2S_RCR5_FBT (0x00001F00U) //!< Bit mask for I2S_RCR5_FBT.
- #define BS_I2S_RCR5_FBT (5U) //!< Bit field size in bits for I2S_RCR5_FBT.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR5_FBT field.
- #define BR_I2S_RCR5_FBT(x) (HW_I2S_RCR5(x).B.FBT)
- #endif
- //! @brief Format value for bitfield I2S_RCR5_FBT.
- #define BF_I2S_RCR5_FBT(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR5_FBT), uint32_t) & BM_I2S_RCR5_FBT)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FBT field to a new value.
- #define BW_I2S_RCR5_FBT(x, v) (HW_I2S_RCR5_WR(x, (HW_I2S_RCR5_RD(x) & ~BM_I2S_RCR5_FBT) | BF_I2S_RCR5_FBT(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR5, field W0W[20:16] (RW)
- *
- * Configures the number of bits in the first word in each frame. The value
- * written must be one less than the number of bits in the first word. Word width of
- * less than 8 bits is not supported if there is only one word per frame.
- */
- //@{
- #define BP_I2S_RCR5_W0W (16U) //!< Bit position for I2S_RCR5_W0W.
- #define BM_I2S_RCR5_W0W (0x001F0000U) //!< Bit mask for I2S_RCR5_W0W.
- #define BS_I2S_RCR5_W0W (5U) //!< Bit field size in bits for I2S_RCR5_W0W.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR5_W0W field.
- #define BR_I2S_RCR5_W0W(x) (HW_I2S_RCR5(x).B.W0W)
- #endif
- //! @brief Format value for bitfield I2S_RCR5_W0W.
- #define BF_I2S_RCR5_W0W(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR5_W0W), uint32_t) & BM_I2S_RCR5_W0W)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the W0W field to a new value.
- #define BW_I2S_RCR5_W0W(x, v) (HW_I2S_RCR5_WR(x, (HW_I2S_RCR5_RD(x) & ~BM_I2S_RCR5_W0W) | BF_I2S_RCR5_W0W(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_RCR5, field WNW[28:24] (RW)
- *
- * Configures the number of bits in each word, for each word except the first in
- * the frame. The value written must be one less than the number of bits per
- * word. Word width of less than 8 bits is not supported.
- */
- //@{
- #define BP_I2S_RCR5_WNW (24U) //!< Bit position for I2S_RCR5_WNW.
- #define BM_I2S_RCR5_WNW (0x1F000000U) //!< Bit mask for I2S_RCR5_WNW.
- #define BS_I2S_RCR5_WNW (5U) //!< Bit field size in bits for I2S_RCR5_WNW.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RCR5_WNW field.
- #define BR_I2S_RCR5_WNW(x) (HW_I2S_RCR5(x).B.WNW)
- #endif
- //! @brief Format value for bitfield I2S_RCR5_WNW.
- #define BF_I2S_RCR5_WNW(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RCR5_WNW), uint32_t) & BM_I2S_RCR5_WNW)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the WNW field to a new value.
- #define BW_I2S_RCR5_WNW(x, v) (HW_I2S_RCR5_WR(x, (HW_I2S_RCR5_RD(x) & ~BM_I2S_RCR5_WNW) | BF_I2S_RCR5_WNW(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RDRn - SAI Receive Data Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RDRn - SAI Receive Data Register (RO)
- *
- * Reset value: 0x00000000U
- *
- * Reading this register introduces one additional peripheral clock wait state
- * on each read.
- */
- typedef union _hw_i2s_rdrn
- {
- uint32_t U;
- struct _hw_i2s_rdrn_bitfields
- {
- uint32_t RDR : 32; //!< [31:0] Receive Data Register
- } B;
- } hw_i2s_rdrn_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RDRn register
- */
- //@{
- #define HW_I2S_RDRn_COUNT (2U)
- #define HW_I2S_RDRn_ADDR(x, n) (REGS_I2S_BASE(x) + 0xA0U + (0x4U * n))
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RDRn(x, n) (*(__I hw_i2s_rdrn_t *) HW_I2S_RDRn_ADDR(x, n))
- #define HW_I2S_RDRn_RD(x, n) (HW_I2S_RDRn(x, n).U)
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RDRn bitfields
- */
- /*!
- * @name Register I2S_RDRn, field RDR[31:0] (RO)
- *
- * The corresponding RCR3[RCE] bit must be set before accessing the channel's
- * receive data register. Reads from this register when the receive FIFO is not
- * empty will return the data from the top of the receive FIFO. Reads from this
- * register when the receive FIFO is empty are ignored.
- */
- //@{
- #define BP_I2S_RDRn_RDR (0U) //!< Bit position for I2S_RDRn_RDR.
- #define BM_I2S_RDRn_RDR (0xFFFFFFFFU) //!< Bit mask for I2S_RDRn_RDR.
- #define BS_I2S_RDRn_RDR (32U) //!< Bit field size in bits for I2S_RDRn_RDR.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RDRn_RDR field.
- #define BR_I2S_RDRn_RDR(x, n) (HW_I2S_RDRn(x, n).U)
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RFRn - SAI Receive FIFO Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RFRn - SAI Receive FIFO Register (RO)
- *
- * Reset value: 0x00000000U
- *
- * The MSB of the read and write pointers is used to distinguish between FIFO
- * full and empty conditions. If the read and write pointers are identical, then
- * the FIFO is empty. If the read and write pointers are identical except for the
- * MSB, then the FIFO is full.
- */
- typedef union _hw_i2s_rfrn
- {
- uint32_t U;
- struct _hw_i2s_rfrn_bitfields
- {
- uint32_t RFP : 4; //!< [3:0] Read FIFO Pointer
- uint32_t RESERVED0 : 12; //!< [15:4]
- uint32_t WFP : 4; //!< [19:16] Write FIFO Pointer
- uint32_t RESERVED1 : 12; //!< [31:20]
- } B;
- } hw_i2s_rfrn_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RFRn register
- */
- //@{
- #define HW_I2S_RFRn_COUNT (2U)
- #define HW_I2S_RFRn_ADDR(x, n) (REGS_I2S_BASE(x) + 0xC0U + (0x4U * n))
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RFRn(x, n) (*(__I hw_i2s_rfrn_t *) HW_I2S_RFRn_ADDR(x, n))
- #define HW_I2S_RFRn_RD(x, n) (HW_I2S_RFRn(x, n).U)
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RFRn bitfields
- */
- /*!
- * @name Register I2S_RFRn, field RFP[3:0] (RO)
- *
- * FIFO read pointer for receive data channel.
- */
- //@{
- #define BP_I2S_RFRn_RFP (0U) //!< Bit position for I2S_RFRn_RFP.
- #define BM_I2S_RFRn_RFP (0x0000000FU) //!< Bit mask for I2S_RFRn_RFP.
- #define BS_I2S_RFRn_RFP (4U) //!< Bit field size in bits for I2S_RFRn_RFP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RFRn_RFP field.
- #define BR_I2S_RFRn_RFP(x, n) (HW_I2S_RFRn(x, n).B.RFP)
- #endif
- //@}
- /*!
- * @name Register I2S_RFRn, field WFP[19:16] (RO)
- *
- * FIFO write pointer for receive data channel.
- */
- //@{
- #define BP_I2S_RFRn_WFP (16U) //!< Bit position for I2S_RFRn_WFP.
- #define BM_I2S_RFRn_WFP (0x000F0000U) //!< Bit mask for I2S_RFRn_WFP.
- #define BS_I2S_RFRn_WFP (4U) //!< Bit field size in bits for I2S_RFRn_WFP.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RFRn_WFP field.
- #define BR_I2S_RFRn_WFP(x, n) (HW_I2S_RFRn(x, n).B.WFP)
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_RMR - SAI Receive Mask Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_RMR - SAI Receive Mask Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * This register is double-buffered and updates: When RCSR[RE] is first set At
- * the end of each frame This allows the masked words in each frame to change from
- * frame to frame.
- */
- typedef union _hw_i2s_rmr
- {
- uint32_t U;
- struct _hw_i2s_rmr_bitfields
- {
- uint32_t RWM : 32; //!< [31:0] Receive Word Mask
- } B;
- } hw_i2s_rmr_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_RMR register
- */
- //@{
- #define HW_I2S_RMR_ADDR(x) (REGS_I2S_BASE(x) + 0xE0U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_RMR(x) (*(__IO hw_i2s_rmr_t *) HW_I2S_RMR_ADDR(x))
- #define HW_I2S_RMR_RD(x) (HW_I2S_RMR(x).U)
- #define HW_I2S_RMR_WR(x, v) (HW_I2S_RMR(x).U = (v))
- #define HW_I2S_RMR_SET(x, v) (HW_I2S_RMR_WR(x, HW_I2S_RMR_RD(x) | (v)))
- #define HW_I2S_RMR_CLR(x, v) (HW_I2S_RMR_WR(x, HW_I2S_RMR_RD(x) & ~(v)))
- #define HW_I2S_RMR_TOG(x, v) (HW_I2S_RMR_WR(x, HW_I2S_RMR_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_RMR bitfields
- */
- /*!
- * @name Register I2S_RMR, field RWM[31:0] (RW)
- *
- * Configures whether the receive word is masked (received data ignored and not
- * written to receive FIFO) for the corresponding word in the frame.
- *
- * Values:
- * - 0 - Word N is enabled.
- * - 1 - Word N is masked.
- */
- //@{
- #define BP_I2S_RMR_RWM (0U) //!< Bit position for I2S_RMR_RWM.
- #define BM_I2S_RMR_RWM (0xFFFFFFFFU) //!< Bit mask for I2S_RMR_RWM.
- #define BS_I2S_RMR_RWM (32U) //!< Bit field size in bits for I2S_RMR_RWM.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_RMR_RWM field.
- #define BR_I2S_RMR_RWM(x) (HW_I2S_RMR(x).U)
- #endif
- //! @brief Format value for bitfield I2S_RMR_RWM.
- #define BF_I2S_RMR_RWM(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_RMR_RWM), uint32_t) & BM_I2S_RMR_RWM)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the RWM field to a new value.
- #define BW_I2S_RMR_RWM(x, v) (HW_I2S_RMR_WR(x, v))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_MCR - SAI MCLK Control Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_MCR - SAI MCLK Control Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * The MCLK Control Register (MCR) controls the clock source and direction of
- * the audio master clock.
- */
- typedef union _hw_i2s_mcr
- {
- uint32_t U;
- struct _hw_i2s_mcr_bitfields
- {
- uint32_t RESERVED0 : 24; //!< [23:0]
- uint32_t MICS : 2; //!< [25:24] MCLK Input Clock Select
- uint32_t RESERVED1 : 4; //!< [29:26]
- uint32_t MOE : 1; //!< [30] MCLK Output Enable
- uint32_t DUF : 1; //!< [31] Divider Update Flag
- } B;
- } hw_i2s_mcr_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_MCR register
- */
- //@{
- #define HW_I2S_MCR_ADDR(x) (REGS_I2S_BASE(x) + 0x100U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_MCR(x) (*(__IO hw_i2s_mcr_t *) HW_I2S_MCR_ADDR(x))
- #define HW_I2S_MCR_RD(x) (HW_I2S_MCR(x).U)
- #define HW_I2S_MCR_WR(x, v) (HW_I2S_MCR(x).U = (v))
- #define HW_I2S_MCR_SET(x, v) (HW_I2S_MCR_WR(x, HW_I2S_MCR_RD(x) | (v)))
- #define HW_I2S_MCR_CLR(x, v) (HW_I2S_MCR_WR(x, HW_I2S_MCR_RD(x) & ~(v)))
- #define HW_I2S_MCR_TOG(x, v) (HW_I2S_MCR_WR(x, HW_I2S_MCR_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_MCR bitfields
- */
- /*!
- * @name Register I2S_MCR, field MICS[25:24] (RW)
- *
- * Selects the clock input to the MCLK divider. This field cannot be changed
- * while the MCLK divider is enabled. See the chip configuration details for
- * information about the connections to these inputs.
- *
- * Values:
- * - 00 - MCLK divider input clock 0 selected.
- * - 01 - MCLK divider input clock 1 selected.
- * - 10 - MCLK divider input clock 2 selected.
- * - 11 - MCLK divider input clock 3 selected.
- */
- //@{
- #define BP_I2S_MCR_MICS (24U) //!< Bit position for I2S_MCR_MICS.
- #define BM_I2S_MCR_MICS (0x03000000U) //!< Bit mask for I2S_MCR_MICS.
- #define BS_I2S_MCR_MICS (2U) //!< Bit field size in bits for I2S_MCR_MICS.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_MCR_MICS field.
- #define BR_I2S_MCR_MICS(x) (HW_I2S_MCR(x).B.MICS)
- #endif
- //! @brief Format value for bitfield I2S_MCR_MICS.
- #define BF_I2S_MCR_MICS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_MCR_MICS), uint32_t) & BM_I2S_MCR_MICS)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the MICS field to a new value.
- #define BW_I2S_MCR_MICS(x, v) (HW_I2S_MCR_WR(x, (HW_I2S_MCR_RD(x) & ~BM_I2S_MCR_MICS) | BF_I2S_MCR_MICS(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_MCR, field MOE[30] (RW)
- *
- * Enables the MCLK divider and configures the MCLK signal pin as an output.
- * When software clears this field, it remains set until the MCLK divider is fully
- * disabled.
- *
- * Values:
- * - 0 - MCLK signal pin is configured as an input that bypasses the MCLK
- * divider.
- * - 1 - MCLK signal pin is configured as an output from the MCLK divider and
- * the MCLK divider is enabled.
- */
- //@{
- #define BP_I2S_MCR_MOE (30U) //!< Bit position for I2S_MCR_MOE.
- #define BM_I2S_MCR_MOE (0x40000000U) //!< Bit mask for I2S_MCR_MOE.
- #define BS_I2S_MCR_MOE (1U) //!< Bit field size in bits for I2S_MCR_MOE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_MCR_MOE field.
- #define BR_I2S_MCR_MOE(x) (BITBAND_ACCESS32(HW_I2S_MCR_ADDR(x), BP_I2S_MCR_MOE))
- #endif
- //! @brief Format value for bitfield I2S_MCR_MOE.
- #define BF_I2S_MCR_MOE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_MCR_MOE), uint32_t) & BM_I2S_MCR_MOE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the MOE field to a new value.
- #define BW_I2S_MCR_MOE(x, v) (BITBAND_ACCESS32(HW_I2S_MCR_ADDR(x), BP_I2S_MCR_MOE) = (v))
- #endif
- //@}
- /*!
- * @name Register I2S_MCR, field DUF[31] (RO)
- *
- * Provides the status of on-the-fly updates to the MCLK divider ratio.
- *
- * Values:
- * - 0 - MCLK divider ratio is not being updated currently.
- * - 1 - MCLK divider ratio is updating on-the-fly. Further updates to the MCLK
- * divider ratio are blocked while this flag remains set.
- */
- //@{
- #define BP_I2S_MCR_DUF (31U) //!< Bit position for I2S_MCR_DUF.
- #define BM_I2S_MCR_DUF (0x80000000U) //!< Bit mask for I2S_MCR_DUF.
- #define BS_I2S_MCR_DUF (1U) //!< Bit field size in bits for I2S_MCR_DUF.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_MCR_DUF field.
- #define BR_I2S_MCR_DUF(x) (BITBAND_ACCESS32(HW_I2S_MCR_ADDR(x), BP_I2S_MCR_DUF))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // HW_I2S_MDR - SAI MCLK Divide Register
- //-------------------------------------------------------------------------------------------
- #ifndef __LANGUAGE_ASM__
- /*!
- * @brief HW_I2S_MDR - SAI MCLK Divide Register (RW)
- *
- * Reset value: 0x00000000U
- *
- * The MCLK Divide Register (MDR) configures the MCLK divide ratio. Although the
- * MDR can be changed when the MCLK divider clock is enabled, additional writes
- * to the MDR are blocked while MCR[DUF] is set. Writes to the MDR when the MCLK
- * divided clock is disabled do not set MCR[DUF].
- */
- typedef union _hw_i2s_mdr
- {
- uint32_t U;
- struct _hw_i2s_mdr_bitfields
- {
- uint32_t DIVIDE : 12; //!< [11:0] MCLK Divide
- uint32_t FRACT : 8; //!< [19:12] MCLK Fraction
- uint32_t RESERVED0 : 12; //!< [31:20]
- } B;
- } hw_i2s_mdr_t;
- #endif
- /*!
- * @name Constants and macros for entire I2S_MDR register
- */
- //@{
- #define HW_I2S_MDR_ADDR(x) (REGS_I2S_BASE(x) + 0x104U)
- #ifndef __LANGUAGE_ASM__
- #define HW_I2S_MDR(x) (*(__IO hw_i2s_mdr_t *) HW_I2S_MDR_ADDR(x))
- #define HW_I2S_MDR_RD(x) (HW_I2S_MDR(x).U)
- #define HW_I2S_MDR_WR(x, v) (HW_I2S_MDR(x).U = (v))
- #define HW_I2S_MDR_SET(x, v) (HW_I2S_MDR_WR(x, HW_I2S_MDR_RD(x) | (v)))
- #define HW_I2S_MDR_CLR(x, v) (HW_I2S_MDR_WR(x, HW_I2S_MDR_RD(x) & ~(v)))
- #define HW_I2S_MDR_TOG(x, v) (HW_I2S_MDR_WR(x, HW_I2S_MDR_RD(x) ^ (v)))
- #endif
- //@}
- /*
- * Constants & macros for individual I2S_MDR bitfields
- */
- /*!
- * @name Register I2S_MDR, field DIVIDE[11:0] (RW)
- *
- * Sets the MCLK divide ratio such that: MCLK output = MCLK input * ( (FRACT +
- * 1) / (DIVIDE + 1) ). FRACT must be set equal or less than the value in the
- * DIVIDE field.
- */
- //@{
- #define BP_I2S_MDR_DIVIDE (0U) //!< Bit position for I2S_MDR_DIVIDE.
- #define BM_I2S_MDR_DIVIDE (0x00000FFFU) //!< Bit mask for I2S_MDR_DIVIDE.
- #define BS_I2S_MDR_DIVIDE (12U) //!< Bit field size in bits for I2S_MDR_DIVIDE.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_MDR_DIVIDE field.
- #define BR_I2S_MDR_DIVIDE(x) (HW_I2S_MDR(x).B.DIVIDE)
- #endif
- //! @brief Format value for bitfield I2S_MDR_DIVIDE.
- #define BF_I2S_MDR_DIVIDE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_MDR_DIVIDE), uint32_t) & BM_I2S_MDR_DIVIDE)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the DIVIDE field to a new value.
- #define BW_I2S_MDR_DIVIDE(x, v) (HW_I2S_MDR_WR(x, (HW_I2S_MDR_RD(x) & ~BM_I2S_MDR_DIVIDE) | BF_I2S_MDR_DIVIDE(v)))
- #endif
- //@}
- /*!
- * @name Register I2S_MDR, field FRACT[19:12] (RW)
- *
- * Sets the MCLK divide ratio such that: MCLK output = MCLK input * ( (FRACT +
- * 1) / (DIVIDE + 1) ). FRACT must be set equal or less than the value in the
- * DIVIDE field.
- */
- //@{
- #define BP_I2S_MDR_FRACT (12U) //!< Bit position for I2S_MDR_FRACT.
- #define BM_I2S_MDR_FRACT (0x000FF000U) //!< Bit mask for I2S_MDR_FRACT.
- #define BS_I2S_MDR_FRACT (8U) //!< Bit field size in bits for I2S_MDR_FRACT.
- #ifndef __LANGUAGE_ASM__
- //! @brief Read current value of the I2S_MDR_FRACT field.
- #define BR_I2S_MDR_FRACT(x) (HW_I2S_MDR(x).B.FRACT)
- #endif
- //! @brief Format value for bitfield I2S_MDR_FRACT.
- #define BF_I2S_MDR_FRACT(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_I2S_MDR_FRACT), uint32_t) & BM_I2S_MDR_FRACT)
- #ifndef __LANGUAGE_ASM__
- //! @brief Set the FRACT field to a new value.
- #define BW_I2S_MDR_FRACT(x, v) (HW_I2S_MDR_WR(x, (HW_I2S_MDR_RD(x) & ~BM_I2S_MDR_FRACT) | BF_I2S_MDR_FRACT(v)))
- #endif
- //@}
- //-------------------------------------------------------------------------------------------
- // hw_i2s_t - module struct
- //-------------------------------------------------------------------------------------------
- /*!
- * @brief All I2S module registers.
- */
- #ifndef __LANGUAGE_ASM__
- #pragma pack(1)
- typedef struct _hw_i2s
- {
- __IO hw_i2s_tcsr_t TCSR; //!< [0x0] SAI Transmit Control Register
- __IO hw_i2s_tcr1_t TCR1; //!< [0x4] SAI Transmit Configuration 1 Register
- __IO hw_i2s_tcr2_t TCR2; //!< [0x8] SAI Transmit Configuration 2 Register
- __IO hw_i2s_tcr3_t TCR3; //!< [0xC] SAI Transmit Configuration 3 Register
- __IO hw_i2s_tcr4_t TCR4; //!< [0x10] SAI Transmit Configuration 4 Register
- __IO hw_i2s_tcr5_t TCR5; //!< [0x14] SAI Transmit Configuration 5 Register
- uint8_t _reserved0[8];
- __O hw_i2s_tdrn_t TDRn[2]; //!< [0x20] SAI Transmit Data Register
- uint8_t _reserved1[24];
- __I hw_i2s_tfrn_t TFRn[2]; //!< [0x40] SAI Transmit FIFO Register
- uint8_t _reserved2[24];
- __IO hw_i2s_tmr_t TMR; //!< [0x60] SAI Transmit Mask Register
- uint8_t _reserved3[28];
- __IO hw_i2s_rcsr_t RCSR; //!< [0x80] SAI Receive Control Register
- __IO hw_i2s_rcr1_t RCR1; //!< [0x84] SAI Receive Configuration 1 Register
- __IO hw_i2s_rcr2_t RCR2; //!< [0x88] SAI Receive Configuration 2 Register
- __IO hw_i2s_rcr3_t RCR3; //!< [0x8C] SAI Receive Configuration 3 Register
- __IO hw_i2s_rcr4_t RCR4; //!< [0x90] SAI Receive Configuration 4 Register
- __IO hw_i2s_rcr5_t RCR5; //!< [0x94] SAI Receive Configuration 5 Register
- uint8_t _reserved4[8];
- __I hw_i2s_rdrn_t RDRn[2]; //!< [0xA0] SAI Receive Data Register
- uint8_t _reserved5[24];
- __I hw_i2s_rfrn_t RFRn[2]; //!< [0xC0] SAI Receive FIFO Register
- uint8_t _reserved6[24];
- __IO hw_i2s_rmr_t RMR; //!< [0xE0] SAI Receive Mask Register
- uint8_t _reserved7[28];
- __IO hw_i2s_mcr_t MCR; //!< [0x100] SAI MCLK Control Register
- __IO hw_i2s_mdr_t MDR; //!< [0x104] SAI MCLK Divide Register
- } hw_i2s_t;
- #pragma pack()
- //! @brief Macro to access all I2S registers.
- //! @param x I2S instance number.
- //! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
- //! use the '&' operator, like <code>&HW_I2S(0)</code>.
- #define HW_I2S(x) (*(hw_i2s_t *) REGS_I2S_BASE(x))
- #endif
- #endif // __HW_I2S_REGISTERS_H__
- // v22/130726/0.9
- // EOF
|