Texas Instruments TMS320C64x DSP manual Example 2 Noncontinuous Frame Display for 525/60 Format

Models: TMS320C64x DSP

1 306
Download 306 pages 13.79 Kb
Page 295
Image 295

 

 

Example 2: Noncontinuous Frame Display for 525/60 Format

/* 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);

 

SPRU629

Video Port Configuration Examples

A-19

Page 295
Image 295
Texas Instruments TMS320C64x DSP manual Example 2 Noncontinuous Frame Display for 525/60 Format