The I2S example shows how to configure I2S and UDA1380 to receive audio signal and play back with three modes: polling, interrupt, and DMA.
To use the example, connect a serial cable to the board's RS232/UART port and start a terminal program to monitor the port. The terminal program on the host PC should be setup for 115K8N1. Connect the computer line out to board line-in (using 3.5mm male-to-male cable), plug the headphone/speaker into board line-out. Change modes by selecting the option from the terminal. Play audio on computer and listen from target board!
Build procedure: LPCOpen 18xx/43xx build instructions
Supported boards and board setup:
- Hitex LPC1850EVA-A4-2 and LPC4350EVA-A4-2 boards
- Keil MCB1857 and MCB4357 boards
Submit bug reports for LPCOpen code here.
#define BUFFER_AVAILABLE 2 |
Definition at line 64 of file i2s.c.
Definition at line 63 of file i2s.c.
Definition at line 62 of file i2s.c.
static void App_DMA_Test |
( |
void |
| ) |
|
|
static |
static void App_Interrupt_Test |
( |
void |
| ) |
|
|
static |
static void App_Polling_Test |
( |
void |
| ) |
|
|
static |
void DMA_IRQHandler |
( |
void |
| ) |
|
DMA interrupt handler sub-routine.
- Returns
- Nothing
Definition at line 242 of file i2s.c.
void I2S0_IRQHandler |
( |
void |
| ) |
|
I2S0 interrupt handler sub-routine.
- Returns
- Nothing
Definition at line 266 of file i2s.c.
Main routine for I2S example.
- Returns
- Nothing
Definition at line 280 of file i2s.c.
Definition at line 96 of file i2s.c.
Definition at line 83 of file i2s.c.
Definition at line 85 of file i2s.c.
uint8_t dmaChannelNum_I2S_Rx |
|
static |
Definition at line 84 of file i2s.c.
uint8_t dmaChannelNum_I2S_Tx |
|
static |
Definition at line 84 of file i2s.c.
Definition at line 80 of file i2s.c.
Definition at line 82 of file i2s.c.
Initial value:= "\n\rHello NXP Semiconductors \n\r"
"I2S DEMO : Connect audio headphone out from computer to line-in on tested board to get audio signal\n\r"
"Please press \'1\' to test Polling mode\n\r"
"Please press \'2\' to test Interrupt mode\n\r"
"Please press \'3\' to test DMA mode\n\r"
"Please press \'x\' to exit test mode\n\r"
"Please press \'m\' to DISABLE/ENABLE mute\n\r"
Definition at line 72 of file i2s.c.