MIOS32_I2S


Defines

#define MIOS32_I2S_PERIPHERAL_FRQ   (MIOS32_SYS_CPU_FREQUENCY)
#define MIOS32_I2S_DIV2   1
#define MIOS32_I2S_CLK_INIT   { MIOS32_SYS_LPC_PINSEL(2, 11, 3); }
#define MIOS32_I2S_WS_INIT   { MIOS32_SYS_LPC_PINSEL(2, 12, 3); }
#define MIOS32_I2S_SDA_INIT   { MIOS32_SYS_LPC_PINSEL(2, 13, 3); }
#define MIOS32_I2S_MCLK_INIT   { MIOS32_SYS_LPC_PINSEL(4, 29, 1); }
#define MIOS32_I2S_DMA_REQ   5
#define MIOS32_I2S_DMA_CHN   5
#define MIOS32_I2S_WS_PIN   GPIO_Pin_12;
#define MIOS32_I2S_WS_PORT   GPIOB
#define MIOS32_I2S_CK_PIN   GPIO_Pin_13;
#define MIOS32_I2S_CK_PORT   GPIOB
#define MIOS32_I2S_SD_PIN   GPIO_Pin_15;
#define MIOS32_I2S_SD_PORT   GPIOB
#define MIOS32_I2S_MCLK_PIN   GPIO_Pin_6;
#define MIOS32_I2S_MCLK_PORT   GPIOC

Functions

s32 MIOS32_I2S_Init (u32 mode)
s32 MIOS32_I2S_Start (u32 *buffer, u16 len, void *_callback)
s32 MIOS32_I2S_Stop (void)
void DMA1_Channel5_IRQHandler (void)

Detailed Description

I2S Functions

Define Documentation

#define MIOS32_I2S_CK_PIN   GPIO_Pin_13;

#define MIOS32_I2S_CK_PORT   GPIOB

#define MIOS32_I2S_CLK_INIT   { MIOS32_SYS_LPC_PINSEL(2, 11, 3); }

#define MIOS32_I2S_DIV2   1

#define MIOS32_I2S_DMA_CHN   5

#define MIOS32_I2S_DMA_REQ   5

#define MIOS32_I2S_MCLK_INIT   { MIOS32_SYS_LPC_PINSEL(4, 29, 1); }

#define MIOS32_I2S_MCLK_PIN   GPIO_Pin_6;

#define MIOS32_I2S_MCLK_PORT   GPIOC

#define MIOS32_I2S_PERIPHERAL_FRQ   (MIOS32_SYS_CPU_FREQUENCY)

#define MIOS32_I2S_SD_PIN   GPIO_Pin_15;

#define MIOS32_I2S_SD_PORT   GPIOB

#define MIOS32_I2S_SDA_INIT   { MIOS32_SYS_LPC_PINSEL(2, 13, 3); }

#define MIOS32_I2S_WS_INIT   { MIOS32_SYS_LPC_PINSEL(2, 12, 3); }

#define MIOS32_I2S_WS_PIN   GPIO_Pin_12;

#define MIOS32_I2S_WS_PORT   GPIOB


Function Documentation

void DMA1_Channel5_IRQHandler ( void   ) 

DMA1 Channel interrupt is triggered on HT and TC interrupts

Note:
shouldn't be called directly from application

s32 MIOS32_I2S_Init ( u32  mode  ) 

Initializes I2S interface

Parameters:
[in] mode currently only mode 0 supported
Returns:
< 0 if initialisation failed

s32 MIOS32_I2S_Start ( u32 buffer,
u16  len,
void *  _callback 
)

Starts DMA driven I2S transfers

Parameters:
[in] *buffer pointer to sample buffer (contains L/R halfword)
[in] len size of audio buffer
[in] _callback callback function:
   void callback(u32 state)
called when the lower (state == 0) or upper (state == 1) range of the sample buffer has been transfered, so that it can be updated
Returns:
< 0 if initialisation failed

s32 MIOS32_I2S_Stop ( void   ) 

Stops DMA driven I2S transfers

Returns:
< 0 if initialisation failed


Generated on Tue May 1 19:42:14 2012 for MIOS32 by  doxygen 1.4.7