NXP's driver library for LPC17xx, ported to mbed's online compiler. Not tested! I had to fix a lot of warings and found a couple of pretty obvious bugs, so the chances are there are more. Original: http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

lpc17xx_i2s.c File Reference

lpc17xx_i2s.c File Reference

: Contains all functions support for I2S firmware library on LPC17xx More...

Go to the source code of this file.

Functions

uint8_t I2S_GetWordWidth (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode)
 Get I2S wordwidth value.
uint8_t I2S_GetChannel (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode)
 Get I2S channel value.
void I2S_Init (LPC_I2S_TypeDef *I2Sx)
 Initialize I2S

  • Turn on power and clock
  • Setup I2S pin select.

void I2S_Config (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode, I2S_CFG_Type *ConfigStruct)
 Configuration I2S, setting:

  • master/slave mode
  • wordwidth value
  • channel mode.

void I2S_DeInit (LPC_I2S_TypeDef *I2Sx)
 DeInitial both I2S transmit or receive.
uint8_t I2S_GetLevel (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode)
 Get I2S Buffer Level.
void I2S_Start (LPC_I2S_TypeDef *I2Sx)
 I2S Start: clear all STOP,RESET and MUTE bit, ready to operate.
void I2S_Send (LPC_I2S_TypeDef *I2Sx, uint32_t BufferData)
 I2S Send data.
uint32_t I2S_Receive (LPC_I2S_TypeDef *I2Sx)
 I2S Receive Data.
void I2S_Pause (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode)
 I2S Pause.
void I2S_Mute (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode)
 I2S Mute.
void I2S_Stop (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode)
 I2S Stop.
Status I2S_FreqConfig (LPC_I2S_TypeDef *I2Sx, uint32_t Freq, uint8_t TRMode)
 Set frequency for I2S.
void I2S_SetBitRate (LPC_I2S_TypeDef *I2Sx, uint8_t bitrate, uint8_t TRMode)
 I2S set bitrate.
void I2S_ModeConfig (LPC_I2S_TypeDef *I2Sx, I2S_MODEConf_Type *ModeConfig, uint8_t TRMode)
 Configuration operating mode for I2S.
void I2S_DMAConfig (LPC_I2S_TypeDef *I2Sx, I2S_DMAConf_Type *DMAConfig, uint8_t TRMode)
 Configure DMA operation for I2S.
void I2S_DMACmd (LPC_I2S_TypeDef *I2Sx, uint8_t DMAIndex, uint8_t TRMode, FunctionalState NewState)
 Enable/Disable DMA operation for I2S.
void I2S_IRQConfig (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode, uint8_t level, fnI2SCbs_Type *pfnI2SCbs)
 Configure IRQ for I2S.
void I2S_IRQCmd (LPC_I2S_TypeDef *I2Sx, uint8_t TRMode, FunctionalState NewState)
 Enable/Disable IRQ for I2S.
void I2S_IntHandler (void)
 Standard I2S interrupt handler, this function will check all interrupt status of I2S channels, then execute the call back function if they're already installed.

Detailed Description

: Contains all functions support for I2S firmware library on LPC17xx

Version:
: 1.0
Date:
: 13. May. 2009
Author:
: NguyenCao

Software that is described herein is for illustrative purposes only which provides customers with programming information regarding the products. This software is supplied "AS IS" without any warranties. NXP Semiconductors assumes no responsibility or liability for the use of the software, conveys no license or title under any patent, copyright, or mask work right to the product. NXP Semiconductors reserves the right to make changes in the software without notification. NXP Semiconductors also make no representation or warranty that such application will be suitable for the specified use without further testing or modification.

Definition in file lpc17xx_i2s.c.