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

📄 test_rtdx.c

📁 利用ccs环境、MATLAB环境、DSP(TMS320F2812)、被测对象和Agilient网络分析仪E5071B
💻 C
字号:
#include <stdio.h>         
//#include "DSP28_Device.h"          /* fprintf(), puts()        */

#include <stdlib.h>                     /* abort()                  */

#include <rtdx.h>                       /* RTDX                     */

#include "target.h"                     /* TARGET_INITIALIZE()      */



/* Declare and initialize an output channel called "ochan"          */

RTDX_CreateOutputChannel(ochan);



void main( void )

{

        unsigned int i;



        /* Target initialization for RTDX                           */

        TARGET_INITIALIZE();



        /* Enable the output channel, "ochan"                       */	

        RTDX_enableOutput(&ochan);



        for ( i = 0; i < 100; i++ ) {

                /* Send the data to the host                        */

                if ( !RTDX_write( &ochan, &i, sizeof(i) ) ) {

                        fprintf(stderr,

                                "\nError: RTDX_write() failed!\n");

                        abort();

                }



                /* Wait for data transfer                           */

                while ( RTDX_writing != NULL ) {

                        #if RTDX_POLLING_IMPLEMENTATION

                                /* Call Poll to do data transfer    */

                                RTDX_Poll();

                        #endif

                }

        }



        /* Disable the output channel, "ochan"                      */

        RTDX_disableOutput(&ochan);



        puts("\nProgram Completed!");

}

⌨️ 快捷键说明

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