Browse Source

add some more audio defs

teensy4-core
Frank 6 years ago
parent
commit
52161d7dad
No account linked to committer's email address
1 changed files with 37 additions and 0 deletions
  1. +37
    -0
      teensy4/imxrt.h

+ 37
- 0
teensy4/imxrt.h View File

@@ -6575,6 +6575,43 @@ typedef struct {
#define I2S3_RFR3 (IMXRT_I2S3.offset0CC)
#define I2S3_RMR (IMXRT_I2S3.offset0E0)

#define I2S_RCR1_RFW(n) ((uint32_t)n & 0x1f) // Receive FIFO watermark
#define I2S_RCR2_DIV(n) ((uint32_t)n & 0xff) // Bit clock divide by (DIV+1)*2
#define I2S_RCR2_BCD ((uint32_t)1<<24) // Bit clock direction
#define I2S_RCR2_MSEL(n) ((uint32_t)(n & 3)<<26) // MCLK select, 0=bus clock, 1=I2S0_MCLK
#define I2S_RCR2_SYNC(n) ((uint32_t)(n & 3)<<30) // 0=async 1=sync with trasmitter
#define I2S_RCR3_RCE ((uint32_t)0x10000) // receive channel enable
#define I2S_RCR4_FSD ((uint32_t)1) // Frame Sync Direction
#define I2S_RCR4_FSE ((uint32_t)8) // Frame Sync Early
#define I2S_RCR4_MF ((uint32_t)0x10) // MSB First
#define I2S_RCR4_SYWD(n) ((uint32_t)(n & 0x1f)<<8) // Sync Width
#define I2S_RCR4_FRSZ(n) ((uint32_t)(n & 0x0f)<<16) // Frame Size
#define I2S_RCR5_FBT(n) ((uint32_t)(n & 0x1f)<<8) // First Bit Shifted
#define I2S_RCR5_W0W(n) ((uint32_t)(n & 0x1f)<<16) // Word 0 Width
#define I2S_RCR5_WNW(n) ((uint32_t)(n & 0x1f)<<24) // Word N Width
#define I2S_RCSR_RE ((uint32_t)0x80000000) // Receiver Enable
#define I2S_RCSR_FR ((uint32_t)0x02000000) // FIFO Reset
#define I2S_RCSR_FRDE ((uint32_t)0x00000001) // FIFO Request DMA Enable
#define I2S_RCSR_BCE ((uint32_t)0x10000000) // Bit Clock Enable
#define I2S_TCR1_RFW(n) ((uint32_t)n & 0x1f) // Receive FIFO watermark
#define I2S_TCR2_DIV(n) ((uint32_t)n & 0xff) // Bit clock divide by (DIV+1)*2
#define I2S_TCR2_BCD ((uint32_t)1<<24) // Bit clock direction
#define I2S_TCR2_MSEL(n) ((uint32_t)(n & 3)<<26) // MCLK select, 0=bus clock, 1=I2S0_MCLK
#define I2S_TCR2_SYNC(n) ((uint32_t)(n & 3)<<30) // 0=async 1=sync with receiver
#define I2S_TCR3_TCE ((uint32_t)0x10000) // receive channel enable
#define I2S_TCR4_FSD ((uint32_t)1) // Frame Sync Direction
#define I2S_TCR4_FSE ((uint32_t)8) // Frame Sync Early
#define I2S_TCR4_MF ((uint32_t)0x10) // MSB First
#define I2S_TCR4_SYWD(n) ((uint32_t)(n & 0x1f)<<8) // Sync Width
#define I2S_TCR4_FRSZ(n) ((uint32_t)(n & 0x0f)<<16) // Frame Size
#define I2S_TCR5_FBT(n) ((uint32_t)(n & 0x1f)<<8) // First Bit Shifted
#define I2S_TCR5_W0W(n) ((uint32_t)(n & 0x1f)<<16) // Word 0 Width
#define I2S_TCR5_WNW(n) ((uint32_t)(n & 0x1f)<<24) // Word N Width
#define I2S_TCSR_TE ((uint32_t)0x80000000) // Receiver Enable
#define I2S_TCSR_BCE ((uint32_t)0x10000000) // Bit Clock Enable
#define I2S_TCSR_FR ((uint32_t)0x02000000) // FIFO Reset
#define I2S_TCSR_FRDE ((uint32_t)0x00000001) // FIFO Request DMA Enable

// 49.3.1.1: page 2784
#define IMXRT_SEMC (*(IMXRT_REGISTER32_t *)0x402F0000)
#define SEMC_MCR (IMXRT_SEMC.offset000)

Loading…
Cancel
Save