⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dm642_rtdx.c

📁 在CCS环境下的一个视频采集源代码
💻 C
字号:

#include "DM642_RTDX.h"

//RTDX
RTDX_CreateOutputChannel(ochan);
RTDX_CreateInputChannel(ichan);
/*
void RTDX_RecvData()
{
	int i=0;

    // Target initialization for RTDX
    TARGET_INITIALIZE();
    
	RTDX_enableInput( &ichan );

	for(i=0;i<numLines;i++){
		// Y buffer
		RTDX_read( &ichan, (void *)(disYbuffer + i * 720), 720 );
		while (ichan.busy == 1);
	}

	for(i=0;i<numLines;i++){
		// Cb buffer
		RTDX_read( &ichan, (void *)(disCbbuffer + i * 360), 360 );
		while (ichan.busy == 1);
	}

	for(i=0;i<numLines;i++){
		// Cr buffer
		RTDX_read( &ichan, (void *)(disCrbuffer + i * 360), 360 );
		while (ichan.busy == 1);
	}

	RTDX_disableInput( &ichan );
}

void RTDX_SendDisData()
{
	int i=0;
	int breaker[2] = {0x67452301,0xEFCDAB89};

    // Target initialization for RTDX
    TARGET_INITIALIZE();
    // Enable the output channel, "ochan"
    RTDX_enableOutput(&ochan);

    // Send the data to the host
	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );
	
	for (i=0;i<487;i++){
    	if (!RTDX_write( &ochan, (void *)(capYbuffer+i*720), 720 ) ) abort();
	    while ( RTDX_writing != NULL );
	}

	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );

	for (i=0;i<487;i++){
		if (!RTDX_write( &ochan, (void *)(capCbbuffer+i*360), 360) ) abort();
		while ( RTDX_writing != NULL );
	}	

	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );

	for (i=0;i<487;i++){
		if (!RTDX_write( &ochan, (void *)(capCrbuffer+i*360), 360 ) ) abort();
	    while ( RTDX_writing != NULL );
	}

	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );

    // Disable the output channel, "ochan"
    RTDX_disableOutput(&ochan);
}

void RTDX_SendCapData()
{
	int i=0;
	int breaker[2] = {0x67452301,0xEFCDAB89};

    // Target initialization for RTDX
    TARGET_INITIALIZE();
    // Enable the output channel, "ochan"
    RTDX_enableOutput(&ochan);

    // Send the data to the host
	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );
	
	for (i=0;i<487;i++){
    	if (!RTDX_write( &ochan, (void *)(capYbuffer+i*720), 720 ) ) abort();
	    while ( RTDX_writing != NULL );
	}

	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );

	for (i=0;i<487;i++){
		if (!RTDX_write( &ochan, (void *)(capCbbuffer+i*360), 360 ) ) abort();
		while ( RTDX_writing != NULL );
	}	

	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );

	for (i=0;i<487;i++){
		if (!RTDX_write( &ochan, (void *)(capCrbuffer+i*360), 360 ) ) abort();
	    while ( RTDX_writing != NULL );
	}

	RTDX_write( &ochan, breaker, sizeof(breaker));
    while ( RTDX_writing != NULL );

    // Disable the output channel, "ochan"
    RTDX_disableOutput(&ochan);
}

*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -