short input_left_sample(); short input _right_sample():
############################################################################# //C6713dskinit.c Includes functions from TI in the C6713 CSL and C6713DSK BSL #include "C6713dskinit.h"
#defme using bios //if BIOS don't use top of vector table
extem Uint32 fs; //for sampling frequency
void c6713_dsk_init() //dsp-peripheral initialization
{
DSK6713_initO; //cali BSL to init DSK-EMIF,PLL)
hAIC23_handle=DSK6713_AIC23_openCodec(0, &config);//handle(pointer) to codec DSK6713_AIC23_setFreq(hAIC23_handle, fs); //set sample ratę
MCBSP_config(DSK6713_AIC23_DATAHANDLE,&AIC23CfgData);//interface 32 bits toAIC23
MCBSP_start(DSK6713_AIC23_DATAHANDLE, MCBSP_XMIT_START | MCBSP_RCV_START |
MCBSP SRGR START | MCBSPSRGRFRAMESYNC, 220);//start data channel again
>
void comm_poll() |
//added for communication/init |
using polling | |
X poll=l; |
//I if using polling |
c6713 dsk init(); } |
//init DSP and codec |
void comm_intr() |
//for communication/init using |
interrupt i | |
X poll=0; |
//O sińce not polling |
IRO globalDisableO; |
//disable interrupts |
c6713 dsk init(); |
//init DSP and codec |
CODECEventId=MCBSP_getXmtEventId(DSK6713_AIC23_codecdatahandle);//McBSPl | |
Xmit | |
#ifndef using_bios |
//do not need to point to vector table |
IRQ_setVecs(vectors); |
//point to the IRQ vector table |
#endif |
//sińce interrupt vector |
handles this | |
IRQ_map(CODECEventId, 11); //map McBSPl Xmit to INT11 | |
IRQ reset(CODECEventId); |
//reset codec INT 11 |
IRQ_globalEnableO; |
//globally enable interrupts |
IRQ_nmiEnable(); |
//enable NMI interrupt |
IRQ_enable(CODECEventId); |
//enable CODEC eventXmit INT11 |
output_sample(0); |
//start McBSP interrupt outputting a sample |
}