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
Now added generate Saw Wave to DAC function in generate(); You will hear Stereo saw wave sound now.
more info: http://www.geocities.jp/micro_diys/i2s_test_sample/i2s_test_sample.html
Diff: main.cpp
- Revision:
- 0:dc88722ab141
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jul 03 11:59:07 2014 +0000 @@ -0,0 +1,29 @@ +/* + 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 */ + + } +} + +