打印

有错!!!!

[复制链接]
1403|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
cunwmy|  楼主 | 2009-3-8 00:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
TE, USB, AC, DAC, ST
extern BYTE SOF_Flag;
BYTE  Count;
BYTE  OutReport[2];
//unsigned char Power
     
void main() {

    M8C_EnableGInt;
    USB_Start(0,USB_5V_OPERATION);
    DAC8_Start(DAC8_HIGHPOWER);
    DAC8_1_Start(DAC8_1_HIGHPOWER);
    DAC8_1_WriteBlind(0);
    
    while (!USB_bGetConfiguration());
    USB_INT_REG |= USB_INT_SOF_MASK;
    USB_EnableOutEP(4);

    
    while(1) {
        if (SOF_Flag) {
            SOF_Flag = 0;
            
            if (USB_bGetEPAckState(4)) 
            {
                Count = USB_bReadOutEP(4, OutReport, 2);
                DAC8_WriteBlind(OutReport);

                USB_EnableOutEP(4);
            }
        }
        }
    }

编译出错:
!EC:\Documents and Settings\Administrator\桌面\w6\w6\main.c(40): type error in argument 1 to `DAC8_WriteBlind'; found `pointer to unsigned char' expected `unsigned char'
 
C:\PROGRA~1\Cypress\Common\CY3E64~1\tools\make: *** [obj/main.o] Error 1
沙发
yuxyoo| | 2009-3-8 13:25 | 只看该作者

代码里

统一DAC8_1 和DAC8为其中的一个就好了

使用特权

评论回复
板凳
ni_labview| | 2009-3-8 23:14 | 只看该作者

DAC8_WriteBlind(OutReport);好像有问题

应该是DAC8_WriteBlind(OutReport[0]);
或者是DAC8_WriteBlind(OutReport[1]);

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

18

主题

179

帖子

1

粉丝