Texas Instruments TMS320C64x DSP Network Card User Manual


 
Example 1: Noncontinuous Frame Capture for 525/60 Format
Video Port Configuration ExamplesA-8 SPRU629
/* Configure Cb EDMA channel to move data from CbSRCA */
/* (FIFO) to Cbdata buffer, capChaACbSpace */
configVPCapEDMAChannel(&hEdmaVPCapChaACb, UEvent,
&edmaCapChaACbTccNum,
vpCaptureHandle>cbsrcaAddr,
(Uint32)capChaACbSpace,
VCA_Y_EDMA_FRMCNT,
VCA_Y_EDMA_ELECNT/2); /* (1/2) of Ysamples */
/* Configure Cr EDMA channel to move data from CrSRCA */
/* (FIFO) to Crdata buffer, capChaACrSpace */
configVPCapEDMAChannel(&hEdmaVPCapChaACr, VEvent,
&edmaCapChaACrTccNum,
vpCaptureHandle>crsrcaAddr,
(Uint32)capChaACrSpace,
VCA_Y_EDMA_FRMCNT,
VCA_Y_EDMA_ELECNT/2); /* (1/2) of Ysamples */
/* Enable three EDMA channels */
EDMA_enableChannel(hEdmaVPCapChaAY);
EDMA_enableChannel(hEdmaVPCapChaACb);
EDMA_enableChannel(hEdmaVPCapChaACr);
}
/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Function : configVPCapEDMAChannel */
/* */
/* Input(s) : edmaHandle pointer to EDMA handle. */
/* eventId EDMA eventId. */
/* tccNum pointer to transfer complete number. */
/* srcAddr source address for EDMA transfer. */
/* dstAddr destination address for EDMA transfer */
/* frameCount frame count. */
/* elementCount element count(32bit element size). */
/* */
/* Output(s): edmaHandle edma Handle of the given event. */
/* tccNum transfer complete code for the given */
/* event. */
/* */
/* Description : Configures the given VP capture EDMA channel. */
/* The source address update is fixed address mode */
/* because the captured data is read from the FIFO. */
/* In this example, the destination address mode is */
/* autoincrement. But, in realtime applications */
/* there is lot of flexibility in the way capture */
/* buffers can be managed like pingpong and round */
/* robin,etc. */
/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */