
Example 2: Noncontinuous Frame Display for 525/60 Format
A-19Video Port Configuration ExamplesSPRU629
/* enable three EDMA channels */
EDMA_enableChannel(hEdmaVPDispY);
EDMA_enableChannel(hEdmaVPDispCb);
EDMA_enableChannel(hEdmaVPDispCr);
}
/*ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
/* Function : configVPDispEDMAChannel */
/* */
/* 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(32βbit element size). */
/* */
/* Output(s): edmaHandle β edma Handle of the given event. */
/* tccNum β transfer complete code for the given */
/* event. */
/* */
/* Description : Configures the given VP display EDMA channel. */
/* The destination address update is fixed because */
/* the displayed data is write to the FIFO. */
/* In this example, the source address mode is */
/* autoβincrement. But, in realβtime applications */
/* there is lot of flexibility in the way display */
/* buffers can be managed like pingβpong and round */
/* robin,β¦etc. */
/*ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
void configVPDispEDMAChannel(EDMA_Handle *edmaHandle,
Int32 eventId, Int32 *tccNum,
Uint32 srcAddr, Uint32 dstAddr,
Uint32 frameCount, Uint32 elementCount)
{
Int32 tcc = 0;
/* Open Y event EDMA channel */
*edmaHandle = EDMA_open(eventId, EDMA_OPEN_RESET);
if(*edmaHandle == EDMA_HINV)
test_exit(FAIL);
/* allocate TCC for Y event */
if((tcc = EDMA_intAlloc(β1)) == β1)
test_exit(FAIL);
Commenti su questo manuale