|
我定义了以下两个结构体:
struct stWordAddress{
ushort WriteAddress;
uchar WriteBank;
}WordAddr;
struct stWordWriteData{
uchar WordNumber;
uchar WriteDataBuffer[256];
ushort WriteAddressData;
uchar WriteBankData;
}WordWriteData;
用于以下函数:
uchar FlashWordWrite_Call(struct stWordAddress *ptr1,ushort DataBufferAddress,struct stWordWriteData *ptr2)
{
uchar Status;
ushort i;
uchar *p;
p = (uchar*)DataBufferAddress;
for(i=0;i<=4*(ptr2->WordNumber)-1;i++)
{
*p = ptr2->WriteDataBuffer;
p++;
}//write in address and bank is set to the write_inite address
ptr1->WriteAddress = ptr2->WriteAddressData;
ptr1->WriteBank = ptr2->WriteBankData;
}
编译后出现的错误:
call.c(62) : CC78K0 error E0516: Zero sized structure 'ptr2'
call.c(62) : CC78K0 error E0533: Invalid left-or-right operand : '*'
call.c(62) : CC78K0 error E0520: Illegal use of pointer
call.c(64) : CC78K0 error E0516: Zero sized structure 'ptr2'
call.c(64) : CC78K0 error E0402: Incompatible type conversion
call.c(68) : CC78K0 error E0516: Zero sized structure 'ptr1'
call.c(68) : CC78K0 error E0516: Zero sized structure 'ptr2'
call.c(69) : CC78K0 error E0516: Zero sized structure 'ptr1'
call.c(69) : CC78K0 error E0516: Zero sized structure 'ptr2'
call.c(74) : CC78K0 error E0516: Zero sized structure 'ptr2'
请教各位高手,这些错误怎么解决啊,我看不出来哪里错了啊?多谢,十分感谢 |
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|