Plays USB Audio packets through external DAC (Cirrus Logic CS4344). Simple demo code, don't expect a sophisticated I2S library. HW setup: mbed DIP 5 (I2STX_SDA) -> DAC SDIN (Serial Audio Data Input) mbed DIP 6 (I2STX_WS) -> DAC LRCK (Left Right Clock) mbed DIP 7 (I2STX_CLK) -> DAC SCLK (External Serial Clock Input) mbed DIP 30 (I2SRX_CLK) -> DAC MCLK (Master Clock) also needed an extra USB connector wired to mbed. Does not work with built-in USB. Code needs a bit of clean up.
I2S.h@0:bf9e7b99dda5, 2012-04-16 (annotated)
- Committer:
- csorbag
- Date:
- Mon Apr 16 08:28:42 2012 +0000
- Revision:
- 0:bf9e7b99dda5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
csorbag | 0:bf9e7b99dda5 | 1 | #ifndef I2S_H |
csorbag | 0:bf9e7b99dda5 | 2 | #define I2S_H |
csorbag | 0:bf9e7b99dda5 | 3 | |
csorbag | 0:bf9e7b99dda5 | 4 | #include "mbed.h" |
csorbag | 0:bf9e7b99dda5 | 5 | |
csorbag | 0:bf9e7b99dda5 | 6 | void setup(Serial *out); |
csorbag | 0:bf9e7b99dda5 | 7 | void play(int16_t *buf,int16_t length); |
csorbag | 0:bf9e7b99dda5 | 8 | |
csorbag | 0:bf9e7b99dda5 | 9 | |
csorbag | 0:bf9e7b99dda5 | 10 | #endif |