在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!)    创芯人才网--重磅上线啦!
查看: 4431|回复: 0

[原创] 求助,关于RTDX的问题

[复制链接]
发表于 2006-12-14 12:59:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 cjsb37 于 2013-4-29 09:12 编辑

我按照书上的原码,编译无错误,经主机调试,证明通道也打开了,就是传不了数据,哪位高手帮帮忙啊!
Watch Windows里面出现一项提示:
     pvBuf    0x00000000 void * hex   
   (*pvBuf)  cannot load from non-primitive location dec
不知是什么意思?有谁知道的能告诉小弟一下吗,小弟还没入门,请大家指教啊!


源程序: 目标机程序

#include <rtdx.h>       /* defines RTDX target API calls            */
#include "target.h"     /* defines TARGET_INITIALIZE()              */
#include <stdio.h>      /* C_I/O                                    */
/* This is the value we are going to send to the host               */
#define VALUE_TO_SEND 500
/* declare a global output channel                                  */
RTDX_CreateOutputChannel( ochan );
RTDX_CreateInputChannel(ichan);

void main()
{
        int data;
        int status;
        TARGET_INITIALIZE();
        /* enable output channel                                    */
        RTDX_enableOutput( &ochan );
        RTDX_enableOutput( &ichan );
        /* send an integer to the host                              */
  //      status = RTDX_write( &ochan, &data, sizeof(data) );
        status = RTDX_read( &ichan, &data,3);
        if ( status == 0 ) {
                puts( "ERROR: RTDX_write failed!\n" );
                exit( -1 );
        }
  else
  printf("%d",data);
        while ( RTDX_writing != NULL ) {
#if RTDX_POLLING_IMPLEMENTATION
                RTDX_Poll();
#endif
        }
        /* disable the output channel                               */
        RTDX_disableOutput( &ochan );
  RTDX_disableInput( &ichan );
        puts( &quotrogram Complete!\n" );
}





您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-3 14:36 , Processed in 0.030006 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表