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
main.cpp
- Committer:
- p_igmon
- Date:
- 2017-09-21
- Revision:
- 1:48f506a7b488
- Parent:
- 0:dc88722ab141
File content as of revision 1:48f506a7b488:
/* 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 */ } }