Part of MicroGen4 Music Synthesizer Program. (But not test it yet.) I2S ,DMA ,Stereo ,16Bit Dac(PCM1781) See detail: http://www.geocities.jp/micro_diys/index2

Dependencies:   mbed

Now added generate Saw Wave to DAC function in generate(); You will hear Stereo saw wave sound now. /media/uploads/p_igmon/i2s_sample_test_audacity.png

more info: http://www.geocities.jp/micro_diys/i2s_test_sample/i2s_test_sample.html

main.cpp

Committer:
p_igmon
Date:
2014-07-03
Revision:
0:dc88722ab141

File content as of revision 0:dc88722ab141:

/*
    COPYRIGHT(c) 2014 p.igmon
*/

#include "synthesizer.h"

Serial pc(SERIAL_TX, SERIAL_RX);

DigitalOut myled(LED1);

extern S16 * DMA_Buffer;
extern __IO BUFFER_StateTypeDef BufferOffset;

int main(){
    uGen4_device_init();
    pc.baud(9600);
//    pc.printf("CPU SystemCoreClock is %d Hz\r\n", SystemCoreClock);

    i2s_dma_init();
 
    while(1) {
        if(BufferOffset != DMA_Idle) wave_generate();

        /* other work */

    }
}