1 /**************************************************************************//** 2 * @file i2s_reg.h 3 * @version V1.00 4 * @brief I2S register definition header file 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved. 8 *****************************************************************************/ 9 #ifndef __I2S_REG_H__ 10 #define __I2S_REG_H__ 11 12 #if defined ( __CC_ARM ) 13 #pragma anon_unions 14 #endif 15 16 /** 17 @addtogroup REGISTER Control Register 18 @{ 19 */ 20 21 /** 22 @addtogroup I2S I2S Interface Controller(I2S) 23 Memory Mapped Structure for I2S Controller 24 @{ */ 25 26 typedef struct 27 { 28 29 30 /** 31 * @var I2S_T::CTL0 32 * Offset: 0x00 I2S Control Register 0 33 * --------------------------------------------------------------------------------------------------- 34 * |Bits |Field |Descriptions 35 * | :----: | :----: | :---- | 36 * |[0] |I2SEN |I2S Controller Enable Control 37 * | | |0 = I2S controller Disabled. 38 * | | |1 = I2S controller Enabled. 39 * |[1] |TXEN |Transmit Enable Control 40 * | | |0 = Data transmission Disabled. 41 * | | |1 = Data transmission Enabled. 42 * |[2] |RXEN |Receive Enable Control 43 * | | |0 = Data receiving Disabled. 44 * | | |1 = Data receiving Enabled. 45 * |[3] |MUTE |Transmit Mute Enable Control 46 * | | |0 = Transmit data is shifted from buffer. 47 * | | |1 = Send zero on transmit channel. 48 * |[5:4] |DATWIDTH |Data Width 49 * | | |This bit field is used to define the bit-width of data word in each audio channel 50 * | | |00 = The bit-width of data word is 8-bit. 51 * | | |01 = The bit-width of data word is 16-bit. 52 * | | |10 = The bit-width of data word is 24-bit. 53 * | | |11 = The bit-width of data word is 32-bit. 54 * |[6] |MONO |Monaural Data Control 55 * | | |0 = Data is stereo format. 56 * | | |1 = Data is monaural format. 57 * | | |Note: when chip records data, RXLCH (I2S_CTL0[23]) indicates which channel data will be saved if monaural format is selected. 58 * |[7] |ORDER |Stereo Data Order in FIFO 59 * | | |In 8-bit/16-bit data width, this bit is used to select whether the even or odd channel data is stored in higher byte 60 * | | |In 24-bit data width, this is used to select the left/right alignment method of audio data which is stored in data memory consisted of 32-bit FIFO entries. 61 * | | |0 = Even channel data at high byte in 8-bit/16-bit data width. 62 * | | |LSB of 24-bit audio data in each channel is aligned to right side in 32-bit FIFO entries. 63 * | | |1 = Even channel data at low byte. 64 * | | | MSB of 24-bit audio data in each channel is aligned to left side in 32-bit FIFO entries. 65 * |[8] |SLAVE |Slave Mode Enable Control 66 * | | |0 = Master mode. 67 * | | |1 = Slave mode. 68 * | | |Note: I2S can operate as master or slave 69 * | | |For Master mode, I2S_BCLK and I2S_LRCLK pins are output mode and send out bit clock to Audio CODEC chip 70 * | | |In Slave mode, I2S_BCLK and I2S_LRCLK pins are input mode and I2S_BCLK and I2S_LRCLK signals are received from outer Audio CODEC chip. 71 * |[15] |MCLKEN |Master Clock Enable Control 72 * | | |If MCLKEN is set to 1, I2S controller will generate master clock on I2S_MCLK pin for external audio devices. 73 * | | |0 = Master clock Disabled. 74 * | | |1 = Master clock Enabled. 75 * |[18] |TXFBCLR |Transmit FIFO Buffer Clear 76 * | | |0 = No Effect. 77 * | | |1 = Clear TX FIFO. 78 * | | |Note1: Write 1 to clear transmit FIFO, internal pointer is reset to FIFO start point, and TXCNT (I2S_STATUS1[12:8]) returns 0 and transmit FIFO becomes empty but data in transmit FIFO is not changed. 79 * | | |Note2: This bit is clear by hardware automatically, read it return zero. 80 * |[19] |RXFBCLR |Receive FIFO Buffer Clear 81 * | | |0 = No Effect. 82 * | | |1 = Clear RX FIFO. 83 * | | |Note1: Write 1 to clear receive FIFO, internal pointer is reset to FIFO start point, and RXCNT (I2S_STATUS1[20:16]) returns 0 and receive FIFO becomes empty. 84 * | | |Note2: This bit is cleared by hardware automatically, read it return zero. 85 * |[20] |TXPDMAEN |Transmit PDMA Enable Control 86 * | | |0 = Transmit PDMA function Disabled. 87 * | | |1 = Transmit PDMA function Enabled. 88 * |[21] |RXPDMAEN |Receive PDMA Enable Control 89 * | | |0 = Receiver PDMA function Disabled. 90 * | | |1 = Receiver PDMA function Enabled. 91 * |[23] |RXLCH |Receive Left Channel Enable Control 92 * | | |When monaural format is selected (MONO = 1), I2S will receive channel1 data if RXLCH is set to 0, and receive channel0 data if RXLCH is set to 1. 93 * | | |0 = Receives channel1 data in MONO mode. 94 * | | |1 = Receives channel0 data in MONO mode. 95 * |[26:24] |FORMAT |Data Format Selection 96 * | | |000 = I2S standard data format. 97 * | | |001 = I2S with MSB justified. 98 * | | |010 = I2S with LSB justified. 99 * | | |011 = Reserved. 100 * | | |100 = PCM standard data format. 101 * | | |101 = PCM with MSB justified. 102 * | | |110 = PCM with LSB justified. 103 * | | |111 = Reserved. 104 * |[27] |PCMSYNC |PCM Synchronization Pulse Length Selection 105 * | | |This bit field is used to select the high pulse length of frame synchronization signal in PCM protocol 106 * | | |0 = One BCLK period. 107 * | | |1 = One channel period. 108 * | | |Note: This bit is only available in master mode 109 * |[29:28] |CHWIDTH |Channel Width 110 * | | |This bit fields are used to define the length of audio channel 111 * | | |If CHWIDTH < DATWIDTH, the hardware will set the real channel length as the bit-width of audio data which is defined by DATWIDTH. 112 * | | |00 = The bit-width of each audio channel is 8-bit. 113 * | | |01 = The bit-width of each audio channel is 16-bit. 114 * | | |10 = The bit-width of each audio channel is 24-bit. 115 * | | |11 = The bit-width of each audio channel is 32-bit. 116 * |[31:30] |TDMCHNUM |TDM Channel Number 117 * | | |This bit fields are used to define the TDM channel number in one audio frame while PCM mode (FORMAT[2] = 1). 118 * | | |00 = 2 channels in audio frame. 119 * | | |01 = 4 channels in audio frame. 120 * | | |10 = 6 channels in audio frame. 121 * | | |11 = 8 channels in audio frame. 122 * @var I2S_T::CLKDIV 123 * Offset: 0x04 I2S Clock Divider Register 124 * --------------------------------------------------------------------------------------------------- 125 * |Bits |Field |Descriptions 126 * | :----: | :----: | :---- | 127 * |[5:0] |MCLKDIV |Master Clock Divider 128 * | | |If chip external crystal frequency is (2xMCLKDIV)*256fs then software can program these bits to generate 256fs clock frequency to audio codec chip 129 * | | |If MCLKDIV is set to 0, MCLK is the same as external clock input. 130 * | | |For example, sampling rate is 24 kHz and chip external crystal clock is 12.288 MHz, set MCLKDIV = 1. 131 * | | |F_MCLK = F_I2SCLK/(2x(MCLKDIV)) (When MCLKDIV is >= 1 ). 132 * | | |F_MCLK = F_I2SCLK (When MCLKDIV is set to 0 ). 133 * | | |Note: F_MCLK is the frequency of MCLK, and F_I2SCLK is the frequency of the I2S_CLK 134 * |[16:8] |BCLKDIV |Bit Clock Divider 135 * | | |The I2S controller will generate bit clock in Master mode 136 * | | |Software can program these bit fields to generate sampling rate clock frequency. 137 * | | |F_BCLK= F_I2SCLK / (2*(BCLKDIV + 1)). 138 * | | |Note: F_BCLK is the frequency of BCLK and F_I2SCLK is the frequency of I2S_CLK 139 * @var I2S_T::IEN 140 * Offset: 0x08 I2S Interrupt Enable Register 141 * --------------------------------------------------------------------------------------------------- 142 * |Bits |Field |Descriptions 143 * | :----: | :----: | :---- | 144 * |[0] |RXUDFIEN |Receive FIFO Underflow Interrupt Enable Control 145 * | | |0 = Interrupt Disabled. 146 * | | |1 = Interrupt Enabled. 147 * | | |Note: If software reads receive FIFO when it is empty then RXUDIF (I2S_STATUS0[8]) flag is set to 1. 148 * |[1] |RXOVFIEN |Receive FIFO Overflow Interrupt Enable Control 149 * | | |0 = Interrupt Disabled. 150 * | | |1 = Interrupt Enabled. 151 * | | |Note: Interrupt occurs if this bit is set to 1 and RXOVIF (I2S_STATUS0[9]) flag is set to 1 152 * |[2] |RXTHIEN |Receive FIFO Threshold Level Interrupt Enable Control 153 * | | |0 = Interrupt Disabled. 154 * | | |1 = Interrupt Enabled. 155 * | | |Note: When data word in receive FIFO is equal or higher than RXTH (I2S_CTL1[19:16]) and the RXTHIF (I2S_STATUS0[10]) bit is set to 1 156 * | | |If RXTHIEN bit is enabled, interrupt occur. 157 * |[8] |TXUDFIEN |Transmit FIFO Underflow Interrupt Enable Control 158 * | | |0 = Interrupt Disabled. 159 * | | |1 = Interrupt Enabled. 160 * | | |Note: Interrupt occur if this bit is set to 1 and TXUDIF (I2S_STATUS0[16]) flag is set to 1. 161 * |[9] |TXOVFIEN |Transmit FIFO Overflow Interrupt Enable Control 162 * | | |0 = Interrupt Disabled. 163 * | | |1 = Interrupt Enabled. 164 * | | |Note: Interrupt occurs if this bit is set to 1 and TXOVIF (I2S_STATUS0[17]) flag is set to 1 165 * |[10] |TXTHIEN |Transmit FIFO Threshold Level Interrupt Enable Control 166 * | | |0 = Interrupt Disabled. 167 * | | |1 = Interrupt Enabled. 168 * | | |Note: Interrupt occurs if this bit is set to 1 and data words in transmit FIFO is less than TXTH (I2S_CTL1[11:8]). 169 * |[16] |CH0ZCIEN |Channel0 Zero-cross Interrupt Enable Control 170 * | | |0 = Interrupt Disabled. 171 * | | |1 = Interrupt Enabled. 172 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel0 zero-cross 173 * | | |Note2: Channel0 also means left audio channel while I2S (FORMAT[2]=0) or 2-channel PCM mode. 174 * |[17] |CH1ZCIEN |Channel1 Zero-cross Interrupt Enable Control 175 * | | |0 = Interrupt Disabled. 176 * | | |1 = Interrupt Enabled. 177 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel1 zero-cross 178 * | | |Note2: Channel1 also means right audio channel while I2S (FORMAT[2]=0) or 2-channel PCM mode. 179 * |[18] |CH2ZCIEN |Channel2 Zero-cross Interrupt Enable Control 180 * | | |0 = Interrupt Disabled. 181 * | | |1 = Interrupt Enabled. 182 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel2 zero-cross 183 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 184 * |[19] |CH3ZCIEN |Channel3 Zero-cross Interrupt Enable Control 185 * | | |0 = Interrupt Disabled. 186 * | | |1 = Interrupt Enabled. 187 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel3 zero-cross 188 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 189 * |[20] |CH4ZCIEN |Channel4 Zero-cross Interrupt Enable Control 190 * | | |0 = Interrupt Disabled. 191 * | | |1 = Interrupt Enabled. 192 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel4 zero-cross 193 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 194 * |[21] |CH5ZCIEN |Channel5 Zero-cross Interrupt Enable Control 195 * | | |0 = Interrupt Disabled. 196 * | | |1 = Interrupt Enabled. 197 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel5 zero-cross 198 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 199 * |[22] |CH6ZCIEN |Channel6 Zero-cross Interrupt Enable Control 200 * | | |0 = Interrupt Disabled. 201 * | | |1 = Interrupt Enabled. 202 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel6 zero-cross 203 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 204 * |[23] |CH7ZCIEN |Channel7 Zero-cross Interrupt Enable Control 205 * | | |0 = Interrupt Disabled. 206 * | | |1 = Interrupt Enabled. 207 * | | |Note1: Interrupt occurs if this bit is set to 1 and channel7 zero-cross 208 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 209 * @var I2S_T::STATUS0 210 * Offset: 0x0C I2S Status Register 0 211 * --------------------------------------------------------------------------------------------------- 212 * |Bits |Field |Descriptions 213 * | :----: | :----: | :---- | 214 * |[0] |I2SINT |I2S Interrupt Flag (Read Only) 215 * | | |0 = No I2S interrupt. 216 * | | |1 = I2S interrupt. 217 * | | |Note: It is wire-OR of I2STXINT and I2SRXINT bits. 218 * |[1] |I2SRXINT |I2S Receive Interrupt (Read Only) 219 * | | |0 = No receive interrupt. 220 * | | |1 = Receive interrupt. 221 * |[2] |I2STXINT |I2S Transmit Interrupt (Read Only) 222 * | | |0 = No transmit interrupt. 223 * | | |1 = Transmit interrupt. 224 * |[5:3] |DATACH |Transmission Data Channel (Read Only) 225 * | | |This bit fields are used to indicate which audio channel is current transmit data belong. 226 * | | |000 = channel0 (means left channel while 2-channel I2S/PCM mode). 227 * | | |001 = channel1 (means right channel while 2-channel I2S/PCM mode). 228 * | | |010 = channel2 (available while 4-channel TDM PCM mode). 229 * | | |011 = channel3 (available while 4-channel TDM PCM mode). 230 * | | |100 = channel4 (available while 6-channel TDM PCM mode). 231 * | | |101 = channel5 (available while 6-channel TDM PCM mode). 232 * | | |110 = channel6 (available while 8-channel TDM PCM mode). 233 * | | |111 = channel7 (available while 8-channel TDM PCM mode). 234 * |[8] |RXUDIF |Receive FIFO Underflow Interrupt Flag 235 * | | |0 = No underflow occur. 236 * | | |1 = Underflow occur. 237 * | | |Note1: When receive FIFO is empty, and software reads the receive FIFO again 238 * | | |This bit will be set to 1, and it indicates underflow situation occurs. 239 * | | |Note2: Write 1 to clear this bit to zero 240 * |[9] |RXOVIF |Receive FIFO Overflow Interrupt Flag 241 * | | |0 = No overflow occur. 242 * | | |1 = Overflow occur. 243 * | | |Note1: When receive FIFO is full and receive hardware attempt to write data into receive FIFO then this bit is set to 1, data in 1st buffer is overwrote. 244 * | | |Note2: Write 1 to clear this bit to 0. 245 * |[10] |RXTHIF |Receive FIFO Threshold Interrupt Flag (Read Only) 246 * | | |0 = Data word(s) in FIFO is not higher than threshold level. 247 * | | |1 = Data word(s) in FIFO is higher than threshold level. 248 * | | |Note: When data word(s) in receive FIFO is higher than threshold value set in RXTH (I2S_CTL1[19:16]) the RXTHIF bit becomes to 1 249 * | | |It keeps at 1 till RXCNT (I2S_STATUS1[20:16]) is not higher than RXTH (I2S_CTL1[19:16]) after software read RXFIFO register. 250 * |[11] |RXFULL |Receive FIFO Full (Read Only) 251 * | | |0 = Not full. 252 * | | |1 = Full. 253 * | | |Note: This bit reflects data words number in receive FIFO is 16. 254 * |[12] |RXEMPTY |Receive FIFO Empty (Read Only) 255 * | | |0 = Not empty. 256 * | | |1 = Empty. 257 * | | |Note: This bit reflects data words number in receive FIFO is zero 258 * |[16] |TXUDIF |Transmit FIFO Underflow Interrupt Flag 259 * | | |0 = No underflow. 260 * | | |1 = Underflow. 261 * | | |Note1: This bit will be set to 1 when shift logic hardware read data from transmitting FIFO and the filling data level in transmitting FIFO is not enough for one audio frame. 262 * | | |Note2: Write 1 to clear this bit to 0. 263 * |[17] |TXOVIF |Transmit FIFO Overflow Interrupt Flag 264 * | | |0 = No overflow. 265 * | | |1 = Overflow. 266 * | | |Note1: Write data to transmit FIFO when it is full and this bit set to 1 267 * | | |Note2: Write 1 to clear this bit to 0. 268 * |[18] |TXTHIF |Transmit FIFO Threshold Interrupt Flag (Read Only) 269 * | | |0 = Data word(s) in FIFO is higher than threshold level. 270 * | | |1 = Data word(s) in FIFO is equal or lower than threshold level. 271 * | | |Note: When data word(s) in transmit FIFO is equal or lower than threshold value set in TXTH (I2S_CTL1[11:8]) the TXTHIF bit becomes to 1 272 * | | |It keeps at 1 till TXCNT (I2S_STATUS1[12:8]) is higher than TXTH (I2S_CTL1[11:8]) after software write TXFIFO register. 273 * |[19] |TXFULL |Transmit FIFO Full (Read Only) 274 * | | |This bit reflect data word number in transmit FIFO is 16 275 * | | |0 = Not full. 276 * | | |1 = Full. 277 * |[20] |TXEMPTY |Transmit FIFO Empty (Read Only) 278 * | | |This bit reflect data word number in transmit FIFO is zero 279 * | | |0 = Not empty. 280 * | | |1 = Empty. 281 * |[21] |TXBUSY |Transmit Busy (Read Only) 282 * | | |0 = Transmit shift buffer is empty. 283 * | | |1 = Transmit shift buffer is busy. 284 * | | |Note: This bit is cleared to 0 when all data in transmit FIFO and shift buffer is shifted out 285 * | | |And set to 1 when 1st data is load to shift buffer 286 * @var I2S_T::TXFIFO 287 * Offset: 0x10 I2S Transmit FIFO Register 288 * --------------------------------------------------------------------------------------------------- 289 * |Bits |Field |Descriptions 290 * | :----: | :----: | :---- | 291 * |[31:0] |TXFIFO |Transmit FIFO Bits 292 * | | |I2S contains 16 words (16x32 bit) data buffer for data transmit 293 * | | |Write data to this register to prepare data for transmit 294 * | | |The remaining word number is indicated by TXCNT (I2S_STATUS1[12:8]). 295 * @var I2S_T::RXFIFO 296 * Offset: 0x14 I2S Receive FIFO Register 297 * --------------------------------------------------------------------------------------------------- 298 * |Bits |Field |Descriptions 299 * | :----: | :----: | :---- | 300 * |[31:0] |RXFIFO |Receive FIFO Bits 301 * | | |I2S contains 16 words (16x32 bit) data buffer for data receive 302 * | | |Read this register to get data in FIFO 303 * | | |The remaining data word number is indicated by RXCNT (I2S_STATUS1[20:16]). 304 * @var I2S_T::CTL1 305 * Offset: 0x20 I2S Control Register 1 306 * --------------------------------------------------------------------------------------------------- 307 * |Bits |Field |Descriptions 308 * | :----: | :----: | :---- | 309 * |[0] |CH0ZCEN |Channel0 Zero-cross Detection Enable Control 310 * | | |0 = channel0 zero-cross detect Disabled. 311 * | | |1 = channel0 zero-cross detect Enabled. 312 * | | |Note1: Channel0 also means left audio channel while I2S (FORMAT[2]=0) or 2-channel PCM mode. 313 * | | |Note2: If this bit is set to 1, when channel0 data sign bit change or next shift data bits are all zero then CH0ZCIF(I2S_STATUS1[0]) flag is set to 1. 314 * | | |Note3: If CH0ZCIF Flag is set to 1, the channel0 will be mute. 315 * |[1] |CH1ZCEN |Channel1 Zero-cross Detect Enable Control 316 * | | |0 = channel1 zero-cross detect Disabled. 317 * | | |1 = channel1 zero-cross detect Enabled. 318 * | | |Note1: Channel1 also means right audio channel while I2S (FORMAT[2]=0) or 2-channel PCM mode. 319 * | | |Note2: If this bit is set to 1, when channel1 data sign bit change or next shift data bits are all zero then CH1ZCIF(I2S_STATUS1[1]) flag is set to 1. 320 * | | |Note3: If CH1ZCIF Flag is set to 1, the channel1 will be mute. 321 * |[2] |CH2ZCEN |Channel2 Zero-cross Detect Enable Control 322 * | | |0 = channel2 zero-cross detect Disabled. 323 * | | |1 = channel2 zero-cross detect Enabled. 324 * | | |Note1: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 325 * | | |Note2: If this bit is set to 1, when channel2 data sign bit change or next shift data bits are all zero then CH2ZCIF(I2S_STATUS1[2]) flag is set to 1. 326 * | | |Note3: If CH2ZCIF Flag is set to 1, the channel2 will be mute. 327 * |[3] |CH3ZCEN |Channel3 Zero-cross Detect Enable Control 328 * | | |0 = channel3 zero-cross detect Disabled. 329 * | | |1 = channel3 zero-cross detect Enabled. 330 * | | |Note1: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 331 * | | |Note2: If this bit is set to 1, when channel3 data sign bit change or next shift data bits are all zero then CH3ZCIF(I2S_STATUS1[3]) flag is set to 1. 332 * | | |Note3: If CH3ZCIF Flag is set to 1, the channel3 will be mute. 333 * |[4] |CH4ZCEN |Channel4 Zero-cross Detect Enable Control 334 * | | |0 = channel4 zero-cross detect Disabled. 335 * | | |1 = channel4 zero-cross detect Enabled. 336 * | | |Note1: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 337 * | | |Note2: If this bit is set to 1, when channel4 data sign bit change or next shift data bits are all zero then CH4ZCIF(I2S_STATUS1[4]) flag is set to 1. 338 * | | |Note3: If CH4ZCIF Flag is set to 1, the channel4 will be mute. 339 * |[5] |CH5ZCEN |Channel5 Zero-cross Detect Enable Control 340 * | | |0 = channel5 zero-cross detect Disabled. 341 * | | |1 = channel5 zero-cross detect Enabled. 342 * | | |Note1: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 343 * | | |Note2: If this bit is set to 1, when channel5 data sign bit change or next shift data bits are all zero then CH5ZCIF(I2S_STATUS1[5]) flag is set to 1. 344 * | | |Note3: If CH5ZCIF Flag is set to 1, the channel5 will be mute. 345 * |[6] |CH6ZCEN |Channel6 Zero-cross Detect Enable Control 346 * | | |0 = channel6 zero-cross detect Disabled. 347 * | | |1 = channel6 zero-cross detect Enabled. 348 * | | |Note1: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 349 * | | |Note2: If this bit is set to 1, when channel6 data sign bit change or next shift data bits are all zero then CH6ZCIF(I2S_STATUS1[6]) flag is set to 1. 350 * | | |Note3: If CH6ZCIF Flag is set to 1, the channel6 will be mute. 351 * |[7] |CH7ZCEN |Channel7 Zero-cross Detect Enable Control 352 * | | |0 = channel7 zero-cross detect Disabled. 353 * | | |1 = channel7 zero-cross detect Enabled. 354 * | | |Note1: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 355 * | | |Note2: If this bit is set to 1, when channel7 data sign bit change or next shift data bits are all zero then CH7ZCIF (I2S_STATUS1[7]) flag is set to 1. 356 * | | |Note3: If CH7ZCIF Flag is set to 1, the channel7 will be mute. 357 * |[11:8] |TXTH |Transmit FIFO Threshold Level 358 * | | |0000 = 0 data word in transmit FIFO. 359 * | | |0001 = 1 data word in transmit FIFO. 360 * | | |0010 = 2 data words in transmit FIFO. 361 * | | |... 362 * | | |1110 = 14 data words in transmit FIFO. 363 * | | |1111 = 15 data words in transmit FIFO. 364 * | | |Note: If remain data word number in transmit FIFO is the same or less than threshold level then TXTHIF (I2S_STATUS0[18]) flag is set. 365 * |[19:16] |RXTH |Receive FIFO Threshold Level 366 * | | |0000 = 1 data word in receive FIFO. 367 * | | |0001 = 2 data words in receive FIFO. 368 * | | |0010 = 3 data words in receive FIFO. 369 * | | |... 370 * | | |1110 = 15 data words in receive FIFO. 371 * | | |1111 = 16 data words in receive FIFO. 372 * | | |Note: When received data word number in receive buffer is greater than threshold level then RXTHIF (I2S_STATUS0[10]) flag is set. 373 * |[24] |PBWIDTH |Peripheral Bus Data Width Selection 374 * | | |This bit is used to choice the available data width of APB bus 375 * | | |It must be set to 1 while PDMA function is enable and it is set to 16-bit transmission mode 376 * | | |0 = 32 bits data width. 377 * | | |1 = 16 bits data width. 378 * | | |Note1: If PBWIDTH=1, the low 16 bits of 32-bit data bus are available. 379 * | | |Note2: If PBWIDTH=1, the transmitting FIFO level will be increased after two FIFO write operations. 380 * | | |Note3: If PBWIDTH=1, the receiving FIFO level will be decreased after two FIFO read operations. 381 * |[25] |PB16ORD |FIFO Read/Write Order in 16-bit Width of Peripheral Bus 382 * | | |When PBWIDTH = 1, the data FIFO will be increased or decreased by two peripheral bus access 383 * | | |This bit is used to select the order of FIFO access operations to meet the 32-bit transmitting/receiving FIFO entries. 384 * | | |0 = Low 16-bit read/write access first. 385 * | | |1 = High 16-bit read/write access first. 386 * | | |Note: This bit is available while PBWIDTH = 1. 387 * @var I2S_T::STATUS1 388 * Offset: 0x24 I2S Status Register 1 389 * --------------------------------------------------------------------------------------------------- 390 * |Bits |Field |Descriptions 391 * | :----: | :----: | :---- | 392 * |[0] |CH0ZCIF |Channel0 Zero-cross Interrupt Flag 393 * | | |It indicates channel0 next sample data sign bit is changed or all data bits are zero. 394 * | | |0 = No zero-cross in channel0. 395 * | | |1 = Channel0 zero-cross is detected. 396 * | | |Note1: Write 1 to clear this bit to 0. 397 * | | |Note2: Channel0 also means left audio channel while I2S (FORMAT[2]=0) or 2-channel PCM mode. 398 * |[1] |CH1ZCIF |Channel1 Zero-cross Interrupt Flag 399 * | | |It indicates channel1 next sample data sign bit is changed or all data bits are zero. 400 * | | |0 = No zero-cross in channel1. 401 * | | |1 = Channel1 zero-cross is detected. 402 * | | |Note1: Write 1 to clear this bit to 0. 403 * | | |Note2: Channel1 also means right audio channel while I2S (FORMAT[2]=0) or 2-channel PCM mode. 404 * |[2] |CH2ZCIF |Channel2 Zero-cross Interrupt Flag 405 * | | |It indicates channel2 next sample data sign bit is changed or all data bits are zero. 406 * | | |0 = No zero-cross in channel2. 407 * | | |1 = Channel2 zero-cross is detected. 408 * | | |Note1: Write 1 to clear this bit to 0. 409 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 410 * |[3] |CH3ZCIF |Channel3 Zero-cross Interrupt Flag 411 * | | |It indicates channel3 next sample data sign bit is changed or all data bits are zero. 412 * | | |0 = No zero-cross in channel3. 413 * | | |1 = Channel3 zero-cross is detected. 414 * | | |Note1: Write 1 to clear this bit to 0. 415 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 416 * |[4] |CH4ZCIF |Channel4 Zero-cross Interrupt Flag 417 * | | |It indicates channel4 next sample data sign bit is changed or all data bits are zero. 418 * | | |0 = No zero-cross in channel4. 419 * | | |1 = Channel4 zero-cross is detected. 420 * | | |Note1: Write 1 to clear this bit to 0. 421 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 422 * |[5] |CH5ZCIF |Channel5 Zero-cross Interrupt Flag 423 * | | |It indicates channel5 next sample data sign bit is changed or all data bits are zero. 424 * | | |0 = No zero-cross in channel5. 425 * | | |1 = Channel5 zero-cross is detected. 426 * | | |Note1: Write 1 to clear this bit to 0. 427 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 428 * |[6] |CH6ZCIF |Channel6 Zero-cross Interrupt Flag 429 * | | |It indicates channel6 next sample data sign bit is changed or all data bits are zero. 430 * | | |0 = No zero-cross in channel6. 431 * | | |1 = Channel6 zero-cross is detected. 432 * | | |Note1: Write 1 to clear this bit to 0. 433 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 434 * |[7] |CH7ZCIF |Channel7 Zero-cross Interrupt Flag 435 * | | |It indicates channel7 next sample data sign bit is changed or all data bits are zero. 436 * | | |0 = No zero-cross in channel7. 437 * | | |1 = Channel7 zero-cross is detected. 438 * | | |Note1: Write 1 to clear this bit to 0. 439 * | | |Note2: This bit is available while multi-channel PCM mode and TDMCHNUM (I2S_CTL0[31:30]) = 0x1, 0x2, 0x3. 440 * |[12:8] |TXCNT |Transmit FIFO Level (Read Only) 441 * | | |These bits indicate the number of available entries in transmit FIFO 442 * | | |00000 = No data. 443 * | | |00001 = 1 word in transmit FIFO. 444 * | | |00010 = 2 words in transmit FIFO. 445 * | | |... 446 * | | |01110 = 14 words in transmit FIFO. 447 * | | |01111 = 15 words in transmit FIFO. 448 * | | |10000 = 16 words in transmit FIFO. 449 * | | |Others are reserved. 450 * |[20:16] |RXCNT |Receive FIFO Level (Read Only) 451 * | | |These bits indicate the number of available entries in receive FIFO 452 * | | |00000 = No data. 453 * | | |00001 = 1 word in receive FIFO. 454 * | | |00010 = 2 words in receive FIFO. 455 * | | |... 456 * | | |01110 = 14 words in receive FIFO. 457 * | | |01111 = 15 words in receive FIFO. 458 * | | |10000 = 16 words in receive FIFO. 459 * | | |Others are reserved. 460 */ 461 __IO uint32_t CTL0; /*!< [0x0000] I2S Control Register 0 */ 462 __IO uint32_t CLKDIV; /*!< [0x0004] I2S Clock Divider Register */ 463 __IO uint32_t IEN; /*!< [0x0008] I2S Interrupt Enable Register */ 464 __IO uint32_t STATUS0; /*!< [0x000c] I2S Status Register 0 */ 465 __O uint32_t TXFIFO; /*!< [0x0010] I2S Transmit FIFO Register */ 466 __I uint32_t RXFIFO; /*!< [0x0014] I2S Receive FIFO Register */ 467 /// @cond HIDDEN_SYMBOLS 468 __I uint32_t RESERVE0[2]; 469 /// @endcond //HIDDEN_SYMBOLS 470 __IO uint32_t CTL1; /*!< [0x0020] I2S Control Register 1 */ 471 __IO uint32_t STATUS1; /*!< [0x0024] I2S Status Register 1 */ 472 473 } I2S_T; 474 475 /** 476 @addtogroup I2S_CONST I2S Bit Field Definition 477 Constant Definitions for I2S Controller 478 @{ */ 479 480 #define I2S_CTL0_I2SEN_Pos (0) /*!< I2S_T::CTL0: I2SEN Position */ 481 #define I2S_CTL0_I2SEN_Msk (0x1ul << I2S_CTL0_I2SEN_Pos) /*!< I2S_T::CTL0: I2SEN Mask */ 482 483 #define I2S_CTL0_TXEN_Pos (1) /*!< I2S_T::CTL0: TXEN Position */ 484 #define I2S_CTL0_TXEN_Msk (0x1ul << I2S_CTL0_TXEN_Pos) /*!< I2S_T::CTL0: TXEN Mask */ 485 486 #define I2S_CTL0_RXEN_Pos (2) /*!< I2S_T::CTL0: RXEN Position */ 487 #define I2S_CTL0_RXEN_Msk (0x1ul << I2S_CTL0_RXEN_Pos) /*!< I2S_T::CTL0: RXEN Mask */ 488 489 #define I2S_CTL0_MUTE_Pos (3) /*!< I2S_T::CTL0: MUTE Position */ 490 #define I2S_CTL0_MUTE_Msk (0x1ul << I2S_CTL0_MUTE_Pos) /*!< I2S_T::CTL0: MUTE Mask */ 491 492 #define I2S_CTL0_DATWIDTH_Pos (4) /*!< I2S_T::CTL0: DATWIDTH Position */ 493 #define I2S_CTL0_DATWIDTH_Msk (0x3ul << I2S_CTL0_DATWIDTH_Pos) /*!< I2S_T::CTL0: DATWIDTH Mask */ 494 495 #define I2S_CTL0_MONO_Pos (6) /*!< I2S_T::CTL0: MONO Position */ 496 #define I2S_CTL0_MONO_Msk (0x1ul << I2S_CTL0_MONO_Pos) /*!< I2S_T::CTL0: MONO Mask */ 497 498 #define I2S_CTL0_ORDER_Pos (7) /*!< I2S_T::CTL0: ORDER Position */ 499 #define I2S_CTL0_ORDER_Msk (0x1ul << I2S_CTL0_ORDER_Pos) /*!< I2S_T::CTL0: ORDER Mask */ 500 501 #define I2S_CTL0_SLAVE_Pos (8) /*!< I2S_T::CTL0: SLAVE Position */ 502 #define I2S_CTL0_SLAVE_Msk (0x1ul << I2S_CTL0_SLAVE_Pos) /*!< I2S_T::CTL0: SLAVE Mask */ 503 504 #define I2S_CTL0_MCLKEN_Pos (15) /*!< I2S_T::CTL0: MCLKEN Position */ 505 #define I2S_CTL0_MCLKEN_Msk (0x1ul << I2S_CTL0_MCLKEN_Pos) /*!< I2S_T::CTL0: MCLKEN Mask */ 506 507 #define I2S_CTL0_TXFBCLR_Pos (18) /*!< I2S_T::CTL0: TXFBCLR Position */ 508 #define I2S_CTL0_TXFBCLR_Msk (0x1ul << I2S_CTL0_TXFBCLR_Pos) /*!< I2S_T::CTL0: TXFBCLR Mask */ 509 510 #define I2S_CTL0_RXFBCLR_Pos (19) /*!< I2S_T::CTL0: RXFBCLR Position */ 511 #define I2S_CTL0_RXFBCLR_Msk (0x1ul << I2S_CTL0_RXFBCLR_Pos) /*!< I2S_T::CTL0: RXFBCLR Mask */ 512 513 #define I2S_CTL0_TXPDMAEN_Pos (20) /*!< I2S_T::CTL0: TXPDMAEN Position */ 514 #define I2S_CTL0_TXPDMAEN_Msk (0x1ul << I2S_CTL0_TXPDMAEN_Pos) /*!< I2S_T::CTL0: TXPDMAEN Mask */ 515 516 #define I2S_CTL0_RXPDMAEN_Pos (21) /*!< I2S_T::CTL0: RXPDMAEN Position */ 517 #define I2S_CTL0_RXPDMAEN_Msk (0x1ul << I2S_CTL0_RXPDMAEN_Pos) /*!< I2S_T::CTL0: RXPDMAEN Mask */ 518 519 #define I2S_CTL0_RXLCH_Pos (23) /*!< I2S_T::CTL0: RXLCH Position */ 520 #define I2S_CTL0_RXLCH_Msk (0x1ul << I2S_CTL0_RXLCH_Pos) /*!< I2S_T::CTL0: RXLCH Mask */ 521 522 #define I2S_CTL0_FORMAT_Pos (24) /*!< I2S_T::CTL0: FORMAT Position */ 523 #define I2S_CTL0_FORMAT_Msk (0x7ul << I2S_CTL0_FORMAT_Pos) /*!< I2S_T::CTL0: FORMAT Mask */ 524 525 #define I2S_CTL0_PCMSYNC_Pos (27) /*!< I2S_T::CTL0: PCMSYNC Position */ 526 #define I2S_CTL0_PCMSYNC_Msk (0x1ul << I2S_CTL0_PCMSYNC_Pos) /*!< I2S_T::CTL0: PCMSYNC Mask */ 527 528 #define I2S_CTL0_CHWIDTH_Pos (28) /*!< I2S_T::CTL0: CHWIDTH Position */ 529 #define I2S_CTL0_CHWIDTH_Msk (0x3ul << I2S_CTL0_CHWIDTH_Pos) /*!< I2S_T::CTL0: CHWIDTH Mask */ 530 531 #define I2S_CTL0_TDMCHNUM_Pos (30) /*!< I2S_T::CTL0: TDMCHNUM Position */ 532 #define I2S_CTL0_TDMCHNUM_Msk (0x3ul << I2S_CTL0_TDMCHNUM_Pos) /*!< I2S_T::CTL0: TDMCHNUM Mask */ 533 534 #define I2S_CLKDIV_MCLKDIV_Pos (0) /*!< I2S_T::CLKDIV: MCLKDIV Position */ 535 #define I2S_CLKDIV_MCLKDIV_Msk (0x3ful << I2S_CLKDIV_MCLKDIV_Pos) /*!< I2S_T::CLKDIV: MCLKDIV Mask */ 536 537 #define I2S_CLKDIV_BCLKDIV_Pos (8) /*!< I2S_T::CLKDIV: BCLKDIV Position */ 538 #define I2S_CLKDIV_BCLKDIV_Msk (0x1fful << I2S_CLKDIV_BCLKDIV_Pos) /*!< I2S_T::CLKDIV: BCLKDIV Mask */ 539 540 #define I2S_IEN_RXUDFIEN_Pos (0) /*!< I2S_T::IEN: RXUDFIEN Position */ 541 #define I2S_IEN_RXUDFIEN_Msk (0x1ul << I2S_IEN_RXUDFIEN_Pos) /*!< I2S_T::IEN: RXUDFIEN Mask */ 542 543 #define I2S_IEN_RXOVFIEN_Pos (1) /*!< I2S_T::IEN: RXOVFIEN Position */ 544 #define I2S_IEN_RXOVFIEN_Msk (0x1ul << I2S_IEN_RXOVFIEN_Pos) /*!< I2S_T::IEN: RXOVFIEN Mask */ 545 546 #define I2S_IEN_RXTHIEN_Pos (2) /*!< I2S_T::IEN: RXTHIEN Position */ 547 #define I2S_IEN_RXTHIEN_Msk (0x1ul << I2S_IEN_RXTHIEN_Pos) /*!< I2S_T::IEN: RXTHIEN Mask */ 548 549 #define I2S_IEN_TXUDFIEN_Pos (8) /*!< I2S_T::IEN: TXUDFIEN Position */ 550 #define I2S_IEN_TXUDFIEN_Msk (0x1ul << I2S_IEN_TXUDFIEN_Pos) /*!< I2S_T::IEN: TXUDFIEN Mask */ 551 552 #define I2S_IEN_TXOVFIEN_Pos (9) /*!< I2S_T::IEN: TXOVFIEN Position */ 553 #define I2S_IEN_TXOVFIEN_Msk (0x1ul << I2S_IEN_TXOVFIEN_Pos) /*!< I2S_T::IEN: TXOVFIEN Mask */ 554 555 #define I2S_IEN_TXTHIEN_Pos (10) /*!< I2S_T::IEN: TXTHIEN Position */ 556 #define I2S_IEN_TXTHIEN_Msk (0x1ul << I2S_IEN_TXTHIEN_Pos) /*!< I2S_T::IEN: TXTHIEN Mask */ 557 558 #define I2S_IEN_CH0ZCIEN_Pos (16) /*!< I2S_T::IEN: CH0ZCIEN Position */ 559 #define I2S_IEN_CH0ZCIEN_Msk (0x1ul << I2S_IEN_CH0ZCIEN_Pos) /*!< I2S_T::IEN: CH0ZCIEN Mask */ 560 561 #define I2S_IEN_CH1ZCIEN_Pos (17) /*!< I2S_T::IEN: CH1ZCIEN Position */ 562 #define I2S_IEN_CH1ZCIEN_Msk (0x1ul << I2S_IEN_CH1ZCIEN_Pos) /*!< I2S_T::IEN: CH1ZCIEN Mask */ 563 564 #define I2S_IEN_CH2ZCIEN_Pos (18) /*!< I2S_T::IEN: CH2ZCIEN Position */ 565 #define I2S_IEN_CH2ZCIEN_Msk (0x1ul << I2S_IEN_CH2ZCIEN_Pos) /*!< I2S_T::IEN: CH2ZCIEN Mask */ 566 567 #define I2S_IEN_CH3ZCIEN_Pos (19) /*!< I2S_T::IEN: CH3ZCIEN Position */ 568 #define I2S_IEN_CH3ZCIEN_Msk (0x1ul << I2S_IEN_CH3ZCIEN_Pos) /*!< I2S_T::IEN: CH3ZCIEN Mask */ 569 570 #define I2S_IEN_CH4ZCIEN_Pos (20) /*!< I2S_T::IEN: CH4ZCIEN Position */ 571 #define I2S_IEN_CH4ZCIEN_Msk (0x1ul << I2S_IEN_CH4ZCIEN_Pos) /*!< I2S_T::IEN: CH4ZCIEN Mask */ 572 573 #define I2S_IEN_CH5ZCIEN_Pos (21) /*!< I2S_T::IEN: CH5ZCIEN Position */ 574 #define I2S_IEN_CH5ZCIEN_Msk (0x1ul << I2S_IEN_CH5ZCIEN_Pos) /*!< I2S_T::IEN: CH5ZCIEN Mask */ 575 576 #define I2S_IEN_CH6ZCIEN_Pos (22) /*!< I2S_T::IEN: CH6ZCIEN Position */ 577 #define I2S_IEN_CH6ZCIEN_Msk (0x1ul << I2S_IEN_CH6ZCIEN_Pos) /*!< I2S_T::IEN: CH6ZCIEN Mask */ 578 579 #define I2S_IEN_CH7ZCIEN_Pos (23) /*!< I2S_T::IEN: CH7ZCIEN Position */ 580 #define I2S_IEN_CH7ZCIEN_Msk (0x1ul << I2S_IEN_CH7ZCIEN_Pos) /*!< I2S_T::IEN: CH7ZCIEN Mask */ 581 582 #define I2S_STATUS0_I2SINT_Pos (0) /*!< I2S_T::STATUS0: I2SINT Position */ 583 #define I2S_STATUS0_I2SINT_Msk (0x1ul << I2S_STATUS0_I2SINT_Pos) /*!< I2S_T::STATUS0: I2SINT Mask */ 584 585 #define I2S_STATUS0_I2SRXINT_Pos (1) /*!< I2S_T::STATUS0: I2SRXINT Position */ 586 #define I2S_STATUS0_I2SRXINT_Msk (0x1ul << I2S_STATUS0_I2SRXINT_Pos) /*!< I2S_T::STATUS0: I2SRXINT Mask */ 587 588 #define I2S_STATUS0_I2STXINT_Pos (2) /*!< I2S_T::STATUS0: I2STXINT Position */ 589 #define I2S_STATUS0_I2STXINT_Msk (0x1ul << I2S_STATUS0_I2STXINT_Pos) /*!< I2S_T::STATUS0: I2STXINT Mask */ 590 591 #define I2S_STATUS0_DATACH_Pos (3) /*!< I2S_T::STATUS0: DATACH Position */ 592 #define I2S_STATUS0_DATACH_Msk (0x7ul << I2S_STATUS0_DATACH_Pos) /*!< I2S_T::STATUS0: DATACH Mask */ 593 594 #define I2S_STATUS0_RXUDIF_Pos (8) /*!< I2S_T::STATUS0: RXUDIF Position */ 595 #define I2S_STATUS0_RXUDIF_Msk (0x1ul << I2S_STATUS0_RXUDIF_Pos) /*!< I2S_T::STATUS0: RXUDIF Mask */ 596 597 #define I2S_STATUS0_RXOVIF_Pos (9) /*!< I2S_T::STATUS0: RXOVIF Position */ 598 #define I2S_STATUS0_RXOVIF_Msk (0x1ul << I2S_STATUS0_RXOVIF_Pos) /*!< I2S_T::STATUS0: RXOVIF Mask */ 599 600 #define I2S_STATUS0_RXTHIF_Pos (10) /*!< I2S_T::STATUS0: RXTHIF Position */ 601 #define I2S_STATUS0_RXTHIF_Msk (0x1ul << I2S_STATUS0_RXTHIF_Pos) /*!< I2S_T::STATUS0: RXTHIF Mask */ 602 603 #define I2S_STATUS0_RXFULL_Pos (11) /*!< I2S_T::STATUS0: RXFULL Position */ 604 #define I2S_STATUS0_RXFULL_Msk (0x1ul << I2S_STATUS0_RXFULL_Pos) /*!< I2S_T::STATUS0: RXFULL Mask */ 605 606 #define I2S_STATUS0_RXEMPTY_Pos (12) /*!< I2S_T::STATUS0: RXEMPTY Position */ 607 #define I2S_STATUS0_RXEMPTY_Msk (0x1ul << I2S_STATUS0_RXEMPTY_Pos) /*!< I2S_T::STATUS0: RXEMPTY Mask */ 608 609 #define I2S_STATUS0_TXUDIF_Pos (16) /*!< I2S_T::STATUS0: TXUDIF Position */ 610 #define I2S_STATUS0_TXUDIF_Msk (0x1ul << I2S_STATUS0_TXUDIF_Pos) /*!< I2S_T::STATUS0: TXUDIF Mask */ 611 612 #define I2S_STATUS0_TXOVIF_Pos (17) /*!< I2S_T::STATUS0: TXOVIF Position */ 613 #define I2S_STATUS0_TXOVIF_Msk (0x1ul << I2S_STATUS0_TXOVIF_Pos) /*!< I2S_T::STATUS0: TXOVIF Mask */ 614 615 #define I2S_STATUS0_TXTHIF_Pos (18) /*!< I2S_T::STATUS0: TXTHIF Position */ 616 #define I2S_STATUS0_TXTHIF_Msk (0x1ul << I2S_STATUS0_TXTHIF_Pos) /*!< I2S_T::STATUS0: TXTHIF Mask */ 617 618 #define I2S_STATUS0_TXFULL_Pos (19) /*!< I2S_T::STATUS0: TXFULL Position */ 619 #define I2S_STATUS0_TXFULL_Msk (0x1ul << I2S_STATUS0_TXFULL_Pos) /*!< I2S_T::STATUS0: TXFULL Mask */ 620 621 #define I2S_STATUS0_TXEMPTY_Pos (20) /*!< I2S_T::STATUS0: TXEMPTY Position */ 622 #define I2S_STATUS0_TXEMPTY_Msk (0x1ul << I2S_STATUS0_TXEMPTY_Pos) /*!< I2S_T::STATUS0: TXEMPTY Mask */ 623 624 #define I2S_STATUS0_TXBUSY_Pos (21) /*!< I2S_T::STATUS0: TXBUSY Position */ 625 #define I2S_STATUS0_TXBUSY_Msk (0x1ul << I2S_STATUS0_TXBUSY_Pos) /*!< I2S_T::STATUS0: TXBUSY Mask */ 626 627 #define I2S_TXFIFO_TXFIFO_Pos (0) /*!< I2S_T::TXFIFO: TXFIFO Position */ 628 #define I2S_TXFIFO_TXFIFO_Msk (0xfffffffful << I2S_TXFIFO_TXFIFO_Pos) /*!< I2S_T::TXFIFO: TXFIFO Mask */ 629 630 #define I2S_RXFIFO_RXFIFO_Pos (0) /*!< I2S_T::RXFIFO: RXFIFO Position */ 631 #define I2S_RXFIFO_RXFIFO_Msk (0xfffffffful << I2S_RXFIFO_RXFIFO_Pos) /*!< I2S_T::RXFIFO: RXFIFO Mask */ 632 633 #define I2S_CTL1_CH0ZCEN_Pos (0) /*!< I2S_T::CTL1: CH0ZCEN Position */ 634 #define I2S_CTL1_CH0ZCEN_Msk (0x1ul << I2S_CTL1_CH0ZCEN_Pos) /*!< I2S_T::CTL1: CH0ZCEN Mask */ 635 636 #define I2S_CTL1_CH1ZCEN_Pos (1) /*!< I2S_T::CTL1: CH1ZCEN Position */ 637 #define I2S_CTL1_CH1ZCEN_Msk (0x1ul << I2S_CTL1_CH1ZCEN_Pos) /*!< I2S_T::CTL1: CH1ZCEN Mask */ 638 639 #define I2S_CTL1_CH2ZCEN_Pos (2) /*!< I2S_T::CTL1: CH2ZCEN Position */ 640 #define I2S_CTL1_CH2ZCEN_Msk (0x1ul << I2S_CTL1_CH2ZCEN_Pos) /*!< I2S_T::CTL1: CH2ZCEN Mask */ 641 642 #define I2S_CTL1_CH3ZCEN_Pos (3) /*!< I2S_T::CTL1: CH3ZCEN Position */ 643 #define I2S_CTL1_CH3ZCEN_Msk (0x1ul << I2S_CTL1_CH3ZCEN_Pos) /*!< I2S_T::CTL1: CH3ZCEN Mask */ 644 645 #define I2S_CTL1_CH4ZCEN_Pos (4) /*!< I2S_T::CTL1: CH4ZCEN Position */ 646 #define I2S_CTL1_CH4ZCEN_Msk (0x1ul << I2S_CTL1_CH4ZCEN_Pos) /*!< I2S_T::CTL1: CH4ZCEN Mask */ 647 648 #define I2S_CTL1_CH5ZCEN_Pos (5) /*!< I2S_T::CTL1: CH5ZCEN Position */ 649 #define I2S_CTL1_CH5ZCEN_Msk (0x1ul << I2S_CTL1_CH5ZCEN_Pos) /*!< I2S_T::CTL1: CH5ZCEN Mask */ 650 651 #define I2S_CTL1_CH6ZCEN_Pos (6) /*!< I2S_T::CTL1: CH6ZCEN Position */ 652 #define I2S_CTL1_CH6ZCEN_Msk (0x1ul << I2S_CTL1_CH6ZCEN_Pos) /*!< I2S_T::CTL1: CH6ZCEN Mask */ 653 654 #define I2S_CTL1_CH7ZCEN_Pos (7) /*!< I2S_T::CTL1: CH7ZCEN Position */ 655 #define I2S_CTL1_CH7ZCEN_Msk (0x1ul << I2S_CTL1_CH7ZCEN_Pos) /*!< I2S_T::CTL1: CH7ZCEN Mask */ 656 657 #define I2S_CTL1_TXTH_Pos (8) /*!< I2S_T::CTL1: TXTH Position */ 658 #define I2S_CTL1_TXTH_Msk (0xful << I2S_CTL1_TXTH_Pos) /*!< I2S_T::CTL1: TXTH Mask */ 659 660 #define I2S_CTL1_RXTH_Pos (16) /*!< I2S_T::CTL1: RXTH Position */ 661 #define I2S_CTL1_RXTH_Msk (0xful << I2S_CTL1_RXTH_Pos) /*!< I2S_T::CTL1: RXTH Mask */ 662 663 #define I2S_CTL1_PBWIDTH_Pos (24) /*!< I2S_T::CTL1: PBWIDTH Position */ 664 #define I2S_CTL1_PBWIDTH_Msk (0x1ul << I2S_CTL1_PBWIDTH_Pos) /*!< I2S_T::CTL1: PBWIDTH Mask */ 665 666 #define I2S_CTL1_PB16ORD_Pos (25) /*!< I2S_T::CTL1: PB16ORD Position */ 667 #define I2S_CTL1_PB16ORD_Msk (0x1ul << I2S_CTL1_PB16ORD_Pos) /*!< I2S_T::CTL1: PB16ORD Mask */ 668 669 #define I2S_STATUS1_CH0ZCIF_Pos (0) /*!< I2S_T::STATUS1: CH0ZCIF Position */ 670 #define I2S_STATUS1_CH0ZCIF_Msk (0x1ul << I2S_STATUS1_CH0ZCIF_Pos) /*!< I2S_T::STATUS1: CH0ZCIF Mask */ 671 672 #define I2S_STATUS1_CH1ZCIF_Pos (1) /*!< I2S_T::STATUS1: CH1ZCIF Position */ 673 #define I2S_STATUS1_CH1ZCIF_Msk (0x1ul << I2S_STATUS1_CH1ZCIF_Pos) /*!< I2S_T::STATUS1: CH1ZCIF Mask */ 674 675 #define I2S_STATUS1_CH2ZCIF_Pos (2) /*!< I2S_T::STATUS1: CH2ZCIF Position */ 676 #define I2S_STATUS1_CH2ZCIF_Msk (0x1ul << I2S_STATUS1_CH2ZCIF_Pos) /*!< I2S_T::STATUS1: CH2ZCIF Mask */ 677 678 #define I2S_STATUS1_CH3ZCIF_Pos (3) /*!< I2S_T::STATUS1: CH3ZCIF Position */ 679 #define I2S_STATUS1_CH3ZCIF_Msk (0x1ul << I2S_STATUS1_CH3ZCIF_Pos) /*!< I2S_T::STATUS1: CH3ZCIF Mask */ 680 681 #define I2S_STATUS1_CH4ZCIF_Pos (4) /*!< I2S_T::STATUS1: CH4ZCIF Position */ 682 #define I2S_STATUS1_CH4ZCIF_Msk (0x1ul << I2S_STATUS1_CH4ZCIF_Pos) /*!< I2S_T::STATUS1: CH4ZCIF Mask */ 683 684 #define I2S_STATUS1_CH5ZCIF_Pos (5) /*!< I2S_T::STATUS1: CH5ZCIF Position */ 685 #define I2S_STATUS1_CH5ZCIF_Msk (0x1ul << I2S_STATUS1_CH5ZCIF_Pos) /*!< I2S_T::STATUS1: CH5ZCIF Mask */ 686 687 #define I2S_STATUS1_CH6ZCIF_Pos (6) /*!< I2S_T::STATUS1: CH6ZCIF Position */ 688 #define I2S_STATUS1_CH6ZCIF_Msk (0x1ul << I2S_STATUS1_CH6ZCIF_Pos) /*!< I2S_T::STATUS1: CH6ZCIF Mask */ 689 690 #define I2S_STATUS1_CH7ZCIF_Pos (7) /*!< I2S_T::STATUS1: CH7ZCIF Position */ 691 #define I2S_STATUS1_CH7ZCIF_Msk (0x1ul << I2S_STATUS1_CH7ZCIF_Pos) /*!< I2S_T::STATUS1: CH7ZCIF Mask */ 692 693 #define I2S_STATUS1_TXCNT_Pos (8) /*!< I2S_T::STATUS1: TXCNT Position */ 694 #define I2S_STATUS1_TXCNT_Msk (0x1ful << I2S_STATUS1_TXCNT_Pos) /*!< I2S_T::STATUS1: TXCNT Mask */ 695 696 #define I2S_STATUS1_RXCNT_Pos (16) /*!< I2S_T::STATUS1: RXCNT Position */ 697 #define I2S_STATUS1_RXCNT_Msk (0x1ful << I2S_STATUS1_RXCNT_Pos) /*!< I2S_T::STATUS1: RXCNT Mask */ 698 699 /**@}*/ /* I2S_CONST */ 700 /**@}*/ /* end of I2S register group */ 701 /**@}*/ /* end of REGISTER group */ 702 703 #if defined ( __CC_ARM ) 704 #pragma no_anon_unions 705 #endif 706 707 #endif /* __I2S_REG_H__ */ 708