Untitled
unknown
plain_text
5 months ago
580 B
4
Indexable
DSK6713_AIC23_Configconfig = DSK6713_AIC23_DEFAULTCONFIG; DSK6713_AIC23_CodecHandlehCodec; /* Start the codec */ hCodec = DSK6713_AIC23_openCodec(0, &config); /* Change the sampling rate to 16 kHz */ DSK6713_AIC23_setFreq(hCodec, DSK6713_AIC23_FREQ_8KHZ); for(;;) { /* Infinite loop */ sample = 15000.0 * sin(theta); /* Scale for DAC */ out_sample = (int)sample & 0x0000ffff; // Put in lower half (R) /* Poll XRDY bit until true, then write to DXR */ while(!DSK6713_AIC23_write(hCodec, out_sample)) ; theta += delta; if (theta > 2 * pi) theta -= 2 * pi; } }
Editor is loading...
Leave a Comment